From 230466b4ddec203f471be0bf5f6564e16fb9bb79 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Wed, 26 Jun 2024 13:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8E=92=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plan/order.js | 20 +- src/api/plan/workorder.js | 7 + src/views/mes/dailyReportNew/index.vue | 45 +-- src/views/plan/order/index.vue | 167 +++++++--- src/views/plan/workorder/index.vue | 21 +- src/views/quality/aql/codeContent.vue | 3 +- src/views/quality/qcTableDL/index.vue | 421 ++++++++++++++++++++++++- src/views/wms/product/index.vue | 8 + 8 files changed, 601 insertions(+), 91 deletions(-) diff --git a/src/api/plan/order.js b/src/api/plan/order.js index 3a639ea..4d0f992 100644 --- a/src/api/plan/order.js +++ b/src/api/plan/order.js @@ -33,6 +33,15 @@ export function getProRoutes(prodCode) { }) } +// 通过物料code获取工艺信息 +export function getCanProductLine(data) { + return request({ + url: '/plan/order/getCanProductLine', + method: 'post', + data: data + }) +} + // 获取当天的递增工单执行顺序 export function getProSortNo(productDate) { const data = { @@ -165,4 +174,13 @@ export function deleteOrder(orderIds) { url: '/plan/order/deleteOrder/' + orderIds, method: 'post' }); -} \ No newline at end of file +} + +//辅助排产 +export function autoSplitOrder(data) { + return request({ + url: '/plan/order/autoSplitOrder', + method: 'post', + data: data + }); +} diff --git a/src/api/plan/workorder.js b/src/api/plan/workorder.js index 6be3492..7d5a83e 100644 --- a/src/api/plan/workorder.js +++ b/src/api/plan/workorder.js @@ -174,3 +174,10 @@ export function removeWorkOrderBatch(batchCode,workorderCode) { }); } +export function getProdLineList() { + return request({ + url: '/plan/pro/workorder/getProdLineList', + method: 'get', + params: {} + }); +} \ No newline at end of file diff --git a/src/views/mes/dailyReportNew/index.vue b/src/views/mes/dailyReportNew/index.vue index c76183a..bcc1ea9 100644 --- a/src/views/mes/dailyReportNew/index.vue +++ b/src/views/mes/dailyReportNew/index.vue @@ -86,15 +86,8 @@ - - - + + 0){ + if(this.queryParams.timeArray.length>0){ this.queryParams.productDateStart = moment(this.queryParams.timeArray[0]).format('YYYY-MM-DD'); this.queryParams.productDateEnd = moment(this.queryParams.timeArray[1]).format('YYYY-MM-DD'); } @@ -199,7 +207,7 @@ export default { }); }, getWorkcenterList(){ - getWorkcenterList().then(data => { + getWorkcenterList().then(data => { this.options = data; }); this.queryParams.workCenter = this.options[0].factoryCode; @@ -212,11 +220,10 @@ export default { // 表单重置 reset() { this.form = { - }; this.resetForm("form"); }, - productCodeFormate(row, column, cellValue){ + productCodeFormate(row, column, cellValue){ if(cellValue != null){ return cellValue.slice(7,18); //返回值 } diff --git a/src/views/plan/order/index.vue b/src/views/plan/order/index.vue index b03de2e..c87df29 100644 --- a/src/views/plan/order/index.vue +++ b/src/views/plan/order/index.vue @@ -115,12 +115,15 @@ >导出 - + ---> + @@ -499,32 +502,67 @@ 取 消 - + - - - - - - - - - - - - - - - 自动拆分 - 拆分结果 - + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ + + + {{ item.lineName }} + + + +
+
+ + + - - - - - - - - - - - + - + + +
@@ -571,7 +603,8 @@ import { addOrder, updateOrder, syncSAP, selectMaterielList,getAutoSplitList, - deleteOrder + deleteOrder,getCanProductLine, + autoSplitOrder } from '@/api/plan/order' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' @@ -689,11 +722,17 @@ export default { /**********************************/ eRouteProps: {multiple: true}, eRouteOptions: [], - titleAutoSplit:"订单排产", + titleAutoSplit:"订单辅助排产", openAutoSplit:false, orderCodes:[], autoSplitList:[], - autoSplitLoading: true + autoSplitLoading: true, + activeSplit: 0, + autoSplitform1:{ + productDate:new Date() + }, + autoSplitform2: {lineCodes:[]}, + lineCodes:[] } }, created() { @@ -1444,7 +1483,7 @@ export default { } ) }, - /**自动排产**/ + /**辅助排产**/ // 多选框选中数据 handleAutoSplitSelection(selection) { this.single = selection.length !== 1 @@ -1453,9 +1492,26 @@ export default { }, //排产优先级 handleAutoSplit(row) { - debugger this.autoSplitLoading = true; this.autoSplitList = this.orderCodes; + + // 获取工艺信息(工艺选最新的) + getProRoutes(this.autoSplitList[0].prodCode).then(response => { + this.routes = response.data; + this.autoSplitform1.routeCode = response.data[0].routeCode + }) + var ymd = moment(this.autoSplitform1.productDate).format('YYYY-MM-DD') + // 获取工单生产顺序 + getProSortNo(ymd).then(response => { + this.autoSplitform1.sortNo = response + }) + // 获取生产线体列表 + getCanProductLine(this.autoSplitList[0]).then(response => { + this.lineCodes = response.lineList; + this.autoSplitform2.lineCodes = response.recommendLineList;//['XL01','XL02']; + }) + + this.openAutoSplit = true; this.autoSplitLoading = false; }, @@ -1494,7 +1550,26 @@ export default { } }); - } + }, + next() { + if (this.activeSplit++ > 2) this.activeSplit = 0; + //选完线体后的下一步,会进行模拟拆分 + if(this.activeSplit == 2){ + debugger + autoSplitOrder(Object.assign({},this.autoSplitform1,this.autoSplitform2,this.autoSplitList[0])).then(response => { + + }); + } + }, + prev(){ + if (this.activeSplit-- > 2) this.activeSplit = 2; + //会进行模拟拆分的取消 + if(this.activeSplit == 1){ + autoSplitOrderCancel(Object.assign({},autoSplitform2)).then(response => { + + }); + } + } } } diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index b4771ac..b9a86d4 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -49,12 +49,14 @@ /> - + + + { this.workShift = response.data }) + getProdLineList().then(response => { + this.prodLineList = response + }) }, methods: { //产品编码格式化 diff --git a/src/views/quality/aql/codeContent.vue b/src/views/quality/aql/codeContent.vue index 188209f..5440332 100644 --- a/src/views/quality/aql/codeContent.vue +++ b/src/views/quality/aql/codeContent.vue @@ -242,8 +242,7 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.reset(); - const id = - row.id || this.ids + const id = row.id || this.ids getCode(id).then(response => { this.form = response.data; this.open = true; diff --git a/src/views/quality/qcTableDL/index.vue b/src/views/quality/qcTableDL/index.vue index eb7093f..d352c43 100644 --- a/src/views/quality/qcTableDL/index.vue +++ b/src/views/quality/qcTableDL/index.vue @@ -137,10 +137,31 @@ plain icon="el-icon-s-data" size="mini" - @click="handleAnalysis" - >图标分析柱状图表分析 + + 折线图表分析 + +