From a99b4aeb7e61be31a7dad81719a4e2102b284963 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期二, 26 三月 2024 09:50:17 +0800 Subject: [PATCH] 采购管理:到货确认添加全部合格入库 --- src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue | 29 +++++++++++++++++++++++++---- 1 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue b/src/views/purchaseManage/purchase/components/ArrivalConfirmation.vue index e2698a9..7b9476a 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 { @@ -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