Sale.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Ext.define('saas.model.report.Sale', {
  2. extend: 'saas.model.Base',
  3. fields: [
  4. { name: 'id', type: 'int' },
  5. { name: 'sa_code', type: 'string' },
  6. { name: 'sa_custname', type: 'string' },
  7. { name: 'sa_sendstatus', type: 'string' },
  8. { name: 'sa_seller', type: 'string' },
  9. { name: 'sa_date', type: 'date' },
  10. { name: 'sd_prodcode', type: 'string' },
  11. { name: 'pr_brand', type: 'string' },
  12. { name: 'pr_detail', type: 'string' },
  13. { name: 'pr_orispeccode', type: 'string' },
  14. { name: 'pr_spec', type: 'string' },
  15. { name: 'sd_qty', type: 'float' },
  16. { name: 'pr_unit', type: 'string' },
  17. { name: 'sd_price', type: 'float' },
  18. { name: 'sd_netprice', type: 'float' },
  19. { name: 'sd_price', type: 'float' },
  20. { name: 'sd_nettotal', type: 'float' },
  21. { name: 'sd_taxrate', type: 'float' },
  22. { name: 'sd_total - sd_nettotal', type: 'float',
  23. convert: function(v, rec) {
  24. var t = (rec.get('sd_total') || 0.0) - (rec.get('sd_nettotal') || 0.0);
  25. return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
  26. },
  27. depends: ['sd_total', 'sd_nettotal']
  28. },
  29. { name: 'sd_total', type: 'float' },
  30. { name: 'sd_pdsendqty', type: 'float' },
  31. { name: 'sa_currency', type: 'string' },//币别
  32. { name: 'sa_rate', type: 'float' },//税率
  33. { name: 'sd_remark', type: 'string' },//备注
  34. ],
  35. });