From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示

---
 north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet2.vue |  240 ++++++++++++++++++++++++++++++++----------------------------
 1 files changed, 128 insertions(+), 112 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet2.vue b/north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet2.vue
index 7e9b024..292a7be 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet2.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet2.vue
@@ -1,6 +1,9 @@
 <script setup>
 import request from "@/utils/request"
 import {computed, onMounted, ref} from "vue"
+import PrintFoot from "@/components/sd/order/PrintFoot.vue"
+import companyInfo from "@/stores/sd/companyInfo"
+const company = companyInfo()
 
 let props = defineProps({
   orderId:null
@@ -19,11 +22,11 @@
 const getData = () => {
   request.get(`/order/printOrderProductGlassDetail/${props.orderId}`).then(res => {
     data.value= res.data
-    console.log(data.value)
-    res.data.orderDetail.forEach(item => {
+    data.value.orderDetail.forEach(item => {
         grossNum.value.quantity += getQuantity(item.productDetail)
         grossNum.value.grossArea += getArea(item.productDetail)
         grossNum.value.perimeter += getPerimeter(item.productDetail)
+        stringToJson(item.productDetail)
     })
 
 
@@ -37,6 +40,11 @@
 onMounted(() => {
   getData()
 })
+const  stringToJson = (productList) => {
+  productList.forEach(item => {
+    item.otherColumns = JSON.parse(item.otherColumns)
+  })
+}
 
 const getQuantity = (productList) => {
   let quantity = 0
@@ -64,194 +72,186 @@
   return parseFloat(perimeter.toFixed(3))
 }
 
+const Url = ''
+const changeBold = (e) =>{
+  if(e.currentTarget.className !=='bold'){
+    e.currentTarget.className ='bold'
+  }else{
+    e.currentTarget.className =''
+  }
 
+}
 
 </script>
 
 
 <template>
   <div id="sheet">
+    <table >
+      <tr class="title-s">
+        <th colspan="17">
+          <img src="../../../assets/northGlass.ico" alt="" style="float: left;max-width: 60px;max-height: 60px">
+          <h1>
+            {{company.companyName}}
+          </h1>
+        </th>
+      </tr>
 
-    <el-row style="margin-bottom: 0.5rem;">
-      <img src="../../../assets/northGlass.ico" alt="" style="max-width: 60px;max-height: 60px">
-      <h1>澶╂触鍖楃幓鐜荤拑宸ヤ笟鎶�鏈湁闄愬叕鍙革紙THBB-QR7.1-01锛�</h1>
-    </el-row >
-    <el-row style="text-align: left">
-      <el-col :span="2" ></el-col>
-      <el-col :span="8" >鍦板潃:澶╂触瀹濆澔鍖鸿妭鑳界幆淇濆伐涓氬尯澶╁叴璺タ渚у疂涓亾鍗椾晶</el-col>
-      <el-col :span="2"></el-col>
-      <el-col :span="5" >鐢佃瘽:022-59280088</el-col>
-      <el-col :span="5" >浼犵湡:022-59280066</el-col>
-    </el-row>
-    <hr>
-    <hr class="hr-border">
+      <tr class="title-s">
+        <th colspan="7">鍦板潃:{{company.address}}</th>
+        <th colspan="5">鐢佃瘽:{{ company.telephone }}</th>
+        <th colspan="5">浼犵湡:{{ company.fax }}</th>
+      </tr>
+      <tr class="title-s" style="height:  30px">
+        <th colspan="17" >
+          <hr class=".hr-border"/>
+          <hr class=".hr-border"/>
+        </th>
+      </tr>
 
-    <el-row >
-      <h3>鐜荤拑鍔犲伐鍗�</h3>
-    </el-row>
-
-    <table>
+      <tr class="title-s" >
+        <th colspan="17">
+          <h3>鐜荤拑鍔犲伐鍗�({{data.order.orderType}})</h3>
+        </th>
+      </tr>
       <tr>
         <th class="title-1">瀹㈡埛鍚嶇О</th>
-        <th colspan="3"></th>
+        <th colspan="7">{{data.order.customerName}}</th>
         <th class="title-1">宸ョ▼鍚嶇О</th>
-        <th colspan="3"></th>
+        <th colspan="8">{{data.order.project}}</th>
       </tr>
       <tr>
         <th class="title-1">鐢熶骇鍗曞彿</th>
-        <th></th>
+        <th colspan="3"> <el-text>{{data.order.orderId}}<el-text style="font-size: 12px;font-weight: bolder">锛堝搴斿崟鍙穥{data.order.batch}})</el-text></el-text></th>
         <th class="title-1">涓嬪崟鏃ユ湡</th>
-        <th></th>
+        <th colspan="3">{{data.order.createTime}}</th>
         <th class="title-1">璁㈠崟绫诲瀷</th>
-        <th></th>
+        <th colspan="4">{{data.order.orderType}}</th>
         <th class="title-1">璺熷崟鍛�</th>
-        <th></th>
+        <th colspan="3">{{data.order.salesman}}</th>
       </tr>
       <tr>
         <th>纾ㄨ竟</th>
-        <th></th>
+        <th colspan="3">{{data.order.otherRemarks}}</th>
         <th>瀹屽伐鏃ユ湡</th>
-        <th></th>
+        <th colspan="3">{{data.order.deliveryDate}}</th>
         <th>鍟嗘爣</th>
-        <th></th>
+        <th colspan="4">{{data.order.icon}}</th>
         <th>鍖呰</th>
-        <th></th>
+        <th colspan="3">{{data.order.packType}}</th>
       </tr>
-
-    </table>
-    <table  >
-      <thead>
-      <tr>
-        <th >搴忓彿</th>
-        <th >鍥惧彿</th>
-        <th>褰╅噳鍥惧彿</th>
-        <th>缂栧彿</th>
-        <th>瑙勬牸锛堝W*楂楬锛�</th>
-        <th>鐗囨暟</th>
-        <th>闈㈢Н</th>
-        <th>寤剁背</th>
-        <th>浜よ揣鏃ユ湡</th>
-        <th>搴忓彿</th>
-        <th>绠辨灦鍙�</th>
-        <th>澶囨敞1</th>
-        <th>澶囨敞2</th>
-        <th>纾ㄨ竟/澶囨敞/鍔犲伐鍐呭</th>
-      </tr>
-      </thead>
+        <tr>
+          <th >搴忓彿</th>
+          <th >{{company.columnName}}</th>
+          <th>褰╅噳鍥惧彿</th>
+          <th>缂栧彿</th>
+          <th>瑙勬牸锛堝W*楂楬锛�</th>
+          <th>鐗囨暟</th>
+          <th>闈㈢Н</th>
+          <th>寤剁背</th>
+          <th>鍗婂緞</th>
+          <th>妤煎彿</th>
+          <th>鍔犲伐瑕佹眰</th>
+          <th colspan="2">澶囨敞</th>
+          <th>澶囨敞1</th>
+          <th>澶囨敞2</th>
+          <th>澶囨敞3</th>
+          <th>澶囨敞4</th>
+        </tr>
       <tbody v-for="(item,index) in data.orderDetail" :key="index">
       <tr>
         <td colspan="2" class="no-change-row">浜у搧鍚嶇О</td>
-        <td colspan="8">{{item.productName}}</td>
+        <td colspan="10" style="text-align: left">{{item.productName}}</td>
         <td class="no-change-row">浜у搧鎻忚堪</td>
-        <td colspan="3"></td>
+        <td colspan="4"></td>
       </tr>
       <template v-for="(item1,index1) in item.productDetail" :key="index1">
         <tr  >
           <td>{{item1.orderNumber}}</td>
-          <td></td>
-          <td></td>
-          <td></td>
+          <td class="notChangeRow">{{  item1.otherColumns?.S02}}</td>
+          <td>{{  item1.otherColumns?.S03}}</td>
+          <td class="notChangeRow">{{  item1.otherColumns?.S01}}</td>
           <td>{{item1.width}}*{{item1.height}}</td>
           <td>{{item1.quantity}}</td>
           <td>{{item1.grossArea}}</td>
           <td>{{item1.perimeter}}</td>
           <td>{{item1.bendRadius}}</td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
+          <td>{{item1.buildingNumber}}</td>
+          <td>{{item1.processingNote}}</td>
+          <td colspan="2">{{item1.remarks}}</td>
+          <td>{{((item1.otherColumns?.S04)?item1.otherColumns.S04:'')}}</td>
+          <td>{{((item1.otherColumns?.S05)?item1.otherColumns.S05:'')}}</td>
+          <td>{{((item1.otherColumns?.S06)?item1.otherColumns.S06:'')}}</td>
+          <td>{{((item1.otherColumns?.S07)?item1.otherColumns.S07:'')}}</td>
+<!--          {{-->
+<!--            ((item1.otherColumns?.S04)?item1.otherColumns.S04:'')+'/'+-->
+<!--            ((item1.otherColumns?.S05)?item1.otherColumns.S05:'')+'/'+-->
+<!--            ((item1.otherColumns?.S06)?item1.otherColumns.S06:'')+'/'+-->
+<!--            ((item1.otherColumns?.S07)?item1.otherColumns.S07:'')-->
+<!--          }}-->
         </tr>
 
-        <tr>
+        <tr v-if="item1.differentSize || item1.bendRadius">
           <td></td>
           <td>鏍囪</td>
           <td colspan="4">鍗婃垚鍝佸悕绉�</td>
           <td>涓嬫枡-瀹�</td>
           <td>寮ч暱</td>
           <td>涓嬫枡-楂�</td>
-          <td>鎷遍珮</td>
+          <td>鍐呮嫳楂�</td>
 
-          <td colspan="4"></td>
+          <td colspan="7"></td>
         </tr>
-          <tr  v-for="(item2,index2) in item1.orderGlassDetails" :key="index2" >
+        <tr v-if="item1.differentSize || item1.bendRadius" v-for="(item2,index2) in item1.orderGlassDetails" :key="index2" >
 
-            <td></td>
-            <td>{{ item2.technologyNumber }}</td>
+            <td style="border: 0"></td>
+            <td>#{{ item2.technologyNumber }}</td>
             <td colspan="4"> {{item2.glassChild}}</td>
             <td>{{item2.childWidth}}</td>
-            <td>{{item1.bendRadius}}</td>
+            <td>{{item2.arc}}</td>
             <td>{{item2.childHeight}}</td>
-            <td>{{item2.archRise}}</td>
-            <td colspan="4"></td>
+            <td>{{item2.archRise?item2.archRise:item1.archRise}}</td>
+            <td colspan="7"></td>
 
           </tr>
       </template>
-
-
-
-
-
-
-
-
-
-
-
-
-
 
       <tr>
         <td colspan="5">灏忚</td>
         <td>{{getQuantity(item.productDetail)}}</td>
         <td>{{getArea(item.productDetail)}}</td>
         <td>{{getPerimeter(item.productDetail)}}</td>
-        <td colspan="6"></td>
+        <td colspan="9"></td>
       </tr>
 
 
       </tbody>
-      <tfoot>
       <tr>
         <td colspan="5">鎬昏</td>
         <td>{{grossNum.quantity}}</td>
         <td>{{grossNum.grossArea}}</td>
         <td>{{grossNum.perimeter}}</td>
-        <td colspan=""></td>
+        <td colspan="9"></td>
       </tr>
       <tr>
-        <td colspan="14">
-          <!--            v-model=""-->
-          <el-input
-              v-model="data.order.processingNote"
-              :rows="2"
-              type="textarea"
-              placeholder=""
-              readonly
-              autosize
-              resize="none"
-
-          />
+        <td colspan="17" style="white-space: pre-wrap;text-align:left ">
+          <template v-for="(item,index) in data.order.processingNote.split('\n')">
+            <el-text @click="changeBold($event)" v-for="val in item.split('')">{{val}}</el-text>
+            <br>
+          </template>
         </td>
       </tr>
-      </tfoot>
     </table>
-    <el-row style="text-align: left ">
-      <el-col :span="4">涓嬪崟鍛橈細</el-col>
-      <el-col :span="4">瀹℃牳浜猴細</el-col>
-      <el-col :span="4">鏍″锛�</el-col>
-    </el-row>
-    <el-row style="text-align: left ">
-      <el-col :span="4">鍒涘缓鏃堕棿锛�</el-col>
-      <el-col :span="4">瀹℃牳鏃堕棿锛�</el-col>
-      <el-col :span="4">鎵撳嵃鏃堕棿锛�</el-col>
-    </el-row>
+    <print-foot :order='data.order' />
   </div>
 </template>
 
 <style scoped>
+*{
+  font-weight: bold;
+}
 #sheet{
-  width: 100%;
+  width: 98%;
   height: 100%;
   text-align: center;
 }
@@ -274,10 +274,11 @@
 
 table{
   border-collapse: collapse;
-  border: 1px solid black;
+  //border: 1px solid black;
   width: 100%;
+  text-align: center;
 }
-table, th, td {
+tr, th, td {
   border: 1px solid black;
   border-collapse: collapse;
 }
@@ -295,5 +296,20 @@
   background-color: black;
   color: black;
 }
+.title-s,.title-s th{
+  border:0
+}
 
+.notChangeRow{
+  white-space: nowrap;
+}
+@media print {
+  @page {
+    margin: 5mm; /* 璁剧疆鎵撳嵃椤甸潰鐨勮竟璺� */
+  }
+}
+.bold {
+  font-weight: bold;
+  font-size: 16px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0