123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3" >
- <a href="{:url('add')}" class="btn btn-sm btn-primary">交款</a>
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('index')}">
- <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">
- <select name="status" class="form-control">
- <option value="">状态</option>
- <option value="0">待审核</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'
- });
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('index')}",
- datatype: "json",
- colModel:[
- {label:'交款人',name:'real_name',index:'real_name', width:40,sortable: false},
- {label:'开始时间',name:'start',index:'start',width:30,editable: false,sortable: false},
- {label:'结束时间',name:'end',index:'end',width:30,editable: false,sortable: false},
- {label:'交款总金额',name:'true_money',index:'true_money',width:30,editable: false,sortable: false},
- {label:'状态',name:'status',index:'status',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- if(a===0){
- return '待审核';
- }else if (a===1){
- return '同意';
- }else if (a===2){
- return '拒绝';
- }else if (a===3){
- return '已取消';
- }
- }},
- {label:'财务收款人',name:'deal_real_name',index:'deal_real_name',width:30,editable: false,sortable: false},
- {label:'处理时间',name:'update_time',index:'update_time',width:50,editable: false,sortable: false},
- {label:'操作',width:60,sortable: false,formatter: function (a, b, c) {
- var detail_url = "{:url('detail',[],'')}/id/"+c.id;
- var cancel_url = "{:url('cancel',[],'')}/id/"+c.id;
- var edit_url = "{:url('edit',[],'')}/id/"+c.id;
- var btn = '';
- btn+= '<a href="'+detail_url+'" ><span class="label label-primary" >详情</span></a>';
- if(c.cur_user_id===c.user_id){
- if(c.status===0){
- btn += ' <a href="'+cancel_url+'" class="confirm ajax-get" data-confirm="确定要取消吗?" data-table="1"><span class="label label-danger" title="取消">取消</span></a>';
- }
- if(c.status===2 || c.status===3){
- btn+= ' <a href="'+edit_url+'" ><span class="label label-danger" >重新扎帐</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;
- }
- },
- });
- });
- </script>
- {/block}
|