From ff67d9f38a89d146e05432129f2dd47b9ed67e02 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Fri, 5 Jul 2024 10:54:44 +0800 Subject: [PATCH] =?UTF-8?q?2024-07-05=20=E8=AE=BE=E5=A4=87-=E5=A4=87?= =?UTF-8?q?=E5=93=81=E5=A4=87=E4=BB=B6=E5=8A=A0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/sparePartsLedger/index.vue | 25 ++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/views/device/sparePartsLedger/index.vue b/src/views/device/sparePartsLedger/index.vue index b03dd94b..a152da5f 100644 --- a/src/views/device/sparePartsLedger/index.vue +++ b/src/views/device/sparePartsLedger/index.vue @@ -822,6 +822,7 @@ export default { ownEquipmentName: null, ownEquipmentCode: null, unitPrice: null, + procurementMethod: null, }, options: [ { @@ -837,8 +838,17 @@ export default { form: {}, // 表单校验 rules: { - storageId: [ - { required: true, message: "唯一序列不能为空", trigger: "blur" }, + materialCode: [ + { 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, spareInventoryUpper: null, unitPrice: null, + procurementMethod: null, }; this.resetForm("form"); }, @@ -962,9 +973,13 @@ export default { }); } else { addSparePartsLedger(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); + if(response.code == 500){ + this.$modal.msg(response.msg); + }else{ + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + } }); } }