| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- Ext.define('saas.model.sale.SaleOutDetail', {
- extend: 'saas.model.Base',
- fields: [
- { name: 'id', type: 'int' },
- { name: 'pd_prodid', type: 'int' }, // 物料id
- { name: 'pd_prodcode', type: 'string' }, // 物料编号
- { name: 'pr_brand', type: 'string' }, // 品牌
- { name: 'pr_detail', type: 'string' }, // 名称
- { name: 'pr_orispeccode', type: 'string' }, // 型号
- { name: 'pr_spec', type: 'string' }, // 规格
- { name: 'pd_outqty', type: 'int' }, // 出货数量
- { name: 'pr_unit', type: 'string' }, // 单位
- { name: 'pd_whid', type: 'int' }, // 仓库id
- { name: 'pd_whcode', type: 'float' }, // 仓库编号
- { name: 'pd_whname', type: 'string' }, // 仓库
- { name: 'pd_taxrate', type: 'float' }, // 税率
- { name: 'pd_netprice', type: 'float' }, // 单价
- { name: 'pd_sendprice', type: 'float', // 含税单价
- convert: function(v, rec) {
- return rec.get('pd_netprice') * (1 + rec.get('pd_taxrate') / 100);
- },
- depends: ['pd_netprice', 'pd_taxrate']
- },
- { name: 'pd_nettotal', type: 'float', // 金额
- convert: function(v, rec) {
- return rec.get('pd_netprice') * rec.get('pd_outqty');
- },
- depends: ['pd_netprice', 'pd_outqty']
- },
- { name: 'pd_ordertotal', type: 'float', // 价税合计
- convert: function(v, rec) {
- return rec.get('pd_sendprice') * rec.get('pd_outqty');
- },
- depends: ['pd_sendprice', 'pd_outqty']
- },
- { name: 'pd_taxamount', type: 'float', // 税额
- convert: function(v, rec) {
- return rec.get('pd_ordertotal') - rec.get('pd_nettotal');
- },
- depends: ['pd_ordertotal', 'pd_nettotal']
- },
- { name: 'pd_ordercode', type: 'string' }, // 销售单号
- { name: 'pd_orderdetno', type: 'string' }, // 销售序号
- { name: 'pd_remark', type: 'string' }, // 备注
- ],
- //一对一映射
- associations: [{ type: 'hasOne', model: 'saas.model.document.Product', associationKey: 'productDTO'}]
- });
|