QueryPanel.js 7.0 KB

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