|
|
@@ -0,0 +1,64 @@
|
|
|
+Ext.define('saas.model.stock.AppropriationInOut', {
|
|
|
+ extend: 'saas.model.Base',
|
|
|
+
|
|
|
+ fields: [
|
|
|
+
|
|
|
+ { name: 'id', type: 'int' }, // id
|
|
|
+ { 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: 'float' }, // 数量
|
|
|
+ { name: 'pr_unit', type: 'string' }, // 单位
|
|
|
+ { name: 'pd_netprice', type: 'float' }, // 单价
|
|
|
+ { name: 'pd_orderprice', type: 'float', // 含税单价
|
|
|
+ // convert: function(v, rec) {
|
|
|
+ // var t = rec.get('pd_netprice') * (1 + rec.get('pd_taxrate') / 100);
|
|
|
+ // return Number(saas.util.BaseUtil.numberFormat(t, 4, false));
|
|
|
+ // },
|
|
|
+ // depends: ['pd_netprice', 'pd_taxrate']
|
|
|
+ },
|
|
|
+ { name: 'pd_nettotal', type: 'float', // 金额
|
|
|
+ // convert: function(v, rec) {
|
|
|
+ // var t = rec.get('pd_netprice') * rec.get('pd_outqty');
|
|
|
+ // return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
|
|
|
+ // },
|
|
|
+ // depends: ['pd_netprice', 'pd_outqty']
|
|
|
+ },
|
|
|
+ { name: 'pd_taxrate', type: 'float' }, // 税率
|
|
|
+ { name: 'pd_taxamount', type: 'float', // 税额
|
|
|
+ // convert: function(v, rec) {
|
|
|
+ // var t = rec.get('pd_ordertotal') - rec.get('pd_nettotal');
|
|
|
+ // return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
|
|
|
+ // },
|
|
|
+ // depends: ['pd_ordertotal', 'pd_nettotal']
|
|
|
+ },
|
|
|
+ { name: 'pd_ordertotal', type: 'float', // 价税合计
|
|
|
+ // convert: function(v, rec) {
|
|
|
+ // var t = rec.get('pd_orderprice') * rec.get('pd_outqty');
|
|
|
+ // return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
|
|
|
+ // },
|
|
|
+ // depends: ['pd_orderprice', 'pd_outqty']
|
|
|
+ },
|
|
|
+ { name: 'pd_whid', type: 'int' }, // 拨出仓库id
|
|
|
+ { name: 'pd_whcode', type: 'string' }, // 拨出仓库编号
|
|
|
+ { name: 'pd_whname', type: 'string' }, // 拨出仓库
|
|
|
+ { name: 'pd_inwhid', type: 'int' }, // 拨入仓库id
|
|
|
+ { name: 'pd_inwhcode', type: 'string' }, // 拨入仓库编号
|
|
|
+ { name: 'pd_inwhname', type: 'string' }, // 拨入仓库
|
|
|
+ { name: 'pd_ioid', type: 'int' }, // 验收明细id
|
|
|
+ { name: 'iocode', type: 'string' }, // 验收单号
|
|
|
+ { name: 'iodetno', type: 'int' }, // 验收序号
|
|
|
+ { name: 'pd_remark', type: 'string' }, // 备注
|
|
|
+
|
|
|
+ { name: 'pd_text1', type: 'string' },
|
|
|
+ { name: 'pd_text2', type: 'string' },
|
|
|
+ { name: 'pd_text3', type: 'string' },
|
|
|
+ { name: 'pd_text4', type: 'string' },
|
|
|
+ { name: 'pd_text5', type: 'string' }
|
|
|
+ ],
|
|
|
+ //一对一映射
|
|
|
+ associations: [{ type: 'hasOne', model: 'saas.model.document.ProductDTO', associationKey: 'ProductDTO'}]
|
|
|
+});
|