From e6bf567a863fb8a6bc7b776ac938825111c9ab52 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期一, 14 十月 2024 08:54:07 +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/PrintCustomLabelSemi2.vue |  111 ++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 80 insertions(+), 31 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
index 42f9b7a..21a7f1d 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
@@ -19,6 +19,8 @@
 let dataList = ref([])
 let list = ref([])
 let lastList=ref([])
+let projectNo = ref([])
+let type = ref([])
 
 let filterData = ref({})
 
@@ -27,53 +29,68 @@
 })
 
 
+
 const {currentRoute} = useRouter()
 const route = currentRoute.value
-data.value.printList = JSON.parse(route.query.printList)
-const type = route.query.type
 const faceOrientation = route.query.faceOrientation
 const lableType = route.query.lableType
 const printType=route.query.printType
+projectNo.value = route.query.projectNo
+type.value = route.query.type
 
 onMounted(() => {
-  if (printType == 1) {
-    request.post(`/processCard/getSelectPrintLabel1`, data.value).then((res) => {
+  if(projectNo.value!=null){
+    request.post(`/processCard/getSelectPrintLabel/${projectNo.value}/${type.value}`).then((res) => {
       if (res.code == 200) {
-        produceList.value = deepClone(res.data.data)
-        for (let i = 0; i < produceList.value.length; i++) {
-          let count = produceList.value[i].data.length
-          for (let j = 0; j < count; j++) {
-            for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
-              labelList.value.push(produceList.value[i].data[j])
-            }
-
-          }
-        }
+        labelList.value = deepClone(res.data.data)
       } else {
         ElMessage.warning(res.msg)
         router.push("/login")
       }
     })
 
-  }else if(printType==2){
-    request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => {
-      if (res.code == 200) {
-        produceList.value = deepClone(res.data.data)
-        for (let i = 0; i < produceList.value.length; i++) {
-          let count = produceList.value[i].data.length
-          for (let j = 0; j < count; j++) {
-            for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
-              labelList.value.push(produceList.value[i].data[j])
-            }
+  }else{
+    data.value.printList = JSON.parse(route.query.printList)
+    if (printType == 1) {
+      request.post(`/processCard/getSelectPrintLabel1`, data.value).then((res) => {
+        if (res.code == 200) {
+          produceList.value = deepClone(res.data.data)
+          for (let i = 0; i < produceList.value.length; i++) {
+            let count = produceList.value[i].data.length
+            for (let j = 0; j < count; j++) {
+              for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
+                labelList.value.push(produceList.value[i].data[j])
+              }
 
+            }
           }
+        } else {
+          ElMessage.warning(res.msg)
+          router.push("/login")
         }
-      } else {
-        ElMessage.warning(res.msg)
-        router.push("/login")
-      }
-    })
+      })
+
+    }else if(printType==2){
+      request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => {
+        if (res.code == 200) {
+          produceList.value = deepClone(res.data.data)
+          for (let i = 0; i < produceList.value.length; i++) {
+            let count = produceList.value[i].data.length
+            for (let j = 0; j < count; j++) {
+              for (let k = 0; k < produceList.value[i].data[j].quantity; k++) {
+                labelList.value.push(produceList.value[i].data[j])
+              }
+
+            }
+          }
+        } else {
+          ElMessage.warning(res.msg)
+          router.push("/login")
+        }
+      })
+    }
   }
+
 
 })
 
@@ -125,14 +142,29 @@
   <div id="printFlowCard" >
     <template v-for="(item,id) in labelList">
     <div id="entirety" >
-      <div class="row1">
+
+      <div class="row1" v-if="item.heat_layout_id!=null">
+        <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div>
         <span>{{ item.customer_name }}</span>&nbsp;
         <span>{{ item.order_id }}</span>&nbsp;
         <span v-if="item.process.includes('澶硅兌')">鑳剁墖</span>
         <span v-else-if="item.process.includes('涓┖')">涓┖</span>
         <span v-else-if="item.process.includes('鐧惧彾')">鐧惧彾</span>
         <span v-else></span>
+        <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div>
       </div>
+      <div class="row6" v-else>
+        <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div>
+        <span>{{ item.customer_name }}</span>&nbsp;
+        <span>{{ item.order_id }}</span>&nbsp;
+        <span v-if="item.process.includes('澶硅兌')">鑳剁墖</span>
+        <span v-else-if="item.process.includes('涓┖')">涓┖</span>
+        <span v-else-if="item.process.includes('鐧惧彾')">鐧惧彾</span>
+        <span v-else></span>
+        <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div>
+      </div>
+
+
       <div class="row2">
         <span>{{item.project}}</span>&nbsp;
         <span>{{ item.building_number }}</span>
@@ -183,7 +215,7 @@
   height: 35px;
 }
 .row1 span {
-  font-size: 17pt;
+  font-size: 14pt;
 }
 .row2 {
   font-size: 12pt;
@@ -223,6 +255,23 @@
   font-weight: bold;
   font-size: 10pt;
 }
+.row6 span {
+  font-size: 17pt;
+}
+
+.cell{
+  position: absolute;
+  font-weight: bold;
+  margin-left: 5px;
+  margin-top: 0px;
+}
+
+.cell1{
+  position: absolute;
+  font-weight: bold;
+  margin-left: 225px;
+  margin-top: -30px;
+}
 
 
 

--
Gitblit v1.8.0