From 167590279a4df0c24cf81e30d67dd5cba18eb47d Mon Sep 17 00:00:00 2001 From: bb_pan Date: Wed, 3 Sep 2025 22:46:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/material/lease/outBound/index.vue | 57 +++++++++++++-------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue index 7c7ff3a9..18b42810 100644 --- a/src/views/material/lease/outBound/index.vue +++ b/src/views/material/lease/outBound/index.vue @@ -1023,6 +1023,7 @@ export default { }, /** 出库查询列表 */ getDialogList() { + this.loadingView = true outInfoList(this.queryOutInfo.id, { keyWord: this.queryOutInfo.keyWord, publishTask: this.publishTask @@ -1030,6 +1031,10 @@ export default { this.getListOutInfo = response.data.leaseApplyDetailsList // this.dialogTotal = response. // this.loading = false; + }).catch((err) => { + console.log('🚀 ~ getDialogList ~ err:', err) + }).finally(() => { + this.loadingView = false }) }, //出库搜索按钮 @@ -1046,7 +1051,7 @@ export default { /** 出库按钮操作 */ handleOut(row) { this.currentRow = row - // console.log('🚀 ~ handleOut ~ this.currentRow:', this.currentRow) + console.log('🚀 ~ handleOut ~ this.currentRow:', this.currentRow) this.getListOutInfo = [] const { id, publishTask } = row this.publishTask = publishTask @@ -1071,27 +1076,28 @@ export default { this.resetForm('codeOutForm') this.resetForm('numOutForm') // console.log(row) - let obj = {} + let obj = { + id: row.id, + manageType: 1, + maId: row.maId, + parentId: row.parentId, + typeName: row.typeName, + typeModelName: row.maTypeName, + typeId: row.typeId, + alNum: row.alNum, // 已出库数量 + outNum: row.outNum, // 待出库数量 + inputNum: 1, // 出库数量 + num: row.num, // 库存 + unitValue: row.unitValue, + unitName: row.unitName, + leaseUnit: this.currentRow.leaseUnit, + leaseUnitId: this.currentRow.leaseUnitId, + leaseProject: this.currentRow.leaseProject, + leaseProjectId: this.currentRow.leaseProjectId, + taskId: this.currentRow.taskId, + code: this.currentRow.code + } console.log('row', row) - // this.$set(obj, 'taskId', row.taskId) - this.$set(obj, 'id', row.id) - this.$set(obj, 'manageType', 1) - this.$set(obj, 'maId', row.maId) - this.$set(obj, 'parentId', row.parentId) - this.$set(obj, 'typeName', row.typeName) - this.$set(obj, 'typeModelName', row.maTypeName) - this.$set(obj, 'typeId', row.typeId) - this.$set(obj, 'alNum', row.alNum) //已出库数量 - this.$set(obj, 'outNum', row.outNum) //待出库数量 - this.$set(obj, 'inputNum', 1) //出库数量 - this.$set(obj, 'num', row.num) //库存 - this.$set(obj, 'unitValue', row.unitValue) - this.$set(obj, 'unitName', row.unitName) - this.$set(obj, 'leaseUnit', this.currentRow.leaseUnit) - this.$set(obj, 'leaseUnitId', this.currentRow.leaseUnitId) - this.$set(obj, 'leaseProject', this.currentRow.leaseProject) - this.$set(obj, 'leaseProjectId', this.currentRow.leaseProjectId) - this.$set(obj, 'taskId', this.currentRow.taskId) console.log('[obj]', [obj]) this.outNumList = [obj] }, @@ -1106,16 +1112,22 @@ export default { this.outNum = row.outNum this.outQuery.typeId = row.typeId this.outQuery.maStatus = 1 + this.outQuery.code = this.currentRow.code this.outObj = row this.handleOutQuery() }, getCodeList() { + this.loadingView = true getDetailsByTypeId(this.outQuery).then(response => { this.outCodeList = response.rows if (response.total) { this.outTotal = response.total } + }).catch((err) => { + console.log('🚀 ~ getCodeList ~ err:', err) + }).finally(() => { + this.loadingView = false }) }, handleOutQuery() { @@ -1137,6 +1149,9 @@ export default { } else if (this.maCodeList.length > this.outNum) { this.$modal.msgError('出库编码数量不可大于待出库数量!') } else { + this.maCodeList.forEach(item => { + item.code = this.currentRow.code + }) let param = { leaseOutDetailsList: this.maCodeList } submitOut(param).then(response => { this.$modal.msgSuccess('出库成功')