From f09dc5ad835e6127d6b117c0be62c15d2a007786 Mon Sep 17 00:00:00 2001 From: zhangxuanming <2260476558@qq.com> Date: Fri, 20 Dec 2024 15:43:58 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BA=A7=E5=93=81=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E4=B8=BA=E7=A9=BA=E4=BF=9D=E5=AD=98=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/wm/productrecpt/line.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/views/mes/wm/productrecpt/line.vue b/src/views/mes/wm/productrecpt/line.vue index 61110d9..c4949fd 100644 --- a/src/views/mes/wm/productrecpt/line.vue +++ b/src/views/mes/wm/productrecpt/line.vue @@ -34,7 +34,7 @@ v-if="optType != 'view'" v-hasPermi="['mes:wm:productrecpt:remove']" >删除 - + @@ -70,7 +70,7 @@ - + - + @@ -126,7 +126,7 @@ :options="warehouseOptions" :props="warehouseProps" @change="handleWarehouseChanged" - > + > @@ -225,6 +225,9 @@ export default { quantityRecived: [ { required: true, message: "入库数量不能为空", trigger: "blur" } ], + itemCode: [ + { required: true, message: "产品物料编码不能为空", trigger: "blur" } + ] } }; }, @@ -243,16 +246,16 @@ export default { }); }, getWarehouseList(){ - getTreeList().then( response =>{ + getTreeList().then( response =>{ 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'); + 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 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'); @@ -378,14 +381,14 @@ export default { this.form.itemCode = obj.itemCode; this.form.itemName = obj.itemName; this.form.specification = obj.specification; - this.form.unitOfMeasure = obj.unitOfMeasure; + this.form.unitOfMeasure = obj.unitOfMeasure; this.form.batchCode = obj.batchCode; this.form.quantityRecived = obj.quantityOnhand; this.form.quantityMax = obj.quantityOnhand; } }, //选择默认的仓库、库区、库位 - handleWarehouseChanged(obj){ + handleWarehouseChanged(obj){ if(obj !=null){ this.form.warehouseId = obj[0]; this.form.locationId = obj[1];