diff --git a/src/common/scan.js b/src/common/scan.js new file mode 100644 index 00000000..d4ddbfdb --- /dev/null +++ b/src/common/scan.js @@ -0,0 +1,29 @@ +import { + getLabelInfo +} from '@/common/label.js'; + +// export function getLabelInfoResult(scanMsg, headerType callBackInfo) { +// let index = scanMsg.indexOf('\n'); +// if (index >= 0) { +// // let content = uni.$u.trim(scanMsg) +// let content = scanMsg +// if (content == "") { +// return "" +// } + +// getLabelInfo(content, headerType, callback => { +// let scanResult = callback; +// scanResult.scanMessage = content +// if (scanResult.success) { +// return scanResult +// } else { +// return "" +// } +// }); + +// } +// } + +export function getLabelInfoResult(){ + +} diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue index d1a63a06..09c1de3c 100644 --- a/src/pages/issue/coms/comScanIssuePack.vue +++ b/src/pages/issue/coms/comScanIssuePack.vue @@ -61,6 +61,7 @@ import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import { getDetailOption, getDetailEditRemoveOption } from '@/common/array.js' import { getWorkShopLineStation, getBalanceByFilter } from '@/api/request2.js' +import { uniqueArray } from '@/common/basic.js' import { calc } from '@/common/calc.js' @@ -168,6 +169,8 @@ const getFromLocationList = () => { }) }) + // 去掉重复库位 + list = uniqueArray(list) fromLocationCode.value = list[0] return list } diff --git a/src/pages/repleinsh/coms/comScanReplishPack.vue b/src/pages/repleinsh/coms/comScanReplishPack.vue index 76d9b51a..be725b62 100644 --- a/src/pages/repleinsh/coms/comScanReplishPack.vue +++ b/src/pages/repleinsh/coms/comScanReplishPack.vue @@ -79,6 +79,7 @@ import { getDetailOption, getDetailEditRemoveOption, getDetailGiveupOption } fro import { getWorkShopLineStation, getBalanceByFilter } from '@/api/request2.js' import { calc } from '@/common/calc.js' +import { uniqueArray } from '@/common/basic.js' import { getBalanceByManagementPrecision } from '@/common/balance.js' import { getDirectoryItemArray } from '../../../common/directory.js' @@ -161,6 +162,8 @@ const getFromLocationList = () => { list.push(f.fromLocationCode) }) }) + // 去掉重复库位 + list = uniqueArray(list) fromLocationCode.value = list[0] return list } diff --git a/src/pages/repleinsh/job/repleinshJob.vue b/src/pages/repleinsh/job/repleinshJob.vue index 9cf46dd0..0cf725be 100644 --- a/src/pages/repleinsh/job/repleinshJob.vue +++ b/src/pages/repleinsh/job/repleinshJob.vue @@ -248,14 +248,14 @@ const getDataListByType = (code) => { 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) { - showMessage('未查找到' + `【${code}】的收货任务`) + showMessage('未查找到' + `【${code}】的补料任务`) } else if (res.data.list.length == 1) { openJobDetail(res.data.list[0]) } diff --git a/src/pages/stockUp/coms/comScanStockUpPack.vue b/src/pages/stockUp/coms/comScanStockUpPack.vue index 2bcf273b..c6268324 100644 --- a/src/pages/stockUp/coms/comScanStockUpPack.vue +++ b/src/pages/stockUp/coms/comScanStockUpPack.vue @@ -254,7 +254,7 @@ const afterGetBalance = (label, balance, packageInfo) => { addRecord(batch, label, balance, packageInfo) } else { // 允许修改箱码 - if (this.jobContent.allowModifyPackingNumber == 'TRUE') { + if (jobContent.value.allowModifyPackingNumber == 'TRUE') { addRecord(batch, label, balance, packageInfo) } else { showErrorMessage(`未查找到该箱码【${packingCode}】的明细`, (res) => { @@ -274,6 +274,10 @@ const afterGetBalance = (label, balance, packageInfo) => { showQuestionMessage(`在【${fromLocationCode.value}】库位下,未查找到批次【${lot}】的发货明细,是否要继续发货?`, (res) => { if (res) { const batch = createBatchInfo(label, balance, packageInfo) + // 新增加的批次赋值details + if (fromLocation.Batchs.length > 0) { + batch.detail = fromLocation.Batchs[0].detail + } fromLocation.Batchs.unshift(batch) } }) diff --git a/src/pages/stockUp/job/stockUpJobDetail.vue b/src/pages/stockUp/job/stockUpJobDetail.vue index 13cf547b..35d322f5 100644 --- a/src/pages/stockUp/job/stockUpJobDetail.vue +++ b/src/pages/stockUp/job/stockUpJobDetail.vue @@ -53,7 +53,7 @@ import { goHome, navigateBack, getRemoveOption, getCurrDateTime, getDirectoryIte import { getDataSource } from '@/pages/issue/js/issue.js' -import { getManagementPrecisions } from '@/common/balance.js' +import { getManagementPrecisions, deepCopyData } from '@/common/balance.js' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue' @@ -214,6 +214,11 @@ const submit = () => { const submitJob = () => { const params = setParams() + if (!params.subList || params.subList.length == 0) { + uni.hideLoading() + showErrorMessage('请扫描您需要提交的备货任务') + return + } stockUpJobsubmit(params) .then((res) => { uni.hideLoading() @@ -238,28 +243,30 @@ const setParams = () => { item.Locations.forEach((fromLocation) => { fromLocation.Batchs.forEach((batch) => { const subItem = batch.detail || {} - subItem.recordList = [] - if (batch.Records.length > 0) { - batch.Records.forEach((r) => { - const record = {} - record.handleQty = r.qty - record.toContainerNumber = r.ContainerNumber - record.toInventoryStatus = r.inventoryStatus - record.toLocationCode = subItem.toLocationCode - record.supplierCode = r.supplierCode + if (subItem != undefined) { + subItem.recordList = [] + if (batch.Records.length > 0) { + batch.Records.forEach((r) => { + const record = {} + record.handleQty = r.qty + record.toContainerNumber = r.ContainerNumber + record.toInventoryStatus = r.inventoryStatus + record.toLocationCode = subItem.toLocationCode + record.supplierCode = r.supplierCode - // 使用在途库不改变管理模式 - if (toLocationCode.value == null) { - record.toPackingNumber = r.packingNumber - record.toBatch = r.batch - } else { - const info = getPackingNumberAndBatch(managementList.value, r.itemCode, r.packingNumber, r.batch) - record.toPackingNumber = info.packingNumber - record.toBatch = info.batch - } - subItem.recordList.push(record) - }) - subList1.push(subItem) + // 使用在途库不改变管理模式 + if (toLocationCode.value == null) { + record.toPackingNumber = r.packingNumber + record.toBatch = r.batch + } else { + const info = getPackingNumberAndBatch(managementList.value, r.itemCode, r.packingNumber, r.batch) + record.toPackingNumber = info.packingNumber + record.toBatch = info.batch + } + subItem.recordList.push(record) + }) + subList1.push(deepCopyData(subItem)) + } } }) })