From 77c7984fb636f81a87208aea2bcffc701f6419e8 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期三, 23 十月 2024 16:01:26 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/hook/queue.js                                   |    5 +++--
 north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java |    2 +-
 north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue              |   27 ++++++++++++++++-----------
 3 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
index edb3612..70d3f9d 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
@@ -23,6 +23,9 @@
 let dataList = ref([])
 let lastList = ref([])
 let list = ref([])
+//鎵撳嵃鏈�
+const printerData = ref()
+const printerList = ref()
 // 绾稿紶绫诲瀷
 const paperTypes = {
   '鎴愬搧鏍囩': {
@@ -666,10 +669,11 @@
     hiprint.hiwebSocket.setHost("http://localhost:17521")
   }
   //鑾峰彇鎵撳嵃鏈哄垪琛�
-  /*hiprint.refreshPrinterList((list) => {
-    console.log('refreshPrinterList')
-    console.log(list)
-  });*/
+  hiprint.refreshPrinterList((list) => {
+    // console.log('refreshPrinterList')
+    // console.log(list)
+    printerList.value=list
+  });
 };
 
 
@@ -859,8 +863,9 @@
     object = {table:lastList.value}
     columnsNum = (list.panels[0].printElements[0].options.gridColumns || 1)
   }
+  let printer=printerData.value
   if(type===1){
-    const queuePrinter = new QueuePrinter( object,hiprintTemplate,columnsNum)
+    const queuePrinter = new QueuePrinter( object,hiprintTemplate,columnsNum,printer)
     queuePrinter.tick
   }else{
     hiprintTemplate.value.print(object)
@@ -917,13 +922,13 @@
           </el-select>
         </el-col>
         <el-col :span="3">
-          <el-select v-model="stateValue" :placeholder="$t('processCard.pleaseSelect')" allow-create class="m-2" clearable
-                     filterable style="width: 140px">
+          <el-select v-model="printerData" :placeholder="$t('processCard.pleaseSelect')" clearable default-value="default_city"
+                     style="width: 160px">
             <el-option
-                v-for="item in stateOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
+                v-for="item in printerList"
+                :key="item.displayName"
+                :label="item.name"
+                :value="item.name"
             />
           </el-select>
         </el-col>
diff --git a/north-glass-erp/northglass-erp/src/hook/queue.js b/north-glass-erp/northglass-erp/src/hook/queue.js
index 594105b..1dab2e2 100644
--- a/north-glass-erp/northglass-erp/src/hook/queue.js
+++ b/north-glass-erp/northglass-erp/src/hook/queue.js
@@ -2,7 +2,7 @@
  * Queue hook
  * 鎵撳嵃闃熷垪鏂规硶
  */
-export default function QueuePrinter(list,hiprintTemplate,columnsNum){
+export default function QueuePrinter(list,hiprintTemplate,columnsNum,printer){
     const queue = JSON.parse(JSON.stringify(list));
     // 娣诲姞鎵撳嵃浠诲姟
     this.printJob = function(job) {
@@ -14,7 +14,8 @@
 
                 if(typeof queue === 'object' && Array.isArray(queue)){
                     if (queue.length > 0) {
-                        hiprintTemplate.value.print2(queue[0])
+                        console.log(printer)
+                        hiprintTemplate.value.print2(queue[0],{printer:printer})
                         queue.shift(); // 鎵撳嵃浠诲姟锛屽苟浠庨槦鍒椾腑绉婚櫎
                     }else{
                         clearInterval(this.tick)
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
index 6ada14e..0a4e20a 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -344,7 +344,7 @@
             }
 
             //鏇存柊娴佺▼鍗¤〃鐨勬姤宸ユ暟閲�
-            if (Objects.equals(reportingWork.getNextProcess(), "")) {
+            if (Objects.equals(reportingWork.getNextProcess(), "")|| Objects.equals(reportingWork.getNextProcess(), null)) {
                 LambdaUpdateWrapper<FlowCard> flowCardLambdaUpdateWrapper =
                         new LambdaUpdateWrapper<>();
                 flowCardLambdaUpdateWrapper

--
Gitblit v1.8.0