QueryPanel.js 7.5 KB

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