BasePanel.js 2.8 KB

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