AutoJprocess.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Ext.define('erp.view.ma.jprocess.AutoJprocess',{
  2. extend: 'Ext.Viewport',
  3. hideBorders: true,
  4. initComponent : function(){
  5. var me = this;
  6. Ext.apply(me, {
  7. items: [{
  8. id: 'Viewport',
  9. layout: 'auto',
  10. autoScroll: true,
  11. xtype: 'panel',
  12. style: {
  13. background: '#FFFFFF'
  14. },
  15. items: [{
  16. id: 'app-header',
  17. xtype: 'box',
  18. height: 5,
  19. style: 'background: #D4D4D4;color: #596F8F;font-size: 16px;font-weight: 200;padding: 5px 5px;text-shadow: 0 1px 0 #fff'
  20. },{
  21. xtype: 'toolbar',
  22. id: 'currentNodeToolbar',
  23. layout: {
  24. type: 'hbox',
  25. align: 'right'
  26. },
  27. bodyStyle: {
  28. background: "#D4D4D4",
  29. border: 'none'
  30. },
  31. style: {
  32. background: "#D4D4D4",
  33. border: 'none'
  34. },
  35. items: [
  36. '->', {
  37. xtype: 'tbtext',
  38. id: 'label1',
  39. text: '<span style="font-weight: bold !important;font-size:18px">'+title+'</span>'
  40. },'->']
  41. },{
  42. xtype:'tabpanel',
  43. bodyStyle:{
  44. border:'none'
  45. },
  46. bodyBorder:false,
  47. items: [{
  48. title:'基本信息',
  49. layout:'anchor',
  50. iconCls: 'main-msg',
  51. items:[{
  52. xtype: 'erpFormPanel',
  53. _noc:1,
  54. height:window.innerHeight*0.85,
  55. realCaller:CodeCaller,
  56. NoButton:true,
  57. saveUrl: 'common/saveAutoJprocess.action?_noc=1&caller='+CodeCaller,
  58. deleteUrl: 'common/deleteAutoJprocess.action?_noc=1&caller='+CodeCaller,
  59. updateUrl: 'common/updateAutoJprocess.action?_noc=1&caller='+CodeCaller,
  60. auditUrl: 'common/auditAutoJprocess.action?caller='+CodeCaller,
  61. resAuditUrl: 'common/resAuditAutoJprocess.action?caller='+CodeCaller,
  62. submitUrl: 'common/submitAutoJprocess.action?caller='+CodeCaller+"&_noc=1",
  63. resSubmitUrl: 'common/resSubmitAutoJprocess.action?caller='+CodeCaller+"&_noc=1",
  64. getIdUrl: 'common/getId.action?seq=JPROCESSTEMPLATE_SEQ',//存在同一张表公用一个序列号
  65. keyField: 'ap_id',
  66. statuscodeField: 'ap_statuscode',
  67. codeField:'ap_code',
  68. params:params
  69. }]
  70. },{
  71. title:'审批内容',
  72. layout:'anchor',
  73. iconCls:'x-button-icon-content',
  74. height:window.innerHeight*0.85,
  75. items:[{
  76. xtype:'htmleditor',
  77. anchor:'100% 100%'
  78. }],
  79. id:'clobtext'
  80. },{
  81. title:'审批流程',
  82. height:window.innerHeight*0.85,
  83. iconCls:'x-button-icon-install',
  84. id:'workflow'
  85. }],
  86. dockedItems: [{
  87. xtype: 'toolbar',
  88. dock: 'bottom',
  89. items: me.getButtons()
  90. }]
  91. }]
  92. }]
  93. });
  94. me.callParent(arguments);
  95. },
  96. getButtons:function (){
  97. var NoButton=getUrlParam('NoButton');
  98. var buttons=new Array();
  99. if(type!=1){
  100. buttons=['->',{
  101. xtype: 'erpSaveButton'
  102. },{
  103. xtype:'erpCloseButton'
  104. },'->'];
  105. }else
  106. buttons=['->',{
  107. xtype: 'erpAddButton'
  108. },{
  109. xtype: 'erpUpdateButton',
  110. itemId:'update',
  111. hidden:true
  112. },{
  113. xtype: 'erpDeleteButton',
  114. itemId:'delete',
  115. hidden:true
  116. },{
  117. xtype:'erpSubmitButton',
  118. itemId:'submit',
  119. hidden:true
  120. },{
  121. xtype:'erpResSubmitButton',
  122. itemId:'resSubmit',
  123. hidden:true
  124. },{
  125. xtype:'erpAuditButton',
  126. itemId:'audit',
  127. hidden:true
  128. },{
  129. xtype:'erpResAuditButton',
  130. itemId:'resAudit',
  131. hidden:true
  132. },{
  133. xtype:'erpCloseButton'
  134. },'->'];
  135. return buttons;
  136. }
  137. });