From fe95d034e69c59d3e1a003615a65a0fb945ba55f Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 25 四月 2024 17:07:57 +0800
Subject: [PATCH] 获取供应商对应产品的列表接口修改和联调+获取产品相关供应商的接口修改和联调

---
 src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue |   31 ++++++++++++++++++++++++++-----
 1 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue b/src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue
index e2698a9..2712660 100644
--- a/src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue
+++ b/src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue
@@ -18,8 +18,8 @@
         <el-button size="small" v-if="this.editConfig.title != '鏌ョ湅'" @click="editConfig.visible = false">鍙栨秷</el-button>
         <el-button type="primary"  size="small"
           @click="saveClick('form')">纭鏀惰揣</el-button>
-        <!-- <el-button type="primary"  size="small"
-          @click="saveOkClickAll('form')">鍏ㄩ儴鍚堟牸鍏ュ簱</el-button> -->
+        <el-button type="primary"  size="small"
+          @click="saveOkClickAll('form')">鍏ㄩ儴鍚堟牸鍏ュ簱</el-button>
       </div>
     </el-dialog>
   </div>
@@ -28,7 +28,8 @@
 <script>
 import {
   getPurchaseProductConfirmInfo,
-  savePurchaseProductConfirm
+  savePurchaseProductConfirm,
+  allProductInWarehouse
 } from "@/api/purchaseManage/purchase"
 import CommonFormTableView from "@/components/makepager/CommonFormTableView"
 export default {
@@ -112,7 +113,7 @@
         }
       })
       if(pipeline){
-        await savePurchaseProductConfirm(arr).then((res)=>{
+        await savePurchaseProductConfirm(this.productTableList.tableData).then((res)=>{
           if(res.code===200){
             this.editConfig.visible=false
             this.$parent.getData()
@@ -124,7 +125,27 @@
       }
     },
     // 鍏ㄩ儴鍚堟牸鍏ュ簱
-    saveOkClickAll(){
+    async saveOkClickAll(){
+      let pipeline=false // 鏄惁鏈夊ぇ浜�0鐨勬敹璐ф暟閲�
+      // let rule1=false    // 鏈鏀惰揣鏄惁澶т簬鏈敹璐ф暟閲�
+      // let arr=[]
+      this.productTableList.tableData.map((item)=>{
+        if(item.nowReceiveAmount>0&&item.nowReceiveAmount<=item.notReceiveAmount){
+          pipeline=true
+          // arr.push(item)
+        }
+      })
+      if(pipeline){
+        await allProductInWarehouse(this.productTableList.tableData).then((res)=>{
+          if(res.code===200){
+            this.editConfig.visible=false
+            this.$parent.getData()
+            this.$message.success("纭鍏ュ簱璐ㄦ鎴愬姛锛�")
+          }
+        })
+      }else{
+        this.$message.warning("鏈鏀惰揣鏁伴噺涓嶈兘涓�0涓斾笉鑳借秴鍑烘湭鏀惰揣鏁伴噺 ")
+      }
 
     },
     saveParams() {

--
Gitblit v1.8.0