Feature.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. Ext.define('erp.view.pm.bom.Feature',{
  2. extend: 'Ext.Viewport',
  3. layout: 'fit',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. id:'FeatureViewport',
  10. layout: 'anchor',
  11. items: [{
  12. xtype: 'erpFormPanel',
  13. anchor: '100% 28%',
  14. saveUrl: 'pm/bom/saveFeature.action',
  15. deleteUrl: 'pm/bom/deleteFeature.action',
  16. updateUrl: 'pm/bom/updateFeature.action',
  17. auditUrl: 'pm/bom/auditFeature.action',
  18. resAuditUrl: 'pm/bom/resAuditFeature.action',
  19. submitUrl: 'pm/bom/submitFeature.action',
  20. resSubmitUrl: 'pm/bom/resSubmitFeature.action',
  21. getIdUrl: 'common/getId.action?seq=FEATURE_SEQ',
  22. keyField: 'fe_id',
  23. fename:'',//记录初始特征名称
  24. codeField: 'fe_code',
  25. },{
  26. xtype: 'erpGridPanel2',
  27. anchor: '100% 40%',
  28. id:'grid',
  29. // title:'允许特征值列表',
  30. caller:'FeatureDetail',
  31. detno: 'fd_detno',
  32. keyField: 'fd_id',
  33. mainField: 'fd_feid',
  34. necessaryField: 'fd_value',
  35. plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
  36. clicksToEdit: 1
  37. })],
  38. tbar:[{
  39. xtype:'tbtext',
  40. text:'允许特征值列表',
  41. // readOnly: true,
  42. // fieldStyle: 'background:#EAEAEA;padding:2px 2px;vertical-align:middle;border-top:none;border-right:none;color:blue;border-bottom:none;border-left:none; '
  43. },'->',{
  44. xtype:'button',
  45. id: 'toyf',
  46. text:'转研发'
  47. },'-',{
  48. xtype:'button',
  49. id: 'tobz',
  50. text:'转标准'
  51. },'-',{
  52. xtype:'button',
  53. id:'addDetail',
  54. text:'新增明细'
  55. },'-',{
  56. xtype:'button',
  57. id:'forbidden',
  58. text:'禁用明细'
  59. },'-',{
  60. xtype:'button',
  61. id:'noforbidden',
  62. text:'反禁用明细'
  63. },'-',{
  64. xtype:'button',
  65. id:'updateRemark',
  66. text:'修改明细备注'
  67. },'-',{
  68. xtype:'button',
  69. id:'updateSpec',
  70. text:'修改规格描述'
  71. }]
  72. },{
  73. xtype: 'erpGridPanel2',
  74. anchor: '100% 32%',
  75. layout:'fit',
  76. // title:'与其它特征的约束关系表',
  77. caller:'FeatureRelation',
  78. id:'grid2',
  79. detno: 'fr_detno',
  80. keyField: 'fr_id',
  81. condition: getUrlParam('gridCondition')==null? null : 'fr_feid=' + getUrlParam('gridCondition').split('IS')[1],
  82. mainField: 'fr_feid',
  83. necessaryField: 'fr_value',
  84. bbar:{},
  85. tbar:[{
  86. xtype:'tbtext',
  87. // readOnly: true,
  88. text:'与其它特征的约束关系表',
  89. // fieldStyle: 'background:#EAEAEA;padding:2px 2px;vertical-align:middle;border-top:none;border-right:none;color:blue;border-bottom:none;border-left:none; '
  90. },'->',{
  91. xtype:'button',
  92. text:'新增约束',
  93. id:'addRelation'
  94. },'-',{
  95. xtype:'button',
  96. text:'禁用约束',
  97. id:'offRelation'
  98. }]
  99. }]
  100. }]
  101. });
  102. me.callParent(arguments);
  103. }
  104. });