CustomerCheck.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. Ext.define('saas.view.money.report.CustomerCheckCheck', {
  2. extend: 'saas.view.core.report.ReportPanel',
  3. xtype: 'monry-report-customercheck',
  4. controller: 'money-report-customercheck',
  5. viewModel: 'money-report-customercheck',
  6. viewName: 'money-report-customercheck',
  7. // groupField: 'pi_custname',
  8. listUrl: '/api/money/report/customercheck',
  9. defaultCondition: null,
  10. reportTitle: '客户对账单',
  11. QueryWidth: 0.2,
  12. autoLoad: false,
  13. //筛选:客户、日期(必填)
  14. searchItems: [{
  15. xtype: 'customerDbfindTrigger',
  16. name: 'pi_custname',
  17. fieldLabel: '客户名称',
  18. columnWidth: 0.2,
  19. allowBlank: false,
  20. }, {
  21. xtype: 'monthdatefield',
  22. name: 'ym',
  23. fieldLabel: '期初日期',
  24. columnWidth: 0.2
  25. }, {
  26. xtype: 'condatefield',
  27. name: 'pi_date',
  28. fieldLabel: '单据日期',
  29. columnWidth: 0.4
  30. }],
  31. reportColumns: [{
  32. text: 'id',
  33. dataIndex: 'pi_id',
  34. hidden: true
  35. }, {
  36. text: '单号',
  37. dataIndex: 'pi_inoutno',
  38. width: 150
  39. }, {
  40. text: '单据类型',
  41. dataIndex: 'pi_class',
  42. width: 110
  43. }, {
  44. text: '单据日期',
  45. dataIndex: 'pi_date',
  46. xtype: 'datecolumn',
  47. width: 110
  48. }, {
  49. text: '序号',
  50. dataIndex: 'pd_pdno',
  51. xtype: 'numbercolumn',
  52. width: 80
  53. }, {
  54. text: '物料编号',
  55. width: 150,
  56. dataIndex: 'pr_code'
  57. }, {
  58. text: '物料名称',
  59. dataIndex: 'pr_detail',
  60. width: 200
  61. }, {
  62. text: '物料规格',
  63. dataIndex: 'pr_spec',
  64. width: 150
  65. }, {
  66. text: '单位',
  67. dataIndex: 'pd_unit',
  68. width: 80
  69. }, {
  70. text: '数量',
  71. xtype: 'numbercolumn',
  72. dataIndex: 'qty',
  73. xtype: 'numbercolumn',
  74. width: 110
  75. }, {
  76. text: '单价',
  77. dataIndex: 'pd_orderprice',
  78. xtype: 'numbercolumn',
  79. width: 110
  80. }, {
  81. text: '税率',
  82. dataIndex: 'pd_taxrate',
  83. xtype: 'numbercolumn',
  84. width: 80
  85. }, {
  86. text: '金额',
  87. xtype: 'numbercolumn',
  88. width: 110,
  89. dataIndex: 'pd_total',
  90. xtype: 'numbercolumn',
  91. // renderer : function(v) {
  92. // var arr = (v + '.').split('.');
  93. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  94. // var format = '0,000.' + xr.join();
  95. // return Ext.util.Format.number(v, format);
  96. // },
  97. // summaryType: 'sum',
  98. // summaryRenderer: function(v) {
  99. // var arr = (v + '.').split('.');
  100. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  101. // var format = '0,000.' + xr.join();
  102. // return Ext.util.Format.number(v, format);
  103. // }
  104. }, {
  105. text: '不含税单价',
  106. width: 110,
  107. dataIndex: 'pd_netprice',
  108. xtype: 'numbercolumn'
  109. }, {
  110. text: '不含税金额',
  111. width: 110,
  112. xtype: 'numbercolumn',
  113. dataIndex: 'pd_nettotal',
  114. xtype: 'numbercolumn',
  115. // renderer : function(v) {
  116. // var arr = (v + '.').split('.');
  117. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  118. // var format = '0,000.' + xr.join();
  119. // return Ext.util.Format.number(v, format);
  120. // },
  121. // summaryType: 'sum',
  122. // summaryRenderer: function(v) {
  123. // var arr = (v + '.').split('.');
  124. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  125. // var format = '0,000.' + xr.join();
  126. // return Ext.util.Format.number(v, format);
  127. // }
  128. }, {
  129. text: '备注',
  130. dataIndex: 'pd_remark',
  131. width: 250
  132. }, {
  133. text: '期初应付',
  134. dataIndex: 'beginamount',
  135. hidden: true,
  136. width: 0,
  137. summaryType: 'cus',
  138. }, {
  139. text: '本期发生',
  140. dataIndex: 'nowamount',
  141. hidden: true,
  142. width: 0,
  143. summaryType: 'cus',
  144. }, {
  145. text: '本期付款',
  146. dataIndex: 'nowpay',
  147. hidden: true,
  148. width: 0,
  149. summaryType: 'cus',
  150. }, {
  151. text: '本期结余',
  152. dataIndex: 'nowbalance',
  153. hidden: true,
  154. width: 0,
  155. summaryType: 'cus',
  156. }],
  157. listeners: {
  158. afterrender: function(panel) {
  159. panel.setLoadButtonDisabled(true);
  160. },
  161. },
  162. setLoadButtonDisabled: function (disabled) {
  163. var panel = this,
  164. grid = panel.down('grid'),
  165. p = grid.down('pagingtoolbar'),
  166. bs = p.query('button'),
  167. loadButton = Ext.Array.findBy(bs, function (b) {
  168. return b.iconCls == 'x-tbar-loading';
  169. });
  170. if (loadButton) {
  171. loadButton.setDisabled(disabled);
  172. }
  173. },
  174. applyParams: function (p) {
  175. var me = this,
  176. viewModel = me.getViewModel(),
  177. formData = viewModel.get('form'),
  178. ym = formData.ym;
  179. return Ext.Object.merge(p, {
  180. ym: ym
  181. });
  182. }
  183. });