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. 11
      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 { getDetailOption, getDetailEditRemoveOption } from '@/common/array.js'
import { getWorkShopLineStation, getBalanceByFilter } from '@/api/request2.js' import { getWorkShopLineStation, getBalanceByFilter } from '@/api/request2.js'
import { uniqueArray } from '@/common/basic.js'
import { calc } from '@/common/calc.js' import { calc } from '@/common/calc.js'
@ -168,6 +169,8 @@ const getFromLocationList = () => {
}) })
}) })
//
list = uniqueArray(list)
fromLocationCode.value = list[0] fromLocationCode.value = list[0]
return list 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 { getWorkShopLineStation, getBalanceByFilter } from '@/api/request2.js'
import { calc } from '@/common/calc.js' import { calc } from '@/common/calc.js'
import { uniqueArray } from '@/common/basic.js'
import { getBalanceByManagementPrecision } from '@/common/balance.js' import { getBalanceByManagementPrecision } from '@/common/balance.js'
import { getDirectoryItemArray } from '../../../common/directory.js' import { getDirectoryItemArray } from '../../../common/directory.js'
@ -161,6 +162,8 @@ const getFromLocationList = () => {
list.push(f.fromLocationCode) list.push(f.fromLocationCode)
}) })
}) })
//
list = uniqueArray(list)
fromLocationCode.value = list[0] fromLocationCode.value = list[0]
return list return list
} }

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

@ -248,14 +248,14 @@ const getDataListByType = (code) => {
filters, filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
sort: 'fromLocationCode', sort: 'number',
by: 'asc' by: 'desc'
} }
getRepleinshJobList(params) getRepleinshJobList(params)
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
showMessage('未查找到' + `${code}】的收货任务`) showMessage('未查找到' + `${code}】的补料任务`)
} else if (res.data.list.length == 1) { } else if (res.data.list.length == 1) {
openJobDetail(res.data.list[0]) 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) addRecord(batch, label, balance, packageInfo)
} else { } else {
// //
if (this.jobContent.allowModifyPackingNumber == 'TRUE') { if (jobContent.value.allowModifyPackingNumber == 'TRUE') {
addRecord(batch, label, balance, packageInfo) addRecord(batch, label, balance, packageInfo)
} else { } else {
showErrorMessage(`未查找到该箱码【${packingCode}】的明细`, (res) => { showErrorMessage(`未查找到该箱码【${packingCode}】的明细`, (res) => {
@ -274,6 +274,10 @@ const afterGetBalance = (label, balance, packageInfo) => {
showQuestionMessage(`在【${fromLocationCode.value}】库位下,未查找到批次【${lot}】的发货明细,是否要继续发货?`, (res) => { showQuestionMessage(`在【${fromLocationCode.value}】库位下,未查找到批次【${lot}】的发货明细,是否要继续发货?`, (res) => {
if (res) { if (res) {
const batch = createBatchInfo(label, balance, packageInfo) const batch = 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

@ -53,7 +53,7 @@ import { goHome, navigateBack, getRemoveOption, getCurrDateTime, getDirectoryIte
import { getDataSource } from '@/pages/issue/js/issue.js' 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 jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -214,6 +214,11 @@ const submit = () => {
const submitJob = () => { const submitJob = () => {
const params = setParams() const params = setParams()
if (!params.subList || params.subList.length == 0) {
uni.hideLoading()
showErrorMessage('请扫描您需要提交的备货任务')
return
}
stockUpJobsubmit(params) stockUpJobsubmit(params)
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
@ -238,6 +243,7 @@ const setParams = () => {
item.Locations.forEach((fromLocation) => { item.Locations.forEach((fromLocation) => {
fromLocation.Batchs.forEach((batch) => { fromLocation.Batchs.forEach((batch) => {
const subItem = batch.detail || {} const 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) => {
@ -259,7 +265,8 @@ const setParams = () => {
} }
subItem.recordList.push(record) subItem.recordList.push(record)
}) })
subList1.push(subItem) subList1.push(deepCopyData(subItem))
}
} }
}) })
}) })

Loading…
Cancel
Save