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,