QueryPanel.js 7.6 KB

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