Browse Source

修改发料补料、备货

hella_online_20240829
lijuncheng 4 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, getWorkShopLineStation,
getBalanceByFilter getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
uniqueArray
} from '@/common/basic.js';
import { import {
calc calc
@ -242,7 +245,8 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
}) })
}) })
}); });
//
list = uniqueArray(list);
this.fromLocationCode = list[0]; this.fromLocationCode = list[0];
return list; return list;
}, },

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

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

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

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

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

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

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

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

Loading…
Cancel
Save