From ff1be3b4ed56b84848ad34ea2383788c220bff64 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 24 十一月 2025 13:14:17 +0800
Subject: [PATCH] 修改产品一级玻璃类别bug以及发货一行两列无金额打印
---
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue | 133 +++++++++++++++++++++++++++++--------------
1 files changed, 89 insertions(+), 44 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue
index 211cfbf..9657ed7 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue
@@ -12,10 +12,10 @@
let money = ref("")
let otherMoneys = 0
let takeCare = "娉ㄦ剰:璇峰Ε鍠勪繚绠″ソ鎴戝徃鐨勭幓鐠冩灦锛屽鏈変涪澶辨垨鎹熷潖锛屾寜1500鍏冨彧璧斿伩銆傝阿璋㈤厤鍚�!"
-let remark = "澶囨敞:鏈壒鐜荤拑涓轰紭绛夊悎鏍煎搧锛岃鍦ㄥ嵏璐ф椂,褰撻潰娑堢偣楠屾敹銆佸鏈夎川閲忛棶棰樺湪涓�鍛ㄥ唴涓庢湰鍏徃鑱旂郴,鍚﹀垯姒備笉璐熻矗锛�"
+let remark = company.deliveryRemark
-
+let produceList2 = ref([])
let props = defineProps({
deliveryId:null
})
@@ -26,20 +26,24 @@
return
}
form.value.deliveryId=props.deliveryId
+ form.value.type=company.productName
- request.post(`/Delivery/getSelectDeliveryPrinting`,form.value).then((res) => {
+ request.post(`/delivery/getSelectDeliveryPrinting`,form.value).then((res) => {
if(res.code==200){
- console.log(res.data.data)
- produceList.value = deepClone(res.data.data)
- delivery.value=deepClone(res.data.delivery)
- money.value=deepClone(res.data.money)
- otherMoney.value=deepClone(res.data.otherMoney)
- otherMoney.value.forEach(item => {
- if(item.DeliveryDetailOtherMoney.monery!=null){
- otherMoneys+=item.DeliveryDetailOtherMoney.monery
- }
- })
+ produceList.value = deepClone(res.data)
+ for(let i=0;i<produceList.value.length;i++){
+ let produceList1= ({
+ data:null,
+ delivery:null,
+ })
+ produceList1.data=produceList.value[i].data
+ produceList1.delivery=produceList.value[i].delivery
+
+
+ produceList2.value.push(produceList1)
+ }
+
}else{
ElMessage.warning(res.msg)
router.push("/login")
@@ -96,10 +100,10 @@
<template>
<div id="sheet">
- <table >
+ <table class="pages" v-for="(itme1, index) in produceList2" :key="index" >
<thead>
<tr class="title-s">
- <th colspan="13">
+ <th colspan="9">
<h1>
{{company.companyName}}
</h1>
@@ -107,20 +111,24 @@
</tr>
<tr class="title-s">
- <th colspan="2"></th>
- <th colspan="5">
+ <th colspan="2" style="width: 30%"></th>
+ <th colspan="5" style="width: 40%;">
+ <h4 v-if="!company.showDeliveryCreator" >閲戝崕甯備箰鍔ㄦ櫤鑳界鎶�鏈夐檺鍏徃</h4>
<h3>閿�鍞彂璐у崟</h3>
+
</th>
- <th colspan="2" style="text-align: left;">鍙戣揣鍗曞彿锛�<span>{{delivery.deliveryId}}</span></th>
+ <th colspan="2" style="width: 30%;text-align: left;">鍙戣揣鍗曞彿锛�<span>{{itme1.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>
+ <th style="text-align: left;border:none;" colspan="4">瀹㈡埛鍚嶇О锛�<span>{{itme1.delivery.customerName}}</span></th>
+ <th style="text-align: left;border:none;" v-if="itme1.data[0].DeliveryDetail.order.batch!==''" colspan="3">
+ 椤圭洰鍚嶇О锛�<span>{{itme1.delivery.project}}({{itme1.data[0].DeliveryDetail.order.batch}})</span></th>
+ <th style="text-align: left;border:none;" v-else colspan="3">椤圭洰鍚嶇О锛�<span>{{itme1.delivery.project}}</span></th>
+ <th style="text-align: left;border:none;" colspan="2">鑱旂郴浜猴細<span>{{itme1.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>
+ <th style="text-align: left;border:none;" colspan="7">閫佽揣鍦板潃锛�<span>{{itme1.delivery.deliveryAddress}}</span></th>
+ <th style="text-align: left;border:none;" colspan="2">鑱旂郴鐢佃瘽锛�<span>{{itme1.delivery.contactNumber}}</span></th>
</tr>
@@ -128,11 +136,12 @@
<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" >
+ <template v-for="(item, index) in itme1.data" :key="index" >
<thead>
<tr v-if="index===0">
<th style="width: 6%;">搴忓彿</th>
- <th style="width: 20%;">妤煎眰缂栧彿</th>
+ <th style="width: 10%;">妤煎眰缂栧彿</th>
+ <th style="width: 10%;">绠卞彿</th>
<th style="width: 20%;" colspan="2">瀹絏楂�</th>
<th style="width: 10%;">鏁伴噺</th>
<th style="width: 10%;">闈㈢Н</th>
@@ -142,30 +151,35 @@
</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="5">浜у搧鍚嶇О:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
+ <td v-if="company.showDeliveryCreator" style="font-size: 15px;text-align: left" colspan="2">璁㈣揣鏃ユ湡:<span>{{item.DeliveryDetail.order.contractId}}</span></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="2" style="font-size: 15px;font-weight: bold;">{{items.width}}x{{items.height}}</td>
+ <td >{{items.buildingNumber}}</td>
+ <td >{{items.box_no}}</td>
+<!-- <td colspan="2" style="font-size: 15px;font-weight: bold;" v-if="items.other_columns!=null&&(JSON.parse(items.other_columns).S02!=null && company.companyName==='閲戝崕绂忓枩澶╂垚鐜荤拑鏈夐檺鍏徃')">{{JSON.parse(items.other_columns).S02}}</td>-->
+ <td colspan="2" style="font-size: 15px;font-weight: bold;" >
+ {{items.other_columns!=null&&(JSON.parse(items.other_columns).S02!=null )?"("+JSON.parse(items.other_columns).S02+")":''}}
+ {{items.width}}x{{items.height}}
+ </td>
<td>{{items.quantity}}</td>
<td>{{items.area}}</td>
<td colspan="3">{{items.processingNote}}</td>
</tr>
<tr class="day-in" >
- <td style="font-size: 15px;" colspan="4">灏忚:</td>
+ <td style="font-size: 15px;" colspan="5">灏忚:</td>
<td>{{item.DeliveryDetail.quantity}}</td>
<td>{{item.DeliveryDetail.area}}</td>
</tr>
</template>
<tr class="day-in">
- <td style="font-size: 15px;" colspan="4">鍚堣:</td>
- <td>{{delivery.quantity}}</td>
- <td>{{delivery.area}}</td>
+ <td style="font-size: 15px;" colspan="5">鍚堣:</td>
+ <td>{{itme1.delivery.quantity}}</td>
+ <td>{{itme1.delivery.area}}</td>
</tr>
@@ -178,11 +192,11 @@
<el-col :span="4"><div style="font-size: 12px" class="bottom">鎵撳嵃浜猴細{{username}}</div></el-col>
</el-row>-->
- <tr class="day-in" style="border: 0;">
+ <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator">
<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: 15%">鍒跺崟鍛橈細{{ itme1.delivery.creator }}</div>
+ <div style="width: 25%">鍒跺崟鏃ユ湡锛歿{ itme1.delivery.createTime }}</div>
<div style="width: 10%">鍙戣揣鍛橈細</div>
<div style="width: 10%">鍙告満锛�</div>
<div style="width: 15%">瀹㈡埛绛惧瓧锛�</div>
@@ -192,7 +206,7 @@
</td>
</tr>
- <tr class="day-in" style="border: 0;">
+ <tr class="day-in" style="border: 0;" v-if="company.showDeliveryCreator">
<td colspan="9" style="border: 0;">
<div style="display:flex;" class="bottom">
鏋跺瓙 鍙�
@@ -203,9 +217,30 @@
</tr>
<tr class="day-in" style="border: 0;">
<td colspan="9" style="border: 0;">
- <div style="display:flex;" class="bottom">
- {{remark}}
+ <div style="display:flex;text-align: left" class="bottom" v-for="item in remark">
+ {{item}}
</div>
+
+ </td>
+ </tr>
+
+ <tr class="day-in" style="border: 0" v-if="!company.showDeliveryCreator">
+ <td colspan="9" style="border: 0">
+ <div style="width: 100%;height: 50px"></div>
+ </td>
+ </tr>
+
+ <tr class="day-in" style="border: 0;" v-if="!company.showDeliveryCreator">
+ <td colspan="9" style="border: 0;">
+ <div style="display:flex;;text-align: left" class="bottom">
+ <div style="width: 15%">鍒跺崟鍛橈細{{ itme1.delivery.creator }}</div>
+ <div style="width: 25%">鍒跺崟鏃ユ湡锛歿{ itme1.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>
@@ -225,7 +260,20 @@
<style scoped>
-
+@media print {
+ @page {
+ margin: 12mm 10mm 20mm 10mm !important;
+ }
+ .pages {
+ page-break-after: always;
+ }
+ @page {
+ @top-right {
+ margin-top: 50px;
+ content: "绗� " counter(page) " 椤�"; /* 浣跨敤counter娣诲姞椤电爜 */
+ }
+ }
+}
h1,h3{
left:0;
right:0;
@@ -238,6 +286,7 @@
}
h3{
font-size: 1.2rem;
+ font-weight: bolder;
}
@@ -276,11 +325,7 @@
background-color: black;
color: black;
}
-@page {
- size: auto;
- margin: 8mm 16mm 16mm 16mm
-}
--
Gitblit v1.8.0