Browse Source

原料直发

pda_nev
李俊城 7 months ago
parent
commit
7837a5158b
  1. 2
      fe/PDA/api/index.js
  2. 70
      fe/PDA/pages/store/deliverRaw.vue

2
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"
});

70
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 => {

Loading…
Cancel
Save