diff --git a/src/router/index.js b/src/router/index.js index 7dd7e09..8a03bea 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,12 @@ export const constantRoutes = [ { path: '/system/productionPlan', component: () => import('@/views/system/productionPlan') + }, + { + path: '/system/operationPlanningMain', + component: () => import('@/views/system/operationPlanningMain'), + name: 'OperationPlanningMainPublic', + meta: { title: '生产计划' } } ] }, diff --git a/src/views/system/operationPlanningMain/index.vue b/src/views/system/operationPlanningMain/index.vue index 58cc65c..0421bf5 100644 --- a/src/views/system/operationPlanningMain/index.vue +++ b/src/views/system/operationPlanningMain/index.vue @@ -457,7 +457,7 @@ export default { }; }, created() { - this.getList(); + this.initFromRoute(); }, computed: { processDialogBillNo() { @@ -477,6 +477,15 @@ export default { } }, methods: { + initFromRoute() { + const q = (this.$route && this.$route.query) || {}; + const batchNo = q.batchNo || q.hbytSclh || q.productionOrderNo; + if (batchNo) { + this.queryParams.hbytSclh = batchNo; + this.queryParams.pageNum = 1; + } + this.getList(); + }, /** 查询工序计划主列表 */ getList() { this.loading = true; diff --git a/src/views/system/orderPro/index.vue b/src/views/system/orderPro/index.vue index 3cfb274..300d608 100644 --- a/src/views/system/orderPro/index.vue +++ b/src/views/system/orderPro/index.vue @@ -166,6 +166,7 @@ @command="(command) => handleCommand(command, scope.row)"> 查看工艺 + 生产计划 查看BOM 修改 @@ -1619,6 +1620,16 @@ export default { return 0; // 兜底 }, handleCommand(command, row) { + if ("生产计划" === command) { + this.$router.push({ + path: "/system/operationPlanningMain", + query: { + hbytSclh: row && row.productionOrderNo ? row.productionOrderNo : undefined, + batchNo: row && row.productionOrderNo ? row.productionOrderNo : undefined + } + }); + return; + } if ("BOM" === command) { this.handleBOM(row.productionOrderNo); }