QueryPanel.js 6.3 KB

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