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(() => {