From 26acad94f3339dfbb352f6efae6c112da7f6dadf Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Fri, 18 Oct 2024 22:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plan/workorder.js | 8 +++ src/views/mes/prepare/index.vue | 17 ++++-- src/views/plan/workorder/index.vue | 66 +++++++++++++++++++---- src/views/quality/incomeReport/index.vue | 10 ---- src/views/quality/produceReport/index.vue | 21 ++++++-- src/views/quality/productReport/index.vue | 14 +++-- src/views/quality/qcProduce/index.vue | 49 ++++++++++++----- src/views/quality/qcWarehousing/index.vue | 25 +++++---- 8 files changed, 157 insertions(+), 53 deletions(-) diff --git a/src/api/plan/workorder.js b/src/api/plan/workorder.js index 24729a8..7f1362b 100644 --- a/src/api/plan/workorder.js +++ b/src/api/plan/workorder.js @@ -111,6 +111,14 @@ export function delWorkorder(workorderId) { }); } +// 生产工单更新领料单 +export function updateWorkOrderBom(workorderCode) { + return request({ + url: '/plan/pro/workorder/updateWorkOrderBom/' + workorderCode, + method: 'post' + }); +} + //下发生产工单 export function downWorkorder(workorderId) { return request({ diff --git a/src/views/mes/prepare/index.vue b/src/views/mes/prepare/index.vue index 16759a7..f1e23b5 100644 --- a/src/views/mes/prepare/index.vue +++ b/src/views/mes/prepare/index.vue @@ -136,8 +136,11 @@ - - + + @@ -592,12 +595,20 @@ export default { this.resetForm("queryForm"); this.handleQuery(); }, + /**单选**/ + handleCurrentChange(selection) { + this.ids = selection.prepareId + this.single = selection==null + this.selectPrepare = [] + this.selectPrepare.push(selection) + }, + // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item.prepareId) this.single = selection.length!==1 this.multiple = !selection.length - this.selectPrepare = selection + this.selectPrepare = selection }, /** 新增按钮操作 */ handleAdd() { diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 833fd26..c45a128 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -82,16 +82,6 @@ - 打印标识卡 + + + 更新领料单 + + + + 导出排产计划 + + @@ -740,7 +754,7 @@ import { getWorkOrders, listWorkorder,listWorkorderLevel0,getNextLevelWorkOrderList, - delWorkorder, + delWorkorder,updateWorkOrderBom, downWorkorder, getOrderAndWork,getProSortNo, getWorkBatchList, @@ -1502,6 +1516,13 @@ export default { ...this.queryParams }, `workorder_${new Date().getTime()}.xlsx`) }, + // 导出-排查计划导出按钮操作 + handlePOWExport(){ + this.download('plan/pro/workorder/powExport', { + ...this.queryParams + }, `workorderPlan_${new Date().getTime()}.xlsx`) + }, + // 打印预览-浏览器打印 handlePrint(params) { printJS({ @@ -2003,6 +2024,29 @@ export default { this.form.userName = obj.code; this.form.nickName = obj.name; }, + // 更新领料单 + handleSyncBom(row) { + + var statusesArray = this.statuses; + for (var i = 0; i < statusesArray.length; i++) { + if (!statusesArray[i] == 'w1') { + this.$modal.msgError("工单只有派发后才可进行领料单更新!"); + return + } + } + + const workorderIds = row.workorderId || this.ids; + + const workorderCodes = row.workorderCode || this.codes; + + this.$modal.confirm('是否确认更新生产工单编号为"' + workorderCodes + '"的领料单数据?').then(function () { + return updateWorkOrderBom(workorderCodes[0]); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("更新成功"); + }).catch(() => { + }); + }, } }; diff --git a/src/views/quality/incomeReport/index.vue b/src/views/quality/incomeReport/index.vue index fe9d16c..619d7e1 100644 --- a/src/views/quality/incomeReport/index.vue +++ b/src/views/quality/incomeReport/index.vue @@ -56,16 +56,6 @@ - - + + @@ -583,12 +584,13 @@ + + {{ form.fileNo }} @@ -838,6 +840,19 @@ export default { this.getCheckTypes(); }, methods: { + //产品编码格式化 + productCodeFormate(row, column, cellValue){ + if(cellValue !=null){ + return cellValue.slice(7,18); //返回值 + } + }, + //订单编码格式化 + orderCodeFormate(row, column, cellValue){ + if(cellValue !=null){ + return cellValue.slice(3,18); //返回值 + } + + }, //巡检检验结果格式化 checkStatusFormate(row, column, cellValue){ if(cellValue == 'Y'){ diff --git a/src/views/quality/productReport/index.vue b/src/views/quality/productReport/index.vue index a54fd7c..0f6e796 100644 --- a/src/views/quality/productReport/index.vue +++ b/src/views/quality/productReport/index.vue @@ -72,8 +72,9 @@ - - + + + @@ -151,7 +152,7 @@ {{form.createTime}} {{form.incomeBatchNo}} - {{form.fileNo}} + 09JS08S-048B {{form.checkTime}} @@ -362,6 +363,13 @@ export default { this.getDefectType(); }, methods: { + //订单编码格式化 + orderCodeFormate(row, column, cellValue){ + if(cellValue !=null){ + return cellValue.slice(3,18); //返回值 + } + + }, /****/ getCheckTypes() { getCheckTypes('material').then(response => { diff --git a/src/views/quality/qcProduce/index.vue b/src/views/quality/qcProduce/index.vue index c11bcf0..0da1492 100644 --- a/src/views/quality/qcProduce/index.vue +++ b/src/views/quality/qcProduce/index.vue @@ -27,9 +27,9 @@ @keyup.enter.native="handleQuery" /> - + + + + + + + - - - + + + - - - + + + + + + - - - + + + - +