Browse Source

修改发料补料、备货

hella_online_20240829
lijuncheng 4 months ago
parent
commit
21231e4b42
  1. 6
      src/pages/issue/coms/comScanIssuePack.vue
  2. 10
      src/pages/repleinsh/coms/comScanReplishPack.vue
  3. 6
      src/pages/repleinsh/job/repleinshJob.vue
  4. 4
      src/pages/stockUp/coms/comScanStockUpPack.vue
  5. 11
      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;
}, },

10
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';
@ -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 => {
@ -307,7 +314,8 @@
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
.fromLocationCode)
if (manyBlances.length > 0) { if (manyBlances.length > 0) {
locationCode = manyBlances[0].locationCode; locationCode = manyBlances[0].locationCode;
} }

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);
} }
}) })

11
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,6 +304,7 @@
item.Locations.forEach(fromLocation => { item.Locations.forEach(fromLocation => {
fromLocation.Batchs.forEach(batch => { fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail; let subItem = batch.detail;
if (subItem != undefined) {
subItem.recordList = []; subItem.recordList = [];
if (batch.Records.length > 0) { if (batch.Records.length > 0) {
batch.Records.forEach(r => { batch.Records.forEach(r => {
@ -328,8 +335,10 @@
} }
subItem.recordList.push(record); subItem.recordList.push(record);
}) })
subList.push(subItem); subList.push(deepCopyData(subItem));
} }
}
}) })
}) })
}) })

Loading…
Cancel
Save