zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<template>
  <div class="summary" v-if="summaryArr.length">
    <p class="title">
      <span></span>
      物业汇总信息
    </p>
    <el-form inline label-width="165px" size="small">
      <el-form-item v-for="(item,index) in summaryArr" :key="index" :label="item.filedDescription" v-show="item.visible">
        <el-input v-model="item.value" disabled></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import { queryHouseTotalInfo } from "@/api/product";
export default {
  props: ["serialNo", "customerid", "update"],
  data() {
    return {
      summaryArr: []
    };
  },
  created() {
    this.getHouseTotalInfo();
  },
  watch: {
    update(val) {
      if (val) {
        this.getHouseTotalInfo();
        this.$emit("sendUpdate", false);
      }
    }
  },
  methods: {
    // 物业汇总信息查询
    getHouseTotalInfo() {
      const arr = [];
      const nums = []
      queryHouseTotalInfo({
        applyserialno: this.serialNo,
        customerid: this.customerid
      }).then(res => {
        if (JSON.stringify(res.result) != "{}") {
          for (const key in res.result) {
            if (
              key == "totalhouseassessment" ||
              key == "totaloneamt" ||
              key == "totalonebalance" ||
              key == "totaltwoamt" ||
              key == "evstotal" ||
              key == "totalmortgagerate" ||
              key == "totalcreditline" ||
              key == "totaltwobalance"
            ) {
              res.result[key].value = this.formatMoney(res.result[key].value);
            }
            if(res.result[key].orders){
              nums.push(parseInt(res.result[key].orders))
            }
          }
          nums.sort(function(a,b) {
            return a-b
          });
          nums.forEach(val => {
            const obj = {}
            for (const key in res.result) {
              if (val == res.result[key].orders) {
                arr.push(res.result[key]);
              }
            }
          });
          this.summaryArr = arr;
        }
      });
    },
    // 金额格式化
    formatMoney(value) {
      if (value) {
        value =
          parseFloat((value + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
        if (value == "NaN") return;
        let l = value
          .split(".")[0]
          .split("")
          .reverse();
        let r = value.split(".")[1];
        let t = "";
        for (let i = 0; i < l.length; i++) {
          t += l[i] + ((i + 1) % 3 === 0 && i + 1 !== l.length ? "," : "");
        }
        return (
          t
            .split("")
            .reverse()
            .join("") +
          "." +
          r
        );
      }
    }
  }
};
</script>
<style lang="stylus">
  .summary
    margin-bottom 36px
    margin-left 10px
    .el-form
      margin-left 10px
      display: flex
      justify-content: flex-start
      flex-wrap: wrap
      .el-form-item
        display: table
        width: 33.33%
        margin: 0 0 24px 0
        padding-right: 50px
        box-sizing:border-box
        @media (max-width:1280px){
            &{
                width: 40%
            }
        }
        .el-form-item__label
          display: table-cell
          color: #888
          line-height: 16px
        .el-form-item__content
          width 100%
          .el-input__inner
            color #222
</style>