From ce1292c9cf37195b6abd2699dfc5d6cb3e143c9b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 12 四月 2026 23:38:19 +0800
Subject: [PATCH] feat(MES): 添加MES接口相关实体和DTO JS扩展文件至JSX格式并更新配置

---
 Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx |  123 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 123 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
new file mode 100644
index 0000000..809dd5f
--- /dev/null
+++ b/Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -0,0 +1,123 @@
+//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
+
+let extension = {
+  components: {
+    //鏌ヨ鐣岄潰鎵╁睍缁勪欢
+    gridHeader: '',
+    gridBody: '',
+    gridFooter: '',
+    //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
+    modelHeader: '',
+    modelBody: '',
+    modelFooter: ''
+  },
+  tableAction: '',
+  buttons: { view: [], box: [], detail: [] },
+  methods: {
+    onInit() {
+      // 娣诲姞MES鎿嶄綔鍒�
+      this.columns.push({
+        title: '鎿嶄綔',
+        field: '鎿嶄綔',
+        align: 'center',
+        width: 200,
+        fixed: 'right',
+        render: (h, { row, column, index }) => {
+          return (
+            <div>
+              <el-button
+                type="primary"
+                size="small"
+                onClick={($e) => { this.handleInbound(row); }}
+              >杩涚珯</el-button>
+              <el-button
+                type="success"
+                size="small"
+                style="margin-left: 8px"
+                onClick={($e) => { this.handleOutbound(row); }}
+              >鍑虹珯</el-button>
+            </div>
+          );
+        }
+      });
+    },
+
+    // 鎵樼洏杩涚珯鎿嶄綔
+    async handleInbound(row) {
+      try {
+        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鎺ュ彛...");
+
+        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 handleOutbound(row) {
+      try {
+        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鎺ュ彛...");
+
+        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) {
+      return true;
+    },
+    searchAfter(result) {
+      return true;
+    },
+    addBefore(formData) {
+      return true;
+    },
+    updateBefore(formData) {
+      return true;
+    },
+    rowClick({ row, column, event }) {
+      this.$refs.table.$refs.table.toggleRowSelection(row);
+    },
+    modelOpenAfter(row) {
+      // 鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚�
+    }
+  }
+};
+
+export default extension;

--
Gitblit v1.9.3