From 75ef0dfecf2331c0828a1a182b1d3243d3041c51 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 21 四月 2026 13:19:44 +0800
Subject: [PATCH] refactor: 统一日志组件为Serilog并优化相关功能
---
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx | 63 +++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx b/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
index 809dd5f..8cb0983 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
+++ b/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -28,6 +28,11 @@
<el-button
type="primary"
size="small"
+ onClick={($e) => { this.handleBind(row); }}
+ >缁戝畾</el-button>
+ <el-button
+ type="primary"
+ size="small"
onClick={($e) => { this.handleInbound(row); }}
>杩涚珯</el-button>
<el-button
@@ -36,10 +41,42 @@
style="margin-left: 8px"
onClick={($e) => { this.handleOutbound(row); }}
>鍑虹珯</el-button>
+ <el-button
+ type="success"
+ size="small"
+ style="margin-left: 8px"
+ onClick={($e) => { this.handleUnbind(row); }}
+ >瑙g粦</el-button>
</div>
);
}
});
+ },
+
+ // 鎵樼洏缁勭洏鎿嶄綔
+ async handleBind(row) {
+ try {
+ await this.$confirm(`纭鎵ц鎵樼洏缁勭洏鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`, "缁勭洏纭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ });
+
+ const result = await this.http.post("/api/StockInfoDetail/BindContainer", {
+ palletCode: row.palletCode
+ }, "姝e湪璋冪敤MES鎺ュ彛...");
+
+ if (result.status) {
+ this.$Message.success(result.message || "鎵樼洏缁勭洏鎴愬姛");
+ this.$refs.table.load();
+ } else {
+ this.$error(result.message || "鎵樼洏缁勭洏澶辫触");
+ }
+ } catch (error) {
+ if (error !== "cancel") {
+ this.$error(error.message || "缃戠粶閿欒锛岃绋嶅悗閲嶈瘯");
+ }
+ }
},
// 鎵樼洏杩涚珯鎿嶄綔
@@ -96,6 +133,32 @@
}
},
+ // 鎵樼洏鎷嗙洏鎿嶄綔
+ async handleUnbind(row) {
+ try {
+ await this.$confirm(`纭鎵ц鎵樼洏鎷嗙洏鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`, "鎷嗙洏纭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ });
+
+ const result = await this.http.post("/api/StockInfoDetail/UnbindContainer", {
+ palletCode: row.palletCode,
+ }, "姝e湪璋冪敤MES鎺ュ彛...");
+
+ if (result.status) {
+ this.$Message.success(result.message || "鎵樼洏鎷嗙洏鎴愬姛");
+ this.$refs.table.load();
+ } else {
+ this.$error(result.message || "鎵樼洏鎷嗙洏澶辫触");
+ }
+ } catch (error) {
+ if (error !== "cancel") {
+ this.$error(error.message || "缃戠粶閿欒锛岃绋嶅悗閲嶈瘯");
+ }
+ }
+ },
+
onInited() {
// 妗嗘灦鍒濆鍖栭厤缃悗
},
--
Gitblit v1.9.3