Browse Source

修改跳转任务自动扫描2024/7/20 13:04:24

hella_vue3
zhang_li 3 months ago
parent
commit
f328e61e08
  1. 29
      src/common/scan.js
  2. 15
      src/mycomponents/scan/winScanPack.vue
  3. 25
      src/mycomponents/scan/winScanPackAndLocation.vue
  4. 2
      src/pages.json
  5. 18
      src/pages/issue/coms/comScanIssuePack.vue
  6. 19
      src/pages/productPutaway/job/productPutawayDetail.vue
  7. 8
      src/pages/productPutaway/job/productPutawayJob.vue
  8. 29
      src/pages/productReceipt/job/ccProductReceiptDetail.vue
  9. 14
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  10. 14
      src/pages/productReceipt/job/fgProductReceiptDetail.vue
  11. 19
      src/pages/productReceipt/job/productReceiptDetail.vue
  12. 22
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  13. 8
      src/pages/productionReceipt/job/productionReceiptJob.vue
  14. 25
      src/pages/purchaseReceipt/job/receiptDetail.vue
  15. 10
      src/pages/purchaseReceipt/job/receiptJob.vue
  16. 22
      src/pages/putaway/job/putawayDetail.vue
  17. 7
      src/pages/putaway/job/putawayJob.vue
  18. 40
      src/pages/repleinsh/coms/comScanReplishPack.vue
  19. 7
      src/pages/repleinsh/job/repleinshDetail.vue
  20. 3
      src/pages/repleinsh/job/repleinshJob.vue

29
src/common/scan.js

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

15
src/mycomponents/scan/winScanPack.vue

@ -16,8 +16,6 @@
</view>
</view>
</u-popup>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType" :isShowHistory="false" :clearResult="true"></win-com-scan>
<com-message ref="comMessageRef" @afterClose="getfocus" />
</view>
</template>
@ -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) => {

25
src/mycomponents/scan/winScanPackAndLocation.vue

@ -34,8 +34,6 @@
</view>
</u-popup>
<balance-select ref="balanceSelectRef" @onSelectItem="selectBalanceItem"></balance-select>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType" :isShowHistory="false" :clearResult="true"></win-com-scan>
</view>
<com-message ref="comMessageRef" />
</template>
@ -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()
}
} else if (fromLocationList.value.length == 0) {
if (!fromLocationCodeParams) {
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

2
src/pages.json

@ -1892,7 +1892,7 @@
}
},
{
"path": "pages/count/job/fuzzyCountJob",
"style": {
"navigationBarTitleText": "盲盘任务",

18
src/pages/issue/coms/comScanIssuePack.vue

@ -48,7 +48,7 @@
<com-message ref="comMessageRef" />
<balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<!-- 模拟扫描功能 -->
<win-com-scan v-show="false" ref="comscansimulate" placeholder="箱标签" @getResult="onScan" :clearResult="true" headerType="HPQ,HMQ" :isShowHistory="false"> </win-com-scan>
<!-- <win-com-scan v-show="false" ref="comscansimulate" placeholder="箱标签" @getResult="onScan" :clearResult="true" headerType="HPQ,HMQ" :isShowHistory="false"> </win-com-scan> -->
</view>
</template>
@ -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 = []

19
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 = ''

8
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) => {

29
src/pages/productReceipt/job/ccProductReceiptDetail.vue

@ -40,7 +40,9 @@
</view>
<view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" @remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList"> </comProductDetailCard>
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList">
</comProductDetailCard>
</view>
</view>
</scroll-view>
@ -49,7 +51,10 @@
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class="">
<locationCompare ref="comScanLocation" title="收货库位" :isShowEdit="jobContent.allowModifyLocation == 'TRUE'" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" @getLocation="scanLocationCode" :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
<<locationCompare ref="comScanLocation" title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'"
:recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList">
</locationCompare>
</view>
<view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -101,6 +106,7 @@ const jobStatus= ref('')
const jobToLocationCode = ref('')
const scanedPackingNumber = ref('')
const status = ref('')
const scanMessage = ref('')
const comScanLocation = ref()
const scanPopup = ref()
const comMessageRef = ref()
@ -113,7 +119,7 @@ const comMessageRef= ref()
}, 50)
id.value = option.id
scanedPackingNumber.value = option.scaned || ''
scanMessage.value = option.scanMessage || ''
status.value = option.status || ''
})
onShow(() => {
@ -193,19 +199,9 @@ const comMessageRef= ref()
}
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')
}
@ -230,7 +226,7 @@ const comMessageRef= ref()
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
@ -450,7 +446,6 @@ const comMessageRef= ref()
}
})
}
</script>
<style scoped lang="scss"></style>

14
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) => {

14
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')
}

19
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

22
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)

8
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) => {

25
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 = ''
if (scanMessage.value) {
scanPopup.value.simulateScan(scanMessage.value)
}
})
})
count.value++
isAllReceived.value = false
})
} 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

10
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) => {

22
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 = ''

7
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) => {

40
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -7,26 +7,6 @@
扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
padding:20rpx;
border-radius: 8rpx;">
<view class="uni-center">
位置 :
</view>
<view class="" style="width: 75%;padding: 0rpx">
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 15rpx;font-size: 30rpx;">
{{positionInfo}}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList" :defaultValue="defaultValueList"
@confirm="confirmSelect"></u-select>
</view>
</view>
</view> -->
<!-- <u-line class='line_color'></u-line> -->
<view class="uni-flex uni-row" style="align-items: center; background-color: #fff; margin-left: 20rpx; margin-right: 20rpx; margin-top: 8rpx; border-radius: 8rpx">
<view class="uni-center" style="width: 25%"> 来源库位 </view>
@ -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,11 +546,15 @@ const remove = (record, index) => {
}
const packGetFocus = () => {
if (comscan.value) {
comscan.value.getfocus()
}
}
const packLoseFocus = () => {
if (comscan.value) {
comscan.value.losefocus()
}
}
const showMessage = (message, callback) => {
setTimeout((r) => {
packLoseFocus()

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

3
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

Loading…
Cancel
Save