CustomerCheck.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. {
  33. text: 'id',
  34. dataIndex: 'pi_id',
  35. hidden: true
  36. }, {
  37. text: '单号',
  38. dataIndex: 'pi_inoutno',
  39. width: 150
  40. }, {
  41. text: '单据类型',
  42. dataIndex: 'pi_class',
  43. width: 110
  44. }, {
  45. text: '单据日期',
  46. dataIndex: 'pi_date',
  47. xtype: 'datecolumn',
  48. width: 110
  49. }, {
  50. text: '序号',
  51. dataIndex: 'pd_pdno',
  52. xtype: 'numbercolumn',
  53. width: 80
  54. },{
  55. text: '物料编号',
  56. width: 150,
  57. dataIndex: 'pr_code'
  58. }, {
  59. text: '物料名称',
  60. dataIndex: 'pr_detail',
  61. width: 200
  62. }, {
  63. text: '物料规格',
  64. dataIndex: 'pr_spec',
  65. width: 150
  66. }, {
  67. text: '单位',
  68. dataIndex: 'pd_unit',
  69. width: 80
  70. }, {
  71. text: '数量',
  72. xtype: 'numbercolumn',
  73. dataIndex: 'qty',
  74. xtype: 'numbercolumn',
  75. width: 110
  76. }, {
  77. text: '单价',
  78. dataIndex: 'pd_orderprice',
  79. xtype: 'numbercolumn',
  80. width: 110
  81. }, {
  82. text: '税率',
  83. dataIndex: 'pd_taxrate',
  84. xtype: 'numbercolumn',
  85. width: 80
  86. }, {
  87. text: '金额',
  88. xtype: 'numbercolumn',
  89. width: 110,
  90. dataIndex: 'pd_total',
  91. xtype: 'numbercolumn',
  92. // renderer : function(v) {
  93. // var arr = (v + '.').split('.');
  94. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  95. // var format = '0,000.' + xr.join();
  96. // return Ext.util.Format.number(v, format);
  97. // },
  98. // summaryType: 'sum',
  99. // summaryRenderer: function(v) {
  100. // var arr = (v + '.').split('.');
  101. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  102. // var format = '0,000.' + xr.join();
  103. // return Ext.util.Format.number(v, format);
  104. // }
  105. }, {
  106. text: '不含税单价',
  107. width: 110,
  108. dataIndex: 'pd_netprice',
  109. xtype: 'numbercolumn'
  110. }, {
  111. text: '不含税金额',
  112. width: 110,
  113. xtype: 'numbercolumn',
  114. dataIndex: 'pd_nettotal',
  115. xtype: 'numbercolumn',
  116. // renderer : function(v) {
  117. // var arr = (v + '.').split('.');
  118. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  119. // var format = '0,000.' + xr.join();
  120. // return Ext.util.Format.number(v, format);
  121. // },
  122. // summaryType: 'sum',
  123. // summaryRenderer: function(v) {
  124. // var arr = (v + '.').split('.');
  125. // var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
  126. // var format = '0,000.' + xr.join();
  127. // return Ext.util.Format.number(v, format);
  128. // }
  129. }, {
  130. text: '备注',
  131. dataIndex: 'pd_remark',
  132. width: 250
  133. }, {
  134. text: '期初应付',
  135. dataIndex: 'beginamount',
  136. hidden: true,
  137. width: 0,
  138. summaryType: 'cus',
  139. }, {
  140. text: '本期发生',
  141. dataIndex: 'nowamount',
  142. hidden: true,
  143. width: 0,
  144. summaryType: 'cus',
  145. }, {
  146. text: '本期付款',
  147. dataIndex: 'nowpay',
  148. hidden: true,
  149. width: 0,
  150. summaryType: 'cus',
  151. }, {
  152. text: '本期结余',
  153. dataIndex: 'nowbalance',
  154. hidden: true,
  155. width: 0,
  156. summaryType: 'cus',
  157. }],
  158. applyParams: function(p) {
  159. var me = this,
  160. viewModel = me.getViewModel(),
  161. formData = viewModel.get('form'),
  162. ym = formData.ym;
  163. return Ext.Object.merge(p, {
  164. ym: ym
  165. });
  166. }
  167. });