You've already forked qlg.tsgz.moe
							
							
		
			
				
	
	
		
			273 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			273 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			HTML
		
	
	
		
			Executable File
		
	
	
	
	
| {extend name="base" /}
 | |
| 
 | |
| {block name="css"}
 | |
| <style type="text/css">
 | |
|     @page 
 | |
|     {
 | |
|         size:  auto;   /* auto is the initial value */
 | |
|         margin: 0mm;  /* this affects the margin in the printer settings */
 | |
|     }
 | |
|     .table_title{        
 | |
|         font-size:18px;font-weight: bold;text-align: center;margin:10px;
 | |
|     }
 | |
|     .right{
 | |
|         float: right;
 | |
|     }
 | |
|     .center{
 | |
|         text-align: center;
 | |
|     }
 | |
|     .layui-form{
 | |
|         width:95%;
 | |
|         margin:50px auto;
 | |
|     }
 | |
|     .red{
 | |
|         color:red;
 | |
|     }
 | |
|     
 | |
| </style>
 | |
| {/block}
 | |
| 
 | |
| {block name="js"}
 | |
| 
 | |
| <script src="__ADMIN__/cashdraws/cashdraws.js?v={$v}" type="text/javascript"></script>
 | |
| 
 | |
| {/block}
 | |
| 
 | |
| {block name="main"}
 | |
| <div class="layui-form">
 | |
|         <div class="layui-form-item">
 | |
|             <div class="layui-input-block" style="float: right;">              
 | |
|                 <button class="layui-btn layui-btn-warm print">打印</button>
 | |
|             </div>
 | |
|         </div>
 | |
|         <div class="layui-collapse" lay-filter="test">
 | |
|           <div class="layui-colla-item">
 | |
|             <h2 class="layui-colla-title">点击查询/充值/扣除操作</h2>      
 | |
|             <div class="layui-colla-content">
 | |
|                 <fieldset class="layui-elem-field">
 | |
|                   <legend>查询</legend>
 | |
|                   <div class="layui-field-box">
 | |
|                      <form  action="" method="get">
 | |
|                      <div class="wst-toolbar">
 | |
|                         <label class="layui-form-label">查询日期</label>
 | |
|                         <input type="text" id="searchDate" name="searchDate" class="layui-input" maxlength="20" value="{$searchDate}" placeholder="查询日期">
 | |
|                         <button class="btn btn-primary search" ><i class="fa fa-search"></i>查询</button>  
 | |
|                     </div>
 | |
| 
 | |
|                 </form>
 | |
|                   </div>
 | |
|                 </fieldset>                
 | |
|                 <fieldset class="layui-elem-field">
 | |
|                   <legend>充值/扣除操作</legend>
 | |
|                     <div class="layui-field-box">
 | |
|                        <div class="layui-form-item">
 | |
|                             <label class="layui-form-label" style="width: auto;">日期选择:</label>
 | |
|                             <div class="layui-input-inline">
 | |
|                                 <input type="text" id="reDate" name="reDate" class="layui-input ipt" maxlength="20" value="{$searchDate}" placeholder="日期">
 | |
|                             </div>
 | |
|                         </div>
 | |
|                         <div class="layui-form-item">
 | |
|                             <label class="layui-form-label" style="width: auto;">充值/扣除:</label>
 | |
|                             <div class="layui-input-block">
 | |
|                               <input type="radio" class="ipt" name="reType" value="1" title="充值" checked="">
 | |
|                               <input type="radio" class="ipt" name="reType" value="2" title="扣除">
 | |
|                             </div>
 | |
|                         </div>                
 | |
|                         <div class="layui-form-item">
 | |
|                             <label class="layui-form-label" style="width: auto;">变动数额:</label>
 | |
|                             <div class="layui-input-inline">                        
 | |
|                                 <input type="text" id="money" name="money" class="layui-input ipt" maxlength="20" value="" placeholder="请输入变动数额">
 | |
|                             </div>
 | |
|                         </div>
 | |
|                         <div class="layui-form-item">
 | |
|                             <label class="layui-form-label" style="width: auto;">   验证码:</label>
 | |
|                             <div class="layui-input-inline">                        
 | |
|                                 <input type="text" id="mobileCode" name="mobileCode" class="layui-input" maxlength="20" value="" placeholder="请输入验证码">
 | |
|                                 
 | |
|                             </div>   
 | |
|                             <div class="layui-word-aux""><button class="layui-btn layui-btn-normal layui-btn-sm  getCode">获取验证码</button> </div>
 | |
|                         </div>
 | |
|                   
 | |
|                         <div class="layui-form-item">
 | |
|                             <button class="layui-btn setReport" >确定提交</button> 
 | |
|                         </div>
 | |
|                     </div>          
 | |
|                 </fieldset>  
 | |
|             </div>
 | |
|           </div>
 | |
|           
 | |
|         </div>
 | |
| 
 | |
| <!--start-->
 | |
| <style>
 | |
|     table.layui-table th,
 | |
|     table.layui-table td {
 | |
|         font-size: 18px;
 | |
|     }
 | |
| </style>
 | |
|     <table class="layui-table"> 
 | |
|         <tbody> 
 | |
|         <tr> 
 | |
|             <th  colspan="12"> <p class="table_title">交易明细备查表-{$searchDate}</p></th> 
 | |
|         </tr> 
 | |
|         <tr> 
 | |
|             <th  colspan="12"> <p class="right">单位:元</p></th> 
 | |
|         </tr> 
 | |
|         <tr> 
 | |
|          <td>上日余额¥ {$orders['yesterdayMoney']}</td> 
 | |
|          <td>今日余额¥ {$orders['todayMoney']}</td> 
 | |
|          <td>今日交易¥{$orders['allPaySum']}</td> 
 | |
|          <td>今日代收¥ {$orders['collectionGatheringSum']}</td> 
 | |
|          <td>今日代付¥ {$orders['coupousEarningsSum']+$orders['hasVouchersEearningsSum']+$orders['taxFeeSum']+$orders['collectionPaySum']}</td> 
 | |
|          <td class="red">今日收益¥ {$orders['coupousEarningsSum']+$orders['hasVouchersEearningsSum']}</td> 
 | |
|         </tr> 
 | |
|         <tr> 
 | |
|          <td colspan="1" >今日明细</td>         
 | |
|          <td colspan="1" >代付款</td>
 | |
|          <td colspan="3" class="center">公司手续费收益</td> 
 | |
|          <td>商品交易</td> 
 | |
|         </tr> 
 | |
|         <tr> 
 | |
|          <td>合计</td> 
 | |
|          <td>¥{$orders['taxFeeSum']}</td> 
 | |
|          <td>¥{$orders['hasVouchersEearningsSum']}</td> 
 | |
|          <td>合计</td> 
 | |
|          <td>¥{$orders['coupousEarningsSum']}</td> 
 | |
|          <td>¥{$orders['allPaySum']}</td> 
 | |
|         </tr> 
 | |
|         <tr> 
 | |
|          <td>购户ID</td> 
 | |
|          <td>今日缴税</td> 
 | |
|          <td>已获券收益</td> 
 | |
|          <td>商户ID</td> 
 | |
|          <td>优惠款收益</td> 
 | |
|          <td>销售额</td> 
 | |
|         </tr> 
 | |
|         {foreach name="orders['list']" item="vo"}
 | |
|             <tr> 
 | |
|              <td>{$vo['loginName']} </td> 
 | |
|              <td>{$vo['taxFee']}</td> 
 | |
|              <td>{$vo['hasVouchersEearnings']}</td> 
 | |
|              <td>{$vo['shopLoginName']}</td> 
 | |
|              <td>{$vo['coupousEarnings']} </td> 
 | |
|              <td>{$vo['realTotalMoney']}</td> 
 | |
|             </tr>
 | |
|         {/foreach}
 | |
|        </tbody> 
 | |
|     </table>   
 | |
|     <table class="layui-table"> 
 | |
|         <tbody> 
 | |
|             <tr> 
 | |
|                 <th  colspan="3"> <p class="table_title">交易明细备查表-{$searchDate}</p></th> 
 | |
|             </tr>
 | |
|             <tr> 
 | |
|                 <th class="red">今日汇总:¥{$orders['collectionGatheringSum']-$orders['collectionPaySum']}</th>
 | |
|                 <th>代收款</th>
 | |
|                 <th>代付款</th>
 | |
|             </tr>
 | |
|             <tr> 
 | |
|                 <th>合计</th>
 | |
|                 <th>¥{$orders['collectionGatheringSum']}</th>
 | |
|                 <th>¥{$orders['collectionPaySum']}</th>
 | |
|             </tr>
 | |
|             <tr> 
 | |
|                 <th>商户ID</th>
 | |
|                 <th>优惠款</th>
 | |
|                 <th>提现金额</th>
 | |
|             </tr>
 | |
| 
 | |
|             {foreach name="orders['collection']" item="vo"}
 | |
|                 <tr> 
 | |
|                     <td>{$vo['shopLoginName']}</td> 
 | |
|                     <td>{$vo['gathering']}</td> 
 | |
|                     <td>{$vo['pay']}</td>                  
 | |
|                 </tr> 
 | |
|             {/foreach}
 | |
|         </tbody>
 | |
|     </table>    
 | |
| <!--end--> 
 | |
| </div>
 | |
| <script>
 | |
| 
 | |
|     $(function(){
 | |
|         var laydate = layui.laydate;
 | |
|         laydate.render({
 | |
|             elem: '#searchDate'
 | |
|         });
 | |
|         laydate.render({
 | |
|             elem: '#reDate'
 | |
|         });
 | |
|         isSend = false;
 | |
|         $('body').on('click','.getCode',function(){
 | |
|             var params = WST.getParams('.ipt');
 | |
|             if(params.money<=0){                
 | |
|                 WST.msg('请输入变动金额','warn');
 | |
|                 $('#money').focus();
 | |
|                 return;
 | |
|             }
 | |
|             var that = $(this);            
 | |
|             if(isSend) return;
 | |
|             isSend = true;
 | |
|             $('.ipt').removeAttr('disabled');
 | |
|             $.post(WST.U('admin/Cashdraws/getMobileCode'), params, function(data) {
 | |
|                 var json = WST.toAdminJson(data);
 | |
|                 if(json.status == 1) {
 | |
|                     $('.ipt').attr('disabled','disabled');
 | |
|                     WST.msg(json.msg, 'success');
 | |
|                     time = 120;
 | |
|                     that.attr('disabled', 'disabled').html('120秒获取');
 | |
|                     $('#mobileCode').focus();
 | |
|                     var task = setInterval(function() {
 | |
|                         time--;
 | |
|                         that.html('' + time + "秒获取");
 | |
|                         if(time == 0) {
 | |
|                             isSend = false;
 | |
|                             clearInterval(task);
 | |
|                             that.removeAttr('disabled').html("重新发送");
 | |
|                         }
 | |
|                     }, 1000);
 | |
|                 } else {
 | |
|                     WST.msg(json.msg, 'warn');
 | |
|                     isSend = false;
 | |
|                 }
 | |
|                 data = json = null;
 | |
|             });
 | |
|         });
 | |
|         //修改凭证
 | |
|         $('body').on('click','.setReport',function(){
 | |
|            var params = {};
 | |
|            params.mobileCode = $('#mobileCode').val();
 | |
|            if(params.mobileCode.length<4){            
 | |
|                 WST.msg('请输入验证码','warn');
 | |
|                 return;
 | |
|            }
 | |
|            var that = $(this);
 | |
|            that.attr('disabled','disabled');  
 | |
|            $.post(WST.U('admin/Cashdraws/setReport'), params, function(data) {
 | |
|                 var json = WST.toAdminJson(data);
 | |
|                 if(json.status == 1) {
 | |
|                     WST.msg(json.msg, 'success');     
 | |
|                     $('.ipt').removeAttr('disabled');
 | |
|                 } else {
 | |
|                     WST.msg(json.msg, 'warn');
 | |
|                 }
 | |
|                 that.removeAttr('disabled');
 | |
|                 data = json = null;
 | |
|             });
 | |
|         });
 | |
|         //打印
 | |
|         $('body').on('click','.print',function(){
 | |
|             bdhtml = window.document.body.innerHTML;
 | |
|             sprnstr = "<!--start-->";
 | |
|             eprnstr = "<!--end-->";
 | |
|             prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
 | |
|             prnhtml = prnhtml.substring(0,prnhtml.indexOf(eprnstr));
 | |
|             window.document.body.innerHTML = prnhtml;
 | |
|             window.print();
 | |
|             location.reload();
 | |
|         });
 | |
|     })
 | |
| 
 | |
| </script>
 | |
| 
 | |
| {/block} |