|
|
|
@ -3,74 +3,7 @@
|
|
|
|
|
<el-form :model="formData" class="order-el-form" ref="formData" label-width="120px" @submit.native.prevent>
|
|
|
|
|
<el-card>
|
|
|
|
|
|
|
|
|
|
<!-- <el-alert-->
|
|
|
|
|
<!-- style="margin-top: 15px"-->
|
|
|
|
|
<!-- :title="msgTip"-->
|
|
|
|
|
<!-- :closable="false"-->
|
|
|
|
|
<!-- type="warning">-->
|
|
|
|
|
<!--</el-alert>-->
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="0" style="margin-top: 15px">
|
|
|
|
|
<el-col :span="24" align="right">
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" @click.native="deleteCode"
|
|
|
|
|
v-if="labelName == 1"
|
|
|
|
|
:disabled="formData.billNo == null"
|
|
|
|
|
>扫码剔除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary"
|
|
|
|
|
v-if="labelName == 2"
|
|
|
|
|
@click.native="overdeleteCode"
|
|
|
|
|
>结束剔除
|
|
|
|
|
</el-button>
|
|
|
|
|
<!--<el-button-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- :disabled="formData.billNo || (this.formDataVisible != null && this.formDataVisible.scanType == 1)"-->
|
|
|
|
|
<!-- @click.native="nextCollectOrder()"-->
|
|
|
|
|
<!-->下一单-->
|
|
|
|
|
<!--</el-button>-->
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="formData.billNo ||(this.formDataVisible != null && this.formDataVisible.scanType == 1)"
|
|
|
|
|
@click.native="selectPrescribe()"
|
|
|
|
|
>选单
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="!formData.billNo"
|
|
|
|
|
@click.native="saveDraftOrder()"
|
|
|
|
|
>挂起
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="!formData.billNo"
|
|
|
|
|
@click.native="cancelOrder()"
|
|
|
|
|
>放弃
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="!formData.billNo"
|
|
|
|
|
@click.native="confirmFinishOrder()"
|
|
|
|
|
>完成
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<!-- <el-dropdown @command="handleCommand">-->
|
|
|
|
|
<!-- <el-button type="primary">-->
|
|
|
|
|
<!-- 更多功能<i class="el-icon-arrow-down el-icon--right"></i>-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
<!-- <el-dropdown-menu slot="dropdown">-->
|
|
|
|
|
<!-- <el-dropdown-item divided @click.native="handleClickOut('IoCreateOrderBlank')">工位上货</el-dropdown-item>-->
|
|
|
|
|
<!-- <el-dropdown-item divided @click.native="handleClickReturn('IoCreateOrderBlank')">工位退货-->
|
|
|
|
|
<!-- </el-dropdown-item>-->
|
|
|
|
|
<!-- <el-dropdown-item divided @click.native="handleClick('ioSplitFifoCodeBlank')">工位存量</el-dropdown-item>-->
|
|
|
|
|
<!-- <el-dropdown-item divided @click.native="handleClick('CollectOrderAllotBlank')">待处理单-->
|
|
|
|
|
<!-- </el-dropdown-item>-->
|
|
|
|
|
<!-- <el-dropdown-item divided @click.native="handleClick('CollectOrderEndBlank')">已完成单</el-dropdown-item>-->
|
|
|
|
|
<!-- </el-dropdown-menu>-->
|
|
|
|
|
<!-- </el-dropdown>-->
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row style="margin-top: 6px;margin-bottom: -6px;"
|
|
|
|
|
v-if="this.formDataVisible != null && this.formDataVisible.scanType == 1">
|
|
|
|
@ -164,9 +97,10 @@
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<div style="border: 1px solid #ebeef5;border-radius: 2px;margin-top: 15px;padding: 15px">
|
|
|
|
|
|
|
|
|
|
<div style="margin-top: 1px;padding: 5px">
|
|
|
|
|
<el-row :gutter="0" style="margin-top: 5px">
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
<el-form-item prop="code" :label="scanTip" label-width="80px">
|
|
|
|
|
<el-input
|
|
|
|
|
id="inputer"
|
|
|
|
@ -181,27 +115,43 @@
|
|
|
|
|
<!-- :disabled="scanDisabled"-->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button-group style="display: flex;">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
@click.native.stop="enterKey($event)"
|
|
|
|
|
style="margin-left: 15px"
|
|
|
|
|
>
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- :disabled="!formData.billNo || (this.formDataVisible != null && this.formDataVisible.scanType == 1)"-->
|
|
|
|
|
<el-button type="primary"
|
|
|
|
|
@click="addGs">ALT+29
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click.native.stop="clearCode()"
|
|
|
|
|
>清空
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-button-group style="display: flex; margin-left: 15px">
|
|
|
|
|
<el-button type="primary" @click.native="deleteCode"
|
|
|
|
|
v-if="labelName == 1"
|
|
|
|
|
:disabled="formData.billNo == null"
|
|
|
|
|
>扫码剔除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary"
|
|
|
|
|
v-if="labelName == 2"
|
|
|
|
|
@click.native="overdeleteCode"
|
|
|
|
|
>结束剔除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="formData.billNo ||(this.formDataVisible != null && this.formDataVisible.scanType == 1)"
|
|
|
|
|
@click.native="selectPrescribe()"
|
|
|
|
|
>选单
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="!formData.billNo"
|
|
|
|
|
@click.native="saveDraftOrder()"
|
|
|
|
|
>挂起
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="!formData.billNo"
|
|
|
|
|
@click.native="cancelOrder()"
|
|
|
|
|
>放弃
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="!formData.billNo"
|
|
|
|
|
@click.native="confirmFinishOrder()"
|
|
|
|
|
>完成
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -238,7 +188,7 @@
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<!--<el-descriptions title="单据信息" :column="4" border style="margin-top: 15px" class="custom-descriptions">-->
|
|
|
|
|
<el-descriptions :column="4" border style="margin-top: 5px">
|
|
|
|
|
<el-descriptions :column="7" border style="margin-top: 5px">
|
|
|
|
|
<!--{{ formData.billNo }}-->
|
|
|
|
|
<!--<el-descriptions-item label="业务单号">-->
|
|
|
|
|
<!--<svg ref="barcodeContainer" ></svg>-->
|
|
|
|
@ -251,10 +201,7 @@
|
|
|
|
|
<el-descriptions-item label="业务单号">{{ formData.billNo }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="发货方">{{ formData.shipperName }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="收货方">{{ formData.fromCorpName }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="单据类型">{{ formData.busTypeName }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="来源系统">{{ formData.fromType }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="单据时间">{{ formData.billTime }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="单据备注">{{ formData.remark }}</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<!--<div id="qrcode-container" ref="barcodeContainer" style="margin-right: 38px;padding-bottom: 30px"></div>-->
|
|
|
|
|
<!--<svg ref="barcodeContainer"></svg>-->
|
|
|
|
@ -596,7 +543,6 @@ export default {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
if (res.data.billNo != null) {
|
|
|
|
|
this.formData = res.data
|
|
|
|
|
this.generateBarcode()
|
|
|
|
|
this.scanCode = "";
|
|
|
|
|
this.formData.workPlaceCode = this.workplaceId
|
|
|
|
|
this.checked = false
|
|
|
|
@ -1144,6 +1090,8 @@ export default {
|
|
|
|
|
cancelOrder(this.formData).then(res => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
const audio = new Audio(require('@/assets/audioFiles/colser.mp3'));
|
|
|
|
|
audio.play();
|
|
|
|
|
this.overdeleteCode()
|
|
|
|
|
this.reset()
|
|
|
|
|
}
|
|
|
|
@ -1169,6 +1117,8 @@ export default {
|
|
|
|
|
finishOrder(this.formData).then(res => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
const audio = new Audio(require('@/assets/audioFiles/order.mp3'));
|
|
|
|
|
audio.play();
|
|
|
|
|
this.reset()
|
|
|
|
|
if (this.formDataVisible.scanType != 1)
|
|
|
|
|
this.findCurOrder()
|
|
|
|
@ -1796,9 +1746,33 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
addKeyboardShortcut() {
|
|
|
|
|
window.addEventListener('key', this.handleKeyboardShortcut);
|
|
|
|
|
},
|
|
|
|
|
removeKeyboardShortcut() {
|
|
|
|
|
window.removeEventListener('key', this.handleKeyboardShortcut);
|
|
|
|
|
},
|
|
|
|
|
handleKeydown(event){
|
|
|
|
|
if (event.key === 'F9' || event.keyCode === 120) {
|
|
|
|
|
event.preventDefault(); // 阻止默认行为
|
|
|
|
|
this.finishOrder()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleKeyboardShortcut(event) {
|
|
|
|
|
if (event.key === 'F9' || event.keyCode === 120) { // keyCode 120 是 F9 的键码
|
|
|
|
|
event.preventDefault(); // 阻止默认行为
|
|
|
|
|
this.finishOrder()
|
|
|
|
|
}
|
|
|
|
|
if (event.key === 'F10' || event.keyCode === 121) {
|
|
|
|
|
event.preventDefault(); // 阻止默认行为(如果有的话)
|
|
|
|
|
// this.push();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
document.addEventListener('keydown', this.handleKeydown);
|
|
|
|
|
//环境判断
|
|
|
|
|
if (window.navigator.userAgent.indexOf("GLXP_PC") != -1) {
|
|
|
|
|
this.scanDisabled = true;
|
|
|
|
@ -1828,6 +1802,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
document.removeEventListener('keydown', this.handleKeydown);
|
|
|
|
|
window.removeEventListener('djcl', this.handleRecCodesEvent);
|
|
|
|
|
document.removeEventListener('visibilitychange', this.handleVisibilityChange);
|
|
|
|
|
|
|
|
|
@ -1835,6 +1810,7 @@ export default {
|
|
|
|
|
this.ws.onclose = function (evt) {
|
|
|
|
|
console.log("处理单据 Connection closed.");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
getHead("prescribeTagCodeDeal", "1").then((re) => {
|
|
|
|
|