update 基本完成混料订单
This commit is contained in:
parent
d3bb18dd62
commit
b4f512d511
@ -90,8 +90,9 @@ export default {
|
|||||||
// 检查可用状态
|
// 检查可用状态
|
||||||
let shouldDisabled = false;
|
let shouldDisabled = false;
|
||||||
if ("enable" in opt && typeof opt.enable === "function") {
|
if ("enable" in opt && typeof opt.enable === "function") {
|
||||||
shouldDisabled = opt.enable(this.injectData);
|
shouldDisabled = !opt.enable(this.injectData);
|
||||||
}
|
}
|
||||||
|
console.log('should disabled', shouldDisabled)
|
||||||
btns.push(
|
btns.push(
|
||||||
h(
|
h(
|
||||||
"el-button",
|
"el-button",
|
||||||
@ -102,7 +103,7 @@ export default {
|
|||||||
title: opt.label ?? opt.name,
|
title: opt.label ?? opt.name,
|
||||||
disabled: shouldDisabled,
|
disabled: shouldDisabled,
|
||||||
},
|
},
|
||||||
style: { color: opt.color || this.colors[opt.name] || "#0b58ff" },
|
style: { color: !shouldDisabled && (opt.color || this.colors[opt.name] || "#0b58ff") },
|
||||||
on: { click: this.emit.bind(null, opt) },
|
on: { click: this.emit.bind(null, opt) },
|
||||||
},
|
},
|
||||||
opt.icon ? (opt.showText ? this.text[opt.name] ?? opt.label : "") : opt.label ?? this.text[opt.name]
|
opt.icon ? (opt.showText ? this.text[opt.name] ?? opt.label : "") : opt.label ?? this.text[opt.name]
|
||||||
|
@ -257,6 +257,15 @@ export default {
|
|||||||
this.openDialog(data, true);
|
this.openDialog(data, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "view-blender-batch-details": {
|
||||||
|
this.$router.push({
|
||||||
|
name: 'pms-blenderBatchDetails',
|
||||||
|
query: {
|
||||||
|
batchId: data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "status": {
|
case "status": {
|
||||||
console.log("status", data);
|
console.log("status", data);
|
||||||
// TODO: 类似于这种字符串,可以统一集中到一个文件里
|
// TODO: 类似于这种字符串,可以统一集中到一个文件里
|
||||||
|
@ -24,14 +24,17 @@ export default function () {
|
|||||||
// { prop: "remark", label: "备注" },
|
// { prop: "remark", label: "备注" },
|
||||||
// { prop: 'version', label: '配方号' },
|
// { prop: 'version', label: '配方号' },
|
||||||
// { prop: 'status', label: '状态', subcomponent: StatusComponent }, // subcomponent
|
// { prop: 'status', label: '状态', subcomponent: StatusComponent }, // subcomponent
|
||||||
{ prop: "description", label: "详情", subcomponent: TableTextComponent },
|
{ prop: "description", label: "详情", subcomponent: TableTextComponent, actionName: 'view-blender-batch-details' },
|
||||||
{
|
{
|
||||||
prop: "operations",
|
prop: "operations",
|
||||||
name: "操作",
|
name: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 120,
|
width: 120,
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [{ name: 'edit', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } }] // 只有 injectRow.task 为手动时,才允许编辑
|
options: [
|
||||||
|
{ name: 'edit', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } },
|
||||||
|
{ name: 'delete', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual' } },
|
||||||
|
] // 只有 injectRow.task 为手动时,才允许编辑
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ export default function () {
|
|||||||
},
|
},
|
||||||
urls: {
|
urls: {
|
||||||
base: "/pms/blenderDetail",
|
base: "/pms/blenderDetail",
|
||||||
page: "/pms/blenderDetail/page",
|
page: "/pms/blenderDetail/pageView",
|
||||||
// pageIsPostApi: true, // 使用post接口来获取page数据,极少用,目前基本上只有工艺管理模块里在用
|
// pageIsPostApi: true, // 使用post接口来获取page数据,极少用,目前基本上只有工艺管理模块里在用
|
||||||
// subase: "/pms/equipmentTechParam",
|
// subase: "/pms/equipmentTechParam",
|
||||||
},
|
},
|
||||||
|
@ -14,7 +14,7 @@ import initConfig from "./config";
|
|||||||
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
|
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BlenderBatchView",
|
name: "BlenderBatchDetailsView",
|
||||||
components: { ListViewWithHead },
|
components: { ListViewWithHead },
|
||||||
provide() {
|
provide() {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user