Browse Source

修改发料补料、备货2024/7/19 19:20:40

hella_vue3
zhang_li 3 months ago
parent
commit
4ec6b3e2cd
  1. 29
      src/common/scan.js
  2. 3
      src/pages/issue/coms/comScanIssuePack.vue
  3. 3
      src/pages/repleinsh/coms/comScanReplishPack.vue
  4. 6
      src/pages/repleinsh/job/repleinshJob.vue
  5. 6
      src/pages/stockUp/coms/comScanStockUpPack.vue
  6. 51
      src/pages/stockUp/job/stockUpJobDetail.vue

29
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(){
}

3
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
}

3
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
}

6
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])
}

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

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

Loading…
Cancel
Save