|
|
|
@ -9,33 +9,44 @@
|
|
|
|
|
label-width="110px"
|
|
|
|
|
>
|
|
|
|
|
<el-card>
|
|
|
|
|
<el-row style="margin-bottom: 8px">
|
|
|
|
|
<!--<div v-if="scanReCount > 0">-->
|
|
|
|
|
<!-- <span style="font-size: 18px;font-weight: bold;color: red" >扫码总数量:</span>-->
|
|
|
|
|
<!-- <span style="font-size: 18px;font-weight: bold;color: red">{{ scanReCount }}</span>-->
|
|
|
|
|
<!--</div>-->
|
|
|
|
|
<span style="font-size: 18px;font-weight: bold;color: red" v-if="redMeg"
|
|
|
|
|
>请先扫取货槽编码</span>
|
|
|
|
|
<span style="font-size: 18px;font-weight: bold">{{ curQueueName }}</span>
|
|
|
|
|
<!--<span style="font-size: 18px;font-weight: bold">{{ curQueueName }}</span>-->
|
|
|
|
|
<el-button-group
|
|
|
|
|
style="display: flex; margin-top: 5px; float: right"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="paizhao()"
|
|
|
|
|
v-if="collectSet != null && collectSet.autoDecode == 0" style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>拍照解码
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="fallbackCode()" :disabled="redMeg"
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>回退
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="dropCode()" :disabled="redMeg"
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>放弃
|
|
|
|
|
</el-button>
|
|
|
|
|
<!-- <el-row style="margin-bottom: 8px">-->
|
|
|
|
|
<!-- <!–<div v-if="scanReCount > 0">–>-->
|
|
|
|
|
<!-- <!– <span style="font-size: 18px;font-weight: bold;color: red" >扫码总数量:</span>–>-->
|
|
|
|
|
<!-- <!– <span style="font-size: 18px;font-weight: bold;color: red">{{ scanReCount }}</span>–>-->
|
|
|
|
|
<!-- <!–</div>–>-->
|
|
|
|
|
|
|
|
|
|
</el-button-group>
|
|
|
|
|
<!-- <!–<span style="font-size: 18px;font-weight: bold">{{ curQueueName }}</span>–>-->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
|
|
|
|
|
<el-button-group
|
|
|
|
|
style="display: flex; margin-top: 5px; float: right"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="paizhao()"
|
|
|
|
|
v-if="collectSet != null && collectSet.autoDecode == 0"
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>拍照解码
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="fallbackCode()" :disabled="redMeg"
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>回退
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="dropCode()" :disabled="redMeg"
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>放弃
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
</el-button-group>
|
|
|
|
|
<el-row>
|
|
|
|
|
<span style="font-size: 18px;font-weight: bold;color: red" v-if="redMeg"
|
|
|
|
|
>请先扫取货槽编码</span>
|
|
|
|
|
<span style="font-size: 18px;font-weight: bold">{{ curQueueName }} </span>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row style="margin-top: 1px;margin-bottom: 8px">
|
|
|
|
|
<span style="font-size: 18px;font-weight: bold;"> {{ curProductData }} </span>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-divider></el-divider>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="18">
|
|
|
|
@ -97,13 +108,14 @@
|
|
|
|
|
</el-alert>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="24" style="margin-top: 10px">
|
|
|
|
|
<el-col :span="12" style="border: 1px solid #e3dfe1; padding:15px; height: 400px; margin-left: 15px;">
|
|
|
|
|
<h2 style="font-weight: bold;">当前上药队列</h2>
|
|
|
|
|
<el-col :span="12" style="border: 1px solid #e3dfe1; padding:15px;height: 420px; margin-left: 15px;">
|
|
|
|
|
<!-- <h2 style="font-weight: bold;">当前上药队列</h2>-->
|
|
|
|
|
<span style="font-weight: bold;font-size: 18px"> 当前上药队列</span>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="queueCodes"
|
|
|
|
|
:span-method="objectSpanMethod"
|
|
|
|
|
border
|
|
|
|
|
max-height="280px"
|
|
|
|
|
border :row-style="{height:'35px'}"
|
|
|
|
|
height="350px"
|
|
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column label="序号" width="80">
|
|
|
|
@ -111,10 +123,16 @@
|
|
|
|
|
{{ getDisplayIndex($index) }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="serialNo"
|
|
|
|
|
label="序列号"
|
|
|
|
|
width="180"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="code"
|
|
|
|
|
label="追溯码"
|
|
|
|
|
width="180"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<!--show-overflow-tooltip-->
|
|
|
|
@ -129,41 +147,37 @@
|
|
|
|
|
<!-- label="药品名称"-->
|
|
|
|
|
<!-->-->
|
|
|
|
|
<!--</el-table-column>-->
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="nameCode"
|
|
|
|
|
label="产品标识"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="prepnSpec"
|
|
|
|
|
label="制剂规格"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="bzgg"
|
|
|
|
|
label="包装规格"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="serialNo"
|
|
|
|
|
label="序列号"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="batchNo"
|
|
|
|
|
label="批次号"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="produceDate"
|
|
|
|
|
label="生产日期"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="expireDate"
|
|
|
|
|
label="失效日期"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="nameCode"-->
|
|
|
|
|
<!-- label="产品标识"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="prepnSpec"-->
|
|
|
|
|
<!-- label="制剂规格"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="bzgg"-->
|
|
|
|
|
<!-- label="包装规格"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="batchNo"-->
|
|
|
|
|
<!-- label="批次号"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="produceDate"-->
|
|
|
|
|
<!-- label="生产日期"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="expireDate"-->
|
|
|
|
|
<!-- label="失效日期"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- 添加 id 列,设置为隐藏 -->
|
|
|
|
|
<!--<el-table-column prop="id" label="ID" width="0" v-show="true"></el-table-column>-->
|
|
|
|
|
</el-table>
|
|
|
|
@ -177,11 +191,13 @@
|
|
|
|
|
<!--</pagination>-->
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="11" style="border: 1px solid #e3dfe1; margin-left: 27px; padding: 15px;height: 400px;">
|
|
|
|
|
<h2 style="font-weight: bold;">工位库存队列</h2>
|
|
|
|
|
<el-col :span="11" style="border: 1px solid #e3dfe1; margin-left: 27px; padding: 15px;height: 420px;">
|
|
|
|
|
<!-- <h2 style="font-weight: bold;">工位库存队列</h2>-->
|
|
|
|
|
<span style="font-weight: bold;font-size: 18px"> 工位库存队列</span>
|
|
|
|
|
<!--<el-divider></el-divider>-->
|
|
|
|
|
<!--<div style=" border-top: 1px solid #ccc;">-->
|
|
|
|
|
<el-table v-loading="loading" :data="splitCodes" style="width: 100%;margin-top: 20px" max-height="280px"
|
|
|
|
|
<el-table v-loading="loading" :data="splitCodes" style="width: 100%;margin-top: 20px" height="350px"
|
|
|
|
|
:row-style="{height:'35px'}"
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
@ -203,11 +219,15 @@
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!--</el-table-column>-->
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="serialNo"
|
|
|
|
|
label="序列号"
|
|
|
|
|
width="180"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="code"
|
|
|
|
|
label="追溯码"
|
|
|
|
|
width="180"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!--<el-table-column-->
|
|
|
|
@ -215,41 +235,37 @@
|
|
|
|
|
<!-- label="药品名称"-->
|
|
|
|
|
<!-->-->
|
|
|
|
|
<!--</el-table-column>-->
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="nameCode"
|
|
|
|
|
label="产品标识"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="bzgg"
|
|
|
|
|
label="制剂规格"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="bzgg"
|
|
|
|
|
label="包装规格"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="serialNo"
|
|
|
|
|
label="序列号"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="batchNo"
|
|
|
|
|
label="批次号"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="produceDate"
|
|
|
|
|
label="生产日期"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="expireDate"
|
|
|
|
|
label="失效日期"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="nameCode"-->
|
|
|
|
|
<!-- label="产品标识"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="bzgg"-->
|
|
|
|
|
<!-- label="制剂规格"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="bzgg"-->
|
|
|
|
|
<!-- label="包装规格"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="batchNo"-->
|
|
|
|
|
<!-- label="批次号"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="produceDate"-->
|
|
|
|
|
<!-- label="生产日期"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
<!-- prop="expireDate"-->
|
|
|
|
|
<!-- label="失效日期"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
</el-table>
|
|
|
|
|
<!--<pagination-->
|
|
|
|
|
<!-- v-show="splitCodeTotal>0"-->
|
|
|
|
@ -271,12 +287,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getByCode } from '@/api/basic/workPlace/SysWorkplaceQueue'
|
|
|
|
|
import { isBlank } from '@/utils/strUtil'
|
|
|
|
|
import { deleteCode, deleteCodes, fallbackCode, getCodeListByRelId } from '@/api/inout/code'
|
|
|
|
|
import { splitFifoDetail } from '@/api/inout/splitCode'
|
|
|
|
|
import { batchAddCode, batchVailCode, enterCodeWeb } from '@/api/inout/order'
|
|
|
|
|
import { getSet } from '@/api/collect/collectSet'
|
|
|
|
|
import {getByCode} from '@/api/basic/workPlace/SysWorkplaceQueue'
|
|
|
|
|
import {isBlank} from '@/utils/strUtil'
|
|
|
|
|
import {deleteCode, deleteCodes, fallbackCode, getCodeListByRelId} from '@/api/inout/code'
|
|
|
|
|
import {splitFifoDetail} from '@/api/inout/splitCode'
|
|
|
|
|
import {batchAddCode, batchVailCode, enterCodeWeb} from '@/api/inout/order'
|
|
|
|
|
import {getSet} from '@/api/collect/collectSet'
|
|
|
|
|
import A from '@/plugins/KeyScaner'
|
|
|
|
|
|
|
|
|
|
const SLOT_CODE_PREFIX = 'DMQ'
|
|
|
|
@ -313,6 +329,7 @@ export default {
|
|
|
|
|
curQueue: null,
|
|
|
|
|
productName: null,
|
|
|
|
|
curQueueName: '',
|
|
|
|
|
curProductData: '',
|
|
|
|
|
queueCodeTotal: 0,
|
|
|
|
|
splitCodeTotal: 0,
|
|
|
|
|
//是否录入槽位
|
|
|
|
@ -599,6 +616,7 @@ export default {
|
|
|
|
|
this.curQueue = response.data
|
|
|
|
|
this.productName = this.curQueue.cpmctymc
|
|
|
|
|
this.curQueueName = this.getQueueName()
|
|
|
|
|
this.curProductData = this.getCurProduct()
|
|
|
|
|
this.redMeg = false
|
|
|
|
|
this.isCheckQueue = true
|
|
|
|
|
this.init()
|
|
|
|
@ -622,10 +640,15 @@ export default {
|
|
|
|
|
// 获取当前取货槽名称
|
|
|
|
|
getQueueName() {
|
|
|
|
|
if (isBlank(this.productName)) {
|
|
|
|
|
return `当前取货槽: ${this.curQueue.code}`
|
|
|
|
|
return `当前取货槽: ${this.curQueue.code}`
|
|
|
|
|
}
|
|
|
|
|
return `当前取货槽: ${this.productName} (${this.curQueue.code})`
|
|
|
|
|
return `当前取货槽:${this.curQueue.code}`
|
|
|
|
|
},
|
|
|
|
|
getCurProduct() {
|
|
|
|
|
return "取货槽信息:" + this.curQueue.cpmctymc + "-" + this.curQueue.ggxh + "-" + this.curQueue.prepnSpec
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getCodes() {
|
|
|
|
|
this.queueQuery.action = 'SC72197936495755'
|
|
|
|
|
this.queueQuery.queueCode = this.curQueue.code
|
|
|
|
@ -724,7 +747,7 @@ export default {
|
|
|
|
|
this.$refs.inputRef.focus()
|
|
|
|
|
this.$refs.inputRef.select()
|
|
|
|
|
},
|
|
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
|
objectSpanMethod({row, column, rowIndex, columnIndex}) {
|
|
|
|
|
if (columnIndex === 0) {
|
|
|
|
|
// 返回对应行的合并信息
|
|
|
|
|
return this.spanInfo[rowIndex]
|
|
|
|
@ -811,7 +834,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 + '33333')
|
|
|
|
@ -847,7 +870,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()
|
|
|
|
|
}
|
|
|
|
@ -873,10 +896,10 @@ export default {
|
|
|
|
|
if (i === this.queueCodes.length - 1 || this.queueCodes[i].groupNumber !== this.queueCodes[i + 1].groupNumber) {
|
|
|
|
|
for (let j = 0; j < count; j++) {
|
|
|
|
|
if (j === 0) {
|
|
|
|
|
info.push({ rowspan: count, colspan: 1 })
|
|
|
|
|
info.push({rowspan: count, colspan: 1})
|
|
|
|
|
} else {
|
|
|
|
|
// 分组的其他单元格不显示
|
|
|
|
|
info.push({ rowspan: 0, colspan: 0 })
|
|
|
|
|
info.push({rowspan: 0, colspan: 0})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
count = 1
|
|
|
|
@ -891,14 +914,14 @@ export default {
|
|
|
|
|
mounted() {
|
|
|
|
|
// this.$refs.inputRef.focus()
|
|
|
|
|
// this.$refs.inputRef.select()
|
|
|
|
|
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.scanCode = ''
|
|
|
|
|
that.sictomText = ''
|
|
|
|
@ -933,7 +956,7 @@ export default {
|
|
|
|
|
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)
|
|
|
|
|