diff --git a/src/views/mes/tm/tool/index.vue b/src/views/mes/tm/tool/index.vue index 32b96db..ab4acd4 100644 --- a/src/views/mes/tm/tool/index.vue +++ b/src/views/mes/tm/tool/index.vue @@ -378,6 +378,9 @@ export default { form: {}, // 表单校验 rules: { + toolCode: [ + { required: true, message: "工装夹具编号不能为空", trigger: "blur" } + ], toolName: [ { required: true, message: "工装夹具名称不能为空", trigger: "blur" } ], diff --git a/src/views/mes/wm/itemrecpt/line.vue b/src/views/mes/wm/itemrecpt/line.vue index 9b2ebb6..6954f3d 100644 --- a/src/views/mes/wm/itemrecpt/line.vue +++ b/src/views/mes/wm/itemrecpt/line.vue @@ -55,7 +55,7 @@ - + + > @@ -222,6 +222,9 @@ export default { ], warehouseId:[ { required: true, message: "请选择入库的仓库" } + ], + itemCode: [ + { required: true, message: "物料编码不能为空", trigger: "blur" } ] } }; @@ -241,7 +244,7 @@ export default { }); }, getWarehouseList(){ - getTreeList().then( response =>{ + getTreeList().then( response =>{ if(response.data){ this.warehouseOptions = response.data.filter((el) =>{ return el.warehouseCode.indexOf('VIR') == -1; @@ -250,12 +253,12 @@ export default { this.warehouseOptions.map(w =>{ debugger; 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'); @@ -349,9 +352,9 @@ export default { const lineId = row.lineId || this.ids getItemrecptline(lineId).then(response => { this.form = response.data; - this.warehouseInfo[0] = response.data.warehouseId; - this.warehouseInfo[1] = response.data.locationId; - this.warehouseInfo[2] = response.data.areaId; + this.warehouseInfo[0] = response.data.warehouseId; + this.warehouseInfo[1] = response.data.locationId; + this.warehouseInfo[2] = response.data.areaId; this.open = true; this.title = "修改物料入库单行"; }); @@ -366,7 +369,7 @@ 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; } }, //选择到货通知单行 @@ -380,7 +383,7 @@ 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.quantityRecived = obj.quantityQuanlified; } }, diff --git a/src/views/mes/wm/rtsalse/line.vue b/src/views/mes/wm/rtsalse/line.vue index e2b7bdc..54ea759 100644 --- a/src/views/mes/wm/rtsalse/line.vue +++ b/src/views/mes/wm/rtsalse/line.vue @@ -26,7 +26,7 @@ - + @@ -61,7 +61,7 @@ - + - + @@ -92,7 +92,7 @@ - + @@ -117,7 +117,7 @@ :options="warehouseOptions" :props="warehouseProps" @change="handleWarehouseChanged" - > + > @@ -196,6 +196,9 @@ export default { form: {}, // 表单校验 rules: { + itemCode: [ + { required: true, message: "产品编码不能为空", trigger: "blur" } + ], itemId: [ { required: true, message: "产品不能为空", trigger: "blur" } ], @@ -223,7 +226,7 @@ export default { }); }, getWarehouseList(){ - getTreeList().then( response =>{ + getTreeList().then( response =>{ if(response.data){ this.warehouseOptions = response.data.filter((el) =>{ return el.warehouseCode.indexOf('VIR') == -1; @@ -231,12 +234,12 @@ export default { } 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'); @@ -244,7 +247,7 @@ export default { }); }, //选择默认的仓库、库区、库位 - handleWarehouseChanged(obj){ + handleWarehouseChanged(obj){ if(obj !=null){ this.form.warehouseId = obj[0]; this.form.locationId = obj[1]; @@ -262,7 +265,7 @@ 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; } }, // 取消按钮 diff --git a/src/views/mes/wm/rtvendor/line.vue b/src/views/mes/wm/rtvendor/line.vue index eb81357..a92dbf2 100644 --- a/src/views/mes/wm/rtvendor/line.vue +++ b/src/views/mes/wm/rtvendor/line.vue @@ -56,7 +56,7 @@ - + - + @@ -203,6 +203,9 @@ export default { }, // 表单校验 rules: { + itemCode: [ + { required: true, message: "产品物料编码不能为空", trigger: "blur" } + ], itemId: [ { required: true, message: "产品物料不能为空", trigger: "blur" } ], @@ -337,7 +340,7 @@ 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.warehouseId = obj.warehouseId; this.form.warehouseCode = obj.warehouseCode;