From 1824228ee4f0f25383d1c9e9fea684dfc8a460bc Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期六, 01 三月 2025 17:36:43 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

---
 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js |  133 +++++++++++++++++++++++---------------------
 1 files changed, 70 insertions(+), 63 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js"
index 87fa048..116fd46 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/materielCodeInfo.js"
@@ -1,5 +1,7 @@
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 import gridBody from './extend/materielcodeprintView.vue'
+import modelHeader from './extend/materielcodeSelectView.vue'
+import modelBody from './extend/purchaseOrderNoSelectView.vue'
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
@@ -7,8 +9,8 @@
     gridBody: gridBody,
     gridFooter: '',
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
-    modelHeader: '',
-    modelBody: '',
+    modelHeader: modelHeader,
+    modelBody: modelBody,
     modelFooter: ''
   },
   tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
@@ -33,71 +35,76 @@
       let day = String(date.getDate()).padStart(2, "0");
       return year + "-" + month + "-" + day;
     },
-    // 鏂板鏂规硶锛氬姞杞界墿鏂欑紪鍙锋暟鎹�
-    async loadMaterielCodes(option) {
-      try {
-        option.loading = true;
-        const { page, pageSize, keyword } = option.pagination;
-        const res = await this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode", {
-          warehouseId: this.editFormFields.warehouseId,
-          keyword,
-          page,
-          pageSize
-        }, true);
-    
-        if (res.status) {
-          option.pagination.total = res.total || res.data.length;
-          const newData = res.data.map(item => ({ key: item, value: item }));
-          option.data = page === 1 ? newData : [...option.data, ...newData];
-        }
-      } catch (error) {
-        this.$error("鏁版嵁鍔犺浇澶辫触");
-      } finally {
-        option.loading = false;
-      }
-    },
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {  //妗嗘灦鍒濆鍖栭厤缃墠锛�
       this.$nextTick(() => {
-        let warehouseIdOption = this.getOption("warehouseId");
-        let materielCodeOption = this.getOption("materielCode");
-        let purchaseOrderNoOption = this.getOption("purchaseOrderNo");
-        let materielQueryOption = this.getOption("materielQuery");
-        warehouseIdOption.onChange = (val, option) => {
-          this.editFormFields.materielCode = "";
-          materielCodeOption.data = [];
-          this.editFormFields.purchaseOrderNo = "";
-          purchaseOrderNoOption.data = [];
-          if (val == null || val == 0) {
-            return this.$error("璇烽�夋嫨浠撳簱锛�")
-          }
-          this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + val, {}, true).then(
-            source => {
-              if (!source.status) return this.$error(source.message);
-              this.$nextTick(() => {
+        this.editFormOptions.forEach((option) => {
+          option.forEach((item) => {
+            if (item.field == 'materielCode') {
+              //鍒濆鍖栧脊鍑烘閫夋嫨鍣ㄩ厤缃�
+              item.extra = {
+                icon: 'el-icon-zoom-out', //鏄剧ず鍥炬爣
+                text: '閫夋嫨鏁版嵁', //鏄剧ず鏂囨湰
+                style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;',
+                //瑙﹀彂浜嬩欢
+                click: (item) => {
+                  this.$refs.modelHeader.open(this.editFormFields.warehouseId);
+                }
+              };
+            }
+          });
+        });
+        this.editFormOptions.forEach((option) => {
+          option.forEach((item) => {
+            if (item.field == 'purchaseOrderNo') {
+              //鍒濆鍖栧脊鍑烘閫夋嫨鍣ㄩ厤缃�
+              item.extra = {
+                icon: 'el-icon-zoom-out', //鏄剧ず鍥炬爣
+                text: '閫夋嫨鏁版嵁', //鏄剧ず鏂囨湰
+                style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;',
+                //瑙﹀彂浜嬩欢
+                click: (item) => {
+                  this.$refs.modelBody.open(this.editFormFields.materielCode);
+                }
+              };
+            }
+          });
+        });
+        // warehouseIdOption.onChange = (val, option) => {
+        //   this.editFormFields.materielCode = "";
+        //   materielCodeOption.data = [];
+        //   this.editFormFields.purchaseOrderNo = "";
+        //   purchaseOrderNoOption.data = [];
+        //   if (val == null || val == 0) {
+        //     return this.$error("璇烽�夋嫨浠撳簱锛�")
+        //   }
+        //   this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + val, {}, true).then(
+        //     source => {
+        //       if (!source.status) return this.$error(source.message);
+        //       this.$nextTick(() => {
 
-                for (let i = 0; i < source.data.length; i++) {
-                  materielCodeOption.data.push({ key: source.data[i], value: source.data[i] })
-                }
-              })
-            })
-        }
-        materielCodeOption.onChange = (val, option) => {
-          this.editFormFields.purchaseOrderNo = "";
-          purchaseOrderNoOption.data = [];
-          if (val == null || val == 0) {
-            return this.$error("璇烽�夋嫨鐗╂枡缂栧彿锛�")
-          }
-          this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + val, {}, true).then(
-            source => {
-              if (!source.status) return this.$error(source.message);
-              this.$nextTick(() => {
-                for (let i = 0; i < source.data.length; i++) {
-                  purchaseOrderNoOption.data.push({ key: source.data[i], value: source.data[i] })
-                }
-              });
-            })
-        }
+        //         for (let i = 0; i < source.data.length; i++) {
+        //           materielCodeOption.data.push({ key: source.data[i], value: source.data[i] })
+        //         }
+        //       })
+        //     })
+        // }
+        // materielCodeOption.onChange = (val, option) => {
+        //   this.editFormFields.purchaseOrderNo = "";
+        //   purchaseOrderNoOption.data = [];
+        //   if (val == null || val == 0) {
+        //     return this.$error("璇烽�夋嫨鐗╂枡缂栧彿锛�")
+        //   }
+        //   this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + val, {}, true).then(
+        //     source => {
+        //       if (!source.status) return this.$error(source.message);
+        //       this.$nextTick(() => {
+        //         for (let i = 0; i < source.data.length; i++) {
+        //           purchaseOrderNoOption.data.push({ key: source.data[i], value: source.data[i] })
+        //         }
+        //       });
+        //     })
+        // }
       });
 
       this.columns.push({

--
Gitblit v1.9.3