PurchaseDetail.js 1.4 KB

12345678910111213141516171819202122232425262728
  1. Ext.define('saas.model.sale.b2b.PurchaseDetail', {
  2. extend: 'saas.model.Base',
  3. fields: [
  4. { name: 'id', type: 'int' }, // id
  5. { name: 'sd_prodid', type: 'int' }, // 物料id
  6. { name: 'sd_prodcode', type: 'string' }, // 物料编号
  7. { name: 'sd_proddetail', type: 'string' }, // 物料名称
  8. { name: 'sd_prodbrand', type: 'string' }, // 品牌
  9. { name: 'sd_orispeccode', type: 'string' }, // 型号
  10. { name: 'sd_prodspec', type: 'string' }, // 规格
  11. { name: 'sd_custprodcode', type: 'string' }, // 客户料号
  12. { name: 'sd_custorispeccode', type: 'string' }, // 客户型号
  13. { name: 'sd_custprodspec', type: 'string' }, // 客户规格
  14. { name: 'sd_qty', type: 'float' }, // 数量
  15. { name: 'sd_produnit', type: 'string' }, // 单位
  16. { name: 'sd_price', type: 'float' }, // 含税单价
  17. { name: 'sd_taxrate', type: 'float' }, // 税率
  18. { name: 'sd_total', type: 'float', // 价税合计
  19. convert: function(v, rec) {
  20. var t = rec.get('sd_price') * rec.get('sd_qty');
  21. return Number(saas.util.BaseUtil.numberFormat(t, 4, false));
  22. },
  23. depends: ['sd_price', 'sd_qty'] },
  24. { name: 'sd_delivery', type: 'string' }, // 交货日期
  25. { name: 'sd_remark', type: 'string' }, // 备注
  26. ],
  27. });