123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <style type="text/css" media=print>
- .noprint{display : none}
- .inside-header{ height: auto}
- html, body{
- height: auto!important;
- min-height: auto!important;
- }
- </style>
- <div class="widget-body no-padding" style=" width:100%; ">
- <!--startprint-->
- {if $row.village_id eq '7' or $row.village_id eq '10'}
- <div style=" width: 88%; float: left; ">
- {else}
- <div style=" width:99%; text-align: center; margin: 0 auto">
- {/if}
- <div class="toolbar" style=" font-size: 15px;text-align: center; width: 100%">
- 收费凭证
- </div>
- <div id="toolbar" class="toolbar" style=" font-size: 10px; padding:5px 0px;">
- 缴费日期:{$row.pay_date}
-
- 业主:{$row.hu.usesr_name}
-
- 房产:{$row.village.name}{$row.hu.name}
-
- 应缴金额:{$row.true_price}元
-
- <span style="float: right">凭证编号:{$row.order_number}</span>
- </div>
- <table id="table" border="1" cellspacing="0" cellpadding="0" class=" table-striped table-bordered table-hover " width="100%" style="border: 0.5px solid #0d0d0d;text-align: center">
- <tr style=" font-size: 14px;">
- <td style="width: 30px; text-align: center">序号</td>
- <td>项目</td>
- <td>交费周期</td>
- <td>数量</td>
- <td>单位</td>
- <td>单价</td>
- <td>金额</td>
- <td>折扣</td>
- <td>实收</td>
- </tr>
- {foreach $get as $k=>$vo}
- <tr style=" font-size: 12px;">
- <td>{$k+1}</td>
- <td style="width: 100px;" >
- {if $vo.item_id eq '1'}
- 水费
- {elseif $vo.item_id eq '2'}
- 电费
- {elseif $vo.item_id eq '999999999'}
- 车位服务费
- {else}
- {if $vo.item.item eq '1'}
- 物业费
- {else}
- 生活垃圾处理费
- {/if}
- {/if}
- </td>
- <td>{$vo.start_time_text}~{$vo.end_time_text}</td>
- <td>
- {if $vo.item_id neq '1' && $vo.item_id neq '2' && $vo.item_id neq '999999999' }
- {$vo.hu.big_area}
- {else}
- {$vo.yongliang}
- {/if}
- </td>
- <td>
- {if $vo.item_id neq '1' && $vo.item_id neq '2' && $vo.item_id neq '999999999' }
- {if $vo.item.method eq 1}
- 元/每平方/月
- {else}
- 元/每户/月
- {/if}
- {else}
- {$vo.danwei}
- {/if}
- </td>
- <td>{if $vo.item_id neq '1' && $vo.item_id neq '2' && $vo.item_id neq '999999999' }
- {$vo.item.price}
- {else}
- {$vo.danjia}
- {/if}
- </td>
- <td>{$vo.price}</td>
- <td>{$vo.zhekou}</td>
- <td>{$vo.true_price}</td>
- </tr>
- {/foreach}
- <tr >
- <td colspan="9">
- <div style="width: 100%; text-align:center;font-size: 12px;" >
- 实际账单期:{$row.mark}
- </div>
- </td>
- </tr>
- <tr style="font-size: 14px;" >
- <td colspan="9">
- <div style=" float:left;margin-left: 20px">
- 合计(大写):{$row.true_price_zhongwen}
- </div>
- <div style="float: right; margin-right: 20px">
- ¥{$row.true_price}元 {$row.pay_type}
- </div>
- </td>
- </tr>
- </table>
- <div class="toolbar" style=" font-size: 10px;float: right">
- 打印时间:{$row.time}
- </div>
- </div>
- <!--endprint-->
- </div>
- <p class="noprint" style="width: 100%; float: left">
- <!--<input id="btnPrint" type="button" value="打印"onclick="javascript:window.print();" />-->
- <input id="btnPrint" type="button" value="打印预览" onclick="preview(1)"/>
- </p>
- <script>
- window.onload=function()//用window的onload事件,窗体加载完毕的时候
- {
- var oFrame = document.getElementById("layui-layer-iframe1");
- oFrame.height = '200px';
- }
- function preview(oper)
- {
- if (oper <10)
- {
- bdhtml=window.document.body.innerHTML;
- sprnstr="<!--startprint-->"; //开始打印标识字符串有17个字符
- eprnstr="<!--endprint-->"; //结束打印标识字符串
- prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); //从开始打印标识之后的内容
- prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); //截取开始标识和结束标识之间的内容
- // alert(prnhtml);
- window.document.body.innerHTML=prnhtml; //把需要打印的指定内容赋给body.innerHTML
- console.log(prnhtml);
- window.print(); //调用浏览器的打印功能打印指定区域
- window.document.body.innerHTML=bdhtml; // 最后还原页面
- // bdhtml=window.document.body.innerHTML;//获取当前页的html代码
- //
- // sprnstr="<!–-startprint"+oper+"-–>";//设置打印開始区域
- // eprnstr="<!–-endprint"+oper+"-–>";//设置打印结束区域
- // prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr));//从開始代码向后取html
- // alert(prnhtml) ;
- // prnhtmlprnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));//从结束代码向前取html
- // window.document.body.innerHTML=prnhtml;
- // window.print();
- // window.document.body.innerHTML=bdhtml;
- } else {
- window.print();
- }
- }
- </script>
|