From a846d73009c695f51ef507f53f14b3b8c73e59d8 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期二, 31 三月 2026 10:26:50 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215

---
 项目代码/WIDESEA_WMSClient/src/extension/stock/stockView.js |  311 +++++++++++++++++++++++++++------------------------
 1 files changed, 162 insertions(+), 149 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js"
index f786268..56cdda1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/stock/stockView.js"
@@ -159,169 +159,182 @@
       })
 
       let SelectTake = this.buttons.find(x => x.value == 'SelectStockTake');
-if (SelectTake) {
-  // 鏀逛负绠ご鍑芥暟纭繚this鎸囧悜Vue缁勪欢瀹炰緥
-  SelectTake.onClick = async () => {
-    // 鑾峰彇閫変腑鏁版嵁锛堜笌鍘熼�昏緫涓�鑷达紝纭繚鏄暟缁勬牸寮忥級
-    let stockViews = this.$refs.table.getSelected();
-    
-    // 鏁版嵁鏍¢獙锛氳嚦灏戦�夋嫨涓�鏉℃暟鎹�
-    if (stockViews.length === 0) return ElMessage.error("璇烽�夋嫨闇�瑕佹搷浣滅殑鏁版嵁!");
-    
-    // 绔欏彴閫夐」锛堝彲鏍规嵁瀹為檯涓氬姟璋冩暣閫夐」鍊硷級
-    const stationOptions = [
-      { label: "绔欏彴2", value: "2-1" },
-      { label: "绔欏彴3", value: "3-1" },
-      { label: "绔欏彴4", value: "4-1" },
-    ];
-    
-    // 鍒涘缓寮圭獥鎸傝浇鑺傜偣
-    const mountNode = document.createElement("div");
-    document.body.appendChild(mountNode);
-    
-    // 琛ㄥ崟鏁版嵁锛堢粦瀹氶�変腑鐨勭珯鍙帮級
-    const formData = reactive({
-      outStation: stationOptions[0].value, // 榛樿閫変腑绗竴涓珯鍙�
-    });
-    
-    // 鍒涘缓寮圭獥VNode
-    const vnode = createVNode(
-      ElDialog,
-      {
-        title: "搴撳瓨鎿嶄綔 - 閫夋嫨鍑哄簱绔欏彴",
-        width: "500px",
-        modelValue: true,
-        appendToBody: true,
-        "onUpdate:modelValue": (isVisible) => {
-          if (!isVisible) {
-            render(null, mountNode);
-            document.body.removeChild(mountNode);
-          }
-        },
-        style: {
-          padding: "20px 0",
-          borderRadius: "8px",
-        },
-      },
-      {
-        default: () =>
-          h(
-            ElForm,
+      if (SelectTake) {
+        // 鏀逛负绠ご鍑芥暟纭繚this鎸囧悜Vue缁勪欢瀹炰緥
+        SelectTake.onClick = async () => {
+          // 鑾峰彇閫変腑鏁版嵁锛堜笌鍘熼�昏緫涓�鑷达紝纭繚鏄暟缁勬牸寮忥級
+          let stockViews = this.$refs.table.getSelected();
+          
+          // 鏁版嵁鏍¢獙锛氳嚦灏戦�夋嫨涓�鏉℃暟鎹�
+          if (stockViews.length === 0) return ElMessage.error("璇烽�夋嫨闇�瑕佹搷浣滅殑鏁版嵁!");
+          
+          // 绔欏彴閫夐」锛堝彲鏍规嵁瀹為檯涓氬姟璋冩暣閫夐」鍊硷級
+          const stationOptions = [
+            { label: "绔欏彴2", value: "2-1" },
+            { label: "绔欏彴3", value: "3-1" },
+            { label: "绔欏彴4", value: "4-1" },
+          ];
+          
+          // 鍒涘缓寮圭獥鎸傝浇鑺傜偣
+          const mountNode = document.createElement("div");
+          document.body.appendChild(mountNode);
+          
+          // 琛ㄥ崟鏁版嵁锛堢粦瀹氶�変腑鐨勭珯鍙帮級
+          const formData = reactive({
+            outStation: stationOptions[0].value, // 榛樿閫変腑绗竴涓珯鍙�
+          });
+          
+          // 鍒涘缓寮圭獥VNode
+          const vnode = createVNode(
+            ElDialog,
             {
-              model: formData,
-              rules: {
-                outStation: [
-                  { required: true, message: "璇烽�夋嫨鍑哄簱绔欏彴", trigger: "change" },
-                ],
+              title: "搴撳瓨鎿嶄綔 - 閫夋嫨鍑哄簱绔欏彴",
+              width: "500px",
+              modelValue: true,
+              appendToBody: true,
+              "onUpdate:modelValue": (isVisible) => {
+                if (!isVisible) {
+                  render(null, mountNode);
+                  document.body.removeChild(mountNode);
+                }
               },
-              ref: "stockTakeForm", // 琛ㄥ崟ref鏍囪瘑
-              labelWidth: "100px",
               style: {
-                padding: "0 30px",
+                padding: "20px 0",
+                borderRadius: "8px",
               },
             },
-            [
-              // 绔欏彴閫夋嫨涓嬫媺妗�
-              h(ElFormItem, {
-                label: "鍑哄簱绔欏彴",
-                prop: "outStation",
-                style: { marginBottom: "24px" },
-              }, [
-                h(ElSelect, {
-                  placeholder: "璇烽�夋嫨鍑哄簱绔欏彴",
-                  modelValue: formData.outStation,
-                  "onUpdate:modelValue": (val) => {
-                    formData.outStation = val;
+            {
+              default: () =>
+                h(
+                  ElForm,
+                  {
+                    model: formData,
+                    rules: {
+                      outStation: [
+                        { required: true, message: "璇烽�夋嫨鍑哄簱绔欏彴", trigger: "change" },
+                      ],
+                    },
+                    ref: "stockTakeForm", // 琛ㄥ崟ref鏍囪瘑
+                    labelWidth: "100px",
+                    style: {
+                      padding: "0 30px",
+                    },
                   },
-                  style: {
-                    width: "100%",
-                    height: "40px",
-                    borderRadius: "4px",
-                    borderColor: "#dcdfe6",
-                  },
-                }, stationOptions.map((station) =>
-                  h(ElOption, { label: station.label, value: station.value })
-                )),
-              ]),
-              // 搴曢儴鎸夐挳鍖哄煙
-              h("div", {
-                style: {
-                  textAlign: "right",
-                  marginTop: "8px",
-                  paddingRight: "4px",
-                },
-              }, [
-                // 鍙栨秷鎸夐挳
-                h(ElButton, {
-                  type: "text",
-                  onClick: () => {
-                    render(null, mountNode);
-                    document.body.removeChild(mountNode);
-                    ElMessage.info("鍙栨秷搴撳瓨鎿嶄綔");
-                  },
-                  style: { marginRight: "8px", color: "#606266" },
-                }, "鍙栨秷"),
-                // 纭畾鎸夐挳
-                h(ElButton, {
-                  type: "primary",
-                  onClick: async () => {
-                    // 纭繚琛ㄥ崟ref宸叉寕杞�
-                    await this.$nextTick();
-                    const formRef = vnode.component.refs.stockTakeForm;
+                  [
+                    // 绔欏彴閫夋嫨涓嬫媺妗�
+                    h(ElFormItem, {
+                      label: "鍑哄簱绔欏彴",
+                      prop: "outStation",
+                      style: { marginBottom: "24px" },
+                    }, [
+                      h(ElSelect, {
+                        placeholder: "璇烽�夋嫨鍑哄簱绔欏彴",
+                        modelValue: formData.outStation,
+                        "onUpdate:modelValue": (val) => {
+                          formData.outStation = val;
+                        },
+                        style: {
+                          width: "100%",
+                          height: "40px",
+                          borderRadius: "4px",
+                          borderColor: "#dcdfe6",
+                        },
+                      }, stationOptions.map((station) =>
+                        h(ElOption, { label: station.label, value: station.value })
+                      )),
+                    ]),
+                    // 搴曢儴鎸夐挳鍖哄煙
+                    h("div", {
+                      style: {
+                        textAlign: "right",
+                        marginTop: "8px",
+                        paddingRight: "4px",
+                      },
+                    }, [
+                      // 鍙栨秷鎸夐挳
+                      h(ElButton, {
+                        type: "text",
+                        onClick: () => {
+                          render(null, mountNode);
+                          document.body.removeChild(mountNode);
+                          ElMessage.info("鍙栨秷搴撳瓨鎿嶄綔");
+                        },
+                        style: { marginRight: "8px", color: "#606266" },
+                      }, "鍙栨秷"),
+                      // 纭畾鎸夐挳
+                      h(ElButton, {
+                        type: "primary",
+                        onClick: async () => {
+                          // 纭繚琛ㄥ崟ref宸叉寕杞�
+                          await this.$nextTick();
+                          const formRef = vnode.component.refs.stockTakeForm;
 
-                    if (!formRef) {
-                      ElMessage.error("琛ㄥ崟鍒濆鍖栧け璐ワ紝璇烽噸璇�");
-                      return;
-                    }
+                          if (!formRef) {
+                            ElMessage.error("琛ㄥ崟鍒濆鍖栧け璐ワ紝璇烽噸璇�");
+                            return;
+                          }
 
-                    // 琛ㄥ崟楠岃瘉
-                    try {
-                      await formRef.validate();
-                    } catch (err) {
-                      return;
-                    }
+                          // 琛ㄥ崟楠岃瘉
+                          try {
+                            await formRef.validate();
+                          } catch (err) {
+                            return;
+                          }
 
-                    const requestBody = stockViews;
-                    const outStation = formData.outStation;
+                          const requestBody = stockViews;
+                          const outStation = formData.outStation;
 
-                    try {
+                          try {
 
-                      const url = `api/Task/TakeOutbound?outStation=${encodeURIComponent(outStation)}`;
-                      
-                      const x = await this.http.post(
-                        url, // 甯︽煡璇㈠弬鏁扮殑URL
-                        requestBody, // 璇锋眰浣擄細stockViews鏁扮粍
-                        "鏁版嵁澶勭悊涓�"
-                      );
+                            const url = `api/Task/TakeOutbound?outStation=${encodeURIComponent(outStation)}`;
+                            
+                            const x = await this.http.post(
+                              url, // 甯︽煡璇㈠弬鏁扮殑URL
+                              requestBody, // 璇锋眰浣擄細stockViews鏁扮粍
+                              "鏁版嵁澶勭悊涓�"
+                            );
 
-                      if (!x.status) {
-                        ElMessage.error(x.message || "搴撳瓨鎿嶄綔澶辫触");
-                        return;
-                      }
+                            if (!x.status) {
+                              ElMessage.error(x.message || "搴撳瓨鎿嶄綔澶辫触");
+                              return;
+                            }
 
-                      ElMessage.success("鎿嶄綔鎴愬姛");
-                      this.refresh(); // 鍘熷埛鏂伴�昏緫淇濈暀
-                    } catch (error) {
-                      console.error("搴撳瓨鎺ュ彛璇锋眰澶辫触锛�", error);
-                      ElMessage.error("璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯");
-                    } finally {
-                      // 鏃犺鎴愬姛澶辫触锛屽叧闂脊绐�
-                      render(null, mountNode);
-                      document.body.removeChild(mountNode);
-                    }
-                  },
-                  style: { borderRadius: "4px", padding: "8px 20px" },
-                }, "纭畾鎿嶄綔"),
-              ]),
-            ]),
+                            ElMessage.success("鎿嶄綔鎴愬姛");
+                            this.refresh(); // 鍘熷埛鏂伴�昏緫淇濈暀
+                          } catch (error) {
+                            console.error("搴撳瓨鎺ュ彛璇锋眰澶辫触锛�", error);
+                            ElMessage.error("璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯");
+                          } finally {
+                            // 鏃犺鎴愬姛澶辫触锛屽叧闂脊绐�
+                            render(null, mountNode);
+                            document.body.removeChild(mountNode);
+                          }
+                        },
+                        style: { borderRadius: "4px", padding: "8px 20px" },
+                      }, "纭畾鎿嶄綔"),
+                    ]),
+                  ]),
+            }
+          );
+
+          // 缁戝畾app涓婁笅鏂囷紙纭繚寮圭獥鍐呯粍浠舵甯稿伐浣滐級
+          vnode.appContext = this.$.appContext;
+          render(vnode, mountNode);
+        };
       }
-    );
-
-    // 缁戝畾app涓婁笅鏂囷紙纭繚寮圭獥鍐呯粍浠舵甯稿伐浣滐級
-    vnode.appContext = this.$.appContext;
-    render(vnode, mountNode);
-  };
-}
+      let SelectTakeArea = this.buttons.find(x => x.value == 'SelectStockAreaOut');
+      if (SelectTakeArea) {
+        SelectTakeArea.onClick = function () {
+          let stockViews = this.$refs.table.getSelected();
+          this.http
+            .post("api/Task/AreaOutbound",stockViews, "鏁版嵁澶勭悊涓�")
+            .then((x) => {
+              if (!x.status) return this.$message.error(x.message);
+              this.$message.success("鎿嶄綔鎴愬姛");
+              this.refresh();
+            });
+        }
+      }
     },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗

--
Gitblit v1.9.3