123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <!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;
- }
- .footer {
- position: fixed;
- bottom: 10px;
- right: 20px;
- }
- .print-btn {
- background: #57C22A;
- border: 1px solid #e2e2e2;
- padding: 4px 20px;
- border-radius: 4px;
- color: white;
- cursor: pointer;
- }
- </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>
- <fieldset align="">
- <div id="myPrintArea" style="height: 1500;">
- <div align="center">
- <SPAN style="font-size:15px">东兴北投A1场地业务收费单据证明</SPAN>
- <br /><br />
- </div>
- <div style="text-align:center; font-size:15px;">
- <table id="one" width="100%" style="border-collapse:collapse;border:none;">
- <tr height="50">
- <td style="border:solid #000 1px;text-align: left;" colspan="4">单位:广西东兴北投口岸投资有限公司</td>
- <td style="border:solid #000 1px;text-align: left;" colspan="3">单证编号:
- <span id="businessNo"></span>
- </td>
- </tr>
- <tr height="50">
- <td style="border:solid #000 1px;text-align: left;" colspan="4">总金额:
- <span id="totalMoney"></span>
- </td>
- <td style="border:solid #000 1px;text-align: left;" colspan="3">支付时间:
- <span id="payTime"></span>
- </td>
- </tr>
- </table>
- <table id="two" width="100%" style="border-collapse:collapse;border:none;">
- <tr height="50">
- <td style="border:solid #000 1px;text-align: left;" colspan="7"><b>车辆信息:</b></td>
- </tr>
- <tr height="50">
- <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>
- <div id="carInfo"></div>
- </table>
- <table id="three" width="100%" style="border-collapse:collapse;border:none;">
- <tr height="50">
- <td style="border:solid #000 1px;text-align: left;" colspan="7"><b>具体业务项:</b></td>
- </tr>
- <tr height="50">
- <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>
- </table>
- <table id="three" width="100%" style="border-collapse:collapse;border:none;">
- <tr height="40">
- <td style="border:solid #000 1px;text-align: left;" colspan="7">开单员:
- <span id="createBy"></span>
- </td>
- </tr>
- </table>
- <br /><br />
- </div>
- </div>
- </fieldset>
- <div class="footer">
- <input type="button" class="print-btn" id="print_button" value="打印" />
- <input type="button" class="print-btn" id="close_button" value="关闭" />
- </div>
- </div>
- <script type="text/javascript">
- function getItemsByCarId(businessCarId) {
- sa.ajaxNoLayer('/TbBusinessItem/getByBusinessCarId', {
- businessCarId: businessCarId
- }, function(resp) {
- let itemList = resp.data;
- $.each(itemList, function(index, item) {
- let itemTypeName = item.itemTypeName;
- let itemName = item.itemName;
- let itemPrice = item.itemPrice;
- let unit = item.unit;
- let num = item.num
- let total = item.total;
- $('#three').append(
- "<tr height=\"35\">" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" +
- itemTypeName + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" +
- itemName + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" +
- itemPrice + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" +
- unit + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" +
- num + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" +
- total + "</td>" +
- "<tr>"
- );
- })
- })
- };
- function getByBusinessCarId(businessCarId) {
- sa.ajaxNoLayer('/TbBusiness/getByBusinessCarId', {
- businessCarId: businessCarId
- }, function(resp) {
- let list = resp.data;
- let no = list.map(obj => obj.no).join('、');
- let itemPrice=eval(list.map(obj=>parseFloat(obj.itemPrice)).join('+'))
- $("#businessNo").html(no);
- $('#payTime').html(list.length > 0 ? list[0].payTime : '');
- getListByCarId(businessCarId,itemPrice);
- })
- };
- function getListByCarId(businessCarId,itemPrice) {
- sa.ajaxNoLayer('/TbBusinessCar/getListByCarId', {
- businessCarId: businessCarId
- }, function(resp) {
- let partPrice=0;
- let carList = resp.data;
- $.each(carList, function(index, item) {
- let carNo = item.carNo;
- let carType = item.carType;
- let netWeight = item.netWeight;
- let carSize = item.carSize;
- let payType = item.payType
- let isLock = item.isLock;
- let money = item.money;
- partPrice=parseFloat(money)+partPrice;
- if (isLock === 0) {
- isLock = "正常"
- } else if (isLock === 1) {
- isLock = "锁定"
- }
- $('#two').append(
- "<tr height=\"35\">" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" + carNo + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" + carType + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" + payType + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" + isLock + "</td>" +
- "<td style=\"border:solid #000 1px;text-align: center;\">" + money + "</td>" +
- "<tr>"
- );
- })
- $('#totalMoney').html((itemPrice+partPrice).toFixed(2)+' 元');
- })
- };
- $(function() {
- $("#createBy").html(sa.$sys.getCurrUser().nickname);
- var id = sa.p('businessCarId', '-1');
- $("#print_button").click(function() {
- $("#myPrintArea").printArea();
- });
- $("#close_button").click(function() {
- sa.closeCurrIframe();
- });
- getItemsByCarId(id);
- getByBusinessCarId(id);
- });
- </script>
- </body>
- </html>
|