<template>
  <div class="customer-management-information-content">
    <div v-for="(item, index) in dataList" :key="index">
      <table-double-view :keyValue="keyValueDouble" :data="item"></table-double-view>
      <div style="height: 1px;background-color: #e0e1e2;border-left: 100px solid #fff;border-right: 100px solid #fff"></div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { NativeUI } from "@/public/ts/NativeUI";
import nettyApi from "@/constants/api/ms-netty/netty.api.ts";
import IF from "@/public/factory/InterFaceFactory";
import TableDoubleView from "@/public/TableDoubleView.vue";
import Public from "@/public/ts/Public";
/**
 * @Description 收入信息
 * @Author JiangTao
 * @Date 2021-11-10 下午 04:30
 */
@Component({
  name: "IncomeInformation",
  components: { TableDoubleView },
})
export default class IncomeInformation extends Vue {
  keyValueDouble = {
    FINANCIALITEM: "收入类型",
    DOCUMENTTYPEName: "收入证明材料",
    CURRENCY: "收入币种",
    AMOUNT: "收入金额(元)",
  };
  dataList: any = [];
  dataBasic: any = {};
  mounted() {
    this.selectBasicInfo();
  }
  //查询个人基本信息
  selectBasicInfo() {
    this.dataList = [];
    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.FinanceInfoSr && res.FinanceInfoSr.length > 0) {
          // this.dataList = res.FinanceInfoSr;
          for (let i = 0; i < res.FinanceInfoSr.length; i++) {
            this.dataBasic = res.FinanceInfoSr[i];
            this.dataBasic.AMOUNT = Public.formatMoney(this.dataBasic.AMOUNT,',');
            this.dataList.push( this.dataBasic);
          }
        }
      } else {
        NativeUI.toast(res.msg);
      }
    });
  }
}
</script>

<style scoped></style>
