Browse Source

修改发料补料、备货

hella_online_20240829
lijuncheng 2 months ago
parent
commit
21231e4b42
  1. 6
      src/pages/issue/coms/comScanIssuePack.vue
  2. 32
      src/pages/repleinsh/coms/comScanReplishPack.vue
  3. 6
      src/pages/repleinsh/job/repleinshJob.vue
  4. 4
      src/pages/stockUp/coms/comScanStockUpPack.vue
  5. 71
      src/pages/stockUp/job/stockUpJobDetail.vue

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

@ -116,6 +116,9 @@
getWorkShopLineStation,
getBalanceByFilter
} from '@/api/request2.js';
import {
uniqueArray
} from '@/common/basic.js';
import {
calc
@ -242,7 +245,8 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
})
})
});
//
list = uniqueArray(list);
this.fromLocationCode = list[0];
return list;
},

32
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -110,6 +110,10 @@
calc
} from '@/common/calc.js';
import {
uniqueArray
} from '@/common/basic.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
@ -153,7 +157,7 @@
defaultValueList: [],
label: {},
fromInventoryStatuses: "",
packageInfo:{}
packageInfo: {}
}
},
created() {
@ -208,7 +212,10 @@
list.push(f.fromLocationCode)
})
})
//
list = uniqueArray(list);
this.fromLocationCode = list[0];
return list;
} else {
this.$refs.comMessage.showErrorMessages('需求库位【' + this.toLocationCode + '】不存在', res => {
@ -253,7 +260,7 @@
})
this.getBalance(result.label, packageInfo, balances => {
this.packageInfo =packageInfo;
this.packageInfo = packageInfo;
//
let s = '';
if (!result.package.parentNumber) {
@ -282,7 +289,7 @@
//
let subParentPackitems = balances.list.filter(r => r.packingNumber ==
packageInfo
.parentNumber&&r.locationCode==this.fromLocationCode)
.parentNumber && r.locationCode == this.fromLocationCode)
//
@ -290,11 +297,11 @@
//
if (subParentPackitems.length > 0) {
if(subParentPackitems.length==1){
if (subParentPackitems.length == 1) {
let balance = subParentPackitems[0];
balance.qty=packageInfo.qty;
balance.qty = packageInfo.qty;
this.afterGetBalance(result.label, balance, packageInfo);
}else {
} else {
this.showBalanceSelect(subParentPackitems);
}
@ -304,11 +311,12 @@
}
} else {
var locationCode = this.fromLocationCode
if(balances.list==1){
locationCode=balances.list[0].locationCode
}else {
var manyBlances = balances.list.filter(r=>r.locationCode!=this.fromLocationCode)
if(manyBlances.length>0){
if (balances.list == 1) {
locationCode = balances.list[0].locationCode
} else {
var manyBlances = balances.list.filter(r => r.locationCode != this
.fromLocationCode)
if (manyBlances.length > 0) {
locationCode = manyBlances[0].locationCode;
}
@ -411,7 +419,7 @@
},
selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance,this.packageInfo);
this.afterGetBalance(this.label, balance, this.packageInfo);
},
afterGetBalance(label, balance, packageInfo) {

6
src/pages/repleinsh/job/repleinshJob.vue

@ -287,13 +287,13 @@
filters: filters,
pageNo: 1,
pageSize: 100,
sort: 'fromLocationCode',
by: 'asc'
sort: 'number',
by: 'desc'
}
getRepleinshJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
that.showMessage('未查找到' + '【' + code + '】的补料任务');
} else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]);
}

4
src/pages/stockUp/coms/comScanStockUpPack.vue

@ -345,6 +345,10 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
'】的发货明细,是否要继续发货?', res => {
if (res) {
let batch = that.createBatchInfo(label, balance,packageInfo);
//details
if (fromLocation.Batchs.length > 0) {
batch.detail = fromLocation.Batchs[0].detail;
}
fromLocation.Batchs.unshift(batch);
}
})

71
src/pages/stockUp/job/stockUpJobDetail.vue

@ -80,6 +80,7 @@
getCurrDateTime,
getDirectoryItemArray,
getPackingNumberAndBatch,
deepCopyData
} from '@/common/basic.js';
import {
@ -274,6 +275,11 @@
submitJob() {
var params = this.setParams()
if (!params.subList || params.subList.length == 0) {
uni.hideLoading()
this.showErrorMessage("请扫描您需要提交的备货任务")
return
}
console.log("提交参数", JSON.stringify(params));
stockUpJobsubmit(params).then(res => {
@ -298,38 +304,41 @@
item.Locations.forEach(fromLocation => {
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
subItem.recordList = [];
if (batch.Records.length > 0) {
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.supplierCode = r.supplierCode;
//使
if (this.toLocationCode == null) {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;
} else {
var info = getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
record.toBatch = info.batch;
}
subItem.recordList.push(record);
})
subList.push(subItem);
if (subItem != undefined) {
subItem.recordList = [];
if (batch.Records.length > 0) {
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.supplierCode = r.supplierCode;
//使
if (this.toLocationCode == null) {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;
} else {
var info = getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
record.toBatch = info.batch;
}
subItem.recordList.push(record);
})
subList.push(deepCopyData(subItem));
}
}
})
})
})

Loading…
Cancel
Save