QueryPanel.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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. showDetail: true,
  12. getCondition: function(value) {
  13. if(value == ''|| value ==null) {
  14. return '1=1';
  15. }else {
  16. return ' (pi_inoutno like\'%' + value + '%\' ) ';
  17. }
  18. }
  19. }, {
  20. xtype: 'condatefield',
  21. name: 'pi_date',
  22. fieldLabel: '日期',
  23. allowBlank: true,
  24. columnWidth: 0.5
  25. }, {
  26. xtype: 'productDbfindTrigger',
  27. name: 'pr_detail',
  28. fieldLabel: '物料',
  29. emptyText:'请输入物料编号或名称',
  30. showDetail: true
  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: 'warehouseDbfindTrigger',
  60. name: 'pd_whname',
  61. fieldLabel: '拨出仓',
  62. emptyText :'请输入仓库名或仓库编号',
  63. showDetail: true,
  64. getCondition: function(value) {
  65. if(value == '' || value == null) {
  66. return '1=1';
  67. }else {
  68. return ' (pd_whcode like\'%' + value + '%\' or pd_whname like \'%'+value+'%\' ) ';
  69. }
  70. }
  71. },{
  72. xtype: 'warehouseDbfindTrigger',
  73. name: 'pd_inwhname',
  74. fieldLabel: '拨入仓',
  75. emptyText :'请输入仓库名或仓库编号',
  76. showDetail: true,
  77. getCondition: function(value) {
  78. if(value == '' || value == null) {
  79. return '1=1';
  80. }else {
  81. return ' (pd_inwhcode like\'%' + value + '%\' or pd_inwhname like \'%'+value+'%\') ';
  82. }
  83. }
  84. }, {
  85. xtype: 'accountDbfindTrigger',
  86. name: 'creatorName',
  87. fieldLabel: '录入人',
  88. emptyText:'请输入人员编号或名称',
  89. getCondition: function(value) {
  90. if(!value) {
  91. return '1=1';
  92. }else {
  93. return 'prodinout.creatorName like\'%' + value + '%\'';
  94. }
  95. }
  96. }, {
  97. xtype: 'accountDbfindTrigger',
  98. name: 'pi_auditman',
  99. fieldLabel: '审核人',
  100. emptyText:'请输入人员编号或名称'
  101. }],
  102. moreQueryFormItems: [],
  103. queryGridConfig: {
  104. idField:'id',
  105. codeField:'pi_inoutno',
  106. addTitle:'调拨单',
  107. addXtype:'stock-appropriationinout-formpanel',
  108. defaultCondition:' pi_class = \'调拨单\'',
  109. baseVastUrl:'/api/storage/prodinout/',
  110. caller:'AppropriationInOut',
  111. baseColumn: [{
  112. text: 'id',
  113. dataIndex: 'id',
  114. hidden:true,
  115. xtype: 'numbercolumn'
  116. }, {
  117. text: '调拨单号',
  118. dataIndex: 'pi_inoutno',
  119. width: 150
  120. },{
  121. text: '单据类型',
  122. dataIndex: 'pi_class',
  123. width: 0
  124. },{
  125. text: '单据日期',
  126. dataIndex: 'pi_date',
  127. xtype:'datecolumn',
  128. width: 110
  129. },{
  130. text: '状态',
  131. align: 'center',
  132. dataIndex: 'pi_status',
  133. width: 90
  134. },{
  135. text: '录入人',
  136. dataIndex: 'creatorName',
  137. width: 110
  138. },{
  139. text: '审核人',
  140. dataIndex: 'pi_auditman',
  141. width: 110
  142. },{
  143. text: '备注',
  144. dataIndex: 'pi_remark',
  145. width: 250
  146. }],
  147. relativeColumn: [
  148. {
  149. text: 'id',
  150. dataIndex: 'pi_id',
  151. xtype: 'numbercolumn',
  152. hidden:true
  153. },{
  154. text: '调拨单号',
  155. dataIndex: 'pi_inoutno',
  156. width: 150
  157. },{
  158. text: '单据类型',
  159. dataIndex: 'pi_class',
  160. width: 0
  161. },{
  162. text: '单据日期',
  163. dataIndex: 'pi_date',
  164. xtype:'datecolumn',
  165. width: 110
  166. },{
  167. text: '状态',
  168. align: 'center',
  169. dataIndex: 'pi_status',
  170. width: 90
  171. },{
  172. text: '序号',
  173. dataIndex: 'pd_pdno',
  174. width: 80
  175. },{
  176. text: '物料编号',
  177. dataIndex: 'pd_prodcode',
  178. width: 150
  179. },{
  180. text: '品牌',
  181. dataIndex: 'pr_brand',
  182. width: 150
  183. },{
  184. text: '名称',
  185. dataIndex: 'pr_detail',
  186. width: 200
  187. },{
  188. text: '型号',
  189. dataIndex: 'pr_orispeccode',
  190. width: 200
  191. },{
  192. text: '数量',
  193. dataIndex: 'pd_outqty',
  194. xtype:'numbercolumn',
  195. width: 110,
  196. renderer : function(v) {
  197. var arr = (v + '.').split('.');
  198. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  199. var format = '0,000.' + xr.join('');
  200. return Ext.util.Format.number(v, format);
  201. }
  202. }, {
  203. text: '单位',
  204. dataIndex: 'pr_unit',
  205. width: 80
  206. }, {
  207. text: '拨出仓',
  208. dataIndex: 'pd_whname',
  209. width: 150
  210. },{
  211. text: '拨入仓',
  212. dataIndex: 'pd_inwhname',
  213. width: 150
  214. },{
  215. text: '备注',
  216. dataIndex: 'pd_remark',
  217. width:250
  218. }]
  219. }
  220. });