HrPortal.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. /*var spot = Ext.create('Ext.ux.Spotlight', {
  2. easing: 'easeOut',
  3. duration: 300
  4. });
  5. var updateSpot = function(id) {
  6. if (typeof id == 'string') {
  7. spot.show(id);
  8. } else if (!id && spot.active) {
  9. spot.hide();
  10. }
  11. /* p1.toggle(id == p1.id);
  12. p2.toggle(id == p2.id);
  13. p3.toggle(id == p3.id);
  14. };*/
  15. Ext.define('erp.view.sys.hr.HrPortal',{
  16. extend: 'Ext.panel.Panel',
  17. alias: 'widget.hrportal',
  18. id:'hrportal',
  19. labelSeparator : ':',
  20. buttonAlign : 'center',
  21. bodyStyle : 'background:#f9f9f9;',
  22. fieldDefaults : {
  23. msgTarget: 'none',
  24. blankText : $I18N.common.form.blankText
  25. },
  26. requires:['erp.view.sys.hr.GroupTabPanel','erp.view.sys.hr.DepartPanel','erp.view.sys.hr.JobGrid'],
  27. defaults:{
  28. xtype:'textfield',
  29. columnWidth:0.33,
  30. margin:'5 5 5 5'
  31. },
  32. layout:'fit',
  33. items: [{
  34. xtype: 'grouptabpanel',
  35. id:'hrgrouptabpanel',
  36. activeGroup: 0,
  37. items: [{
  38. mainItem: 1,
  39. activeItem:2,
  40. items: [{
  41. title: '财务核算部门',
  42. iconCls: 'x-icon-tickets',
  43. tabTip: '财务核算部门',
  44. //border: false,
  45. xtype: 'departpanel',
  46. margin: '10',
  47. height: null
  48. }, {
  49. title: '人事信息',
  50. border: false
  51. }, {
  52. title: '组织资料',
  53. iconCls: 'x-icon-subscriptions',
  54. tabTip: 'Subscriptions tabtip',
  55. //style: 'padding: 10px;',
  56. border: false,
  57. layout: 'border',
  58. items: [{
  59. xtype: 'toolbar',
  60. region:'north',
  61. ui: 'footer',
  62. items: [{
  63. text:'添加',
  64. tooltip:'添加新组织',
  65. iconCls:'btn-add',
  66. menu: {
  67. items: [{
  68. text: '顶层组织',
  69. iconCls:'btn-add',
  70. itemId:'topOrg'
  71. },{
  72. text: '添加组织',
  73. iconCls: 'btn-add',
  74. itemId: 'addOrg'
  75. }]
  76. }
  77. },'-', {
  78. text:'帮助',
  79. iconCls:'btn-help',
  80. tooltip:'帮助简介'
  81. },'->',{
  82. xtype:'tbtext',
  83. text:'<div style="color:gray;">带'+required+'为必填项</div>'
  84. },'-',{
  85. text:'添加岗位',
  86. itemId:'addjob',
  87. iconCls:'btn-add',
  88. tooltip:'添加新岗位'
  89. },'-',{
  90. text:'保&nbsp;&nbsp;存',
  91. itemId:'savejob',
  92. iconCls:'btn-save'
  93. },'-',{
  94. text:'取&nbsp;&nbsp;消',
  95. itemId:'canceljob',
  96. iconCls:'btn-cancel'
  97. }]
  98. },{
  99. region:'west',
  100. width:505,
  101. xtype:'orgtreepanel'
  102. },{
  103. xtype:'jobgrid',
  104. region:'center',
  105. storeAutoLoad:true
  106. //forceFit:true
  107. }]
  108. }, {
  109. title: '岗位信息',
  110. iconCls: 'x-icon-subscriptions',
  111. tabTip: '岗位信息维护',
  112. style: 'padding: 10px;',
  113. border: false,
  114. layout: 'fit',
  115. xtype:'jobgrid',
  116. id:'jobdetail',
  117. storeAutoLoad:false
  118. },{
  119. title: '人员资料',
  120. iconCls: 'x-icon-users',
  121. tabTip: '人员信息维护',
  122. style: 'padding: 10px;',
  123. xtype:'employeegrid',
  124. layout:'fit'
  125. }]
  126. }, {
  127. expanded: true,
  128. items: [{
  129. title: '权限资料',
  130. iconCls: 'x-icon-configuration',
  131. tabTip: '权限设置',
  132. style: 'padding: 10px;',
  133. layout:'border',
  134. id:'powerinfo',
  135. items:[{
  136. xtype: 'toolbar',
  137. region:'north',
  138. ui: 'footer',
  139. items: [{
  140. text:'权限分配',
  141. tooltip:'针对单个界面分配',
  142. iconCls:'btn-add',
  143. href :basePath+'jsps/ma/power.jsp'
  144. },'-',{
  145. text:'权限复制',
  146. iconCls:'btn-copy',
  147. itemId:'copypower',
  148. tooltip:'从标准权限库复制到对应岗位'
  149. },'-',{
  150. text:'刷新',
  151. iconCls:'btn-refresh',
  152. tooltip:'刷新数据',
  153. handler:function(btn){
  154. btn.ownerCt.ownerCt.down('powerjobgrid').getStore().load();
  155. }
  156. },'-', {
  157. text:'帮助',
  158. iconCls:'btn-help',
  159. tooltip:'帮助简介'
  160. }]
  161. },{
  162. region:'center',
  163. xtype:'powerjobgrid',
  164. id:'powerjobgrid',
  165. storeAutoLoad:false
  166. },{
  167. layout:'border',
  168. region:'east',
  169. width:410,
  170. items:[{
  171. region: 'north',
  172. height:400,
  173. split: true,
  174. title:'标准角色',
  175. xtype:'standardjobgrid'
  176. },{
  177. itemId: 'detailPanel',
  178. region: 'center',
  179. tpl:['<p><span style="font-weight:bold;">岗位名称:</span> {name}<p>',
  180. '<p><span style="font-weight:bold;">权限描述:</span> {description}</p>']
  181. }]
  182. }]
  183. }, {
  184. title: '审批流程',
  185. iconCls: 'x-icon-templates',
  186. tabTip: 'Templates tabtip',
  187. style: 'padding: 10px;',
  188. border: false,
  189. layout:'border',
  190. items: [{
  191. xtype:'jprocessgrid',
  192. region:'center',
  193. width:400
  194. },{
  195. region: 'east',
  196. flex:1,
  197. dockedItems: [{
  198. xtype: 'toolbar',
  199. ui: 'footer',
  200. padding: '0 0 5 0',
  201. items: [{
  202. xtype:'tbtext',
  203. text:'<span style="font-weight:bold;" >审批流程设置</span>'
  204. }]
  205. }],
  206. margins:'5 0 0 0',
  207. minSize: 175,
  208. maxSize: 400,
  209. xtype:'propertygrid',
  210. id:'jprocesssetgrid',
  211. customEditors: {
  212. evtStart: Ext.create('Ext.form.TimeField', {selectOnFocus: true})
  213. },
  214. propertyNames: {
  215. js_caller: '页面CALLER',
  216. js_formKeyName:'主表关键字',
  217. js_formStatusName:'状态字段',
  218. js_table:'流程对应表名',
  219. js_formDetailKey:'关联主表字段',
  220. js_decisionCondition:'分支条件字段',
  221. js_decisionVariables:'分支条件变量',
  222. js_formUrl:'表单路径',
  223. js_notefields:'备注字段',
  224. js_groupby:'分组字段',
  225. js_id:'ID',
  226. js_auditmethod:'审核方法'
  227. },
  228. source: {
  229. js_caller: 'CALLER',
  230. js_formKeyName:'',
  231. js_formStatusName:'',
  232. js_table:'',
  233. js_formDetailKey:'',
  234. js_decisionCondition:'',
  235. js_decisionVariables:'',
  236. js_formurl:'',
  237. js_notefields:'',
  238. js_groupby:''
  239. }
  240. }]
  241. }]
  242. }, {
  243. expanded: false,
  244. items: {
  245. title: '帮助资料',
  246. bodyPadding: 10,
  247. tpl:[
  248. '<p>{name}</p>'
  249. ],
  250. border: false
  251. }
  252. }]
  253. }],
  254. initComponent : function(){
  255. this.callParent(arguments);
  256. }
  257. });