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. 4
      src/mycomponents/scan/winScanPack.vue
  3. 6
      src/mycomponents/scan/winScanPackAndLocation.vue
  4. 4
      src/pages/issue/job/issueDetail.vue
  5. 2
      src/pages/pointPutawayJob/index.vue
  6. 63
      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,
clear,
clickScanMsg,
losefocus
losefocus,
setItemCodeSimulate
})
</script>
<script module="textarea" lang="renderjs">

4
src/mycomponents/scan/winScanPack.vue

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

6
src/mycomponents/scan/winScanPackAndLocation.vue

@ -165,6 +165,8 @@ const openScanPopupForJobSimulate = (fromLocationCodeParams, fromLocationListPar
if (timer) {
clearTimeout(timer)
}
comscansimulate.value.setItemCodeSimulate(item.copyContent)
comscansimulate.value.clickScanMsg()
}, 500)
}
const closeScanPopup = (content) => {
@ -331,7 +333,9 @@ const selectBalanceItem = (balance) => {
//
const countCallBack = (datas) => {
if (comscan.value) {
comscan.value.clear()
}
//
const data = {
label: scanResult.value.label,
@ -345,7 +349,9 @@ const countCallBack = (datas) => {
}
const packCallBack = (item) => {
if (comscan.value) {
comscan.value.clear()
}
//
const data = {
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 { 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'
@ -254,7 +254,7 @@ const setParams = () => {
}
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.packingNumber}</td>
<td>${cur.packUnit}</td>
<td>${cur.packQty}</td>
<td>${cur.qty}</td>
<td>${cur.uom}</td>
</tr>
`

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

@ -78,6 +78,7 @@ const type = ref('')
const isCheckLocation = ref(false)
const switchCode = ref('')
const scanedPackingNumber = ref('')
const status = ref('')
const scanPopup = ref()
const comScanLocation = ref()
const detailInfoPopupRef = ref()
@ -86,6 +87,7 @@ onLoad((option) => {
id.value = option.id
type.value = option.type
scanedPackingNumber.value = option.scaned || ''
status.value = option.status || ''
if (type.value == 'predict') {
switchCode.value = 'SemiPutawayLocationCodeValidate'
updateTitle('预生产上架任务')
@ -93,9 +95,11 @@ onLoad((option) => {
switchCode.value = 'FgPutawayLocationCodeValidate'
updateTitle('装配上架任务')
}
})
onShow(() => {
if (id.value != undefined) {
//
if (option.status == '1') {
if (status.value == '1') {
receive((callback) => {
getDetail()
})
@ -155,22 +159,21 @@ const getDetail = () => {
fromLocationCode.value = subList.value[0].fromLocationCode
jobToLocationCode.value = subList.value[0].toLocationCode
detailSource.value = getDataSource(subList.value)
isCheckLocation.value = getSwitchInfoByCode(that.switchCode)
if (isCheckLocation.value) {
toLocationCode.value = ''
} else {
toLocationCode.value = jobToLocationCode.value
}
detailSource.value.forEach((r) => {
r.subList.forEach((s) => {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
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 {
showMessage('列表数据为0')
}
@ -198,6 +201,25 @@ const updateData = () => {
const openDetail = (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 = () => {
let fromlocationCode = ''
const fromlocationList = []
@ -241,28 +263,11 @@ const getScanResult = (result) => {
})
if (itemDetail == undefined) {
showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】不在列表中`)
} else if (itemDetail.scaned) {
} else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】已经扫描`)
} else {
// addDetail(itemDetail, result)
// 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)
// }
return
}
}
} catch (e) {

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

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

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

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

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

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

Loading…
Cancel
Save