From f43ef0b3c1e80002e2e3a2f02ec63974ce523c7a Mon Sep 17 00:00:00 2001 From: A0010407 Date: Thu, 25 Jan 2024 17:45:57 +0800 Subject: [PATCH] =?UTF-8?q?2024-1-23-2=20=E8=AE=BE=E5=A4=87=E6=A8=A1?= =?UTF-8?q?=E5=9D=97-=E7=94=B3=E9=A2=86=E5=A4=87=E4=BB=B6=E7=AD=89bug-?= =?UTF-8?q?=E4=B8=B4=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/repairOrder/selectSinglePerson.vue | 10 ++- .../repairOrder/selectSparePartsLedger.vue | 15 +++-- .../sparePartsApplicationRecord/index.vue | 2 +- .../selectSinglePerson.vue | 65 +++++++++---------- .../selectSparePartsLedger.vue | 6 +- 5 files changed, 53 insertions(+), 45 deletions(-) diff --git a/src/views/device/repairOrder/selectSinglePerson.vue b/src/views/device/repairOrder/selectSinglePerson.vue index d1a95be..050520f 100644 --- a/src/views/device/repairOrder/selectSinglePerson.vue +++ b/src/views/device/repairOrder/selectSinglePerson.vue @@ -190,8 +190,9 @@ export default { /** 重置按钮操作 */ resetQuery() { - this.queryParams.equipmentTypeCode = null; this.resetForm("queryForm"); + this.queryParams.itemCode = null; + this.queryParams.itemName = null; this.handleQuery(); }, @@ -203,6 +204,11 @@ export default { this.multiple = !selection.length; }, + cancel() { + this.showFlag = false; + this.resetQuery(); + }, + submitForm() { if (this.$refs.multipleTable.selection.length > 1) { Message.warning("只能选择一个维修人,请勿选择多个!"); @@ -210,7 +216,7 @@ export default { console.log(this.$refs.multipleTable.selection); this.$emit("onSelected", this.$refs.multipleTable.selection); this.showFlag = false; - this.getList(); + this.resetQuery(); } }, }, diff --git a/src/views/device/repairOrder/selectSparePartsLedger.vue b/src/views/device/repairOrder/selectSparePartsLedger.vue index 05b3099..f149e40 100644 --- a/src/views/device/repairOrder/selectSparePartsLedger.vue +++ b/src/views/device/repairOrder/selectSparePartsLedger.vue @@ -248,8 +248,6 @@ export default { }, /** 查询备品备件台账管理列表 */ getList() { - this.sparePartsLedgerList = null; - this.total = 0; this.loading = true; listSparePartsLedger(this.queryParams).then((response) => { this.sparePartsLedgerList = response.rows; @@ -260,8 +258,7 @@ export default { // 取消按钮 cancel() { this.showFlag = false; - this.reset(); - this.getList(); + this.resetQuery(); }, // 表单重置 reset() { @@ -331,6 +328,7 @@ export default { this.single = selection.length !== 1; this.multiple = !selection.length; }, + /** 提交按钮 */ submitForm() { console.log("data:", this.sparePartsLedgerList); @@ -338,16 +336,21 @@ export default { this.$refs.multipleTable.selection.forEach((item) => { if (item.spareQuantity > item.amount - item.storageAmount) { Message.warning( - '备件编码"' + + '申领失败!备件编码"' + item.materialCode + '"的申领数量大于可用数量,请重新填写!' ); this.$refs.multipleTable.clearSelection(); } + if(item.spareQuantity == null){ + Message.warning('申领失败!请填写"'+item.materialCode+'"的申领数量!'); + this.$refs.multipleTable.clearSelection(); + } }); this.$emit("onSelected", this.$refs.multipleTable.selection); this.showFlag = false; - this.getList(); + //提交后刷新页面 + this.resetQuery(); }, }, }; diff --git a/src/views/device/sparePartsApplicationRecord/index.vue b/src/views/device/sparePartsApplicationRecord/index.vue index 2d8391b..f0eb2d6 100644 --- a/src/views/device/sparePartsApplicationRecord/index.vue +++ b/src/views/device/sparePartsApplicationRecord/index.vue @@ -548,7 +548,7 @@ export default { }, //人员选择 onItemSelectedPerson(obj) { - this.form.applyPeople = obj; + this.form.applyPeople = obj[0].userName;; }, // 生成表头序号 indexMethod(index) { diff --git a/src/views/device/sparePartsApplicationRecord/selectSinglePerson.vue b/src/views/device/sparePartsApplicationRecord/selectSinglePerson.vue index 493e3b0..050520f 100644 --- a/src/views/device/sparePartsApplicationRecord/selectSinglePerson.vue +++ b/src/views/device/sparePartsApplicationRecord/selectSinglePerson.vue @@ -6,7 +6,7 @@ :modal="false" width="800px" center - :before-close="cancelEquipmentForm" + :before-close="cancel" > @@ -53,8 +53,8 @@ + > +