diff --git a/src/common/scan.js b/src/common/scan.js
deleted file mode 100644
index d4ddbfdb..00000000
--- a/src/common/scan.js
+++ /dev/null
@@ -1,29 +0,0 @@
-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/mycomponents/scan/winScanPack.vue b/src/mycomponents/scan/winScanPack.vue
index 1dcc1357..cb3e80c6 100644
--- a/src/mycomponents/scan/winScanPack.vue
+++ b/src/mycomponents/scan/winScanPack.vue
@@ -16,8 +16,6 @@
-
-
@@ -26,6 +24,8 @@
import { ref, getCurrentInstance, nextTick, onMounted } from 'vue'
import winComScan from '@/mycomponents/scan/winComScan.vue'
+import { getLabelInfo } from '@/common/label.js'
+
const props = defineProps({
title: {
type: String,
@@ -45,9 +45,14 @@ const comMessageRef = ref()
const comscan = ref()
const comscansimulate = ref()
// 模拟扫描功能
-const simulateScan = (item) => {
- comscansimulate.value.setItemCodeSimulate(item.itemCode, item.copyContent)
- comscansimulate.value.clickScanMsg()
+const simulateScan = (scanMessage) => {
+ getLabelInfo(scanMessage, props.headerType, (callback) => {
+ if (callback.success) {
+ getScanResult(callback)
+ } else {
+ showMessage(callback.message)
+ }
+ })
}
const openScanPopup = () => {
setTimeout((res) => {
diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue
index 30bf08ec..29e42067 100644
--- a/src/mycomponents/scan/winScanPackAndLocation.vue
+++ b/src/mycomponents/scan/winScanPackAndLocation.vue
@@ -34,8 +34,6 @@
-
-
@@ -49,6 +47,7 @@ import { getBalanceByManagementPrecisionByPacking } from '@/common/balance.js'
import { getBasicLocationByCode } from '@/api/request2.js'
import { getListLocationAreaTypeDesc, checkDirectoryItemExist, getDirectoryItemArray, getLocationAreaTypeName, getInventoryStatusDesc } from '@/common/directory.js'
+import { getLabelInfo } from '@/common/label.js'
const { proxy } = getCurrentInstance()
const props = defineProps({
@@ -158,27 +157,25 @@ const openScanPopupForJob = (fromLocationCodePrams, fromLocationListPrams, jobCo
const openScanPopupForJobSimulate = (fromLocationCodeParams, fromLocationListParams, jobContent, item) => {
fromLocationCode.value = fromLocationCodeParams
fromLocationList.value = fromLocationListParams
- if (fromLocationListParams != '') {
- // this.packGetFocus();
- if (comscansimulate.value != undefined) {
- comscansimulate.value.getfocus()
+ if (!fromLocationCodeParams) {
+ if (fromLocationList.value.length == 0) {
+ // this.locationGetFocus();
+ alert('没有来源库位:List')
+ } else {
+ fromLocationCode.value = fromLocationList.value[0]
}
- } else if (fromLocationList.value.length == 0) {
- // this.locationGetFocus();
- alert('没有来源库位:List')
- } else {
- fromLocationCode.value = fromLocationList.value[0]
}
+
fromInventoryStatuses.value = getDirectoryItemArray(jobContent.outInventoryStatuses)
inventoryStatus.value = getDirectoryItemArray(jobContent.outInventoryStatuses) // 出库库存状态; //出库库存状态
fromLocationAreaTypeList.value = getDirectoryItemArray(jobContent.fromAreaTypes) // 出库库存状态
- const timer = setTimeout((res) => {
- if (timer) {
- clearTimeout(timer)
+ getLabelInfo(scanMessage, headerType.value, (callback) => {
+ if (callback.success) {
+ getScanResult(callback)
+ } else {
+ showErrorMessage(callback.message, (res) => {})
}
- comscansimulate.value.setItemCodeSimulate(item.copyContent)
- comscansimulate.value.clickScanMsg()
- }, 500)
+ })
}
const closeScanPopup = (content) => {
show.value = false
diff --git a/src/pages.json b/src/pages.json
index ff5f195d..e037b478 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -1892,7 +1892,7 @@
}
},
-
+{
"path": "pages/count/job/fuzzyCountJob",
"style": {
"navigationBarTitleText": "盲盘任务",
diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue
index 09c1de3c..eae32028 100644
--- a/src/pages/issue/coms/comScanIssuePack.vue
+++ b/src/pages/issue/coms/comScanIssuePack.vue
@@ -48,7 +48,7 @@
-
+
@@ -67,6 +67,7 @@ import { calc } from '@/common/calc.js'
import { getBalanceByManagementPrecision } from '@/common/balance.js'
import { getDirectoryItemArray } from '../../../common/directory.js'
+import { getLabelInfo } from '@/common/label.js'
const { proxy } = getCurrentInstance()
const props = defineProps({
@@ -114,16 +115,13 @@ const openScanPopupForJobSimulate = (content, jobcontentParams, scanMessage) =>
dataContent.value = content
jobContent.value = jobcontentParams
initData()
- if (comscansimulate.value.vlaue != undefined) {
- comscansimulate.value.vlaue.getfocus()
- }
- const timer = setTimeout((res) => {
- if (timer) {
- clearTimeout(timer)
+ getLabelInfo(scanMessage, 'HPQ,HMQ', (callback) => {
+ if (callback.success) {
+ onScan(callback)
+ } else {
+ showErrorMessage(callback.message, (res) => {})
}
- comscansimulate.value.vlaue.setItemCodeSimulate(scanMessage)
- comscansimulate.value.vlaue.clickScanMsg()
- }, 500)
+ })
}
const openScanPopup = (content, jobcontentParams) => {
issueRecord.value = []
diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue
index 92072687..84de3e99 100644
--- a/src/pages/productPutaway/job/productPutawayDetail.vue
+++ b/src/pages/productPutaway/job/productPutawayDetail.vue
@@ -77,7 +77,7 @@ const jobToLocationCode = ref('')
const type = ref('')
const isCheckLocation = ref(false)
const switchCode = ref('')
-const scanedPackingNumber = ref('')
+const scanMessage = ref('')
const hintTitle = ref('')
const status = ref('')
const scanPopup = ref()
@@ -87,7 +87,7 @@ const comMessageRef = ref()
onLoad((option) => {
id.value = option.id
type.value = option.type
- scanedPackingNumber.value = option.scaned || ''
+ scanMessage.value = option.scanMessage || ''
status.value = option.status || ''
if (type.value == 'predict') {
switchCode.value = 'SemiPutawayLocationCodeValidate'
@@ -172,16 +172,9 @@ const getDetail = () => {
} else {
toLocationCode.value = jobToLocationCode.value
}
- detailSource.value.forEach((r) => {
- r.subList.forEach((s) => {
- if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
- s.scaned = true
- s.cancleScanedHiht = true
- openScanPopupSimulate(s)
- scanedPackingNumber.value = ''
- }
- })
- })
+ if (scanMessage.value) {
+ openScanPopupSimulate(scanMessage.value)
+ }
} else {
showMessage('列表数据为0')
}
@@ -209,7 +202,7 @@ const updateData = () => {
const openDetail = (item) => {
detailInfoPopupRef.value.openPopup(item)
}
-const openScanPopupSimulate = (item) => {
+const openScanPopupSimulate = (scanMessage) => {
let fromlocationCode = ''
const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) {
@@ -226,7 +219,7 @@ const openScanPopupSimulate = (item) => {
}
})
}
- scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item)
+ scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, scanMessage)
}
const openScanPopup = () => {
let fromlocationCode = ''
diff --git a/src/pages/productPutaway/job/productPutawayJob.vue b/src/pages/productPutaway/job/productPutawayJob.vue
index ea028fb8..ea3d0a3c 100644
--- a/src/pages/productPutaway/job/productPutawayJob.vue
+++ b/src/pages/productPutaway/job/productPutawayJob.vue
@@ -62,6 +62,7 @@ const todayTime = ref('')
const status = ref('1,2') // 待处理 、进行中
const detailOptions = ref([])
const detailGiveupOptions = ref([])
+const scanMessage = ref('')
const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
@@ -157,10 +158,11 @@ const getList = (type) => {
showMessage(error)
})
}
-const openJobDetail = (item, packingNumber = '') => {
+const openJobDetail = (item, scanMessage = '') => {
uni.navigateTo({
url: `./productPutawayDetail?id=${item.masterId}&status=${item.status}&type=${item.type}&scaned=${packingNumber}&title=${title.value}`
})
+ scanMessage.value = ''
}
const showItemList = (itemList) => {
@@ -268,10 +270,11 @@ const openScanPopup = () => {
}
const selectItem = (item) => {
scanPopup.value.closeScanPopup()
- openJobDetail(item, item.packingNumber)
+ openJobDetail(item, scanMessage.value)
}
const getScanResult = (result) => {
try {
+ scanMessage.value = ''
const filters = [
{
column: 'packingNumber',
@@ -320,6 +323,7 @@ const getScanResult = (result) => {
pageSize: 100
})
.then((res) => {
+ scanMessage.value = result.scanMessage
const resultList = res.data.list
if (resultList.length > 0) {
resultList.forEach((item) => {
diff --git a/src/pages/productReceipt/job/ccProductReceiptDetail.vue b/src/pages/productReceipt/job/ccProductReceiptDetail.vue
index a3980809..9c9aba3d 100644
--- a/src/pages/productReceipt/job/ccProductReceiptDetail.vue
+++ b/src/pages/productReceipt/job/ccProductReceiptDetail.vue
@@ -1,456 +1,451 @@
-
-
-
-
-
-
-
-
-
- 车间
-
- {{ jobContent.workShopCode }}
-
-
-
- 生产线
-
- {{ item.subList[0].productionLineCode }}
-
-
-
- 班组
-
- {{ jobContent.team }}
-
-
-
- 班次
-
- {{ jobContent.shift }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 车间
+
+ {{ jobContent.workShopCode }}
+
+
+
+ 生产线
+
+ {{ item.subList[0].productionLineCode }}
+
+
+
+ 班组
+
+ {{ jobContent.team }}
+
+
+
+ 班次
+
+ {{ jobContent.shift }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/src/pages/productReceipt/job/ccProductReceiptJob.vue b/src/pages/productReceipt/job/ccProductReceiptJob.vue
index f8099cc7..0e3e96d8 100644
--- a/src/pages/productReceipt/job/ccProductReceiptJob.vue
+++ b/src/pages/productReceipt/job/ccProductReceiptJob.vue
@@ -68,6 +68,7 @@
const detailGiveupOptions = ref([])
const type = ref('assemble')
const title = ref("")
+ const scanMessage = ref("")
const filter = ref()
const comMessageRef = ref()
const jobListPopupRef = ref()
@@ -182,11 +183,11 @@
})
}
- const openJobDetail = (item, packingNumber = '') => {
+ const openJobDetail = (item, scanMessage = '') => {
uni.navigateTo({
- url: `./ccProductReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}&title=${title.value}`
+ url: `./ccProductReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${scanMessage}&title=${title.value}`
})
-
+ scanMessage.value = ''
}
const showItemList = (itemList) => {
@@ -308,6 +309,7 @@
}
const getScanResult = (result) => {
try {
+ scanMessage.value = ""
const filters = [
{
column: 'packingNumber',
@@ -338,6 +340,11 @@
column: 'status',
action: 'in',
value: '1,2'
+ },
+ {
+ column: "accept_user_id",
+ action: "==",
+ value: store.id
}
// {
// column: "fromLocationCode",
@@ -351,6 +358,7 @@
pageSize: 100
})
.then((res) => {
+ scanMessage.value =result.scanMessage
const resultList = res.data.list
if (resultList.length > 0) {
resultList.forEach((item) => {
diff --git a/src/pages/productReceipt/job/fgProductReceiptDetail.vue b/src/pages/productReceipt/job/fgProductReceiptDetail.vue
index 1f42055b..7bffab39 100644
--- a/src/pages/productReceipt/job/fgProductReceiptDetail.vue
+++ b/src/pages/productReceipt/job/fgProductReceiptDetail.vue
@@ -102,7 +102,7 @@ const jobStatus = ref('')
const jobToLocationCode = ref('')
const fgList = ref([])
const itemCode = ref('')
-const scanedPackingNumber = ref('')
+const scanMessage = ref('')
// const isCheckLocation = ref(false)
const scanPopup = ref()
const comScanIssuePackRef = ref()
@@ -114,7 +114,7 @@ onLoad((option) => {
title: `${option.title}详情`
})
id.value = option.id
- scanedPackingNumber.value = option.scaned || ''
+ scanMessage.value = option.scanMessage || ''
if (id.value != undefined) {
// 新建的任务自动接收
if (option.status == '1') {
@@ -184,16 +184,6 @@ const getDetail = () => {
}
toLocationTypeList.value = getDirectoryItemArray(jobContent.value.toLocationTypes)
detailSource.value = getDataSource(subList.value)
- detailSource.value.forEach((r) => {
- r.subList.forEach((s) => {
- if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
- s.scaned = true
- // 模拟扫描功能
- scanPopup.value.simulateScan(s)
- scanedPackingNumber.value = ''
- }
- })
- })
} else {
showMessage('列表数据为0')
}
diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue
index c46676db..1b908473 100644
--- a/src/pages/productReceipt/job/productReceiptDetail.vue
+++ b/src/pages/productReceipt/job/productReceiptDetail.vue
@@ -100,8 +100,8 @@ const toLocationAreaTypeList = ref([])
const managementList = ref([])
const jobStatus = ref('')
const jobToLocationCode = ref('')
-const scanedPackingNumber = ref('')
const status = ref('')
+const scanMessage = ref('')
const scanPopup = ref()
const comScanLocation = ref()
const comMessageRef = ref()
@@ -110,7 +110,7 @@ onLoad((option) => {
title: `${option.title}详情`
})
id.value = option.id
- scanedPackingNumber.value = option.scaned || ''
+ scanMessage.value = option.scanMessage || ''
status.value = option.status || ''
})
onShow(() => {
@@ -183,18 +183,9 @@ const getDetail = () => {
}
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes)
detailSource.value = getDataSource(subList.value)
- detailSource.value.forEach((r) => {
- 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)
- scanedPackingNumber.value = ''
- // s.handleQty = s.qty
- }
- })
- })
+ if (scanMessage.value) {
+ scanPopup.value.simulateScan(scanMessage.value)
+ }
} else {
showMessage('列表数据为0')
}
@@ -218,7 +209,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.cancleScanedHiht && itemDetail.scaned) {
+ } else if (itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`)
} else {
itemDetail.scaned = true
diff --git a/src/pages/productionReceipt/job/productionReceiptDetail.vue b/src/pages/productionReceipt/job/productionReceiptDetail.vue
index 2261c59d..4912bcbd 100644
--- a/src/pages/productionReceipt/job/productionReceiptDetail.vue
+++ b/src/pages/productionReceipt/job/productionReceiptDetail.vue
@@ -75,7 +75,7 @@ const toLocationAreaTypeList = ref([])
const jobStatus = ref('')
const jobToLocationCode = ref('')
const isCheckLocation = ref(false)
-const scanedPackingNumber = ref('')
+const scanMessage = ref('')
const scanPopup = ref()
const comScanIssuePackRef = ref()
const detailInfoPopupRef = ref()
@@ -86,7 +86,7 @@ onLoad((option) => {
title: `${option.title}详情`
})
id.value = option.id
- scanedPackingNumber.value = option.scaned
+ scanMessage.value = option.scanMessage
if (id.value != undefined) {
// 新建的任务自动接收
if (option.status == '1') {
@@ -156,17 +156,9 @@ const getDetail = () => {
} else {
toLocationCode.value = jobToLocationCode.value
}
- detailSource.value.forEach((r) => {
- r.subList.forEach((s) => {
- if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
- s.scaned = true
- s.cancleScanedHiht = true
- // 模拟扫描功能
- openScanPopupSimulate(s)
- scanedPackingNumber.value = ''
- }
- })
- })
+ if (scanMessage.value) {
+ openScanPopupSimulate(scanMessage.value)
+ }
} else {
showMessage('列表数据为0')
}
@@ -219,7 +211,7 @@ const closeScanPopup = () => {
scanPopup.value.closeScanPopup()
}
// 模拟扫描功能
-const openScanPopupSimulate = (item) => {
+const openScanPopupSimulate = (scanMessage) => {
let fromlocationCode = ''
const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) {
@@ -238,7 +230,7 @@ const openScanPopupSimulate = (item) => {
}
})
}
- scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item)
+ scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, scanMessage)
}
const getScanResult = (result) => {
try {
@@ -263,7 +255,7 @@ const getScanResult = (result) => {
})
if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`)
- } else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
+ } else if (itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`)
} else {
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus)
diff --git a/src/pages/productionReceipt/job/productionReceiptJob.vue b/src/pages/productionReceipt/job/productionReceiptJob.vue
index 11f83092..110a7036 100644
--- a/src/pages/productionReceipt/job/productionReceiptJob.vue
+++ b/src/pages/productionReceipt/job/productionReceiptJob.vue
@@ -56,6 +56,7 @@ const detailOptions = ref([])
const detailGiveupOptions = ref([])
const filter = ref()
const title = ref('')
+const scanMessage = ref('')
const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
@@ -159,8 +160,9 @@ const getList = (type) => {
showErrorMessage(error)
})
}
-const openJobDetail = (item, packingNumber = '') => {
+const openJobDetail = (item, scanMessage = '') => {
proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
+ scanMessage.value = ''
}
const selectedItem = (item) => {
openJobDetail(item)
@@ -271,11 +273,12 @@ const openScanPopup = () => {
const selectItem = (item) => {
scanPopup.value.closeScanPopup()
- openJobDetail(item, item.packingNumber)
+ openJobDetail(item, scanMessage.value)
}
const getScanResult = (result) => {
try {
+ scanMessage.value = ''
const filters = [
{
column: 'packingNumber',
@@ -304,6 +307,7 @@ const getScanResult = (result) => {
pageSize: 100
})
.then((res) => {
+ scanMessage.value = result.scanMessage
const resultList = res.data.list
if (resultList.length > 0) {
resultList.forEach((item) => {
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index 25301908..df8863ef 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -94,7 +94,7 @@ const managementList = ref([])
const jobStatus = ref('')
const isAllReceived = ref(false)
const operation = ref('')
-const scanedPackingNumber = ref('')
+const scanMessage = ref('')
const status = ref('')
const switchCode = ref('')
const isCheckLocation = ref('purchaseReceiptLocationCodeValidate') // 校验收货库位
@@ -106,6 +106,7 @@ const comReceiptDetailCardRef = ref()
const count = ref(0)
onLoad((option) => {
id.value = option.id
+ scanMessage.value = option.scanMessage
scanedPackingNumber.value = option.scaned || ''
status.value = option.status || ''
operation.value = option.operation
@@ -189,21 +190,9 @@ const getDetail = () => {
toLocationCode.value = jobToLocationCode.value
}
isAllReceived.value = false
- nextTick(() => {
- detailSource.value.forEach((r) => {
- 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)
- scanedPackingNumber.value = ''
- }
- })
- })
- count.value++
- isAllReceived.value = false
- })
+ if (scanMessage.value) {
+ scanPopup.value.simulateScan(scanMessage.value)
+ }
} else {
showMessage('列表数据为0')
}
@@ -226,7 +215,7 @@ const getScanResult = (result) => {
var itemDetail = detail.subList.filter((r) => r.containerNumber == containerNumber)
if (itemDetail.length == 0) {
showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】不在列表中`)
- } else if (!itemDetail[0].cancleScanedHiht && itemDetail[0].scaned) {
+ } else if (itemDetail[0].scaned) {
showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】已经扫描`)
} else {
itemDetail.forEach((item) => {
@@ -268,7 +257,7 @@ const getScanResult = (result) => {
if (isExit == undefined) {
showMessage(`箱码【${packingNumber}】、批次【${batch}】不在列表中`)
- } else if (!isExit.cancleScanedHiht && isExit.scaned) {
+ } else if (isExit.scaned) {
showMessage(`箱码【${packingNumber}】已经扫描`)
} else {
isExit.scaned = true
@@ -284,7 +273,7 @@ const getScanResult = (result) => {
scanedLength++
}
})
- if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList.length) {
+ if (itemDetail.scaned && scanedLength == itemDetail.packList.length) {
showMessage(`箱码【${packingNumber}】已经扫描`)
} else {
itemDetail.scaned = true
diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue
index 8c1bdea8..679aae47 100644
--- a/src/pages/purchaseReceipt/job/receiptJob.vue
+++ b/src/pages/purchaseReceipt/job/receiptJob.vue
@@ -51,6 +51,7 @@ const todayTime = ref('')
const status = ref('1,2') // 待处理 、进行中
const detailOptions = ref([])
const detailGiveupOptions = ref([])
+const scanMessage = ref('')
const filter = ref()
const comMessageRef = ref()
const jobInfoPopup = ref()
@@ -213,8 +214,9 @@ const getDataListByType = (code, type) => {
showMessage(error)
})
}
-const openJobDetail = (item, packingNumber = '') => {
- proxy.$tab.navigateTo(`./receiptDetail?id=${item.masterId}&status=${item.status}&operation=${props.operation}&scaned=${props.packingNumber}`)
+const openJobDetail = (item, scanMessage = '') => {
+ proxy.$tab.navigateTo(`./receiptDetail?id=${item.masterId}&status=${item.status}&operation=${this.operation}&scanMessage=${scanMessage}`)
+ scanMessage.value = ''
}
const showItemList = (itemList) => {
jobListPopup.value.openPopup(itemList)
@@ -293,12 +295,13 @@ const selectItem = (item, isScanedASN = false) => {
if (isScanedASN) {
openJobDetail(item)
} else {
- openJobDetail(item, item.packingNumber)
+ openJobDetail(item, scanMessage.value)
}
}
const getScanResult = (result) => {
try {
+ scanMessage.value = ''
let filters = []
if (result.label.barType == 'BarCode') {
// ASN单号
@@ -359,6 +362,7 @@ const getScanResult = (result) => {
pageSize: 100
})
.then((res) => {
+ scanMessage.value = result.scanMessage
const resultList = res.data.list
if (resultList.length > 0) {
resultList.forEach((item) => {
diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue
index 31fb69fb..0054a202 100644
--- a/src/pages/putaway/job/putawayDetail.vue
+++ b/src/pages/putaway/job/putawayDetail.vue
@@ -72,7 +72,7 @@ const toLocationAreaTypeList = ref([])
const jobStatus = ref('')
const jobToLocationCode = ref('')
const isCheckLocation = ref(false)
-const scanedPackingNumber = ref('')
+const scanMessage = ref('')
const scanPopup = ref()
const comScanLocation = ref()
const comMessageRef = ref()
@@ -81,7 +81,7 @@ onLoad((option) => {
title: `${option.title}详情`
})
id.value = option.id
- scanedPackingNumber.value = option.scaned || ''
+ scanMessage.value = option.scanMessage || ''
if (id.value != undefined) {
// 新建的任务自动接收
if (option.status == '1') {
@@ -158,18 +158,10 @@ const getDetail = () => {
} else {
toLocationCode.value = jobToLocationCode.value
}
- detailSource.value.forEach((r) => {
- 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)
- scanedPackingNumber.value = ''
- }
- })
- })
+ // 外部进入详情,如果有扫描信息,模拟自动扫描
+ if (scanMessage.value) {
+ openScanPopupSimulate(scanMessage.value)
+ }
} else {
showMessage('列表数据为0')
}
@@ -209,7 +201,7 @@ const updateData = () => {
calcTreeHandleQty(detailSource.value)
}
// 模拟扫描功能
-const openScanPopupSimulate = (item) => {
+const openScanPopupSimulate = (message) => {
let fromlocationCode = ''
const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) {
@@ -226,7 +218,7 @@ const openScanPopupSimulate = (item) => {
}
})
}
- scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item)
+ scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, message)
}
const openScanPopup = () => {
let fromlocationCode = ''
diff --git a/src/pages/putaway/job/putawayJob.vue b/src/pages/putaway/job/putawayJob.vue
index 9038533f..b68b26f2 100644
--- a/src/pages/putaway/job/putawayJob.vue
+++ b/src/pages/putaway/job/putawayJob.vue
@@ -51,6 +51,7 @@ const status = ref('1,2') // 待处理 、进行中
const detailOptions = ref([])
const detailGiveupOptions = ref([])
const title = ref('')
+const scanMessage = ref('')
const filter = ref()
const comMessageRef = ref()
const scanPopup = ref()
@@ -163,6 +164,7 @@ const getList = (type) => {
}
const openJobDetail = (item) => {
proxy.$tab.navigateTo(`./putawayDetail?id=${item.masterId}&status=${item.status}&title=${title.value}`)
+ scanMessage.value = ''
}
const selectedItem = (item) => {
@@ -273,11 +275,13 @@ const openScanPopup = () => {
const selectItem = (item) => {
scanPopup.value.closeScanPopup()
uni.navigateTo({
- url: `./putawayDetail?id=${item.masterId}&status=${item.status}&scaned=${item.packingNumber}&title=${title.value}`
+ url: `./putawayDetail?id=${item.masterId}&status=${item.status}&scaned=${item.packingNumber}&title=${title.value}&scanMessage=${scanMessage.value}`
})
+ scanMessage.value = ''
}
const getScanResult = (result) => {
+ scanMessage.value = ''
try {
const filters = [
{
@@ -322,6 +326,7 @@ const getScanResult = (result) => {
pageSize: 100
})
.then((res) => {
+ scanMessage.value = result.scanMessage
const resultList = res.data.list
if (resultList.length > 0) {
resultList.forEach((item) => {
diff --git a/src/pages/repleinsh/coms/comScanReplishPack.vue b/src/pages/repleinsh/coms/comScanReplishPack.vue
index be725b62..363a270a 100644
--- a/src/pages/repleinsh/coms/comScanReplishPack.vue
+++ b/src/pages/repleinsh/coms/comScanReplishPack.vue
@@ -7,26 +7,6 @@
扫描箱码
关闭
-
-
来源库位
@@ -83,6 +63,7 @@ import { uniqueArray } from '@/common/basic.js'
import { getBalanceByManagementPrecision } from '@/common/balance.js'
import { getDirectoryItemArray } from '../../../common/directory.js'
+import { getLabelInfo } from '@/common/label.js'
const props = defineProps({
title: {
@@ -104,7 +85,6 @@ const issueRecord = ref([]) // 发料历史
const expand = ref(true)
const scanOptions = ref({})
const editItem = ref({})
-const positionInfo = ref('请选择位置')
const positionList = ref([])
const defaultValueList = ref([])
const label = ref({})
@@ -131,7 +111,19 @@ const openScanPopup = (content, jobcontent) => {
show.value = true
}, 500)
}
-
+const openScanPopupForJobSimulate = (content, jobcontent, scanMessage) => {
+ issueRecord.value = []
+ dataContent.value = content
+ jobContent.value = jobcontent
+ initData()
+ getLabelInfo(scanMessage, headerType.value, (callback) => {
+ if (callback.success) {
+ onScan(callback)
+ } else {
+ showErrorMessage(callback.message)
+ }
+ })
+}
const closeScanPopup = () => {
show.value = false
emit('closeScan')
@@ -554,10 +546,14 @@ const remove = (record, index) => {
}
const packGetFocus = () => {
- comscan.value.getfocus()
+ if (comscan.value) {
+ comscan.value.getfocus()
+ }
}
const packLoseFocus = () => {
- comscan.value.losefocus()
+ if (comscan.value) {
+ comscan.value.losefocus()
+ }
}
const showMessage = (message, callback) => {
setTimeout((r) => {
diff --git a/src/pages/repleinsh/job/repleinshDetail.vue b/src/pages/repleinsh/job/repleinshDetail.vue
index 651b6496..7f7e25fb 100644
--- a/src/pages/repleinsh/job/repleinshDetail.vue
+++ b/src/pages/repleinsh/job/repleinshDetail.vue
@@ -80,7 +80,7 @@ const toLocationInfo = ref({})
const businessTypeInfo = ref({})
const managementList = ref([])
const isAllReceived = ref(false)
-const operation = ref('')
+const scanMessage = ref('')
const comScanIssuePackRef = ref()
const locationTypes = ref()
@@ -89,7 +89,7 @@ onLoad((option) => {
title: `${option.title}详情`
})
id.value = option.id
- operation.value = option.operation
+ scanMessage.value = option.scanMessage
if (id.value != undefined) {
// 新建的任务自动接收
if (option.status == '1') {
@@ -163,6 +163,9 @@ const getDetail = () => {
console.log(`库位${toLocationCode.value}`)
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes)
detailSource.value = getDataSource(detailSource.value, subList.value)
+ if (scanMessage.value) {
+ comScanIssuePackRef.value.openScanPopupForJobSimulate(detailSource.value, jobContent.value, scanMessage.value)
+ }
setTimeout((r) => {
resizeCollapse()
}, 100)
diff --git a/src/pages/repleinsh/job/repleinshJob.vue b/src/pages/repleinsh/job/repleinshJob.vue
index 0cf725be..7d89faa2 100644
--- a/src/pages/repleinsh/job/repleinshJob.vue
+++ b/src/pages/repleinsh/job/repleinshJob.vue
@@ -53,6 +53,7 @@ const detailOptions = ref([])
const scanMessage = ref('')
const detailGiveupOptions = ref([])
const title = ref('')
+const scanMessage = ref('')
const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
@@ -173,6 +174,7 @@ const fromLocationCode = (fromLocationCode) => {
}
const openJobDetail = (item, scanMessageParams = '') => {
proxy.$tab.navigateTo(`./repleinshDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage.value}&title=${title.value}`)
+ scanMessage.value = ''
}
const selectedItem = (item) => {
openJobDetail(item)
@@ -279,6 +281,7 @@ const selectItem = (item) => {
openJobDetail(item, scanMessage.value)
}
const getScanResult = (result) => {
+ scanMessage.value = ''
if (!result.label.batch) {
showMessage('批次为空')
return