QueryPanel.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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: 'textfield',
  21. name: 'ma_prodcode',
  22. emptyText :'请输入产品名称或编号',
  23. getCondition: function(value) {
  24. if(value == 'ALL') {
  25. return '1=1';
  26. }else {
  27. return ' (ma_prodcode like\'%' + value + '%\' or ma_proddetail like \'%'+value+'%\') ';
  28. }
  29. }
  30. }, {
  31. xtype: 'condatefield',
  32. name: 'createTime',
  33. fieldLabel: '日期',
  34. columnWidth: 0.5,
  35. operation: 'between'
  36. }, {
  37. xtype: 'combobox',
  38. name: 'ma_type',
  39. fieldLabel: '类型',
  40. allowBlank: true,
  41. editable:false,
  42. columnWidth: 0.25,
  43. emptyText :'全部',
  44. queryMode: 'local',
  45. displayField: 'name',
  46. valueField: 'value',
  47. store: Ext.create('Ext.data.ArrayStore', {
  48. fields: ['name', 'value'],
  49. data: [
  50. ["全部", "ALL"],
  51. ["组装", "组装"],
  52. ["拆件", "拆件"]
  53. ]
  54. }),
  55. getCondition: function(value) {
  56. if(value == 'ALL') {
  57. return '1=1';
  58. }else {
  59. return 'ma_type=\'' + value + '\'';
  60. }
  61. }
  62. }, {
  63. xtype: 'combobox',
  64. name: 'ma_statuscode',
  65. fieldLabel: '单据状态',
  66. queryMode: 'local',
  67. displayField: 'ma_status',
  68. valueField: 'ma_statuscode',
  69. emptyText :'全部',
  70. editable:false,
  71. store: Ext.create('Ext.data.ArrayStore', {
  72. fields: ['ma_statuscode', 'ma_status'],
  73. data: [
  74. ["ALL", "全部"],
  75. ["AUDITED", "已审核"],
  76. ["UNAUDITED", "未审核"]
  77. ]
  78. }),
  79. getCondition: function(value) {
  80. if(value == 'ALL') {
  81. return '1=1';
  82. }else {
  83. return 'ma_statuscode=\'' + value + '\'';
  84. }
  85. }
  86. }],
  87. moreQueryFormItems: [],
  88. queryGridConfig: {
  89. idField: 'id',
  90. codeField: 'ma_code',
  91. addTitle: '制造单',
  92. addXtype: 'stock-make-formpanel',
  93. defaultCondition:'',
  94. baseVastUrl: '/api/storage/make/',
  95. baseColumn: [{
  96. text: 'id',
  97. dataIndex: 'id',
  98. hidden:true,
  99. xtype: 'numbercolumn'
  100. }, {
  101. text: '制造单号',
  102. dataIndex: 'ma_code',
  103. width: 150
  104. }, {
  105. text: '类型',
  106. dataIndex: 'ma_type',
  107. width: 110
  108. }, {
  109. text: '产品编号',
  110. dataIndex: 'ma_prodcode',
  111. width: 150
  112. }, {
  113. text: '产品名称',
  114. dataIndex: 'ma_proddetail',
  115. width: 200
  116. }, {
  117. text: '版本号',
  118. dataIndex: 'ma_version',
  119. width: 80
  120. }, {
  121. text: '数量',
  122. dataIndex: 'ma_qty',
  123. xtype: 'numbercolumn',
  124. width: 110,
  125. },{
  126. text: '单位',
  127. dataIndex: 'ma_produnit',
  128. width: 80,
  129. },{
  130. text: '单据状态',
  131. dataIndex: 'ma_status',
  132. width: 90,
  133. },{
  134. text: '单位成本',
  135. dataIndex: 'ma_total',
  136. xtype: 'numbercolumn',
  137. width: 0,
  138. }],
  139. relativeColumn: []
  140. }
  141. });