<script lang="ts" name="fBS_CusExtend" setup>
|
import { ref, reactive, onMounted } from "vue";
|
import { formatDate } from '/@/utils/formatTime';
|
import { useFBS_CusExtendApi } from '/@/api/Customer/fBS_CusExtend';
|
|
//父级传递来的函数,用于回调
|
const emit = defineEmits(["reloadTable"]);
|
const fBS_CusExtendApi = useFBS_CusExtendApi();
|
|
const state = reactive({
|
title: '',
|
loading: false,
|
showDialog: false,
|
ruleForm: {} as any,
|
stores: {},
|
dropdownData: {} as any,
|
enterpriseList:[],
|
roleList:[],
|
shenheList:[],
|
srcList:[]
|
});
|
|
// 页面加载时
|
onMounted(async () => {
|
});
|
|
// 打开弹窗
|
const openDialog = async (row: any, title: string, qiyeList: any,roleList: any,shenheList: any) => {
|
state.roleList = roleList
|
state.enterpriseList = qiyeList
|
state.shenheList = shenheList
|
state.title = title;
|
row = row ?? { };
|
state.ruleForm = row.id ? await fBS_CusExtendApi.detail(row.id).then(res => res.data.result) : JSON.parse(JSON.stringify(row));
|
// state.ruleForm.enterpriseType = state.ruleForm.enterpriseType.split(",");
|
state.showDialog = true;
|
};
|
|
// 关闭弹窗
|
const closeDialog = () => {
|
emit("reloadTable");
|
state.showDialog = false;
|
};
|
|
// 提交
|
const submit = async (val:any) => {
|
let values = state.ruleForm;
|
await fBS_CusExtendApi.changeSteps(values.id,val);
|
closeDialog();
|
};
|
const showPreview = ref(false)
|
const showImg = (name: string|number) => {
|
showPreview.value=true
|
state.srcList = [state.ruleForm[name]]
|
};
|
//将属性或者函数暴露给父组件
|
defineExpose({ openDialog });
|
</script>
|
<template>
|
<div class="fBS_CusExtend-container">
|
<el-dialog v-model="state.showDialog" :width="'80%'" draggable :close-on-click-modal="false">
|
<template #header>
|
<div style="color: #fff">
|
<span>{{ state.title }}</span>
|
</div>
|
</template>
|
<div class="mb10">
|
<el-row :gutter="10" justify="end">
|
<span>审核状态:</span>
|
<el-col :span="4">
|
<el-select
|
v-model="state.ruleForm.steps"
|
disabled
|
placeholder="请选择"
|
>
|
<el-option
|
v-for="item in state.shenheList"
|
:key="item.key"
|
:label="item.description=='未通过'?'不通过':item.description"
|
:value="item.value"
|
/>
|
</el-select>
|
</el-col>
|
<!-- <el-col :span="1"><el-button type="primary">审核</el-button></el-col> -->
|
</el-row>
|
</div>
|
<el-descriptions class="margin-top" title="" :column="3" border>
|
<el-descriptions-item :span="3">
|
<template #label>
|
<div class="cell-item">交易主体</div>
|
</template>
|
<!-- {{ state.ruleForm.transactionName }} -->
|
<span v-for="(item, index) in state.roleList" :key="index">
|
<span v-if="item.code == state.ruleForm.transactionCode">{{ item.name }}</span>
|
</span>
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">企业名称</div>
|
</template>
|
{{ state.ruleForm.enterpriseName }}
|
<span @click="showImg('businessLicense')">
|
<el-link type="primary" underline>查看营业执照</el-link>
|
</span>
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">统一社会信用代码</div>
|
</template>
|
{{ state.ruleForm.unifiedSocialCreditCode }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">注册资金</div>
|
</template>
|
{{ state.ruleForm.registeredCapital }}
|
</el-descriptions-item>
|
<el-descriptions-item :span="2">
|
<template #label>
|
<div class="cell-item">企业类型</div>
|
</template>
|
{{ state.ruleForm.enterpriseType }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">住所地</div>
|
</template>
|
{{ state.ruleForm.residence }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">联系电话</div>
|
</template>
|
{{ state.ruleForm.legalRepresentativePhone }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">成立时间</div>
|
</template>
|
{{ formatDate(new Date(state.ruleForm.establishmentTime), 'YYYY-mm-dd') }}
|
</el-descriptions-item>
|
<el-descriptions-item :span="2">
|
<template #label>
|
<div class="cell-item">电子邮箱</div>
|
</template>
|
{{ state.ruleForm.enterpriseEmail }}
|
</el-descriptions-item>
|
<el-descriptions-item :span="3" label-width="100">
|
<template #label>
|
<div class="cell-item">主营业务</div>
|
</template>
|
{{ state.ruleForm.mainBusiness }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">法定代表人</div>
|
</template>
|
{{ state.ruleForm.legalRepresentativeName }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">身份证</div>
|
</template>
|
{{ state.ruleForm.legalRepresentativeIdNumber }}
|
<span @click="showImg('legalRepresentativeIdCard')">
|
<el-link type="primary" underline>查看身份证</el-link>
|
</span>
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">联系电话</div>
|
</template>
|
{{ state.ruleForm.legalRepresentativePhone }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">业务经办人</div>
|
</template>
|
{{ state.ruleForm.operatorName }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">身份证</div>
|
</template>
|
<el-image-viewer
|
v-if="showPreview"
|
:url-list="state.srcList"
|
show-progress
|
@close="showPreview = false"
|
/>
|
{{ state.ruleForm.operatorIdNumber }}
|
<span style="margin-right: auto" @click="showImg('operatorIdCard')">
|
<el-link type="primary" underline>查看身份证</el-link>
|
</span>
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">联系电话</div>
|
</template>
|
{{ state.ruleForm.operatorPhone }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">开户银行</div>
|
</template>
|
{{ state.ruleForm.bankName }}
|
</el-descriptions-item>
|
<el-descriptions-item>
|
<template #label>
|
<div class="cell-item">银行账号</div>
|
</template>
|
{{ state.ruleForm.bankAccount }}
|
</el-descriptions-item>
|
</el-descriptions>
|
|
<template #footer>
|
<span class="dialog-footer">
|
<el-button @click="() => state.showDialog = false">取 消</el-button>
|
<el-button @click="submit(2)" type="primary" v-reclick="1000">通过审核</el-button>
|
<el-button @click="submit(3)" type="warning" v-reclick="1000">不通过审核</el-button>
|
</span>
|
</template>
|
</el-dialog>
|
</div>
|
</template>
|
<style lang="scss" scoped>
|
:deep(.el-select), :deep(.el-input-number) {
|
width: 100%;
|
}
|
</style>
|