|
@@ -19,13 +19,18 @@ let defaultDecimal = {
|
|
|
let decimalObj = Object.create(null);
|
|
|
|
|
|
decimalObj.decimal = function (field, node) {
|
|
|
- if(field.sameText('unitFee')){
|
|
|
- field = 'unitPrice';
|
|
|
- }
|
|
|
- else if(field.sameText('totalFee')){
|
|
|
- field = 'totalPrice';
|
|
|
+ if(isDef(field)){
|
|
|
+ if(field.sameText('unitFee')){
|
|
|
+ field = 'unitPrice';
|
|
|
+ }
|
|
|
+ else if(field.sameText('totalFee')){
|
|
|
+ field = 'totalPrice';
|
|
|
+ }
|
|
|
}
|
|
|
- if(!isDef(node) && isDef(field)){
|
|
|
+ if(!isDef(node)){
|
|
|
+ if(!isDef(field)){
|
|
|
+ return this.process;
|
|
|
+ }
|
|
|
let fields = field.split('.');
|
|
|
let fieldDecimal = fields.length === 2 ? this[fields[0]][fields[1]] : this[fields[0]];
|
|
|
return fieldDecimal ? fieldDecimal : this.process;
|
|
@@ -46,6 +51,7 @@ decimalObj.decimal = function (field, node) {
|
|
|
return returnV(this['glj'][field], this.process);
|
|
|
}
|
|
|
}
|
|
|
+ return this[field]? this[field] : this.process;
|
|
|
};
|
|
|
|
|
|
/*decimalObj.decimal = function (field, node) {
|