QueryPanel.js 3.9 KB

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