TotalRecDetail.js 1.1 KB

12345678910111213141516171819202122
  1. Ext.define('saas.model.report.TotalRecDetail', {
  2. extend: 'saas.model.Base',
  3. fields: [
  4. { name: 'cm_yearmonth', type: 'string' }, // 期间
  5. { name: 'cm_custname', type: 'string' }, // 客户名称
  6. { name: 'cm_beginpreamount', type: 'float' }, // 期初预收
  7. { name: 'cm_beginamount', type: 'float' }, // 期初应收
  8. { name: 'cm_nowpreamount', type: 'float' }, // 本期预收
  9. { name: 'cm_nowamount', type: 'float' }, // 本期应收
  10. { name: 'cm_nowpayamount', type: 'float' }, // 本期核销
  11. { name: 'cm_endpreamount', type: 'float' }, // 期末预收
  12. { name: 'cm_endamount', type: 'float' }, // 期末应收
  13. { name: 'cm_endamount-cm_endpreamount', type: 'float', // 应收余额
  14. convert: function(v, rec) {
  15. var t = (rec.get('cm_endamount') || 0.0) - (rec.get('cm_endpreamount') || 0.0);
  16. return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  17. },
  18. depends: ['cm_endamount', 'cm_endpreamount']
  19. }
  20. ],
  21. });