From dae9a87b0635cd7e8fac062f8516474b82b433d5 Mon Sep 17 00:00:00 2001 From: "JinLu.Yin" <411641505@qq.com> Date: Sat, 10 Sep 2022 10:49:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=99=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BA=BF=E8=BE=B9=E5=BA=93=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/md/workstation/index.vue | 56 ++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/src/views/mes/md/workstation/index.vue b/src/views/mes/md/workstation/index.vue index 53daf5c..4be7059 100644 --- a/src/views/mes/md/workstation/index.vue +++ b/src/views/mes/md/workstation/index.vue @@ -194,7 +194,7 @@ - + - + + + + + + + { + this.warehouseOptions = response.data; + this.warehouseOptions.map(w =>{ + w.children.map(l =>{ + let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName'); + l.children = JSON.parse(lstr); + }); + + let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName'); + w.children = JSON.parse(wstr); + + }); + let ostr=JSON.stringify(this.warehouseOptions).replace(/warehouseId/g,'pId').replace(/warehouseName/g, 'pName'); + this.warehouseOptions = JSON.parse(ostr); + }); + }, + //选择默认的仓库、库区、库位 + handleWarehouseChanged(obj){ + if(obj !=null){ + this.form.warehouseId = obj[0]; + this.form.locationId = obj[1]; + this.form.areaId = obj[2]; + } + }, // 取消按钮 cancel() { this.open = false; @@ -399,6 +446,9 @@ export default { processId: null, processCode: null, processName: null, + warehouseId: null, + locationId: null, + areaId: null, enableFlag: 'Y', remark: null, createBy: null,