From e1b47924a7f000f043d40fc9359491b6fa5d7873 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期一, 10 十一月 2025 19:08:51 +0800
Subject: [PATCH] *
---
src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html | 99 +++++++++++++++++++++++++++++++------------------
1 files changed, 62 insertions(+), 37 deletions(-)
diff --git a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
index 8dfdf15..401945f 100644
--- a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
+++ b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
@@ -218,15 +218,21 @@
<el-table-column prop="danger" label="寰呭垽" min-width="100" align="center"></el-table-column>
<el-table-column prop="memo" label="澶囨敞" min-width="100" align="center"></el-table-column>
<el-table-column prop="status" label="鐘舵��" min-width="100" align="center" :formatter="formatStatusB"></el-table-column>
- <!-- 鏂板鎿嶄綔鍒� -->
- <el-table-column label="鎿嶄綔" width="120" align="center" fixed="right">
+ <!-- 鏂板鎿嶄綔鍒楋紝鏍规嵁status鍊兼帶鍒舵樉绀� -->
+ <el-table-column label="鏄惁涓婃姤" width="120" align="center" fixed="right">
<template slot-scope="scope">
<div class="operation-cell">
- <el-button
- type="primary"
- size="mini"
- @click="handleModify(scope.row)">
- 娣诲姞鑷充笂鎶ラ」
+ <el-button v-if="scope.row.status === 2"
+ type="primary"
+ size="mini"
+ @click="handleModifyN(scope.row)">
+ 鍚�
+ </el-button>
+ <el-button v-if="scope.row.status === 1"
+ type="primary"
+ size="mini"
+ @click="handleModifyY(scope.row)">
+ 鏄�
</el-button>
</div>
</template>
@@ -408,8 +414,8 @@
});
},
- // 鏂板锛氬鐞嗕慨鏀规寜閽偣鍑讳簨浠�
- handleModify(row) {
+ // 澶勭悊淇敼鎸夐挳鐐瑰嚮浜嬩欢
+ handleModifyY(row) {
if (!this.currentRow) {
this.$message.error('娌℃湁閫夋嫨涓昏〃鏁版嵁');
return;
@@ -417,6 +423,7 @@
const groupOrderNo = this.currentRow.itemName; // 缁勮揣鍗曞彿
const batch = row.batch; // 绠卞彿
+ const status = 2; // 绠卞彿
this.$confirm(
`纭畾灏嗙粍璐у崟鍙凤細 <strong style="color: #409EFF;">${groupOrderNo}</strong> 銆佺鍙凤細 <strong style="color: #409EFF;">${batch}</strong> 娣诲姞鍒颁笂鎶ュ垪鍚楋紵`,
@@ -428,7 +435,7 @@
dangerouslyUseHTMLString: true
}
).then(() => {
- this.submitModify(groupOrderNo, batch);
+ this.submitModify(groupOrderNo, batch, status);
}).catch(() => {
this.$message({
type: 'info',
@@ -437,8 +444,38 @@
});
},
- // 鏂板锛氭彁浜や慨鏀瑰埌鍚庡彴
- submitModify(groupOrderNo, batch) {
+ // 澶勭悊淇敼鎸夐挳鐐瑰嚮浜嬩欢
+ handleModifyN(row) {
+ if (!this.currentRow) {
+ this.$message.error('娌℃湁閫夋嫨涓昏〃鏁版嵁');
+ return;
+ }
+
+ const groupOrderNo = this.currentRow.itemName; // 缁勮揣鍗曞彿
+ const batch = row.batch; // 绠卞彿
+ const status = 1; // 绠卞彿
+
+ this.$confirm(
+ `纭畾灏嗙粍璐у崟鍙凤細 <strong style="color: #409EFF;">${groupOrderNo}</strong> 銆佺鍙凤細 <strong style="color: #409EFF;">${batch}</strong> 娣诲姞鍒颁笂鎶ュ垪鍚楋紵`,
+ '纭淇敼',
+ {
+ confirmButtonText: '纭淇敼',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ dangerouslyUseHTMLString: true
+ }
+ ).then(() => {
+ this.submitModify(groupOrderNo, batch, status);
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堜慨鏀�'
+ });
+ });
+ },
+
+ // 鎻愪氦淇敼鍒板悗鍙�
+ submitModify(groupOrderNo, batch, status) {
// 鏄剧ず鍔犺浇鐘舵��
const loadingInstance = this.$loading({
lock: true,
@@ -449,17 +486,14 @@
// 璋冪敤鍚庡彴API鎻愪氦淇敼
$.ajax({
- url: baseUrl + "/api/modify/detail", // 璇锋牴鎹疄闄匒PI鍦板潃淇敼
- headers: {
- 'token': localStorage.getItem('token'),
- 'Content-Type': 'application/json'
- },
- data: JSON.stringify({
+ url: baseUrl + "/order/pakout/orderDetl/batch/report/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: top.reObject({
item_name: groupOrderNo, // 缁勮揣鍗曞彿
- batch: batch // 绠卞彿
+ batch: batch, // 绠卞彿
+ status: status // 绠卞彿
}),
- dataType: 'json',
- method: 'post',
+ method: 'POST',
success: (res) => {
loadingInstance.close();
@@ -681,7 +715,7 @@
if (row.status === 0) {
return '寮傚父';
} else if (row.status === 1) {
- return '姝e父';
+ return '涓嶄笂鎶�';
} else if (row.status === 2) {
return '寰呬笂鎶�';
} else if (row.status === 3) {
@@ -710,25 +744,16 @@
mockTableAData() {
this.tableDataA = [
{
- itemName: 'ZH1001',
+ itemName: 'zh20251110',
orderNo: 'ORDER2024001',
- cstmrName: '绀轰緥瀹㈡埛A',
- settle: 1,
+ cstmrName: 'zh20251110',
+ settle: 10,
totalFee: 1500.00,
- createTime: '2024-01-15 10:30:00',
- memo: '娴嬭瘯鏁版嵁'
- },
- {
- itemName: 'ZH1002',
- orderNo: 'ORDER2024002',
- cstmrName: '绀轰緥瀹㈡埛B',
- settle: 1,
- totalFee: 2300.50,
- createTime: '2024-01-16 14:20:00',
+ createTime: '2025-11-10T09:50:16.343+0000',
memo: '娴嬭瘯鏁版嵁'
}
];
- this.total = 2;
+ this.total = 1;
this.loading = false;
},
@@ -742,7 +767,7 @@
origin: '1',
danger: '1',
memo: '',
- status: 1
+ status: 1 // 鐘舵�佷负1锛屼細鏄剧ず淇敼鎸夐挳
}
];
this.detailTotal = 1;
--
Gitblit v1.9.1