From 5a1bb56f9586f6f6ef4959f1b17a7e08d9b125d5 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Fri, 9 Jan 2026 13:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=BA=A7=E5=87=BA=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/firstOrder/components/outDialog.vue | 147 ++++++------------ src/views/materials/expend.vue | 1 + 2 files changed, 46 insertions(+), 102 deletions(-) diff --git a/src/views/firstOrder/components/outDialog.vue b/src/views/firstOrder/components/outDialog.vue index c851f94..bf15352 100644 --- a/src/views/firstOrder/components/outDialog.vue +++ b/src/views/firstOrder/components/outDialog.vue @@ -148,17 +148,7 @@ }} - + - {{ scope.row.outboundQuantity || 0 }} + + {{ scope.row.outboundQuantity || 0 }} - - {{ (scope.row.theOutboundQuantity = 1) }} + + + {{scope.row.outboundQuantity}} + + {{scope.row.outboundQuantity}} + - 删除 - @@ -279,18 +271,7 @@ }} - + @@ -361,7 +342,7 @@ v-model="inBatchForm.batchType" placeholder="请选择需求单" style="width: 100%" - @change="resetHandle" + @change="onQuarterSelectChange" > 易耗品 耐用品 @@ -531,10 +513,6 @@ export default { const year = now.getFullYear(); const month = String(now.getMonth() + 1).padStart(2, "0"); const day = String(now.getDate()).padStart(2, "0"); - // const hour = String(now.getHours()).padStart(2, '0') - // const minute = String(now.getMinutes()).padStart(2, '0') - // const second = String(now.getSeconds()).padStart(2, '0') - // return `${year}-${month}-${day} ${hour}:${minute}:${second}` return `${year}-${month}-${day}`; }, }, @@ -593,15 +571,15 @@ export default { console.log("detail", detail, stat); // if ( - this.sizeForm.options == 1 && - this.inBatchForm.optionType == "NY" + (this.sizeForm.options == 1 && + this.inBatchForm.optionType == "NY")||(this.sizeForm.options == 2 && + this.sizeForm.optionType == "NY") ) { const detailList = this.sizeForm.inTableData.filter( (item) => item.materialCode === stat.materialCode && item.materialName === stat.materialName ); - console.log("detailList", detailList); detail.theOutboundQuantity = detailList.reduce((acc, cur) => acc + cur.num, 0); } @@ -633,7 +611,6 @@ export default { this.consumableVisible = false; this.sizeForm.inTableData = allSelectedList; this.getStatistics(); - console.log(this.sizeForm.inTableData, "111220"); }, // 处理搜索 async handleSearch() { // 重置当前页 @@ -808,7 +785,6 @@ export default { if (this.inBatchForm.optionType === "NY") { this.batchSelectionVisible = true; this.dialogVisible = true; - console.log(1); this.batchTableData = res.data.result; } else { this.getStatistics(); @@ -971,41 +947,18 @@ export default { this.sizeForm.outDate = ldOneOutStorage.outDate; this.sizeForm.options = Number(ldOneOutStorage.options); this.sizeForm.optionType = ldOneOutStorage.optionType; + this.batchSelectionVisible = false + console.log( res.data.result.ldOneOutStorageDetails, "this.sizeForm.options"); this.$set( this.sizeForm, "inTableData", res.data.result.ldOneOutStorageDetails ); - console.log(this.sizeForm, "111"); + this.getStatistics(); }); } }, - // async inInit() { - // if (this.outDialogType == 'details' || this.outDialogType == 'edit') { - // try { - // const res = await editList(this.id); - // const { ldOneOutStorage, ldOneOutStorageDetails = [] } = res.data.result || {}; - // if (!ldOneOutStorage) { - // this.$message.error("回显数据异常"); - // return; - // } - // const handledDetailList = ldOneOutStorageDetails.map(item => ({ - // ...item, - // outboundQuantity: item.outboundQuantity || 0 - // })) - // this.sizeForm = { - // ...this.sizeForm, - // ...ldOneOutStorage, - // outDate: ldOneOutStorage.outDate ? new Date(ldOneOutStorage.outDate) : '', - // options: Number(ldOneOutStorage.options) || 1, - // } - // this.sizeForm.inTableData = handledDetailList; - // } catch (error) { - // this.$message.error("获取详情数据失败"); - // } - // } - // }, // 选项选择 radioChange() { this.sizeForm.inTableData = []; @@ -1024,16 +977,6 @@ export default { this.inBatchForm.optionType = ""; } }, - // closeHandle() { - // this.inBatchForm.batchType = '', - // this.inBatchForm.department = '' - // this.inBatchForm.optionType = '' - // this.sizeForm.inTableData = [] - // this.getQuarterList() - // this.inBatchDialogVisible = true - - // // this.sizeForm.inTableData = [] - // }, // 删除表格行数据 handleDelete(index, row) { this.sizeForm.inTableData.splice(index, 1); @@ -1042,20 +985,20 @@ export default { }, watch: { // 监听需求单选择变化 - "inBatchForm.batchType": function (newVal) { - (this.inBatchForm.department = ""), (this.inBatchForm.optionType = 1); - if (newVal) { - this.onQuarterSelectChange(newVal); - } - }, - "sizeForm.optionType": function (newVal) { - if (newVal && this.outDialogType === "add") { - this.sizeForm.inTableData = []; - this.getMaterialList(); - } else if (newVal && this.outDialogType !== "add") { - this.getMaterialList(); - } - }, + // "inBatchForm.batchType": function (newVal) { + // (this.inBatchForm.department = ""), (this.inBatchForm.optionType = 1); + // if (newVal) { + // this.onQuarterSelectChange(newVal); + // } + // }, + // "sizeForm.optionType": function (newVal) { + // if (newVal && this.outDialogType === "add") { + // this.sizeForm.inTableData = []; + // this.getMaterialList(); + // } else if (newVal && this.outDialogType !== "add") { + // this.getMaterialList(); + // } + // }, }, }; diff --git a/src/views/materials/expend.vue b/src/views/materials/expend.vue index dbb72ac..bfba638 100644 --- a/src/views/materials/expend.vue +++ b/src/views/materials/expend.vue @@ -22,6 +22,7 @@ 已借出 已归还 已报废 + 待借出