QueryPanel.js 7.8 KB

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