ronghouhuifang.vue 11.2 KB
<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="6" :sm="12">
            <a-form-item label="客户编号">
              <a-input placeholder="输入客户编号" v-model="queryParam.customerNo"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="12">
            <a-form-item label="客户名称">
              <a-input placeholder="客户名称" v-model="queryParam.customerName"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="12">
            <a-form-item label="借款编号">
              <a-input placeholder="借款编号" v-model="queryParam.billNo"></a-input>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
            <a-col :md="6" :sm="8">
              <a-form-item label="回访方式">
                <a-select v-model="queryParam.revisitType" placeholder="请选择回访方式">
                  <a-select-option value="1">电话</a-select-option>
                  <a-select-option value="0">登门</a-select-option>
                  <a-select-option value="2">三方验证</a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="回访原因">
                <a-select v-model="queryParam.revisitReason" placeholder="请选择回访原因">
                  <a-select-option value="0">首期检查</a-select-option>
                  <a-select-option value="1">常规检查</a-select-option>
                  <a-select-option value="2">特定检查</a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="12">
              <a-form-item label="组织机构">
                <a-input placeholder="组织机构" v-model="queryParam.businessDepartmentName"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="申请时间" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
                <a-date-picker
                  style="width: 100%"
                  :disabledDate="disabledStartDate"
                  :format="dateFormat"
                  v-model="applyDateStart"
                  @change="onChangeApplyDateStart"
                />
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="8">
              <a-form-item label="至" :labelCol="{ span: 8 }" :wrapperCol="{ span: 16 }">
                <a-date-picker
                  style="width: 100%"
                  :disabledDate="disabledEndDate"
                  :format="dateFormat"
                  v-model="applyDateEnd"
                  @change="onChangeApplyDateEnd"
                />
              </a-form-item>
            </a-col>
          </template>
          <a-col :md="6" :sm="8">
            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button @click="searchReset" icon="reload" style="margin-left: 8px">重置 </a-button>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
              </a>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>

    <!-- 操作按钮区域 -->
    <div class="table-operator" style="border-top: 5px">
      <a-button @click="handleAdds" type="primary" icon="plus">新增</a-button>
    </div>

    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        bordered
        size="middle"
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :scroll="{ x: '100%' }"
        @change="handleTableChange"
      >
        <span slot="action" slot-scope="text, record">
          <a-button type="link" size="small" @click="handleLook(record)" icon="search" style="font-size: 12px"
            >查看</a-button
          >
          <a-divider type="vertical" />
          <a-button type="link" size="small" @click="handleEdits(record)" icon="edit" style="font-size: 12px"
            >修改</a-button
          >
        </span>
        <div
          style="maxwidth: 180px;whitespace: nowrap;textoverflow: ellipsis;overflow: hidden;wordwrap: break-word;wordbreak: break-all;"
          slot="revisitContent"
          slot-scope="text, record"
        >
          <a-tooltip placement="left">
            <template slot="title">
              <span>{{ record.revisitContent }}</span>
            </template>
            {{ record.revisitContent }}
          </a-tooltip>
        </div>
      </a-table>
    </div>
    <!-- table区域-end -->
    <BusinessChannelsModal ref="modalForm" @editReload="editReload"></BusinessChannelsModal>
  </a-card>
</template>
  <script>
import BusinessChannelsModal from './modules/businessChannelsModal'
import { putAction } from '@/api/manage'
import { frozenBatch } from '@/api/api'
import { setBusinessChannelStatus, queryRevisitDetails } from '@/api/configApi'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import JInput from '@/components/jeecg/JInput'
import { formatAmount, formatAmountFen, reverseAmountFen, reverseAmount } from '@/utils/format'
export default {
  name: 'zijinfangList',
  mixins: [JeecgListMixin, DisabledAuthFilterMixin],
  components: {
    BusinessChannelsModal,
    JInput,
  },
  data() {
    return {
      description: '这是用户管理页面',
      queryParam: {},
      dateFormat: 'YYYY-MM-DD 00:00:00',
      applyDateStart: undefined,
      applyDateEnd: undefined,
      columns: [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          width: 55,
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
        },
        {
          title: '客户编号',
          align: 'center',
          dataIndex: 'customerNo',
          width: 300,
        },
        {
          title: '客户名称',
          align: 'center',
          dataIndex: 'customerName',
          width: 300,
        },
        {
          title: '借款编号',
          align: 'center',
          dataIndex: 'billNo',
          width: 300,
        },
        {
          title: '借款金额',
          align: 'center',
          dataIndex: 'applyMoney',
          width: 220,
          customRender: (t, r, index) => {
            return this.$numMoney(t)
          },
        },
        {
          title: '当前账期',
          align: 'center',
          dataIndex: 'stagesIndex',
          width: 180,
        },
        {
          title: '年化利率(%)',
          align: 'center',
          dataIndex: 'interestRate',
          width: 180,
        },
        {
          title: '还款状态',
          align: 'center',
          dataIndex: 'payStatus',
          width: 180,
          customRender: (t, r, index) => {
            if (t == 10) {
              return '已还清'
            } else if (t == 20) {
              return '待还款'
            } else if (t == 30) {
              return '还款处理中'
            } else if (t == 40) {
              return '已取消'
            }
          },
        },
        {
          title: '回访日期',
          align: 'center',
          dataIndex: 'revisitDate',
          width: 180,
        },
        {
          title: '回访方式',
          align: 'center',
          dataIndex: 'revisitType',
          width: 180,
          customRender: (t, r, index) => {
            if (t == 0) {
              return '登门'
            } else if (t == 1) {
              return '电话'
            } else if (t == 2) {
              return '还款处理中'
            }
          },
        },
        {
          title: '回访原因',
          align: 'center',
          dataIndex: 'revisitReason',
          width: 200,
          customRender: (t, r, index) => {
            if (t == 0) {
              return '首期检查'
            } else if (t == 1) {
              return '常规检查'
            } else if (t == 2) {
              return '特定检查'
            }
          },
        },
        {
          title: '回访内容',
          align: 'center',
          dataIndex: 'revisitContent',
          width: 180,
          scopedSlots: { customRender: 'revisitContent' },
        },
        {
          title: '组织机构',
          align: 'center',
          dataIndex: 'businessDepartmentName',
          width: 220,
        },
        {
          title: '回访人',
          align: 'center',
          dataIndex: 'revisitUser',
          width: 200,
        },
        {
          title: '新建时间',
          align: 'center',
          dataIndex: 'createTime',
          width: 180,
        },
        {
          title: '更新时间',
          align: 'center',
          dataIndex: 'updateTime',
          width: 180,
        },
        {
          title: '操作',
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' },
          align: 'center',
          width: 180,
          fixed: 'right',
        },
      ],
      url: {
        list: '/loantrade/admin/afterFinancingManagement/queryRevisitRecords',
      },
    }
  },
  created() {
    this.disableMixinCreated = true
    this.columns = this.preFilter(this.columns, 'businessChannels:')
    this.loadData()
  },
  computed: {},
  methods: {
    getAvatarView: function (avatar) {
      return this.url.imgerver + '/' + avatar
    },
    editReload() {
      this.loadData()
    },
    handleEdits(username) {
      queryRevisitDetails({ billNo: username.billNo })
        .then((res) => {
          if (res.status.statusCode == 0) {
            this.$refs.modalForm.edit(res.result)
          } else {
            this.$message.warning(res.status.statusReason)
          }
        })
        .finally(() => {})
      this.$refs.modalForm.disableSubmit = false
      this.$refs.modalForm.onlyread = true
    },
    handleLook(username) {
      queryRevisitDetails({ billNo: username.billNo })
        .then((res) => {
          if (res.status.statusCode == 0) {
            this.$refs.modalForm.edit(res.result)
          } else {
            this.$message.warning(res.status.statusReason)
          }
        })
        .finally(() => {})
      this.$refs.modalForm.disableSubmit = true
      this.$refs.modalForm.onlyread = true
    },
    handleAdds() {
      this.$refs.modalForm.add()
      this.$refs.modalForm.disableSubmit = false
      this.$refs.modalForm.onlyread = true
    },
    // 停用启用
    onChange: function (v) {
      let _p = {
        id: v.id,
        status: v.status == 1 ? 2 : 1,
      }
      setBusinessChannelStatus(_p).then((res) => {
        this.loadData()
      })
    },
  },
}
</script>
  <style scoped>
@import '~@assets/less/common.less';
</style>