QueryPanel.js 6.9 KB

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