From 496fdac2aeb22dde99a50e43387723f58585bf0a Mon Sep 17 00:00:00 2001 From: jiyufei <67400194@qq.com> Date: Thu, 11 Jul 2024 09:54:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(front):=E9=A6=96=E9=A1=B5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/homeStatistics/index.vue | 55 ++++++------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/jnpf-java-boot/jnpf-web/src/views/homeStatistics/index.vue b/jnpf-java-boot/jnpf-web/src/views/homeStatistics/index.vue index 54a1bfe..3e7c748 100644 --- a/jnpf-java-boot/jnpf-web/src/views/homeStatistics/index.vue +++ b/jnpf-java-boot/jnpf-web/src/views/homeStatistics/index.vue @@ -92,7 +92,7 @@
  • 总金额

    - {{ price.toFixed(2) }}元 + {{ formatPrice(price) }}元

  • @@ -184,7 +184,7 @@
  • 上门回收金额

    - {{ doorRecyclePrice.toFixed(2) }}元 + {{ formatPrice(doorRecyclePrice) }}元

  • @@ -200,7 +200,7 @@
  • 定时回收金额

    - {{ regularRecyclePrice.toFixed(2) }}元 + {{ formatPrice(regularRecyclePrice) }}元

  • @@ -216,7 +216,7 @@
  • 定时回收金额

    - {{ inboundRecyclePrice.toFixed(2) }}元 + {{ formatPrice(inboundRecyclePrice) }}元

  • @@ -234,7 +234,7 @@
  • 账户余额

    - {{ fund.toFixed(2) }}元 + {{ formatPrice(fund) }}元

  • @@ -250,7 +250,7 @@
  • 投递单总金额

    - {{ price.toFixed(2) }}元 + {{ formatPrice(price) }}元

  • @@ -266,7 +266,7 @@
  • 上门回收金额

    - {{ doorRecyclePrice.toFixed(2) }}元 + {{ formatPrice(doorRecyclePrice) }}元

  • @@ -282,7 +282,7 @@
  • 定时回收金额

    - {{ regularRecyclePrice.toFixed(2) }}元 + {{ formatPrice(regularRecyclePrice) }}元

  • @@ -298,7 +298,7 @@
  • 定时回收金额

    - {{ inboundRecyclePrice.toFixed(2) }}元 + {{ formatPrice(inboundRecyclePrice) }}元

  • @@ -357,7 +357,7 @@ export default { beLongCompanyId: [] }, queryData: {}, - + } }, mounted() { @@ -380,6 +380,12 @@ export default { computed: { }, methods: { + formatPrice(price) { + if (price == null || price == undefined) { + return '0.00'; + } + return price.toFixed(2); + }, initDeviceData() { if (this.dataForm.beLongCompanyId == undefined) { this.$message.error('请选择需要查询的商户'); @@ -459,32 +465,6 @@ export default { } }, getbeLongCompanyIdOptions() { - // const index = this.childIndex; - // let templateJsonList = JSON.parse( - // JSON.stringify(this.dataForm.beLongCompanyId) - // ); - // for (let i = 0; i < templateJsonList.length; i++) { - // let json = templateJsonList[i]; - // if (json.relationField) { - // let relationFieldAll = json.relationField.split("-"); - // let val = json.defaultValue; - // if (relationFieldAll.length > 1 && index > -1) { - // val = - // this.dataForm[relationFieldAll[0] + "List"] && - // this.dataForm[relationFieldAll[0] + "List"].length - // ? this.dataForm[relationFieldAll[0] + "List"][index][ - // relationFieldAll[1] - // ] - // : ""; - // } else { - // val = this.dataForm[relationFieldAll]; - // } - // json.defaultValue = val; - // } - // } - // let template = { - // paramList: templateJsonList - // }; getCompanyList().then(res => { let data = res.data; this.beLongCompanyIdOptions = data; @@ -505,8 +485,7 @@ export default { this.orderData(); }, reset() { - this.query = JSON.parse(JSON.stringify(this.queryData)); - this.search(); + this.dataForm = JSON.parse(JSON.stringify(this.queryData)); }, startNumberAnimation() { this.intervalId = setInterval(() => {