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];