|
@ -62,6 +62,7 @@ |
|
|
getBalancesByFilter, |
|
|
getBalancesByFilter, |
|
|
rawDeliver, |
|
|
rawDeliver, |
|
|
getCustomerAddressBycustomerCodeAsync, |
|
|
getCustomerAddressBycustomerCodeAsync, |
|
|
|
|
|
rawDeliverCheckPrice |
|
|
} from '@/api/index.js'; |
|
|
} from '@/api/index.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -401,24 +402,13 @@ |
|
|
this.customerAddress = null; |
|
|
this.customerAddress = null; |
|
|
this.customerAddressCode = '' |
|
|
this.customerAddressCode = '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submit() { |
|
|
submitData(){ |
|
|
let that = this; |
|
|
|
|
|
if (that.itemList.length === 0) { |
|
|
|
|
|
this.showMessage('请扫描要发料的零件'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (that.customerAddress == null && that.toLocation == null) { |
|
|
|
|
|
this.showMessage('请扫描客户地址代码'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
|
|
|
var that =this; |
|
|
let item = { |
|
|
let item = { |
|
|
customerCode: that.customerAddress.customerCode, |
|
|
customerCode: that.customerAddress.customerCode, |
|
|
customerAddressCode: that.customerAddressCode, |
|
|
customerAddressCode: that.customerAddressCode, |
|
@ -435,7 +425,7 @@ |
|
|
warehouseCode: localStorage.warehouseCode, |
|
|
warehouseCode: localStorage.warehouseCode, |
|
|
details: [] |
|
|
details: [] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
that.itemList.forEach(i => { |
|
|
that.itemList.forEach(i => { |
|
|
i.labelList.forEach(r => { |
|
|
i.labelList.forEach(r => { |
|
|
r.toLocationCode = that.toLocation.code; |
|
|
r.toLocationCode = that.toLocation.code; |
|
@ -453,7 +443,7 @@ |
|
|
item.details.push(r); |
|
|
item.details.push(r); |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
let params = JSON.stringify(item); |
|
|
let params = JSON.stringify(item); |
|
|
console.log('params', params); |
|
|
console.log('params', params); |
|
|
rawDeliver(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() { |
|
|
cancel() { |
|
|
let that = this; |
|
|
let that = this; |
|
|
showConfirmMsg('是否要清空已扫描的零件和客户地址信息?', confirm => { |
|
|
showConfirmMsg('是否要清空已扫描的零件和客户地址信息?', confirm => { |
|
|