2024-07-05 设备-备品备件加限制

yangwl
A0010407 3 months ago
parent 870e6c8da4
commit ff67d9f38a

@ -822,6 +822,7 @@ export default {
ownEquipmentName: null, ownEquipmentName: null,
ownEquipmentCode: null, ownEquipmentCode: null,
unitPrice: null, unitPrice: null,
procurementMethod: null,
}, },
options: [ options: [
{ {
@ -837,8 +838,17 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
storageId: [ materialCode: [
{ required: true, message: "唯一序列不能为空", trigger: "blur" }, { required: true, message: "备品备件编码不能为空", trigger: "blur" },
],
materialDesc: [
{ required: true, message: "备品备件名称不能为空", trigger: "blur" },
],
amount: [
{ required: true, message: "库存数量不能为空", trigger: "blur" },
],
procurementMethod: [
{ required: true, message: "采购方式不能为空", trigger: "blur" },
], ],
}, },
}; };
@ -914,6 +924,7 @@ export default {
spareInventoryFloor: null, spareInventoryFloor: null,
spareInventoryUpper: null, spareInventoryUpper: null,
unitPrice: null, unitPrice: null,
procurementMethod: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -962,9 +973,13 @@ export default {
}); });
} else { } else {
addSparePartsLedger(this.form).then((response) => { addSparePartsLedger(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); if(response.code == 500){
this.open = false; this.$modal.msg(response.msg);
this.getList(); }else{
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
}); });
} }
} }

Loading…
Cancel
Save