QueryPanel.js 4.5 KB

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