tiaoejilu.vue 4.45 KB
<template>
    <div>  
      <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" :dataSource="tiaoeData"
               :pagination="{ hideOnSinglePage: true }" :scroll="{ x: 800 }" :defaultExpandAllRows="true">
        <span slot="actionOpen" slot-scope="text, record">
          <a-switch size="small" :checked="true" />
        </span>
      </a-table>
    </div>
  </template>
  
  <script>
  import liushui from './liushui'
  import {
    creditAmountDetail,
    creditAmountModify,
    queryCreditTransEnterprisePage,
    queryCreditTransLegalPersonPage,
    queryCreditTransPersonalPage
  } from '@/api/configApi'
  export default {
    name: 'tiaoejilu',
    props: ['detailData', 'tiaoeData', 'customerType',"creditNo"],
    components: {
    },
    data () {
      return {
        title: '调额记录',
        status: '默认',
        // tiaoeData: [],
        columns: [
          {
            title: '序号',
            dataIndex: 'rowIndex',
            key: 'rowIndex',
            width: '150px',
            align: 'center',
            customRender: function (t, r, index) {
              return parseInt(index) + 1
            }
          },
          {
            title: '会员名称',
            align: 'center',
            width: 100,
            dataIndex: 'customerName'
          },
  
          {
            title: '主体类型',
            align: 'center',
            //   width: 100,
            dataIndex: 'customerType',
            customRender: (text, record, index) =>{
              switch (text) {
                case 1:
                  return '个人'
                case 2:
                  return "企业"
              }
            }
          },
          {
            title: '额度编号',
            align: 'center',
            // width: 100,
            dataIndex: 'amountNo'
          },
          {
            title: '原始综合额度',
            align: 'center',
            // width: 100,
            dataIndex: 'originalComprehensiveAmount',
            customRender: (t, r, index) => {
              return this.$numMoney(t)
            }
          },
          {
            title: '调整后综合额度',
            align: 'center',
            // width: 100,
            dataIndex: 'adjustComprehensiveAmount',
            customRender: (t, r, index) => {
              return this.$numMoney(t)
            }
          },
          {
            title: '类型',
            align: 'center',
            dataIndex: 'type',
          },
          {
            title: '操作人',
            align: 'center',
            // width: 100,
  
            dataIndex: 'operationName'
          },
          {
            title: '备注',
            align: 'center',
            width: 100,
            dataIndex: 'remark',
          },
          {
            title: '调额时间',
            align: 'center',
            dataIndex: 'adjustTime'
          }
        ]
      }
    },
    created () {
      console.log('creat')
    },
    mounted () {
      console.log(this.tiaoeData)
      // this.status = this.getStatus()
      // this.getDeteail()
      // this.tiaoeData = this.detailData;
    },
    methods: {
      // getStatus () {
      //   console.log(this.detailData[0].creditStatus)
      //   switch (this.detailData[0].creditStatus) {
      //     case 1:
      //       return '正常'
      //       break
      //     case 2:
      //       return '过期'
      //       break
      //     case 3:
      //       return '锁定'
      //       break
      //   }
      // },
      // queren () {
      //   this.$emit('showxiangqing')
      // },
      close () {
        this.$emit('cancel')
      }
      // detailAccount (record, type) {
      //   console.log('----1')
      //   this.$refs.modalForm.title = '调额记录'
      //   this.$refs.modalForm.edit(record, this.customerType)
      // },
      // 更改状态
      // onChange: function (v) {
      //   let _p = {
      //     nodeStatus: v.nodeStatus == 1 ? 2 : 1,
      //     customerType: this.customerType,
      //     id: v.id
      //   }
      //   creditAmountModify(_p)
      //     .then(res => {
      //       if (res.status.statusCode == 0) {
      //         this.$emit('getDeteail')
      //       } else {
      //         this.$message.warning(res.status.statusReason)
      //       }
      //     })
      //     .finally(() => {
      //       // this.$message.warning(res.status.statusReason)
      //     })
      // }
    }
  }
  </script>