providentFundStrategyList.jsp 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <link rel="stylesheet" type="text/css" href="css/commoncss.css"/>
  4. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  5. <div class="easyui-layout" fit="true">
  6. <div region="center" style="padding:0px;border:0px">
  7. <t:datagrid name="providentFundStrategyList" checkbox="false" fitColumns="true" title="公积金策略设定" actionUrl="providentFundStrategyController.do?datagrid" idField="id" fit="true" queryMode="group">
  8. <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
  9. <t:dgCol title="公积金策略名称" sortable="false" field="providentFundName" queryMode="single" width="150"></t:dgCol>
  10. <t:dgCol title="缴费基数(元)" style="text-align:right," sortable="false" field="basePay" query="false" queryMode="group" width="120"></t:dgCol>
  11. <t:dgCol title="单位缴费比例(%)" style="text-align:right," sortable="false" field="companyRatio" queryMode="single" width="120"></t:dgCol>
  12. <t:dgCol title="个人缴费比例(%)" style="text-align:right," sortable="false" field="personalRatio" queryMode="single" width="120"></t:dgCol>
  13. <t:dgCol title="适用开始时间" align="center" sortable="false" field="startTime" formatter="yyyy-MM-dd" query="false" queryMode="single" width="120"></t:dgCol>
  14. <t:dgCol title="适用结束时间" align="center" sortable="false" field="endTime" formatter="yyyy-MM-dd" query="false" queryMode="single" width="120"></t:dgCol>
  15. <t:dgCol title="状态" align="center" sortable="false" field="status" query="false" queryMode="single" dictionary="ableStatus" width="120"></t:dgCol>
  16. <t:dgCol title="备注" sortable="false" field="remark" queryMode="single" width="120"></t:dgCol>
  17. <t:dgCol title="逻辑删除标识" align="center" sortable="false" field="deleteFlag" hidden="true" queryMode="single" dictionary="del_flag" width="120"></t:dgCol>
  18. <t:dgCol title="操作" sortable="false" field="opt" width="100"></t:dgCol>
  19. <%-- <t:dgDelOpt title="删除" url="providentFundStrategyController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/> --%>
  20. <t:dgDelOpt title="删除" url="providentFundStrategyController.do?logicDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/>
  21. <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="providentFundStrategyController.do?goAdd" funname="add"></t:dgToolBar>
  22. <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="providentFundStrategyController.do?goUpdate" funname="update"></t:dgToolBar>
  23. <%-- <t:dgToolBar title="批量删除" icon="icon-remove" operationCode="remove" url="providentFundStrategyController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
  24. <%-- <t:dgToolBar title="查看" icon="icon-search" url="providentFundStrategyController.do?goUpdate" funname="detail"></t:dgToolBar> --%>
  25. <t:dgToolBar title="启用" icon="icon-enable" url="providentFundStrategyController.do?enable" funname="enableObj"></t:dgToolBar>
  26. <t:dgToolBar title="停用" icon="icon-disable" url="providentFundStrategyController.do?disable" funname="disableObj"></t:dgToolBar>
  27. <%-- <t:dgToolBar title="导入" icon="icon-putout" operationCode="put" funname="ImportXls"></t:dgToolBar> --%>
  28. <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
  29. <%-- <t:dgToolBar title="模板下载" icon="icon-putout" operationCode="putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  30. </t:datagrid>
  31. </div>
  32. <script>
  33. $(function() {
  34. var datagrid = $("#providentFundStrategyListtb");
  35. datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  36. $("#pinjie1").html('');
  37. datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  38. $("#pinjiechaxun1").html('');
  39. });
  40. </script>
  41. <div id="pinjie1">
  42. <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar">
  43. <table style="height:60px;padding:0px" cellpadding="0" cellspacing="1" >
  44. <tbody>
  45. <tr>
  46. <td align="right">
  47. <label class="Validform_label">
  48. 缴费基数范围:
  49. </label>
  50. </td>
  51. <td class="value" colspan="3">
  52. <input id="basePay_begin" name="basePay_begin" type="text" style="width: 150px" onkeyup="num1(this)" onBlur="onpay(1)" class="inputxt" placeholder="0.00"/>~
  53. <input id="basePay_end" name="basePay_end" type="text" style="width: 150px" onkeyup="num1(this)" onBlur="onpay(2)" class="inputxt" placeholder="0.00"/>
  54. </td>
  55. <td align="right" style="width: 74px;">
  56. <label class="Validform_label">
  57. 适用期间:
  58. </label>
  59. </td>
  60. <td class="value">
  61. <input id="startTime" name="startTime" type="text" style="width: 150px" class="Wdate"
  62. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endTime\')}'})" readonly="readonly" placeholder="yyyy-MM-dd"/>~
  63. <input id="endTime" name="endTime" type="text" style="width: 150px" class="Wdate"
  64. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startTime\')}'})" readonly="readonly" placeholder="yyyy-MM-dd"/>
  65. </td>
  66. <td align="right" style="width: 74px;">
  67. <label class="Validform_label">
  68. 状态:
  69. </label>
  70. </td>
  71. <td class="value">
  72. <t:dictSelect field="status" type="select" typeGroupCode="ableStatus" hasLabel="false" title="状态" ></t:dictSelect>
  73. </td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. <div id="pinjiechaxun1">
  80. <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar">
  81. <div style="float: right;">
  82. <span>
  83. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="personnelBaseArchivesManageSearch" onclick="providentFundStrategyListsearch()">查询</a>
  84. </span>
  85. <span>
  86. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="personnelBaseArchivesManageRedo" onclick="searchReset('providentFundStrategyList')">重置</a>
  87. </span>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <script src = "webpage/cn/com/lzt/providentfundstrategy/providentFundStrategyList.js"></script>
  93. <script type="text/javascript">
  94. //导入
  95. function ImportXls() {
  96. openuploadwin('Excel导入', 'providentFundStrategyController.do?upload', "providentFundStrategyList");
  97. }
  98. //导出
  99. function ExportXls() {
  100. JeecgExcelExport("providentFundStrategyController.do?exportXls","providentFundStrategyList");
  101. }
  102. //模板下载
  103. function ExportXlsByT() {
  104. JeecgExcelExport("providentFundStrategyController.do?exportXlsByT","providentFundStrategyList");
  105. }
  106. //新增
  107. function add(title,url,id){
  108. window.location.href=url;
  109. }
  110. //修改
  111. function update(title,url, id){
  112. updateNotCreateWin("修改",url, "providentFundStrategyList",false);
  113. }
  114. //查看
  115. function view(title,url, id){
  116. viewNotCreateWin("查看",url, "providentFundStrategyList",false);
  117. }
  118. function enableObj(title,url, id) {
  119. gridname=id;
  120. var rowsData = $('#'+id).datagrid('getSelections');
  121. if (!rowsData || rowsData.length==0) {
  122. tip('<t:mutiLang langKey="common.please.select.edit.item"/>');
  123. return;
  124. }
  125. url += '&id='+rowsData[0].id;
  126. $.dialog.confirm('<t:mutiLang langKey="确定要启用此公积金策略吗?"/>', function(){
  127. lockuploadify(url, '&id');
  128. }, function(){
  129. });
  130. }
  131. function disableObj(title,url, id) {
  132. gridname=id;
  133. var rowsData = $('#'+id).datagrid('getSelections');
  134. if (!rowsData || rowsData.length==0) {
  135. tip('<t:mutiLang langKey="common.please.select.edit.item"/>');
  136. return;
  137. }
  138. url += '&id='+rowsData[0].id;
  139. $.dialog.confirm('<t:mutiLang langKey="确定要停用此公积金策略吗?"/>', function(){
  140. lockuploadify(url, '&id');
  141. }, function(){
  142. });
  143. }
  144. function lockuploadify(url, id) {
  145. $.ajax({
  146. async : false,
  147. cache : false,
  148. type : 'POST',
  149. url : url,// 请求的action路径
  150. error : function() {// 请求失败处理函数
  151. },
  152. success : function(data) {
  153. var d = data; // ------ $.parseJSON(data);
  154. if (d.success) {
  155. var msg = d.msg;
  156. tip(msg);
  157. reloadTable();
  158. }
  159. }
  160. });
  161. }
  162. function num1(obj){
  163. obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
  164. obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字
  165. obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个, 清除多余的
  166. obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
  167. obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数
  168. }
  169. function onpay(type){
  170. var basePay_begin = $("#basePay_begin").val();
  171. var basePay_end = $("#basePay_end").val();
  172. if(basePay_end != '' && basePay_begin != ''){
  173. if(basePay_begin > basePay_end){
  174. tip("缴费基数范围输入有误");
  175. $("#basePay_begin").val("");
  176. $("#basePay_end").val("");
  177. }
  178. }
  179. }
  180. </script>