123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <!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;
- }
- </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: 30;" id="print_button" value="打印"/>
- <fieldset align="">
- <legend>打印区</legend>
- <div id="myPrintArea" style="height: 1500;">
- <div align="center">
- <SPAN style="font-size:25px" id="headName">统计报表(日)</SPAN>
- <br/><br/>
- </div>
- <div style="text-align:center; font-size:15px;">
- <table id="dp" width="100%" style="border-collapse:collapse;border:none;">
- <tr height="80">
- <td id="company" style="border:solid #000 1px;text-align: left;" 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: right;" colspan="4">
- <div id="time" align="right"></div>
- </td>
- </tr>
- <tr height="80">
- <td style="border:solid #000 1px; " rowspan="2">日期</td>
- <td style="border:solid #000 1px;text-align: center;" rowspan="2">收费项目</td>
- <td style="border:solid #000 1px; " colspan="4">收费方式</td>
- <td style="border:solid #000 1px; " rowspan="2">数量</td>
- <td style="border:solid #000 1px; " rowspan="2">总价</td>
- <td style="border:solid #000 1px; " rowspan="2">税率</td>
- <td style="border:solid #000 1px; " rowspan="2">税款</td>
- <td style="border:solid #000 1px; " rowspan="2">不含税金额</td>
- <td id="person1" style="border:solid #000 1px; " rowspan="2">开单员</td>
- <td id="person2" style="border:solid #000 1px; " rowspan="2">复核员</td>
- <td id="person3" style="border:solid #000 1px; " rowspan="2">统计稽查员</td>
- </tr>
- <tr height="80">
- <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>
- </table>
- </div>
- <div align="center">
- <br/><br/>
- <SPAN style=";font-size:15px">
- 收费统计员:
-                                         
- 收费核对员:
-                                         
- 收费员:
- </SPAN>
- <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();
- });
- 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("统计报表(月)");
- $("#person1").remove();
- $("#person2").remove();
- $("#person3").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("统计报表(年)");
- $("#person1").remove();
- $("#person2").remove();
- $("#person3").remove()
- $("#company").attr('colspan', 3);
- $("#unit").attr('colspan', 5);
- $("#td_time").attr('colspan', 3);
- }
- if (isMonth != null || isYear != null) {
- $("#leader").html("运营负责人:\n" +
- "                                \n" +
- "                               \n" +
- "                               \n" +
- " 运营分管领导:");
- } else {
- $("#leader").html("运营负责人:\n" +
- "                   \n" +
- "                                         \n" +
- "                                         \n" +
- "                  ");
- }
- 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;
- for (var i = 0; i < list.length; i++) {
- html.push(
- "<tr height=\"60\"><td style=\"border:solid #000 1px; \">" + list[i]['dayTime'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['feeType'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['wxPrice'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['aliPrice'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['cardPrice'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['yuePrice'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['num'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['taxMoney'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['taxRate'] * 100 +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['taxes'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['noTaxMoney']
- )
- if (isMonth == null && isYear == null) {
- html.push(
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['kaiDanPerson'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['diaoDuPerson'] +
- "</td><td style=\"border:solid #000 1px; \">" + list[i]['jiChaPerson'] + "</td></tr>"
- )
- } else {
- html.push("</td></tr>")
- }
- }
- 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; \">" + "合计" +
- "</td><td style=\"border:solid #000 1px; \">" +
- "</td><td style=\"border:solid #000 1px; \">" + totalWxPrice +
- "</td><td style=\"border:solid #000 1px; \">" + totalAliPrice +
- "</td><td style=\"border:solid #000 1px; \">" + totalCardPrice +
- "</td><td style=\"border:solid #000 1px; \">" + totalYuePrice +
- "</td><td style=\"border:solid #000 1px; \">" +
- "</td><td style=\"border:solid #000 1px; \">" + totalMoney +
- "</td><td style=\"border:solid #000 1px; \">" +
- "</td><td style=\"border:solid #000 1px; \">" + totalTaxes +
- "</td><td style=\"border:solid #000 1px; \">" + 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></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();
- }
- });
- });
- </script>
- </body>
- </html>
|