From c6fd16350612b8aef7a04bfbebf6ee3c591a88ae Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 22 十月 2025 17:43:44 +0800
Subject: [PATCH] 调整物料下发和取消下发

---
 pages/product/WorkshopOrderCancellationIssued/index.vue |   71 ++++++++++++++++++-----------------
 1 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/pages/product/WorkshopOrderCancellationIssued/index.vue b/pages/product/WorkshopOrderCancellationIssued/index.vue
index 4102cfa..af53612 100644
--- a/pages/product/WorkshopOrderCancellationIssued/index.vue
+++ b/pages/product/WorkshopOrderCancellationIssued/index.vue
@@ -29,7 +29,7 @@
             ></u-icon>
           </view>
         </view>
-        <view class="packing-registration-param-item param-extra">
+        <!-- <view class="packing-registration-param-item param-extra">
           <view class="packing-registration-param-item-left">
             <text class="item-one">宸ュ崟</text>
           </view>
@@ -79,7 +79,7 @@
               size="28"
             ></u-icon>
           </view>
-        </view>
+        </view> -->
         <view class="packing-registration-param-item param-extra">
           <view class="packing-registration-param-item-left">
             <text class="item-one">鍙栨秷涓嬪彂璁板綍锛�</text>
@@ -114,10 +114,10 @@
               </view>
               <view class="row-list">
                 <view class="_label">
-                  <view class="_label-name">鍙栨秷涓嬪彂鏁伴噺锛�</view>
+                  <view class="_label-name">鍙栨秷鏁伴噺锛�</view>
                 </view>
                 <view class="_content">
-                  {{ item.suppliedQuantity }}
+                  {{ item.stockQuantity }}
                 </view>
               </view>
             </view>
@@ -133,6 +133,7 @@
       :show-confirm-button="true"
       @confirm="confirm"
       @cancel="cancel"
+
     >
       <view class="popup-content">
         <view class="packing-registration-param">
@@ -181,12 +182,12 @@
             </view>
             <view class="packing-registration-param-item param-extra">
               <view class="packing-registration-param-item-left">
-                <text class="item-one">鍙栨秷涓嬪彂鏁伴噺</text>
+                <text class="item-one">鍙栨秷鏁伴噺</text>
               </view>
               <view class="packing-registration-param-item-right">
                 <u-input
                   class="item-one item-two"
-                  v-model="modalList.returnQuantity"
+                  v-model="modalList.stockQuantity"
                 />
               </view>
             </view>
@@ -246,14 +247,14 @@
     uni.$off("scan"); // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
     uni.$on("scan", function (data) {
       console.log("onscan");
-      if (that.registerInfo.workstationId == "") {
-        uni.showToast({
-          icon: "none",
-          title: "璇峰厛閫夋嫨鏈哄彴锛�",
-          duration: 2 * 1000,
-        });
-        return;
-      }
+      // if (that.registerInfo.workstationId == "") {
+      //   uni.showToast({
+      //     icon: "none",
+      //     title: "璇峰厛閫夋嫨鏈哄彴锛�",
+      //     duration: 2 * 1000,
+      //   });
+      //   return;
+      // }
       if (data.code) {
         //鎵爜鎴愬姛鍚庣殑鍥炶皟锛屼綘鍙互鍐欒嚜宸辩殑閫昏緫浠g爜鍦ㄨ繖閲�
         console.log("鎵爜缁撴灉锛�", data.code);
@@ -323,22 +324,22 @@
         this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵��
         return;
       }
-      if (!this.modalList.returnQuantity) {
-        this.$u.toast("璇疯緭鍏ュ彇娑堜笅鍙戞暟閲�");
+      if (!this.modalList.stockQuantity) {
+        this.$u.toast("璇疯緭鍏ュ彇娑堟暟閲�");
         this.$refs.uModal.clearLoading(); // 娓呴櫎鍔犺浇鐘舵��
         return;
       }
       // 澶勭悊纭閫昏緫
-      this.$u.api.WorkshopOrderCancellationIssued.feeding([
-        this.modalList,
-      ]).then((res) => {
+      this.$u.api.WorkshopOrderCancellationIssued.rejectPDA(
+        this.modalList
+      ).then((res) => {
         console.log("res", res);
         if (res.code === 0) {
           this.$u.toast("鎻愪氦鎴愬姛");
           this.showModal = false;
           const obj = {
-            suppliedQuantity: this.modalList.suppliedQuantity,
-            outBatchNo: this.modalList.returnQuantity,
+            stockQuantity: this.modalList.stockQuantity,
+            outBatchNo: this.modalList.outBatchNo,
           };
           this.hasScanSnList.push(obj);
         }
@@ -406,21 +407,21 @@
     },
     // 鎵爜鍚庢暟鎹洖鏄�
     scanHandle(val) {
-      const { outBatchNo } = val;
-      const { workstationId, operationTaskId } = this.registerInfo;
+      const { BN } = val;
+      const { id } = this.registerInfo;
       const obj = {
-        outBatchNo: outBatchNo,
-        feedingWorkstationId: workstationId,
-        operationTaskId: operationTaskId,
+        outBatchNo: BN,
+        moId: id,
       };
-      this.$u.api.WorkshopOrderCancellationIssued.checkReturnPartPDA(obj).then(
-        (res) => {
-          console.log("res", res);
-          if (res.code === 0) {
-            this.getHandymanItem(obj);
-          }
-        }
-      );
+     this.getReturnInfo(obj);
+      // this.$u.api.WorkshopOrderCancellationIssued.checkReturnPartPDA(obj).then(
+      //   (res) => {
+      //     console.log("res", res);
+      //     if (res.code === 0) {
+      //       this.getHandymanItem(obj);
+      //     }
+      //   }
+      // );
     },
     //   鑾峰彇鍩烘湰淇℃伅
     getReturnInfo(obj) {
@@ -482,7 +483,7 @@
   }
 
   .packing-registration-param-view {
-    height: 450rpx;
+    height: 200rpx;
     background-color: #fff;
     border-radius: 10rpx;
     padding: 0rpx 23rpx;

--
Gitblit v1.9.3