From d953e40c7badd8be505d133ae1bb410e4024229f Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期四, 09 四月 2026 11:05:16 +0800
Subject: [PATCH] #
---
src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
index 83b758e..da90a99 100644
--- a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
+++ b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
@@ -871,7 +871,7 @@
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
- this.confirmReport(orderNo, done);
+ this.confirmReport(orderNo, instance, done);
} else {
done();
}
@@ -888,13 +888,21 @@
},
// 纭涓婃姤
- confirmReport(orderNo, done) {
+ confirmReport(orderNo, instance, done) {
this.reportLoading = true;
+ const finish = () => {
+ this.reportLoading = false;
+ if (instance) {
+ instance.confirmButtonLoading = false;
+ }
+ if (typeof done === 'function') {
+ done();
+ }
+ };
const rowsToIssue = (this.tableDataB || []).filter(item => parseInt(item.inspect) === 1);
if (rowsToIssue.length === 0) {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
this.$message.error('娌℃湁寰呬笅鍙戦」');
return;
}
@@ -926,8 +934,7 @@
Promise.all(updates).then(results => {
const failed = results.find(r => !r.ok);
if (failed) {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
this.$message.error(failed.msg || '鍚屾beBatch澶辫触');
return;
}
@@ -938,8 +945,7 @@
data: { orderNo: orderNo },
method: 'POST',
success: (res) => {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
if (res.code === 200 || res.success) {
this.$message({
message: `璁㈠崟鍙� ${orderNo} 涓嬪彂鎴愬姛`,
@@ -956,8 +962,7 @@
}
},
error: (error) => {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
console.error('涓嬪彂澶辫触:', error);
this.$message.error('涓嬪彂澶辫触锛岃妫�鏌ョ綉缁滆繛鎺�');
}
--
Gitblit v1.9.1