ProfitDetail.js 872 B

1234567891011121314151617181920
  1. Ext.define('saas.model.report.ProfitDetail', {
  2. extend: 'saas.model.Base',
  3. fields: [
  4. { name: 'cu_type', type: 'string' }, // 客户类型
  5. { name: 'pi_custname', type: 'string' }, // 客户名称
  6. { name: 'netamount', type: 'float' }, // 金额
  7. { name: 'saamount-netamount', type: 'float', // 税额
  8. convert: function(v, rec) {
  9. var t = (rec.get('saamount') || 0.0) - (rec.get('netamount') || 0.0);
  10. return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  11. },
  12. depends: ['saamount', 'netamount']
  13. },
  14. { name: 'saamount', type: 'float' }, // 价税合计
  15. { name: 'costamount', type: 'float' }, // 成本金额
  16. { name: 'profit', type: 'float' }, // 毛利润
  17. { name: 'profitpresent', type: 'float' }, // 毛利率
  18. ],
  19. });