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