QueryPanel.js 4.7 KB

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