QueryPanel.js 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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. caller:'PurchaseOut',
  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. dataIndex: 'pi_vendname',
  131. width: 150
  132. },{
  133. text: '关联验收单号',
  134. dataIndex: 'pi_iocode',
  135. width: 150
  136. },{
  137. text: '总金额',
  138. dataIndex: 'pi_total',
  139. width: 110
  140. },{
  141. text: '单据状态',
  142. align: 'center',
  143. dataIndex: 'pi_status',
  144. width: 90
  145. },{
  146. text: '付款状态',
  147. align: 'center',
  148. dataIndex: 'pi_prstatus',
  149. width: 90
  150. },{
  151. text: '录入人',
  152. dataIndex: 'creatorName',
  153. width: 110
  154. },{
  155. text: '审核人',
  156. dataIndex: 'pi_auditman',
  157. width: 110
  158. },{
  159. text: '备注',
  160. dataIndex: 'pi_remark',
  161. width: 250
  162. }],
  163. relativeColumn: [
  164. {
  165. text: 'id',
  166. dataIndex: 'pu_id',
  167. xtype: 'numbercolumn',
  168. hidden:true
  169. }, {
  170. text: '单据编号',
  171. dataIndex: 'pi_inoutno',
  172. width: 150
  173. }, {
  174. text: '单据类型',
  175. dataIndex: 'pd_piclass',
  176. width: 0
  177. },{
  178. text: '单据日期',
  179. dataIndex: 'pi_date',
  180. xtype:'datecolumn',
  181. width: 110
  182. },{
  183. text: '供应商编号',
  184. dataIndex: 'pi_vendcode',
  185. width: 0
  186. },{
  187. text: '供应商名称',
  188. dataIndex: 'pi_vendname',
  189. width: 150
  190. },{
  191. text: '审核状态',
  192. align: 'center',
  193. dataIndex: 'pi_status',
  194. width: 90
  195. },{
  196. text: '序号',
  197. dataIndex: 'pd_pdno',
  198. width: 80
  199. },{
  200. text: '相关单号',
  201. dataIndex: 'pd_ordercode',
  202. width: 150
  203. },{
  204. text: '物料编号',
  205. dataIndex: 'pd_prodcode',
  206. width: 150
  207. },{
  208. text: '物料名称',
  209. dataIndex: 'pr_detail',
  210. width: 200
  211. },{
  212. text: '物料规格',
  213. dataIndex: 'pr_spec',
  214. width: 150
  215. },{
  216. text: '单位',
  217. dataIndex: 'pr_unit',
  218. width: 80
  219. },{
  220. text: '数量',
  221. dataIndex: 'pd_outqty',
  222. xtype:'numbercolumn',
  223. width: 110,
  224. renderer : function(v) {
  225. var arr = (v + '.').split('.');
  226. var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
  227. var format = '0,000.' + xr.join();
  228. return Ext.util.Format.number(v, format);
  229. },
  230. },{
  231. text: '仓库',
  232. dataIndex: 'pd_whname',
  233. width: 150
  234. },{
  235. text: '单价',
  236. dataIndex: 'pd_orderprice',
  237. xtype:'numbercolumn',
  238. renderer : function(v) {
  239. var arr = (v + '.').split('.');
  240. var xr = (new Array(arr[1].length)).fill('0');
  241. var format = '0,000.' + xr.join();
  242. return Ext.util.Format.number(v, format);
  243. },
  244. width: 110
  245. },{
  246. text: '税率',
  247. dataIndex: 'pd_taxrate',
  248. xtype:'numbercolumn',
  249. width: 80,
  250. renderer : function(v) {
  251. return Ext.util.Format.number(v, '0');
  252. },
  253. },{
  254. text: '金额',
  255. dataIndex: 'pd_total',
  256. xtype:'numbercolumn',
  257. width: 110,
  258. renderer : function(v) {
  259. var arr = (v + '.').split('.');
  260. var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  261. var format = '0,000.' + xr.join();
  262. return Ext.util.Format.number(v, format);
  263. },
  264. }]
  265. }
  266. });