Kaynağa Gözat

打印功能

qzyReal 2 yıl önce
ebeveyn
işleme
5f0bee037b

+ 181 - 268
sp-admin/sa-view/tb-fee-statistics/dayStatsPrint.html

@@ -1,271 +1,184 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <title>打印报表</title>
-    <style type="text/css">
-
-        body {
-            left: 0px;
-            top: 0px;
-            right: 0px;
-            bottom: 0px;
-            margin: 0px;
-            font-family: Arial, Helvetica, sans-serif;
-            font-size: 12px;
-            overflow: hidden;
-            white-space: nowrap;
-        }
-
-        .divHeader {
-            width: 100%;
-            display: block;
-            height: 80px;
-            position: fixed;
-        }
-
-        .divNone {
-            width: 20px !important;
-            white-space: normal !important;
-            display: none;
-        }
-
-    </style>
-
-    <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
-    <script src="../../static/print/jquery.jPrintArea.js" type="text/javascript"></script>
-    <script src="../../static/sa.js"></script>
-
-</head>
-
-<body>
-
-<div>
-
-    <input type="button" style="height: 30px;" id="print_button" value="打印"/>
-    <div class="divNone">
-
-    </div>
-    <fieldset align="">
-        <legend>打印区</legend>
-        <div id="myPrintArea" style="height: 85vh;width:95vw;overflow:auto;">
-            <div style="text-align:center; font-size:15px;">
-                <table width="100%" style="border-collapse:collapse;border:none;">
-                    <div class="divHeader">
-                        <thead>
-                        <tr>
-                            <td colspan="19"><h2 id="headName" style="text-align: center;">东兴A1地块进口接驳区(日)统计表</h2></td>
-                        </tr>
-                        <tr>
-                            <td id="company" style="border:solid #000 1px;text-align: center;" colspan="3">单位:广西东兴北投口岸投资有限公司
-                            </td>
-                            <td id="unit" style="border:solid #000 1px;text-align: center;" colspan="7">金额单位:元</td>
-                            <td id="td_time" style="border:solid #000 1px;text-align: center;" colspan="6">
-                                <div id="time" align="right" style="text-align: center;" ></div>
-                            </td>
-                        </tr>
-                        <tr>
-                            <td style="border:solid #000 1px; text-align:center;" rowspan="2">日期</td>
-                            <td style="border:solid #000 1px;text-align: center;" rowspan="2">收费项目</td>
-                            <td style="border:solid #000 1px;text-align:center; " colspan="4">收费方式</td>
-                            <td style="border:solid #000 1px; text-align:center;" rowspan="2">数量</td>
-                            <td style="border:solid #000 1px; text-align:center;" rowspan="2">总价</td>
-                            <td style="border:solid #000 1px; text-align:center;" rowspan="2">税率</td>
-                            <td style="border:solid #000 1px; text-align:center;" rowspan="2">税款</td>
-                            <td style="border:solid #000 1px; text-align:center;" rowspan="2">不含税金额</td>
-                            <td id="person1" style="border:solid #000 1px; text-align:center;" rowspan="2">开单员</td>
-                            <td id="person2" style="border:solid #000 1px; text-align:center;" rowspan="2">复核员</td>
-                            <td id="person3" style="border:solid #000 1px; text-align:center;" rowspan="2">统计稽查员</td>
-                            <td id="person4" style="border:solid #000 1px; text-align:center;" rowspan="2">审核员</td>
-                        </tr>
-                        <tr>
-                            <td style="border:solid #000 1px; ">微信</td>
-                            <td style="border:solid #000 1px; ">支付宝</td>
-                            <td style="border:solid #000 1px; ">银联</td>
-                            <td style="border:solid #000 1px; ">预存金额</td>
-                        </tr>
-                        </thead>
-                    </div>
-                    <tbody id="dp">
-
-                    </tbody>
-                </table>
-
-            </div>
-            <div align="center">
-                <br/><br/>
-                <SPAN id="leader" style=";font-size:15px">
-
-              </SPAN>
-            </div>
-
-        </div>
-    </fieldset>
-
-</div>
-
-<script type="text/javascript">
-    $(function () {
-        $("#print_button").click(function () {
-            $("#myPrintArea").printArea({popTitle: "&nbsp"});
-        });
-
-        function getUrlParam(name) {
-            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
-            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
-            if (r != null) return unescape(r[2]);
-            return null; //返回参数值
-        }
-
-        var isMonth = getUrlParam('isMonth');
-        isMonth = isMonth != '' ? isMonth : null;
-        if (isMonth != null) {
-            $("#headName").html("东兴A1地块进口接驳区(月)统计表");
-            $("#person1").remove();
-            $("#person2").remove();
-            $("#person3").remove();
-            $("#person4").remove();
-            $("#company").attr('colspan', 3);
-            $("#unit").attr('colspan', 5);
-            $("#td_time").attr('colspan', 3);
-        }
-        var isYear = getUrlParam('isYear');
-        isYear = isYear != '' ? isYear : null;
-        if (isYear != null) {
-            $("#headName").html("东兴A1地块进口接驳区(年)统计表");
-            $("#person1").remove();
-            $("#person2").remove();
-            $("#person3").remove();
-            $("#person4").remove();
-            $("#company").attr('colspan', 3);
-            $("#unit").attr('colspan', 5);
-            $("#td_time").attr('colspan', 3);
-        }
-        var beginDay = getUrlParam('beginDay');
-        beginDay = beginDay != '' ? beginDay : null;
-        var endDay = getUrlParam('endDay');
-        endDay = endDay != '' ? endDay : null;
-        var beginMonth = getUrlParam('beginMonth');
-        beginMonth = beginMonth != '' ? beginMonth : null;
-        var endMonth = getUrlParam('endMonth');
-        endMonth = endMonth != '' ? endMonth : null;
-        var year = getUrlParam('year');
-        year = year != '' ? year : null;
-        var feeType = getUrlParam('feeType');
-        feeType = feeType != '' ? feeType : null;
-
-        console.log(sa.cfg.api_url);
-
-        $.ajax({
-            url: sa.cfg.api_url + '/TbFeeStatistics/prePrint',
-            data: {
-                isMonth: isMonth,
-                isYear: isYear,
-                beginDay: beginDay,
-                endDay: endDay,
-                beginMonth: beginMonth,
-                endMonth: endMonth,
-                year: year,
-                feeType: feeType
-            },
-            type: 'get',     // 请求类型,常用的有 GET 和 POST
-            success: function (data) { // 接口调用成功回调函数
-                var html = [];
-                var list = data.data.list;
-                let heightSum = 850;
-                let a = 0;
-                const tbhHeight = $(".divHeader").outerHeight();
-                for (var i = 0; i < list.length; i++) {
-                    let tbo =
-                        "<tr height=\"60\"><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['dayTime'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['feeType'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['wxPrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['aliPrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['cardPrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['yuePrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['num'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['taxMoney'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['taxRate'] * 100 +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['taxes'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['noTaxMoney'];
-
-                    if (isMonth == null && isYear == null) {
-                        tbo+=
-                            "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['kaiDanPerson'] +
-                            "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['diaoDuPerson'] +
-                            "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['jiChaPerson'] +
-							 "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['judgeBy'] +
-							"</td></tr>";
-
-                    } else {
-                        tbo+="</td></tr>";
-                    }
-
-                    $("#dp").append(tbo);
-                    $(".divNone").append(tbo);
-                    let dpHeight = $(".divNone").height();
-                    $(".divNone").html("");
-                    if(a==0){
-                        heightSum-=(dpHeight+tbhHeight);
-                    }else {
-                        heightSum-=dpHeight;
-                    }
-                    a++;
-                    if(heightSum<=0 && i!==0){
-                        a=0;
-                        heightSum+=850;
-                        $("#dp tr").eq(i-1).css('page-break-after','always');
-                    }
-                }
-                var totalMoney = data.data.totalMoney;
-                var totalTaxes = data.data.totalTaxes;
-                var totalNoTaxMoney = data.data.totalNoTaxMoney;
-                var totalWxPrice = data.data.totalWxPrice;
-                var totalAliPrice = data.data.totalAliPrice;
-                var totalCardPrice = data.data.totalCardPrice;
-                var totalYuePrice = data.data.totalYuePrice;
-                html.push(
-                    "<tr height=\"60\"><td style=\"border:solid #000 1px; text-align:center;\">" + "合计" +
-                    "</td><td style=\"border:solid #000 1px; \">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + totalWxPrice +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + totalAliPrice +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + totalCardPrice +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + totalYuePrice +
-                    "</td><td style=\"border:solid #000 1px; \">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + totalMoney +
-                    "</td><td style=\"border:solid #000 1px; \">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + totalTaxes +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + totalNoTaxMoney
-                )
-                if (isMonth == null && isYear == null) {
-                    html.push(
-                        "</td><td style=\"border:solid #000 1px; \">" +
-                        "</td><td style=\"border:solid #000 1px; \">" +
-                        "</td><td style=\"border:solid #000 1px; \">" +
-                        "</td><td style=\"border:solid #000 1px; \">" + "</td></tr>"
-                    )
-                } else {
-                    html.push("</td></tr>")
-                }
-                $("#dp").append(html.join(''));
-
-                $("#time").html("期间:" + data.data.time);
-                // if(data.data.time != null){
-                //   $("#time").html("期间:" + data.data.time);
-                // }else {
-                //   $("#time").html("期间:所有时间" );
-                // }
-
-
-                $("#myPrintArea").printArea({popTitle: "&nbsp"});
-            }
-        });
-
-    });
-
-
-</script>
-
-
-</body>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<title>打印报表</title>
+		<style type="text/css">
+			@page {
+				size: A4 landscape;
+				margin: 19mm 25mm 15mm 25mm;
+			}
+
+			.print-btn {
+				color: white;
+				background: #2D8CF0;
+				border: none;
+				border-radius: 3px;
+				padding: 5px 10px;
+				font-size: 10px;
+				margin: 10px 20px;
+				cursor: pointer;
+			}
+
+			.content-box {
+				text-align: center;
+				height: 794px;
+				width: 1123px;
+				margin: 0 auto;
+			}
+
+			table {
+				border-collapse: collapse;
+				border-spacing: 0;
+				border-left: 1px solid #888;
+				border-top: 1px solid #888;
+			}
+
+			th,
+			td {
+				border-right: 1px solid #888;
+				border-bottom: 1px solid #888;
+				word-break: break-all;
+			}
+
+			th {
+				font-weight: bold;
+			}
+
+			.title-top {
+				margin-top: 248px;
+			}
+		</style>
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
+		<script src="../../static/print/print2.js" type="text/javascript"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+	</head>
+
+	<body>
+
+		<div>
+			<div class="box">
+				<button class="print-btn" @click="printFn">打印</button>
+				<div id="myPrintArea" style="position: absolute;">
+					<div class="content-box" v-for="(item,index) in dataList" :class="index>0?'title-top':''"
+						:key="index">
+						<div class="header-title" style="text-align: center;">
+							<h2 style="font-size: 20px;">东兴口岸(二桥)进口货物集散区 (A1地块)(日)统计表</h2>
+						</div>
+						<table style="margin-top: 20px;text-align: center;width: 1123px;">
+							<tr style="height: 60px;">
+								<th colspan="7">单位:广西东兴北投口岸投资有限公司</th>
+								<th colspan="4">金额单位:元</th>
+								<th colspan="6" style="padding: 0 1px;">期间:{{item.time}}</th>
+							</tr>
+							<tr style="font-weight: 500;">
+								<th style="width: 75px;" 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: 80px;" rowspan="2">不含税金额</th>
+								<th style="width: 30px;" rowspan="2">税率</th>
+								<th style="width: 40px;" 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>
+							</tr>
+							<tr style="font-weight: 500;">
+								<th style="width: 40px;">微信</th>
+								<th style="width: 40px;">支付宝</th>
+								<th style="width: 40px;">银联</th>
+								<th style="width: 55px;">预存金额</th>
+							</tr>
+							<tr v-for="cel in item.list" :key="cel.index" style="height: 52px;">
+								<td>{{cel.dayTime}}</td>
+								<td>{{cel.feeType}}</td>
+								<td>{{cel.num}}</td>
+								<td>{{cel.taxMoney}}</td>
+								<td>{{cel.noTaxMoney}}</td>
+								<td>{{cel.taxRate}}</td>
+								<td>{{cel.taxes}}</td>
+								<td>{{cel.wxPrice}}</td>
+								<td>{{cel.aliPrice}}</td>
+								<td>{{cel.cardPrice}}</td>
+								<td>{{cel.yuePrice}}</td>
+								<td>{{cel.kaiDanPerson}}</td>
+								<td>{{cel.diaoDuPerson}}</td>
+								<td>{{cel.jiChaPerson}}</td>
+								<td>{{cel.judgeBy}}</td>
+							</tr>
+						</table>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<script type="text/javascript">
+			var app = new Vue({
+				el: '.box',
+				data: {
+					p: {
+						"beginDay": sa.p('beginDay', ''),
+						"endDay": sa.p('endDay', ''),
+						"feeType": sa.p('feeType', '')
+					},
+					dataList: []
+				},
+				methods: {
+					getDataList() {
+						let data = {
+							isMonth: '',
+							isYear: '',
+							year: '',
+							beginMonth: '',
+							endMonth: '',
+							beginDay: this.p.beginDay,
+							endDay: this.p.endDay,
+							feeType: this.p.feeType
+						}
+						sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
+							var list = resp.data.list;
+							let len = list.length;
+							let child = [];
+							let dataList = [];
+							for (i = 0; i < len; i++) {
+								child.push(list[i]);
+								if (child.length == 12 || i == len - 1) {
+									let title = {
+										time: this.p.beginDay ? this.p.beginDay + '至' + this.p.endDay :
+											'所有时间',
+										list: child
+									}
+									dataList.push(title);
+									child = [];
+								}
+							}
+							this.dataList = dataList;
+							sa.loading("准备打印...");
+							setTimeout(() => {
+								this.printFn();
+								sa.hideLoading();
+							}, 2000)
+						}.bind(this))
+					},
+					printFn() {
+						Print('#myPrintArea', {
+							noPrint: '.noPrint'
+						});
+					}
+				},
+				mounted() {
+					this.getDataList();
+				}
+			})
+		</script>
+
+
+	</body>
 </html>

+ 178 - 234
sp-admin/sa-view/tb-fee-statistics/detailPrint.html

@@ -1,236 +1,180 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html
+	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <title>打印收费明细</title>
-    <style type="text/css">
-        body {
-            left: 0px;
-            top: 0px;
-            right: 0px;
-            bottom: 0px;
-            margin: 0px;
-            font-family: Arial, Helvetica, sans-serif;
-            font-size: 12px;
-            overflow: hidden;
-            white-space: nowrap;
-        }
-        .divHeader {
-            width: 100%;
-            display: block;
-            height: 160px;
-            position: fixed;
-        }
-
-        .divNone {
-            width: 20px !important;
-            white-space: normal !important;
-            display: none;
-        }
-
-    </style>
-    <script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
-    <script src="../../static/print/jquery.jPrintArea.js" type="text/javascript"></script>
-    <script src="../../static/sa.js"></script>
-
-</head>
-
-<body>
-
-<div>
-
-    <input type="button" style="height: 30px;" id="print_button" value="打印"/>
-
-    <div class="divNone">
-
-    </div>
-    <fieldset align="">
-        <legend>打印区</legend>
-        <div id="myPrintArea" style="height: 85vh;width:95vw;overflow:auto;">
-            <div style="text-align:center; font-size:15px;">
-                <table  width="100%" style="border-collapse:collapse;border:none; " >
-                    <div class="divHeader">
-                        <thead>
-                        <tr>
-                            <td colspan="19"><h2 style="text-align: center;">东兴A1地块进口接驳区收费记录明细</h2></td>
-                        </tr>
-                        <tr height="80">
-                            <td style="border:solid #000 1px;text-align: center;" colspan="5">单位:广西东兴北投口岸投资有限公司</td>
-                            <td style="border:solid #000 1px;text-align: center;" colspan="8">金额单位:元</td>
-                            <td style="border:solid #000 1px;" colspan="6">
-                                <div id="time" style="text-align: center;"></div>
-                            </td>
-                        </tr>
-                        <tr height="80">
-                            <td style="border:solid #000 1px; text-align: center;">序号</td>
-                            <td style="border:solid #000 1px; text-align: center;">车牌号</td>
-                            <td style="border:solid #000 1px; text-align: center;">收费项目</td>
-                            <td style="border:solid #000 1px; text-align: center;">业务类型</td>
-                            <td style="border:solid #000 1px; text-align: center;">车型</td>
-                            <td style="border:solid #000 1px; text-align: center;">数量</td>
-                            <td style="border:solid #000 1px; text-align: center;">单价</td>
-                            <td style="border:solid #000 1px; text-align: center;">总价</td>
-                            <td style="border:solid #000 1px; text-align: center;">结算状态</td>
-                            <td style="border:solid #000 1px; text-align: center;">税率</td>
-                            <td style="border:solid #000 1px; text-align: center;">税款</td>
-                            <td style="border:solid #000 1px; text-align: center;">不含税金额</td>
-                            <td style="border:solid #000 1px; text-align: center;">收款方式</td>
-                            <td style="border:solid #000 1px; text-align: center;">业务单号</td>
-                            <td style="border:solid #000 1px; text-align: center;">企业名称</td>
-                            <td style="border:solid #000 1px; text-align: center;">付款时间</td>
-                            <td style="border:solid #000 1px; text-align: center;">开单员</td>
-                            <td style="border:solid #000 1px; text-align: center;">复核员</td>
-                            <td style="border:solid #000 1px; text-align: center;">统计稽查员</td>
-                        </tr>
-                        </thead>
-                    </div>
-                    <tbody id="dp">
-
-                    </tbody>
-                </table>
-
-            </div>
-<!--            <div align="center">-->
-<!--                <br/><br/>-->
-<!--                <SPAN style=";font-size:15px">-->
-<!--          收费统计员:-->
-<!--          &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp-->
-<!--          收费核对员:-->
-<!--          &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp-->
-<!--          收费员:-->
-<!--        </SPAN>-->
-<!--            </div>-->
-
-        </div>
-    </fieldset>
-
-</div>
-
-<script type="text/javascript">
-    $(function () {
-        $("#print_button").click(function () {
-            $("#myPrintArea").printArea({popTitle: "&nbsp"});
-        });
-
-        function getUrlParam(name) {
-            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
-            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
-            if (r != null) return unescape(r[2]);
-            return null; //返回参数值
-        }
-
-        var beginTime = getUrlParam('beginTime');
-        beginTime = beginTime != '' ? beginTime : null;
-        var endTime = getUrlParam('endTime');
-        endTime = endTime != '' ? endTime : null;
-        var feeType = getUrlParam('feeType');
-        feeType = feeType != '' ? feeType : null;
-        var itemTypeName = getUrlParam('itemTypeName');
-        itemTypeName = itemTypeName != '' ? itemTypeName : null;
-
-        $.ajax({
-            url: sa.cfg.api_url + '/TbFeeDetails/prePrint',
-            data: {
-                "beginTime": beginTime,
-                "endTime": endTime,
-                "feeType": feeType,
-                "itemTypeName": itemTypeName
-            },
-            type: 'get',     // 请求类型,常用的有 GET 和 POST
-            beforeSend: function(xhr) {
-                xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
-                // 追加token
-                if (localStorage.tokenName) {
-                    xhr.setRequestHeader(localStorage.tokenName, localStorage.tokenValue);
-                }
-            },
-            success: function (data) { // 接口调用成功回调函数
-                var html = [];
-                var list = data.data.list;
-                let heightSum = 700;
-                let a = 0;
-                const tbhHeight = $(".divHeader").outerHeight();
-                for (var i = 0; i < list.length; i++) {
-                    if (list[i]['itemName'] == null) {
-                        list[i]['itemName'] = "";
-                    }
-                    if (list[i]['customerName'] == null) {
-                        list[i]['customerName'] = "";
-                    }
-                    let tbo =
-                        "<tr height=\"60\"><td style=\"border:solid #000 1px; \">" + list[i]['index'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center;\">" + list[i]['carNo'] +
-                        "</td><td style=\"border:solid #000 1px;text-align:center; \">" + list[i]['feeType'] +
-                        "</td><td style=\"border:solid #000 1px;text-align:center; \">" + list[i]['itemTypeName'] +
-                        "</td><td style=\"border:solid #000 1px;text-align:center; \">" + list[i]['itemName'] +
-                        "</td><td style=\"border:solid #000 1px;text-align:center; \">" + list[i]['num'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['unitPrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['itemPrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['settle'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['taxRate'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['taxPrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['noTaxPrice'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['payType'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['businessNo'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['customerName'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['payTime'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['kaiDanPerson'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['diaoDuPerson'] +
-                        "</td><td style=\"border:solid #000 1px; text-align:center; \">" + list[i]['jiChaPerson'] + "</td></tr>";
-
-
-                    $("#dp").append(tbo);
-                    $(".divNone").append(tbo);
-                    let dpHeight = $(".divNone").height();
-                    $(".divNone").html("");
-                    if(a==0){
-                        heightSum-=(dpHeight+tbhHeight);
-                    }else {
-                        heightSum-=dpHeight;
-                    }
-                    a++;
-                    if(heightSum<=0 && i!==0){
-                        a=0;
-                        heightSum+=700;
-                        $("#dp tr").eq(i-1).css('page-break-after','always');
-                    }
-                }
-                var allDayFee = data.data.allDayFee;
-                var allDayTaxes = data.data.allDayTaxes;
-                var allDayNoTaxFee = data.data.allDayNoTaxFee;
-                html.push(
-                    "<tr height=\"60\"><td style=\"border:solid #000 1px;text-align:center; \">" + "合计" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center; \">" +
-                    "</td><td style=\"border:solid #000 1px;text-align:center;  \">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center; \">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center; \">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + allDayFee +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + allDayTaxes +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" + allDayNoTaxFee +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\">" +
-                    "</td><td style=\"border:solid #000 1px; text-align:center;\"></td></tr>"
-                )
-             //   $("#dp").append(html.join(''));
-
-                $("#time").html("期间:" + data.data.time);
-
-                $("#myPrintArea").printArea({popTitle: "&nbsp"});
-            }
-        });
-
-    });
-</script>
-
-
-</body>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<title>打印收费明细</title>
+		<style type="text/css">
+			@page {
+				size: A4 landscape;
+				margin: 19mm 25mm 15mm 25mm;
+				/* margin:0; */
+			}
+
+			.print-btn {
+				color: white;
+				background: #2D8CF0;
+				border: none;
+				border-radius: 3px;
+				padding: 5px 10px;
+				font-size: 10px;
+				margin: 10px 20px;
+				cursor: pointer;
+			}
+
+			.content-box {
+				text-align: center;
+				/* width: 1123px; */
+				height: 794px;
+				margin: 0 auto;
+			}
+
+			table {
+				border-collapse: collapse;
+				border-spacing: 0;
+				border-left: 1px solid #888;
+				border-top: 1px solid #888;
+			}
+
+			th,
+			td {
+				border-right: 1px solid #888;
+				border-bottom: 1px solid #888;
+				word-break: break-all;
+				padding: 0 2px;
+			}
+
+			th {
+				/* font-weight: bold; */
+			}
+
+			.title-top {
+				margin-top: 248px;
+			}
+		</style>
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
+		<script src="../../static/print/print2.js" type="text/javascript"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+
+	</head>
+
+	<body>
+		<div>
+			<div class="box">
+				<button class="print-btn" @click="printFn">打印</button>
+				<div id="myPrintArea" style="position: absolute;">
+					<div class="content-box" v-for="(item,index) in dataList" :class="index>0?'title-top':''"
+						:key="index">
+						<div class="header-title" style="text-align: center;">
+							<span style="font-size: 20px;">东兴口岸(二桥)进口货物集散区 (A1地块)收费记录明细</span>
+						</div>
+						<table style="margin: 0 auto;margin-top: 20px;text-align: center;width: 1123px;">
+							<tr style="height: 60px;">
+								<th colspan="8">单位:广西东兴北投口岸投资有限公司</th>
+								<th colspan="5">金额单位:元</th>
+								<th colspan="6">期间:{{item.time}}</th>
+							</tr>
+							<tr style="height: 40px;font-size:10px;">
+								<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="width: 25px;">数量</th>
+								<th style="width: 30px;">单价</th>
+								<th style="width: 30px;">总价</th>
+								<th style="min-width: 50px;">结算状态</th>
+								<th style="width: 30px;">税率</th>
+								<th style="width: 30px;">税 款</th>
+								<th style="width: 65px;">不含税金额</th>
+								<th style="width: 65px;">收款方式</th>
+								<th style="width: 90px;">业务单号</th>
+								<th style="width: 117px;">付款时间</th>
+								<th style="width: 60px;">开单员</th>
+								<th style="width: 60px;">复核员</th>
+								<th style="width: 65px;">统计稽查员</th>
+							</tr>
+							<tr v-for="cel in item.list" :key="cel.index" style="height: 80px;font-size: 10px;">
+								<td>{{cel.index}}</td>
+								<td>{{cel.carNo}}</td>
+								<td>{{cel.feeType}}</td>
+								<td>{{cel.itemTypeName}}</td>
+								<td>{{cel.itemName}}</td>
+								<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.payMode}}</td>
+								<td>{{cel.businessNo}}</td>
+								<td>{{cel.payTime}}</td>
+								<td>{{cel.kaiDanPerson}}</td>
+								<td>{{cel.diaoDuPerson}}</td>
+								<td>{{cel.jiChaPerson}}</td>
+							</tr>
+						</table>
+					</div>
+				</div>
+			</div>
+		</div>
+		<script type="text/javascript">
+			var app = new Vue({
+				el: '.box',
+				data: {
+					p: {
+						"beginTime": sa.p('beginTime', ''),
+						"endTime": sa.p('endTime', ''),
+						"feeType": sa.p('feeType', ''),
+						"itemTypeName": sa.p('itemTypeName', ''),
+						"ids": sa.p('ids', '')
+					},
+					dataList: []
+				},
+				methods: {
+					getDataList() {
+						sa.ajax('/TbFeeDetails/prePrint', this.p, function(resp) {
+							var list = resp.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 title = {
+										time: this.p.ids ? "勾选打印" : this.p.beginTime ? this.p.beginTime +
+											'至' + this.p.endTime : '所有时间',
+										list: child
+									}
+									dataList.push(title);
+									child = [];
+								}
+							}
+							this.dataList = dataList;
+							// sa.loading("准备打印...");
+							// setTimeout(()=>{
+							// 	this.printFn();
+							// 	sa.hideLoading();
+							// },2000)
+						}.bind(this))
+					},
+					printFn() {
+						Print('#myPrintArea', {
+							noPrint: '.noPrint'
+						});
+					}
+				},
+				mounted() {
+					this.getDataList();
+				}
+			})
+		</script>
+
+
+	</body>
 </html>

+ 1 - 2
sp-admin/sa-view/tb-fee-statistics/month-statistcs-list.html

@@ -258,8 +258,7 @@
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-
-                    sa.showIframe('打印月报表', 'dayStatsPrint.html?beginMonth=' + beginMonth + "&endMonth=" + endMonth + "&feeType=" + feeType + "&isMonth=1", '1000px', '100%');
+                    sa.showIframe('打印月报表', 'monthStatsPrint.html?beginMonth=' + beginMonth + "&endMonth=" + endMonth + "&feeType=" + feeType + "&isMonth=1", '1000px', '100%');
                 }).catch(() => {
 
                 });

+ 214 - 0
sp-admin/sa-view/tb-fee-statistics/monthStatsPrint.html

@@ -0,0 +1,214 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<title>打印报表</title>
+		<style type="text/css">
+			@page {
+				size: A4 portrait;
+				margin: 1.9cm 2.5cm 1.5cm 2.5cm;
+			}
+
+			.print-btn {
+				color: white;
+				background: #2D8CF0;
+				border: none;
+				border-radius: 3px;
+				padding: 5px 10px;
+				font-size: 10px;
+				margin: 10px 20px;
+				cursor: pointer;
+			}
+
+			.content-box {
+				text-align: center;
+				height: 1123px;
+				width: 794px;
+				margin: 0 auto;
+			}
+
+			table {
+				border-collapse: collapse;
+				border-spacing: 0;
+				border-left: 1px solid #888;
+				border-top: 1px solid #888;
+			}
+
+			th,
+			td {
+				border-right: 1px solid #888;
+				border-bottom: 1px solid #888;
+				word-break: break-all;
+			}
+
+			th {
+				font-weight: bold;
+			}
+
+			.title-top {
+				margin-top: 248px;
+			}
+		</style>
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
+		<script src="../../static/print/print2.js" type="text/javascript"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+	</head>
+
+	<body>
+
+		<div>
+			<div class="box">
+				<button class="print-btn" @click="printFn">打印</button>
+				<div id="myPrintArea">
+					<div class="content-box" v-for="(item,index) in dataList" :class="index>0?'title-top':''"
+						:key="index">
+						<div class="header-title" style="text-align: center;">
+							<h2 style="font-size: 20px;">东兴口岸(二桥)进口货物集散区 (A1地块)(月)统计表</h2>
+						</div>
+						<table style="margin-top: 20px;text-align: center;width: 790px;">
+							<tr style="height: 60px;">
+								<th colspan="4">单位:广西东兴北投口岸投资有限公司</th>
+								<th colspan="3">金额单位:元</th>
+								<th colspan="5" style="padding: 0 1px;">期间:{{item.time}}</th>
+							</tr>
+							<tr style="font-weight: 500;padding: 0 0.5px;">
+								<th style="width: 60px;" rowspan="2">日期</th>
+								<th style="width: 64px;" rowspan="2"> 收费项目</th>
+								<th style="width: 30px;" rowspan="2">数量</th>
+								<th style="width: 40px;" rowspan="2">总价</th>
+								<th style="width: 55px;" rowspan="2">不含税金额</th>
+								<th style="width: 30px;" rowspan="2">税率</th>
+								<th style="width: 50px;" rowspan="2">税款</th>
+								<th colspan="4">收费方式</th>
+							</tr>
+							<tr style="font-weight: 500;padding: 0 0.5px;">
+								<th style="width: 50px;">微信</th>
+								<th style="width: 35px;">支付宝</th>
+								<th style="width: 30px;">银联</th>
+								<th style="width: 45px;">预存金额</th>
+							</tr>
+							<tr v-for="cel in item.list" :key="cel.index" style="height: 60px;padding: 0 0.5px;">
+								<td>{{cel.dayTime}}</td>
+								<td>{{cel.feeType}}</td>
+								<td>{{cel.num}}</td>
+								<td>{{cel.taxMoney}}</td>
+								<td>{{cel.noTaxMoney}}</td>
+								<td>{{cel.taxRate}}</td>
+								<td>{{cel.taxes}}</td>
+								<td>{{cel.wxPrice}}</td>
+								<td>{{cel.aliPrice}}</td>
+								<td>{{cel.cardPrice}}</td>
+								<td>{{cel.yuePrice}}</td>
+							</tr>
+							<tr style="height: 60px;padding: 0 0.5px;">
+								<td colspan="2">合计</td>
+								<td>{{item.totalNum}}</td>
+								<td>{{item.totalMoney}}</td>
+								<td>{{(item.totalNoTaxMoney).toFixed(2)}}</td>
+								<td>-</td>
+								<td>{{(item.totalTaxMoney).toFixed(2)}}</td>
+								<td>{{(item.wxTotal)}}</td>
+								<td>0</td>
+								<td>0</td>
+								<td>{{item.yuePrice}}</td>
+							</tr>
+						</table>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<script type="text/javascript">
+			var app = new Vue({
+				el: '.box',
+				data: {
+					p: {
+						"beginDay": sa.p('beginDay', ''),
+						"endDay": sa.p('endDay', ''),
+						"feeType": sa.p('feeType', ''),
+						"beginMonth": sa.p('beginMonth', ''),
+						"endMonth": sa.p('endMonth', '')
+					},
+					dataList: []
+				},
+				methods: {
+					getDataList() {
+						let data = {
+							isMonth: 1,
+							isYear: '',
+							year: '',
+							beginMonth: this.p.beginMonth,
+							endMonth: this.p.endMonth,
+							beginDay: '',
+							endDay: '',
+							feeType: this.p.feeType
+						}
+						sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
+							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++) {
+								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 == 17 || i == len - 1) {
+									let title = {
+										time: this.p.beginMonth ? this.p.beginMonth + '至' + this.p.endMonth :
+											'所有时间',
+										list: child,
+										wxTotal: wxTotal,
+										yuePrice: yuePrice,
+										totalNum: totalNum,
+										totalMoney: totalMoney,
+										totalTaxMoney: totalTaxMoney,
+										totalNoTaxMoney: totalNoTaxMoney
+									}
+									dataList.push(title);
+									child = [];
+									wxTotal = 0;
+									yuePrice = 0;
+									totalNum = 0;
+									totalMoney = 0;
+									totalTaxMoney = 0;
+									totalNoTaxMoney = 0;
+								}
+							}
+							this.dataList = dataList;
+							sa.loading("准备打印...");
+							setTimeout(() => {
+								this.printFn();
+								sa.hideLoading();
+							}, 2000)
+						}.bind(this))
+					},
+					printFn() {
+						Print('#myPrintArea', {
+							noPrint: '.noPrint'
+						});
+					}
+				},
+				mounted() {
+					this.getDataList();
+				}
+			})
+		</script>
+
+
+	</body>
+</html>

+ 114 - 92
sp-admin/sa-view/tb-fee-statistics/tb-fee-details-list.html

@@ -16,6 +16,13 @@
 		<script src="../../static/sa.js"></script>
 	</head>
 	<style>
+		@page{
+		
+		      size: portrait; /* 纵向 */
+		       margin:1.5cm 2.5cm 1.5cm 2.5cm; * 边距 上右下左 */
+		
+		    }
+
 		.keyButton.el-button {
 			width: 100%;
 			overflow: hidden;
@@ -96,9 +103,9 @@
 					<sa-item type="text" name="作业公司" v-model="p.pickCustomerName"></sa-item>
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
 					<el-button type="info" @click="sa.f5()">刷新</el-button>
-					<el-button type="warning" v-if="sa.isAuth('tb-statistics-export')" 
-						@click="exportFn()">导出</el-button>
-					<el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-statistics-print')" 
+					<el-button type="warning" v-if="sa.isAuth('tb-statistics-export')" @click="exportFn()">导出
+					</el-button>
+					<el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-statistics-print')"
 						@click="print()">打印</el-button>
 					<el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-kaidan-confirm')"
 						@click="kaiDanConfirm()">开单确认</el-button>
@@ -117,7 +124,8 @@
 					<br />
 				</el-form>
 				<!-- ------------- 数据列表 ------------- -->
-				<el-table class="data-table" ref="data-table" :data="dataList" show-summary :summary-method="getSumRol" style="margin-top: 10px;">
+				<el-table class="data-table" ref="data-table" :data="dataList" show-summary :summary-method="getSumRol"
+					style="margin-top: 10px;">
 					<sa-td type="selection"></sa-td>
 					<sa-td name="收费项目" prop="feeType" type="enum"
 						:jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
@@ -410,117 +418,131 @@
 						});
 					},
 					print: function() {
-						if (this.selectTime != null && this.selectTime.length != 0) {
-							this.selectTimeRange.beginTime = this.selectTime[0];
-							this.selectTimeRange.endTime = this.selectTime[1];
-						}
-
-						var beginTime = this.selectTimeRange.beginTime;
-						var endTime = this.selectTimeRange.endTime;
-						var feeType = this.p.feeType;
-						var itemTypeName = this.p.itemTypeName;
-
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
+						let params = '?';
 						var str = '';
-						if (beginTime === '' && endTime === '') {
-							str += '所有时间';
+						if (selection.length > 0) {
+							params += 'ids=' + ids.join(',');
+							str = '所选项目';
 						} else {
-							str += beginTime + "至" + endTime
-						}
-						if (feeType === '') {
-							str += "、所有收费项目";
-						} else {
-							var feeTypeName = '';
-							if (feeType == 1) {
-								feeTypeName = "核酸检测";
-							} else if (feeType == 2) {
-								feeTypeName = "消杀作业";
-							} else if (feeType == 3) {
-								feeTypeName = "装卸作业";
-							} else if (feeType == 4) {
-								feeTypeName = "停车费";
-							} else if (feeType == 5) {
-								feeTypeName = "过磅费";
-							} else if (feeType == 6) {
-								feeTypeName = "入场管理费";
-							} else if (feeType == 7) {
-								feeTypeName = "充电打冷作业";
+							if (this.selectTime != null && this.selectTime.length != 0) {
+								this.selectTimeRange.beginTime = this.selectTime[0];
+								this.selectTimeRange.endTime = this.selectTime[1];
 							}
-							str += "、收费项目为" + feeTypeName;
-						}
-						if (itemTypeName === '') {
-							str += "、所有业务类型";
-						} else {
-							str += "、业务类型为" + itemTypeName;
-						}
-						let itemName=this.p.itemName;
-						if(itemName){
-							str+='车型为:'+itemName;
+
+							var beginTime = this.selectTimeRange.beginTime;
+							var endTime = this.selectTimeRange.endTime;
+							var feeType = this.p.feeType;
+							var itemTypeName = this.p.itemTypeName;
+							if (beginTime === '' && endTime === '') {
+								str += '所有时间';
+							} else {
+								str += beginTime + "至" + endTime
+							}
+							if (feeType === '') {
+								str += "、所有收费项目";
+							} else {
+								var feeTypeName = '';
+								if (feeType == 1) {
+									feeTypeName = "核酸检测";
+								} else if (feeType == 2) {
+									feeTypeName = "消杀作业";
+								} else if (feeType == 3) {
+									feeTypeName = "装卸作业";
+								} else if (feeType == 4) {
+									feeTypeName = "停车费";
+								} else if (feeType == 5) {
+									feeTypeName = "过磅费";
+								} else if (feeType == 6) {
+									feeTypeName = "入场管理费";
+								} else if (feeType == 7) {
+									feeTypeName = "充电打冷作业";
+								}
+								str += "、收费项目为" + feeTypeName;
+							}
+							if (itemTypeName === '') {
+								str += "、所有业务类型";
+							} else {
+								str += "、业务类型为" + itemTypeName;
+							}
+							let itemName = this.p.itemName;
+							if (itemName) {
+								str += '车型为:' + itemName;
+							}
+							params += 'beginTime=' + beginTime +
+								"&endTime=" + endTime + "&feeType=" + feeType + "&itemTypeName=" +
+								itemTypeName;
 						}
 						this.$confirm('确定打印' + str + '的数据?', '提示', {
 							confirmButtonText: '确定',
 							cancelButtonText: '取消',
 							type: 'warning'
 						}).then(() => {
-							sa.showIframe('打印申报信息表', 'detailPrint.html?beginTime=' + beginTime +
-								"&endTime=" + endTime + "&feeType=" + feeType + "&itemTypeName=" +
-								itemTypeName, '1000px', '100%');
+							sa.showIframe('打印申报信息表', 'detailPrint.html' + params, '100%', '100%');
 						}).catch(() => {
 
 						});
 					},
 					exportFn() {
-						if (this.selectTime != null && this.selectTime.length != 0) {
-							this.selectTimeRange.beginTime = this.selectTime[0];
-							this.selectTimeRange.endTime = this.selectTime[1];
-						}
-
-						var beginTime = this.selectTimeRange.beginTime;
-						var endTime = this.selectTimeRange.endTime;
-						var feeType = this.p.feeType;
-						var itemTypeName = this.p.itemTypeName;
+						let selection = this.$refs['data-table'].selection;
+						let ids = sa.getArrayField(selection, 'id');
 						var str = '';
-						if (beginTime === '' && endTime === '') {
-							str += '所有时间';
+						if (selection.length > 0) {
+							this.p.ids=ids.join(',');
+							str = '所选项目';
 						} else {
-							str += beginTime + "至" + endTime
-						}
-						if (feeType === '') {
-							str += "、所有收费项目";
-						} else {
-							var feeTypeName = '';
-							if (feeType == 1) {
-								feeTypeName = "核酸检测";
-							} else if (feeType == 2) {
-								feeTypeName = "消杀作业";
-							} else if (feeType == 3) {
-								feeTypeName = "装卸作业";
-							} else if (feeType == 4) {
-								feeTypeName = "停车费";
-							} else if (feeType == 5) {
-								feeTypeName = "过磅费";
-							} else if (feeType == 6) {
-								feeTypeName = "入场管理费";
-							} else if (feeType == 7) {
-								feeTypeName = "充电打冷作业";
+							if (this.selectTime != null && this.selectTime.length != 0) {
+								this.selectTimeRange.beginTime = this.selectTime[0];
+								this.selectTimeRange.endTime = this.selectTime[1];
+							}
+
+							var beginTime = this.selectTimeRange.beginTime;
+							var endTime = this.selectTimeRange.endTime;
+							var feeType = this.p.feeType;
+							var itemTypeName = this.p.itemTypeName;
+							if (beginTime === '' && endTime === '') {
+								str += '所有时间';
+							} else {
+								str += beginTime + "至" + endTime
+							}
+							if (feeType === '') {
+								str += "、所有收费项目";
+							} else {
+								var feeTypeName = '';
+								if (feeType == 1) {
+									feeTypeName = "核酸检测";
+								} else if (feeType == 2) {
+									feeTypeName = "消杀作业";
+								} else if (feeType == 3) {
+									feeTypeName = "装卸作业";
+								} else if (feeType == 4) {
+									feeTypeName = "停车费";
+								} else if (feeType == 5) {
+									feeTypeName = "过磅费";
+								} else if (feeType == 6) {
+									feeTypeName = "入场管理费";
+								} else if (feeType == 7) {
+									feeTypeName = "充电打冷作业";
+								}
+								str += "、收费项目为" + feeTypeName;
+							}
+							if (itemTypeName === '') {
+								str += "、所有业务类型";
+							} else {
+								str += "、业务类型为" + itemTypeName;
+							}
+							let itemName = this.p.itemName;
+							if (itemName) {
+								str += '车型为:' + itemName;
 							}
-							str += "、收费项目为" + feeTypeName;
-						}
-						if (itemTypeName === '') {
-							str += "、所有业务类型";
-						} else {
-							str += "、业务类型为" + itemTypeName;
-						}
-						let itemName=this.p.itemName;
-						if(itemName){
-							str+='车型为:'+itemName;
 						}
 						this.$confirm('确定导出' + str + '的数据?', '提示', {
 							confirmButtonText: '确定',
 							cancelButtonText: '取消',
 							type: 'warning'
 						}).then(() => {
-							sa.ajax('/TbFeeDetails/export/details?beginTime=' + this.selectTimeRange.beginTime +
-								'&endTime=' + this.selectTimeRange.endTime, sa.removeNull(this.p),
+							sa.ajax('/TbFeeDetails/export/details', sa.removeNull(this.p),
 								function(resp) {
 									window.open(resp.data);
 								}.bind(this));

+ 1 - 2
sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html

@@ -251,9 +251,8 @@
 							cancelButtonText: '取消',
 							type: 'warning'
 						}).then(() => {
-
 							sa.showIframe('打印日报表', 'dayStatsPrint.html?beginDay=' + beginDay + "&endDay=" +
-								endDay + "&feeType=" + feeType, '1000px', '100%');
+								endDay + "&feeType=" + feeType, '100%', '100%');
 						}).catch(() => {
 
 						});

+ 1 - 3
sp-admin/sa-view/tb-fee-statistics/year-statistcs-list.html

@@ -214,9 +214,7 @@
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(() => {
-
-
-                    sa.showIframe('打印年报表', 'dayStatsPrint.html?year=' + year + "&feeType=" + feeType + "&isYear=1", '1000px', '100%');
+                    sa.showIframe('打印年报表', 'yearStatsPrint.html?year=' + year + "&feeType=" + feeType + "&isYear=1", '1000px', '100%');
                 }).catch(() => {
 
                 });

+ 214 - 0
sp-admin/sa-view/tb-fee-statistics/yearStatsPrint.html

@@ -0,0 +1,214 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<title>打印报表</title>
+		<style type="text/css">
+			@page {
+				size: A4 portrait;
+				margin: 1.9cm 2.5cm 1.5cm 2.5cm;
+			}
+
+			.print-btn {
+				color: white;
+				background: #2D8CF0;
+				border: none;
+				border-radius: 3px;
+				padding: 5px 10px;
+				font-size: 10px;
+				margin: 10px 20px;
+				cursor: pointer;
+			}
+
+			.content-box {
+				text-align: center;
+				height: 1123px;
+				width: 794px;
+				margin: 0 auto;
+			}
+
+			table {
+				border-collapse: collapse;
+				border-spacing: 0;
+				border-left: 1px solid #888;
+				border-top: 1px solid #888;
+			}
+
+			th,
+			td {
+				border-right: 1px solid #888;
+				border-bottom: 1px solid #888;
+				word-break: break-all;
+			}
+
+			th {
+				font-weight: bold;
+			}
+
+			.title-top {
+				margin-top: 248px;
+			}
+		</style>
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/print/jquery-2.0.3.js" type="text/javascript"></script>
+		<script src="../../static/print/print2.js" type="text/javascript"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+	</head>
+
+	<body>
+
+		<div>
+			<div class="box">
+				<button class="print-btn" @click="printFn">打印</button>
+				<div id="myPrintArea">
+					<div class="content-box" v-for="(item,index) in dataList" :class="index>0?'title-top':''"
+						:key="index">
+						<div class="header-title" style="text-align: center;">
+							<h2 style="font-size: 20px;">东兴口岸(二桥)进口货物集散区 (A1地块)(年)统计表</h2>
+						</div>
+						<table style="margin-top: 20px;text-align: center;width: 790px;">
+							<tr style="height: 60px;">
+								<th colspan="4">单位:广西东兴北投口岸投资有限公司</th>
+								<th colspan="3">金额单位:元</th>
+								<th colspan="5" style="padding: 0 1px;">期间:{{item.time}}</th>
+							</tr>
+							<tr style="font-weight: 500;padding: 0 0.5px;">
+								<th style="width: 60px;" rowspan="2">日期</th>
+								<th style="width: 64px;" rowspan="2"> 收费项目</th>
+								<th style="width: 30px;" rowspan="2">数量</th>
+								<th style="width: 40px;" rowspan="2">总价</th>
+								<th style="width: 55px;" rowspan="2">不含税金额</th>
+								<th style="width: 30px;" rowspan="2">税率</th>
+								<th style="width: 50px;" rowspan="2">税款</th>
+								<th colspan="4">收费方式</th>
+							</tr>
+							<tr style="font-weight: 500;padding: 0 0.5px;">
+								<th style="width: 50px;">微信</th>
+								<th style="width: 35px;">支付宝</th>
+								<th style="width: 30px;">银联</th>
+								<th style="width: 45px;">预存金额</th>
+							</tr>
+							<tr v-for="cel in item.list" :key="cel.index" style="height: 60px;padding: 0 0.5px;">
+								<td>{{cel.dayTime}}</td>
+								<td>{{cel.feeType}}</td>
+								<td>{{cel.num}}</td>
+								<td>{{cel.taxMoney}}</td>
+								<td>{{cel.noTaxMoney}}</td>
+								<td>{{cel.taxRate}}</td>
+								<td>{{cel.taxes}}</td>
+								<td>{{cel.wxPrice}}</td>
+								<td>{{cel.aliPrice}}</td>
+								<td>{{cel.cardPrice}}</td>
+								<td>{{cel.yuePrice}}</td>
+							</tr>
+							<tr style="height: 60px;padding: 0 0.5px;">
+								<td colspan="2">合计</td>
+								<td>{{item.totalNum}}</td>
+								<td>{{item.totalMoney}}</td>
+								<td>{{(item.totalNoTaxMoney).toFixed(2)}}</td>
+								<td>-</td>
+								<td>{{(item.totalTaxMoney).toFixed(2)}}</td>
+								<td>{{(item.wxTotal)}}</td>
+								<td>0</td>
+								<td>0</td>
+								<td>{{item.yuePrice}}</td>
+							</tr>
+						</table>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<script type="text/javascript">
+			var app = new Vue({
+				el: '.box',
+				data: {
+					p: {
+						"beginDay": sa.p('beginDay', ''),
+						"endDay": sa.p('endDay', ''),
+						"feeType": sa.p('feeType', ''),
+						"beginMonth": sa.p('beginMonth', ''),
+						"endMonth": sa.p('endMonth', ''),
+						"year":sa.p('year','')
+					},
+					dataList: []
+				},
+				methods: {
+					getDataList() {
+						let data = {
+							isMonth: '',
+							isYear: 1,
+							year: this.p.year,
+							beginMonth: '',
+							endMonth: '',
+							beginDay: '',
+							endDay: '',
+							feeType: this.p.feeType
+						}
+						sa.ajax('/TbFeeStatistics/prePrint', data, function(resp) {
+							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++) {
+								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 == 17 || i == len - 1) {
+									let title = {
+										time: this.p.year ? this.p.year: '所有时间',
+										list: child,
+										wxTotal: wxTotal,
+										yuePrice: yuePrice,
+										totalNum: totalNum,
+										totalMoney: totalMoney,
+										totalTaxMoney: totalTaxMoney,
+										totalNoTaxMoney: totalNoTaxMoney
+									}
+									dataList.push(title);
+									child = [];
+									wxTotal = 0;
+									yuePrice = 0;
+									totalNum = 0;
+									totalMoney = 0;
+									totalTaxMoney = 0;
+									totalNoTaxMoney = 0;
+								}
+							}
+							this.dataList = dataList;
+							sa.loading("准备打印...");
+							setTimeout(() => {
+								this.printFn();
+								sa.hideLoading();
+							}, 2000)
+						}.bind(this))
+					},
+					printFn() {
+						Print('#myPrintArea', {
+							noPrint: '.noPrint'
+						});
+					}
+				},
+				mounted() {
+					this.getDataList();
+				}
+			})
+		</script>
+
+
+	</body>
+</html>

+ 0 - 163
sp-admin/static/print/print.js

@@ -1,163 +0,0 @@
-// 打印类属性、方法定义
-/* eslint-disable */
-const Print = function (dom, options) {
-  if (!(this instanceof Print)) return new Print(dom, options);
-
-  this.options = this.extend({
-    'noPrint': '.no-print'
-  }, options);
-
-  if ((typeof dom) === "string") {
-    this.dom = document.querySelector(dom);
-  } else {
-    this.isDOM(dom)
-    this.dom = this.isDOM(dom) ? dom : dom.$el;
-  }
-
-  this.init();
-};
-Print.prototype = {
-  init: function () {
-    var content = this.getStyle() + this.getHtml();
-    this.writeIframe(content);
-  },
-  extend: function (obj, obj2) {
-    for (var k in obj2) {
-      obj[k] = obj2[k];
-    }
-    return obj;
-  },
-
-  getStyle: function () {
-    var str = "",
-      styles = document.querySelectorAll('style,link');
-    for (var i = 0; i < styles.length; i++) {
-      str += styles[i].outerHTML;
-    }
-    str += "<style>" + (this.options.noPrint ? this.options.noPrint : '.no-print') + "{display:none;}</style>";
-
-    return str;
-  },
-
-  getHtml: function () {
-    var inputs = document.querySelectorAll('input');
-    var textareas = document.querySelectorAll('textarea');
-    var selects = document.querySelectorAll('select');
-
-    for (var k = 0; k < inputs.length; k++) {
-      if (inputs[k].type == "checkbox" || inputs[k].type == "radio") {
-        if (inputs[k].checked == true) {
-          inputs[k].setAttribute('checked', "checked")
-        } else {
-          inputs[k].removeAttribute('checked')
-        }
-      } else if (inputs[k].type == "text") {
-        inputs[k].setAttribute('value', inputs[k].value)
-      } else {
-        inputs[k].setAttribute('value', inputs[k].value)
-      }
-    }
-
-    for (var k2 = 0; k2 < textareas.length; k2++) {
-      if (textareas[k2].type == 'textarea') {
-        textareas[k2].innerHTML = textareas[k2].value
-      }
-    }
-
-    for (var k3 = 0; k3 < selects.length; k3++) {
-      if (selects[k3].type == 'select-one') {
-        var child = selects[k3].children;
-        for (var i in child) {
-          if (child[i].tagName == 'OPTION') {
-            if (child[i].selected == true) {
-              child[i].setAttribute('selected', "selected")
-            } else {
-              child[i].removeAttribute('selected')
-            }
-          }
-        }
-      }
-    }
-    // 包裹要打印的元素
-    // fix: https://github.com/xyl66/vuePlugs_printjs/issues/36
-    let outerHTML = this.wrapperRefDom(this.dom).outerHTML
-    return outerHTML;
-  },
-  // 向父级元素循环,包裹当前需要打印的元素
-  // 防止根级别开头的 css 选择器不生效
-  wrapperRefDom: function (refDom) {
-    let prevDom = null
-    let currDom = refDom
-    // 判断当前元素是否在 body 中,不在文档中则直接返回该节点
-    if (!this.isInBody(currDom)) return currDom
-
-    while (currDom) {
-      if (prevDom) {
-        let element = currDom.cloneNode(false)
-        element.appendChild(prevDom)
-        prevDom = element
-      } else {
-        prevDom = currDom.cloneNode(true)
-      }
-
-      currDom = currDom.parentElement
-    }
-
-    return prevDom
-  },
-
-  writeIframe: function (content) {
-    var w, doc, iframe = document.createElement('iframe'),
-      f = document.body.appendChild(iframe);
-    iframe.id = "myIframe";
-    //iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
-    iframe.setAttribute('style', 'position:absolute;width:0;height:0;top:-10px;left:-10px;');
-    w = f.contentWindow || f.contentDocument;
-    doc = f.contentDocument || f.contentWindow.document;
-    doc.open();
-    doc.write(content);
-    doc.close();
-    var _this = this
-    iframe.onload = function(){
-      _this.toPrint(w);
-      setTimeout(function () {
-        document.body.removeChild(iframe)
-      }, 100)
-    }
-  },
-
-  toPrint: function (frameWindow) {
-    try {
-      setTimeout(function () {
-        frameWindow.focus();
-        try {
-          if (!frameWindow.document.execCommand('print', false, null)) {
-            frameWindow.print();
-          }
-        } catch (e) {
-          frameWindow.print();
-        }
-        frameWindow.close();
-      }, 10);
-    } catch (err) {
-      console.log('err', err);
-    }
-  },
-  // 检查一个元素是否是 body 元素的后代元素且非 body 元素本身
-  isInBody: function (node) {
-    return (node === document.body) ? false : document.body.contains(node);
-  },
-  isDOM: (typeof HTMLElement === 'object') ?
-    function (obj) {
-      return obj instanceof HTMLElement;
-    } :
-    function (obj) {
-      return obj && typeof obj === 'object' && obj.nodeType === 1 && typeof obj.nodeName === 'string';
-    }
-};
-const MyPlugin = {}
-MyPlugin.install = function (Vue, options) {
-  // 4. 添加实例方法
-  Vue.prototype.$print = Print
-}
-//export default MyPlugin

+ 126 - 0
sp-admin/static/print/print2.js

@@ -0,0 +1,126 @@
+/* @Print.js
+ * DH (http://denghao.me)
+ * 2017-7-14
+ */
+(function (window, document) {
+  let Print = function (dom, options) {
+    if (!(this instanceof Print)) return new Print(dom, options);
+
+    this.options = this.extend({
+      noPrint: '.no-print',
+      onStart: function () {
+      },
+      onEnd: function () {
+      }
+    }, options);
+
+    if ((typeof dom) === "string") {
+      this.dom = document.querySelector(dom);
+    } else {
+      this.dom = dom;
+    }
+
+    this.init();
+  };
+  Print.prototype = {
+    init: function () {
+      let content = this.getStyle() + this.getHtml();
+      this.writeIframe(content);
+    },
+    extend: function (obj, obj2) {
+      for (let k in obj2) {
+        obj[k] = obj2[k];
+      }
+      return obj;
+    },
+
+    getStyle: function () {
+      let str = "",
+        styles = document.querySelectorAll('style,link');
+      for (let i = 0; i < styles.length; i++) {
+        str += styles[i].outerHTML;
+      }
+      str += "<style>" + (this.options.noPrint ? this.options.noPrint : '.no-print') + "{display:none;}</style>";
+
+      return str;
+    },
+
+    getHtml: function () {
+      let inputs = document.querySelectorAll('input');
+      let textareas = document.querySelectorAll('textarea');
+      let selects = document.querySelectorAll('select');
+
+      for (let k in inputs) {
+        if (inputs[k].type == "checkbox" || inputs[k].type == "radio") {
+          if (inputs[k].checked == true) {
+            inputs[k].setAttribute('checked', "checked")
+          } else {
+            inputs[k].removeAttribute('checked')
+          }
+        } else if (inputs[k].type == "text") {
+          inputs[k].setAttribute('value', inputs[k].value)
+        }
+      }
+
+      for (let k2 in textareas) {
+        if (textareas[k2].type == 'textarea') {
+          textareas[k2].innerHTML = textareas[k2].value
+        }
+      }
+
+      for (let k3 in selects) {
+        if (selects[k3].type == 'select-one') {
+          let child = selects[k3].children;
+          for (let i in child) {
+            if (child[i].tagName == 'OPTION') {
+              if (child[i].selected == true) {
+                child[i].setAttribute('selected', "selected")
+              } else {
+                child[i].removeAttribute('selected')
+              }
+            }
+          }
+        }
+      }
+
+      return this.dom.outerHTML;
+    },
+
+    writeIframe: function (content) {
+      let w, doc, iframe = document.createElement('iframe'),
+        f = document.body.appendChild(iframe);
+      iframe.id = "myIframe";
+      iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
+
+      w = f.contentWindow || f.contentDocument;
+      doc = f.contentDocument || f.contentWindow.document;
+      doc.open();
+      doc.write(content);
+      doc.close();
+      this.toPrint(w, function () {
+        document.body.removeChild(iframe)
+      });
+    },
+
+    toPrint: function (w, cb) {
+      let _this = this;
+      w.onload = function () {
+        try {
+          setTimeout(function () {
+            w.focus();
+            typeof _this.options.onStart === 'function' && _this.options.onStart();
+            if (!w.document.execCommand('print', false, null)) {
+              w.print();
+            }
+            typeof _this.options.onEnd === 'function' && _this.options.onEnd();
+            w.close();
+            cb && cb()
+          });
+        } catch (err) {
+          console.log('err', err);
+        }
+      }
+    }
+  };
+  window.Print = Print;
+}(window, document));

+ 1 - 1
sp-admin/static/sa.js

@@ -22,7 +22,7 @@ var sa = {
 		api_url: 'https://dxkaa1.gxbtka.com/pro',
 		web_url: 'http://www.baidu.com'
 	}
-	sa.cfg = cfg_test; // 最终环境 , 上线前请选择正确的环境
+	sa.cfg = cfg_dev; // 最终环境 , 上线前请选择正确的环境
 })();
 
 

+ 24 - 150
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -253,7 +253,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 out24Details.setNum(num).setItemTypeName(PartFeeEnum.OUT_24_HOURS.getDesc())
                         .setUnitPrice(unitPrice).setItemPrice(out24Price).setModule(payType.getDesc()).setBusinessId(bindIdStr);
                 setFee(out24Details, car, transactionId, outTradeNo, now);
-                type = StrUtil.isEmpty(out24Details.getId()) ? SyncTypeEnum.INSERT.getCode() :SyncTypeEnum.UPDATE.getCode();
+                type = StrUtil.isEmpty(out24Details.getId()) ? SyncTypeEnum.INSERT.getCode() : SyncTypeEnum.UPDATE.getCode();
                 saveOrUpdate(out24Details);
                 taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, out24Details.getId(), type));
                 details.add(out24Details);
@@ -320,7 +320,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             TbGoods businessCfg = tbGoodsService.getById(business.getGoodsId());
             if ((GoodsEnum.LeaveEnum.BUSINESS_MONEY.getCode().equals(businessCfg.getChinaCarLeave())
                     || GoodsEnum.LeaveEnum.APART_BUSINESS.getCode().equals(businessCfg.getChinaCarLeave()))
-            &&GoodsEnum.LeaveEnum.PART_MONEY.getCode().equals(businessCfg.getVietnamCarLeave())) {
+                    && GoodsEnum.LeaveEnum.PART_MONEY.getCode().equals(businessCfg.getVietnamCarLeave())) {
                 carNo = business.getChinaCarNo();
             }
             String businessCarIds = "";
@@ -358,107 +358,15 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         return feeDetails;
     }
 
-    /*public String export(SoMap so) throws Exception{
-        Date now = new Date();
-        String nowStr = DateUtil.format(now, "yyyy-MM-dd HH:mm");
-        String beginTime = so.getString("beginTime");
-        String endTime = so.getString("endTime");
-        String time = beginTime + "至" + endTime;
-        Map<String, String> head = new HashMap<>();
-        head.put("time", time);
-        head.put("exportTime", nowStr);
-        String inCarNum = "";
-        String outPayCarNum = "";
-        String notOutCarNum = "";
-        boolean isIn = checkTimeRange(beginTime, endTime, now);
-        if(isIn){
-            inCarNum = getInCarNum(now) + "";
-            outPayCarNum = getOutAndPayCarNum(now) + "";
-            notOutCarNum = getNotOutCarNum(now) + "";
-        }
-        head.put("inCarNum", inCarNum);
-        head.put("outPayCarNum", outPayCarNum);
-        head.put("notOutCarNum", notOutCarNum);
-
-        BigDecimal toDayFee = new BigDecimal(0);
-        BigDecimal allDayFee = new BigDecimal(0);
-        BigDecimal allParkFee = new BigDecimal(0);
-        BigDecimal allDayTaxes = new BigDecimal(0);
-        BigDecimal allDayNoTaxFee = new BigDecimal(0);
-	    List<ExportFeeDetailDTO> exportList = new ArrayList<>();
-        List<TbFeeDetails> list = this.getList(so);
-        Integer index = 1;
-        for (TbFeeDetails feeDetails : list) {
-            String feeType = FeeTypeEnum.getDesc(feeDetails.getFeeType());
-            ExportFeeDetailDTO detailDTO = new ExportFeeDetailDTO();
-            detailDTO.setBusinessNo(feeDetails.getBusinessNo()).setCarNo(feeDetails.getCarNo())
-                    .setFeeType(feeType).setItemTypeName(feeDetails.getItemTypeName())
-                    .setItemName(feeDetails.getItemName()).setItemPrice(feeDetails.getItemPrice())
-                    .setPayType("微信支付").setIndex(index++)
-                    .setPayMode("直接收款")
-                    .setWeight(feeDetails.getWeight()).setNum(feeDetails.getNum()).setUnitPrice(feeDetails.getUnitPrice())
-                    .setSettle("已结算").setTaxRate(feeDetails.getTaxRate().multiply(new BigDecimal(100)))
-                    .setTaxPrice(feeDetails.getTaxPrice()).setNoTaxPrice(feeDetails.getNoTaxPrice()).setPayTime(feeDetails.getPayTime())
-                    .setPickCustomerName(feeDetails.getPickCustomerName())
-                    .setCustomerName(feeDetails.getCustomerName())
-                    .setTransactionId(feeDetails.getTransactionId())
-                    .setKaiDanPerson(feeDetails.getKaiDanPerson())
-                    .setJiChaPerson(feeDetails.getJiChaPerson())
-                    .setDiaoDuPerson(feeDetails.getDiaoDuPerson());
-            if(!StrUtil.isEmpty(feeDetails.getBusinessId())){
-                detailDTO.setBusinessNo(feeDetails.getBusinessNo());
-            }else {
-                detailDTO.setBusinessNo(feeDetails.getBusinessCarNo());
-            }
-            exportList.add(detailDTO);
-            if(checkTimeRange(nowStr, nowStr, feeDetails.getCreateTime()) && feeDetails.getFeeType()==FeeTypeEnum.PARK_FEE.getCode()){
-                toDayFee = toDayFee.add(feeDetails.getItemPrice());
-            }
-            if(feeDetails.getFeeType()==FeeTypeEnum.PARK_FEE.getCode()){
-                allParkFee = allParkFee.add(feeDetails.getItemPrice());
-            }
-            allDayFee = allDayFee.add(feeDetails.getItemPrice());
-            allDayTaxes = allDayTaxes.add(feeDetails.getTaxPrice());
-            allDayNoTaxFee = allDayNoTaxFee.add(feeDetails.getNoTaxPrice());
-        }
-
-        head.put("toDayFee", toDayFee.toString());
-        head.put("allParkFee", allParkFee.toString());
-        head.put("allDayFee", allDayFee.toString());
-        head.put("allDayTaxes", allDayTaxes.toString());
-        head.put("allDayNoTaxFee", allDayNoTaxFee.toString());
-
-        String separator = File.separator;
-        String today = DateUtil.today();
-        String rootPath = UploadUtil.uploadConfig.rootFolder + separator + UploadUtil.uploadConfig.httpPrefix;
-        String prefix = myConfig.getDomain() + UploadUtil.uploadConfig.httpPrefix;
-        String extPath = "feeDetails" + separator + today + separator;
-        String fileName = "收费明细表_" + time + ".xlsx";
-        String savePath = rootPath + separator + extPath;
-        File saveFIle = new File(savePath);
-        if (!saveFIle.exists()) {
-            saveFIle.mkdirs();
-        }
-
-        ClassPathResource classPathResource = new ClassPathResource("static/day-fee-new.xlsx");
-        InputStream tempInputStream =classPathResource.getInputStream();
-
-        ExcelWriter excelWriter = EasyExcel.write(savePath + fileName, ExportFeeDetailDTO.class)
-                .withTemplate(tempInputStream).build();
-        WriteSheet writeSheet = EasyExcel.writerSheet().build();
-        FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build();//换行
-        excelWriter.fill(head, writeSheet);
-        excelWriter.fill(exportList, fillConfig, writeSheet);
-        excelWriter.finish();
-        return prefix + "/feeDetails/" + today + "/收费明细表_" + time + ".xlsx";
-    }*/
-
     public String export(SoMap so) {
         Date now = new Date();
         String nowStr = DateUtil.format(now, "yyyy-MM-dd HH:mm");
         String beginTime = so.getString("beginTime");
         String endTime = so.getString("endTime");
-        String time = beginTime + "至" + endTime;
+        String time = "未选时间";
+        if (StrUtil.isNotEmpty(beginTime)&&StrUtil.isNotEmpty(endTime)){
+            time = beginTime + "至" + endTime;
+        }
         Map<String, String> head = new HashMap<>();
         head.put("time", time);
         head.put("exportTime", nowStr);
@@ -467,8 +375,14 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         BigDecimal allDayTaxes = new BigDecimal(0);
         BigDecimal allDayNoTaxFee = new BigDecimal(0);
         List<ExportFeeDetailDTO> exportList = new ArrayList<>();
-        List<TbFeeDetails> list = this.getList(so);
-        if (list.size() > 10000) {
+        List<String> ids = so.getListByComma("ids", String.class);
+        List<TbFeeDetails> list;
+        if (ids!=null&&!ids.isEmpty()){
+            list=this.listByIds(ids);
+        }else {
+            list = this.getList(so);
+        }
+        if (list.size() > 2000) {
             throw new AjaxError("导出数据量过大,请筛选");
         }
         int index = 1;
@@ -570,49 +484,8 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
         return prefix + "/feeDetails/" + today + "/收费明细表_" + time + ".xlsx";
     }
 
-    private boolean checkTimeRange(String begin, String end, Date now) {
-        Date beginTime = DateUtil.beginOfDay(DateUtil.parse(begin));
-        Date endTime = DateUtil.endOfDay(DateUtil.parse(end));
-        if (now.getTime() >= beginTime.getTime() && now.getTime() <= endTime.getTime()) {
-            return true;
-        }
-        return false;
-    }
-
-    private Integer getInCarNum(Date now) {
-        Date beginOfDay = DateUtil.beginOfDay(now);
-        Date endOfDay = DateUtil.endOfDay(now);
-        QueryWrapper<TbBusinessCar> qw = new QueryWrapper();
-        qw.isNotNull("real_in_time")
-                .ge("real_in_time", beginOfDay)
-                .le("real_in_time", endOfDay);
-        List<TbBusinessCar> list = tbBusinessCarService.list(qw);
-        return list != null ? list.size() : 0;
-    }
-
-    private Integer getOutAndPayCarNum(Date now) {
-        Date beginOfDay = DateUtil.beginOfDay(now);
-        Date endOfDay = DateUtil.endOfDay(now);
-        QueryWrapper<TbBusinessCar> qw = new QueryWrapper();
-        qw.eq("pay", 1)
-                .isNotNull("real_in_time").isNotNull("real_out_time")
-                .ge("real_out_time", beginOfDay)
-                .le("real_out_time", endOfDay);
-        List<TbBusinessCar> list = tbBusinessCarService.list(qw);
-        return list != null ? list.size() : 0;
-    }
-
-    private Integer getNotOutCarNum(Date now) {
-        Date beginOfDay = DateUtil.beginOfDay(now);
-        Date endOfDay = DateUtil.endOfDay(now);
-        QueryWrapper<TbBusinessCar> qw = new QueryWrapper();
-        qw.isNotNull("real_in_time")
-                .ge("real_in_time", beginOfDay)
-                .le("real_in_time", endOfDay)
-                .isNull("real_out_time");
-        List<TbBusinessCar> list = tbBusinessCarService.list(qw);
-        return list != null ? list.size() : 0;
-    }
+
+
 
     public List<TbFeeDetails> findByBusinessCarId(String businessCarId, int feeType) {
         QueryWrapper<TbFeeDetails> ew = new QueryWrapper<>();
@@ -623,9 +496,6 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
 
     public PrintFeeDetailDTO prePrint(SoMap so) {
         so.clearNull();
-
-        Date now = new Date();
-        String nowStr = DateUtil.format(now, "yyyy-MM-dd HH:mm");
         String beginTime = so.getString("beginTime");
         String endTime = so.getString("endTime");
         String time = "所有时间";
@@ -633,12 +503,16 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             time = beginTime + "至" + endTime;
 
         }
-
         BigDecimal allDayFee = new BigDecimal(0);
         BigDecimal allDayTaxes = new BigDecimal(0);
         BigDecimal allDayNoTaxFee = new BigDecimal(0);
-
-        List<TbFeeDetails> feeDetaillist = this.getList(so);
+        List<String> ids = so.getListByComma("ids", String.class);
+        List<TbFeeDetails> feeDetaillist;
+        if (ids!=null&&!ids.isEmpty()){
+            feeDetaillist=this.listByIds(ids);
+        }else {
+            feeDetaillist = this.getList(so);
+        }
         List<ExportFeeDetailDTO> printList = new ArrayList<>();
         Integer index = 1;
         for (TbFeeDetails feeDetails : feeDetaillist) {
@@ -696,7 +570,7 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
 
     public void jiChaConfirm(List<Long> ids) {
         SpAdmin admin = StpUserUtil.getAdmin();
-        List<String>roleIds=StrUtil.splitTrim(admin.getRoleId(),",");
+        List<String> roleIds = StrUtil.splitTrim(admin.getRoleId(), ",");
         for (String roleId : roleIds) {
             SpRole role = spRoleMapper.getById(Long.valueOf(roleId));
             if (!StrUtil.equals(PersonEnum.JICHA.getDesc(), role.getName()) && !StrUtil.equals("admin", role.getType())) {