From 7837a5158b761e8fdb50af87127adc78fc1ed744 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Wed, 30 Oct 2024 21:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=9F=E6=96=99=E7=9B=B4=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PDA/api/index.js | 2 +- fe/PDA/pages/store/deliverRaw.vue | 70 ++++++++++++++++++++++++------- 2 files changed, 55 insertions(+), 17 deletions(-) diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js index fa84f94ee..7253e3d32 100644 --- a/fe/PDA/api/index.js +++ b/fe/PDA/api/index.js @@ -1119,7 +1119,7 @@ export const rawDeliver = (params) => request( //原料直发 校验物品价格 export const rawDeliverCheckPrice = (params) => request( - devUrl + "/api/pda/SalePriceSheet/get-list-by-itemcode-and-customercoder", { // + devUrl + "/api/pda/SalePriceSheet/get-list-by-itemcode-and-customercode", { // data: params, method: "post" }); diff --git a/fe/PDA/pages/store/deliverRaw.vue b/fe/PDA/pages/store/deliverRaw.vue index 8017c814a..24e745e43 100644 --- a/fe/PDA/pages/store/deliverRaw.vue +++ b/fe/PDA/pages/store/deliverRaw.vue @@ -62,6 +62,7 @@ getBalancesByFilter, rawDeliver, getCustomerAddressBycustomerCodeAsync, + rawDeliverCheckPrice } from '@/api/index.js'; import { @@ -401,24 +402,13 @@ this.customerAddress = null; this.customerAddressCode = '' }, - - submit() { - let that = this; - if (that.itemList.length === 0) { - this.showMessage('请扫描要发料的零件'); - return; - } - - if (that.customerAddress == null && that.toLocation == null) { - this.showMessage('请扫描客户地址代码'); - return; - } - + + submitData(){ uni.showLoading({ title: "提交中....", mask: true }); - + var that =this; let item = { customerCode: that.customerAddress.customerCode, customerAddressCode: that.customerAddressCode, @@ -435,7 +425,7 @@ warehouseCode: localStorage.warehouseCode, details: [] } - + that.itemList.forEach(i => { i.labelList.forEach(r => { r.toLocationCode = that.toLocation.code; @@ -453,7 +443,7 @@ item.details.push(r); }) }) - + let params = JSON.stringify(item); console.log('params', params); rawDeliver(params) @@ -468,6 +458,54 @@ }); }, + submit() { + let that = this; + if (that.itemList.length === 0) { + this.showMessage('请扫描要发料的零件'); + return; + } + + if (that.customerAddress == null && that.toLocation == null) { + this.showMessage('请扫描客户地址代码'); + return; + } + + uni.showLoading({ + title: "提交中....", + mask: true + }); + + var paramPrice =[] + + this.itemList.forEach(item=>{ + paramPrice.push({ + itemCode:item.itemCode, + customerCode:this.customerAddress.customerCode + }) + + }) + + rawDeliverCheckPrice(paramPrice).then(res=>{ + uni.hideLoading(); + showConfirmMsg("是否提交?\n"+res,call=>{ + if(call){ + that.submitData() + } + }) + }).catch(err=>{ + that.showMessage(err.message); + uni.hideLoading(); + }) + + return; + + + + + }, + + + cancel() { let that = this; showConfirmMsg('是否要清空已扫描的零件和客户地址信息?', confirm => {