QueryPanel.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. Ext.define('saas.view.stock.make.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-make-querypanel',
  4. controller: 'stock-make-querypanel',
  5. viewModel: 'stock-make-querypanel',
  6. viewName: 'stock-make-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'ma_id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. getCondition: function(value) {
  13. return 'ma_id=' + value;
  14. }
  15. },{
  16. xtype: 'textfield',
  17. name: 'ma_code',
  18. fieldLabel: '单据编号'
  19. },{
  20. xtype: 'combobox',
  21. name: 'ma_type',
  22. fieldLabel: '类型',
  23. allowBlank: true,
  24. editable:false,
  25. columnWidth: 0.25,
  26. emptyText :'全部',
  27. queryMode: 'local',
  28. displayField: 'name',
  29. valueField: 'value',
  30. store: Ext.create('Ext.data.ArrayStore', {
  31. fields: ['name', 'value'],
  32. data: [
  33. ["全部", "ALL"],
  34. ["组装", "组装"],
  35. ["拆件", "拆件"]
  36. ]
  37. }),
  38. getCondition: function(value) {
  39. if(value == 'ALL') {
  40. return '1=1';
  41. }else {
  42. return 'ma_type=\'' + value + '\'';
  43. }
  44. }
  45. },{
  46. xtype: 'bomDbfindTrigger',
  47. name: 'ma_prodcode',
  48. fieldLabel: '产品编号'
  49. }],
  50. moreQueryFormItems: [],
  51. queryGridConfig: {
  52. idField: 'id',
  53. codeField: 'ma_code',
  54. addTitle: '制造单',
  55. addXtype: 'stock-make-formpanel',
  56. defaultCondition:'',
  57. baseVastUrl: '/api/storage/make/',
  58. baseColumn: [{
  59. text: 'id',
  60. dataIndex: 'id',
  61. hidden:true,
  62. xtype: 'numbercolumn'
  63. }, {
  64. text: '单据编号',
  65. dataIndex: 'ma_code',
  66. width: 200
  67. }, {
  68. text: '类型',
  69. dataIndex: 'ma_type',
  70. width: 120
  71. }, {
  72. text: '产品编号',
  73. dataIndex: 'ma_prodcode',
  74. width: 200
  75. }, {
  76. text: '产品名称',
  77. dataIndex: 'ma_proddetail',
  78. width: 120
  79. }, {
  80. text: '版本号',
  81. dataIndex: 'ma_version',
  82. width: 120
  83. }, {
  84. text: '数量',
  85. dataIndex: 'ma_qty',
  86. xtype: 'numbercolumn',
  87. width: 120,
  88. },{
  89. text: '单位',
  90. dataIndex: 'ma_produnit',
  91. width: 120,
  92. },{
  93. text: '单位成本',
  94. dataIndex: 'ma_total',
  95. xtype: 'numbercolumn',
  96. width: 120,
  97. },{
  98. text: '状态',
  99. dataIndex: 'ma_status',
  100. width: 120,
  101. }],
  102. relativeColumn: []
  103. }
  104. });