BasePanel.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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:150,
  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. width:110,
  21. emptyText:'版本'
  22. },{
  23. xtype: 'combobox',
  24. name: 'bo_statuscode',
  25. queryMode: 'local',
  26. displayField: 'bo_status',
  27. valueField: 'bo_statuscode',
  28. emptyText :'状态',
  29. editable:false,
  30. width:110,
  31. store: Ext.create('Ext.data.ArrayStore', {
  32. fields: ['bo_statuscode', 'bo_status'],
  33. data: [
  34. ["ALL", "全部"],
  35. ["OPEN", "已开启"],
  36. ["CLOSE", "已关闭"]
  37. ]
  38. }),
  39. getCondition: function(value) {
  40. if(value == 'ALL'||value==null) {
  41. return '1=1';
  42. }else {
  43. return 'bo_statuscode=\'' + value + '\'';
  44. }
  45. }
  46. }],
  47. //字段属性
  48. _formXtype:'document-bom-formpanel',
  49. _title:'BOM资料',
  50. _deleteUrl:'/api/document/bom/delete',
  51. _batchOpenUrl:'/api/document/bom/batchOpen',
  52. _batchCloseUrl:'/api/document/bom/batchClose',
  53. _batchDeleteUrl:'/api/document/bom/batchDelete',
  54. gridConfig: {
  55. idField: 'id',
  56. codeField: 'bo_mothercode',
  57. statusCodeField:'bo_statuscode',
  58. dataUrl: '/api/document/bom/list',
  59. columns : [{
  60. text : "id",
  61. width : 0,
  62. dataIndex : "id",
  63. xtype : "numbercolumn",
  64. },{
  65. text : "产品id",
  66. width : 0,
  67. dataIndex : "bo_motherid",
  68. xtype : "numbercolumn",
  69. },{
  70. text : "产品编号",
  71. dataIndex : "bo_mothercode",
  72. width : 150.0,
  73. },
  74. {
  75. text : "产品名称",
  76. dataIndex : "bo_mothername",
  77. width :200.0,
  78. },
  79. {
  80. text : "产品状态",
  81. dataIndex : "bo_status",
  82. width : 90.0,
  83. },
  84. {
  85. text : "产品状态码",
  86. dataIndex : "bo_statuscode",
  87. width : 0,
  88. },
  89. {
  90. text : "产品版本",
  91. dataIndex : "bo_version",
  92. width :80.0,
  93. }]
  94. },
  95. refresh:function(){
  96. this.items.items[0].store.load()
  97. }
  98. });