123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <!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:15px">东兴二桥口岸疫情防控进口接驳区业务确认单</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="7">支付时间:
- <span id="operateTime"></span>
- </td>
- </tr>
- <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;">载重(kg)</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="two" width="100%" style="border-collapse:collapse;border:none;">-->
- <!-- <tr height="80">-->
- <!-- <td style="border:solid #000 1px;text-align: left;" colspan="7"><b>具体业务项:</b></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>-->
- <!-- </tr>-->
- <!-- </table>-->
- <br/><br/>
- </div>
- <!-- <div align="right">-->
- <!-- <br/><br/>-->
- <!-- <SPAN 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 id = getUrlParam('id');
- $.ajax({
- url: sa.cfg.api_url + '/TbBusiness/getZxBusinessById?id=' + id,
- type: 'post',
- success: function (data) {
- $("#businessNo").html(data.data.no)
- $("#operateTime").html(data.data.payTime);
- var carList = data.data.cars;
- var html = [];
- $.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;
- if(isLock === 0){
- isLock = "正常"
- }else if(isLock === 1) {
- isLock = "锁定"
- }
- html.push(
- "<tr height=\"50\">"
- + "<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;\">" + netWeight + "</td>"
- + "<td style=\"border:solid #000 1px;text-align: center;\">" + carSize + "</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>"
- );
- })
- html.push(
- "<tr height=\"50\">"
- + "<td style=\"border:solid #000 1px;text-align: left;\" colspan=\"7\"><b>具体业务项:</b></td>"
- + "<tr>"
- );
- html.push(
- "<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>"
- + "<td style=\"border:solid #000 1px;text-align: center;\">" + "支付状态" + "</td>"
- + "<tr>"
- );
- var pickCustomerName = '';
- var itemList = data.data.items;
- $.each(itemList, function (index, item) {
- pickCustomerName = pickCustomerName + item.pickBy + ',';
- let itemTypeName = item.itemTypeName;
- let itemName = item.itemName;
- let itemPrice = item.itemPrice;
- let unit = item.unit;
- let num = item.num
- let total = item.total;
- let payStatus = item.payStatus;
- if(payStatus === 0){
- payStatus = "未支付"
- }else if(payStatus === 1) {
- payStatus = "已支付"
- }
- html.push(
- "<tr height=\"50\">"
- + "<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>"
- + "<td style=\"border:solid #000 1px;text-align: center;\">" + payStatus + "</td>"
- + "<tr>"
- );
- })
- pickCustomerName = pickCustomerName.substr(0, pickCustomerName.length-1);
- if(pickCustomerName === "null" || pickCustomerName == null){
- pickCustomerName = '';
- }
- var customerName = data.data.createBy;
- var kaiDanPeople = data.data.confirmBy;
- if(kaiDanPeople === "null" || kaiDanPeople == null){
- kaiDanPeople = '';
- }
- html.push(
- "<tr height=\"50\">"
- + "<td style=\"border:solid #000 1px;text-align: center;\">"+ "客户" +"</td>"
- + "<td style=\"border:solid #000 1px;text-align: center;\">"+ customerName +"</td>"
- + "<td style=\"border:solid #000 1px;text-align: center;\">"+ "开单员" +"</td>"
- + "<td style=\"border:solid #000 1px;text-align: center;\">"+ kaiDanPeople +"</td>"
- + "<td style=\"border:solid #000 1px;text-align: center;\">"+ "装卸公司" +"</td>"
- + "<td style=\"border:solid #000 1px;text-align: center;\" colspan=\"2\">"+ pickCustomerName +"</td>"
- + "<tr>"
- );
- $("#one").append(html.join(''));
- $("#myPrintArea").printArea();
- }
- });
- });
- </script>
- </body>
- </html>
|