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 @@ + > +