扫码数量超出弹框提示

dev2.5_scan
yewj 3 days ago
parent cd4f26a4c8
commit 24d115615c

@ -2,58 +2,9 @@
<div>
<el-form :model="formData" class="order-el-form" ref="formData" label-width="120px" @submit.native.prevent>
<el-card>
<el-row style="margin-top: 6px;margin-bottom: -6px;"
v-if="this.formDataVisible != null && this.formDataVisible.scanType == 1"
>
<!-- <el-col :span="6">-->
<!-- <el-form-item prop="workPlaceCode" class="query-form-item" label="当前工位:">-->
<!-- <el-select-->
<!-- v-model="formData.workPlaceCode"-->
<!-- placeholder="当前工位"-->
<!-- style="width: 90%"-->
<!-- :disabled="corpOrderIdDisabled"-->
<!-- filterable-->
<!-- @change="workPlaceCodeChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in curWorkPlaces"-->
<!-- :key="item.workplaceId"-->
<!-- :label="item.workplaceName"-->
<!-- :value="item.workplaceId"-->
<!-- >-->
<!-- <span style="float: left">{{ item.workplaceName }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px">{{-->
<!-- item.workplaceId-->
<!-- }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item prop="busType" class="query-form-item" label="当前业务类型:">-->
<!-- <el-select v-model="formData.busType"-->
<!-- filterable-->
<!-- remote-->
<!-- @change="busTypeChange"-->
<!-- reserve-keyword-->
<!-- disabled-->
<!-- placeholder="请选择业务类型" clearable style="width: 55%">-->
<!-- <el-option-->
<!-- v-for="item in busTypeList"-->
<!-- :key="item.documentTypeCode"-->
<!-- :label="item.busName"-->
<!-- :value="item.documentTypeCode"-->
<!-- >-->
<!-- <span style="float: left">{{ item.busName }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.documentTypeCode }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- <el-button type="primary" @click="toggleBusType" style="margin-left: 5px">切换业务</el-button>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="6">
<el-form-item prop="locInvCode" label="发货方:">
<el-select v-model="formData.shipper" placeholder="请选择发货方" clearable
@ -166,33 +117,9 @@
</el-checkbox>
</el-col>
</el-row>
<!--<el-alert-->
<!-- :title="scanTitle"-->
<!-- :type="scanResultType"-->
<!-- :closable="false"-->
<!-- :dangerouslyUseHTMLString="true"-->
<!-- :description="result">-->
<!--</el-alert>-->
<!--<el-alert-->
<!-- v-if="warnVisible"-->
<!-- title="警告信息:"-->
<!-- type="warning"-->
<!-- :closable="true"-->
<!-- :dangerouslyUseHTMLString="true"-->
<!-- :description="warnResult">-->
<!--</el-alert>-->
<!--<el-alert-->
<!-- v-if="errVisible"-->
<!-- title="错误信息:"-->
<!-- type="warning"-->
<!-- :closable="true"-->
<!-- :dangerouslyUseHTMLString="true"-->
<!-- :description="errResult">-->
<!--</el-alert>-->
</div>
<!--<el-descriptions title="单据信息" :column="4" border style="margin-top: 15px" class="custom-descriptions">-->
<el-descriptions :column="7" border style="margin-top: 5px; font-size: 16px">
<el-descriptions-item label="业务单号">
<div style="font-size: 15px">{{ formData.billNo }}</div>
@ -207,8 +134,6 @@
<div style="font-size: 15px">{{ formData.billTime }}</div>
</el-descriptions-item>
</el-descriptions>
<!--<div id="qrcode-container" ref="barcodeContainer" style="margin-right: 38px;padding-bottom: 30px"></div>-->
<!--<svg ref="barcodeContainer"></svg>-->
</el-card>
<el-tabs type="border-card" style="margin: 15px" v-model="editableTabsValue">
@ -218,36 +143,6 @@
:prescribeData="curRow"
:bizIds="bizIds"
></prescribeOriginPanel>
<!-- 在表格下方添加说明 -->
<!--</el-tab-pane>-->
<!-- <el-tab-pane label="扫码明细">-->
<!-- <PanelOrderManuTagCode-->
<!-- v-if="panelALive"-->
<!-- :fifoSplit="3"-->
<!-- :prescribeData="curRow"-->
<!-- :refreshPanel="refreshCodesPanelP"-->
<!-- ></PanelOrderManuTagCode>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="拆零详情" name="prescribeCodePanel1">-->
<!-- <prescribeCodePanel-->
<!-- v-if="panelALive"-->
<!-- :prescribeData="curRow"-->
<!-- :fifoSplit="1"-->
<!-- ></prescribeCodePanel>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="整取详情" name="prescribeCodePanel2">-->
<!-- <prescribeCodePanel-->
<!-- v-if="panelALive"-->
<!-- :prescribeData="curRow"-->
<!-- :fifoSplit="2"-->
<!-- ></prescribeCodePanel>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="整单详情" name="PanelOrderAllDetail">-->
<!-- <PanelOrderAllDetail-->
<!-- v-if="panelALive"-->
<!-- :prescribeData="curRow"-->
<!-- ></PanelOrderAllDetail>-->
<!-- </el-tab-pane>-->
</el-tabs>
@ -272,6 +167,25 @@
</el-dialog>
<el-dialog
title="提示"
:visible.sync="confirmDialogVisible"
width="25%"
:close-on-click-modal="false"
:close-on-press-escape="false"
center
>
<div style="text-align: center">
<i class="el-icon-warning" style="font-size: 36px; color: #E6A23C; margin-bottom: 12px;"></i>
<p style="font-size: 14px; margin: 0;">{{ confirmMessage }}</p>
</div>
<span slot="footer" class="dialog-footer" style="padding: 10px 20px;">
<el-button size="small" @click="confirmDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="handleConfirm"></el-button>
</span>
</el-dialog>
<el-dialog
title="选择业务类型"
:visible.sync="selectBusTypeDisabled"
@ -296,13 +210,6 @@
@click="selectBusType(info.documentTypeCode)"
>
<p style="font-size: 20px;background-color: #e1f3fb;font-weight: bold;">{{ info.busName }}</p>
<!-- 假设你的信息对象中包含一个title属性 -->
<!-- <div style="width: 60px; height: 60px; display: flex; justify-content: center; align-items: center;">-->
<!-- &lt;!&ndash; 二维码占位这里用灰色方块代替 &ndash;&gt;-->
<!--&lt;!&ndash; <span>QR</span>&ndash;&gt;-->
<!-- <div ref="qrcode" :id="'qrcode-'+index" style="width: 60px;height: 60px;"></div>-->
<!-- </div>-->
</div>
<div style="flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 10px;"
>
@ -331,14 +238,14 @@
<script>
import addOrder from '@/views/inout/DialogCreateOrder'
import errOrder from '@/views/inout/IoCreateErrorOrder'
import { executeFuc, getHead } from '@/utils/customConfig'
import { convertDate } from '@/utils/date'
import {executeFuc, getHead} from '@/utils/customConfig'
import {convertDate} from '@/utils/date'
import selectPrescribeDialog from '@/views/collect/selectCollectOrderDialog'
import PanelOrderManuTagCode from './PanelOrderManuTagCode'
import prescribeOriginPanel from './PannelOrderBiz'
import prescribeCodePanel from './PanelOrderTagCode'
import { listPage } from '@/api/basic/workPlace/sysWorkplaceManage'
import { enterCodeWeb, batchVailCode, enterCodeBillNo, saveOrderWeb, batchUpdateCode } from '@/api/inout/order'
import {listPage} from '@/api/basic/workPlace/sysWorkplaceManage'
import {enterCodeWeb, batchVailCode, enterCodeBillNo, saveOrderWeb, batchUpdateCode} from '@/api/inout/order'
import {
cancelOrder,
draftOrder,
@ -348,7 +255,7 @@ import {
updateOrder,
vailOrderFinish
} from '@/api/collect/splitCreateOrder'
import { selectCorpList } from '@/api/basic/basicUnitMaintain'
import {selectCorpList} from '@/api/basic/basicUnitMaintain'
import {
getCurOrder,
getNextOrder,
@ -358,15 +265,16 @@ import {
removeByScanCode
} from '@/api/collect/collectOrder'
import PanelOrderAllDetail from '@/views/collect/PanelOrderAllDetail'
import { getWorkBindBusTypes, removeBusTypeById } from '@/api/basic/workPlace/sysWorkplaceDocuments'
import { getInvListByUser } from '@/api/system/invWarehouse'
import { orderbatchAddCode } from '@/api/inout/splitCode'
import { isBlank } from '@/utils/strUtil'
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {getInvListByUser} from '@/api/system/invWarehouse'
import {orderbatchAddCode} from '@/api/inout/splitCode'
import {isBlank} from '@/utils/strUtil'
import JsBarcode from 'jsbarcode'
import { getSet } from '@/api/collect/collectSet'
import {getSet} from '@/api/collect/collectSet'
import { MessageBox } from 'element-ui'
import {MessageBox} from 'element-ui'
import {addCode} from "@/api/inventory/invCountCodes";
export default {
/**
@ -389,6 +297,9 @@ export default {
],
editableTabsValue: 'prescribeOriginPanel',
fromInvOptions: [],
confirmDialogVisible: false,
confirmMessage: '',
confirmCallback: null,
//
//
loading: false,
@ -408,7 +319,7 @@ export default {
},
list: [],
total: 0,
defaultSort: { prop: 'createTime', order: 'desc' },
defaultSort: {prop: 'createTime', order: 'desc'},
formDataVisible: {
scanType: null,
unitTittle: '往来单位',
@ -498,6 +409,17 @@ export default {
}
},
methods: {
showConfirmDialog(message, callback) {
this.confirmMessage = message
this.confirmCallback = callback
this.confirmDialogVisible = true
},
handleConfirm() {
if (this.confirmCallback) {
this.confirmCallback()
}
this.confirmDialogVisible = false
},
generateBarcode() {
const barcodeData = this.formData.billNo
//
@ -1021,20 +943,18 @@ export default {
this.refreshCodesPanel(this)
} else {
if (res.code == 502) {
this.$confirm(res.message + '是否强制添加?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.showConfirmDialog(res.message + '是否强制添加?', () => {
this.formData.insert = true
this.addCode()
}).catch(() => {
})
} else if (res.message.includes('重复扫码')) {
this.$refs.inputRef.focus()
} else {
this.$refs.inputRef.focus()
this.$message.error(res.message)
}
}
}).catch(() => {
this.loading = false
@ -1161,28 +1081,9 @@ export default {
this.selectPrescriptionVisible = true
},
//
nextCollectOrder() {
let nextQuery = {
busType: this.formData.busType
}
getNextOrder(nextQuery).then(res => {
this.loading = false
if (res.code == 20000) {
this.formData = res.data
this.startDeal()
} else {
this.$message.error(res.message)
}
}).catch(() => {
this.loading = false
})
},
findCurOrder() {
let nextQuery = {
// workPlaceCode: this.formData.workPlaceCode,
busType: this.formData.busType
}
getCurOrder(nextQuery).then(res => {
@ -1206,14 +1107,6 @@ export default {
// this.generateBarcode()
this.panelALive = true
this.startDeal()
// this.$confirm('?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
//
// }).catch(() => {
// });
}
} else {
@ -1665,7 +1558,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)
@ -1701,7 +1594,7 @@ 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()
}
@ -1725,6 +1618,32 @@ export default {
if (!isBlank(this.warnResult)) {
this.warnResult = ''
}
// const myArray = [
// "84220990282456138381",
// "84220990282456138381",
// "84220990282456138381",
// "84220990282456138381",
// "84220990282456138381",
// "84220990282456138381",
// "84220990282456138381",
// "84220990282456138381",
// "84220990282456439935",
// "84220990282456282493",
// "83585071394030600368",
// "83585071394028644586",
// "81291510961213731914",
// "81291510961212834683"
// ];
//
//
// for (let i = 0; i < myArray.length; i++) {
// const code = myArray[i];
// this.scanCode = code;
// this.filterQuery.code = code;
// this.addCode(code);
// }
},
overdeleteCode() {
this.warnVisible = false
@ -1746,8 +1665,14 @@ export default {
if (this.formData.billNo != null) {
if (event.key === 'F9' || event.keyCode === 120) {
event.preventDefault() //
MessageBox.close()
this.finishOrder()
if (this.confirmDialogVisible) {
this.handleConfirm()
return
} else {
MessageBox.close()
this.finishOrder()
}
}
@ -1806,7 +1731,7 @@ export default {
document.removeEventListener('visibilitychange', this.handleVisibilityChange)
this.ws.close()
this.ws.onclose = function(evt) {
this.ws.onclose = function (evt) {
console.log('处理单据 Connection closed.')
}

Loading…
Cancel
Save