Explorar o código

feat:新增授信管理模块、修复企业管理某些bug

lazy hai 6 días
pai
achega
400f3b0167

+ 19 - 0
src/api/creditManagement/index.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 授信列表
+export function getAuthCreditList(data) {
+  return request({
+    url: '/creditManagementInfo/list',
+    method: 'post',
+    data
+  })
+}
+
+// 刷新授信状态
+export function refreshCreditStatus(params) {
+  return request({
+    url: '/creditManagementInfo/refreshCreditStatus',
+    method: 'get',
+    params
+  })
+}

+ 2 - 0
src/router/index.js

@@ -7,6 +7,7 @@ import enterpriseManage from './moudules/enterpriseManage'
 import capitalManage from './moudules/capitalManage'
 import storeManage from './moudules/storeManage'
 import monitorManage from './moudules/monitorManage'
+import creditManage from './moudules/creditManage'
 
 Vue.use(Router)
 
@@ -50,6 +51,7 @@ export const constantRoutes = [
   },
   storeManage,
   enterpriseManage,
+  creditManage,
   capitalManage,
   userManagement,
   monitorManage,

+ 32 - 0
src/router/moudules/creditManage.js

@@ -0,0 +1,32 @@
+/* Layout */
+import Layout from '@/layout'
+
+export default {
+  path: '/creditManagement',
+  component: Layout,
+  name: 'EreditManagement',
+  alwaysShow: true,
+  redirect: '/authCreditList',
+  meta: {
+    title: '授信管理',
+    icon: 'creditInfoManagement'
+  },
+  children: [
+    {
+      path: '/authCreditList',
+      name: 'ESign', // AuthCreditList
+      component: () => import('@/views/creditManagement/index.vue'),
+      meta: { title: '授信管理' },
+      hidden: false,
+      children: [
+        {
+          path: '/creditManagementView',
+          name: 'CreditManagementView',
+          meta: { title: '授信详情', activeMenu: '/authCreditList' },
+          hidden: false,
+          component: () => import('@/views/creditManagement/creditManagementView.vue')
+        }
+      ]
+    }
+  ]
+}

+ 1 - 1
src/router/moudules/enterpriseManage.js

@@ -53,7 +53,7 @@ export default {
               name: 'EnterpriseEntryRecord',
               meta: { title: '准入记录', activeMenu: '/enterpriseEntry' },
               hidden: false,
-              component: () => import('@/views/enterpriseManage/enterpriseEntry/EnterpriseEntryRecord.vue'),
+              component: () => import('@/views/enterpriseManage/enterpriseEntry/EnterpriseEntryRecord.vue')
             }
           ]
         },

+ 2 - 1
src/store/modules/constant.js

@@ -43,7 +43,8 @@ export default {
       payCollectionMethod: [], // 资方管理 - 回款方式
       payBackMethod: [], // 资方管理 - 还款方式
       CreditStatus: [], // 资方管理 - 授信状态
-      accountBindingStatus: [] //  监测管理 - 账户绑定状态
+      accountBindingStatus: [], //  监测管理 - 账户绑定状态
+      enterpriseCreditStatus: [] // 授信管理 - 授信状态
     }
   },
   mutations: {

+ 124 - 0
src/views/creditManagement/components/AuditResult.vue

@@ -0,0 +1,124 @@
+<template>
+  <div class="basic-info">
+    <cy-info-title>企业信息</cy-info-title>
+    <el-form
+      ref="formRef"
+      :model="ruleForm"
+      :rules="rules"
+      label-position="top"
+      label-width="150px"
+      class="rule-form-orange"
+    >
+      <el-form-item label="申请日期" prop="gmtCreate">
+        <el-input v-model="ruleForm.gmtCreate" placeholder="请输入申请日期" :disabled="disabled" />
+      </el-form-item>
+      <el-form-item label="申请状态" prop="replyStatus">
+        <el-input :value="getReplyStatusDesc" placeholder="请输入申请状态" :disabled="disabled" />
+      </el-form-item>
+      <el-form-item label="授信总额度" prop="creditAmount">
+        <cy-amount-input v-model="ruleForm.creditAmount" placeholder="请输入授信总额度" :disabled="disabled" />
+      </el-form-item>
+      <el-form-item label="循环标志" prop="loopFlag">
+        <el-input :value="ruleForm.loopFlag ? (ruleForm.loopFlag === 1 ? '是' : '否') : ''" placeholder="请输入循环标志" :disabled="disabled" />
+      </el-form-item>
+      <el-form-item label="生效日期" prop="creditStartDate">
+        <el-input v-model="ruleForm.creditStartDate" placeholder="请输入生效日期" :disabled="disabled" />
+      </el-form-item>
+      <el-form-item label="失效日期" prop="creditEndDate">
+        <el-input v-model="ruleForm.creditEndDate" placeholder="请输入失效日期" :disabled="disabled" />
+      </el-form-item>
+      <el-form-item v-if="ruleForm.approvalConclusion !== 'pass'" label="拒绝原因" prop="approvalComments" style="width: 100%;">
+        <el-input v-model="ruleForm.approvalComments" placeholder="请输入拒绝原因" :disabled="disabled" />
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    detailsInfo: {
+      type: Object,
+      default: () => {}
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      ruleForm: {
+        gmtCreate: '',
+        replyStatus: '',
+        approvalConclusion: '',
+        approvalComments: '',
+        creditAmount: '',
+        loopFlag: '',
+        creditStartDate: '',
+        creditEndDate: ''
+      },
+      rules: {}
+    }
+  },
+  computed: {
+    getReplyStatusDesc() {
+      if (this.ruleForm.approvalConclusion !== '' || this.ruleForm.approvalConclusion !== null) {
+        if (this.ruleForm.approvalConclusion === 'pass') {
+          return '通过'
+        }
+        return '退回'
+      }
+      return ''
+    }
+  },
+  watch: {
+    detailsInfo: {
+      handler(newV) {
+        console.log('audit result-----------', newV)
+        if (newV && Object.keys(newV)) {
+          const {
+            gmtCreate,
+            replyStatus,
+            approvalConclusion,
+            approvalComments,
+            creditAmount,
+            loopFlag,
+            creditStartDate,
+            creditEndDate
+          } = JSON.parse(JSON.stringify(newV))
+          this.ruleForm = {
+            gmtCreate,
+            replyStatus,
+            approvalConclusion,
+            approvalComments,
+            creditAmount,
+            loopFlag,
+            creditStartDate,
+            creditEndDate
+          }
+        }
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    getPrams(type) {
+      return new Promise((resolve) => {
+        if (type === 'temp') {
+          resolve(this.ruleForm)
+        }
+        if (type === 'submit') {
+          this.$refs.formRef.validate((valid) => {
+            if (valid) {
+              resolve(this.ruleForm)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 88 - 0
src/views/creditManagement/components/BasicInfo.vue

@@ -0,0 +1,88 @@
+<template>
+  <div class="basic-info">
+    <cy-info-title>企业信息</cy-info-title>
+    <el-form
+      ref="formRef"
+      :model="ruleForm"
+      :rules="rules"
+      label-position="top"
+      label-width="150px"
+      class="rule-form-orange"
+    >
+      <el-form-item label="客户类型" prop="typeName">
+        <el-input v-model="ruleForm.typeName" placeholder="请输入客户类型" disabled />
+      </el-form-item>
+      <el-form-item label="供应商名称" prop="enterpriseName">
+        <el-input v-model="ruleForm.enterpriseName" placeholder="请输入供应商名称" disabled />
+      </el-form-item>
+      <el-form-item label="统一社会信用代码" prop="socialCreditCode">
+        <el-input v-model="ruleForm.socialCreditCode" placeholder="请输入统一社会信用代码" disabled />
+      </el-form-item>
+      <el-form-item label="资方" prop="socialCreditCode">
+        <el-input v-model="ruleForm.socialCreditCode" placeholder="请输入资方名称" disabled />
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    baseInfo: {
+      type: Object,
+      default: () => {}
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      ruleForm: {
+        typeName: '',
+        enterpriseName: '',
+        socialCreditCode: ''
+      },
+      rules: {
+        typeName: [{ required: true, message: '请选择企业类别', trigger: 'blur' }],
+        enterpriseName: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
+        socialCreditCode: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }]
+      }
+    }
+  },
+  watch: {
+    baseInfo: {
+      handler(newV) {
+        if (newV && Object.keys(newV)) {
+          const { companyType, companyName, code } = JSON.parse(JSON.stringify(newV))
+          this.ruleForm = {
+            typeName: companyType,
+            enterpriseName: companyName,
+            socialCreditCode: code
+          }
+        }
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    getPrams(type) {
+      return new Promise((resolve) => {
+        if (type === 'temp') {
+          resolve(this.ruleForm)
+        }
+        if (type === 'submit') {
+          this.$refs.formRef.validate((valid) => {
+            if (valid) {
+              resolve(this.ruleForm)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 203 - 0
src/views/creditManagement/components/ContactInfo.vue

@@ -0,0 +1,203 @@
+<template>
+  <div class="contact-info">
+    <el-form
+      ref="ruleFormRef"
+      :model="ruleForm"
+      :rules="rules"
+      label-position="top"
+      label-width="150px"
+      class="rule-form-orange"
+    >
+      <cy-info-title>企业联系人信息</cy-info-title>
+      <el-form-item label="联系人名字" prop="contactPerson">
+        <el-input
+          v-model="ruleForm.contactPerson"
+          :disabled="disabled"
+          placeholder="请输入联系人名字"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="联系人手机号码" prop="contactPhone">
+        <el-input
+          v-model="ruleForm.contactPhone"
+          :disabled="disabled || verifyEmailStatus"
+          placeholder="请输入手机号码"
+        ></el-input>
+      </el-form-item>
+      <el-form-item v-if="!disabled" label="验证码" class="form-required">
+        <el-input
+          v-model="ruleForm.phoneCode"
+          placeholder="请输入验证码"
+          type="text"
+          tabindex="1"
+          auto-complete="on"
+        >
+          <template #append>
+            <div style="display: flex;">
+              <verification-code
+                :code="ruleForm.contactPhone"
+                module="other"
+                type="phone"
+                placeholder="手机号码"
+              />
+              <!-- <el-button v-if="showVerifyPhoneBtn" @click="handleVerifyPhone">验证</el-button> -->
+            </div>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="联系人邮箱地址" prop="contactEmail">
+        <el-input
+          v-model="ruleForm.contactEmail"
+          :disabled="disabled || verifyEmailStatus"
+          placeholder="请输入邮箱地址"
+        ></el-input>
+      </el-form-item>
+      <el-form-item v-if="!disabled" label="验证码" class="form-required">
+        <el-input
+          v-model="ruleForm.emailCode"
+          placeholder="请输入验证码"
+          type="text"
+          tabindex="1"
+          auto-complete="on"
+        >
+          <template #append>
+            <div style="display: flex;">
+              <verification-code
+                :code="ruleForm.contactEmail"
+                module="other"
+                type="email"
+                placeholder="邮箱地址"
+              />
+              <!-- <el-button v-if="showVerifyEmailBtn" @click="handleVerifyEmail">验证</el-button> -->
+            </div>
+          </template>
+        </el-input>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<script>
+// import { verifyCode } from '@/api/common'
+
+export default {
+  components: {
+    verificationCode: () => import('@/components/VerificationCode/index.vue')
+  },
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false
+    },
+    detailsInfo: {
+      type: Object,
+      default: () => {}
+    }
+  },
+  data() {
+    return {
+      ruleForm: {
+        contactPerson: '',
+        contactPhone: '',
+        phoneCode: '',
+        contactEmail: '',
+        emailCode: ''
+      },
+      rules: {
+        contactPerson: [{ required: true, message: '请输入联系人姓名', trigger: 'blur' }],
+        contactPhone: [{ required: true, message: '请输入联系人电话', trigger: 'blur' }],
+        contactEmail: [{ required: true, message: '请输入联系人邮箱', trigger: 'blur' }]
+      },
+      showVerifyPhoneBtn: false,
+      showVerifyEmailBtn: false,
+      verifyPhoneStatus: false,
+      verifyEmailStatus: false
+    }
+  },
+  watch: {
+    detailsInfo: {
+      handler(val) {
+        if (Object.keys(val).length) {
+          const { contactPerson, contactPhone, contactEmail } = val
+          this.ruleForm = {
+            contactPerson,
+            contactPhone,
+            contactEmail
+          }
+        }
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    getParams(type) {
+      return new Promise((resolve) => {
+        if (type === 'temp') {
+          resolve(this.ruleForm)
+        } else {
+          if (!this.ruleForm.phoneCode) {
+            this.$message.warning('请输入手机验证码')
+            return
+          }
+          if (!this.ruleForm.emailCode) {
+            this.$message.warning('请输入邮箱验证码')
+            return
+          }
+          this.$refs.ruleFormRef.validate((valid) => {
+            if (valid) {
+              resolve(this.ruleForm)
+            }
+          })
+        }
+      })
+    }
+    // async handleVerifyPhone() {
+    //   const params = {
+    //     phoneNumber: this.ruleForm.contactPhone,
+    //     code: this.ruleForm.phoneCode
+    //   }
+
+    //   try {
+    //     const res = await verifyCode(params)
+
+    //     if (res.success) {
+    //       this.verifyPhoneStatus = true
+    //     }
+    //   } catch (error) {
+    //     console.log('error----', error)
+    //     this.verifyPhoneStatus = false
+    //   }
+    // },
+    // verifyCodeStartCall(status) {
+    //   this.showVerifyPhoneBtn = status
+    // },
+    // verifyCodeEndCall(status) {
+    //   this.showVerifyPhoneBtn = status
+    // },
+    // async handleVerifyEmail() {
+    //   const params = {
+    //     phoneNumber: this.ruleForm.contactEmail,
+    //     code: this.ruleForm.emailCode
+    //   }
+
+    //   try {
+    //     const res = await verifyCode(params)
+
+    //     if (res.success) {
+    //       this.verifyEmailStatus = true
+    //     }
+    //   } catch (error) {
+    //     console.log('error----', error)
+    //     this.verifyEmailStatus = false
+    //   }
+    // },
+    // verifyCodeStartCallEmail(status) {
+    //   this.showVerifyEmailBtn = status
+    // },
+    // verifyCodeEndCallEmail(status) {
+    //   this.showVerifyEmailBtn = status
+    // }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 50 - 0
src/views/creditManagement/components/CreditDetailView.vue

@@ -0,0 +1,50 @@
+<template>
+  <div class="enterprise-edit">
+    <basic-info ref="baseInfo" :base-info="baseInfo" :disabled="true" />
+    <PersonInfo ref="legalPersonInfoRef" :person-type="'legal'" :details-info="legalPersonInfo" :disabled="true" />
+    <PersonInfo ref="controlPersonInfoRef" :person-type="'control'" :details-info="controlPersonInfo" :disabled="true" />
+    <ContactInfo ref="contactInfoRef" :details-info="contactInfo" :disabled="true" />
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'EnterpriseEntryView',
+  components: {
+    BasicInfo: () => import('./BasicInfo'),
+    PersonInfo: () => import('@/views/enterpriseManage/enterpriseEntry/components/PersonInfo.vue'),
+    ContactInfo: () => import('./ContactInfo.vue')
+  },
+  props: {
+    detailsInfo: {
+      type: Object,
+      default: () => {}
+    }
+  },
+  data() {
+    return {
+      baseInfo: {},
+      legalPersonInfo: {},
+      controlPersonInfo: {},
+      contactInfo: {}
+    }
+  },
+  watch: {
+    detailsInfo: {
+      handler(val) {
+        if (Object.keys(val).length) {
+          this.baseInfo = val
+          this.legalPersonInfo = val
+          this.controlPersonInfo = val
+          this.contactInfo = val
+        }
+      },
+      immediate: true
+    }
+  },
+  created() {},
+  methods: {}
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 61 - 0
src/views/creditManagement/creditManagementView.vue

@@ -0,0 +1,61 @@
+<template>
+  <div class="enterprise-list-view">
+    <div v-if="advanceViewList.length" class="view-steps-box">
+      <cy-steps :steps-data="advanceViewList"></cy-steps>
+    </div>
+    <div v-loading="loading">
+      <el-collapse v-if="advanceViewList.length" v-model="activeNames" @change="handleChange">
+        <el-collapse-item v-for="(item, index) in advanceViewList" :id="index" :key="index" :name="index">
+          <template slot="title">
+            <cy-view-bar
+              :view-bar-data="{ ...item.businessProcessingLogVo, formBusinessName: item.formBusinessName, index: index + 1 }"
+            >
+            </cy-view-bar>
+          </template>
+          <credit-detail-view v-if="item.formBusinessName === '授信申请'" :details-info="item.obj" :disabled="true"></credit-detail-view>
+          <audit-result v-if="item.formBusinessName === '授信申请结果'" :details-info="item.obj" :disabled="true"></audit-result>
+          <credit-detail-view v-if="item.formBusinessName === '续授信申请'" :details-info="item.obj" :disabled="true"></credit-detail-view>
+          <audit-result v-if="item.formBusinessName === '续授信申请结果'" :details-info="item.obj" :disabled="true"></audit-result>
+        </el-collapse-item>
+      </el-collapse>
+      <!-- <el-empty v-else style="height: calc(100vh - 0.85rem - 90px)"></el-empty> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import { doBusinessHistoryView } from '@/api/dictionary'
+import collapseSeeMix from '@/mixins/collapseSeeMix'
+
+export default {
+  components: {
+    CreditDetailView: () => import('./components/CreditDetailView.vue'),
+    AuditResult: () => import('./components/AuditResult.vue')
+  },
+  mixins: [collapseSeeMix],
+  data() {
+    return {
+      activeNames: [],
+      advanceViewList: [],
+      loading: false
+    }
+  },
+  created() {
+    this.fetchData()
+  },
+  methods: {
+    fetchData() {
+      this.loading = true
+      const { id } = this.$route.query
+      doBusinessHistoryView({ businessKey: id, businessType: 'creditManagement' }).then(({ data }) => {
+        this.loading = false
+        this.advanceViewList = data
+      }).finally(() => {
+        this.loading = false
+      })
+    }
+  }
+}
+</script>
+
+<style scoped></style>

+ 287 - 0
src/views/creditManagement/index.vue

@@ -0,0 +1,287 @@
+<template>
+  <div class="enterprise-modify">
+    <router-view />
+    <template v-if="!$route.query.type">
+      <div class="search">
+        <div class="left"></div>
+        <div class="right" style="width: auto;">
+          <div>
+            <el-input
+              v-model="search.companyName"
+              placeholder="请输入企业名称"
+              clearable
+            ></el-input>
+          </div>
+          <div>
+            <el-input
+              v-model="search.capitalName"
+              placeholder="请输入资方名称"
+              clearable
+            ></el-input>
+          </div>
+          <div>
+            <el-select
+              v-model="search.creditStatus"
+              placeholder="请选择授信状态"
+              clearable
+              style="width: 140px !important;"
+            >
+              <el-option
+                v-for="item in constant.enterpriseCreditStatus"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              ></el-option>
+            </el-select>
+          </div>
+          <div>
+            <el-select
+              v-model="search.isMultiStore"
+              placeholder="请选择是否支持多店铺"
+              clearable
+              style="width: 200px !important;"
+            >
+              <el-option
+                v-for="item in constant.whetherList"
+                :key="item.code"
+                :label="item.name"
+                :value="item.code"
+              ></el-option>
+            </el-select>
+          </div>
+          <div>
+            <el-date-picker
+              v-model="search.authDateRange"
+              type="daterange"
+              clearable
+              range-separator="至"
+              value-format="yyyy-MM-dd"
+              start-placeholder="授信开始日期"
+              end-placeholder="授信到期日期"
+            >
+            </el-date-picker>
+          </div>
+          <div class="leftBtn">
+            <el-button type="primary" @click="fetchData('search')">查询</el-button>
+          </div>
+        </div>
+      </div>
+      <cy-comm-table
+        ref="commTable"
+        v-loading="loading"
+        :columns="columns"
+        :table-options="tableOptions"
+        :data="tableData"
+        :count="total"
+        parent-component=""
+      />
+    </template>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import { getAuthCreditList, refreshCreditStatus } from '@/api/creditManagement/index'
+import { formatMoney } from '@/utils'
+
+export default {
+  data() {
+    return {
+      loading: false,
+      total: 0,
+      page: 1,
+      size: 10,
+      tableData: [],
+      search: {
+        companyName: '',
+        capitalName: '',
+        creditStatus: '',
+        isMultiStore: '',
+        authDateRange: ''
+      },
+      tableOptions: {
+        sortTable: true,
+        maxHeight: 'calc(100vh - 395px)',
+        height: 'calc(100vh - 395px)'
+      },
+      columns: [
+        {
+          label: '序号',
+          index: true
+        },
+        {
+          label: '业务编号',
+          prop: 'businessNumber',
+          width: 140,
+          showTooltip: true
+        },
+        {
+          label: '企业名称',
+          prop: 'companyName',
+          width: 140,
+          showTooltip: true
+        },
+        {
+          label: '统一社会信用代码',
+          prop: 'socialCreditCode',
+          width: 140,
+          showTooltip: true
+        },
+        {
+          label: '资方名称',
+          prop: 'capitalName',
+          showTooltip: true
+        },
+        {
+          label: '授信编号',
+          prop: 'creditNo',
+          showTooltip: true
+        },
+        {
+          label: '是否支持多店铺',
+          showTooltip: true,
+          render: (h, row) => {
+            return <div>{ row.isMultiStore !== null ? row.isMultiStore === 0 ? '否' : '是' : '' }</div>
+          }
+        },
+        {
+          label: '授信金额',
+          prop: 'taskName',
+          showTooltip: true,
+          render: (h, row) => {
+            return <div>{ formatMoney(row.creditAmount) }</div>
+          }
+        },
+        {
+          label: '授信生效日期',
+          prop: 'creditStartDate',
+          showTooltip: true,
+          width: 140
+        },
+        {
+          label: '授信到期日期',
+          prop: 'creditEndDate',
+          showTooltip: true,
+          width: 140
+        },
+        {
+          label: '授信状态',
+          prop: 'creditStatus',
+          showTooltip: true
+        },
+        {
+          label: '操作',
+          show: true,
+          render: (h, row) => {
+            const btnList = [
+              {
+                msg: '授信详情',
+                icon: 'iconfont icon-Magnifier',
+                power: 'creditView',
+                rowPower: [],
+                category: 'see'
+              },
+              {
+                msg: '刷新授信状态',
+                icon: 'iconfont icon-shuaxin',
+                power: 'RefreshCreditStatus',
+                rowPower: [],
+                category: 'refresh'
+              }
+            ]
+            const options = btnList.map(item => {
+              return (
+                this.tablePower({ item, row }) && <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
+                  <span class='table-icon-box' v-power={item.power}>
+                    <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row, item.msg) }}></i>
+                  </span>
+                </el-tooltip>
+              )
+            })
+            return <div>{ options }</div>
+          },
+          width: 160
+        }
+      ]
+    }
+  },
+  computed: {
+    ...mapGetters(['constant']),
+    formatMoney() {
+      return (money) => {
+        return formatMoney(money)
+      }
+    },
+    tablePower() {
+      return ({ item, row }) => {
+        const { category } = item
+        if (category === 'refresh') {
+          if (row.creditStatus === '授信中') {
+            return true
+          }
+          return false
+        }
+        return true
+      }
+    }
+  },
+  created() {
+    this.$store.dispatch('getConstant', ['enterpriseCreditStatus'])
+    this.fetchData()
+  },
+  methods: {
+    async fetchData(type) {
+      const params = {
+        page: this.page,
+        rows: this.size,
+        ...this.search
+      }
+
+      if (params.authDateRange && params.authDateRange.length) {
+        params.startDate = params.authDateRange[0]
+        params.endDate = params.authDateRange[1]
+      }
+
+      delete params.authDateRange
+
+      if (type === 'search') {
+        this.page = 1
+        this.size = 10
+      }
+
+      this.loading = true
+      const res = await getAuthCreditList(params)
+
+      this.loading = false
+      console.log('getAuthCreditList-----', res)
+      if (res.success) {
+        this.tableData = res.rows || []
+        this.total = res.records
+      }
+    },
+    handlerOperate(type, row, msg) {
+      if (type === 'see') {
+        this.$router.push({
+          name: 'CreditManagementView',
+          query: {
+            type: 'see',
+            id: row.id
+          }
+        })
+      } else if (type === 'refresh') {
+        this.refreshStatus(row.id)
+      }
+    },
+    async refreshStatus(id) {
+      const res = await refreshCreditStatus({ id })
+
+      if (res.success) {
+        this.$message.success('操作成功')
+        this.$router.go(0)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="sass" scoped></style>

+ 12 - 17
src/views/enterpriseManage/enterpriseEntry/EnterpriseAll.vue

@@ -215,23 +215,18 @@ export default {
     ...mapGetters(['constant']),
     tablePower() {
       return ({ item, row }) => {
-        // const { rowPower, category } = item
-        // if (category === 'see') {
-        //   if (row.companyZrId !== null) {
-        //     return true
-        //   }
-        //   return false
-        // } else if (category === 'edit') {
-        //   if (row.taskId !== null) {
-        //     return true
-        //   }
-        //   return false
-        // } else if (category === 'reAdd') {
-        //   if (row.taskId !== null) {
-        //     return true
-        //   }
-        //   return false
-        // }
+        const { category } = item
+        if (category === 'timeAxis') {
+          if (row.companyZrId !== null) {
+            return true
+          }
+          return false
+        } else if (category === 'enterList') {
+          if (row.taskId !== null && row.id !== null) {
+            return true
+          }
+          return false
+        }
         return true
       }
     }

+ 12 - 17
src/views/enterpriseManage/enterpriseEntry/EnterprisePendding.vue

@@ -112,23 +112,18 @@ export default {
   computed: {
     tablePower() {
       return ({ item, row }) => {
-        // const { rowPower, category } = item
-        // if (category === 'see') {
-        //   if (row.companyZrId !== null) {
-        //     return true
-        //   }
-        //   return false
-        // } else if (category === 'edit') {
-        //   if (row.taskId !== null) {
-        //     return true
-        //   }
-        //   return false
-        // } else if (category === 'reAdd') {
-        //   if (row.taskId !== null) {
-        //     return true
-        //   }
-        //   return false
-        // }
+        const { category } = item
+        if (category === 'timeAxis') {
+          if (row.obj.id !== null) {
+            return true
+          }
+          return false
+        } else if (category === 'edit') {
+          if (row.taskId !== null && row.obj.id !== null) {
+            return true
+          }
+          return false
+        }
         return true
       }
     }

+ 8 - 2
src/views/enterpriseManage/enterpriseEntry/components/EnterpriseEntryView.vue

@@ -16,8 +16,7 @@ export default {
     BasicInfo: () => import('./BasicInfo'),
     PersonInfo: () => import('./PersonInfo.vue'),
     ContactInfo: () => import('./ContactInfo.vue'),
-    RedNoInfo: () => import('./RedNoInfo.vue'),
-    AuthBook: () => import('./AuthBook')
+    RedNoInfo: () => import('./RedNoInfo.vue')
   },
   props: {
     detailsInfo: {
@@ -39,11 +38,18 @@ export default {
     detailsInfo: {
       handler(val) {
         if (Object.keys(val).length) {
+          console.log('---------------------', val)
           this.baseInfo = val.companyZrHistoryVo
           this.legalPersonInfo = val.companyZrHistoryVo
           this.controlPersonInfo = val.companyZrHistoryVo
           this.contactInfo = val.companyZrHistoryVo
+
+          const { companyCreateDate, registerCapi, zhixingAmt } = val.companyZrHistoryVo
+
           this.redNoInfo = {
+            companyCreateDate,
+            registerCapi,
+            zhixingAmt,
             deceptionRecords: val.deceptionRecords,
             consumeRecords: val.consumeRecords,
             abnormalOperations: val.abnormalOperations,

+ 9 - 5
src/views/enterpriseManage/enterpriseEntry/components/RedNoInfo.vue

@@ -9,7 +9,7 @@
       class="rule-form-orange"
     >
       <cy-info-title>系统红否判断结果</cy-info-title>
-      <el-form-item label="企业类别" prop="contactPerson">
+      <!-- <el-form-item label="企业类别" prop="contactPerson">
         <el-input
           v-model="ruleForm.contactPerson"
           :disabled="disabled"
@@ -29,24 +29,24 @@
           :disabled="disabled"
           placeholder="请输入统一社会信用代码"
         ></el-input>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="成立日期" prop="contactPerson">
         <el-input
-          v-model="ruleForm.contactPerson"
+          v-model="ruleForm.companyCreateDate"
           :disabled="disabled"
           placeholder="请输入成立日期"
         ></el-input>
       </el-form-item>
       <el-form-item label="注册资金(万元)" prop="contactPerson">
         <el-input
-          v-model="ruleForm.contactPerson"
+          v-model="ruleForm.registerCapi"
           :disabled="disabled"
           placeholder="请输入注册资金"
         ></el-input>
       </el-form-item>
       <el-form-item label="被执行金额(万元)" prop="contactPerson">
         <el-input
-          v-model="ruleForm.contactPerson"
+          v-model="ruleForm.zhixingAmt"
           :disabled="disabled"
           placeholder="请输入被执行金额"
         ></el-input>
@@ -425,6 +425,10 @@ export default {
     detailsInfo: {
       handler(val) {
         if (Object.keys(val).length) {
+          const { companyCreateDate, registerCapi, zhixingAmt } = val
+          this.ruleForm.companyCreateDate = companyCreateDate
+          this.ruleForm.registerCapi = registerCapi
+          this.ruleForm.zhixingAmt = zhixingAmt || 0
           // 失信记录
           if (val.deceptionRecords.length) {
             this.implementLegalData = val.deceptionRecords.filter(item => item.type === 1)

+ 7 - 7
src/views/userManagement/index.vue

@@ -9,12 +9,12 @@
             <div>
               <el-input v-model="search.mark" placeholder="请输入手机号码" clearable />
             </div>
-            <div>
+            <!-- <div>
               <el-select v-model="search.useMoney" style="width: 100%" placeholder="请选择在途支用" clearable>
                 <el-option label="是" :value="1" />
                 <el-option label="否" :value="0" />
               </el-select>
-            </div>
+            </div> -->
             <div>
               <el-input v-model="search.managerName" style="width: 200px" placeholder="请输入业务经理/风控经理" clearable />
             </div>
@@ -97,7 +97,7 @@
 import { mapGetters } from 'vuex'
 import indexTable from './indexTable'
 // distributeRM, batchDistributeRMs, getRMList
-import { getUserList, receiveTask, getPMList,  distributePM, batchDistributePMs, resetPassword } from '@/api/userManage/index'
+import { getUserList, receiveTask, getPMList, distributePM, batchDistributePMs, resetPassword } from '@/api/userManage/index'
 
 export default {
   name: 'UserManagement',
@@ -106,7 +106,7 @@ export default {
     return {
       search: {
         mark: '',
-        useMoney: '',
+        // useMoney: '',
         managerName: '',
         keyword: ''
       },
@@ -326,9 +326,9 @@ export default {
 
     // 风控经理
     getRiskManagers() {
-      getRMList().then(({ data }) => {
-        this.riskManagers = data || []
-      })
+      // getRMList().then(({ data }) => {
+      //   this.riskManagers = data || []
+      // })
     }
 
   }

+ 47 - 28
src/views/userManagement/indexTable.js

@@ -52,41 +52,60 @@ export default {
         label: '企业地址',
         // width: '100',
         showTooltip: true,
+        // render: (h, row) => {
+        //   return <div>{ row.provinceName }-{ row.cityName }</div>
+        // }
         render: (h, row) => {
-          return <div>{ row.provinceName }-{ row.cityName }</div>
+          return h('div', row.list.map(item => {
+            return h('div', {
+              attrs: {
+                class: ''
+              }
+            }, [h('el-tooltip', {
+              attrs: {
+                class: 'el-tooltip cell',
+                effect: 'dark',
+                content: item.registerAddress,
+                placement: 'top'
+              },
+              style: {
+                paddingLeft: '0px'
+              }
+            }, [h('div', {}, item.registerAddress)])])
+          }))
         }
       },
-      // {
-      //   label: '主企业名称',
-      //   prop: 'list',
-      //   render: (h, row) => {
-      //     return h('div', row.list.map(item => {
-      //       return h('div', {
-      //         attrs: {
-      //           class: ''
-      //         }
-      //       }, [h('el-tooltip', {
-      //         attrs: {
-      //           class: 'el-tooltip cell',
-      //           effect: 'dark',
-      //           content: item.mainCompany,
-      //           placement: 'top'
-      //         },
-      //         style: {
-      //           paddingLeft: '0px'
-      //         }
-      //       }, [h('div', {}, item.mainCompany)])])
-      //     }))
-      //   }
-      // },
       {
-        label: '是否有在途支用',
-        prop: 'useMoney',
-        width: '120',
+        label: '主企业名称',
+        prop: 'list',
         render: (h, row) => {
-          return <span>{ row.useMoney ? '是' : '否' }</span>
+          return h('div', row.list.map(item => {
+            return h('div', {
+              attrs: {
+                class: ''
+              }
+            }, [h('el-tooltip', {
+              attrs: {
+                class: 'el-tooltip cell',
+                effect: 'dark',
+                content: item.name,
+                placement: 'top'
+              },
+              style: {
+                paddingLeft: '0px'
+              }
+            }, [h('div', {}, item.name)])])
+          }))
         }
       },
+      // {
+      //   label: '是否有在途支用',
+      //   prop: 'useMoney',
+      //   width: '120',
+      //   render: (h, row) => {
+      //     return <span>{ row.useMoney ? '是' : '否' }</span>
+      //   }
+      // },
       {
         label: '业务负责人',
         prop: 'projectHead',