Browse Source

YT-2361ASN订单采购收货,使用PDA采购收货时,扫描箱标签达到1千时,系统PDA卡死,需要产品重新修改方案。

intex_online20250418
张立 2 weeks ago
parent
commit
8e9c312ad9
  1. 196
      src/pages/purchaseReceipt/job/purchaseReceiptAsn.vue

196
src/pages/purchaseReceipt/job/purchaseReceiptAsn.vue

@ -14,7 +14,7 @@
</view>
<view class="page-footer" v-if="jobList.length>0">
<button class="btn_single_clear" hover-class="btn_commit_after" @click="clearAll">清空</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit" :disabled="ishsowLoading">提交</button>
</view>
<receipt-info-popup ref='jobInfoPopup'></receipt-info-popup>
<receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup>
@ -69,6 +69,7 @@
jobList: [],
detailOptions: [],
detailRemoveOption: [],
ishsowLoading:false
};
},
onShow() {},
@ -82,6 +83,7 @@
this.$nextTick(()=>{
this.openScanPopup()
})
// this.getList()
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@ -275,12 +277,9 @@
}
}).catch(error => {
this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
this.scanPopupGetFocus()
})
} catch (e) {
this.showMessage(e.message)
this.scanPopupGetFocus()
}
},
calcHandleQty(detailSource) {
@ -388,48 +387,103 @@
}
},
commit(){
let str =''
let str1 =''
//
showTableData () {
return this.jobList.slice(0,9)
},
//
getList(type) {
let that = this;
this.loadingType = "loading";
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
getPurchaseReceiptASNJobList({
filters: filters,
pageNo: 1,
pageSize: 50,
}).then(async res => {
let resultList = res.data.list;
resultList.forEach(item=>{
item.scaned=true
item.packageDOS.forEach(cur=>{
cur.scaned=true
})
})
this.jobList = [...resultList,...resultList,...resultList,...resultList,...resultList,...resultList,...resultList,...resultList,...resultList,...resultList]
let k=0
this.jobList.forEach(item=>{
item.packageDOS.forEach(cur=>{
cur.scaned=true
k++
})
})
console.log(3444,k)
}).catch(error => {
})
},
getParams(){
this.params = []
let obj = {}
let obj1 = {}
let count = 0
let kkkkk=0
console.log(99,this.jobList)
this.jobList.forEach(item=>{
if(item.scaned){
count++
obj = {...item}
obj.id = item.masterId
let isHaveObj = this.params.find(i => i.asnNumber == item.asnNumber)
if(isHaveObj){
console.log(22,isHaveObj)
item.packageDOS.forEach(cur=>{
if(cur.scaned){
obj1 = {
...cur,
...item,
packingNumber:cur.number,
number:'',
deliNo:item.deliNo,
// ...cur,
// ...item,item
id: item.id,
arriveDate: item.arriveDate,
produceDate: cur.produceDate,
expireDate: cur.expireDate,
inventoryStatus: item.inventoryStatus,
toLocationCode: cur.toLocationCode,
poNumber: cur.poNumber,
poLine: cur.poLine,
packQty:cur.packQty,
packUnit:cur.packUnit,
qty:item.qty,
orderQty:item.orderQty,
uom:item.uom,
supplierQty:item.supplierQty,
supplierUom:item.supplierUom,
convertRate:cur.convertRate,
jobDetailId: cur.detailId,
itemCode:item.itemCode,
itemDesc:item.itemDesc,
itemName:item.itemName,
itemDesc1:item.itemDesc1,
itemDesc2:item.itemDesc2,
masterId:item.id,
number:'',
projectCode:item.projectCode,
fromOwnerCode:item.fromOwnerCode,
toOwnerCode:item.toOwnerCode,
packingNumber:cur.number,
parentPackingNumber:item.parentPackingNumber,
poLineType:item.poLineType,
tenantId:cur.tenantId,
sourceType:item.sourceType,
deliNo:item.deliNo,
itemName:item.itemName,
backNumber:item.backNumber,
packQty:cur.packQty,
packUnit:cur.packUnit,
purchaseQty:cur.purchaseQty,
purchaseStdQty:cur.purchaseStdQty,
purchaseUom:cur.purchaseUom,
qty:item.qty,
remark:cur.remark,
supplierBatch:cur.supplierBatch,
supplierCode:cur.supplierCode,
toLocationCode:item.toLocationCode,
uom:item.uom,
handleQty:cur.handleQty,
qty:item.qty,
}
isHaveObj.subList.push(obj1)
}
@ -439,53 +493,109 @@
item.packageDOS.forEach(cur=>{
if(cur.scaned){
obj1 = {
...cur,
...item,
packingNumber:cur.number,
number:'',
deliNo:item.deliNo,
// ...cur,
// ...item,
// packingNumber:cur.number,
// number:'',
// deliNo:item.deliNo,
// itemCode:item.itemCode,
// itemDesc:item.itemDesc,
// itemDesc1:item.itemDesc1,
// itemDesc2:item.itemDesc2,
// itemName:item.itemName,
// backNumber:item.backNumber,
// packQty:cur.packQty,
// packUnit:cur.packUnit,
// purchaseQty:cur.purchaseQty,
// purchaseStdQty:cur.purchaseStdQty,
// purchaseUom:cur.purchaseUom,
// qty:item.qty,
// remark:cur.remark,
// supplierBatch:cur.supplierBatch,
// supplierCode:cur.supplierCode,
// toLocationCode:item.toLocationCode,
// uom:item.uom,
// handleQty:cur.handleQty,
// qty:item.qty,
id: item.id,
arriveDate: item.arriveDate,
produceDate: cur.produceDate,
expireDate: cur.expireDate,
inventoryStatus: item.inventoryStatus,
toLocationCode: cur.toLocationCode,
poNumber: cur.poNumber,
poLine: cur.poLine,
packQty:cur.packQty,
packUnit:cur.packUnit,
qty:item.qty,
orderQty:item.orderQty,
uom:item.uom,
supplierQty:item.supplierQty,
supplierUom:item.supplierUom,
convertRate:cur.convertRate,
jobDetailId: cur.detailId,
itemCode:item.itemCode,
itemDesc:item.itemDesc,
itemName:item.itemName,
itemDesc1:item.itemDesc1,
itemDesc2:item.itemDesc2,
number:'',
projectCode:item.projectCode,
fromOwnerCode:item.fromOwnerCode,
toOwnerCode:item.toOwnerCode,
packingNumber:cur.number,
parentPackingNumber:item.parentPackingNumber,
poLineType:item.poLineType,
tenantId:cur.tenantId,
sourceType:item.sourceType,
deliNo:item.deliNo,
itemName:item.itemName,
backNumber:item.backNumber,
packQty:cur.packQty,
packUnit:cur.packUnit,
purchaseQty:cur.purchaseQty,
purchaseStdQty:cur.purchaseStdQty,
purchaseUom:cur.purchaseUom,
qty:item.qty,
remark:cur.remark,
supplierBatch:cur.supplierBatch,
supplierCode:cur.supplierCode,
toLocationCode:item.toLocationCode,
uom:item.uom,
handleQty:cur.handleQty,
qty:item.qty,
}
obj.subList.push(obj1)
}
})
console.log(obj)
this.params.push(obj)
}
}
if(item.handleQty>0 && item.handleQty < item.qty){
str += `ASN单号【${item.asnNumber}】物料代码【${item.itemCode}】实际收货数量【${item.handleQty}】小于任务数量【${item.qty}】,\n`
}
if(!item.handleQty){
str1 += `ASN单号【${item.asnNumber}】物料代码【${item.itemCode}】实际收货数量为0,\n`
}
})
})
this.params.forEach(item=>{
delete item.packageDOS
item.subList.forEach(cur=>{
kkkkk++
delete cur.packageDOS,
delete item.masterId
})
})
console.log('count:'+kkkkk)
return this.params
},
commit(){
let str =''
let str1 =''
let count = 0
if(this.ishsowLoading)return;
this.ishsowLoading =true
this.jobList.forEach(item=>{
if(item.scaned){
count++
}
if(item.handleQty>0 && item.handleQty < item.qty){
str += `ASN单号【${item.asnNumber}】物料代码【${item.itemCode}】实际收货数量【${item.handleQty}】小于任务数量【${item.qty}】,\n`
}
if(!item.handleQty){
str1 += `ASN单号【${item.asnNumber}】物料代码【${item.itemCode}】实际收货数量为0,\n`
}
})
if(count == 0){
this.$refs.comMessage.showMessage('扫描数量为0,请先扫描')
return
@ -502,6 +612,7 @@
if (res) {
this.submitJob()
}
this.ishsowLoading =false
});
}else{
this.submitJob()
@ -512,7 +623,9 @@
title: "加载中....",
mask: true
});
purchaseReceiptJobSubmitASN(this.params).then(res => {
const params1 = this.getParams()
console.log(99,JSON.stringify(params1))
purchaseReceiptJobSubmitASN(params1).then(res => {
if (res.data) {
// this.showCommitSuccessMessage("\n\n" + res.data)
let str =''
@ -525,6 +638,7 @@
}
})
uni.hideLoading()
this.ishsowLoading =false
if(str){
this.showCommitSuccessMessage(str+str1)
}else{

Loading…
Cancel
Save