QueryPanel.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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. showDetail: true
  67. }, {
  68. xtype: 'textfield',
  69. name: 'pi_iocode',
  70. fieldLabel: '关联验收单号'
  71. }, {
  72. xtype: 'employeeDbfindTrigger',
  73. name: 'creatorName',
  74. fieldLabel: '录入人',
  75. emptyText:'请输入人员编号或名称',
  76. getCondition: function(value) {
  77. if(!value) {
  78. return '1=1';
  79. }else {
  80. return 'prodinout.creatorName like\'%' + value + '%\'';
  81. }
  82. }
  83. }, {
  84. xtype: 'employeeDbfindTrigger',
  85. name: 'pi_auditman',
  86. fieldLabel: '审核人',
  87. emptyText:'请输入人员编号或名称'
  88. }],
  89. queryGridConfig: {
  90. idField:'id',
  91. codeField:'pi_inoutno',
  92. addTitle:'采购验退单',
  93. addXtype:'purchase-purchaseout-formpanel',
  94. defaultCondition:' pi_class = \'采购验退单\'',
  95. baseVastUrl:'/api/purchase/prodinout/',
  96. caller:'PurchaseOut',
  97. baseColumn: [{
  98. text: 'id',
  99. dataIndex: 'id',
  100. hidden:true,
  101. xtype: 'numbercolumn'
  102. }, {
  103. text: '验退单号',
  104. dataIndex: 'pi_inoutno',
  105. width: 150
  106. },{
  107. text: '单据类型',
  108. dataIndex: 'pi_class',
  109. width: 0
  110. },{
  111. text: '单据日期',
  112. dataIndex: 'pi_date',
  113. xtype:'datecolumn',
  114. width: 110
  115. },{
  116. text: '供应商名称',
  117. dataIndex: 'pi_vendname',
  118. width: 150
  119. },{
  120. text: '关联验收单号',
  121. dataIndex: 'pi_iocode',
  122. width: 150
  123. },{
  124. text: '总金额',
  125. dataIndex: 'pi_total',
  126. width: 110
  127. },{
  128. text: '单据状态',
  129. align: 'center',
  130. dataIndex: 'pi_status',
  131. width: 90
  132. },{
  133. text: '付款状态',
  134. align: 'center',
  135. dataIndex: 'pi_prstatus',
  136. width: 90
  137. },{
  138. text: '录入人',
  139. dataIndex: 'creatorName',
  140. width: 110
  141. },{
  142. text: '审核人',
  143. dataIndex: 'pi_auditman',
  144. width: 110
  145. },{
  146. text: '备注',
  147. dataIndex: 'pi_remark',
  148. width: 250
  149. }],
  150. relativeColumn: [
  151. {
  152. text: 'id',
  153. dataIndex: 'pu_id',
  154. xtype: 'numbercolumn',
  155. hidden:true
  156. }, {
  157. text: '单据编号',
  158. dataIndex: 'pi_inoutno',
  159. width: 150
  160. }, {
  161. text: '单据类型',
  162. dataIndex: 'pd_piclass',
  163. width: 0
  164. },{
  165. text: '单据日期',
  166. dataIndex: 'pi_date',
  167. xtype:'datecolumn',
  168. width: 110
  169. },{
  170. text: '供应商编号',
  171. dataIndex: 'pi_vendcode',
  172. width: 0
  173. },{
  174. text: '供应商名称',
  175. dataIndex: 'pi_vendname',
  176. width: 150
  177. },{
  178. text: '审核状态',
  179. align: 'center',
  180. dataIndex: 'pi_status',
  181. width: 90
  182. },{
  183. text: '序号',
  184. dataIndex: 'pd_pdno',
  185. width: 80
  186. },{
  187. text: '相关单号',
  188. dataIndex: 'pd_ordercode',
  189. width: 150
  190. },{
  191. text: '物料编号',
  192. dataIndex: 'pd_prodcode',
  193. width: 150
  194. },{
  195. text: '物料名称',
  196. dataIndex: 'pr_detail',
  197. width: 200
  198. },{
  199. text: '物料规格',
  200. dataIndex: 'pr_spec',
  201. width: 150
  202. },{
  203. text: '单位',
  204. dataIndex: 'pr_unit',
  205. width: 80
  206. },{
  207. text: '数量',
  208. dataIndex: 'pd_outqty',
  209. xtype:'numbercolumn',
  210. width: 110,
  211. renderer : function(v) {
  212. var arr = (v + '.').split('.');
  213. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  214. var format = '0,000.' + xr.join();
  215. return Ext.util.Format.number(v, format);
  216. },
  217. },{
  218. text: '仓库',
  219. dataIndex: 'pd_whname',
  220. width: 150
  221. },{
  222. text: '单价',
  223. dataIndex: 'pd_orderprice',
  224. xtype:'numbercolumn',
  225. renderer : function(v) {
  226. var arr = (v + '.').split('.');
  227. var xr = (new Array(arr[1].length)).fill('0');
  228. var format = '0,000.' + xr.join();
  229. return Ext.util.Format.number(v, format);
  230. },
  231. width: 110
  232. },{
  233. text: '税率',
  234. dataIndex: 'pd_taxrate',
  235. xtype:'numbercolumn',
  236. width: 80,
  237. renderer : function(v) {
  238. return Ext.util.Format.number(v, '0');
  239. },
  240. },{
  241. text: '金额',
  242. dataIndex: 'pd_ordertotal',
  243. xtype:'numbercolumn',
  244. width: 110,
  245. renderer : function(v) {
  246. var arr = (v + '.').split('.');
  247. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  248. var format = '0,000.' + xr.join();
  249. return Ext.util.Format.number(v, format);
  250. },
  251. }]
  252. }
  253. });