Browse Source

发料任务bug+新需求

hella_online_20240829
yufei0306 6 months ago
parent
commit
b132c5f890
  1. 5
      src/pages/deliver/record/deliverRecord.vue
  2. 18
      src/pages/issue/coms/comScanIssuePack.vue
  3. 28
      src/pages/issue/job/issueDetail.vue

5
src/pages/deliver/record/deliverRecord.vue

@ -114,10 +114,12 @@
customerText: "",
customerCode : "",
dataContent:{},
managementList:[]
managementList:[],
deliverType:''//CUSTTHIRD_PARTY
};
},
onLoad(option) {
this.deliverType = option.deliverType
var typeCode = "Deliver"
getBusinessType(typeCode, res => {
@ -375,6 +377,7 @@
this.dataContent.customerCode = this.customerCode;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
this.dataContent.deliverType = this.deliverType;
return this.dataContent;
},

18
src/pages/issue/coms/comScanIssuePack.vue

@ -436,6 +436,9 @@
addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo);
if(!batch.packingNumber){//bug-wyf
batch.packingNumber = label.packingNumber
}
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
@ -487,14 +490,17 @@
this.issueRecord.splice(index, 1)
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b
.batch == record.batch);
let rIndex = batch.Records.findIndex(r => r.packingNumber == record
.packingNumber && r
.batch == record.batch);
batch.Records.splice(rIndex, 1);
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b.batch == record.batch);
if(batch&&batch.Records&&batch.Records.length>0){
let rIndex = batch.Records.findIndex(r => r.packingNumber == record.packingNumber && r.batch == record.batch);
batch.Records.splice(rIndex, 1);
}
})
}
this.$emit('updateData', item);

28
src/pages/issue/job/issueDetail.vue

@ -243,11 +243,7 @@
// },
submit() {
let params = this.setParams()
if(!params.subList||params.subList.length==0){
this.showErrorMessage("请扫描您需要提交的发料任务")
return
}
uni.showLoading({
title: "提交中....",
mask: true
@ -264,13 +260,13 @@
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
// this.submitJob();
this.submitJob();
} else {
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
// this.submitJob();
this.submitJob();
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
@ -281,6 +277,11 @@
submitJob() {
var params = this.setParams()
if(!params.subList||params.subList.length==0){
uni.hideLoading()
this.showErrorMessage("请扫描您需要提交的发料任务")
return
}
console.log("提交参数", JSON.stringify(params));
issueJobSubmit(params).then(res => {
@ -342,8 +343,8 @@
// .packingNumber;
// record.toBatch = r.batch;
// } else {
var info =
getPackingNumberAndBatch(
debugger
var info = getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
@ -399,15 +400,18 @@
},
updateData(record) {
console.log('updateData',record)
console.log('this.detailSource',this.detailSource)
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode);
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode);
let itemHandleQty = 0;
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b
.packingNumber == null || b.packingNumber == '') && b.batch ==
record.batch);
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b.packingNumber == null || b.packingNumber == '') && b.batch == record.batch);
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty = calc.add(handleQty,res.qty)

Loading…
Cancel
Save