From 3c1700c64825fa92e0a529d92d4e0976e25b5da5 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期日, 28 四月 2024 18:03:41 +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