123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-12" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('show2')}">
- <div class="input-group">
- <input type="text" class="form-control" name="sn" placeholder="订单号">
- </div>
- <div class="input-group">
- <input type="text" class="form-control" name="name" placeholder="业主">
- </div>
- <div class="input-group">
- <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
- </div>
- <div class="input-group">
- <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
- </div>
- <div class="input-group">
- <input class="form-control" id="wstart" readonly placeholder="周期开始时间" name="wstart" >
- </div>
- <div class="input-group">
- <input class="form-control" id="wend" readonly placeholder="周期结束时间" name="wend" >
- </div>
- <div class="input-group">
- <select name="status" class="form-control">
- <option value="">选择状态</option>
- <option value="1">已缴费</option>
- <option value="2">审核中</option>
- <option value="3">已返销</option>
- </select>
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
- </span>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="ibox-content">
- <div class="jqGrid_wrapper">
- <table id="table" style="border-collapse: collapse"></table>
- <div id="pager"></div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- $(function () {
- laydate.render({
- elem: '#start',
- trigger: 'click' ,
- theme: '#284a94'
- });
- laydate.render({
- elem: '#end',
- trigger: 'click' ,
- theme: '#284a94'
- });
- laydate.render({
- elem: '#wstart',
- trigger: 'click' ,
- theme: '#284a94'
- });
- laydate.render({
- elem: '#wend',
- trigger: 'click' ,
- theme: '#284a94'
- });
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('show2',[],'')}",
- datatype: "json",
- colModel:[
- {label:'单据号',name:'sn',index:'sn', width:40,sortable: false},
- {label:'业主',name:'full_name',index:'full_name',width:30,editable: false,sortable: false},
- {label:'应收',name:'money',index:'money',width:30,editable: false,sortable: false},
- {label:'实收',name:'true_money',index:'true_money',width:30,editable: false,sortable: false},
- {label:'预付款',name:'pre_money',index:'pre_money',width:30,editable: false,sortable: false},
- {label:'状态',name:'status',index:'status',width:40,editable: false,sortable: false,formatter:function (a,b,c){
- var tt = '';
- if(a == 2){
- tt+='<span class="label label-danger">待审核</span>';
- }
- if(a == 0){
- tt+='未缴费';
- }
- if(a == 1){
- tt+='已缴费';
- }
- if(a == 3){
- tt+= '<span style="color: blue">(已返销)</span>';
- }
- if(a == 1 && c.is_cancel==1){
- tt+= '<span style="color: red">(拒绝)</span>';
- }
- return tt;
- }},
- {label:'备注',name:'remark',index:'remark',width:40,editable: false,sortable: false},
- {label:'处理时间',name:'cancel_time',index:'cancel_time',width:40,editable: false,sortable: false},
- {label:'返销原因',name:'cancel_reason',index:'cancel_reason',width:40,editable: false,sortable: false},
- {label:'支付方式',name:'pay_type',index:'pay_type',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- var tt = '';
- if(a == 1){
- tt+='现金';
- }
- if(a == 3){
- tt+='支付宝';
- }
- if(a == 4){
- tt+='银行托收';
- }
- if(a == 5){
- tt+='微信';
- }
- if(a == 6){
- tt+='组合付款';
- }
- return tt;
- }},
- {label:'创建日期',name:'create_time',index:'create_time',width:50,editable: false,sortable: false},
- {label:'操作',width:30,sortable: false,formatter: function (a, b, c) {
- // var editurl = "{:url('add',[],'')}/id/"+c.id;
- // var delurl = "{:url('del',[],'')}/id/"+c.id;
- var detail_url = "{:url('detail2',[],'')}/id/"+c.id;
- var btn = '<a href="'+detail_url+'" ><span class="label label-primary" >详情</span></a>';
- return btn;
- }},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"返销单",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- var dsh = xhr.dsh;
- $('#pager_left').html('<span style="color:red;font-size: 10px;">待审核:'+dsh);
- },
- });
- });
- </script>
- {/block}
|