2/27 器械 药品 虚拟槽位 上货-剔除 bug优化

20240912_adapter
wangwei 4 months ago
parent 99862eb374
commit 3a9b2fdd3b

@ -639,14 +639,14 @@ export default {
codeArray: [], codeArray: [],
curQueueName: "", curQueueName: "",
scanReCount: 0, scanReCount: 0,
curQueue: null, curQueue: {},
redMesg: false, redMesg: false,
redMesgOld: false, redMesgOld: false,
productName: null, productName: null,
orderStatus: false,// orderStatus: false,//
workPlaceQueueCode:"", workPlaceQueueCode:"",
collectSet: {}, collectSet: {},
sharedData: '' sharedData: '',
} }
}, },
components: { components: {
@ -1196,6 +1196,14 @@ export default {
this.$refs.inputRef.focus() this.$refs.inputRef.focus()
this.$refs.inputRef.select() this.$refs.inputRef.select()
this.orderFormData.relId = null this.orderFormData.relId = null
if (response.data.queueCode != null){
//
this.curQueue.code = response.data.queueCode
this.sharedData = response.data.queueCode
EventBus.$emit('update-data', { message: this.sharedData });
// //
this.getOrder()
}
} else { } else {
if (response.code == 502) { if (response.code == 502) {
//ID //ID
@ -1341,7 +1349,9 @@ export default {
}, },
getOrderData(orderDetail) { getOrderData(orderDetail) {
this.productName = orderDetail.coName this.productName = orderDetail.coName
this.curQueueName = "当前取货槽:" + this.productName + "(" + this.curQueue.code + ")" if (this.queueStatus == 1){
this.curQueueName = "当前取货槽:" + this.productName + "(" + this.curQueue.code + ")"
}
this.orderStatus = true this.orderStatus = true
}, },
getCount(count){ getCount(count){
@ -1810,19 +1820,21 @@ export default {
if (this.splitType == 'out') { if (this.splitType == 'out') {
if (!this.scanCode.includes("DMQ")) { if (!this.scanCode.includes("DMQ")) {
if (this.queueStatus == "0" && this.orderFormData.workPlaceQueueCode) { // if (this.queueStatus == "0" && this.orderFormData.workPlaceQueueCode) {
this.$message.warning('当前工位无需按取货槽上架') // this.$message.warning('')
return; // return;
} else if (this.queueStatus == "1" && isBlank(this.orderFormData.workPlaceQueueCode)) { // } else
if (this.queueStatus == "1" && isBlank(this.orderFormData.workPlaceQueueCode)) {
this.scanCode = '' this.scanCode = ''
this.$message.warning('当前工位需按取货槽上架') this.$message.warning('当前工位需按取货槽上架')
return; return;
} }
} else { } else {
if (this.queueStatus == "0" && this.orderFormData.workPlaceQueueCode) { // if (this.queueStatus == "0" && this.orderFormData.workPlaceQueueCode) {
this.$message.warning('当前工位无需按取货槽上架') // this.$message.warning('')
return; // return;
} else if (this.queueStatus == "1" && !this.orderFormData.workPlaceQueueCode) { // } else
if (this.queueStatus == "1" && !this.orderFormData.workPlaceQueueCode) {
this.$message.warning('当前工位需按取货槽上架') this.$message.warning('当前工位需按取货槽上架')
return; return;
} }
@ -2471,33 +2483,41 @@ export default {
code : data, code : data,
workPlaceIdFk : this.workplaceId workPlaceIdFk : this.workplaceId
} }
getByCode(query).then((response) => { if (this.queueStatus == 0){
this.loading = false; this.sharedData = this.curQueue.code
if (response.code == 20000) { EventBus.$emit('update-data', { message: this.sharedData });
this.curQueue = response.data; // //
this.productName = this.curQueue.cpmctymc this.getOrder()
if (isBlank(this.productName)) { }else {
this.curQueueName = "当前取货槽:" + this.curQueue.code getByCode(query).then((response) => {
this.loading = false;
if (response.code == 20000) {
this.curQueue = response.data;
this.productName = this.curQueue.cpmctymc
if (isBlank(this.productName)) {
this.curQueueName = "当前取货槽:" + this.curQueue.code
} else {
this.curQueueName = "当前取货槽:" + this.productName + "(" + this.curQueue.code + ")"
}
this.orderFormData.workPlaceQueueCode = this.curQueue.code
this.scanCode = '';
this.redMesg = false
//
//
this.sharedData = this.curQueue.code
EventBus.$emit('update-data', { message: this.sharedData });
// //
this.getOrder()
} else { } else {
this.curQueueName = "当前取货槽:" + this.productName + "(" + this.curQueue.code + ")" this.scanCode = ''
this.$message.error(response.message)
} }
this.orderFormData.workPlaceQueueCode = this.curQueue.code }).catch(() => {
this.scanCode = '';
this.redMesg = false })
// return true
// }
this.sharedData = this.curQueue.code
EventBus.$emit('update-data', { message: this.sharedData });
// //
this.getOrder()
} else {
this.scanCode = ''
this.$message.error(response.message)
}
}).catch(() => {
})
return true
} }
}, },
filters: {}, filters: {},

@ -296,6 +296,7 @@ import {batchAddCode, batchVailCode, enterCodeWeb} from '@/api/inout/order'
import {getSet} from '@/api/collect/collectSet' import {getSet} from '@/api/collect/collectSet'
import A from '@/plugins/KeyScaner' import A from '@/plugins/KeyScaner'
import { EventBus } from '@/eventBus'; // 线 import { EventBus } from '@/eventBus'; // 线
import { getUserBindWork } from '@/api/basic/collectPoint/userWorkplace'
const SLOT_CODE_PREFIX = 'DMQ' const SLOT_CODE_PREFIX = 'DMQ'
@ -373,7 +374,10 @@ export default {
valiCodes: [], valiCodes: [],
//weksolket //weksolket
sitcomScan: false, sitcomScan: false,
sictomText: '' sictomText: '',
allWorkPlaces:[],
//
queueStatus: null,
} }
}, },
methods: { methods: {
@ -493,8 +497,8 @@ export default {
this.getSplitCodes() this.getSplitCodes()
this.init() this.init()
// //
console.log("shanchu wan ma",this.message) // console.log("shanchu wan ma",this.message)
if (!isBlank(this.message)){ if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message }); EventBus.$emit('sendCreateData', { message: this.message });
} }
} else { } else {
@ -535,7 +539,7 @@ export default {
this.getCodes() this.getCodes()
this.getSplitCodes() this.getSplitCodes()
this.printMutiCodeResult(res.data.vailCodeResultResponses) this.printMutiCodeResult(res.data.vailCodeResultResponses)
if (!isBlank(this.message)){ if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message }); EventBus.$emit('sendCreateData', { message: this.message });
} }
} else { } else {
@ -631,8 +635,10 @@ export default {
if (response.code == 20000) { if (response.code == 20000) {
this.curQueue = response.data this.curQueue = response.data
this.productName = this.curQueue.cpmctymc this.productName = this.curQueue.cpmctymc
this.curQueueName = this.getQueueName() if (this.queueStatus == 1){
this.curProductData = this.getCurProduct() this.curQueueName = this.getQueueName()
this.curProductData = this.getCurProduct()
}
this.redMeg = false this.redMeg = false
this.isCheckQueue = true this.isCheckQueue = true
this.init() this.init()
@ -713,7 +719,7 @@ export default {
this.getSplitCodes() this.getSplitCodes()
this.init() this.init()
this.alertInit() this.alertInit()
if (!isBlank(this.message)){ if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message }); EventBus.$emit('sendCreateData', { message: this.message });
} }
return this.$message.success('回退成功') return this.$message.success('回退成功')
@ -729,9 +735,9 @@ export default {
}) })
}, },
dropCode() { dropCode() {
this.redMeg = true // this.redMeg = true
this.curQueueName = '' this.curQueueName = ''
this.isCheckQueue = false // this.isCheckQueue = false
this.curProductData = '' this.curProductData = ''
this.curQueue = null this.curQueue = null
this.queueCodes = [] this.queueCodes = []
@ -754,6 +760,7 @@ export default {
if (!isBlank(this.message) && this.message.includes("DMQ")){ if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message }); EventBus.$emit('sendCreateData', { message: this.message });
} }
this.findAllWorkPlaces()
}, },
paizhao() { paizhao() {
if (this.ws && this.ws.readyState === WebSocket.OPEN) { if (this.ws && this.ws.readyState === WebSocket.OPEN) {
@ -919,7 +926,31 @@ export default {
this.handleSlotCodeScan() this.handleSlotCodeScan()
} }
} }
} },
findAllWorkPlaces() {
let query = {
page: 1,
limit: 100,
}
getUserBindWork(query).then((res) => {
this.allWorkPlaces = res.data.list || [];
{
let item = this.allWorkPlaces.find(item => item.workplaceId == this.workplaceId )
this.queueStatus = item.queueStatus
if (this.curQueue == null){
if (this.queueStatus == 0) {
this.redMeg = false
this.isCheckQueue = true
}else {
this.redMeg = true
this.isCheckQueue = false
}
}
}
})
},
}, },
computed: { computed: {
// //
@ -993,7 +1024,8 @@ export default {
}, },
created() { created() {
this.workplaceId = this.$route.query.workplaceId this.workplaceId = this.$route.query.workplaceId
// this.selectSysParam() this.findAllWorkPlaces()
this.selectSysParam()
if (!isBlank(this.message) && this.message.includes("DMQ")){ if (!isBlank(this.message) && this.message.includes("DMQ")){
this.scanCode = this.message this.scanCode = this.message
this.handleSlotCodeScan() this.handleSlotCodeScan()

@ -1197,9 +1197,8 @@ export default {
this.$refs.inputRef.select() this.$refs.inputRef.select()
this.orderFormData.relId = null this.orderFormData.relId = null
if (response.data.queueCode != null){ if (response.data.queueCode != null){
console.log("zhzhzhzhzhzh",response.data.queueCode)
// //
// this.curQueue.code = response.data.queueCode this.curQueue.code = response.data.queueCode
this.sharedData = response.data.queueCode this.sharedData = response.data.queueCode
EventBus.$emit('update-data', { message: this.sharedData }); EventBus.$emit('update-data', { message: this.sharedData });
// // // //
@ -2484,34 +2483,35 @@ export default {
EventBus.$emit('update-data', { message: this.sharedData }); EventBus.$emit('update-data', { message: this.sharedData });
// // // //
this.getOrder() this.getOrder()
} }else {
getByCode(query).then((response) => { getByCode(query).then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.curQueue = response.data; this.curQueue = response.data;
this.productName = this.curQueue.cpmctymc this.productName = this.curQueue.cpmctymc
if (isBlank(this.productName)) { if (isBlank(this.productName)) {
this.curQueueName = "当前取货槽:" + this.curQueue.code this.curQueueName = "当前取货槽:" + this.curQueue.code
} else {
this.curQueueName = "当前取货槽:" + this.productName + "(" + this.curQueue.code + ")"
}
this.orderFormData.workPlaceQueueCode = this.curQueue.code
this.scanCode = '';
this.redMesg = false
//
//
this.sharedData = this.curQueue.code
EventBus.$emit('update-data', { message: this.sharedData });
// //
this.getOrder()
} else { } else {
this.curQueueName = "当前取货槽:" + this.productName + "(" + this.curQueue.code + ")" this.scanCode = ''
this.$message.error(response.message)
} }
this.orderFormData.workPlaceQueueCode = this.curQueue.code }).catch(() => {
this.scanCode = '';
this.redMesg = false
//
//
this.sharedData = this.curQueue.code
EventBus.$emit('update-data', { message: this.sharedData });
// //
this.getOrder()
} else {
this.scanCode = ''
this.$message.error(response.message)
}
}).catch(() => {
}) })
return true return true
}
} }
}, },
filters: {}, filters: {},

@ -499,7 +499,7 @@ export default {
this.init() this.init()
// //
console.log("shanchu wan ma",this.message) console.log("shanchu wan ma",this.message)
if (!isBlank(this.message)){ if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message }); EventBus.$emit('sendCreateData', { message: this.message });
} }
} else { } else {
@ -540,6 +540,9 @@ export default {
this.getCodes() this.getCodes()
this.getSplitCodes() this.getSplitCodes()
this.printMutiCodeResult(res.data.vailCodeResultResponses) this.printMutiCodeResult(res.data.vailCodeResultResponses)
if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message });
}
} else { } else {
return this.$message.error('删除错误') return this.$message.error('删除错误')
} }
@ -717,6 +720,9 @@ export default {
this.getSplitCodes() this.getSplitCodes()
this.init() this.init()
this.alertInit() this.alertInit()
if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message });
}
return this.$message.success('回退成功') return this.$message.success('回退成功')
} else { } else {
this.getCodes() this.getCodes()
@ -752,6 +758,9 @@ export default {
this.queueCodeTotal = 0 this.queueCodeTotal = 0
this.collectSet = null this.collectSet = null
this.alertInit() this.alertInit()
if (!isBlank(this.message) && this.message.includes("DMQ")){
EventBus.$emit('sendCreateData', { message: this.message });
}
this.findAllWorkPlaces() this.findAllWorkPlaces()
}, },
paizhao() { paizhao() {

Loading…
Cancel
Save