socialSecurityStrategyList.jsp 10 KB

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