From b97e00dae4fa017c8273e41fb0f24cf7c7c69a33 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期一, 25 十一月 2024 13:28:35 +0800
Subject: [PATCH] 工程打印标签调整

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue |  119 +++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 94 insertions(+), 25 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 04e8503..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,35 +29,70 @@
 })
 
 
+
 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(() => {
-  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])
-          }
-
-        }
+  if(projectNo.value!=null){
+    request.post(`/processCard/getSelectPrintLabel/${projectNo.value}/${type.value}`).then((res) => {
+      if (res.code == 200) {
+        labelList.value = deepClone(res.data.data)
+      } else {
+        ElMessage.warning(res.msg)
+        router.push("/login")
       }
-    } else {
-      ElMessage.warning(res.msg)
-      router.push("/login")
-    }
-  })
+    })
 
-    }
+  }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 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")
+        }
+      })
+    }
+  }
+
+
+})
 
 
 // 鎵撳嵃鏂规硶
@@ -105,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>
@@ -163,7 +215,7 @@
   height: 35px;
 }
 .row1 span {
-  font-size: 15pt;
+  font-size: 14pt;
 }
 .row2 {
   font-size: 12pt;
@@ -171,7 +223,7 @@
   height: 35px;
 }
 .row2 span {
-  font-size: 14pt;
+  font-size: 17pt;
 }
 span {
   font-size: 12pt;
@@ -186,7 +238,7 @@
   line-height: 35px;
 }
 .row3 span{
-  font-size: 22pt;
+  font-size: 24pt;
 }
 
 .row5 {
@@ -195,7 +247,7 @@
   font-size: 14pt;
 }
 .row5 span {
-  font-size: 14pt;
+  font-size: 16pt;
 }
 
 .row6 {
@@ -203,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