QueryPanel.js 8.1 KB

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