From a7d23db4e3bcf4c44b7f8b37e79699a7660a399e Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 02 七月 2025 10:52:02 +0800
Subject: [PATCH] 移库页面

---
 pages/wareHouse/moveWareHouse/index.vue |  144 +++++++++++++++++++++++++++++------------------
 1 files changed, 88 insertions(+), 56 deletions(-)

diff --git a/pages/wareHouse/moveWareHouse/index.vue b/pages/wareHouse/moveWareHouse/index.vue
index f0b73df..467f6ca 100644
--- a/pages/wareHouse/moveWareHouse/index.vue
+++ b/pages/wareHouse/moveWareHouse/index.vue
@@ -16,13 +16,17 @@
             <text class="item-one">搴撲綅</text>
           </view>
           <view class="packing-registration-param-item-right">
-            <text class="item-one item-two">{{ registerInfo.storageLocation == '' ? "璇锋壂鎻忓簱浣�" : registerInfo.storageLocation }}</text>
+            <text class="item-one item-two">{{
+              registerInfo.toLocationNo == ""
+                ? "璇锋壂鎻忓簱浣�"
+                : registerInfo.toLocationNo
+            }}</text>
           </view>
         </view>
         <view class="packing-registration-param-item param-extra">
           <view class="packing-registration-param-item-left">
             <text class="item-one">{{
-              `绉诲簱璁板綍(${registerInfo.num}鏉�)锛歚
+              `绉诲簱璁板綍(${hasScanSnList.length}鏉�)锛歚
             }}</text>
           </view>
         </view>
@@ -34,7 +38,6 @@
           class="packing-registration-scroll-list-group"
           :border="false"
         >
-          <!-- <div class="tip" style="text-align: center;" v-if="hasScanSnList.length==0">-璇锋壂鐮�-</div> -->
           <view
             class="content"
             v-for="(item, index) in hasScanSnList"
@@ -50,7 +53,7 @@
                   <view class="_label-name">闆朵欢鍙凤細</view>
                 </view>
                 <view class="_content">
-                  {{ item.value0 }}
+                  {{ item.partNo }}
                 </view>
               </view>
               <view class="row-list">
@@ -58,7 +61,7 @@
                   <view class="_label-name">鎵规鍙凤細</view>
                 </view>
                 <view class="_content">
-                  {{ item.value1 }}
+                  {{ item.outBatchNo }}
                 </view>
               </view>
               <view class="row-list">
@@ -66,7 +69,7 @@
                   <view class="_label-name">搴撲綅鍙凤細</view>
                 </view>
                 <view class="_content">
-                  {{ item.value0 }}
+                  {{ item.locationNo }}
                 </view>
               </view>
               <view class="row-list">
@@ -74,7 +77,7 @@
                   <view class="_label-name">鐩樼偣鏁伴噺锛�</view>
                 </view>
                 <view class="_content">
-                  {{ item.value1 }}
+                  {{ item.qtyAvailable }}
                 </view>
               </view>
             </view>
@@ -98,7 +101,9 @@
                 <text class="item-one">鎵瑰彿</text>
               </view>
               <view class="packing-registration-param-item-right">
-                <text class="item-one item-two">{{ 111 }}</text>
+                <text class="item-one item-two">{{
+                  detailedList.outBatchNo
+                }}</text>
               </view>
             </view>
             <view class="packing-registration-param-item param-extra">
@@ -106,7 +111,9 @@
                 <text class="item-one">闆朵欢鎻忚堪</text>
               </view>
               <view class="packing-registration-param-item-right">
-                <text class="item-one item-two">{{ 111 }}</text>
+                <text class="item-one item-two">{{
+                  detailedList.partName
+                }}</text>
               </view>
             </view>
             <view class="packing-registration-param-item param-extra">
@@ -114,7 +121,9 @@
                 <text class="item-one">WDR</text>
               </view>
               <view class="packing-registration-param-item-right">
-                <text class="item-one item-two">{{ 111 }}</text>
+                <text class="item-one item-two">{{
+                  detailedList.waivDevRejNo
+                }}</text>
               </view>
             </view>
             <view class="packing-registration-param-item param-extra">
@@ -122,7 +131,9 @@
                 <text class="item-one">鐜版湁鏁伴噺</text>
               </view>
               <view class="packing-registration-param-item-right">
-                <text class="item-one item-two">{{ 111 }}</text>
+                <text class="item-one item-two">{{
+                  detailedList.qtyAvailable
+                }}</text>
               </view>
             </view>
             <view class="packing-registration-param-item param-extra">
@@ -130,7 +141,9 @@
                 <text class="item-one">褰撳墠搴撲綅</text>
               </view>
               <view class="packing-registration-param-item-right">
-                <text class="item-one item-two">{{ 111 }}</text>
+                <text class="item-one item-two">{{
+                  detailedList.locationNo
+                }}</text>
               </view>
             </view>
           </view>
@@ -157,42 +170,13 @@
         backgroundRepeat: "no-repeat",
       },
       registerInfo: {
-        storageLocation: "",
+        toLocationNo: "",
         num: 0,
       },
-      showModal: true, // 鎺у埗寮圭獥鏄剧ず闅愯棌鐨勫彉閲�
-      hasScanSnList: [
-        {
-          value0: "11111111111111111111111",
-          value1: "111",
-          value2: "111",
-          value3: "111",
-        },
-        {
-          value0: "111",
-          value1: "111",
-          value2: "111",
-          value3: "111",
-        },
-        {
-          value0: "111",
-          value1: "111",
-          value2: "111",
-          value3: "111",
-        },
-        {
-          value0: "111",
-          value1: "111",
-          value2: "111",
-          value3: "111",
-        },
-        {
-          value0: "111",
-          value1: "111",
-          value2: "111",
-          value3: "111",
-        },
-      ],
+      showModal: false, // 鎺у埗寮圭獥鏄剧ず闅愯棌鐨勫彉閲�
+      hasScanSnList: [],
+      detailedList: {},
+      codeInfoId: "",
     };
   },
   onLoad() {},
@@ -205,28 +189,75 @@
       console.log("椤甸潰鎵爜缁撴灉锛�", data.code);
       if (data.code) {
         let codeInfo = JSON.parse(data.code);
-        if (codeInfo.WorkNo) {
-          // 鎵弿鎶ュ伐鍗曚簩缁寸爜
+        // 鎵弿鎶ュ伐鍗曚簩缁寸爜
+        // 鍒ゆ柇鎵弿鐨勬槸搴撲綅鐮佽繕鏄祦杞爜
+        if (codeInfo.LN) {
           that.saveForm(codeInfo);
+        } else {
+          if (!that.registerInfo.toLocationNo) {
+            that.$u.toast("璇峰厛鎵弿搴撲綅");
+            return; 
+          }
+          that.hasScanSnList = [];
+          that.codeInfoId = codeInfo.id;
+          that.saveModalForm(codeInfo);
+          //   that.getHandelList();
         }
       }
     });
   },
   methods: {
+    // getHandelList() {
+    //   this.$u.api.workReporting
+    //     .getProductMainV1({
+    //       current: 1,
+    //       size: -1,
+    //       id: this.codeInfoId,
+    //     })
+    //     .then((res) => {
+    //       this.hasScanSnList = res.data.productOutputList;
+    //     });
+    // },
     confirm() {
+      // 鐐瑰嚮纭绉诲簱
+      if (this.registerInfo.toLocationNo == this.detailedList.locationNo) {
+        uni.showToast({
+          icon: "none",
+          title: "浣犳棤娉曞皢闆朵欢绉诲埌鐩稿悓浣嶇疆",
+          duration: 2 * 1000,
+        });
+        return;
+      }
       // 澶勭悊纭閫昏緫
-      this.show = false;
+      this.$u.api.shiftingParking
+        .moveHousePDA({
+          ...this.detailedList,
+          toLocationNo: this.registerInfo.toLocationNo,
+        })
+        .then((res) => {
+          console.log("绉诲簱璁板綍", res);
+          this.hasScanSnList.push(res.data);
+          console.log("绉诲簱璁板綍", this.hasScanSnList);
+          this.$u.toast("绉诲簱鎴愬姛");
+        });
     },
     cancel() {
-      this.show = false; // 鍏抽棴寮圭獥
+      this.showModal = false; // 鍏抽棴寮圭獥
     },
-        // 鍥炴樉鎵爜鐨勪俊鎭�-鎶ュ伐鍗�
+    // 鍥炴樉鎵爜鐨勪俊鎭�
     saveForm(val) {
-      let { WorkNo, ProcessName, ORDER_NO } = val
-      this.form.value1 = WorkNo
-      this.form.value2 = ProcessName
-      this.form.value3 = ORDER_NO
-    }
+      this.registerInfo.toLocationNo = val.LN;
+    },
+    saveModalForm(val) {
+      this.$u.api.shiftingParking
+        .selPartInfoPDA({
+          outBatchNo: val.outBatchNo,
+        })
+        .then((res) => {
+          this.detailedList = res.data;
+          this.showModal = true;
+        });
+    },
   },
 };
 </script>
@@ -329,6 +360,7 @@
     }
   }
 }
+
 .wrap .packing-registration-scroll-list {
   height: calc(100vh - var(--window-top) - var(--window-bottom) - 360rpx);
   width: 100%;

--
Gitblit v1.9.3