rentVerifyList.jsp 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  2. <jsp:include page="../../common/include.jsp" />
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  4. <script type="text/javascript"><!--
  5. /**用户显示区*/
  6. $(function() {
  7. $('#rentDataGrid').datagrid({
  8. rownumbers:true,
  9. fit:true,
  10. pageSize:20,
  11. pageList : [ 10, 20, 30, 40, 50 ],
  12. fitColumns:false,
  13. border:false,
  14. sortOrder:'desc',
  15. pagination:true,
  16. idField:'id',
  17. url:whzl.basePath + '/rentAction_listRent',
  18. toolbar:'#searchtool',
  19. checkOnSelect:true,
  20. selectOnCheck:false,
  21. nowrap:true,
  22. rowStyler:function(index,row){
  23. if(row.rentType == 1){
  24. return 'background-color:pink;color:blue;font-weight:bold;';
  25. }
  26. },
  27. loadFilter:function(result){
  28. if(result.success){
  29. return result.obj;
  30. }else{
  31. $.messager.alert("提示",result.message);
  32. return ;
  33. }
  34. }
  35. });
  36. });
  37. /**查询*/
  38. function searchFun(){
  39. $("#rentDataGrid").datagrid("load", {
  40. "rent.securityPerson.name":$("#tblQuery").find("input[id='securityPersonName']").val()
  41. });
  42. }
  43. /*清除查询条件**/
  44. function ClearQuery() {
  45. $("#tblQuery").find("input").val("");
  46. $("#tblQuery").find("select").val("-1");
  47. }
  48. var dateFormatter = function(value,row,index){
  49. if(value != null){
  50. return value.substring(0,10);
  51. }else{
  52. return "";
  53. }
  54. }
  55. var contractNameFormatter = function(value,row,index){
  56. return row.leaseContract.contractName;
  57. }
  58. var contractNoFormatter = function(value,row,index){
  59. return row.leaseContract.contractNo;
  60. }
  61. var securityPersonNameFormatter = function(value,row,index){
  62. return row.securityPerson.name;
  63. }
  64. var houseAddressFormatter = function(value,row,index){
  65. return row.house.address;
  66. }
  67. /**详细*/
  68. var detailsFormatter = function(value , row , index){
  69. if(row.rentType != 1){
  70. return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=rentDetails(" + row.id + ") style='cursor:pointer' />";
  71. }else{
  72. return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=rentRemoveDetails(" + row.id + ") style='cursor:pointer' />";
  73. }
  74. };
  75. /**详细页面对话框*/
  76. var rentDetails = function(id){
  77. $("#detailRentDialog").dialog(
  78. {
  79. buttons : [
  80. {
  81. text : '确定',
  82. iconCls : 'icon-ok',
  83. handler : function(){
  84. $("#detailRentDialog").dialog("close");
  85. }
  86. }
  87. ],
  88. onLoad : function(){
  89. detail_load(id);
  90. }
  91. }
  92. );
  93. };
  94. /**详细页面对话框*/
  95. var rentRemoveDetails = function(id){
  96. $("#detailRentRemoveDialog").dialog(
  97. {
  98. buttons : [
  99. {
  100. text : '确定',
  101. iconCls : 'icon-ok',
  102. handler : function(){
  103. $("#detailRentRemoveDialog").dialog("close");
  104. }
  105. }
  106. ],
  107. onLoad : function(){
  108. removeDetail_load(id);
  109. }
  110. }
  111. );
  112. };
  113. /**财务复核*/
  114. var verifyFormatter = function(value , row , index){
  115. if(row.verifyOpinion == null ||row.verifyOpinion == '' ){
  116. if(row.rentType != 1){
  117. return "<img src='<%=basePath%>/images/pencil.png' title='财务复核' onclick=verifyRent(" + row.id + ") style='cursor:pointer' />";
  118. }else{
  119. return "<img src='<%=basePath%>/images/pencil.png' title='财务复核' onclick=verifyRentRemove(" + row.id + ") style='cursor:pointer' />";
  120. }
  121. }else if (row.verifyOpinion == '1'){
  122. return "通过";
  123. }else if (row.verifyOpinion == '2'){
  124. return "未通过";
  125. }
  126. };
  127. /**修改共有产权房*/
  128. function verifyRent(id){
  129. $('#verifyRentDialog').dialog(
  130. {
  131. buttons : [
  132. {
  133. text : '确定',
  134. iconCls : 'icon-ok',
  135. handler : function(){
  136. task_submit();
  137. }
  138. },
  139. {
  140. text : '取消',
  141. iconCls : 'icon-cancel',
  142. handler : function(){
  143. $("#verifyRentDialog").dialog("close");
  144. }
  145. }
  146. ],
  147. onLoad : function(){
  148. task_load(id);
  149. }
  150. }
  151. );
  152. }
  153. /**修改共有产权房*/
  154. function verifyRentRemove(id){
  155. $('#verifyRentRemoveDialog').dialog(
  156. {
  157. buttons : [
  158. {
  159. text : '确定',
  160. iconCls : 'icon-ok',
  161. handler : function(){
  162. task_submit();
  163. }
  164. },
  165. {
  166. text : '取消',
  167. iconCls : 'icon-cancel',
  168. handler : function(){
  169. $("#verifyRentRemoveDialog").dialog("close");
  170. }
  171. }
  172. ],
  173. onLoad : function(){
  174. task_load(id);
  175. }
  176. }
  177. );
  178. }
  179. --></script>
  180. <div class="easyui-layout" data-options="fit:true,border:false">
  181. <div data-options="region:'center',border:false">
  182. <div id="searchtool" data-options="region:'north' , border:false">
  183. <div class="clear"></div>
  184. <table id="tblQuery" style="width:100%;">
  185. <tr>
  186. <td align="right" style="width: 70px;"><span>租金收取标题</span></td><td style="width: 120px;"><input id="securityPersonName" name="rent.securityPerson.name" type="text" style="width: 100px;"/></td>
  187. <td align="left" style="width: 200px;">
  188. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  189. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  190. </td>
  191. </tr>
  192. </table>
  193. <div class="clear"></div>
  194. </div>
  195. <table id="rentDataGrid">
  196. <thead>
  197. <tr>
  198. <th data-options="field:'contractName',sortable:true,width:155,formatter:contractNameFormatter">租赁合同名称</th>
  199. <th data-options="field:'contractNo',sortable:true,width:90,formatter:contractNoFormatter">租赁合同编号</th>
  200. <th data-options="field:'securityPersonName',sortable:true,width:80,formatter:securityPersonNameFormatter">租赁人</th>
  201. <th data-options="field:'houseAddress',sortable:true,width:120,formatter:houseAddressFormatter">租赁房屋</th>
  202. <th data-options="field:'rentMonthMoney',sortable:true,width:75">月租金</th>
  203. <th data-options="field:'rentMonth',sortable:true,width:50">收取月数</th>
  204. <th data-options="field:'rentMoney',sortable:true,width:75">收取总金额</th>
  205. <th data-options="field:'startDate',sortable:true,width:75,formatter:dateFormatter">租金开始日期</th>
  206. <th data-options="field:'endDate',sortable:true,width:75,formatter:dateFormatter">租金结束日期</th>
  207. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详情</th>
  208. <th data-options="field:'verify',align:'center',width:60,formatter:verifyFormatter">财务复核</th>
  209. </tr>
  210. </thead>
  211. </table>
  212. </div>
  213. </div>
  214. <div id="detailRentDialog" data-options="title:'&nbsp;租金收取详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/rentAction_toDetail'">
  215. </div>
  216. <div id="detailRentRemoveDialog" data-options="title:'&nbsp;租金退还详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/rentAction_toRemoveDetail'">
  217. </div>
  218. <div id="verifyRentDialog" data-options="title:'&nbsp;财务复核',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/rentAction_toVerify'">
  219. </div>
  220. <div id="verifyRentRemoveDialog" data-options="title:'&nbsp;财务复核',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/rentAction_toRemoveVerify'">
  221. </div>
  222. <script type="text/javascript">
  223. <!--
  224. parent.$.messager.progress('close');
  225. //-->
  226. </script>