|
|
|
@ -19,21 +19,23 @@
|
|
|
|
|
<el-button-group
|
|
|
|
|
style="display: flex; margin-top: 5px; float: right"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="paizhao()" :loading="submitLoading"
|
|
|
|
|
v-if="splitType=='out' && !redMesg && collectSet.autoDecode == 0 " style="margin-right: 8px;border-radius: 5%;" :disabled=" collectSet.autoDecode == 1"
|
|
|
|
|
v-show="isLinkDisabled"
|
|
|
|
|
>拍照解码
|
|
|
|
|
</el-button>
|
|
|
|
|
<!--<el-button size="mini" type="primary" @click.native="deleteCode" :loading="submitLoading"-->
|
|
|
|
|
<!-- v-if="splitType=='out' && labelName == 1" style="margin-right: 8px;border-radius: 5%;"-->
|
|
|
|
|
<!-- v-show="isLinkDisabled" :disabled="orderFormData.billNo == null || (splitType=='out' && redMesg)"-->
|
|
|
|
|
<!-->扫码剔除-->
|
|
|
|
|
<!--</el-button>-->
|
|
|
|
|
<!--<el-button size="mini" type="primary" @click.native="overdeleteCode" :loading="submitLoading"-->
|
|
|
|
|
<!-- v-if="splitType=='out' && labelName == 2" style="margin-right: 8px;border-radius: 5%;"-->
|
|
|
|
|
<!--<el-button size="mini" type="primary" @click.native="paizhao()" :loading="submitLoading"-->
|
|
|
|
|
<!-- v-if="splitType=='out' && !redMesg && collectSet.autoDecode == 0 " style="margin-right: 8px;border-radius: 5%;" :disabled=" collectSet.autoDecode == 1"-->
|
|
|
|
|
<!-- v-show="isLinkDisabled"-->
|
|
|
|
|
<!-->结束剔除-->
|
|
|
|
|
<!-->拍照解码-->
|
|
|
|
|
<!--</el-button>-->
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="deleteCode" :loading="submitLoading"
|
|
|
|
|
v-if="splitType=='out' && labelName == 1" style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
v-show="isLinkDisabled"
|
|
|
|
|
:disabled="orderFormData.billNo == null "
|
|
|
|
|
>扫码剔除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="overdeleteCode" :loading="submitLoading"
|
|
|
|
|
v-if="splitType=='out' && labelName == 2" style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
v-show="isLinkDisabled"
|
|
|
|
|
:disabled="orderFormData.billNo == null "
|
|
|
|
|
>结束剔除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="selectPrescribe()" :loading="submitLoading"
|
|
|
|
|
v-if="splitType=='out' && !redMesg" style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
v-show="isLinkDisabled"
|
|
|
|
@ -46,7 +48,7 @@
|
|
|
|
|
<!--</el-button>-->
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="delOrder()" :loading="submitLoading"
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;" v-show="isLinkDisabled"
|
|
|
|
|
:disabled="orderFormData.billNo == null && curQueueName == '' "
|
|
|
|
|
:disabled="orderFormData.billNo == null"
|
|
|
|
|
>取消上货
|
|
|
|
|
</el-button>
|
|
|
|
|
<!--<el-button size="mini" type="primary" @click.native="draftOrder()" :loading="submitLoading"-->
|
|
|
|
@ -57,7 +59,7 @@
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
v-show="isLinkDisabled"
|
|
|
|
|
:disabled="orderFormData.billNo == null && curQueueName == '' "
|
|
|
|
|
:disabled="orderFormData.billNo == null "
|
|
|
|
|
>上货完成
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-button size="mini" type="primary" @click.native="" :loading="submitLoading" v-show="isLinkDisabled"
|
|
|
|
@ -1239,6 +1241,7 @@ export default {
|
|
|
|
|
//DI绑定多个产品,请指定对应产品 时候传递关键字做过滤
|
|
|
|
|
this.codeFormData.key = 'key'
|
|
|
|
|
this.selectRlVisible = true
|
|
|
|
|
this.errMsg()
|
|
|
|
|
} else if (response.code == 503) {
|
|
|
|
|
//该产品绑定多个供应商处理
|
|
|
|
|
this.curRow = response.data
|
|
|
|
@ -1307,6 +1310,7 @@ export default {
|
|
|
|
|
message: '提交失败!' + this.editTitle,
|
|
|
|
|
customClass: 'messageIndex'
|
|
|
|
|
})
|
|
|
|
|
this.errMsg()
|
|
|
|
|
} else if (response.code == 511) {
|
|
|
|
|
//该UDI码绑定多个货位处理
|
|
|
|
|
this.spaceCodeList = response.data
|
|
|
|
@ -1321,6 +1325,7 @@ export default {
|
|
|
|
|
this.$refs.inputRef.select()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.errMsg()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// this.loading = false;
|
|
|
|
@ -1601,6 +1606,8 @@ export default {
|
|
|
|
|
submitOrderWeb(tQuery).then((response) => {
|
|
|
|
|
this.submitLoading = false
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
const audio = new Audio(require('@/assets/audioFiles/put.mp3'));
|
|
|
|
|
audio.play();
|
|
|
|
|
this.$message.success('提交成功')
|
|
|
|
|
this.successCloseData()
|
|
|
|
|
this.result = ''
|
|
|
|
@ -1750,6 +1757,44 @@ export default {
|
|
|
|
|
this.saveLoading = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
fastDelOrder(){
|
|
|
|
|
|
|
|
|
|
let tQuery = Object.assign(
|
|
|
|
|
JSON.parse(JSON.stringify(this.orderFormData))
|
|
|
|
|
)
|
|
|
|
|
tQuery.billNo = this.orderFormData.billNo
|
|
|
|
|
tQuery.orderType = 2
|
|
|
|
|
if (this.orderFormData.billNo == null) {
|
|
|
|
|
this.redMesg = true
|
|
|
|
|
this.curQueueName = ""
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.saveLoading = true
|
|
|
|
|
if (this.orderFormData.billNo != null) {
|
|
|
|
|
deleteByOrderId(tQuery).then((response) => {
|
|
|
|
|
this.saveLoading = false
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
const audio = new Audio(require('@/assets/audioFiles/removal.mp3'));
|
|
|
|
|
audio.play();
|
|
|
|
|
this.$message.success('取消上货成功')
|
|
|
|
|
this.successCloseData()
|
|
|
|
|
this.result = ''
|
|
|
|
|
this.$refs.inputRef.focus()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message)
|
|
|
|
|
}
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.saveLoading = false
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.successCloseData()
|
|
|
|
|
this.result = ''
|
|
|
|
|
this.$refs.inputRef.focus()
|
|
|
|
|
}
|
|
|
|
|
this.sharedData = 'over'
|
|
|
|
|
//上货页面完成 发送 over 给tabs 页面
|
|
|
|
|
EventBus.$emit('update-data', { message: this.sharedData });
|
|
|
|
|
},
|
|
|
|
|
delOrder() {
|
|
|
|
|
|
|
|
|
|
let tQuery = Object.assign(
|
|
|
|
@ -1772,6 +1817,8 @@ export default {
|
|
|
|
|
deleteByOrderId(tQuery).then((response) => {
|
|
|
|
|
this.saveLoading = false
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
const audio = new Audio(require('@/assets/audioFiles/removal.mp3'));
|
|
|
|
|
audio.play();
|
|
|
|
|
this.$message.success('取消上货成功')
|
|
|
|
|
this.successCloseData()
|
|
|
|
|
this.result = ''
|
|
|
|
@ -1917,6 +1964,7 @@ export default {
|
|
|
|
|
this.scanCode = ''
|
|
|
|
|
this.originCode = ""
|
|
|
|
|
this.$message.error(response.message)
|
|
|
|
|
this.errMsg()
|
|
|
|
|
} else if (response.code == 503) {
|
|
|
|
|
this.checkSuccess = false
|
|
|
|
|
this.isSuccess = false
|
|
|
|
@ -1956,6 +2004,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
errMsg(){
|
|
|
|
|
const audio = new Audio(require('@/assets/audioFiles/error.mp3'));
|
|
|
|
|
audio.play();
|
|
|
|
|
},
|
|
|
|
|
verifyScanCount(codeArray){
|
|
|
|
|
//判断扫码数量是否超出或少于设置扫码数量
|
|
|
|
|
if (this.collectSet.scanMaxCount != null && this.collectSet.scanMaxCount != 0) {
|
|
|
|
@ -2552,6 +2604,23 @@ export default {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
addKeyboardShortcut() {
|
|
|
|
|
window.addEventListener('keydown', this.handleKeyboardShortcut);
|
|
|
|
|
},
|
|
|
|
|
removeKeyboardShortcut() {
|
|
|
|
|
window.removeEventListener('keydown', this.handleKeyboardShortcut);
|
|
|
|
|
},
|
|
|
|
|
handleKeyboardShortcut(event) {
|
|
|
|
|
if (event.key === 'F9' || event.keyCode === 120) { // keyCode 120 是 F9 的键码
|
|
|
|
|
event.preventDefault(); // 阻止默认行为
|
|
|
|
|
this.submit()
|
|
|
|
|
}
|
|
|
|
|
if (event.key === 'F10' || event.keyCode === 121) {
|
|
|
|
|
event.preventDefault(); // 阻止默认行为(如果有的话)
|
|
|
|
|
// this.push();
|
|
|
|
|
this.fastDelOrder()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
filters: {},
|
|
|
|
@ -2595,6 +2664,8 @@ export default {
|
|
|
|
|
console.log("上货页面接受数据:::",data.message)
|
|
|
|
|
this.handleData(data.message)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.addKeyboardShortcut();
|
|
|
|
|
},
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
window.removeEventListener('gwsh', this.handleRecCodesEvent)
|
|
|
|
@ -2604,6 +2675,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
document.removeEventListener('visibilitychange', this.handleVisibilityChange)
|
|
|
|
|
EventBus.$off('sendCreateData');
|
|
|
|
|
this.removeKeyboardShortcut();
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// this.splitType = this.$route.query.splitType;
|
|
|
|
|