Browse Source

任务列表直接扫描2024/6/18 19:52:55

pull/1/head
张立 7 months ago
parent
commit
394d381373
  1. 3
      src/mycomponents/scan/winComScan.vue
  2. 8
      src/mycomponents/scan/winScanPack.vue
  3. 10
      src/mycomponents/scan/winScanPackAndLocation.vue
  4. 4
      src/pages/issue/job/issueDetail.vue
  5. 2
      src/pages/pointPutawayJob/index.vue
  6. 65
      src/pages/productPutaway/job/productPutawayDetail.vue
  7. 10
      src/pages/productReceipt/job/productReceiptDetail.vue
  8. 15
      src/pages/purchaseReceipt/job/receiptDetail.vue
  9. 5
      src/pages/putaway/job/putawayDetail.vue

3
src/mycomponents/scan/winComScan.vue

@ -228,7 +228,8 @@ defineExpose({
clearScanValue, clearScanValue,
clear, clear,
clickScanMsg, clickScanMsg,
losefocus losefocus,
setItemCodeSimulate
}) })
</script> </script>
<script module="textarea" lang="renderjs"> <script module="textarea" lang="renderjs">

8
src/mycomponents/scan/winScanPack.vue

@ -61,10 +61,14 @@ const closeScanPopup = () => {
} }
const scanClick = () => { const scanClick = () => {
comscan.value.clickScanMsg() if (comscan.value) {
comscan.value.clickScanMsg()
}
} }
const cancelClick = () => { const cancelClick = () => {
comscan.value.clearScanValue() if (comscan.value) {
comscan.value.clearScanValue()
}
} }
const getScanResult = (result) => { const getScanResult = (result) => {

10
src/mycomponents/scan/winScanPackAndLocation.vue

@ -165,6 +165,8 @@ const openScanPopupForJobSimulate = (fromLocationCodeParams, fromLocationListPar
if (timer) { if (timer) {
clearTimeout(timer) clearTimeout(timer)
} }
comscansimulate.value.setItemCodeSimulate(item.copyContent)
comscansimulate.value.clickScanMsg()
}, 500) }, 500)
} }
const closeScanPopup = (content) => { const closeScanPopup = (content) => {
@ -331,7 +333,9 @@ const selectBalanceItem = (balance) => {
// //
const countCallBack = (datas) => { const countCallBack = (datas) => {
comscan.value.clear() if (comscan.value) {
comscan.value.clear()
}
// //
const data = { const data = {
label: scanResult.value.label, label: scanResult.value.label,
@ -345,7 +349,9 @@ const countCallBack = (datas) => {
} }
const packCallBack = (item) => { const packCallBack = (item) => {
comscan.value.clear() if (comscan.value) {
comscan.value.clear()
}
// //
const data = { const data = {
label: scanResult.value.label, label: scanResult.value.label,

4
src/pages/issue/job/issueDetail.vue

@ -39,7 +39,7 @@ import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { takeIssueJob, cancleTakeIssueJob, getIssueJobDetail, issueJobSubmit } from '@/api/request2.js' import { takeIssueJob, cancleTakeIssueJob, getIssueJobDetail, issueJobSubmit } from '@/api/request2.js'
import { goHome, navigateBack, getRemoveOption, getCurrDateTime, getDirectoryItemArray, getPackingNumberAndBatch } from '@/common/basic.js' import { goHome, navigateBack, getRemoveOption, getCurrDateTime, getDirectoryItemArray, getPackingNumberAndBatch, deepCopyData } from '@/common/basic.js'
import { getDataSource } from '@/pages/issue/js/issue.js' import { getDataSource } from '@/pages/issue/js/issue.js'
@ -254,7 +254,7 @@ const setParams = () => {
} }
subItem.recordList.push(record) subItem.recordList.push(record)
}) })
subList.push(subItem) subList.push(deepCopyData(subItem))
} }
} }
}) })

2
src/pages/pointPutawayJob/index.vue

@ -217,7 +217,7 @@ export default {
<td>${cur.batch}</td> <td>${cur.batch}</td>
<td>${cur.packingNumber}</td> <td>${cur.packingNumber}</td>
<td>${cur.packUnit}</td> <td>${cur.packUnit}</td>
<td>${cur.packQty}</td> <td>${cur.qty}</td>
<td>${cur.uom}</td> <td>${cur.uom}</td>
</tr> </tr>
` `

65
src/pages/productPutaway/job/productPutawayDetail.vue

@ -78,6 +78,7 @@ const type = ref('')
const isCheckLocation = ref(false) const isCheckLocation = ref(false)
const switchCode = ref('') const switchCode = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
const status = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanLocation = ref() const comScanLocation = ref()
const detailInfoPopupRef = ref() const detailInfoPopupRef = ref()
@ -86,6 +87,7 @@ onLoad((option) => {
id.value = option.id id.value = option.id
type.value = option.type type.value = option.type
scanedPackingNumber.value = option.scaned || '' scanedPackingNumber.value = option.scaned || ''
status.value = option.status || ''
if (type.value == 'predict') { if (type.value == 'predict') {
switchCode.value = 'SemiPutawayLocationCodeValidate' switchCode.value = 'SemiPutawayLocationCodeValidate'
updateTitle('预生产上架任务') updateTitle('预生产上架任务')
@ -93,9 +95,11 @@ onLoad((option) => {
switchCode.value = 'FgPutawayLocationCodeValidate' switchCode.value = 'FgPutawayLocationCodeValidate'
updateTitle('装配上架任务') updateTitle('装配上架任务')
} }
})
onShow(() => {
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (status.value == '1') {
receive((callback) => { receive((callback) => {
getDetail() getDetail()
}) })
@ -155,22 +159,21 @@ const getDetail = () => {
fromLocationCode.value = subList.value[0].fromLocationCode fromLocationCode.value = subList.value[0].fromLocationCode
jobToLocationCode.value = subList.value[0].toLocationCode jobToLocationCode.value = subList.value[0].toLocationCode
detailSource.value = getDataSource(subList.value) detailSource.value = getDataSource(subList.value)
isCheckLocation.value = getSwitchInfoByCode(that.switchCode)
if (isCheckLocation.value) {
toLocationCode.value = ''
} else {
toLocationCode.value = jobToLocationCode.value
}
detailSource.value.forEach((r) => { detailSource.value.forEach((r) => {
r.subList.forEach((s) => { r.subList.forEach((s) => {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true s.scaned = true
s.handleQty = s.qty s.cancleScanedHiht = true
openScanPopupSimulate(s)
} }
}) })
}) })
toLocationAreaTypeList.value = getLocationTypeArray(jobContent.value.toAreaTypes)
isCheckLocation.value = getSwitchInfoByCode(switchCode.value)
if (isCheckLocation.value) {
toLocationCode.value = ''
} else {
toLocationCode.value = jobToLocationCode.value
}
uni.hideLoading()
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -198,6 +201,25 @@ const updateData = () => {
const openDetail = (item) => { const openDetail = (item) => {
detailInfoPopupRef.value.openPopup(item) detailInfoPopupRef.value.openPopup(item)
} }
const openScanPopupSimulate = (item) => {
let fromlocationCode = ''
const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) {
const item = detailSource.value[i]
item.subList.forEach((l) => {
//
const location = fromlocationList.find((res) => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode)
}
//
if (fromlocationCode == '') {
fromlocationCode = l.fromLocationCode
}
})
}
scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item)
}
const openScanPopup = () => { const openScanPopup = () => {
let fromlocationCode = '' let fromlocationCode = ''
const fromlocationList = [] const fromlocationList = []
@ -241,28 +263,11 @@ const getScanResult = (result) => {
}) })
if (itemDetail == undefined) { if (itemDetail == undefined) {
showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】不在列表中`) showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】不在列表中`)
} else if (itemDetail.scaned) { } else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】已经扫描`) showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】已经扫描`)
} else { } else {
// addDetail(itemDetail, result) addDetail(itemDetail, result)
// return return
//
const itemStatus = getInventoryStatusName(itemDetail.inventoryStatus)
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus)
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
// if (jobContent.value.allowModifyInventoryStatus == 'TRUE') {
showQuestionMessage(`实际库存状态[${balanceStatus}]与推荐库存状态[${itemStatus}]不一致,是否继续上架?`, (res) => {
if (res) {
addDetail(itemDetail, result)
} else {
scanPopupGetFocus()
}
})
// }
}
// else {
// addDetail(itemDetail, result)
// }
} }
} }
} catch (e) { } catch (e) {

10
src/pages/productReceipt/job/productReceiptDetail.vue

@ -101,15 +101,19 @@ const managementList = ref([])
const jobStatus = ref('') const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
const status = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanLocation = ref() const comScanLocation = ref()
const comMessageRef = ref() const comMessageRef = ref()
onLoad((option) => { onLoad((option) => {
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned || '' scanedPackingNumber.value = option.scaned || ''
status.value = option.status || ''
})
onShow(() => {
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (status.value == '1') {
receive((callback) => { receive((callback) => {
getDetail() getDetail()
}) })
@ -180,6 +184,8 @@ const getDetail = () => {
r.subList.forEach((s) => { r.subList.forEach((s) => {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true s.scaned = true
s.cancleScanedHiht = true
s.copyContent = `HMQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}`
scanPopup.value.simulateScan(s) scanPopup.value.simulateScan(s)
// s.handleQty = s.qty // s.handleQty = s.qty
} }
@ -208,7 +214,7 @@ const getScanResult = (result) => {
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch) const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch)
if (itemDetail == undefined) { if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`)
} else if (itemDetail.scaned) { } else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`)
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true

15
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -90,6 +90,7 @@ const jobStatus = ref('')
const isAllReceived = ref(false) const isAllReceived = ref(false)
const operation = ref('') const operation = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
const status = ref('')
const comMessageRef = ref() const comMessageRef = ref()
const locationCompareRef = ref() const locationCompareRef = ref()
const scanPopup = ref() const scanPopup = ref()
@ -98,10 +99,14 @@ const count = ref(0)
onLoad((option) => { onLoad((option) => {
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned || '' scanedPackingNumber.value = option.scaned || ''
status.value = option.status || ''
operation.value = option.operation operation.value = option.operation
})
onShow(() => {
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (status.value == '1') {
receive((callback) => { receive((callback) => {
getDetail() getDetail()
}) })
@ -174,6 +179,8 @@ const getDetail = () => {
r.subList.forEach((s) => { r.subList.forEach((s) => {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true s.scaned = true
s.cancleScanedHiht = true
s.copyContent = `HPQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}`
scanPopup.value.simulateScan(s) scanPopup.value.simulateScan(s)
} }
}) })
@ -203,7 +210,7 @@ const getScanResult = (result) => {
var itemDetail = detail.subList.filter((r) => r.containerNumber == containerNumber) var itemDetail = detail.subList.filter((r) => r.containerNumber == containerNumber)
if (itemDetail.length == 0) { if (itemDetail.length == 0) {
showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】不在列表中`) showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】不在列表中`)
} else if (itemDetail[0].scaned) { } else if (!itemDetail[0].cancleScanedHiht && itemDetail[0].scaned) {
showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】已经扫描`) showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】已经扫描`)
} else { } else {
itemDetail.forEach((item) => { itemDetail.forEach((item) => {
@ -245,7 +252,7 @@ const getScanResult = (result) => {
if (isExit == undefined) { if (isExit == undefined) {
showMessage(`箱码【${packingNumber}】、批次【${batch}】不在列表中`) showMessage(`箱码【${packingNumber}】、批次【${batch}】不在列表中`)
} else if (isExit.scaned) { } else if (!isExit.cancleScanedHiht && isExit.scaned) {
showMessage(`箱码【${packingNumber}】已经扫描`) showMessage(`箱码【${packingNumber}】已经扫描`)
} else { } else {
isExit.scaned = true isExit.scaned = true
@ -261,7 +268,7 @@ const getScanResult = (result) => {
scanedLength++ scanedLength++
} }
}) })
if (itemDetail.scaned && scanedLength == itemDetail.packList.length) { if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList.length) {
showMessage(`箱码【${packingNumber}】已经扫描`) showMessage(`箱码【${packingNumber}】已经扫描`)
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true

5
src/pages/putaway/job/putawayDetail.vue

@ -159,6 +159,7 @@ const getDetail = () => {
r.subList.forEach((s) => { r.subList.forEach((s) => {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true s.scaned = true
s.cancleScanedHiht = true
s.packList.forEach((item) => (item.scaned = true)) s.packList.forEach((item) => (item.scaned = true))
s.inventoryStatus = s.inspectResult // s.inventoryStatus = s.inspectResult //
openScanPopupSimulate(s) openScanPopupSimulate(s)
@ -295,7 +296,7 @@ const getScanResult = (result) => {
} }
if (isExit == undefined) { if (isExit == undefined) {
showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】不在列表中`) showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】不在列表中`)
} else if (isExit.scaned) { } else if (!isExit.cancleScanedHiht && isExit.scaned) {
showMessage(`箱码【${packingNumber}】已经扫描`) showMessage(`箱码【${packingNumber}】已经扫描`)
} else { } else {
isExit.scaned = true isExit.scaned = true
@ -317,7 +318,7 @@ const getScanResult = (result) => {
} }
}) })
itemDetail.fromInventoryStatus = result.balance.inventoryStatus itemDetail.fromInventoryStatus = result.balance.inventoryStatus
if (itemDetail.scaned && scanedLength == itemDetail.packList.length) { if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList.length) {
showMessage(`箱码【${packingNumber}】已经扫描`) showMessage(`箱码【${packingNumber}】已经扫描`)
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true

Loading…
Cancel
Save