Browse Source

表格打印调整

qzyReal 2 years ago
parent
commit
ae48d6ea56

+ 2 - 2
app-ui/utils/request.js

@@ -1,8 +1,8 @@
 // const server = 'http://127.0.0.1:8099/pro';
-const server = 'https://pco.aseanbusiness.cn/pro';
+// const server = 'https://pco.aseanbusiness.cn/pro';
 
 
-// const server = 'https://dxkaa1.gxbtka.com/pro';
+const server = 'https://dxkaa1.gxbtka.com/pro';
 
 
 import common from '../common/js/common.js';

+ 53 - 6
sp-admin/sa-view/tb-fee-statistics/dayStatsPrint.html

@@ -82,13 +82,13 @@
 								<th style="width: 40px;" rowspan="2">总价</th>
 								<th style="width: 80px;" rowspan="2">不含税金额</th>
 								<th style="width: 30px;" rowspan="2">税率</th>
-								<th style="width: 40px;" rowspan="2">税款</th>
+								<th style="width: 50px;" rowspan="2">税款</th>
 
 								<th colspan="4">收费方式</th>
 								<th style="width: 60px;" rowspan="2">开单员</th>
 								<th style="width: 60px;" rowspan="2">复核员</th>
 								<th style="width: 75px;" rowspan="2">统计稽查员</th>
-								<th style="width: 75px;" rowspan="2">部门审核人</th>
+								<th style="width: 75px;" rowspan="2">部门负责人</th>
 							</tr>
 							<tr style="font-weight: 500;">
 								<th style="width: 40px;">微信</th>
@@ -113,6 +113,22 @@
 								<td>{{cel.jiChaPerson}}</td>
 								<td>{{cel.judgeBy}}</td>
 							</tr>
+							<tr style="height: 60px;padding: 0 0.5px;" v-if="index==dataList.length-1">
+								<td colspan="2">合计</td>
+								<td>{{total.num}}</td>
+								<td>{{total.totalMoney}}</td>
+								<td>{{(total.totalNoTaxMoney).toFixed(2)}}</td>
+								<td>-</td>
+								<td>{{(total.totalTaxes).toFixed(2)}}</td>
+								<td>{{total.totalWxPrice}}</td>
+								<td>-</td>
+								<td>-</td>
+								<td>{{total.totalYuePrice}}</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+							</tr>
 						</table>
 					</div>
 				</div>
@@ -128,7 +144,17 @@
 						"endDay": sa.p('endDay', ''),
 						"feeType": sa.p('feeType', '')
 					},
-					dataList: []
+					dataList: [],
+					total:{
+						totalAliPrice: 0,
+						totalCardPrice: 0,
+						totalMoney: 0,
+						totalNoTaxMoney: 0,
+						totalTaxes: 0,
+						totalWxPrice: 0,
+						totalYuePrice: 0,
+						num:0
+					}
 				},
 				methods: {
 					getDataList() {
@@ -143,22 +169,43 @@
 							feeType: this.p.feeType
 						}
 						sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
+							this.total=resp.data;
 							var list = resp.data.list;
 							let len = list.length;
 							let child = [];
 							let dataList = [];
+							let wxTotal = 0;
+							let yuePrice = 0;
+							let totalNum = 0;
+							let totalMoney = 0;
+							let totalTaxMoney = 0;
+							let totalNoTaxMoney = 0;
 							for (i = 0; i < len; i++) {
-								child.push(list[i]);
-								if (child.length == 12 || i == len - 1) {
+								let item = list[i];
+								wxTotal += item.wxPrice;
+								yuePrice += item.yuePrice;
+								totalNum += item.num;
+								totalMoney += item.taxMoney;
+								totalTaxMoney += item.taxes;
+								totalNoTaxMoney += item.noTaxMoney;
+								child.push(item);
+								if (child.length == 11 || i == len - 1) {
 									let title = {
 										time: this.p.beginDay ? this.p.beginDay + '至' + this.p.endDay :
 											'所有时间',
-										list: child
+										list: child,
+										wxTotal: wxTotal,
+										yuePrice: yuePrice,
+										totalNum: totalNum,
+										totalMoney: totalMoney,
+										totalTaxMoney: totalTaxMoney,
+										totalNoTaxMoney: totalNoTaxMoney
 									}
 									dataList.push(title);
 									child = [];
 								}
 							}
+							this.total.num=totalNum;
 							this.dataList = dataList;
 							sa.loading("准备打印...");
 							setTimeout(() => {

+ 46 - 18
sp-admin/sa-view/tb-fee-statistics/detailPrint.html

@@ -82,18 +82,18 @@
 								<th style="min-width: 30px;">序号</th>
 								<th style="min-width: 60px;">车牌号</th>
 								<th style="min-width: 50px;"> 收费项目</th>
-								<th style="min-width: 90px;">业务类型</th>
-								<th style="min-width: 110px;">车型</th>
+								<th style="min-width: 70px;">业务类型</th>
+								<th style="min-width: 90px;">车型</th>
 								<th style="width: 25px;">数量</th>
 								<th style="width: 30px;">单价</th>
-								<th style="width: 30px;">总价</th>
-								<th style="min-width: 50px;">结算状态</th>
+								<th style="width: 60px;">总价</th>
+								<th style="width: 70px;">税 款</th>
+								<th style="width: 75px;">不含税金额</th>
 								<th style="width: 30px;">税率</th>
-								<th style="width: 30px;">税 款</th>
-								<th style="width: 65px;">不含税金额</th>
+								<th style="min-width: 50px;">结算状态</th>
 								<th style="width: 65px;">收款方式</th>
 								<th style="width: 90px;">业务单号</th>
-								<th style="width: 117px;">付款时间</th>
+								<th style="width: 90px;">付款时间</th>
 								<th style="width: 60px;">开单员</th>
 								<th style="width: 60px;">复核员</th>
 								<th style="width: 65px;">统计稽查员</th>
@@ -107,10 +107,10 @@
 								<td>{{cel.num}}</td>
 								<td>{{cel.unitPrice}}</td>
 								<td>{{cel.itemPrice}}</td>
-								<td>{{cel.settle}}</td>
-								<td>{{cel.taxRate}}</td>
 								<td>{{cel.taxPrice}}</td>
 								<td>{{cel.noTaxPrice}}</td>
+								<td>{{cel.taxRate}}</td>
+								<td>{{cel.settle}}</td>
 								<td>{{cel.payMode}}</td>
 								<td>{{cel.businessNo}}</td>
 								<td>{{cel.payTime}}</td>
@@ -118,6 +118,26 @@
 								<td>{{cel.diaoDuPerson}}</td>
 								<td>{{cel.jiChaPerson}}</td>
 							</tr>
+							<tr style="height: 60px;padding: 0 0.5px;" v-if="index==dataList.length-1">
+								<td>合计</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>{{allDayFee}}</td>
+								<td>{{(allDayTaxes).toFixed(2)}}</td>
+								<td>{{(allDayNoTaxFee).toFixed(2)}}</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+								<td>-</td>
+							</tr>
 						</table>
 					</div>
 				</div>
@@ -134,18 +154,26 @@
 						"itemTypeName": sa.p('itemTypeName', ''),
 						"ids": sa.p('ids', '')
 					},
-					dataList: []
+					dataList: [],
+					allDayFee:0,
+					allDayTaxes:0,
+					allDayNoTaxFee:0
 				},
 				methods: {
 					getDataList() {
 						sa.ajax('/TbFeeDetails/prePrint', this.p, function(resp) {
-							var list = resp.data.list;
+							let data=resp.data;
+							this.allDayFee=data.allDayFee;
+							this.allDayTaxes=data.allDayTaxes;
+							this.allDayNoTaxFee=data.allDayNoTaxFee;
+							var list = data.list;
 							let len = list.length;
 							let child = [];
 							let dataList = [];
 							for (i = 0; i < len; i++) {
-								child.push(list[i]);
-								if (child.length == 8 || i == len - 1) {
+								let item = list[i];
+								child.push(item);
+								if (child.length == 7 || i == len - 1) {
 									let title = {
 										time: this.p.ids ? "勾选打印" : this.p.beginTime ? this.p.beginTime +
 											'至' + this.p.endTime : '所有时间',
@@ -156,11 +184,11 @@
 								}
 							}
 							this.dataList = dataList;
-							// sa.loading("准备打印...");
-							// setTimeout(()=>{
-							// 	this.printFn();
-							// 	sa.hideLoading();
-							// },2000)
+							sa.loading("准备打印...");
+							setTimeout(()=>{
+								this.printFn();
+								sa.hideLoading();
+							},2000)
 						}.bind(this))
 					},
 					printFn() {

+ 22 - 16
sp-admin/sa-view/tb-fee-statistics/monthStatsPrint.html

@@ -104,17 +104,17 @@
 								<td>{{cel.cardPrice}}</td>
 								<td>{{cel.yuePrice}}</td>
 							</tr>
-							<tr style="height: 60px;padding: 0 0.5px;">
+							<tr style="height: 60px;padding: 0 0.5px;" v-if="index==dataList.length-1">
 								<td colspan="2">合计</td>
-								<td>{{item.totalNum}}</td>
-								<td>{{item.totalMoney}}</td>
-								<td>{{(item.totalNoTaxMoney).toFixed(2)}}</td>
+								<td>{{total.num}}</td>
+								<td>{{total.totalMoney}}</td>
+								<td>{{(total.totalNoTaxMoney).toFixed(2)}}</td>
 								<td>-</td>
-								<td>{{(item.totalTaxMoney).toFixed(2)}}</td>
-								<td>{{(item.wxTotal)}}</td>
+								<td>{{(total.totalTaxes).toFixed(2)}}</td>
+								<td>{{(total.totalWxPrice)}}</td>
 								<td>0</td>
 								<td>0</td>
-								<td>{{item.yuePrice}}</td>
+								<td>{{total.totalYuePrice}}</td>
 							</tr>
 						</table>
 					</div>
@@ -133,7 +133,17 @@
 						"beginMonth": sa.p('beginMonth', ''),
 						"endMonth": sa.p('endMonth', '')
 					},
-					dataList: []
+					dataList: [],
+					total:{
+						totalAliPrice: 0,
+						totalCardPrice: 0,
+						totalMoney: 0,
+						totalNoTaxMoney: 0,
+						totalTaxes: 0,
+						totalWxPrice: 0,
+						totalYuePrice: 0,
+						num:0
+					}
 				},
 				methods: {
 					getDataList() {
@@ -148,6 +158,7 @@
 							feeType: this.p.feeType
 						}
 						sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
+							this.total=resp.data;
 							var list = resp.data.list;
 							let len = list.length;
 							let child = [];
@@ -167,9 +178,9 @@
 								totalTaxMoney += item.taxes;
 								totalNoTaxMoney += item.noTaxMoney;
 								child.push(item);
-								if (child.length == 17 || i == len - 1) {
+								if (child.length == 18 || i == len - 1) {
 									let title = {
-										time: this.p.beginMonth ? this.p.beginMonth + '至' + this.p.endMonth :
+										time: this.p.beginDay ? this.p.beginDay + '至' + this.p.endDay :
 											'所有时间',
 										list: child,
 										wxTotal: wxTotal,
@@ -181,14 +192,9 @@
 									}
 									dataList.push(title);
 									child = [];
-									wxTotal = 0;
-									yuePrice = 0;
-									totalNum = 0;
-									totalMoney = 0;
-									totalTaxMoney = 0;
-									totalNoTaxMoney = 0;
 								}
 							}
+							this.total.num=totalNum;
 							this.dataList = dataList;
 							sa.loading("准备打印...");
 							setTimeout(() => {

+ 23 - 16
sp-admin/sa-view/tb-fee-statistics/yearStatsPrint.html

@@ -104,17 +104,17 @@
 								<td>{{cel.cardPrice}}</td>
 								<td>{{cel.yuePrice}}</td>
 							</tr>
-							<tr style="height: 60px;padding: 0 0.5px;">
+							<tr style="height: 60px;padding: 0 0.5px;" v-if="index==dataList.length-1">
 								<td colspan="2">合计</td>
-								<td>{{item.totalNum}}</td>
-								<td>{{item.totalMoney}}</td>
-								<td>{{(item.totalNoTaxMoney).toFixed(2)}}</td>
+								<td>{{total.num}}</td>
+								<td>{{total.totalMoney}}</td>
+								<td>{{(total.totalNoTaxMoney).toFixed(2)}}</td>
 								<td>-</td>
-								<td>{{(item.totalTaxMoney).toFixed(2)}}</td>
-								<td>{{(item.wxTotal)}}</td>
+								<td>{{(total.totalTaxes).toFixed(2)}}</td>
+								<td>{{(total.totalWxPrice)}}</td>
 								<td>0</td>
 								<td>0</td>
-								<td>{{item.yuePrice}}</td>
+								<td>{{total.totalYuePrice}}</td>
 							</tr>
 						</table>
 					</div>
@@ -134,7 +134,17 @@
 						"endMonth": sa.p('endMonth', ''),
 						"year":sa.p('year','')
 					},
-					dataList: []
+					dataList: [],
+					total:{
+						totalAliPrice: 0,
+						totalCardPrice: 0,
+						totalMoney: 0,
+						totalNoTaxMoney: 0,
+						totalTaxes: 0,
+						totalWxPrice: 0,
+						totalYuePrice: 0,
+						num:0
+					}
 				},
 				methods: {
 					getDataList() {
@@ -149,6 +159,7 @@
 							feeType: this.p.feeType
 						}
 						sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
+							this.total=resp.data;
 							var list = resp.data.list;
 							let len = list.length;
 							let child = [];
@@ -168,9 +179,10 @@
 								totalTaxMoney += item.taxes;
 								totalNoTaxMoney += item.noTaxMoney;
 								child.push(item);
-								if (child.length == 17 || i == len - 1) {
+								if (child.length == 18 || i == len - 1) {
 									let title = {
-										time: this.p.year ? this.p.year: '所有时间',
+										time: this.p.beginDay ? this.p.beginDay + '至' + this.p.endDay :
+											'所有时间',
 										list: child,
 										wxTotal: wxTotal,
 										yuePrice: yuePrice,
@@ -181,14 +193,9 @@
 									}
 									dataList.push(title);
 									child = [];
-									wxTotal = 0;
-									yuePrice = 0;
-									totalNum = 0;
-									totalMoney = 0;
-									totalTaxMoney = 0;
-									totalNoTaxMoney = 0;
 								}
 							}
+							this.total.num=totalNum;
 							this.dataList = dataList;
 							sa.loading("准备打印...");
 							setTimeout(() => {