showfee.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox">
  4. <div class="ibox-content">
  5. <div class="row">
  6. <div class="col-xs-12" style="text-align: right;">
  7. <form class="form-inline" id="form-search" action="{:url('showfee')}">
  8. <div class="input-group">
  9. <input type="text" class="form-control" name="xq_title" placeholder="小区">
  10. </div>
  11. <div class="input-group">
  12. <input type="text" class="form-control" name="title" placeholder="名称">
  13. </div>
  14. <div class="input-group">
  15. <input type="text" class="form-control" name="name" placeholder="业主">
  16. </div>
  17. <div class="input-group">
  18. <input type="text" class="form-control" name="card" placeholder="身份证">
  19. </div>
  20. <div class="input-group">
  21. <select name="enable" class="form-control">
  22. <option value="">选择状态</option>
  23. <option value="0">禁用</option>
  24. <option value="1">正常</option>
  25. </select>
  26. </div>
  27. <div class="input-group">
  28. <select name="cate" class="form-control">
  29. <option value="">资源属性</option>
  30. <option value="1">住房</option>
  31. <option value="2">商铺</option>
  32. <option value="3">营业房</option>
  33. <option value="4">储藏室</option>
  34. <option value="5">停车位</option>
  35. </select>
  36. </div>
  37. <div class="input-group">
  38. <select name="c_type" class="form-control">
  39. <option value="">类型</option>
  40. {foreach $cType as $k=>$v}
  41. <option value="{$v['id']}">{$v['name']}</option>
  42. {/foreach}
  43. </select>
  44. </div>
  45. <div class="input-group">
  46. <span class="input-group-btn">
  47. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  48. </span> &nbsp;
  49. <span class="input-group-btn">
  50. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  51. </span>&nbsp;
  52. </div>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="ibox-content">
  58. <div class="jqGrid_wrapper">
  59. <table id="table" style="border-collapse: collapse"></table>
  60. <div id="pager"></div>
  61. </div>
  62. </div>
  63. </div>
  64. {/block}
  65. {block name="script"}
  66. <script>
  67. $(function () {
  68. $(window).bind("resize",function(){
  69. var width=$(".jqGrid_wrapper").width();
  70. $("#table").setGridWidth(width);
  71. });
  72. $.jgrid.defaults.styleUI="Bootstrap";
  73. $("#table").jqGrid({
  74. url:"{:url('showfee',[],'')}",
  75. datatype: "json",
  76. colModel:[
  77. {label:'ID',name:'id',index:'id', width:30,sortable: false},
  78. {label:'小区',name:'xq_title',index:'xq_title',width:60,editable: false,sortable: false},
  79. {label:'名称',name:'title',index:'title',width:40,editable: false,sortable: false},
  80. {label:'面积(m²)',name:'area',index:'area',width:40,editable: false,sortable: false},
  81. {label:'资源属性',name:'cate_name',index:'cate_name',width:60,editable: false,sortable: false},
  82. {label:'类型',name:'c_type_name',index:'c_type_name',width:60,editable: false,sortable: false},
  83. {label:'业主',name:'name',index:'name',width:40,editable: false,sortable: false},
  84. {label:'手机号',name:'phone',index:'phone',width:60,editable: false,sortable: false},
  85. {label:'身份证',name:'card',index:'card',width:60,editable: false,sortable: false},
  86. {label:'收费起止时间',name:'startend',index:'startend',width:60,editable: false,sortable: false},
  87. {label:'累计应收',name:'money',index:'money',width:30,editable: false,sortable: false},
  88. {label:'状态',name:'enable',index:'enable',width:30,editable: false,sortable: false,formatter:function (a,b,c){
  89. if(a == 0){
  90. return '禁用';
  91. } else{
  92. return '启用';
  93. }
  94. }},
  95. {label:'操作',width:40,sortable: false,formatter: function (a, b, c) {
  96. // var editurl = "{:url('add',[],'')}/id/"+c.id;
  97. var feeUrl = "{:url('fee',[],'')}/id/"+c.id;
  98. // var btn = '<a url="'+editurl+'" href="javascript:;" data-title="编辑{$m_name}" onclick="layer_open(this,1)"><span class="label label-primary" title="编辑">编辑</span></a>&nbsp;';
  99. var btn= '<a href="'+feeUrl+'" ><span class="label label-primary" title="收费">收费</span></a>';
  100. return btn;
  101. }},
  102. ],
  103. rowNum:10,
  104. rowList:[10,20,30,50,100],
  105. pager: '#pager',
  106. sortname: 'id',
  107. viewrecords: true,
  108. autowidth:true,
  109. mtype: 'post',
  110. height: 'auto',
  111. emptyrecords: "暂无数据",
  112. sortorder: "asc",
  113. caption:"{$m_name}",
  114. loadComplete: function (xhr) {
  115. if(xhr.code==0){
  116. layer.msg(xhr.msg);
  117. return false;
  118. }
  119. },
  120. });
  121. });
  122. </script>
  123. {/block}