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>
</view> </view>
</u-popup> </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" /> <com-message ref="comMessageRef" @afterClose="getfocus" />
</view> </view>
</template> </template>
@ -26,6 +24,8 @@
import { ref, getCurrentInstance, nextTick, onMounted } from 'vue' import { ref, getCurrentInstance, nextTick, onMounted } from 'vue'
import winComScan from '@/mycomponents/scan/winComScan.vue' import winComScan from '@/mycomponents/scan/winComScan.vue'
import { getLabelInfo } from '@/common/label.js'
const props = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
@ -45,9 +45,14 @@ const comMessageRef = ref()
const comscan = ref() const comscan = ref()
const comscansimulate = ref() const comscansimulate = ref()
// //
const simulateScan = (item) => { const simulateScan = (scanMessage) => {
comscansimulate.value.setItemCodeSimulate(item.itemCode, item.copyContent) getLabelInfo(scanMessage, props.headerType, (callback) => {
comscansimulate.value.clickScanMsg() if (callback.success) {
getScanResult(callback)
} else {
showMessage(callback.message)
}
})
} }
const openScanPopup = () => { const openScanPopup = () => {
setTimeout((res) => { setTimeout((res) => {

25
src/mycomponents/scan/winScanPackAndLocation.vue

@ -34,8 +34,6 @@
</view> </view>
</u-popup> </u-popup>
<balance-select ref="balanceSelectRef" @onSelectItem="selectBalanceItem"></balance-select> <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> </view>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</template> </template>
@ -49,6 +47,7 @@ import { getBalanceByManagementPrecisionByPacking } from '@/common/balance.js'
import { getBasicLocationByCode } from '@/api/request2.js' import { getBasicLocationByCode } from '@/api/request2.js'
import { getListLocationAreaTypeDesc, checkDirectoryItemExist, getDirectoryItemArray, getLocationAreaTypeName, getInventoryStatusDesc } from '@/common/directory.js' import { getListLocationAreaTypeDesc, checkDirectoryItemExist, getDirectoryItemArray, getLocationAreaTypeName, getInventoryStatusDesc } from '@/common/directory.js'
import { getLabelInfo } from '@/common/label.js'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const props = defineProps({ const props = defineProps({
@ -158,27 +157,25 @@ const openScanPopupForJob = (fromLocationCodePrams, fromLocationListPrams, jobCo
const openScanPopupForJobSimulate = (fromLocationCodeParams, fromLocationListParams, jobContent, item) => { const openScanPopupForJobSimulate = (fromLocationCodeParams, fromLocationListParams, jobContent, item) => {
fromLocationCode.value = fromLocationCodeParams fromLocationCode.value = fromLocationCodeParams
fromLocationList.value = fromLocationListParams fromLocationList.value = fromLocationListParams
if (fromLocationListParams != '') { if (!fromLocationCodeParams) {
// this.packGetFocus(); if (fromLocationList.value.length == 0) {
if (comscansimulate.value != undefined) {
comscansimulate.value.getfocus()
}
} else if (fromLocationList.value.length == 0) {
// this.locationGetFocus(); // this.locationGetFocus();
alert('没有来源库位:List') alert('没有来源库位:List')
} else { } else {
fromLocationCode.value = fromLocationList.value[0] fromLocationCode.value = fromLocationList.value[0]
} }
}
fromInventoryStatuses.value = getDirectoryItemArray(jobContent.outInventoryStatuses) fromInventoryStatuses.value = getDirectoryItemArray(jobContent.outInventoryStatuses)
inventoryStatus.value = getDirectoryItemArray(jobContent.outInventoryStatuses) // 出库库存状态; //出库库存状态 inventoryStatus.value = getDirectoryItemArray(jobContent.outInventoryStatuses) // 出库库存状态; //出库库存状态
fromLocationAreaTypeList.value = getDirectoryItemArray(jobContent.fromAreaTypes) // fromLocationAreaTypeList.value = getDirectoryItemArray(jobContent.fromAreaTypes) //
const timer = setTimeout((res) => { getLabelInfo(scanMessage, headerType.value, (callback) => {
if (timer) { if (callback.success) {
clearTimeout(timer) getScanResult(callback)
} else {
showErrorMessage(callback.message, (res) => {})
} }
comscansimulate.value.setItemCodeSimulate(item.copyContent) })
comscansimulate.value.clickScanMsg()
}, 500)
} }
const closeScanPopup = (content) => { const closeScanPopup = (content) => {
show.value = false show.value = false

2
src/pages.json

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

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

@ -48,7 +48,7 @@
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
<balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm" :isShowStatus="true"></balance-qty-edit> <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> </view>
</template> </template>
@ -67,6 +67,7 @@ import { calc } from '@/common/calc.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'
import { getLabelInfo } from '@/common/label.js'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const props = defineProps({ const props = defineProps({
@ -114,16 +115,13 @@ const openScanPopupForJobSimulate = (content, jobcontentParams, scanMessage) =>
dataContent.value = content dataContent.value = content
jobContent.value = jobcontentParams jobContent.value = jobcontentParams
initData() initData()
if (comscansimulate.value.vlaue != undefined) { getLabelInfo(scanMessage, 'HPQ,HMQ', (callback) => {
comscansimulate.value.vlaue.getfocus() if (callback.success) {
} onScan(callback)
const timer = setTimeout((res) => { } else {
if (timer) { showErrorMessage(callback.message, (res) => {})
clearTimeout(timer)
} }
comscansimulate.value.vlaue.setItemCodeSimulate(scanMessage) })
comscansimulate.value.vlaue.clickScanMsg()
}, 500)
} }
const openScanPopup = (content, jobcontentParams) => { const openScanPopup = (content, jobcontentParams) => {
issueRecord.value = [] issueRecord.value = []

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

@ -77,7 +77,7 @@ const jobToLocationCode = ref('')
const type = ref('') const type = ref('')
const isCheckLocation = ref(false) const isCheckLocation = ref(false)
const switchCode = ref('') const switchCode = ref('')
const scanedPackingNumber = ref('') const scanMessage = ref('')
const hintTitle = ref('') const hintTitle = ref('')
const status = ref('') const status = ref('')
const scanPopup = ref() const scanPopup = ref()
@ -87,7 +87,7 @@ const comMessageRef = ref()
onLoad((option) => { onLoad((option) => {
id.value = option.id id.value = option.id
type.value = option.type type.value = option.type
scanedPackingNumber.value = option.scaned || '' scanMessage.value = option.scanMessage || ''
status.value = option.status || '' status.value = option.status || ''
if (type.value == 'predict') { if (type.value == 'predict') {
switchCode.value = 'SemiPutawayLocationCodeValidate' switchCode.value = 'SemiPutawayLocationCodeValidate'
@ -172,16 +172,9 @@ const getDetail = () => {
} else { } else {
toLocationCode.value = jobToLocationCode.value toLocationCode.value = jobToLocationCode.value
} }
detailSource.value.forEach((r) => { if (scanMessage.value) {
r.subList.forEach((s) => { openScanPopupSimulate(scanMessage.value)
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
openScanPopupSimulate(s)
scanedPackingNumber.value = ''
} }
})
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -209,7 +202,7 @@ const updateData = () => {
const openDetail = (item) => { const openDetail = (item) => {
detailInfoPopupRef.value.openPopup(item) detailInfoPopupRef.value.openPopup(item)
} }
const openScanPopupSimulate = (item) => { const openScanPopupSimulate = (scanMessage) => {
let fromlocationCode = '' let fromlocationCode = ''
const fromlocationList = [] const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) { 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 = () => { const openScanPopup = () => {
let fromlocationCode = '' let fromlocationCode = ''

8
src/pages/productPutaway/job/productPutawayJob.vue

@ -62,6 +62,7 @@ const todayTime = ref('')
const status = ref('1,2') // const status = ref('1,2') //
const detailOptions = ref([]) const detailOptions = ref([])
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const scanMessage = ref('')
const filter = ref() const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopupRef = ref() const jobInfoPopupRef = ref()
@ -157,10 +158,11 @@ const getList = (type) => {
showMessage(error) showMessage(error)
}) })
} }
const openJobDetail = (item, packingNumber = '') => { const openJobDetail = (item, scanMessage = '') => {
uni.navigateTo({ uni.navigateTo({
url: `./productPutawayDetail?id=${item.masterId}&status=${item.status}&type=${item.type}&scaned=${packingNumber}&title=${title.value}` url: `./productPutawayDetail?id=${item.masterId}&status=${item.status}&type=${item.type}&scaned=${packingNumber}&title=${title.value}`
}) })
scanMessage.value = ''
} }
const showItemList = (itemList) => { const showItemList = (itemList) => {
@ -268,10 +270,11 @@ const openScanPopup = () => {
} }
const selectItem = (item) => { const selectItem = (item) => {
scanPopup.value.closeScanPopup() scanPopup.value.closeScanPopup()
openJobDetail(item, item.packingNumber) openJobDetail(item, scanMessage.value)
} }
const getScanResult = (result) => { const getScanResult = (result) => {
try { try {
scanMessage.value = ''
const filters = [ const filters = [
{ {
column: 'packingNumber', column: 'packingNumber',
@ -320,6 +323,7 @@ const getScanResult = (result) => {
pageSize: 100 pageSize: 100
}) })
.then((res) => { .then((res) => {
scanMessage.value = result.scanMessage
const resultList = res.data.list const resultList = res.data.list
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach((item) => { resultList.forEach((item) => {

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

@ -40,7 +40,9 @@
</view> </view>
<view class=""> <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>
</view> </view>
</scroll-view> </scroll-view>
@ -49,7 +51,10 @@
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> <view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class=""> <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>
<view class="uni-flex uni-row"> <view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -101,6 +106,7 @@ const jobStatus= ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
const status = ref('') const status = ref('')
const scanMessage = ref('')
const comScanLocation = ref() const comScanLocation = ref()
const scanPopup = ref() const scanPopup = ref()
const comMessageRef = ref() const comMessageRef = ref()
@ -113,7 +119,7 @@ const comMessageRef= ref()
}, 50) }, 50)
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned || '' scanMessage.value = option.scanMessage || ''
status.value = option.status || '' status.value = option.status || ''
}) })
onShow(() => { onShow(() => {
@ -193,19 +199,9 @@ const comMessageRef= ref()
} }
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes)
detailSource.value = getDataSource(subList.value) detailSource.value = getDataSource(subList.value)
detailSource.value.forEach((r) => { if (scanMessage.value) {
r.subList.forEach((s) => { scanPopup.value.simulateScan(scanMessage.value);
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
} }
})
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -230,7 +226,7 @@ const comMessageRef= ref()
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.cancleScanedHiht && itemDetail.scaned) { } else if (itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`)
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true
@ -450,7 +446,6 @@ const comMessageRef= ref()
} }
}) })
} }
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

14
src/pages/productReceipt/job/ccProductReceiptJob.vue

@ -68,6 +68,7 @@
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const type = ref('assemble') const type = ref('assemble')
const title = ref("") const title = ref("")
const scanMessage = ref("")
const filter = ref() const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const jobListPopupRef = ref() const jobListPopupRef = ref()
@ -182,11 +183,11 @@
}) })
} }
const openJobDetail = (item, packingNumber = '') => { const openJobDetail = (item, scanMessage = '') => {
uni.navigateTo({ 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) => { const showItemList = (itemList) => {
@ -308,6 +309,7 @@
} }
const getScanResult = (result) => { const getScanResult = (result) => {
try { try {
scanMessage.value = ""
const filters = [ const filters = [
{ {
column: 'packingNumber', column: 'packingNumber',
@ -338,6 +340,11 @@
column: 'status', column: 'status',
action: 'in', action: 'in',
value: '1,2' value: '1,2'
},
{
column: "accept_user_id",
action: "==",
value: store.id
} }
// { // {
// column: "fromLocationCode", // column: "fromLocationCode",
@ -351,6 +358,7 @@
pageSize: 100 pageSize: 100
}) })
.then((res) => { .then((res) => {
scanMessage.value =result.scanMessage
const resultList = res.data.list const resultList = res.data.list
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach((item) => { resultList.forEach((item) => {

14
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -102,7 +102,7 @@ const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const fgList = ref([]) const fgList = ref([])
const itemCode = ref('') const itemCode = ref('')
const scanedPackingNumber = ref('') const scanMessage = ref('')
// const isCheckLocation = ref(false) // const isCheckLocation = ref(false)
const scanPopup = ref() const scanPopup = ref()
const comScanIssuePackRef = ref() const comScanIssuePackRef = ref()
@ -114,7 +114,7 @@ onLoad((option) => {
title: `${option.title}详情` title: `${option.title}详情`
}) })
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned || '' scanMessage.value = option.scanMessage || ''
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (option.status == '1') {
@ -184,16 +184,6 @@ const getDetail = () => {
} }
toLocationTypeList.value = getDirectoryItemArray(jobContent.value.toLocationTypes) toLocationTypeList.value = getDirectoryItemArray(jobContent.value.toLocationTypes)
detailSource.value = getDataSource(subList.value) 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 { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }

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

@ -100,8 +100,8 @@ const toLocationAreaTypeList = ref([])
const managementList = ref([]) const managementList = ref([])
const jobStatus = ref('') const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const scanedPackingNumber = ref('')
const status = ref('') const status = ref('')
const scanMessage = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanLocation = ref() const comScanLocation = ref()
const comMessageRef = ref() const comMessageRef = ref()
@ -110,7 +110,7 @@ onLoad((option) => {
title: `${option.title}详情` title: `${option.title}详情`
}) })
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned || '' scanMessage.value = option.scanMessage || ''
status.value = option.status || '' status.value = option.status || ''
}) })
onShow(() => { onShow(() => {
@ -183,18 +183,9 @@ const getDetail = () => {
} }
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes)
detailSource.value = getDataSource(subList.value) detailSource.value = getDataSource(subList.value)
detailSource.value.forEach((r) => { if (scanMessage.value) {
r.subList.forEach((s) => { scanPopup.value.simulateScan(scanMessage.value)
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
} }
})
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -218,7 +209,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.cancleScanedHiht && itemDetail.scaned) { } else if (itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`)
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true

22
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -75,7 +75,7 @@ const toLocationAreaTypeList = ref([])
const jobStatus = ref('') const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const isCheckLocation = ref(false) const isCheckLocation = ref(false)
const scanedPackingNumber = ref('') const scanMessage = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanIssuePackRef = ref() const comScanIssuePackRef = ref()
const detailInfoPopupRef = ref() const detailInfoPopupRef = ref()
@ -86,7 +86,7 @@ onLoad((option) => {
title: `${option.title}详情` title: `${option.title}详情`
}) })
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned scanMessage.value = option.scanMessage
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (option.status == '1') {
@ -156,17 +156,9 @@ const getDetail = () => {
} else { } else {
toLocationCode.value = jobToLocationCode.value toLocationCode.value = jobToLocationCode.value
} }
detailSource.value.forEach((r) => { if (scanMessage.value) {
r.subList.forEach((s) => { openScanPopupSimulate(scanMessage.value)
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
s.scaned = true
s.cancleScanedHiht = true
//
openScanPopupSimulate(s)
scanedPackingNumber.value = ''
} }
})
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -219,7 +211,7 @@ const closeScanPopup = () => {
scanPopup.value.closeScanPopup() scanPopup.value.closeScanPopup()
} }
// //
const openScanPopupSimulate = (item) => { const openScanPopupSimulate = (scanMessage) => {
let fromlocationCode = '' let fromlocationCode = ''
const fromlocationList = [] const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) { 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) => { const getScanResult = (result) => {
try { try {
@ -263,7 +255,7 @@ const getScanResult = (result) => {
}) })
if (itemDetail == undefined) { if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`)
} else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) { } else if (itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`)
} else { } else {
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus) const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus)

8
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -56,6 +56,7 @@ const detailOptions = ref([])
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const filter = ref() const filter = ref()
const title = ref('') const title = ref('')
const scanMessage = ref('')
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopupRef = ref() const jobInfoPopupRef = ref()
const jobListPopupRef = ref() const jobListPopupRef = ref()
@ -159,8 +160,9 @@ const getList = (type) => {
showErrorMessage(error) showErrorMessage(error)
}) })
} }
const openJobDetail = (item, packingNumber = '') => { const openJobDetail = (item, scanMessage = '') => {
proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`) proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
scanMessage.value = ''
} }
const selectedItem = (item) => { const selectedItem = (item) => {
openJobDetail(item) openJobDetail(item)
@ -271,11 +273,12 @@ const openScanPopup = () => {
const selectItem = (item) => { const selectItem = (item) => {
scanPopup.value.closeScanPopup() scanPopup.value.closeScanPopup()
openJobDetail(item, item.packingNumber) openJobDetail(item, scanMessage.value)
} }
const getScanResult = (result) => { const getScanResult = (result) => {
try { try {
scanMessage.value = ''
const filters = [ const filters = [
{ {
column: 'packingNumber', column: 'packingNumber',
@ -304,6 +307,7 @@ const getScanResult = (result) => {
pageSize: 100 pageSize: 100
}) })
.then((res) => { .then((res) => {
scanMessage.value = result.scanMessage
const resultList = res.data.list const resultList = res.data.list
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach((item) => { resultList.forEach((item) => {

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

@ -94,7 +94,7 @@ const managementList = ref([])
const jobStatus = ref('') const jobStatus = ref('')
const isAllReceived = ref(false) const isAllReceived = ref(false)
const operation = ref('') const operation = ref('')
const scanedPackingNumber = ref('') const scanMessage = ref('')
const status = ref('') const status = ref('')
const switchCode = ref('') const switchCode = ref('')
const isCheckLocation = ref('purchaseReceiptLocationCodeValidate') // const isCheckLocation = ref('purchaseReceiptLocationCodeValidate') //
@ -106,6 +106,7 @@ const comReceiptDetailCardRef = ref()
const count = ref(0) const count = ref(0)
onLoad((option) => { onLoad((option) => {
id.value = option.id id.value = option.id
scanMessage.value = option.scanMessage
scanedPackingNumber.value = option.scaned || '' scanedPackingNumber.value = option.scaned || ''
status.value = option.status || '' status.value = option.status || ''
operation.value = option.operation operation.value = option.operation
@ -189,21 +190,9 @@ const getDetail = () => {
toLocationCode.value = jobToLocationCode.value toLocationCode.value = jobToLocationCode.value
} }
isAllReceived.value = false isAllReceived.value = false
nextTick(() => { if (scanMessage.value) {
detailSource.value.forEach((r) => { scanPopup.value.simulateScan(scanMessage.value)
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
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -226,7 +215,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].cancleScanedHiht && itemDetail[0].scaned) { } else if (itemDetail[0].scaned) {
showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】已经扫描`) showErrorMessage(`物料【${itemCode}】、托码【${containerNumber}】已经扫描`)
} else { } else {
itemDetail.forEach((item) => { itemDetail.forEach((item) => {
@ -268,7 +257,7 @@ const getScanResult = (result) => {
if (isExit == undefined) { if (isExit == undefined) {
showMessage(`箱码【${packingNumber}】、批次【${batch}】不在列表中`) showMessage(`箱码【${packingNumber}】、批次【${batch}】不在列表中`)
} else if (!isExit.cancleScanedHiht && isExit.scaned) { } else if (isExit.scaned) {
showMessage(`箱码【${packingNumber}】已经扫描`) showMessage(`箱码【${packingNumber}】已经扫描`)
} else { } else {
isExit.scaned = true isExit.scaned = true
@ -284,7 +273,7 @@ const getScanResult = (result) => {
scanedLength++ scanedLength++
} }
}) })
if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList.length) { if (itemDetail.scaned && scanedLength == itemDetail.packList.length) {
showMessage(`箱码【${packingNumber}】已经扫描`) showMessage(`箱码【${packingNumber}】已经扫描`)
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true

10
src/pages/purchaseReceipt/job/receiptJob.vue

@ -51,6 +51,7 @@ const todayTime = ref('')
const status = ref('1,2') // const status = ref('1,2') //
const detailOptions = ref([]) const detailOptions = ref([])
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const scanMessage = ref('')
const filter = ref() const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopup = ref() const jobInfoPopup = ref()
@ -213,8 +214,9 @@ const getDataListByType = (code, type) => {
showMessage(error) showMessage(error)
}) })
} }
const openJobDetail = (item, packingNumber = '') => { const openJobDetail = (item, scanMessage = '') => {
proxy.$tab.navigateTo(`./receiptDetail?id=${item.masterId}&status=${item.status}&operation=${props.operation}&scaned=${props.packingNumber}`) proxy.$tab.navigateTo(`./receiptDetail?id=${item.masterId}&status=${item.status}&operation=${this.operation}&scanMessage=${scanMessage}`)
scanMessage.value = ''
} }
const showItemList = (itemList) => { const showItemList = (itemList) => {
jobListPopup.value.openPopup(itemList) jobListPopup.value.openPopup(itemList)
@ -293,12 +295,13 @@ const selectItem = (item, isScanedASN = false) => {
if (isScanedASN) { if (isScanedASN) {
openJobDetail(item) openJobDetail(item)
} else { } else {
openJobDetail(item, item.packingNumber) openJobDetail(item, scanMessage.value)
} }
} }
const getScanResult = (result) => { const getScanResult = (result) => {
try { try {
scanMessage.value = ''
let filters = [] let filters = []
if (result.label.barType == 'BarCode') { if (result.label.barType == 'BarCode') {
// ASN // ASN
@ -359,6 +362,7 @@ const getScanResult = (result) => {
pageSize: 100 pageSize: 100
}) })
.then((res) => { .then((res) => {
scanMessage.value = result.scanMessage
const resultList = res.data.list const resultList = res.data.list
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach((item) => { resultList.forEach((item) => {

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

@ -72,7 +72,7 @@ const toLocationAreaTypeList = ref([])
const jobStatus = ref('') const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const isCheckLocation = ref(false) const isCheckLocation = ref(false)
const scanedPackingNumber = ref('') const scanMessage = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanLocation = ref() const comScanLocation = ref()
const comMessageRef = ref() const comMessageRef = ref()
@ -81,7 +81,7 @@ onLoad((option) => {
title: `${option.title}详情` title: `${option.title}详情`
}) })
id.value = option.id id.value = option.id
scanedPackingNumber.value = option.scaned || '' scanMessage.value = option.scanMessage || ''
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (option.status == '1') {
@ -158,18 +158,10 @@ const getDetail = () => {
} else { } else {
toLocationCode.value = jobToLocationCode.value toLocationCode.value = jobToLocationCode.value
} }
detailSource.value.forEach((r) => { //
r.subList.forEach((s) => { if (scanMessage.value) {
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { openScanPopupSimulate(scanMessage.value)
s.scaned = true
s.cancleScanedHiht = true
s.packList.forEach((item) => (item.scaned = true))
s.inventoryStatus = s.inspectResult //
openScanPopupSimulate(s)
scanedPackingNumber.value = ''
} }
})
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -209,7 +201,7 @@ const updateData = () => {
calcTreeHandleQty(detailSource.value) calcTreeHandleQty(detailSource.value)
} }
// //
const openScanPopupSimulate = (item) => { const openScanPopupSimulate = (message) => {
let fromlocationCode = '' let fromlocationCode = ''
const fromlocationList = [] const fromlocationList = []
for (let i = 0; i < detailSource.value.length; i++) { 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 = () => { const openScanPopup = () => {
let fromlocationCode = '' let fromlocationCode = ''

7
src/pages/putaway/job/putawayJob.vue

@ -51,6 +51,7 @@ const status = ref('1,2') // 待处理 、进行中
const detailOptions = ref([]) const detailOptions = ref([])
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const title = ref('') const title = ref('')
const scanMessage = ref('')
const filter = ref() const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const scanPopup = ref() const scanPopup = ref()
@ -163,6 +164,7 @@ const getList = (type) => {
} }
const openJobDetail = (item) => { const openJobDetail = (item) => {
proxy.$tab.navigateTo(`./putawayDetail?id=${item.masterId}&status=${item.status}&title=${title.value}`) proxy.$tab.navigateTo(`./putawayDetail?id=${item.masterId}&status=${item.status}&title=${title.value}`)
scanMessage.value = ''
} }
const selectedItem = (item) => { const selectedItem = (item) => {
@ -273,11 +275,13 @@ const openScanPopup = () => {
const selectItem = (item) => { const selectItem = (item) => {
scanPopup.value.closeScanPopup() scanPopup.value.closeScanPopup()
uni.navigateTo({ 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) => { const getScanResult = (result) => {
scanMessage.value = ''
try { try {
const filters = [ const filters = [
{ {
@ -322,6 +326,7 @@ const getScanResult = (result) => {
pageSize: 100 pageSize: 100
}) })
.then((res) => { .then((res) => {
scanMessage.value = result.scanMessage
const resultList = res.data.list const resultList = res.data.list
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach((item) => { resultList.forEach((item) => {

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

@ -7,26 +7,6 @@
扫描箱码 扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text> <text class="fr" @click="closeScanPopup()">关闭</text>
</view> </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-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> <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 { getBalanceByManagementPrecision } from '@/common/balance.js'
import { getDirectoryItemArray } from '../../../common/directory.js' import { getDirectoryItemArray } from '../../../common/directory.js'
import { getLabelInfo } from '@/common/label.js'
const props = defineProps({ const props = defineProps({
title: { title: {
@ -104,7 +85,6 @@ const issueRecord = ref([]) // 发料历史
const expand = ref(true) const expand = ref(true)
const scanOptions = ref({}) const scanOptions = ref({})
const editItem = ref({}) const editItem = ref({})
const positionInfo = ref('请选择位置')
const positionList = ref([]) const positionList = ref([])
const defaultValueList = ref([]) const defaultValueList = ref([])
const label = ref({}) const label = ref({})
@ -131,7 +111,19 @@ const openScanPopup = (content, jobcontent) => {
show.value = true show.value = true
}, 500) }, 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 = () => { const closeScanPopup = () => {
show.value = false show.value = false
emit('closeScan') emit('closeScan')
@ -554,11 +546,15 @@ const remove = (record, index) => {
} }
const packGetFocus = () => { const packGetFocus = () => {
if (comscan.value) {
comscan.value.getfocus() comscan.value.getfocus()
} }
}
const packLoseFocus = () => { const packLoseFocus = () => {
if (comscan.value) {
comscan.value.losefocus() comscan.value.losefocus()
} }
}
const showMessage = (message, callback) => { const showMessage = (message, callback) => {
setTimeout((r) => { setTimeout((r) => {
packLoseFocus() packLoseFocus()

7
src/pages/repleinsh/job/repleinshDetail.vue

@ -80,7 +80,7 @@ const toLocationInfo = ref({})
const businessTypeInfo = ref({}) const businessTypeInfo = ref({})
const managementList = ref([]) const managementList = ref([])
const isAllReceived = ref(false) const isAllReceived = ref(false)
const operation = ref('') const scanMessage = ref('')
const comScanIssuePackRef = ref() const comScanIssuePackRef = ref()
const locationTypes = ref() const locationTypes = ref()
@ -89,7 +89,7 @@ onLoad((option) => {
title: `${option.title}详情` title: `${option.title}详情`
}) })
id.value = option.id id.value = option.id
operation.value = option.operation scanMessage.value = option.scanMessage
if (id.value != undefined) { if (id.value != undefined) {
// //
if (option.status == '1') { if (option.status == '1') {
@ -163,6 +163,9 @@ const getDetail = () => {
console.log(`库位${toLocationCode.value}`) console.log(`库位${toLocationCode.value}`)
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes)
detailSource.value = getDataSource(detailSource.value, subList.value) detailSource.value = getDataSource(detailSource.value, subList.value)
if (scanMessage.value) {
comScanIssuePackRef.value.openScanPopupForJobSimulate(detailSource.value, jobContent.value, scanMessage.value)
}
setTimeout((r) => { setTimeout((r) => {
resizeCollapse() resizeCollapse()
}, 100) }, 100)

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

@ -53,6 +53,7 @@ const detailOptions = ref([])
const scanMessage = ref('') const scanMessage = ref('')
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const title = ref('') const title = ref('')
const scanMessage = ref('')
const filter = ref() const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopupRef = ref() const jobInfoPopupRef = ref()
@ -173,6 +174,7 @@ const fromLocationCode = (fromLocationCode) => {
} }
const openJobDetail = (item, scanMessageParams = '') => { const openJobDetail = (item, scanMessageParams = '') => {
proxy.$tab.navigateTo(`./repleinshDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage.value}&title=${title.value}`) proxy.$tab.navigateTo(`./repleinshDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage.value}&title=${title.value}`)
scanMessage.value = ''
} }
const selectedItem = (item) => { const selectedItem = (item) => {
openJobDetail(item) openJobDetail(item)
@ -279,6 +281,7 @@ const selectItem = (item) => {
openJobDetail(item, scanMessage.value) openJobDetail(item, scanMessage.value)
} }
const getScanResult = (result) => { const getScanResult = (result) => {
scanMessage.value = ''
if (!result.label.batch) { if (!result.label.batch) {
showMessage('批次为空') showMessage('批次为空')
return return

Loading…
Cancel
Save