QueryPanel.js 7.9 KB

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