QueryPanel.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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 == ''|| value ==null) {
  20. return '1=1';
  21. }else {
  22. return ' (pi_inoutno like\'%' + value + '%\' ) ';
  23. }
  24. }
  25. }, {
  26. xtype: 'condatefield',
  27. name: 'pi_date',
  28. fieldLabel: '日期',
  29. allowBlank: true,
  30. columnWidth: 0.5
  31. }, {
  32. xtype: 'productDbfindTrigger',
  33. name: 'pr_detail',
  34. fieldLabel: '物料',
  35. emptyText:'请输入物料编号或名称',
  36. showDetail: true
  37. }, {
  38. xtype: 'combobox',
  39. name: 'pi_statuscode',
  40. fieldLabel: '单据状态',
  41. allowBlank: true,
  42. editable:false,
  43. columnWidth: 0.25,
  44. queryMode: 'local',
  45. emptyText :'全部',
  46. editable:false,
  47. displayField: 'pi_status',
  48. valueField: 'pi_statuscode',
  49. store: Ext.create('Ext.data.ArrayStore', {
  50. fields: ['pi_statuscode', 'pi_status'],
  51. data: [
  52. ["ALL", "全部"],
  53. ["AUDITED", "已审核"],
  54. ["UNAUDITED", "未审核"]
  55. ]
  56. }),
  57. getCondition: function(value) {
  58. if(value == 'ALL') {
  59. return '1=1';
  60. }else {
  61. return 'pi_statuscode=\'' + value + '\'';
  62. }
  63. }
  64. },{
  65. xtype: 'warehouseDbfindTrigger',
  66. name: 'pd_whname',
  67. fieldLabel: '拨出仓',
  68. emptyText :'请输入仓库名或仓库编号',
  69. showDetail: true,
  70. getCondition: function(value) {
  71. if(value == '' || value == null) {
  72. return '1=1';
  73. }else {
  74. return ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' ) ';
  75. }
  76. }
  77. },{
  78. xtype: 'warehouseDbfindTrigger',
  79. name: 'pd_inwhname',
  80. fieldLabel: '拨入仓',
  81. emptyText :'请输入仓库名或仓库编号',
  82. showDetail: true,
  83. getCondition: function(value) {
  84. if(value == '' || value == null) {
  85. return '1=1';
  86. }else {
  87. return ' (pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') ';
  88. }
  89. }
  90. }, {
  91. xtype: 'employeeDbfindTrigger',
  92. name: 'creatorName',
  93. fieldLabel: '录入人',
  94. emptyText:'请输入人员编号或名称',
  95. getCondition: function(value) {
  96. if(!value) {
  97. return '1=1';
  98. }else {
  99. return 'prodinout.creatorName like\'%' + value + '%\'';
  100. }
  101. }
  102. }, {
  103. xtype: 'employeeDbfindTrigger',
  104. name: 'pi_auditman',
  105. fieldLabel: '审核人',
  106. emptyText:'请输入人员编号或名称'
  107. }],
  108. moreQueryFormItems: [],
  109. queryGridConfig: {
  110. idField:'id',
  111. codeField:'pi_inoutno',
  112. addTitle:'调拨单',
  113. addXtype:'stock-appropriationinout-formpanel',
  114. defaultCondition:' pi_class = \'调拨单\'',
  115. baseVastUrl:'/api/storage/prodinout/',
  116. baseColumn: [{
  117. text: 'id',
  118. dataIndex: 'id',
  119. hidden:true,
  120. xtype: 'numbercolumn'
  121. }, {
  122. text: '调拨单号',
  123. dataIndex: 'pi_inoutno',
  124. width: 150
  125. },{
  126. text: '单据类型',
  127. dataIndex: 'pi_class',
  128. width: 0
  129. },{
  130. text: '单据日期',
  131. dataIndex: 'pi_date',
  132. xtype:'datecolumn',
  133. width: 110
  134. },{
  135. text: '状态',
  136. align: 'center',
  137. dataIndex: 'pi_status',
  138. width: 90
  139. },{
  140. text: '录入人',
  141. dataIndex: 'creatorName',
  142. width: 110
  143. },{
  144. text: '审核人',
  145. dataIndex: 'pi_auditman',
  146. width: 110
  147. },{
  148. text: '备注',
  149. dataIndex: 'pi_remark',
  150. width: 250
  151. }],
  152. relativeColumn: [
  153. {
  154. text: 'id',
  155. dataIndex: 'pi_id',
  156. xtype: 'numbercolumn',
  157. hidden:true
  158. },{
  159. text: '调拨单号',
  160. dataIndex: 'pi_inoutno',
  161. width: 150
  162. },{
  163. text: '单据类型',
  164. dataIndex: 'pi_class',
  165. width: 0
  166. },{
  167. text: '单据日期',
  168. dataIndex: 'pi_date',
  169. xtype:'datecolumn',
  170. width: 110
  171. },{
  172. text: '状态',
  173. align: 'center',
  174. dataIndex: 'pi_status',
  175. width: 90
  176. },{
  177. text: '序号',
  178. dataIndex: 'pd_pdno',
  179. width: 80
  180. },{
  181. text: '物料编号',
  182. dataIndex: 'pd_prodcode',
  183. width: 150
  184. },{
  185. text: '物料名称',
  186. dataIndex: 'pr_detail',
  187. width: 200
  188. },{
  189. text: '型号',
  190. dataIndex: 'pr_orispeccode',
  191. width: 150
  192. },{
  193. text: '规格',
  194. dataIndex: 'pr_spec',
  195. width: 150
  196. },{
  197. text: '单位',
  198. dataIndex: 'pr_unit',
  199. width: 80
  200. },{
  201. text: '数量',
  202. dataIndex: 'pd_outqty',
  203. xtype:'numbercolumn',
  204. width: 110
  205. },{
  206. text: '拨出仓',
  207. dataIndex: 'pd_whname',
  208. width: 150
  209. },{
  210. text: '拨入仓',
  211. dataIndex: 'pd_inwhname',
  212. width: 150
  213. },{
  214. text: '备注',
  215. dataIndex: 'pd_remark',
  216. width:250
  217. }]
  218. }
  219. });