queryByCertList.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@include file="/context/mytags.jsp"%>
  4. <t:base type="jquery,easyui,tools,DatePicker,autocomplete"></t:base>
  5. <div class="easyui-layout" fit="true">
  6. <div region="center" style="padding: 0px; border: 0px">
  7. <t:datagrid name="queryList" checkbox="false" fitColumns="false"
  8. title="按证书统计" actionUrl="dbQueryUserController.do?queryByCertDatagrid"
  9. idField="id" fit="true" queryMode="group">
  10. <t:dgCol title="主键" field="pid" hidden="true" queryMode="single"
  11. width="210"></t:dgCol>
  12. <t:dgCol title="项目名称" field="departname" sortable="false"
  13. queryMode="single" width="320"></t:dgCol>
  14. <t:dgCol title="项目在职人数" field="total" query="false" sortable="false"
  15. queryMode="single" width="220"></t:dgCol>
  16. <t:dgCol title="证书" field="certId" queryMode="single" query="true" hidden="true" dictionary="t_bus_certificate_subsidy,id,certificate_name, and delete_flag='0'"
  17. width="220"></t:dgCol>
  18. <t:dgCol title="" field="certName" queryMode="single" hidden="true"
  19. width="220"></t:dgCol>
  20. <t:dgCol title="持有证书人数" field="certCount" query="false" sortable="false"
  21. queryMode="group" width="220"></t:dgCol>
  22. <t:dgCol title="百分比" field="percent" query="false" formatterjs="customFmatter" sortable="false"
  23. queryMode="group" width="220"></t:dgCol>
  24. <%-- <t:dgCol title="操作" sortable="false" field="opt" width="300"></t:dgCol> --%>
  25. <%-- <t:dgFunOpt title="开启" funname="enableObj(id,bpmStatus)" urlclass="ace_button" urlfont="fa-cog"></t:dgFunOpt> --%>
  26. <%-- <t:dgFunOpt title="离职报告下载" funname="downloadFile(id)" urlclass="ace_button" urlfont="fa-check" ></t:dgFunOpt> --%>
  27. <%-- <t:dgFunOpt exp="bpmStatus#eq#1" urlclass="ace_button" urlfont="fa-cog" funname="startUserDefinedProcess(id,bpmStatus,applicantId)" title="提交流程" /> --%>
  28. <%-- <t:dgFunOpt exp="bpmStatus#ne#1" urlclass="ace_button" urlfont="fa-cog" funname="startus(id,procInstId)" title="查看流程" /> --%>
  29. <%-- <t:dgFunOpt exp="bpmStatus#eq#2" urlclass="ace_button" urlfont="fa-cog" funname="startusr(id,procInstId,bpmStatus,reject,iamApplyUser,applicantId)" title="撤回流程" /> --%>
  30. <%-- <t:dgDelOpt title="删除" url="dbQueryUserController.do?doDel&id={id}" urlclass="ace_button" urlfont="fa-trash-o"/> --%>
  31. <%-- <t:dgToolBar title="录入" icon="icon-add" operationCode="add" url="dbQueryUserController.do?goAdd" funname="add"></t:dgToolBar> --%>
  32. <%-- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="dbQueryUserController.do?goUpdate" funname="update"></t:dgToolBar> --%>
  33. <%-- <t:dgToolBar title="删除" icon="icon-remove" operationCode="remove" url="dbQueryUserController.do?logicDel" funname="deleteObj"></t:dgToolBar> --%>
  34. <%-- <t:dgToolBar title="查看" icon="icon-view" url="dbQueryUserController.do?goview" funname="goview"></t:dgToolBar> --%>
  35. <%-- <t:dgToolBar title="定时" icon="icon-search" url="dbQueryUserController.do?modify" funname="modify"></t:dgToolBar> --%>
  36. <%-- <t:dgToolBar title="撤销" icon="icon-edit" operationCode="edit" url="dbQueryUserController.do?disable" funname="disableObj"></t:dgToolBar> --%>
  37. <%-- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar> --%>
  38. </t:datagrid>
  39. </div>
  40. <span style="display:-moz-inline-box;display:inline-block;" id="entryNameSearch">
  41. <span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;text-overflow:ellipsis;-o-text-overflow:ellipsis; overflow: hidden;white-space:nowrap; " title="项目名称">项目名称:</span>
  42. <t:autocomplete entityName="TSDepart" name="departname"
  43. searchField="glcname" labelField="glcname" valueField="glcname" hiddenInputId="glcname" width="150"
  44. groupBy="glcname"
  45. scrollWidth="400" scrollHeight="400"></t:autocomplete>
  46. </span>
  47. <script>
  48. $(document).ready(function(){
  49. $('#queryListForm').append($('#entryNameSearch'));
  50. });
  51. var _gridId='queryList';
  52. // $(function() {
  53. // var datagrid = $("#queryListtb");
  54. // datagrid.prepend($("#pinjie1 div[name='pinjie2']").html());
  55. // $("#pinjie1").html('');
  56. // datagrid.children(".datagrid-toolbar").children("span:first").after($("#pinjiechaxun1 div[name='pinjiechaxun2']").html());
  57. // $("#pinjiechaxun1").html('');
  58. // });
  59. function customFmatter(cellvalue, options, rowObject){
  60. cellvalue = cellvalue * 100;
  61. cellvalue = changeTwoDecimal_f(cellvalue);
  62. return ""+cellvalue+" %";
  63. };
  64. function changeTwoDecimal_f(x) {
  65. var f_x = parseFloat(x);
  66. if (isNaN(f_x)) {
  67. alert('function:changeTwoDecimal->parameter error');
  68. return false;
  69. }
  70. var f_x = Math.round(x * 100) / 100;
  71. var s_x = f_x.toString();
  72. var pos_decimal = s_x.indexOf('.');
  73. if (pos_decimal < 0) {
  74. pos_decimal = s_x.length;
  75. s_x += '.';
  76. }
  77. while (s_x.length <= pos_decimal + 2) {
  78. s_x += '0';
  79. }
  80. return s_x;
  81. }
  82. </script>
  83. <!-- <div id="pinjie1"> -->
  84. <!-- <div name="pinjie2" style="padding:3px; height: auto" class="datagrid-toolbar"> -->
  85. <!-- <table style="height:85px;padding:0px" cellpadding="0" cellspacing="1" > -->
  86. <!-- <tbody> -->
  87. <!-- <tr> -->
  88. <!-- <td align="right" style="width: 74px;"> -->
  89. <!-- <label class="Validform_label"> -->
  90. <!-- 员工姓名: -->
  91. <!-- </label> -->
  92. <!-- </td> -->
  93. <!-- <td class="value"> -->
  94. <!-- <input id="realname" name="realname" type="text" style="width: 157px; " class="inputxt" placeholder="请输入员工姓名"> -->
  95. <!-- </td> -->
  96. <!-- <td align="right" style="width: 74px;"> -->
  97. <!-- <label class="Validform_label"> -->
  98. <!-- 申请状态: -->
  99. <!-- </label> -->
  100. <!-- </td> -->
  101. <!-- <td class="value"> -->
  102. <%-- <t:dictSelect field="bpmStatus" type="select" typeGroupCode="bpm_status" hasLabel="false" title="申请状态" ></t:dictSelect> --%>
  103. <!-- </td> -->
  104. <!-- <td align="right" style="width: 74px;"> -->
  105. <!-- <label class="Validform_label"> -->
  106. <!-- 所属单位: -->
  107. <!-- </label> -->
  108. <!-- </td> -->
  109. <!-- <td class="value" colspan="3"> -->
  110. <!-- <input readonly="true" type="text" id="departname" name="departname" style="width: 157px" placeholder="请选择所属单位" onclick="openDepartmentSelect()"> -->
  111. <!-- <input id="orgIds" name="orgIds" type="hidden" value=""> -->
  112. <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch" onclick="openDepartmentSelect()">选择</a> -->
  113. <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-clean" id="departRedo" onclick="callbackClean()">清空</a> -->
  114. <!-- </td> -->
  115. <!-- </tr> -->
  116. <!-- <tr> -->
  117. <!-- <td align="right"> -->
  118. <!-- <label class="Validform_label"> -->
  119. <!-- 申请日期: -->
  120. <!-- </label> -->
  121. <!-- </td> -->
  122. <!-- <td class="value" colspan="3"> -->
  123. <!-- <input id="applyDate_begin" name="applyDate_begin" type="text" style="width: 150px" class="Wdate" -->
  124. <!-- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'applyDate_end\')}'})" readonly="readonly" placeholder="yyyy-MM-dd"/>~ -->
  125. <!-- <input id="applyDate_end" name="applyDate_end" type="text" style="width: 150px" class="Wdate" -->
  126. <!-- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'applyDate_begin\')}'})" readonly="readonly" placeholder="yyyy-MM-dd"/> -->
  127. <!-- </td> -->
  128. <!-- <td align="right"> -->
  129. <!-- <label class="Validform_label"> -->
  130. <!-- 离职日期: -->
  131. <!-- </label> -->
  132. <!-- </td> -->
  133. <!-- <td class="value"> -->
  134. <!-- <input id="leaveDate_begin" name="leaveDate_begin" type="text" style="width: 150px" class="Wdate" -->
  135. <!-- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'leaveDate_end\')}'})" readonly="readonly" placeholder="yyyy-MM-dd"/>~ -->
  136. <!-- <input id="leaveDate_end" name="leaveDate_end" type="text" style="width: 150px" class="Wdate" -->
  137. <!-- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'leaveDate_begin\')}'})" readonly="readonly" placeholder="yyyy-MM-dd"/> -->
  138. <!-- </td> -->
  139. <!-- <td align="right" style="width: 74px;"> -->
  140. <!-- <label class="Validform_label"> -->
  141. <!-- 离职类型: -->
  142. <!-- </label> -->
  143. <!-- </td> -->
  144. <!-- <td class="value"> -->
  145. <%-- <t:dictSelect field="leaveType" type="select" typeGroupCode="outType" hasLabel="false" title="离职类型" ></t:dictSelect> --%>
  146. <!-- </td> -->
  147. <!-- </tr> -->
  148. <!-- </tbody> -->
  149. <!-- </table> -->
  150. <!-- </div> -->
  151. <!-- </div> -->
  152. <!-- <div id="pinjiechaxun1"> -->
  153. <!-- <div name="pinjiechaxun2" style="padding:3px; height: auto" class="datagrid-toolbar"> -->
  154. <!-- <div style="float: right;"> -->
  155. <!-- <span> -->
  156. <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="personnelBaseArchivesManageSearch" onclick="queryListsearch()">查询</a> -->
  157. <!-- </span> -->
  158. <!-- <span> -->
  159. <!-- <a href="#" class="easyui-linkbutton" plain="true" icon="icon-reload " id="personnelBaseArchivesManageRedo" onclick="searchReset('queryList')">重置</a> -->
  160. <!-- </span> -->
  161. <!-- </div> -->
  162. <!-- </div> -->
  163. <!-- </div> -->
  164. <!-- </div> -->
  165. <!-- <script src = "webpage/cn/com/lzt/leave/queryList.js"></script> -->
  166. <script type="text/javascript">
  167. //导入
  168. function ImportXls() {
  169. openuploadwin('Excel导入', 'dbQueryUserController.do?upload',
  170. "queryList");
  171. }
  172. //导出
  173. function ExportXls() {
  174. JeecgExcelExport("dbQueryUserController.do?exportXls", "queryList");
  175. }
  176. //模板下载
  177. function ExportXlsByT() {
  178. JeecgExcelExport("dbQueryUserController.do?exportXlsByT",
  179. "queryList");
  180. }
  181. //新增
  182. function add(title, url, id) {
  183. window.location.href = url
  184. }
  185. //修改
  186. function update(title, url, id) {
  187. var rowsData = $('#' + id).datagrid('getSelections');
  188. if (!rowsData || rowsData.length == 0) {
  189. layer.alert('请选中一条数据');
  190. return;
  191. }
  192. /* if(rowsData[0].bpmStatus != 1){
  193. layer.alert('<t:mutiLang langKey="只有状态为<待提交>时才可进行<修改>操作"/>');
  194. return;
  195. } */
  196. if (rowsData[0].bpmStatus == 2) {
  197. layer.alert('<t:mutiLang langKey="申请处理中不可编辑"/>');
  198. return;
  199. } else if (rowsData[0].bpmStatus == 3) {
  200. layer.alert('<t:mutiLang langKey="申请已完成不可编辑"/>');
  201. return;
  202. }
  203. /* if(rowsData[0].applicantId != $("#user").val()){
  204. layer.alert('您无权限操作该数据!');
  205. return;
  206. } */
  207. updateNotCreateWin("修改", url, "queryList", false);
  208. }
  209. //查看
  210. function view(title, url, id) {
  211. viewNotCreateWin("查看", url, "queryList", false)
  212. }
  213. //新增
  214. function goview(title, url, id) {
  215. var rowsData = $('#' + id).datagrid('getSelections');
  216. if (!rowsData || rowsData.length == 0) {
  217. layer.alert('请选中一条数据');
  218. return;
  219. }
  220. window.location.href = url + '&id=' + rowsData[0].id + '&typeid='
  221. + rowsData[0].transferType;
  222. }
  223. function openDepartmentSelect() {
  224. $.dialog.setting.zIndex = getzIndex();
  225. var orgIds = $("#orgIds").val();
  226. // 查询所有组织结构
  227. $
  228. .dialog(
  229. {
  230. content : 'url:departController.do?departSelect&orgIds='
  231. + orgIds,
  232. zIndex : getzIndex(),
  233. title : '所属部门列表',
  234. lock : true,
  235. width : '400px',
  236. height : '350px',
  237. opacity : 0.4,
  238. button : [
  239. {
  240. name : '<t:mutiLang langKey="common.confirm"/>',
  241. callback : callbackDepartmentSelect,
  242. focus : true
  243. },
  244. {
  245. name : '<t:mutiLang langKey="common.cancel"/>',
  246. callback : function() {
  247. }
  248. } ]
  249. }).zindex();
  250. }
  251. function callbackDepartmentSelect() {
  252. // 查询所有组织结构
  253. var iframe = this.iframe.contentWindow;
  254. var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
  255. var nodes = treeObj.getCheckedNodes(true);
  256. if (nodes.length > 0) {
  257. var ids = '', names = '';
  258. for (i = 0; i < nodes.length; i++) {
  259. var node = nodes[i];
  260. ids += node.id + ',';
  261. names += node.name + ',';
  262. }
  263. $('#departname').val(names);
  264. $('#departname').blur();
  265. $('#orgIds').val(ids);
  266. }
  267. }
  268. function callbackClean() {
  269. $('#departname').val('');
  270. $('#orgIds').val('');
  271. }
  272. </script>