123456789101112131415161718192021222324252627282930313233 |
- Ext.define('make.model.osmake.OsMakeScrapDetail', {
- extend: 'saas.model.Base',
- fields: [
- { name: 'id', type: 'int' }, // id
- { name: 'md_detno', type: 'int' }, // 序号
- { name: 'md_prodid', type: 'int' }, // 物料id
- { name: 'md_prodcode', type: 'string' }, // 物料编号
- { name: 'md_qty', type: 'float' }, // 数量
- { name: 'pr_unit', type: 'string' }, // 单位
- { name: 'md_price', type: 'float'}, // 单价
- { name: 'md_total', type: 'float', // 金额
- convert: function(v, rec) {
- var t = rec.get('md_price') * rec.get('md_qty');
- return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
- },
- depends: ['md_price', 'md_qty']
- },
- { name: 'md_maid', type: 'int' }, // 工单id
- { name: 'md_mmid', type: 'int' }, // 用料表id
- { name: 'md_omacode', type: 'string' }, // 采购单号
- { name: 'md_mmdetno', type: 'int' }, // 工单序号
- { name: 'md_remark', type: 'string' }, // 备注
- { name: 'md_text1', type: 'string' },
- { name: 'md_text2', type: 'string' },
- { name: 'md_text3', type: 'string' },
- { name: 'md_text4', type: 'string' },
- { name: 'md_text5', type: 'string' },
- ],
- //一对一映射
- associations: [{ type: 'hasOne', model: 'saas.model.document.ProductDTO', associationKey: 'ProductDTO'}]
- });
|