QueryPanel.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
  2. extend: 'saas.view.core.query.QueryPanel',
  3. xtype: 'purchase-purchaseout-querypanel',
  4. controller: 'purchase-purchaseout-querypanel',
  5. viewModel: 'purchase-purchaseout-querypanel',
  6. viewName: 'purchase-purchaseout-querypanel',
  7. queryFormItems: [{
  8. xtype: 'textfield',
  9. name: 'pi_inoutno',
  10. emptyText:'请输入单号或供应商',
  11. getCondition: function(value) {
  12. return ' (pi_inoutno like\'%' + value + '%\' or pi_vendcode like \'%'+value+'%\' or pi_vendname like \'%'+value+'%\') ';
  13. }
  14. }, {
  15. xtype: 'condatefield',
  16. name: 'pi_date',
  17. fieldLabel: '日期',
  18. columnWidth: 0.5,
  19. operation: 'between'
  20. }, {
  21. xtype: 'productDbfindTrigger',
  22. name: 'pr_detail',
  23. fieldLabel: '物料',
  24. emptyText:'输入物料编号或名称',
  25. showDetail: true
  26. }, {
  27. xtype: 'combobox',
  28. name: 'pi_statuscode',
  29. fieldLabel: '单据状态',
  30. allowBlank: true,
  31. emptyText :'全部',
  32. editable:false,
  33. queryMode: 'local',
  34. displayField: 'pi_status',
  35. valueField: 'pi_statuscode',
  36. store: Ext.create('Ext.data.ArrayStore', {
  37. fields: ['pi_statuscode', 'pi_status'],
  38. data: [
  39. ["ALL", "全部"],
  40. ["AUDITED", "已审核"],
  41. ["UNAUDITED", "未审核"]
  42. ]
  43. }),
  44. getCondition: function(value) {
  45. if(value == 'ALL') {
  46. return '1=1';
  47. }else {
  48. return 'pi_statuscode=\'' + value + '\'';
  49. }
  50. }
  51. }, {
  52. xtype: 'multicombo',
  53. name: 'pi_prstatuscode',
  54. fieldLabel: '付款状态',
  55. emptyText :'全部',
  56. datas: [
  57. ["PAYNONE", "未付款"],
  58. ["PAYPART", "部分付款"],
  59. ["PAYALL", "已付款"]
  60. ]
  61. }, {
  62. xtype: 'warehouseDbfindTrigger',
  63. name: 'pd_whname',
  64. fieldLabel: '仓库',
  65. emptyText:'请输入仓库编号或名称'
  66. }, {
  67. xtype: 'textfield',
  68. name: 'pi_iocode',
  69. fieldLabel: '关联验收单号'
  70. }, {
  71. xtype: 'employeeDbfindTrigger',
  72. name: 'creatorName',
  73. fieldLabel: '录入人',
  74. emptyText:'请输入人员编号或名称',
  75. getCondition: function(value) {
  76. if(!value) {
  77. return '1=1';
  78. }else {
  79. return 'prodinout.creatorName like\'%' + value + '%\'';
  80. }
  81. }
  82. }, {
  83. xtype: 'employeeDbfindTrigger',
  84. name: 'pi_auditman',
  85. fieldLabel: '审核人',
  86. emptyText:'请输入人员编号或名称'
  87. }],
  88. queryGridConfig: {
  89. idField:'id',
  90. codeField:'pi_inoutno',
  91. addTitle:'采购验退单',
  92. addXtype:'purchase-purchaseout-formpanel',
  93. defaultCondition:' pi_class = \'采购验退单\'',
  94. baseVastUrl:'/api/purchase/prodinout/',
  95. caller:'PurchaseOut',
  96. baseColumn: [{
  97. text: 'id',
  98. dataIndex: 'id',
  99. hidden:true,
  100. xtype: 'numbercolumn'
  101. }, {
  102. text: '验退单号',
  103. dataIndex: 'pi_inoutno',
  104. width: 150
  105. },{
  106. text: '单据类型',
  107. dataIndex: 'pi_class',
  108. width: 0
  109. },{
  110. text: '单据日期',
  111. dataIndex: 'pi_date',
  112. xtype:'datecolumn',
  113. width: 110
  114. },{
  115. text: '供应商名称',
  116. dataIndex: 'pi_vendname',
  117. width: 150
  118. },{
  119. text: '关联验收单号',
  120. dataIndex: 'pi_iocode',
  121. width: 150
  122. },{
  123. text: '总金额',
  124. dataIndex: 'pd_ordertotal',
  125. width: 110
  126. },{
  127. text: '单据状态',
  128. align: 'center',
  129. dataIndex: 'pi_status',
  130. width: 90
  131. },{
  132. text: '付款状态',
  133. align: 'center',
  134. dataIndex: 'pi_prstatus',
  135. width: 90
  136. },{
  137. text: '录入人',
  138. dataIndex: 'creatorName',
  139. width: 110
  140. },{
  141. text: '审核人',
  142. dataIndex: 'pi_auditman',
  143. width: 110
  144. },{
  145. text: '备注',
  146. dataIndex: 'pi_remark',
  147. width: 250
  148. }],
  149. relativeColumn: [
  150. {
  151. text: 'id',
  152. dataIndex: 'pu_id',
  153. xtype: 'numbercolumn',
  154. hidden:true
  155. }, {
  156. text: '单据编号',
  157. dataIndex: 'pi_inoutno',
  158. width: 150
  159. }, {
  160. text: '单据类型',
  161. dataIndex: 'pd_piclass',
  162. width: 0
  163. },{
  164. text: '单据日期',
  165. dataIndex: 'pi_date',
  166. xtype:'datecolumn',
  167. width: 110
  168. },{
  169. text: '供应商编号',
  170. dataIndex: 'pi_vendcode',
  171. width: 0
  172. },{
  173. text: '供应商名称',
  174. dataIndex: 'pi_vendname',
  175. width: 150
  176. },{
  177. text: '审核状态',
  178. align: 'center',
  179. dataIndex: 'pi_status',
  180. width: 90
  181. },{
  182. text: '序号',
  183. dataIndex: 'pd_pdno',
  184. width: 80
  185. },{
  186. text: '相关单号',
  187. dataIndex: 'pd_ordercode',
  188. width: 150
  189. },{
  190. text: '物料编号',
  191. dataIndex: 'pd_prodcode',
  192. width: 150
  193. },{
  194. text: '物料名称',
  195. dataIndex: 'pr_detail',
  196. width: 200
  197. },{
  198. text: '物料规格',
  199. dataIndex: 'pr_spec',
  200. width: 150
  201. },{
  202. text: '单位',
  203. dataIndex: 'pr_unit',
  204. width: 80
  205. },{
  206. text: '数量',
  207. dataIndex: 'pd_outqty',
  208. xtype:'numbercolumn',
  209. width: 110,
  210. renderer : function(v) {
  211. var arr = (v + '.').split('.');
  212. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  213. var format = '0,000.' + xr.join();
  214. return Ext.util.Format.number(v, format);
  215. },
  216. },{
  217. text: '仓库',
  218. dataIndex: 'pd_whname',
  219. width: 150
  220. },{
  221. text: '单价',
  222. dataIndex: 'pd_orderprice',
  223. xtype:'numbercolumn',
  224. renderer : function(v) {
  225. var arr = (v + '.').split('.');
  226. var xr = (new Array(arr[1].length)).fill('0');
  227. var format = '0,000.' + xr.join();
  228. return Ext.util.Format.number(v, format);
  229. },
  230. width: 110
  231. },{
  232. text: '税率',
  233. dataIndex: 'pd_taxrate',
  234. xtype:'numbercolumn',
  235. width: 80,
  236. renderer : function(v) {
  237. return Ext.util.Format.number(v, '0');
  238. },
  239. },{
  240. text: '金额',
  241. dataIndex: 'pd_ordertotal',
  242. xtype:'numbercolumn',
  243. width: 110,
  244. renderer : function(v) {
  245. var arr = (v + '.').split('.');
  246. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  247. var format = '0,000.' + xr.join();
  248. return Ext.util.Format.number(v, format);
  249. },
  250. }]
  251. }
  252. });