fix🛠️: 金额显示bug

This commit is contained in:
clz 2022-09-09 14:18:38 +08:00
parent 0d4e4ca149
commit 7afb38b831
2 changed files with 9 additions and 2 deletions

View File

@ -4,5 +4,5 @@ docker push registry.cn-hangzhou.aliyuncs.com/fadinglight/bill-react:dev
ssh aliyun "cd /root/docker/bill-sys/; ssh aliyun "cd /root/docker/bill-sys/;
docker compose down; docker compose down;
docker pull registry.cn-hangzhou.aliyuncs.com/fadinglight/bill-go:dev; docker pull registry.cn-hangzhou.aliyuncs.com/fadinglight/bill-react:dev;
docker compose up -d" docker compose up -d"

View File

@ -80,7 +80,14 @@ export class Bill {
} }
getTotalMoney(type?: BillType) { getTotalMoney(type?: BillType) {
return !type ? this.totalMoney : type === BillType.income ? this.incomeMoney : this.consumeMoney switch (type) {
case BillType.income:
return this.incomeMoney
case BillType.consume:
return this.consumeMoney
default:
return this.totalMoney
}
} }
get meanMoneyByDate() { get meanMoneyByDate() {