BasicInformation.vue 1.8 KB
<template>
  <div class="customer-management-information-content">
    <table-double-view
      :keyValue="keyValueDouble"
      :data="dataBasic"
    ></table-double-view>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import TableDoubleView from "@/public/TableDoubleView.vue";
import { NativeUI } from "@/public/ts/NativeUI";
import nettyApi from "@/constants/api/ms-netty/netty.api.ts";
import IF from "@/public/factory/InterFaceFactory";
import Public from "@/public/ts/Public";
import { parse } from "mathjs";
/**
 * @Description 基础信息
 * @Author JiangTao
 * @Date 2021-11-10 下午 04:30
 */
@Component({
  name: "BasicInformation",
  components: { TableDoubleView },
})
export default class BasicInformation extends Vue {
  keyValueDouble = {
    INCOMESOURCE: "家庭经济来源",
    FAMILYMONTHASSETS: "家庭月负债",
    ASSETNUM: "本地拥有不动产套数",
  };
  dataBasic: any = {};
  mounted() {
    this.selectBasicInfo();
  }
  //查询个人基本信息
  selectBasicInfo() {
    const param = {
      CUSTOMERID: this.$route.query.CUSTOMERID,
      tc: nettyApi.TRADE_CODE.selectPersonalBasicInfo,
    };
    NativeUI.showWaiting("正在查询...");
    return IF.transferDataInter(nettyApi.commonRq, param).then((res: any) => {
      NativeUI.closeWaiting();
      if (res.rc == "1") {
        if (res.FinanceInfoJc && res.FinanceInfoJc.length > 0) {
          this.dataBasic = res.FinanceInfoJc[0];
          this.dataBasic.FAMILYMONTHASSETS = Public.formatMoney(
            this.dataBasic.FAMILYMONTHASSETS,
            ","
          );
          this.dataBasic.ASSETNUM = parseInt(this.dataBasic.ASSETNUM);
        }
      } else {
        NativeUI.toast(res.msg);
      }
    });
  }
}
</script>

<style scoped></style>