From b7ad54294da15dccc59f7b6c879af3e000024d9d Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 19 六月 2025 17:51:30 +0800 Subject: [PATCH] 1、全局树组件多选设备抽屉组件增加点击树节点名称也可以选中当前节点 2、设备监控页面布局图查看设备详情时首次进入清空上一次设备信息(由于数据为定时刷新不能每次获取数据均清空) 3、设备类型管理页面调整设备类型图片尺寸以解决表格错行问题 4、设备管理页面添加或编辑设备弹窗选择设备时增加点击行即可选中 --- src/views/tms/modules/inbound/InboundModel.vue | 41 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/views/tms/modules/inbound/InboundModel.vue b/src/views/tms/modules/inbound/InboundModel.vue index e2eda69..bbd4993 100644 --- a/src/views/tms/modules/inbound/InboundModel.vue +++ b/src/views/tms/modules/inbound/InboundModel.vue @@ -102,7 +102,15 @@ <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-tooling-modal> <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-return-list-modal> <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-sharpen-list-modal> + + <div id="printArea" style="display: block;"> + <div v-for="(item, index) in qrList" :key="index" class="qrcode-item"> + <img :src="item.base64" alt="QR Code"> + <p>{{ item.content }}</p> + </div> + </div> </a-modal> + </template> <script> @@ -117,6 +125,7 @@ import { filterObj } from '@/utils/util' import JSelectReturnListModal from '.././inboundOrder/JSelectReturnListModal' import JSelectSharpenListModal from '.././inboundOrder/JSelectSharpenListModal' +import printJS from 'print-js'; export default { name: 'InboundModel', @@ -252,7 +261,8 @@ }, ], classifyId:'', - locationCodeOptions:[] + locationCodeOptions:[], + qrList: [] } }, created() { @@ -325,7 +335,15 @@ postAction(this.url.addInStorage, formData) .then((res) => { if (res.success) { - that.$message.success(res.message) + if(formData.inStorehouseType === '1'){ + this.qrList = res.result.map((content, i) => ({ + content:res.result[i].content, + base64: res.result[i].image + })); + this.handleBacthPrint(); + }else{ + that.$message.success("淇濆瓨鎴愬姛") + } that.$emit('ok', new Date()) } else { that.$message.warning(res.message) @@ -412,6 +430,25 @@ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ); }, + + // 鎵ц鎵撳嵃 + handleBacthPrint() { + this.$nextTick(() => { + printJS({ + printable: 'printArea', + type: 'html', + style: ` + .qrcode-item { + page-break-inside: avoid; + margin: 10px; + text-align: center; + } + img { width: 100px; height: 100px; } + `, + scanStyles: false + }); + }); + } }, watch: {}, mounted() { -- Gitblit v1.9.3