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 | 61 ++++++++++++++++++++----------
1 files changed, 41 insertions(+), 20 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 70bbf11..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 = "澶囨敞:鏈壒鐜荤拑涓轰紭绛夊悎鏍煎搧锛岃鍦ㄥ嵏璐ф椂,褰撻潰娑堢偣楠屾敹銆佸鏈夎川閲忛棶棰樺湪涓�鍛ㄥ唴涓庢湰鍏徃鑱旂郴,鍚﹀垯姒備笉璐熻矗锛�"
@@ -30,17 +32,39 @@
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.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")
@@ -108,11 +132,11 @@
</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%;">
<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>{{delivery.deliveryId}}</span></th>
</tr>
<tr>
<th style="text-align: left;border:none;" colspan="4">瀹㈡埛鍚嶇О锛�<span>{{delivery.customerName}}</span></th>
@@ -133,13 +157,13 @@
<thead>
<tr v-if="index===0">
<th style="width: 6%;">搴忓彿</th>
- <th style="width: 20%;">妤煎眰缂栧彿</th>
- <th style="width: 20%;" colspan="1">瀹絏楂�</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: 12%;" colspan="2">鍔犲伐瑕佹眰</th>
+ <th style="width: 20%;" colspan="2">鍔犲伐瑕佹眰</th>
</tr>
@@ -153,7 +177,8 @@
<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;">{{items.width}}x{{items.height}}</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>
@@ -175,7 +200,7 @@
<td>{{delivery.quantity}}</td>
<td>{{delivery.area}}</td>
<td></td>
- <td>{{delivery.money-otherMoneys-delivery.freight}}</td>
+ <td>{{parseFloat(sumMoney.toFixed(2))}}</td>
<td colspan="2"></td>
</tr>
<tr class="day-in">
@@ -191,11 +216,11 @@
</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 otherMoney" :key="index2">
+ <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%">{{item.DeliveryDetailOtherMoney.monery}}</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>
@@ -460,11 +485,7 @@
margin: 0;
padding: 0;
}
-@page {
- size: auto;
- margin: 8mm 16mm 16mm 16mm
-}
--
Gitblit v1.8.0