高拍仪批量扫码问题

20240912_adapter
yewj 5 months ago
parent f6799b0b46
commit 7828bbf1aa

@ -6,7 +6,7 @@ ENV = 'development'
# 开发环境
# VUE_APP_BASE_API = 'https://mudi.dsxyy.org/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://192.168.0.166:9991'
VUE_APP_BASE_API = 'http://127.0.0.1:9991'
VUE_APP_SYNC_API ="http://127.0.0.1:10001"
# VUE_APP_BASE_API = 'http://dm.xmglxp.com:81/UDI_WMS_MC/'
# 应用访问路径 例如使用前缀 /admin/

@ -26,7 +26,6 @@ export function deleteCodesTempById(query) {
}
export function deleteCodesTempByCodes(query) {
return axios({
url: "warehouse/inout/deleteCodesTempBycodes",

@ -347,31 +347,31 @@ import {
enterCodeWeb, submitAllocateBiz, rollbackWaitcheck, submitCodeResult, submitCheckResult, delmitBiz,
batchVailCode, batchAddCode, batchAddCodeByOrderFinish, upProcessing, getProcessingOrder
} from '@/api/inout/order'
import { filterSubAll, findByFrom, findInvByUser } from '@/api/system/invSubWarehouse'
import { parseTime } from '@/utils/coTools'
import { getBasicUnitMaintains } from '@/api/basic/basicUnitMaintain'
import {filterSubAll, findByFrom, findInvByUser} from '@/api/system/invSubWarehouse'
import {parseTime} from '@/utils/coTools'
import {getBasicUnitMaintains} from '@/api/basic/basicUnitMaintain'
import editCodeDialog from '@/views/inout/DialogEditCode'
import DialogCreateOrderSelect from '@/views/inout/DialogCreateOrderSelect'
import { deleteCodesTempByCodes } from '@/api/inout/order'
import {deleteCodesTempByCodes} from '@/api/inout/order'
import codesPanel from '@/views/collect/PanelCreateCodes'
import codeDetailPanel from '@/views/collect/PanelCreateCodeDetail'
import SelectCollectOrderEndDialog from '@/views/collect/SelectCollectOrderEndDialog'
import A from '../../plugins/KeyScaner'
import { findByInvUser, getBusTypeList } from '@/api/basic/busType'
import { getInvSpaceList } from '@/api/inventory/invSpace'
import {findByInvUser, getBusTypeList} from '@/api/basic/busType'
import {getInvSpaceList} from '@/api/inventory/invSpace'
import DialogSelectUnit from '@/views/inout/DialogSelectUnit'
import selectRlDialog from '@/views/inout/DialogSelectRl'
import DialogSelectSpace from '@/views/inout/DialogSelectSpace'
import { isBlank } from '@/utils/strUtil'
import { filterNoPage, remoteFilter } from '@/api/basic/sicker/skPersonApi'
import {isBlank} from '@/utils/strUtil'
import {filterNoPage, remoteFilter} from '@/api/basic/sicker/skPersonApi'
import dialogInvProduct from '@/views/inout/DialogSelectInvProduct'
import { printSplitLabel } from '@/api/collect/splitCreateOrder'
import {printSplitLabel} from '@/api/collect/splitCreateOrder'
import chooseDraftOrderDialog from './chooseDraftOrderDialog'
import { getUserBindWork } from '@/api/basic/collectPoint/userWorkplace'
import { getWorkBindBusTypes } from '@/api/basic/workPlace/sysWorkplaceDocuments'
import { filterWorkOptimize } from '@/api/basic/workPlace/sysWorkplaceManage'
import {getUserBindWork} from '@/api/basic/collectPoint/userWorkplace'
import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {filterWorkOptimize} from '@/api/basic/workPlace/sysWorkplaceManage'
export default {
name: 'ioCreateOrder',
@ -529,16 +529,16 @@ export default {
formRules: {
corpOrderId: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
{required: true, message: '请输入单据号', trigger: 'blur'}
],
createTime: [
{ required: true, message: '请选择创建时间', trigger: 'blur' }
{required: true, message: '请选择创建时间', trigger: 'blur'}
],
invCode: [
{ required: true, message: '请选择当前仓库', trigger: 'change' }
{required: true, message: '请选择当前仓库', trigger: 'change'}
],
action: [
{ required: true, message: '请选择单据类型', trigger: 'change' }
{required: true, message: '请选择单据类型', trigger: 'change'}
]
// acceptance: [
// {required: true, message: "", trigger: "blur"},
@ -1414,7 +1414,7 @@ export default {
type: 'warning'
})
.then(() => {
let query = { billNo: this.orderFormData.billNo }
let query = {billNo: this.orderFormData.billNo}
this.retractLoading = true
rollbackWaitcheck(query)
.then((response) => {
@ -1662,7 +1662,7 @@ export default {
}
this.rowData.workPlaceCode = this.orderFormData.workPlaceCode
this.rowData.fifoSplit = this.orderFormData.fifoSplit
this.$router.push({ query: { ...this.$route.query, splitType: this.splitType }, path: this.$route.path })
this.$router.push({query: {...this.$route.query, splitType: this.splitType}, path: this.$route.path})
this.chooseDraftOrderVisible = true
},
closeChooseDialog() {
@ -1769,7 +1769,7 @@ export default {
if (this.scanStatus == 1) {
const codeArray = this.codeFormData.code.split(';')
let query = {
orderId : this.orderFormData.billNo,
orderId: this.orderFormData.billNo,
codeList: codeArray
}
//
@ -1836,7 +1836,7 @@ export default {
}
},
removeCodesTemp(query){
removeCodesTemp(query) {
//todo this.codeArray id deleteCodesTempById
deleteCodesTempByCodes(query).then(res => {
if (res.code == 20000) {
@ -1860,14 +1860,6 @@ export default {
this.$refs.multipleTable.clearSelection()
this.$refs.multipleTable.toggleAllSelection()
},
handleSizeChange(val) {
this.query.limit = val
this.getCodeList()
},
handleCurrentChange(val) {
this.query.page = val
this.getCodeList()
},
intentBack() {
this.$router.go(-1)
@ -1962,7 +1954,7 @@ export default {
const binaryData = []
binaryData.push(response)
let url = window.URL.createObjectURL(
new Blob(binaryData, { type: 'application/pdf' })
new Blob(binaryData, {type: 'application/pdf'})
)
window.open(url)
}).catch(() => {
@ -2072,7 +2064,7 @@ export default {
if (this.scanStatus == 1) {
const codeArray = this.codeFormData.code.split(';')
let query = {
orderId : this.orderFormData.billNo,
orderId: this.orderFormData.billNo,
codeList: codeArray
}
//
@ -2143,7 +2135,7 @@ export default {
this.successVisible = true
this.result = this.result + ';' + vailCodeResultResponses[i].code
} else if (data.status == 2) {
if (this.result == ''){
if (this.result == '') {
this.successVisible = false
}
this.warnResult = this.warnResult + '\n' + vailCodeResultResponses[i].code + ':' + vailCodeResultResponses[i].errMsg
@ -2178,10 +2170,19 @@ export default {
},
handleScanComplete(fullScanData) {
console.log('接收 recCodes event:', fullScanData.join(';'))
let params = {
codeList: fullScanData
if (this.scanStatus == 1) {
let query = {
orderId: this.orderFormData.billNo,
codeList: fullScanData
}
//
this.removeCodesTemp(query)
} else {
let params = {
codeList: fullScanData
}
this.batchVailCode(params)
}
this.batchVailCode(params)
},
socketListener() {
@ -2191,7 +2192,7 @@ export default {
const SCAN_TIMEOUT = 1000 // 1
const self = this
console.log('启用监听')
this.ws.onmessage = function(event) {
this.ws.onmessage = function (event) {
let scanData = event.data //
let currentTime = Date.now()
console.log(scanData)
@ -2227,11 +2228,10 @@ export default {
if (this.ws == null || this.ws.readyState === WebSocket.CLOSED) {
this.ws = new WebSocket('ws://127.0.0.1:9988')
const self = this
this.ws.onopen = function(evt) {
this.ws.onopen = function (evt) {
console.log('工位上货WebSocket 连接中 ...')
self.socketListener()
}
}
} else {
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
@ -2240,20 +2240,20 @@ export default {
}
}
},
handleCodeArray(codeArray){
handleCodeArray(codeArray) {
this.codeArray = codeArray;
}
},
filters: {},
mounted() {
document.body.ondrop = function(event) {
document.body.ondrop = function (event) {
event.preventDefault()
event.stopPropagation()
}
var that = this
var inputer = document.getElementById('inputer')
window.sc = new A.KeyScaner(inputer) //DOM
sc.onInput = function(text) {
sc.onInput = function (text) {
if (text.includes('delete')) {
that.codeFormData.code = ''
that.sictomText = ''
@ -2278,27 +2278,13 @@ export default {
window.addEventListener('gwsh', this.handleRecCodesEvent)
}
document.addEventListener('visibilitychange', this.handleVisibilityChange)
// window.addEventListener('storage', (event) => {
// console.log("websocket")
// if (this.ws && this.ws.readyState === WebSocket.OPEN) {
// this.ws.close();
// console.log("websocket")
// } else {
// if (!this.ws) {
// this.ws = new WebSocket("ws://127.0.0.1:9988");
// this.ws.onopen = function (evt) {
// console.log("WebSocket ...");
// };
// this.socketListener()
// }
// }
// });
// window.dispatchEvent(new CustomEvent('storage', null));
this.handleVisibilityChange()
},
beforeDestroy() {
window.removeEventListener('gwsh', this.handleRecCodesEvent)
this.ws.close()
this.ws.onclose = function(evt) {
this.ws.onclose = function (evt) {
console.log('工位上货Connection closed.')
}
document.removeEventListener('visibilitychange', this.handleVisibilityChange)

Loading…
Cancel
Save