QueryPanel.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. queryMode: 'local',
  27. displayField: 'name',
  28. valueField: 'value',
  29. store: Ext.create('Ext.data.ArrayStore', {
  30. fields: ['name', 'value'],
  31. data: [
  32. ["组装", "组装"],
  33. ["拆件", "拆件"]
  34. ]
  35. }),
  36. getCondition: function(value) {
  37. if(value == 'ALL') {
  38. return '1=1';
  39. }else {
  40. return 'ma_type=\'' + value + '\'';
  41. }
  42. }
  43. },{
  44. xtype: 'dbfindtrigger',
  45. name: 'ma_prodcode',
  46. fieldLabel: '产品编号'
  47. }],
  48. moreQueryFormItems: [],
  49. queryGridConfig: {
  50. idField: 'id',
  51. codeField: 'ma_code',
  52. addTitle: '制造单',
  53. addXtype: 'stock-make-formpanel',
  54. defaultCondition:'',
  55. baseVastUrl: '/api/storage/make/',
  56. baseColumn: [{
  57. text: 'id',
  58. dataIndex: 'id',
  59. hidden:true,
  60. xtype: 'numbercolumn'
  61. }, {
  62. text: '单据编号',
  63. dataIndex: 'ma_code',
  64. width: 200
  65. }, {
  66. text: '类型',
  67. dataIndex: 'ma_type',
  68. width: 120
  69. }, {
  70. text: '产品编号',
  71. dataIndex: 'ma_prodcode',
  72. width: 200
  73. }, {
  74. text: '产品名称',
  75. dataIndex: 'ma_proddetail',
  76. width: 120
  77. }, {
  78. text: '版本号',
  79. dataIndex: 'ma_version',
  80. width: 120
  81. }, {
  82. text: '数量',
  83. dataIndex: 'ma_qty',
  84. xtype: 'numbercolumn',
  85. width: 120,
  86. },{
  87. text: '单位',
  88. dataIndex: 'ma_produnit',
  89. width: 120,
  90. },{
  91. text: '单位成本',
  92. dataIndex: 'ma_total',
  93. xtype: 'numbercolumn',
  94. width: 120,
  95. },{
  96. text: '状态',
  97. dataIndex: 'ma_status',
  98. width: 120,
  99. }],
  100. relativeColumn: []
  101. }
  102. });