QueryPanel.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'stock-appropriationinout-querypanel',
  4. controller: 'stock-appropriationinout-querypanel',
  5. viewModel: 'stock-appropriationinout-querypanel',
  6. viewName: 'stock-appropriationinout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'hidden',
  9. name: 'id',
  10. fieldLabel: 'ID',
  11. allowBlank: true,
  12. columnWidth: 0
  13. },{
  14. xtype: 'textfield',
  15. name: 'pi_inoutno',
  16. emptyText:'请输入单号或物料',
  17. showDetail: true,
  18. getCondition: function(value) {
  19. if(value == 'ALL') {
  20. return '1=1';
  21. }else {
  22. return ' (pi_inoutno like\'%' + value + '%\' or pd_prodcode like \'%'+value+'%\' ) ';
  23. }
  24. }
  25. }, {
  26. xtype: 'condatefield',
  27. name: 'pi_date',
  28. fieldLabel: '日期',
  29. allowBlank: true,
  30. columnWidth: 0.5
  31. }, {
  32. xtype: 'combobox',
  33. name: 'pi_statuscode',
  34. fieldLabel: '状态',
  35. allowBlank: true,
  36. editable:false,
  37. columnWidth: 0.25,
  38. queryMode: 'local',
  39. emptyText :'全部',
  40. editable:false,
  41. displayField: 'pi_status',
  42. valueField: 'pi_statuscode',
  43. store: Ext.create('Ext.data.ArrayStore', {
  44. fields: ['pi_statuscode', 'pi_status'],
  45. data: [
  46. ["ALL", "全部"],
  47. ["AUDITED", "已审核"],
  48. ["UNAUDITED", "未审核"]
  49. ]
  50. }),
  51. getCondition: function(value) {
  52. if(value == 'ALL') {
  53. return '1=1';
  54. }else {
  55. return 'pi_statuscode=\'' + value + '\'';
  56. }
  57. }
  58. },{
  59. xtype: 'textfield',
  60. name: 'pd_whcode',
  61. fieldLabel: '仓库',
  62. emptyText :'请输入仓库名或仓库编号',
  63. showDetail: true,
  64. getCondition: function(value) {
  65. if(value == 'ALL') {
  66. return '1=1';
  67. }else {
  68. return ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' or pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') ';
  69. }
  70. }
  71. }],
  72. moreQueryFormItems: [],
  73. queryGridConfig: {
  74. idField:'id',
  75. codeField:'pi_inoutno',
  76. addTitle:'调拨单',
  77. addXtype:'stock-appropriationinout-formpanel',
  78. defaultCondition:' pi_class = \'调拨单\'',
  79. baseVastUrl:'/api/storage/prodinout/',
  80. baseColumn: [{
  81. text: 'id',
  82. dataIndex: 'id',
  83. hidden:true,
  84. xtype: 'numbercolumn'
  85. }, {
  86. text: '调拨单号',
  87. dataIndex: 'pi_inoutno',
  88. width: 150
  89. },{
  90. text: '单据类型',
  91. dataIndex: 'pi_class',
  92. width: 0
  93. },{
  94. text: '单据日期',
  95. dataIndex: 'pi_date',
  96. xtype:'datecolumn',
  97. width: 110
  98. },{
  99. text: '状态',
  100. dataIndex: 'pi_status',
  101. width: 90
  102. },{
  103. text: '供应商名称',
  104. dataIndex: 'pi_vendname',
  105. width: 0
  106. },{
  107. text: '客户名称',
  108. dataIndex: 'pi_custname',
  109. width: 0
  110. },{
  111. text: '录入人',
  112. dataIndex: 'creatorName',
  113. width: 110
  114. },{
  115. text: '审核人',
  116. dataIndex: 'pi_auditman',
  117. width: 110
  118. },{
  119. text: '备注',
  120. dataIndex: 'pi_remark',
  121. width: 250
  122. }],
  123. relativeColumn: [{
  124. text: 'id',
  125. dataIndex: 'id',
  126. hidden:true,
  127. xtype: 'numbercolumn'
  128. }, {
  129. text: '调拨单号',
  130. dataIndex: 'pi_inoutno',
  131. width: 150
  132. },{
  133. text: '单据类型',
  134. dataIndex: 'pi_class',
  135. width: 0
  136. },{
  137. text: '单据日期',
  138. dataIndex: 'pi_date',
  139. xtype:'datecolumn',
  140. width: 110
  141. },{
  142. text: '状态',
  143. dataIndex: 'pi_status',
  144. width: 90
  145. },{
  146. text: '供应商名称',
  147. dataIndex: 'pi_vendname',
  148. width: 0
  149. },{
  150. text: '客户名称',
  151. dataIndex: 'pi_custname',
  152. width: 0
  153. },{
  154. text: '录入人',
  155. dataIndex: 'creatorName',
  156. width: 110
  157. },{
  158. text: '审核人',
  159. dataIndex: 'pi_auditman',
  160. width: 110
  161. },{
  162. text: '备注',
  163. dataIndex: 'pi_remark',
  164. width: 250
  165. }]
  166. }
  167. });