From fcf0f53de620c6f3c6218e59dbdeff01fda4eb3b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期四, 23 四月 2026 08:38:07 +0800
Subject: [PATCH] fix: 修复WCS和WMS系统中的多个问题
---
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx | 148 +++++++++++++++++++------------------------------
1 files changed, 57 insertions(+), 91 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx b/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
index 8cb0983..d76739f 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
+++ b/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -7,29 +7,25 @@
gridBody: '',
gridFooter: '',
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
- modelHeader: '',
- modelBody: '',
- modelFooter: ''
+ modelHeader: "",
+ modelBody: "",
+ modelFooter: "",
},
- tableAction: '',
+ tableAction: "",
buttons: { view: [], box: [], detail: [] },
methods: {
onInit() {
// 娣诲姞MES鎿嶄綔鍒�
this.columns.push({
- title: '鎿嶄綔',
- field: '鎿嶄綔',
- align: 'center',
+ title: "鎿嶄綔",
+ field: "鎿嶄綔",
+ align: "center",
width: 200,
- fixed: 'right',
+ fixed: "right",
render: (h, { row, column, index }) => {
return (
<div>
- <el-button
- type="primary"
- size="small"
- onClick={($e) => { this.handleBind(row); }}
- >缁戝畾</el-button>
+
<el-button
type="primary"
size="small"
@@ -41,57 +37,34 @@
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 || "缃戠粶閿欒锛岃绋嶅悗閲嶈瘯");
- }
- }
- },
// 鎵樼洏杩涚珯鎿嶄綔
async handleInbound(row) {
try {
- await this.$confirm(`纭鎵ц鎵樼洏杩涚珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`, "杩涚珯纭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- });
+ await this.$confirm(
+ `纭鎵ц鎵樼洏杩涚珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`,
+ "杩涚珯纭",
+ {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ },
+ );
- const result = await this.http.post("/api/StockInfo/inboundInContainer", {
- palletCode: row.palletCode,
- stockId: row.id
- }, "姝e湪璋冪敤MES鎺ュ彛...");
+ const result = await this.http.post(
+ "/api/StockInfo/inboundInContainer",
+ {
+ palletCode: row.palletCode,
+ stockId: row.id,
+ },
+ "姝e湪璋冪敤MES鎺ュ彛...",
+ );
if (result.status) {
this.$Message.success(result.message || "鎵樼洏杩涚珯鎴愬姛");
@@ -109,16 +82,24 @@
// 鎵樼洏鍑虹珯鎿嶄綔
async handleOutbound(row) {
try {
- await this.$confirm(`纭鎵ц鎵樼洏鍑虹珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`, "鍑虹珯纭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- });
+ await this.$confirm(
+ `纭鎵ц鎵樼洏鍑虹珯鎿嶄綔锛焅n鎵樼洏缂栧彿锛�${row.palletCode}`,
+ "鍑虹珯纭",
+ {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ },
+ );
- const result = await this.http.post("/api/StockInfo/outboundInContainer", {
- palletCode: row.palletCode,
- stockId: row.id
- }, "姝e湪璋冪敤MES鎺ュ彛...");
+ const result = await this.http.post(
+ "/api/StockInfo/outboundInContainer",
+ {
+ palletCode: row.palletCode,
+ stockId: row.id,
+ },
+ "姝e湪璋冪敤MES鎺ュ彛...",
+ );
if (result.status) {
this.$Message.success(result.message || "鎵樼洏鍑虹珯鎴愬姛");
@@ -133,40 +114,25 @@
}
},
- // 鎵樼洏鎷嗙洏鎿嶄綔
- 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() {
// 妗嗘灦鍒濆鍖栭厤缃悗
},
searchBefore(param) {
+ const stockStatusFilter = {
+ name: "stockStatus",
+ value: "1",
+ displayType: "notequal",
+ };
+ if (!param.wheres) {
+ param.wheres = [];
+ }
+ // 灏嗚繃婊ゆ潯浠舵坊鍔犲埌鏌ヨ鍙傛暟涓�
+ param.wheres.push(stockStatusFilter);
return true;
},
searchAfter(result) {
- return true;
+ return result;
},
addBefore(formData) {
return true;
@@ -179,8 +145,8 @@
},
modelOpenAfter(row) {
// 鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚�
- }
- }
+ },
+ },
};
export default extension;
--
Gitblit v1.9.3