QueryPanel.js 7.6 KB

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