上货剔除

20240912_adapter
yewj 7 months ago
parent 1feb68be56
commit 5ac40a0946

@ -278,32 +278,32 @@
<!-- <el-tab-pane label="详情" name="prescribeOriginPanel">-->
<!-- 在表格下方添加说明 -->
<!-- <el-row style="text-align: right;font-size: 12px;margin-top: 10px">-->
<!-- <el-col span="24">-->
<!-- <div style="float: right">-->
<!-- <td>-->
<!-- <div style="background-color: #F56C6C;width: 10px;height: 10px;"></div>-->
<!-- </td>-->
<!-- <td><span style="color: #6d6d6d;"><pre>未赋码 </pre></span></td>-->
<!-- <td>-->
<!-- <div style="background-color: #E6A23C;width: 10px;height: 10px;"></div>-->
<!-- </td>-->
<!-- <td>-->
<!-- <span style="color: #6d6d6d;"><pre>预赋码 </pre></span>-->
<!-- </td>-->
<!-- <td>-->
<!-- <div style="background-color: #67C23A;width: 10px;height: 10px;"></div>-->
<!-- </td>-->
<!-- <td>-->
<!-- <span style="color: #6d6d6d;"><pre>已赋码</pre></span>-->
<!-- </td>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row style="text-align: right;font-size: 12px;margin-top: 10px">-->
<!-- <el-col span="24">-->
<!-- <div style="float: right">-->
<!-- <td>-->
<!-- <div style="background-color: #F56C6C;width: 10px;height: 10px;"></div>-->
<!-- </td>-->
<!-- <td><span style="color: #6d6d6d;"><pre>未赋码 </pre></span></td>-->
<!-- <td>-->
<!-- <div style="background-color: #E6A23C;width: 10px;height: 10px;"></div>-->
<!-- </td>-->
<!-- <td>-->
<!-- <span style="color: #6d6d6d;"><pre>预赋码 </pre></span>-->
<!-- </td>-->
<!-- <td>-->
<!-- <div style="background-color: #67C23A;width: 10px;height: 10px;"></div>-->
<!-- </td>-->
<!-- <td>-->
<!-- <span style="color: #6d6d6d;"><pre>已赋码</pre></span>-->
<!-- </td>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="扫码明细">-->
<!-- <PanelOrderManuTagCode-->

@ -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">-->
<!-- &lt;!&ndash;<div v-if="scanReCount > 0">&ndash;&gt;-->
<!-- &lt;!&ndash; <span style="font-size: 18px;font-weight: bold;color: red" >扫码总数量:</span>&ndash;&gt;-->
<!-- &lt;!&ndash; <span style="font-size: 18px;font-weight: bold;color: red">{{ scanReCount }}</span>&ndash;&gt;-->
<!-- &lt;!&ndash;</div>&ndash;&gt;-->
</el-button-group>
<!-- &lt;!&ndash;<span style="font-size: 18px;font-weight: bold">{{ curQueueName }}</span>&ndash;&gt;-->
<!-- -->
<!-- </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="药品名称"-->
<!--&gt;-->
<!--</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="药品名称"-->
<!--&gt;-->
<!--</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)

@ -1,29 +1,33 @@
<template>
<div>
<el-row :gutter="30">
<el-col :span="15" style="border: 1px solid #e3dfe1; padding:15px; height: 400px; margin-left: 20px; overflow-y: scroll;">
<h2 style="font-weight: bold;">上货信息</h2>
<el-col :span="15"
style="border: 1px solid #e3dfe1; padding:15px; height: 400px; margin-left: 20px; overflow-y: scroll;">
<!-- <h2 style="font-weight: bold;">上货信息</h2>-->
<span style="font-weight: bold;font-size: 18px"> 上货信息</span>
<div v-for="(item, index) in detailList" :key="index" class="product-info">
<div class="info-item">
<p class="p-title">产品通用名: {{ item.coName }}</p>
<p class="p-title">制剂规格: {{ item.prepnSpec }}</p>
<p class="p-title">包装规格: {{ item.bzgg }}</p>
<p class="p-title">产品通用名 {{ item.coName }}</p>
<p class="p-title">制剂规格&nbsp;{{ item.prepnSpec }}</p>
<p class="p-title">包装规格&nbsp;{{ item.bzgg }}</p>
<!--<p class="p-title">产品标识: {{ item.nameCode }}</p>-->
<p class="p-title">批次号: {{ item.batchNo }}</p>
<p class="p-title">生产日期: {{ item.productDate }}</p>
<p class="p-title">失效日期: {{ item.expireDate }}</p>
<p class="p-title">批次号&nbsp;&nbsp;&nbsp;&nbsp;{{ item.batchNo }}</p>
<p class="p-title">生产日期&nbsp;{{ item.productDate }}</p>
<p class="p-title">失效日期&nbsp;{{ item.expireDate }}</p>
</div>
<div class="count-items">
<p class="p-title">扫码数量: <span class="scan-count">{{ item.count }}</span></p>
<p class="p-title">实际数量: <span class="actual-count">{{ item.reCount }}{{ item.prepnUnit }}</span></p>
<p class="p-title">扫码数量&nbsp; <span class="scan-count">{{ item.count }}</span></p>
<p class="p-title">实际数量&nbsp;<span class="actual-count">{{ item.reCount }}{{ item.prepnUnit }}</span></p>
</div>
</div>
</el-col>
<el-col :span="8" style="border: 1px solid #e3dfe1; margin-left: 20px; padding: 15px;height: 400px;">
<h2 style="font-weight: bold;">扫码明细({{codeCount}})</h2>
<!-- <h2 style="font-weight: bold;">扫码明细({{ codeCount }})</h2>-->
<span style="font-weight: bold;font-size: 18px">扫码明细({{ codeCount }})</span>
<!--<el-divider></el-divider>-->
<div style=" border-top: 1px solid #ccc;">
<div style=" border-top: 1px solid #ccc;margin-top: 3px">
<el-table v-loading="loading" :data="codeArray" style="width: 100%; margin-top: 20px" max-height="280px"
ref="multipleTable">
<!-- <el-table-column-->
@ -44,24 +48,24 @@
</div>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="100" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteCode(scope.$index, scope.row)"-->
<!-- >减一-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="editCode(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="100" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteCode(scope.$index, scope.row)"-->
<!-- >减一-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="editCode(scope.row)"-->
<!-- >编辑-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
@ -88,8 +92,8 @@
<script>
import {convertDate} from "@/utils/date";
import { getCheckDetailCodes, getDetailCodes, updateBizProduct, updateCodeProduct } from '@/api/inout/orderDetailCode'
import { deleteCodesTempById, errorCodeList } from '@/api/inout/order'
import {getCheckDetailCodes, getDetailCodes, updateBizProduct, updateCodeProduct} from '@/api/inout/orderDetailCode'
import {deleteCodesTempById, errorCodeList} from '@/api/inout/order'
import editCodeDialog from "@/views/inout/DialogEditCode";
export default {
@ -128,8 +132,8 @@ export default {
selectRlVisible: false,
dialogTableVisible: false,
editCodeVisible: false,
orderDetail:null,
codeArray:[],
orderDetail: null,
codeArray: [],
codeCount: 0,
codeDetail: null,
}
@ -153,18 +157,18 @@ export default {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
if (this.detailList.length > 0 && this.status == false){
if (this.detailList.length > 0 && this.status == false) {
this.orderDetail = this.detailList[0]
this.$emit('getOrderData', this.orderDetail)
this.$emit('getOrderData', this.orderDetail)
}
this.$emit('clearBillNo', this.detailList.length > 0? false : true);
this.$emit('clearBillNo', this.detailList.length > 0 ? false : true);
let count = 0;
if (this.detailList && this.detailList.length > 0) {
this.detailList.forEach(item => {
count += item.reCount;
});
this.$emit('getCount', count);
}else {
} else {
this.$emit('getCount', count);
}
})
@ -216,15 +220,15 @@ export default {
this.loading = true;
this.query.orderId = this.idQuery.billNo
errorCodeList(this.query) //
.then((response) => {
this.codeArray = response.data.list || [];
this.codeCount = this.codeArray.length
this.loading = false;
})
.catch(() => {
this.loading = false;
.then((response) => {
this.codeArray = response.data.list || [];
this.codeCount = this.codeArray.length
this.loading = false;
})
.catch(() => {
this.loading = false;
});
});
},
deleteCode(index, row) {
this.$confirm("是否确定移除一个条码?", "提示", {
@ -247,7 +251,7 @@ export default {
}).catch(() => {
});
},
editCode(row){
editCode(row) {
this.codeDetail = row;
this.editCodeVisible = true;
},
@ -260,7 +264,7 @@ export default {
created() {
if (this.idQuery.billNo != null)
this.getOrderDetails();
this.getCodeList()
this.getCodeList()
},
}
</script>
@ -272,6 +276,7 @@ export default {
border-top: 1px solid #ccc;
align-items: center;
padding: 10px;
margin-top: 3px;
margin-bottom: 10px;
}
@ -297,7 +302,8 @@ export default {
color: green;
font-size: 38px;
}
.p-title{
.p-title {
font-size: 18px;
}

Loading…
Cancel
Save