From e6ac1a6d3cc6b5f4b9bdb0ba98a055288934daee Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 19 十一月 2025 16:14:00 +0800
Subject: [PATCH] 首件检验单 添加 检验项目检验值(分析方法为定量分析时有效,绑定字段为HInspectValQ) 抽检绑定字段为HInspectVal
---
components/labelPrinterComponent/labelPrinterComponent.vue | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/components/labelPrinterComponent/labelPrinterComponent.vue b/components/labelPrinterComponent/labelPrinterComponent.vue
index 265380b..2c408c5 100644
--- a/components/labelPrinterComponent/labelPrinterComponent.vue
+++ b/components/labelPrinterComponent/labelPrinterComponent.vue
@@ -73,6 +73,7 @@
let vm = this;
let binarys = [];
for (let command of commandList) {
+ console.log('command: ',command);
switch (vm.printMode) {
case "tspl":
let tspl = await vm.$printer.tspl().clear();
@@ -99,14 +100,34 @@
})
}
}
-
+ let sendSuccess = false
for(let binary of binarys){
- let sendSuccess = await this.$refs.bt2.sendMessage(binary);
- console.log("鍙戦�佹槸鍚︽垚鍔燂細 ", sendSuccess)
- if(sendSuccess === false) {
- return
- }
+
+ try{
+ sendSuccess = await this.$refs.bt2.sendMessage(binary);
+ console.log("褰撳墠鍙戦�佹槸鍚︽垚鍔燂細 ", sendSuccess)
+
+ }catch(e) {
+ uni.showToast({
+ icon: 'none',
+ title: e
+ })
+ // 鏂紑钃濈墮杩炴帴
+ this.$refs.bt2.closeBluetooth()
+ // 鍋滄浼犺緭
+ return
+ }
+
}
+
+ if(sendSuccess === false) {
+ return
+ }else {
+ return uni.showToast({
+ icon: 'none',
+ title: '鎵撳嵃鎴愬姛'
+ })
+ }
},
async execPrint() {
// 妫�鏌ヨ摑鐗欒繛鎺�
--
Gitblit v1.9.1