From 3a06ce5786fb65f4a015a18b82e867b288a60032 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 08 一月 2025 17:13:02 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue | 121 ++++++++++++++++++++++++----------------
1 files changed, 73 insertions(+), 48 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 7708b60..8d89760 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
@@ -25,6 +25,10 @@
})
const form = ref({
})
+let produceList2 = ref([])
+
+
+
const getData = () => {
if(props.deliveryId===null || props.deliveryId===undefined || props.deliveryId===''){
return
@@ -34,39 +38,54 @@
request.post(`/delivery/getSelectDeliveryPrinting`,form.value).then((res) => {
if(res.code==200){
- produceList.value = deepClone(res.data.data)
- delivery.value=deepClone(res.data.delivery)
- money.value=deepClone(res.data.money)
- otherMoney.value=deepClone(res.data.otherMoney)
- 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){
+ produceList.value = deepClone(res.data)
+ for(let i=0;i<produceList.value.length;i++){
+ let produceList1= ({
+ data:null,
+ otherMoney:null,
+ otherMoney1:null,
+ delivery:null,
+ money:null,
+ otherMoneys:0,
+ sumMoney:0
+ })
+ produceList1.data=produceList.value[i].data
+ produceList1.delivery=produceList.value[i].delivery
+ produceList1.money=produceList.value[i].money
+ produceList1.otherMoney=produceList.value[i].otherMoney
+ for(let j=0;j<produceList1.data.length;j++){
+ produceList1.sumMoney+=produceList1.data[j].DeliveryDetail.money
+ }
+ otherMoney1=[]
+ for(let i=0;i<produceList1.otherMoney.length;i++){
+ if(produceList1.otherMoney[i].DeliveryDetailOtherMoney.monery!=null){
+ produceList1.otherMoneys+=produceList1.otherMoney[i].DeliveryDetailOtherMoney.monery
+ if(otherMoney1.length===0){
+ otherMoney1.push(produceList1.otherMoney[i])
+ }
+ else{
+ for(let s=0;s<otherMoney1.length;s++){
+ if(produceList1.otherMoney[i].DeliveryDetailOtherMoney.alias===otherMoney1[s].DeliveryDetailOtherMoney.alias){
- otherMoney1[s].DeliveryDetailOtherMoney.count=add(otherMoney[i].DeliveryDetailOtherMoney.count,otherMoney1[s].DeliveryDetailOtherMoney.count)
- otherMoney1[s].DeliveryDetailOtherMoney.monery =add(otherMoney[i].DeliveryDetailOtherMoney.monery,otherMoney1[s].DeliveryDetailOtherMoney.monery)
- break
+ otherMoney1[s].DeliveryDetailOtherMoney.count=add(produceList1.otherMoney[i].DeliveryDetailOtherMoney.count,otherMoney1[s].DeliveryDetailOtherMoney.count)
+ otherMoney1[s].DeliveryDetailOtherMoney.monery =add(produceList1.otherMoney[i].DeliveryDetailOtherMoney.monery,otherMoney1[s].DeliveryDetailOtherMoney.monery)
+ break
+ }
+ if(s+1===otherMoney1.length){
+ otherMoney1.push(produceList1.otherMoney[i])
+ break
+ }
}
- if(s+1===otherMoney1.length){
- otherMoney1.push(otherMoney[i])
- break
- }
+
}
}
- }
+ }
+ produceList1.otherMoney1=otherMoney1
+ produceList2.value.push(produceList1)
}
+
}else{
ElMessage.warning(res.msg)
router.push("/login")
@@ -123,7 +142,7 @@
<template>
<div id="sheet">
- <table >
+ <table class="pages" v-for="(itme1, index) in produceList2" :key="index" >
<thead>
<tr class="title-s">
<th colspan="9">
@@ -138,16 +157,16 @@
<th colspan="5" style="width: 40%;">
<h3>閿�鍞彂璐у崟</h3>
</th>
- <th colspan="2" style="width: 30%;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;" 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>
@@ -155,7 +174,7 @@
<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>
@@ -199,10 +218,10 @@
</template>
<tr class="day-in">
<td style="font-size: 15px;" colspan="3">鍚堣:</td>
- <td>{{delivery.quantity}}</td>
- <td>{{delivery.area}}</td>
+ <td>{{itme1.delivery.quantity}}</td>
+ <td>{{itme1.delivery.area}}</td>
<td></td>
- <td>{{parseFloat(sumMoney.toFixed(2))}}</td>
+ <td>{{parseFloat(itme1.sumMoney.toFixed(2))}}</td>
<td colspan="2"></td>
</tr>
<tr class="day-in">
@@ -214,24 +233,24 @@
<span style="width: 25%">閲戦</span>
</div>
</td>
- <td style="text-align: left;border:none;font-size: 15px;" colspan="5">鎬婚噾棰�: {{delivery.money}}</td>
+ <td style="text-align: left;border:none;font-size: 15px;" colspan="5">鎬婚噾棰�: {{itme1.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="display: flex;font-size: 10px;text-align: center" v-for="(item, index2) in itme1.otherMoney1" :key="index2">
<span style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</span>
<span style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</span>
<span style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</span>
<span style="width: 25%">{{parseFloat(item.DeliveryDetailOtherMoney.monery).toFixed(2)}}</span>
</div>
- <div style="display: flex;font-size: 10px;text-align: center" v-if="delivery.freight>0">
+ <div style="display: flex;font-size: 10px;text-align: center" v-if="itme1.delivery.freight>0">
<span style="width: 25%">杩愯垂</span>
- <span style="width: 25%">{{delivery.freightPrice}}</span>
- <span style="width: 25%">{{delivery.freightQuantity}}</span>
- <span style="width: 25%">{{delivery.freight}}</span>
+ <span style="width: 25%">{{itme1.delivery.freightPrice}}</span>
+ <span style="width: 25%">{{itme1.delivery.freightQuantity}}</span>
+ <span style="width: 25%">{{itme1.delivery.freight}}</span>
</div>
</td>
- <td style="text-align: left;border:none;font-size: 15px;" colspan="5">澶у啓閲戦: {{money}}</td>
+ <td style="text-align: left;border:none;font-size: 15px;" colspan="5">澶у啓閲戦: {{itme1.money}}</td>
</tr>
@@ -247,8 +266,8 @@
<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>
@@ -281,8 +300,8 @@
<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: 15%">鍒跺崟鏃ユ湡锛歿{ delivery.createTime1 }}</div>
+ <div style="width: 15%">鍒跺崟鍛橈細{{ itme1.delivery.creator }}</div>
+ <div style="width: 15%">鍒跺崟鏃ユ湡锛歿{ itme1.delivery.createTime1 }}</div>
<div style="width: 15%">鍙戣揣鍛橈細</div>
<div style="width: 15%">鍙告満锛�</div>
<div style="width: 15%">瀹㈡埛绛惧瓧锛�</div>
@@ -452,6 +471,12 @@
<style scoped>
+@media print {
+
+ .pages {
+ page-break-after: always;
+ }
+}
h1,h3{
left:0;
right:0;
--
Gitblit v1.8.0