add 混料批次

This commit is contained in:
lb
2023-03-14 15:46:12 +08:00
parent 78cfff4d6d
commit df9a9a04da
5 changed files with 302 additions and 3 deletions

View File

@@ -164,7 +164,7 @@ export default {
},
/** 处理 表格操作 */
handleOperate({ type, data }) {
handleOperate({ type, data, toRouter }) {
console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
@@ -209,6 +209,15 @@ export default {
this.openDialog(data, true);
break;
}
case 'view-batch': {
this.$router.push({
name: toRouter,
params: {
id: data // 混料订单id
}
})
break;
}
case "detach": {
return this.$http
.post(this.urls.detach, data /* { id: data } */, { headers: { "Content-Type": "application/json" } })

View File

@@ -36,7 +36,7 @@ export default function () {
subcomponent: TableOperaionComponent,
options: [
{ name: "edit", label: "编辑", emitFull: true },
{ name: "view-batch", label: "查看批次", color: "#ff8000" },
{ name: "view-batch", label: "查看批次", color: "#ff8000", toRouter: 'pms-blenderBatch' }, // 路由跳转至 pms-blenderBatch
{ name: "detach", label: "下发", color: "#099" },
], // , url: '/pms/trans/pressDeli' }]
// options: ["copy", "edit", { name: "delete", emitFull: true, permission: "pms:blenderStep:delete" }],