优化代码

This commit is contained in:
java110 2021-06-30 15:15:40 +08:00
parent 79c6e2ede9
commit 3ceeb898e7
2 changed files with 11 additions and 1 deletions

View File

@ -57,7 +57,7 @@
<td class="text-center" v-if="fee.computingFormula == '5005' || fee.computingFormula == '9009'">
<div>上期度数:{{fee.preDegrees}}</div>
<div>本期度数:{{fee.curDegrees}}</div>
<div>单价:{{fee.mwPrice && fee.mwPrice >0 ?fee.mwPrice:fee.squarePrice}}</div>
<div>单价:{{_getOnePrice(fee)}}</div>
<div>附加费:{{fee.additionalAmount}}</div>
</td>
<td class="text-center" v-else-if="fee.computingFormula == '6006'">

View File

@ -179,6 +179,16 @@
}
);
},
_getOnePrice: function (fee) {
let _price = fee.mwPrice;
if (!_price) {
return fee.squarePrice;
}
if (parseFloat(_price) > 0) {
return _price;
}
return fee.mwPrice;
}
}
});
})(window.vc);