From e997a6ba2e6b65d1d7b26ad1a19bfac65c439e5d Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Thu, 27 Mar 2025 19:06:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E6=97=B6=E9=97=B4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/claimAndRefund/receive.js | 10 +++ .../claimAndreturn/picking/outbound/index.vue | 75 +++++++++++++++++-- 2 files changed, 80 insertions(+), 5 deletions(-) diff --git a/src/api/claimAndRefund/receive.js b/src/api/claimAndRefund/receive.js index aaf90e5..074379e 100644 --- a/src/api/claimAndRefund/receive.js +++ b/src/api/claimAndRefund/receive.js @@ -409,4 +409,14 @@ export function getPreNumInUse(params) { method: 'get', params, }) +} +export function updateOutTime(data) { + return request({ + url: '/material//base/leaseOutDetails/updateOutTime', + method: 'post', + headers: { + repeatSubmit: false, + }, + data, + }) } \ No newline at end of file diff --git a/src/views/claimAndreturn/picking/outbound/index.vue b/src/views/claimAndreturn/picking/outbound/index.vue index 68bd179..b7e67ea 100644 --- a/src/views/claimAndreturn/picking/outbound/index.vue +++ b/src/views/claimAndreturn/picking/outbound/index.vue @@ -403,7 +403,7 @@ - +
@@ -414,8 +414,23 @@ 领料单位:{{ leaseOutData.unitName }}
- 出库时间:{{ leaseOutData.updateTime }} + 出库时间: + + + {{leaseOutData.updateTime + }}
+
工程名称:{{ leaseOutData.proName }}
@@ -460,7 +475,7 @@
@@ -478,6 +493,7 @@ import { getLeaseOutDetailRecordApi, getLeaseListAll, getLeaseOutOrder, + updateOutTime, } from '@/api/claimAndRefund/receive.js' import { queryCompleteSetToolsApi } from '@/api/store/completeTools.js' import { getTypeList } from '@/api/store/warehousing' @@ -589,7 +605,9 @@ export default { today.setHours(0, 0, 0, 0); // 清除时分秒,方便比较 return date.getTime() > today.getTime(); // 禁止选择今天之后的日期 }, - } + }, + showSelect: true, + rowTemp: {}, // 临时存储行数据 } }, created() { @@ -846,6 +864,7 @@ export default { /* 打开出库单 */ async openLld(row, type) { this.open = true + this.rowTemp = row; const params = { parentId: type == 1 ? row.id : row.parentId, typeId: type == 1 ? '' : row.typeId, @@ -859,7 +878,15 @@ export default { }, // 领料单 打印 print() { - this.$refs.remarksPrintRef.print() + this.showSelect = false; + this.$nextTick(() => { + this.$refs.remarksPrintRef.print() + }) + }, + + closePage() { + this.showSelect = true; + this.open = false; }, async onHandleQuery() { @@ -909,6 +936,44 @@ export default { this.openFileVisible = true }, + changeTime(newValue) { + this.$confirm('确认要修改出库时间吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + // 调用接口更新出库时间 + updateOutTime({ + id: this.rowTemp.id, // 假设需要传递记录的 ID + updateTime: newValue, + taskId: this.rowTemp.taskId, + }).then((response) => { + if (response.code === 200) { // 假设接口返回成功状态码为 200 + this.leaseOutData.updateTime = newValue; + this.showSelect = false; + this.$message({ + type: 'success', + message: '出库时间修改成功' + }); + } else { + this.$message({ + type: 'error', + message: '出库时间修改失败' + }); + } + }).catch((error) => { + this.$message({ + type: 'error', + message: '出库时间修改失败' + }); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消修改' + }); + }); + } }, }