From 0219b43ac8c6bf5ec5144d6f6a254c1d8233b619 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Sat, 23 Sep 2023 01:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B9=BF=E6=96=99=E8=AE=A1=E5=88=92=E9=9B=86?= =?UTF-8?q?=E6=88=90=E5=88=B0=E7=99=BD=E8=83=9A=E8=AE=A2=E5=8D=95=E6=8B=86?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/plan/index.vue | 2 + src/views/plan/whiteOrder/index.vue | 181 +++++++++++++++++--- src/views/plan/workorder/index.vue | 245 ++++++++++++++++++++++------ 3 files changed, 359 insertions(+), 69 deletions(-) diff --git a/src/views/plan/plan/index.vue b/src/views/plan/plan/index.vue index a363f95c..1ebe50a9 100644 --- a/src/views/plan/plan/index.vue +++ b/src/views/plan/plan/index.vue @@ -1136,6 +1136,7 @@ export default { handleSelectionChange(selection) { // 初始化 this.checkSelect = true + /** // 如果选择中班次冲突 for (let i = 0; i < selection.length; i++) { if (selection[0].shiftId != selection[i].shiftId) { @@ -1146,6 +1147,7 @@ export default { this.checkSelect = false } } + **/ this.ids = selection.map(item => item.id) this.single = selection.length !== 1 this.multiple = !selection.length diff --git a/src/views/plan/whiteOrder/index.vue b/src/views/plan/whiteOrder/index.vue index f5f3813d..24a58e3e 100644 --- a/src/views/plan/whiteOrder/index.vue +++ b/src/views/plan/whiteOrder/index.vue @@ -394,27 +394,17 @@ - - - - - + - - - - + + @@ -424,6 +414,18 @@ + + + + + + + + + + + + @@ -437,6 +439,20 @@ + + + +
+ +
+
+
+
@@ -522,6 +538,56 @@ 取 消 + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + 确定 + + @@ -573,7 +639,9 @@ export default { shiftId: null, routeCode: null, formFields: [], - carNum: null + carNum: null, + materialCode: null, + materialName: null }, // 拆分-拆分订单列表加载 refreshProTable: true, @@ -672,7 +740,17 @@ export default { headers: {poolName: localStorage.getItem("USER_POOL_NAME_CURRENT"), Authorization: "Bearer " + getToken()}, // 上传的地址 url: process.env.VUE_APP_BASE_API + "/plan/order/importData" - } + }, + //组成白坯物料弹窗 + innerBPVisible: false, + materielParams: { + mtart: 'material_type1', + productCode: null, + productDescZh: null, + pageNum: 1, + pageSize: 10, + }, + materielBP: [], }; }, created() { @@ -795,7 +873,9 @@ export default { productDate: null, shiftId: null, routeCode: null, - formFields: [] + formFields: [], + materialCode: null, + materialName: null } this.splitData = [] this.productData = [] @@ -871,7 +951,14 @@ export default { } if (this.splitForm.productDate == null) { this.$message({ - message: '请选择工单日期!!', + message: '请选择工单日期!', + type: 'warning' + }) + return + } + if (this.splitForm.materialCode == null) { + this.$message({ + message: '请选择组成白坯的物料!', type: 'warning' }) return @@ -908,7 +995,9 @@ export default { splitNum: this.splitForm.splitNum, product: this.productData[0], routeCode: this.splitForm.routeCode, - carNum: this.splitForm.carNum + carNum: this.splitForm.carNum, + materialCode: this.splitForm.materialCode, + materialName: this.splitForm.materialName } subSplitOrder(data).then(response => { @@ -930,7 +1019,9 @@ export default { splitNum: null, productDate: null, shiftId: null, - formFields: [] + formFields: [], + materialCode:null, + materialName:null } this.formFields = [{ batchCode: '', @@ -1016,7 +1107,9 @@ export default { productDate: null, shiftId: null, routeCode: null, - formFields: [] + formFields: [], + materialCode:null, + materialName:null }; this.splitData = []; @@ -1379,7 +1472,51 @@ export default { // 导入-下载模板 importTemplate() { this.download('/plan/whiteOrder/importTemplate', {}, `order_example_template_${new Date().getTime()}.xlsx`) - } + }, + //新增-打开组成白坯选择物料窗口 + selectBPMateriel() { + // 清除搜索缓存 + this.materielParams.productCode = null; + this.materielParams.productDescZh = null; + this.innerBPVisible = true; + this.getBPMaterielList(); + }, + //新增-打开组成白坯选择物料窗口 + getBPMaterielList() { + this.loading = true; + selectMaterielList(this.materielParams).then(response => { + this.materielList = response.rows; + this.total = response.total; + this.loading = false; + } + ); + }, + // 新增-打开组成白坯选择物料窗口-选中物料信息 + selectionChange(e) { + this.materielBP = e; + }, + // 新增-打开组成白坯选择物料窗口-确认选择物料 + subMaterielBP() { + if (this.materielBP.length == 0) { + this.$message({ + message: '请选择物料!', + type: 'warning' + }) + return + } + if (this.materielBP.length > 1) { + this.$message({ + message: '物料只能选择一个!', + type: 'warning' + }) + return + } + + this.splitForm.materialCode = this.materielBP[0].productCode; + this.splitForm.materialName = this.materielBP[0].productDescZh; + + this.innerBPVisible = false; + }, } }; diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 2a2ba621..9b8663d6 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -68,12 +68,9 @@ - + @@ -188,10 +185,7 @@ {{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }} - - +