From 2c98be64470f8298d3083ce337b0ffb948bee5f7 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期一, 09 六月 2025 16:45:34 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue |   19 +++++++--
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue           |   23 ++++++++---
 north-glass-erp/northglass-erp/src/stores/sd/companySet/天津北玻.js                  |    2 
 north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue         |   20 ++++++---
 north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java    |   39 +++++++++++--------
 5 files changed, 68 insertions(+), 35 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
index 1cc3f5a..dcea140 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintCustomLabelTwo.vue
@@ -75,12 +75,14 @@
             }
           })
           labelList = a
+
+          props.lastList.length = 0;
           for (let i = 0; i < list.value.length; i++) {
             let count = list.value[i].data.length
             for (let j = 0; j < count; j++) {
-            //  for (let k = 0; k < list.value[i].data[j].quantity; k++) {
+              for (let k = 0; k < list.value[i].data[j].quantity; k++) {
                 props.lastList.push(list.value[i].data[j])
-            //  }
+              }
             }
           }
         } else {
@@ -168,16 +170,20 @@
 </script>
 
 <template>
-  <div id="print" :class="company.printLabel.className.semi.printFlowCardName()">
-    <div v-for="(item1,id) in props.lastList" :class="company.printLabel.className.semi.entiretyName()">
+  <div id="print" class="printFlowCard_semi">
+
+      <template v-for="(item1,id) in props.lastList">
+        <div class="entirety_semi">
       <div class="row4">{{ faceOrientation }}</div>
-      <div  v-for="(item,id) in labelList" :class="company.printLabel.className.semi.contentRowName()">
+      <div  v-for="(item,id) in labelList" class="contentRow">
         <div contenteditable="true" v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" @input="updateProductName($event, id,index)">{{ item.title }}锛歿{ item1[item.name] }}</div>
         <!--        <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2">{{ item1[item.name] }}</div>-->
       </div>
       <div v-html="company.printLabel.customSemi(item1)"></div>
-      <div v-if="(id + 1) % 2 === 0" class="pagebreak"></div>
-    </div>
+        </div>
+        <div v-if="(id + 1) % 2 === 0" class="pagebreak"></div>
+      </template>
+
   </div>
 
 
diff --git "a/north-glass-erp/northglass-erp/src/stores/sd/companySet/\345\244\251\346\264\245\345\214\227\347\216\273.js" "b/north-glass-erp/northglass-erp/src/stores/sd/companySet/\345\244\251\346\264\245\345\214\227\347\216\273.js"
index 2d218dd..713a596 100644
--- "a/north-glass-erp/northglass-erp/src/stores/sd/companySet/\345\244\251\346\264\245\345\214\227\347\216\273.js"
+++ "b/north-glass-erp/northglass-erp/src/stores/sd/companySet/\345\244\251\346\264\245\345\214\227\347\216\273.js"
@@ -34,7 +34,7 @@
         deliveryRemark: ['澶囨敞:鏈壒鐜荤拑涓轰紭绛夊悎鏍煎搧锛岃鍦ㄥ嵏璐ф椂,褰撻潰娑堢偣楠屾敹銆佸鏈夎川閲忛棶棰樺湪涓�鍛ㄥ唴涓庢湰鍏徃鑱旂郴,鍚﹀垯姒備笉璐熻矗锛�'],
         deliveryOutbound: false,//鍙戣揣榛樿鍑哄簱
         flowCardMerge: 0,//娴佺▼鍗″悎鐗囨墦鍗�
-        printBtn:0,//鎵撳嵃鐣岄潰涓変釜鎸夐挳涓槸鍚︽樉绀烘爣绛炬墦鍗扮浉鍏虫寜閽紝0鏄剧ず甯稿窞锛�0鍏跺畠涓嶆樉绀�
+        printBtn:1,//鎵撳嵃鐣岄潰涓変釜鎸夐挳涓槸鍚︽樉绀烘爣绛炬墦鍗扮浉鍏虫寜閽紝0鏄剧ず甯稿窞锛�1鍏跺畠涓嶆樉绀�
         //澶╂触
         printLabel: {
             custom: (item1) => {
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
index 6d5c173..efa5037 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -208,8 +208,20 @@
     tags.value = res.data
   })
 }
-const printObjectProcess = () => {
-  hiprintTemplate.value.print(lastList.value)
+const printOrder = (type) => {
+  const list = hiprintTemplate.value.getJson()
+  list.panels[0].printElements.forEach(element => {
+    element.options.fontFamily = 'Arial'
+  })
+  let object =  lastList.value
+  //鍒ゆ柇鏄惁涓鸿〃鏍�
+  let columnsNum = null
+  if(list.panels[0].printElements[0].options.field==='table'){
+    object = {table:lastList.value}
+    columnsNum = (list.panels[0].printElements[0].options.gridColumns || 1)
+  }
+  hiprintTemplate.value.print(object)
+
 }
 
 const {currentRoute} = useRouter()
@@ -223,7 +235,6 @@
 request.post(`/processCard/selectPrintDetails/${inquiryMode}/${type}`, data.value).then((res) => {
 
   if (res.code == 200) {
-    console.log(res.data.data)
     let newDataCollection = [];
     for (let i = 0; i < res.data.data.length; i++) {
       res.data.data[i].detail.forEach((item) => {
@@ -974,7 +985,7 @@
         destroy-on-close
         style="width: 80%;height:75% ">
       <template #header="{ close, titleId, titleClass }">
-        <el-button :icon="Printer" circle @click="printObjectProcess"/>
+        <el-button :icon="Printer" circle @click="printOrder(1)"/>
       </template>
       <print-custom-label-x-j id="childLabel"
                               :faceOrientation="labelRow.faceOrientation"
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
index 647da1f..8706999 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -163,12 +163,11 @@
 <!--     鍗婃垚鍝佹爣绛�-->
     <template v-for="(item,id) in labelList">
     <div v-if="type!=='3'" id="entirety" >
-      <div v-if="item.customer_name!==undefined" class="row1" >
+      <div  class="row1" >
 <!--閽㈠寲鐗堝浘搴忓彿锛岄挗鍖栫増鍥鹃噷鐨勯『搴�-->
 <!--        <div class="cell" v-if="item.heat_layout_id!==undefined">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div>-->
-        <span style="font-size: 12px;">{{ item.customer_name }}</span>&nbsp;
-        <span v-if="company.showDeliveryCreator">{{ item.order_id }}</span>&nbsp;
-        <span v-if="!company.showDeliveryCreator">{{ item.process_id }}</span>&nbsp;
+        <span style="font-size: 12px;">{{ item.customer_name }}</span>
+
         <template v-if="company.showDeliveryCreator">
           <span v-if="item.process.includes('澶硅兌')||item.process.includes('澶瑰眰')">鑳剁墖</span>
           <span v-else-if="item.process.includes('涓┖')">涓┖</span>
@@ -180,7 +179,10 @@
 <!--        <div class="cell1" v-if="item.stock_id!=undefined">{{ item.stock_id+'/'+item.polys_id }}</div>-->
 
       </div>
-
+      <div v-if="item.customer_name!==undefined" class="row9">
+        <span v-if="company.showDeliveryCreator">{{ item.order_id }}</span>
+        <span v-if="!company.showDeliveryCreator">{{ item.process_id }}</span>
+      </div>
       <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">
         <span v-if="item.heat_layout_id!==undefined && company.showDeliveryCreator"  style="font-size: 7pt;">
           ({{ item.stock_id }}) {{ item.heat_layout_id }}/{{ item.heat_layout_sort }}
@@ -330,13 +332,20 @@
 
 .row3 {
   margin-top: -5px;
+  height: 18px;
+  font-size: 12pt;
+  font-weight: bolder;
+}
+
+.row9 {
+  margin-top: -15px;
   height: 25px;
   font-size: 15pt;
   font-weight: bolder;
 }
 
 .row5 {
-  height: 15px;
+  height: 10px;
   font-weight: bold;
   font-size: 6pt;
 }
@@ -351,7 +360,7 @@
   font-size: 4pt;
 }
 .row6 span {
-  font-size: 12pt;
+  font-size: 10pt;
   font-weight: bold;
 }
 .cell{
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
index d73bda6..7872e80 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -304,8 +304,11 @@
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋�
         List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
         if (!flowCardList.isEmpty()) {
-            Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
+            Set<String> processedKeys = new HashSet<>();
             for (FlowCard flowCard : flowCardList) {
+                String processId = flowCard.getProcessId();
+                Integer orderNumber = flowCard.getOrderNumber();
+                String uniqueKey = processId + "|" + orderNumber;  // 鐢ㄧ壒娈婂瓧绗﹁繛鎺ラ槻姝㈠啿绐�
                 Map<String, Object> itemmap = new HashMap<>();
                 //娴佺▼鍗¤〃澶磋〃灏炬暟鎹�
                 //鏄惁浼犲叆鍚堝苟灞傛暟
@@ -323,11 +326,11 @@
                     } else {
                         if (merge.equals("1") && flowCard.getMerge().equals(1)) {
                             // 妫�鏌ユ槸鍚﹀凡缁忓鐞嗚繃璇� processId锛屽鏋滃鐞嗚繃鍒欒烦杩�
-                            if (processedProcessIds.contains(flowCard.getProcessId())) {
+                            if (processedKeys.contains(uniqueKey)) {
                                 continue;
                             }
                             // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚�
-                            processedProcessIds.add(flowCard.getProcessId());
+                            processedKeys.add(uniqueKey);
                             itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
 
                             List<Map<String, Object>> detailList = flowCardMapper.getDetailListMerge(flowCard.getProcessId(), flowCard.getProcess());
@@ -400,11 +403,14 @@
         }
         List<FlowCard> flowCardList = flowCardMapper.getFlowCardListPrintProject(printProject);
         if (!flowCardList.isEmpty()) {
-            Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
+            Set<String> processedKeys = new HashSet<>();
+
             for (FlowCard flowCard : flowCardList) {
                 Map<String, Object> itemmap = new HashMap<>();
 
-
+                String processId = flowCard.getProcessId();
+                Integer orderNumber = flowCard.getOrderNumber();
+                String uniqueKey = processId + "|" + orderNumber;  // 鐢ㄧ壒娈婂瓧绗﹁繛鎺ラ槻姝㈠啿绐�
                 //鏄惁鍖呭惈鍒囧壊
                 //boolean containsCutting = flowCard.getProcess().contains("鍒囧壊");
                 String processSub = flowCard.getProcess().substring(0, 2);
@@ -425,11 +431,11 @@
                     if (flowCard.getPatchState().equals(0)) {
                         if (merge.equals("1") && flowCard.getMerge().equals(1)) {
                             // 妫�鏌ユ槸鍚﹀凡缁忓鐞嗚繃璇� processId锛屽鏋滃鐞嗚繃鍒欒烦杩�
-                            if (processedProcessIds.contains(flowCard.getProcessId())) {
+                            if (processedKeys.contains(uniqueKey)) {
                                 continue;
                             }
                             // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚�
-                            processedProcessIds.add(flowCard.getProcessId());
+                            processedKeys.add(uniqueKey);
                             itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId()));
 
                             List<Map<String, Object>> detailList = flowCardMapper.getDetailListMerge(flowCard.getProcessId(), flowCard.getProcess());
@@ -589,14 +595,15 @@
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋�
         List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
         if (!flowCardList.isEmpty()) {
-            Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
 
+            Set<String> processedKeys = new HashSet<>();
             if (lableType != 2) {//鎴愬搧鏍囩
                 for (FlowCard flowCard : flowCardList) {
                     String processId = flowCard.getProcessId();
-
+                    Integer orderNumber = flowCard.getOrderNumber();
+                    String uniqueKey = processId + "|" + orderNumber;  // 鐢ㄧ壒娈婂瓧绗﹁繛鎺ラ槻姝㈠啿绐�
                     // 妫�鏌ユ槸鍚﹀凡缁忓鐞嗚繃璇� processId锛屽鏋滃鐞嗚繃鍒欒烦杩�
-                    if (processedProcessIds.contains(processId)) {
+                    if (processedKeys.contains(uniqueKey)) {
                         continue;
                     }
                     Map<String, Object> itemmap = new HashMap<>();
@@ -604,7 +611,7 @@
                     list.add(itemmap);
 
                     // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚�
-                    processedProcessIds.add(processId);
+                    processedKeys.add(uniqueKey);
                 }
             } else {//灏忕墖鏍囩
                 for (FlowCard flowCard : flowCardList) {
@@ -624,14 +631,15 @@
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋�
         List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
         if (!flowCardList.isEmpty()) {
-            Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
-
+            Set<String> processedKeys = new HashSet<>();
             if (lableType != 2) {//鎴愬搧鏍囩
                 for (FlowCard flowCard : flowCardList) {
                     String processId = flowCard.getProcessId();
+                    Integer orderNumber = flowCard.getOrderNumber();
+                    String uniqueKey = processId + "|" + orderNumber;  // 鐢ㄧ壒娈婂瓧绗﹁繛鎺ラ槻姝㈠啿绐�
 
                     // 妫�鏌ユ槸鍚﹀凡缁忓鐞嗚繃璇� processId锛屽鏋滃鐞嗚繃鍒欒烦杩�
-                    if (processedProcessIds.contains(processId)) {
+                    if (processedKeys.contains(uniqueKey)) {
                         continue;
                     }
                     Map<String, Object> itemmap = new HashMap<>();
@@ -639,7 +647,7 @@
                     list.add(itemmap);
 
                     // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚�
-                    processedProcessIds.add(processId);
+                    processedKeys.add(uniqueKey);
                 }
             } else {//灏忕墖鏍囩
                 for (FlowCard flowCard : flowCardList) {
@@ -1008,7 +1016,6 @@
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋�
         List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
         if (!flowCardList.isEmpty()) {
-            Set<String> processedProcessIds = new HashSet<>();  // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId
             for (FlowCard flowCard : flowCardList) {
                 Map<String, Object> itemmap = new HashMap<>();
                 //鏄惁鏄伐绋嬫槑缁嗘墦鍗�

--
Gitblit v1.8.0