|
@@ -1628,9 +1628,15 @@ export default {
|
|
|
// 计算直接观察成新率(操作Table Row数据)
|
|
|
countDepreciationRate(row) {
|
|
|
row.depreciationRateByAge =
|
|
|
- (row.economicServiceLife - row.yearsInUse) / row.economicServiceLife < 0.15
|
|
|
- ? ((row.remainingUsefulLife * 1) / (row.yearsInUse * 1 + row.remainingUsefulLife * 1)).toFixed(2) * 100
|
|
|
- : ((row.economicServiceLife - row.yearsInUse) / row.economicServiceLife).toFixed(2) * 100
|
|
|
+ (row.economicServiceLife - (getDaysBetween(row.activationDate,
|
|
|
+ this.calculateBaseInfo.valuationBasisDate) /
|
|
|
+ 365).toFixed(2)) / row.economicServiceLife < 0.15
|
|
|
+ ? ((row.remainingUsefulLife * 1) / ((getDaysBetween(row.activationDate,
|
|
|
+ this.calculateBaseInfo.valuationBasisDate) /
|
|
|
+ 365).toFixed(2) * 1 + row.remainingUsefulLife * 1)).toFixed(2) * 100
|
|
|
+ : ((row.economicServiceLife - (getDaysBetween(row.activationDate,
|
|
|
+ this.calculateBaseInfo.valuationBasisDate) /
|
|
|
+ 365).toFixed(2)) / row.economicServiceLife).toFixed(2) * 100
|
|
|
/**
|
|
|
* 年限成新率个位<=2成新率个位为0不进位
|
|
|
* 年限成新率个位>=8个位为0进一位
|
|
@@ -1809,13 +1815,14 @@ export default {
|
|
|
mostSimilar() {
|
|
|
for (let index = 0; index < this.eqptPageData.length; index++) {
|
|
|
for (const item of this.eqptLifeIfrRefs) {
|
|
|
- if (this.eqptPageData[index].equipmentName.includes(item.type) && this.eqptPageData[index].economicServiceLife && this.eqptPageData[index].installationRate) {
|
|
|
- this.eqptPageData[index].economicServiceLife = item.lifeRecommendedValue
|
|
|
- this.eqptPageData[index].installationRate = item.ifrRecommendedValue
|
|
|
+ // 判断设备名称包含type名称且经济使用年限与安装费率是否为空
|
|
|
+ if (this.eqptPageData[index].equipmentName.includes(item.type) && !this.eqptPageData[index].economicServiceLife && !this.eqptPageData[index].installationRate) {
|
|
|
+ this.eqptPageData[index].economicServiceLife = item.lifeRecommendedValue;
|
|
|
+ this.eqptPageData[index].installationRate = item.ifrRecommendedValue;
|
|
|
// 计算年限成新率
|
|
|
this.eqptPageData[index].yearsInUse = (
|
|
|
this.getDaysBetween(this.eqptPageData[index].activationDate, this.calculateBaseInfo.valuationBasisDate) / 365
|
|
|
- ).toFixed(2)
|
|
|
+ ).toFixed(2);
|
|
|
this.eqptPageData[index].depreciationRateByAge =
|
|
|
((this.eqptPageData[index].economicServiceLife * 1 - this.eqptPageData[index].yearsInUse * 1) /
|
|
|
this.eqptPageData[index].economicServiceLife) *
|