From d809ecd16cbb23f5aad86a6844f51ffea0455fe8 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 06 九月 2024 16:53:55 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue |  278 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 254 insertions(+), 24 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
index 270243e..f305b42 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
@@ -7,10 +7,12 @@
 import {ElMessage} from "element-plus";
 const company = companyInfo()
 let produceList = ref([])
-let otherMoney = ref([])
+let otherMoney = []
+let otherMoney1 = []
 let delivery = ref([])
 let money = ref("")
 let otherMoneys = 0
+let sumMoney = 0
 let takeCare = "娉ㄦ剰:璇峰Ε鍠勪繚绠″ソ鎴戝徃鐨勭幓鐠冩灦锛屽鏈変涪澶辨垨鎹熷潖锛屾寜1500鍏冨彧璧斿伩銆傝阿璋㈤厤鍚�!"
 let remark = "澶囨敞:鏈壒鐜荤拑涓轰紭绛夊悎鏍煎搧锛岃鍦ㄥ嵏璐ф椂,褰撻潰娑堢偣楠屾敹銆佸鏈夎川閲忛棶棰樺湪涓�鍛ㄥ唴涓庢湰鍏徃鑱旂郴,鍚﹀垯姒備笉璐熻矗锛�"
 
@@ -34,9 +36,35 @@
       delivery.value=deepClone(res.data.delivery)
       money.value=deepClone(res.data.money)
       otherMoney.value=deepClone(res.data.otherMoney)
-      otherMoney.value.forEach(item => {
-        otherMoneys+=item.DeliveryDetailOtherMoney.monery
+      produceList.value.forEach(item => {
+        sumMoney+=item.DeliveryDetail.money
       })
+
+      otherMoney1=[]
+      otherMoney=deepClone(res.data.otherMoney)
+      for(let i=0;i<otherMoney.length;i++){
+        if(otherMoney[i].DeliveryDetailOtherMoney.monery!=null){
+          otherMoneys+=otherMoney[i].DeliveryDetailOtherMoney.monery
+          if(otherMoney1.length===0){
+            otherMoney1.push(otherMoney[i])
+          }
+          else{
+            for(let s=0;s<otherMoney1.length;s++){
+              if(otherMoney[i].DeliveryDetailOtherMoney.alias===otherMoney1[s].DeliveryDetailOtherMoney.alias){
+                otherMoney1[s].DeliveryDetailOtherMoney.count=otherMoney[i].DeliveryDetailOtherMoney.count+otherMoney1[s].DeliveryDetailOtherMoney.count
+                otherMoney1[s].DeliveryDetailOtherMoney.monery =otherMoney[i].DeliveryDetailOtherMoney.monery+otherMoney1[s].DeliveryDetailOtherMoney.monery
+                break
+              }
+              if(s+1===otherMoney1.length){
+                otherMoney1.push(otherMoney[i])
+                break
+              }
+            }
+
+          }
+        }
+
+      }
     }else{
       ElMessage.warning(res.msg)
       router.push("/login")
@@ -93,7 +121,166 @@
 
 <template>
   <div id="sheet">
-    <table border="1" >
+    <table >
+      <thead>
+      <tr class="title-s">
+        <th colspan="9">
+          <h1>
+            {{company.companyName}}
+          </h1>
+        </th>
+      </tr>
+
+      <tr  class="title-s">
+        <th colspan="2" style="width: 30%"></th>
+        <th colspan="5" style="width: 40%;">
+          <h3>閿�鍞彂璐у崟</h3>
+        </th>
+        <th colspan="2" style="width: 30%;text-align: left;">鍙戣揣鍗曞彿锛�<span>{{delivery.deliveryId}}</span></th>
+      </tr>
+      <tr>
+        <th style="text-align: left;border:none;" colspan="4">瀹㈡埛鍚嶇О锛�<span>{{delivery.customerName}}</span></th>
+        <th style="text-align: left;border:none;" colspan="3">椤圭洰鍚嶇О锛�<span>{{delivery.project}}</span></th>
+        <th style="text-align: left;border:none;" colspan="2">鑱旂郴浜猴細<span>{{delivery.contacts}}</span></th>
+      </tr>
+      <tr>
+        <th style="text-align: left;border:none;" colspan="7">閫佽揣鍦板潃锛�<span>{{delivery.deliveryAddress}}</span></th>
+        <th style="text-align: left;border:none;" colspan="2">鑱旂郴鐢佃瘽锛�<span>{{delivery.contactNumber}}</span></th>
+      </tr>
+
+
+      </thead>
+      <tr style="border-style: none">
+        <td colspan="9" style="border-style: none">
+          <table style="border-style: none;width: 100%;height: 100%">
+            <template v-for="(item, index) in produceList" :key="index" >
+              <thead>
+              <tr v-if="index===0">
+                <th style="width: 6%;">搴忓彿</th>
+                <th style="width: 15%;">妤煎眰缂栧彿</th>
+                <th style="width: 17%;" colspan="1">瀹絏楂�</th>
+                <th style="width: 10%;">鏁伴噺</th>
+                <th style="width: 10%;">闈㈢Н</th>
+                <th style="width: 10%;">鍗曚环</th>
+                <th style="width: 12%;">閲戦</th>
+                <th style="width: 20%;" colspan="2">鍔犲伐瑕佹眰</th>
+              </tr>
+
+
+              </thead>
+              <tr>
+                <td style="font-size: 15px;text-align: left" colspan="4">浜у搧鍚嶇О:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
+                <td style="font-size: 15px;text-align: left" colspan="2">瀵规柟鍗曞彿:</td>
+                <td style="font-size: 15px;text-align: left" colspan="3">璁㈠崟缂栧彿:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
+              </tr>
+
+              <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1">
+                <td>{{items.order_number}}</td>
+                <td>{{items.buildingNumber}}</td>
+                <td colspan="1" style="font-size: 15px;font-weight: bold;" v-if="items.other_columns!=null&&(JSON.parse(items.other_columns).S02!=null)">{{JSON.parse(items.other_columns).S02}}</td>
+                <td colspan="1" style="font-size: 15px;font-weight: bold;" v-else>{{items.width}}x{{items.height}}</td>
+                <td>{{items.quantity}}</td>
+                <td>{{items.area}}</td>
+                <td>{{items.price}}</td>
+                <td>{{items.money}}</td>
+                <td colspan="2">{{items.processingNote}}</td>
+              </tr>
+              <tr class="day-in" >
+                <td style="font-size: 15px;" colspan="3">灏忚:</td>
+                <td>{{item.DeliveryDetail.quantity}}</td>
+                <td>{{item.DeliveryDetail.area}}</td>
+                <td></td>
+                <td>{{item.DeliveryDetail.money}}</td>
+                <td colspan="2"></td>
+              </tr>
+
+            </template>
+            <tr class="day-in">
+              <td style="font-size: 15px;" colspan="3">鍚堣:</td>
+              <td>{{delivery.quantity}}</td>
+              <td>{{delivery.area}}</td>
+              <td></td>
+              <td>{{parseFloat(sumMoney.toFixed(2))}}</td>
+              <td colspan="2"></td>
+            </tr>
+            <tr class="day-in">
+              <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="4">
+                <div style="display: flex;font-size: 10px;text-align: center;">
+                  <div style="width: 25%">鍔犲伐璐圭敤</div>
+                  <div  style="width: 25%">鍗曚环</div>
+                  <div  style="width: 25%">鏁伴噺</div>
+                  <div  style="width: 25%">閲戦</div>
+                </div>
+              </td>
+              <td style="text-align: left;border:none;font-size: 15px;" colspan="5">鎬婚噾棰�:&nbsp;&nbsp;&nbsp;&nbsp;{{delivery.money}}</td>
+            </tr>
+            <tr class="day-in">
+              <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="4" >
+                <div style="display: flex;font-size: 10px;text-align: center" v-for="(item, index2) in otherMoney1" :key="index2">
+                  <div style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</div>
+                  <div  style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</div>
+                  <div  style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</div>
+                  <div  style="width: 25%">{{parseFloat(item.DeliveryDetailOtherMoney.monery.toFixed(2))}}</div>
+                </div>
+                <div style="display: flex;font-size: 10px;text-align: center" v-if="delivery.freight>0">
+                  <div style="width: 25%">杩愯垂</div>
+                  <div  style="width: 25%">{{delivery.freightPrice}}</div>
+                  <div  style="width: 25%">{{delivery.freightQuantity}}</div>
+                  <div  style="width: 25%">{{delivery.freight}}</div>
+                </div>
+              </td>
+              <td style="text-align: left;border:none;font-size: 15px;" colspan="5">澶у啓閲戦:&nbsp;&nbsp;&nbsp;&nbsp;{{money}}</td>
+            </tr>
+
+
+            <!--      <el-row :gutter="24">
+                    <el-col :span="4"><div style="font-size: 12px" class="bottom">鍒跺崟鍛橈細{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col>
+                    <el-col :span="6"><div style="font-size: 12px" class="bottom">鍒跺崟鏃ユ湡锛歿{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col>
+                    <el-col :span="4"><div style="font-size: 12px" class="bottom">瀹℃牳鍛橈細{{data.order.verifier}}</div></el-col>
+                    <el-col :span="6"><div style="font-size: 12px" class="bottom">瀹℃牳鏃ユ湡锛歿{data.order.updateTime}}</div></el-col>
+                    <el-col :span="4"><div style="font-size: 12px" class="bottom">鎵撳嵃浜猴細{{username}}</div></el-col>
+
+                  </el-row>-->
+            <tr class="day-in" style="border: 0;">
+              <td colspan="9" style="border: 0;">
+                <div style="display:flex;;text-align: left"  class="bottom">
+                  <div style="width: 15%">鍒跺崟鍛橈細{{ delivery.creator }}</div>
+                  <div style="width: 25%">鍒跺崟鏃ユ湡锛歿{ delivery.createTime }}</div>
+                  <div style="width: 10%">鍙戣揣鍛橈細</div>
+                  <div style="width: 10%">鍙告満锛�</div>
+                  <div style="width: 15%">瀹㈡埛绛惧瓧锛�</div>
+                  <div style="width: 15%">绛炬敹鏃ユ湡锛�</div>
+                </div>
+
+
+              </td>
+            </tr>
+            <tr class="day-in" style="border: 0;">
+              <td colspan="9" style="border: 0;">
+                <div style="display:flex;" class="bottom">
+                  鏋跺瓙&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;鍙�&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  {{takeCare}}
+                </div>
+
+              </td>
+            </tr>
+            <tr class="day-in" style="border: 0;">
+              <td colspan="9" style="border: 0;">
+                <div style="display:flex;" class="bottom">
+                  {{remark}}
+                </div>
+
+              </td>
+            </tr>
+
+          </table>
+        </td>
+      </tr>
+
+    </table>
+
+    <!--    <table border="1" >
+      <thead>
       <tr class="title-s">
         <th colspan="13">
           <h1>
@@ -128,6 +315,7 @@
         <th style="width: 12%;">閲戦</th>
         <th style="width: 12%;" colspan="2">鍔犲伐瑕佹眰</th>
       </tr>
+      </thead>
       <template v-for="(item, index) in produceList" :key="index" >
         <tr>
           <td style="font-size: 15px;text-align: left" colspan="4">浜у搧鍚嶇О:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
@@ -160,7 +348,7 @@
         <td>{{delivery.quantity}}</td>
         <td>{{delivery.area}}</td>
         <td></td>
-        <td>{{delivery.money-otherMoneys}}</td>
+        <td>{{delivery.money-otherMoneys-delivery.freight}}</td>
         <td></td>
       </tr>
       <tr class="day-in">
@@ -182,27 +370,60 @@
             <div  style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</div>
             <div  style="width: 25%">{{item.DeliveryDetailOtherMoney.monery}}</div>
           </div>
+          <div style="display: flex;font-size: 10px;text-align: center" v-if="delivery.freight>0">
+            <div style="width: 25%">杩愯垂</div>
+            <div  style="width: 25%">{{delivery.freightPrice}}</div>
+            <div  style="width: 25%">{{delivery.freightQuantity}}</div>
+            <div  style="width: 25%">{{delivery.freight}}</div>
+          </div>
         </td>
         <td style="text-align: left;border:none;font-size: 15px;" colspan="5">澶у啓閲戦:&nbsp;&nbsp;&nbsp;&nbsp;{{money}}</td>
       </tr>
 
-    </table>
-    <el-row :gutter="20">
-      <el-col :span="4"><div class="bottom">鍒跺崟鍛橈細<span style="font-size: 10px">{{delivery.creator}}</span></div></el-col>
-      <el-col :span="4"><div class="bottom">鍒跺崟鏃ユ湡锛�<span style="font-size: 10px">{{delivery.createTime}}</span></div></el-col>
-      <el-col :span="4"><div class="bottom">鍙戣揣鍛橈細</div></el-col>
-      <el-col :span="3"><div class="bottom">鍙告満锛�</div></el-col>
-      <el-col :span="4"><div class="bottom">瀹㈡埛绛惧瓧锛�</div></el-col>
-      <el-col :span="4"><div class="bottom">绛炬敹鏃ユ湡锛�</div></el-col>
 
-    </el-row>
-    <el-row :gutter="20" style="margin-top: 20px;">
-      <el-col :span="4"><div class="bottom">鏋跺瓙&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;鍙�</div></el-col>
-      <el-col :span="20"><div class="bottom">{{takeCare}}</div></el-col>
-    </el-row>
-    <el-row :gutter="20" style="margin-top: 20px;">
-      <el-col :span="24"><div class="bottom">{{remark}}</div></el-col>
-    </el-row>
+      <tfoot style="border: 0">
+      &lt;!&ndash;      <el-row :gutter="24">
+              <el-col :span="4"><div style="font-size: 12px" class="bottom">鍒跺崟鍛橈細{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col>
+              <el-col :span="6"><div style="font-size: 12px" class="bottom">鍒跺崟鏃ユ湡锛歿{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col>
+              <el-col :span="4"><div style="font-size: 12px" class="bottom">瀹℃牳鍛橈細{{data.order.verifier}}</div></el-col>
+              <el-col :span="6"><div style="font-size: 12px" class="bottom">瀹℃牳鏃ユ湡锛歿{data.order.updateTime}}</div></el-col>
+              <el-col :span="4"><div style="font-size: 12px" class="bottom">鎵撳嵃浜猴細{{username}}</div></el-col>
+
+            </el-row>&ndash;&gt;
+      <tr class="day-in" style="border: 0;">
+        <td colspan="9" style="border: 0;">
+          <div style="display:flex;">
+            <div style="width: 15%">鍒跺崟鍛橈細{{ delivery.creator }}</div>
+            <div style="width: 25%">鍒跺崟鏃ユ湡锛歿{ delivery.createTime }}</div>
+            <div style="width: 10%">鍙戣揣鍛橈細</div>
+            <div style="width: 10%">鍙告満锛�</div>
+            <div style="width: 15%">瀹㈡埛绛惧瓧锛�</div>
+            <div style="width: 15%">绛炬敹鏃ユ湡锛�</div>
+          </div>
+
+
+        </td>
+      </tr>
+      <tr>
+        <td colspan="9" style="border: 0;">
+          <div style="display:flex;" class="bottom">鏋跺瓙&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;鍙�</div>
+          <div style="display:flex;" class="bottom">
+            {{takeCare}}
+          </div>
+
+        </td>
+      </tr>
+      <tr>
+        <td colspan="9" style="border: 0;">
+          <div style="display:flex;" class="bottom">
+            {{remark}}
+          </div>
+
+        </td>
+      </tr>
+      </tfoot>
+
+    </table>-->
 
   </div>
 
@@ -213,9 +434,6 @@
 
 
 <style scoped>
-#child{
-  margin-top: 20px;
-}
 h1,h3{
   left:0;
   right:0;
@@ -228,6 +446,7 @@
 }
 h3{
   font-size: 1.2rem;
+  font-weight: bolder;
 }
 
 
@@ -257,6 +476,17 @@
   background-color: black;
   color: black;
 }
+table {
+  border-collapse: collapse;
+  width: 100%;
+
+}
+td > table {
+  margin: 0;
+  padding: 0;
+}
+
+
 
 
 </style>
\ No newline at end of file

--
Gitblit v1.8.0