BasePanel.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. Ext.define('saas.view.document.bom.BasePanel', {
  2. extend: 'saas.view.core.base.BasePanel',
  3. xtype: 'document-bom-basepanel',
  4. controller: 'document-bom-basepanel',
  5. viewModel: 'document-bom-basepanel',
  6. deleteMoreMsg: '删除的BOM资料将不能恢复,请确认是否删除?',
  7. deleteOneMsg: '删除的BOM资料将不能恢复,请确认是否删除?',
  8. searchField:[{
  9. xtype : "textfield",
  10. name : "bo_mothercode",
  11. width:200,
  12. emptyText:'请输入产品编号或名称',
  13. getCondition: function(value) {
  14. return ' (bo_mothername like\'%' + value + '%\''
  15. +' or bo_mothercode like \'%'+value+'%\' ) ';
  16. }
  17. },{
  18. xtype : "textfield",
  19. name : "bo_version",
  20. fieldLabel:'版本'
  21. },{
  22. xtype: 'combobox',
  23. name: 'bo_statuscode',
  24. queryMode: 'local',
  25. displayField: 'bo_status',
  26. valueField: 'bo_statuscode',
  27. fieldLabel :'状态',
  28. editable:false,
  29. store: Ext.create('Ext.data.ArrayStore', {
  30. fields: ['bo_statuscode', 'bo_status'],
  31. data: [
  32. ["ALL", "全部"],
  33. ["ENABLE", "已启用"],
  34. ["BANNED", "已禁用"]
  35. ]
  36. }),
  37. getCondition: function(value) {
  38. if(value == 'ALL'||value==null) {
  39. return '1=1';
  40. }else {
  41. return 'bo_statuscode=\'' + value + '\'';
  42. }
  43. }
  44. }],
  45. //字段属性
  46. _formXtype:'document-bom-formpanel',
  47. _title:'BOM资料',
  48. _deleteUrl:'/api/document/bom/delete',
  49. _batchOpenUrl:'/api/document/bom/batchOpen',
  50. _batchCloseUrl:'/api/document/bom/batchClose',
  51. _batchDeleteUrl:'/api/document/bom/batchDelete',
  52. gridConfig: {
  53. idField: 'id',
  54. codeField: 'bo_mothercode',
  55. statusCodeField:'bo_statuscode',
  56. dataUrl: '/api/document/bom/list',
  57. caller: 'Bom',
  58. columns : [{
  59. text : "id",
  60. width : 0,
  61. dataIndex : "id",
  62. xtype : "numbercolumn",
  63. },{
  64. text : "产品id",
  65. width : 0,
  66. dataIndex : "bo_motherid",
  67. xtype : "numbercolumn",
  68. },{
  69. text : "产品编号",
  70. dataIndex : "bo_mothercode",
  71. width : 150.0,
  72. },
  73. {
  74. text : "产品名称",
  75. dataIndex : "bo_mothername",
  76. width :200.0,
  77. },
  78. {
  79. text : "产品状态",
  80. dataIndex : "bo_status",
  81. width : 90.0,
  82. },
  83. {
  84. text : "产品状态码",
  85. dataIndex : "bo_statuscode",
  86. width : 0,
  87. },
  88. {
  89. text : "产品版本",
  90. dataIndex : "bo_version",
  91. width :80.0,
  92. }]
  93. },
  94. refresh:function(){
  95. this.items.items[0].store.load()
  96. }
  97. });