rock_page_userinfo.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * 模块:userinfo.人员档案
  4. * 说明:自定义区域内可写你想要的代码
  5. * 来源:流程模块→表单元素管理→[模块.人员档案]→生成列表页
  6. */
  7. defined('HOST') or die ('not access');
  8. ?>
  9. <script>
  10. $(document).ready(function(){
  11. {params}
  12. var modenum = 'userinfo',modename='人员档案',isflow=0,modeid='29',atype = params.atype,pnum=params.pnum,modenames='工作经历,教育经历',listname='dXNlcmluZm8:';
  13. if(!atype)atype='';if(!pnum)pnum='';
  14. var fieldsarr = [],fieldsselarr= [],chufarr= [];
  15. <?php
  16. include_once('webmain/flow/page/rock_page.php');
  17. ?>
  18. //[自定义区域start]
  19. if(atype=='all'){
  20. $('#tdright_{rand}').prepend(c.getbtnstr('人员状态编辑','bianjila','','disabled')+'&nbsp;&nbsp;');
  21. $('#tdright_{rand}').prepend(c.getbtnstr('更新数据','gengxin','success')+'&nbsp;&nbsp;');
  22. c.gengxin=function(){
  23. js.msg('wait', '更新中...');
  24. $.get(js.getajaxurl('updatedata','admin','system'), function(da){
  25. js.msg('success', da);
  26. a.reload();
  27. });
  28. }
  29. c.bianjila=function(){
  30. var h = $.bootsform({
  31. title:'人员状态编辑',height:400,width:400,
  32. tablename:bootparams.tablename,isedit:1,
  33. url:this.getacturl('publicsave'),aftersaveaction:'userstateafter',
  34. submitfields:'workdate,state,quitdt,syenddt,positivedt',
  35. items:[{
  36. labelText:'名称',name:'name'
  37. },{
  38. labelText:'人员状态',name:'state',type:'select',valuefields:'id',displayfields:'name',store:a.getData('statearr'),required:true
  39. },{
  40. labelText:'入职日期',name:'workdate',type:'date',required:true
  41. },{
  42. labelText:'离职日期',name:'quitdt',type:'date'
  43. },{
  44. labelText:'试用期到',name:'syenddt',type:'date'
  45. },{
  46. labelText:'转正日期',name:'positivedt',type:'date'
  47. }],
  48. success:function(){
  49. a.reload();
  50. }
  51. });
  52. h.setValues(a.changedata);
  53. h.setValue('name',a.changedata.name);
  54. h.setValue('state',a.changedata.stateval);
  55. h.isValid();
  56. return h;
  57. }
  58. bootparams.itemclick=function(){
  59. get('btnbianjila_{rand}').disabled=false;
  60. }
  61. bootparams.beforeload=function(){
  62. get('btnbianjila_{rand}').disabled=true;
  63. }
  64. c.initpage=function(){
  65. a.settishi('<div class="tishi">添加人员档案请到[用户管理]那添加,删除档案,需要先删除用户在删除档案。</div>');
  66. }
  67. var showdept = false;//是否显示左边部门
  68. if(showdept){
  69. bootparams.params.showdept='1';
  70. var shtm = '<table width="100%"><tr valign="top"><td><div style="border:1px #cccccc solid;width:220px"><div id="optionview_{rand}" style="height:'+(viewheight-90)+'px;overflow:auto;"></div></div></td><td width="8" nowrap><div style="width:8px;overflow:hidden"></div></td><td width="95%"><div id="viewuserinfo_{rand}"></div></td></tr></table>';
  71. $('#viewuserinfo_{rand}').after(shtm).remove();
  72. var at = $('#optionview_{rand}').bootstree({
  73. url:false,autoLoad:false,
  74. columns:[{
  75. text:'部门',dataIndex:'name',align:'left',xtype:'treecolumn'
  76. }],
  77. itemdblclick:function(d){
  78. a.setparams({'search_value':'d'+d.id+'','search_fields':'id'}, true);
  79. }
  80. });
  81. c.onloadbefore=function(d){
  82. if(d.deptdata)at.loadData(d.deptdata);
  83. }
  84. }
  85. }
  86. $('#tdleft_{rand}').hide();
  87. //[自定义区域end]
  88. c.initpagebefore();
  89. js.initbtn(c);
  90. var a = $('#view'+modenum+'_{rand}').bootstable(bootparams);
  91. c.init();
  92. });
  93. </script>
  94. <!--SCRIPTend-->
  95. <!--HTMLstart-->
  96. <div>
  97. <table width="100%">
  98. <tr>
  99. <td style="padding-right:10px;" id="tdleft_{rand}" nowrap><button id="addbtn_{rand}" class="btn btn-primary" click="clickwin,0" disabled type="button"><i class="icon-plus"></i> 新增</button></td>
  100. <td><select class="form-control" style="width:110px;border-top-right-radius:0;border-bottom-right-radius:0;padding:0 2px" id="fields_{rand}"></select></td>
  101. <td><select class="form-control" style="width:60px;border-radius:0px;border-left:0;padding:0 2px" id="like_{rand}"><option value="0">包含</option><option value="1">等于</option><option value="2">大于等于</option><option value="3">小于等于</option><option value="4">不包含</option></select></td>
  102. <td><select class="form-control" style="width:130px;border-radius:0;border-left:0;display:none;padding:0 5px" id="selkey_{rand}"><option value="">-请选择-</option></select><input class="form-control" style="width:130px;border-radius:0;border-left:0;padding:0 5px" id="keygj_{rand}" placeholder="关键词"><input class="form-control" style="width:130px;border-radius:0;border-left:0;padding:0 5px;display:none;" id="key_{rand}" placeholder="关键字">
  103. </td>
  104. <td><select class="form-control" style="width:120px;border-left:0;border-radius:0;" id="selstatus_{rand}"><option value="">-全部状态-</option><option style="color:" value="0">试用期</option><option style="color:" value="1">正式</option><option style="color:" value="2">实习生</option><option style="color:" value="3">兼职</option><option style="color:" value="4">临时工</option><option style="color:" value="5">离职</option></select></td>
  105. <td>
  106. <div style="white-space:nowrap">
  107. <button style="border-right:0;border-radius:0;border-left:0" class="btn btn-default" click="searchbtn" type="button">搜索</button><button class="btn btn-default" id="downbtn_{rand}" type="button" style="padding-left:8px;padding-right:8px;border-top-left-radius:0;border-bottom-left-radius:0"><i class="icon-angle-down"></i></button>
  108. </div>
  109. </td>
  110. <td width="90%" style="padding-left:10px"><div id="changatype{rand}" class="btn-group"></div></td>
  111. <td align="right" id="tdright_{rand}" nowrap>
  112. <span style="display:none" id="daoruspan_{rand}"><button class="btn btn-default" click="daoru,1" type="button">导入</button>&nbsp;&nbsp;&nbsp;</span><button class="btn btn-default" style="display:none" id="daobtn_{rand}" disabled click="daochu" type="button">导出 <i class="icon-angle-down"></i></button>
  113. </td>
  114. </tr>
  115. </table>
  116. </div>
  117. <div class="blank10"></div>
  118. <div id="viewuserinfo_{rand}"></div>
  119. <!--HTMLend-->
粤ICP备19079148号