880 lines
34 KiB
Vue
880 lines
34 KiB
Vue
<template> <!-- 企业认证 -->
|
|
<view>
|
|
<view class="layout layout-ident">
|
|
<!-- 企业认证 -->
|
|
<u--text prefixIcon="calendar" iconStyle="font-size: 28px;color:#A92924" size="20" color="#A92924"
|
|
:text="userInfo.accountType === 2 ? '企业认证' : '个人认证'"></u--text>
|
|
<u--text prefixIcon="checkmark-circle" iconStyle="font-size: 18px;color:#A92924" size="15" color="#A92924"
|
|
:text="statusLabel" v-if="userInfo.authStatus > -1 || userInfo.fadadaConfirm"></u--text>
|
|
<view style="margin: 30rpx 0">
|
|
<el-radio-group v-model="userType" @change="changeUserType">
|
|
<el-radio :label="0">
|
|
<text class="text-28">平台交易功能用户注册</text>
|
|
</el-radio>
|
|
<view class="mt-15">
|
|
<el-radio :label="1">
|
|
<text class="text-28">金久信签约宝用户、特产商城用户注册</text>
|
|
</el-radio>
|
|
</view>
|
|
</el-radio-group>
|
|
</view>
|
|
<view class="mt-15 flex justify-center items-center">
|
|
<view class="mx-15">
|
|
<u-button @click="getCertUrl()" type="primary" size="small" v-if="!userInfo.fadadaConfirm">去认证
|
|
</u-button>
|
|
</view>
|
|
<!-- <view class="mx-15">-->
|
|
<!-- <u-button @click="getCertUrl()" type="primary" size="small" v-if="userInfo.authStatus > -1">-->
|
|
<!-- 获取认证结果-->
|
|
<!-- </u-button>-->
|
|
<!-- </view>-->
|
|
<view class="mx-15">
|
|
<u-button @click="getCertUrl(true)" plain type="primary" size="small" v-if="userInfo.authStatus > -1">
|
|
信息变更
|
|
</u-button>
|
|
</view>
|
|
</view>
|
|
<template v-if="userType === 0">
|
|
<view class="form-box" v-if="userInfo.authStatus > -1 || userInfo.fadadaConfirm">
|
|
<template v-if="userInfo.accountType === 2">
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">公司名称</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
disabled
|
|
placeholder="请输入内容"
|
|
v-model="userInfo.company.companyName"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">信用代码</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.organization"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30" @click="showAddress">
|
|
<view class="lb need">公司所在地</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请选择公司所在地"
|
|
v-model="addressRegion"
|
|
suffixIcon="arrow-down"
|
|
suffixIconStyle="color: #909399"
|
|
disabled
|
|
disabledColor="#fff"
|
|
style="pointer-events:none"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">详细地址</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.addressDetail"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">法定代表人</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.legalName"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">公司电话</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.mobile"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">有效通信地址</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.mailAddress"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">邮箱地址</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.contactEmail"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">对公账户</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.companyAccount"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">开户行</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请输入内容"
|
|
v-model="form.company.companyBankName"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30" @click="showIndustry = true">
|
|
<view class="lb need">行业分类</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
style="pointer-events:none"
|
|
placeholder="请选择公司行业分类"
|
|
v-model="form.company.businessType"
|
|
suffixIcon="arrow-down"
|
|
suffixIconStyle="color: #909399"
|
|
disabled
|
|
disabledColor="#fff"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex flex-col items-start justify-start m-top-30" style="align-items: flex-start">
|
|
<view class="lb need mb-15">主营商品</view>
|
|
<view class="vl flex-1">
|
|
<!-- <u-checkbox-group v-model="form.company.mainSpotCategoryIds">-->
|
|
<!-- <view class="u-flex u-flex-wrap justify-start items-start w-100p">-->
|
|
<!-- <view class="w-50p" v-for="(item, index) in goodsCate" :key="index">-->
|
|
<!-- <u-checkbox-->
|
|
<!-- :customStyle="{marginBottom: '8px'}"-->
|
|
<!-- :label="item.name"-->
|
|
<!-- :name="item._id"-->
|
|
<!-- >-->
|
|
<!-- </u-checkbox>-->
|
|
<!-- </view>-->
|
|
<!-- </view>-->
|
|
<!-- </u-checkbox-group>-->
|
|
<view class="flex justify-start items-start flex-wrap">
|
|
<text class="text-25 mb-25 w-33p" @click="changeMainSpot(item._id)"
|
|
:class="{'text-main': form.company.mainSpotCategoryIds.includes(item._id)}"
|
|
v-for="(item, index) in goodsCate" :key="index">
|
|
{{ item.name }}
|
|
</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="group m-top-30">
|
|
<view class="lb need">上传营业执照</view>
|
|
</view>
|
|
<view class="flex justify-between align-center m-top-10">
|
|
<view class="lbx flex-1">请您上传盖章的扫描件或者复印件</view>
|
|
</view>
|
|
<view class="m-top-20">
|
|
<u-upload
|
|
:fileList="organizationPath"
|
|
@afterRead="afterRead($event, 'organizationPath', 'company')"
|
|
@delete="deletePic($event, 'organizationPath', 'company')"
|
|
:maxCount="1"
|
|
width="70"
|
|
height="70"
|
|
></u-upload>
|
|
</view>
|
|
<view class="group m-top-30">
|
|
<view class="lb need">上传开票资料</view>
|
|
</view>
|
|
<view class="flex justify-between align-center m-top-10">
|
|
<view class="lbx flex-1">加盖公章</view>
|
|
</view>
|
|
<view class="m-top-20">
|
|
<u-upload
|
|
:fileList="invoiceInfo"
|
|
@afterRead="afterRead($event, 'invoiceInfo', 'company')"
|
|
@delete="deletePic($event, 'invoiceInfo', 'company')"
|
|
:maxCount="1"
|
|
width="70"
|
|
height="70"
|
|
></u-upload>
|
|
</view>
|
|
<!-- <view class="group m-top-30">-->
|
|
<!-- <view class="lb need">纳税资格</view>-->
|
|
<!-- </view>-->
|
|
<!-- <view class="m-top-20">-->
|
|
<!-- <el-radio-group v-model="form.company.taxType">-->
|
|
<!-- <el-radio label="一般纳税人">一般纳税人</el-radio>-->
|
|
<!-- <el-radio label="小规模纳税人">小规模纳税人</el-radio>-->
|
|
<!-- <el-radio label="其他">其他</el-radio>-->
|
|
<!-- </el-radio-group>-->
|
|
<!-- </view>-->
|
|
<!-- <view class="group m-top-30">-->
|
|
<!-- <view class="lb">纳税人资格</view>-->
|
|
<!-- </view>-->
|
|
<!-- <view class="flex justify-between align-center m-top-10">-->
|
|
<!-- <view class="lbx flex-1">加盖公章</view>-->
|
|
<!-- <!– <view class="download">电子版文件下载</view>–>-->
|
|
<!-- </view>-->
|
|
<!-- <view class="m-top-20">-->
|
|
<!-- <u-upload-->
|
|
<!-- :fileList="taxImage"-->
|
|
<!-- @afterRead="afterRead($event, 'taxImage', 'company', true)"-->
|
|
<!-- @delete="deletePic($event, 'taxImage', 'company', true)"-->
|
|
<!-- multiple-->
|
|
<!-- :maxCount="10"-->
|
|
<!-- width="70"-->
|
|
<!-- height="70"-->
|
|
<!-- ></u-upload>-->
|
|
<!-- </view>-->
|
|
<view class="group m-top-30">
|
|
<view class="lb">管理员授权委托书</view>
|
|
</view>
|
|
<view class="m-top-20">
|
|
<u-upload
|
|
:fileList="taxImage"
|
|
@afterRead="afterRead($event, 'taxImage', 'company', true)"
|
|
@delete="deletePic($event, 'taxImage', 'company', true)"
|
|
multiple
|
|
:maxCount="10"
|
|
width="70"
|
|
height="70"
|
|
></u-upload>
|
|
</view>
|
|
<!-- 企业授权人信息 -->
|
|
<view class="m-top-30">
|
|
<u--text prefixIcon="calendar" iconStyle="font-size: 28px;color:#A92924" size="20" color="#A92924"
|
|
text="企业授权人信息"></u--text>
|
|
</view>
|
|
|
|
<view class="group flex align-center m-top-30" @click="showManageType = true">
|
|
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}类型</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请选择授权人类型"
|
|
v-model="managerType"
|
|
suffixIcon="arrow-down"
|
|
suffixIconStyle="color: #909399"
|
|
disabled
|
|
disabledColor="#fff"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}姓名</view>
|
|
<view class="vl flex-1">
|
|
<u--input v-model="form.manager.personName" placeholder="请输入内容"></u--input>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="group flex align-center m-top-30" @click="showCertType = true">
|
|
<view class="lb need">证件类型</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请选择证件类型"
|
|
v-model="certType"
|
|
suffixIcon="arrow-down"
|
|
suffixIconStyle="color: #909399"
|
|
disabled
|
|
disabledColor="#fff"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}证件号</view>
|
|
<view class="vl flex-1">
|
|
<u--input v-model="form.manager.idCard" placeholder="请输入内容"></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">{{ `${form.manager.type === 1 ? '法人姓名' : '授权人'}` }}电话</view>
|
|
<view class="vl flex-1">
|
|
<u--input v-model="form.manager.mobile" placeholder="请输入内容"></u--input>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="group m-top-30">
|
|
<view class="lb need">身份证头像面</view>
|
|
</view>
|
|
<view class="m-top-20">
|
|
<u-upload
|
|
:fileList="headPhotoPath"
|
|
@afterRead="afterRead($event,'headPhotoPath', 'manager')"
|
|
@delete="deletePic($event, 'headPhotoPath', 'company')"
|
|
:maxCount="1"
|
|
width="70"
|
|
height="70"
|
|
></u-upload>
|
|
</view>
|
|
<view class="group m-top-30">
|
|
<view class="lb need">身份证国徽面</view>
|
|
</view>
|
|
<view class="m-top-20">
|
|
<u-upload
|
|
:fileList="backgroundIdCardPath"
|
|
@afterRead="afterRead($event,'backgroundIdCardPath', 'manager')"
|
|
@delete="deletePic($event, 'backgroundIdCardPath', 'company')"
|
|
:maxCount="1"
|
|
width="70"
|
|
height="70"
|
|
></u-upload>
|
|
</view>
|
|
</template>
|
|
<template v-else>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">真实姓名</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="userInfo.person.personName"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30" @click="showIndustry = true">
|
|
<view class="lb need">行业分类</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
style="pointer-events:none"
|
|
placeholder="请选择行业分类"
|
|
v-model="form.person.businessType"
|
|
suffixIcon="arrow-down"
|
|
suffixIconStyle="color: #909399"
|
|
disabled
|
|
disabledColor="#fff"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30" @click="showAddress">
|
|
<view class="lb need">现居住所在地</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
placeholder="请选择现居住所在地"
|
|
v-model="addressRegion"
|
|
suffixIcon="arrow-down"
|
|
suffixIconStyle="color: #909399"
|
|
disabled
|
|
disabledColor="#fff"
|
|
style="pointer-events:none"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">详细地址</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.person.addressDetail"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">有效通信地址</view>
|
|
<text class="ml-10 text-25">{{ form.person.address }}</text>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">个人账号</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.person.personAccount"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">个人开户行</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.person.personBankName"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">个人账户名</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.person.accountName"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">手机号码</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.person.mobile"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb">QQ号</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.person.qq"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb">邮箱地址</view>
|
|
<view class="vl flex-1">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.person.contactEmail"
|
|
></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="group flex align-center m-top-30">
|
|
<view class="lb need">短信验证码</view>
|
|
<view class="vl flex-1 flex justify-start items-center">
|
|
<u--input
|
|
:disabled="userInfo.authStatus === 0"
|
|
placeholder="请输入内容"
|
|
v-model="form.smsCode"
|
|
></u--input>
|
|
<view class="ml-20">
|
|
<u-button type="primary" :disabled="!form.person.mobile || codeDisabled || userInfo.authStatus === 0"
|
|
@click="sendSmsCode">
|
|
{{ smsTips }}
|
|
</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</template>
|
|
<u-button class="public-btn" text="提交认证" @click="submitAuth"
|
|
:disabled="userInfo.authStatus === 0"></u-button>
|
|
</view>
|
|
</template>
|
|
</view>
|
|
<AddressSelect ref="AddressSelect" @confirm="regionConfirm"/>
|
|
<u-picker :show="showIndustry" :columns="[industryList]" keyName="name"
|
|
:default-index="defaultIndustryIndex"
|
|
@cancel="showIndustry = false" @close="showIndustry = false" closeOnClickOverlay
|
|
@confirm="confirmIndustry"></u-picker>
|
|
|
|
<u-picker :show="showManageType" :columns="[managerTypeList]" keyName="label"
|
|
:default-index="defaultManagerTypeIndex"
|
|
@cancel="showManageType = false" @close="showManageType = false" closeOnClickOverlay
|
|
@confirm="confirmManagerType"></u-picker>
|
|
|
|
<u-picker :show="showCertType" :columns="[certTypeList]"
|
|
:default-index="defaultCertTypeIndex"
|
|
@cancel="showCertType = false" @close="showCertType = false" closeOnClickOverlay
|
|
@confirm="confirmCertType"></u-picker>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import AddressSelect from "@/components/AddressSelect.vue";
|
|
import dayjs from "dayjs";
|
|
|
|
let timer = null
|
|
let timeS = 60
|
|
export default {
|
|
components: {AddressSelect},
|
|
props: {
|
|
userData: {
|
|
type: Object
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
statusLabel: '',
|
|
|
|
userInfo: {
|
|
company: {
|
|
organization: '',
|
|
addressRegion: {},
|
|
addressDetail: '',
|
|
mobile: '',
|
|
legalName: '',
|
|
mailAddress: '',
|
|
contactEmail: '',
|
|
companyAccount: '',
|
|
companyBankName: '',
|
|
personAccount: '',
|
|
personBankName: '',
|
|
accountName: '',
|
|
businessType: '',
|
|
invoiceInfo: '',
|
|
taxType: '',
|
|
taxImage: [],
|
|
mainSpotCategoryIds: [],
|
|
},
|
|
},
|
|
form: {
|
|
authType: 2,
|
|
company: {
|
|
organization: '',
|
|
addressRegion: {},
|
|
addressDetail: '',
|
|
mobile: '',
|
|
legalName: '',
|
|
mailAddress: '',
|
|
contactEmail: '',
|
|
companyAccount: '',
|
|
companyBankName: '',
|
|
personAccount: '',
|
|
personBankName: '',
|
|
accountName: '',
|
|
businessType: '',
|
|
invoiceInfo: '',
|
|
taxType: '',
|
|
taxImage: [],
|
|
mainSpotCategoryIds: [],
|
|
organizationPath: ''
|
|
},
|
|
manager: {
|
|
type: null,
|
|
personName: '',
|
|
certType: '',
|
|
idCard: '',
|
|
mobile: '',
|
|
headPhotoPath: '',
|
|
backgroundIdCardPath: '',
|
|
},
|
|
smsCode: null,
|
|
},
|
|
addressRegion: '',
|
|
industryList: [],
|
|
defaultIndustryIndex: [0],
|
|
showIndustry: false,
|
|
goodsCate: [],
|
|
organizationPath: [],
|
|
invoiceInfo: [],
|
|
taxImage: [],
|
|
checked: [],
|
|
showManageType: false,
|
|
managerTypeList: [
|
|
{
|
|
value: 1,
|
|
label: '法人'
|
|
},
|
|
{
|
|
value: 2,
|
|
label: '授权人'
|
|
}
|
|
],
|
|
defaultManagerTypeIndex: [0],
|
|
managerType: '',
|
|
certTypeList: ['身份证', '护照'],
|
|
showCertType: false,
|
|
certType: '',
|
|
defaultCertTypeIndex: [0],
|
|
headPhotoPath: [],
|
|
backgroundIdCardPath: [],
|
|
codeDisabled: false,
|
|
smsTips: '点击获取',
|
|
userType: 0
|
|
};
|
|
},
|
|
methods: {
|
|
getCertUrl(reset = false) {
|
|
vk.callFunction({
|
|
url: 'client/fadada.getVerifyUrl',
|
|
data: {
|
|
reset,
|
|
isMobile: true
|
|
},
|
|
success: (res) => {
|
|
window.location.href = res.data.url
|
|
// window.open(res.data.url)
|
|
}
|
|
});
|
|
},
|
|
async getIndustryList() {
|
|
const {rows} = await vk.callFunction({
|
|
url: 'client/industry/pub/getList'
|
|
})
|
|
this.industryList = rows
|
|
},
|
|
async getGoodsCate() {
|
|
const {data} = await vk.callFunction({
|
|
url: 'client/spot/category/pub/getList',
|
|
data: {
|
|
whereJson: {
|
|
level: 2
|
|
}
|
|
}
|
|
});
|
|
this.goodsCate = data
|
|
},
|
|
showAddress() {
|
|
const addressRegion = this.userInfo.accountType === 2 ? this.form.company.addressRegion : this.form.person.addressRegion
|
|
this.$refs.AddressSelect.open(addressRegion);
|
|
},
|
|
regionConfirm({province, city, area}) {
|
|
if (this.userInfo.accountType === 2) this.form.company.addressRegion = {province, city, area}
|
|
else this.form.person.addressRegion = {province, city, area}
|
|
this.addressRegion = `${province.name}${city.name}${area.name}`
|
|
},
|
|
confirmIndustry({value}) {
|
|
if (this.userInfo.accountType === 2) {
|
|
this.form.company.businessType = value[0].name
|
|
} else {
|
|
this.form.person.businessType = value[0].name
|
|
}
|
|
this.showIndustry = false
|
|
},
|
|
confirmManagerType({value}) {
|
|
this.form.manager.type = value[0].value
|
|
this.showManageType = false
|
|
},
|
|
confirmCertType({value}) {
|
|
this.form.manager.certType = value[0]
|
|
this.showCertType = false
|
|
},
|
|
afterRead({file}, field, formField, multi = false) {
|
|
if (multi) {
|
|
file.forEach(item => {
|
|
uniCloud.uploadFile({
|
|
filePath: item.url,
|
|
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + item.name,
|
|
success: ({fileID}) => {
|
|
uniCloud.getTempFileURL({
|
|
fileList: [fileID]
|
|
}).then(res => {
|
|
this[field].push({url: res.fileList[0].tempFileURL})
|
|
this.form[formField][field].push(res.fileList[0].tempFileURL)
|
|
})
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
uniCloud.uploadFile({
|
|
filePath: file.url,
|
|
cloudPath: dayjs().format('YYYY/MM/DD') + '/' + file.name,
|
|
success: ({fileID}) => {
|
|
uniCloud.getTempFileURL({
|
|
fileList: [fileID]
|
|
}).then(res => {
|
|
this[field].push({url: res.fileList[0].tempFileURL})
|
|
this.form[formField][field] = res.fileList[0].tempFileURL
|
|
})
|
|
}
|
|
})
|
|
}
|
|
},
|
|
deletePic({index}, field, formFiled, multi = false) {
|
|
if (multi) {
|
|
this[field].splice(index, 1)
|
|
this.form[formFiled][field].splice(index, 1)
|
|
} else {
|
|
this[field] = []
|
|
this.form[formFiled][field] = null
|
|
}
|
|
},
|
|
async submitAuth(authStatus = 0) {
|
|
if (this.userInfo.accountType === 2) {
|
|
if (!this.form.company.addressDetail) return this.$message.error('请完善公司所在地')
|
|
if (this.form.company.mainSpotCategoryIds.length === 0) return this.$message.error('请选择主营商品')
|
|
if (this.form.company.mainSpotCategoryIds.length > 10) return this.$message.error('主营商品最多只能选择10个')
|
|
if (!this.form.company.mailAddress) return this.$message.error('请完善有效通信地址')
|
|
if (!this.form.company.contactEmail) return this.$message.error('请完善联系邮箱')
|
|
if (!this.form.company.legalName) return this.$message.error('请完善法人姓名')
|
|
if (!this.form.company.addressRegion) this.form.company.addressRegion = {}
|
|
} else {
|
|
if (!this.form.person.personName) return this.$message.error('请输入真实姓名')
|
|
if (!this.form.person.mobile) return this.$message.error('请输入联系方式')
|
|
if (!this.form.person.personAccount) return this.$message.error('请填写个人账号')
|
|
if (!this.form.person.personBankName) return this.$message.error('请选择个人开户行')
|
|
if (!this.form.person.accountName) return this.$message.error('请选择个人账户名')
|
|
if (!this.form.smsCode) return this.$message.error('请输入短信验证码')
|
|
}
|
|
|
|
await vk.callFunction({
|
|
url: 'client/user/kh/addAuth',
|
|
title: '提交中...',
|
|
data: {...this.form, ...{authStatus}, isBusinessCard: false},
|
|
})
|
|
this.$message.success('提交成功')
|
|
this.iniData()
|
|
// setTimeout(() => {
|
|
// window.location.reload()
|
|
// }, 1500)
|
|
},
|
|
changeMainSpot(id) {
|
|
const index = this.form.company.mainSpotCategoryIds.findIndex(item => item === id)
|
|
if (index > -1) this.form.company.mainSpotCategoryIds.splice(index, 1)
|
|
else {
|
|
if (this.form.company.mainSpotCategoryIds.length >= 10) {
|
|
this.$message.error('主营商品最多只能选择10个')
|
|
return
|
|
}
|
|
this.form.company.mainSpotCategoryIds.push(id)
|
|
}
|
|
},
|
|
sendSmsCode() {
|
|
if (timer != null) return
|
|
this.codeDisabled = true
|
|
vk.userCenter.sendSmsCode({
|
|
loading: true,
|
|
data: {
|
|
mobile: this.form.person.mobile,
|
|
type: 'verify',
|
|
},
|
|
success: (data) => {
|
|
this.codeDisabled = false
|
|
this.$message({
|
|
message: "验证码已发送",
|
|
type: 'success'
|
|
})
|
|
timeS = 60
|
|
timer = setInterval(() => {
|
|
timeS--
|
|
if (timeS <= 0) {
|
|
this.smsTips = "重新发送"
|
|
this.stopTimer()
|
|
} else {
|
|
this.smsTips = timeS + "秒"
|
|
}
|
|
|
|
}, 1000)
|
|
},
|
|
fail: () => {
|
|
this.codeDisabled = false
|
|
}
|
|
})
|
|
},
|
|
stopTimer() {
|
|
if (timer != null) {
|
|
clearInterval(timer)
|
|
timer = null
|
|
}
|
|
},
|
|
iniData() {
|
|
this.userInfo = JSON.parse(JSON.stringify(this.userData))
|
|
if (this.userInfo.fadadaConfirm && (this.userInfo.authStatus === null || this.userInfo.authStatus === -1))
|
|
this.statusLabel = '您已完成法大大认证,请在下方完善资料提交平台审核'
|
|
if (this.userInfo.authStatus === 0) this.statusLabel = '平台审核中'
|
|
else if (this.userInfo.authStatus === 1) this.statusLabel = '恭喜您已通过已通过金久信平台认证'
|
|
else if (this.userInfo.authStatus === 2) this.statusLabel = `审核不通过:${this.userInfo.refuseReason}`
|
|
if (!this.userInfo.userType) this.userType = 0
|
|
else this.userType = parseInt(this.userInfo.userType)
|
|
this.form = this.userData
|
|
if (this.userInfo.accountType === 2) {
|
|
if (this.userInfo.company.addressRegion)
|
|
this.addressRegion = `${this.userInfo.company.addressRegion.province.name}${this.userInfo.company.addressRegion.city.name}${this.userInfo.company.addressRegion.area.name}`
|
|
if (this.userInfo.company.businessType) {
|
|
const defaultIndustryIndex = this.industryList.findIndex(item => item.name === this.userInfo.company.businessType)
|
|
if (defaultIndustryIndex > -1) this.defaultIndustryIndex = [defaultIndustryIndex]
|
|
}
|
|
if (this.form.company.organizationPath) this.organizationPath = [{
|
|
url: this.form.company.organizationPath,
|
|
}]
|
|
if (this.form.company.invoiceInfo) this.invoiceInfo = [{
|
|
url: this.form.company.invoiceInfo,
|
|
}]
|
|
if (this.form.company.taxImage && this.form.company.taxImage.length > 0) {
|
|
this.taxImage = this.form.company.taxImage.map(url => {
|
|
return {
|
|
url
|
|
}
|
|
})
|
|
}
|
|
if (this.form.manager.type !== null) {
|
|
const defaultManagerTypeIndex = this.managerTypeList.findIndex(item => item.value === this.form.manager.type)
|
|
if (defaultManagerTypeIndex > -1) {
|
|
this.defaultManagerTypeIndex = [defaultManagerTypeIndex]
|
|
this.managerType = this.managerTypeList[defaultManagerTypeIndex].label
|
|
}
|
|
}
|
|
if (this.form.manager.certType !== null) {
|
|
this.defaultCertTypeIndex = [this.form.manager.certType]
|
|
this.certType = this.certTypeList[this.form.manager.certType]
|
|
}
|
|
if (this.form.manager.headPhotoPath) {
|
|
this.headPhotoPath = [{url: this.form.manager.headPhotoPath}]
|
|
}
|
|
if (this.form.manager.backgroundIdCardPath) {
|
|
this.backgroundIdCardPath = [{url: this.form.manager.backgroundIdCardPath}]
|
|
}
|
|
} else {
|
|
if (this.userInfo.person.addressRegion)
|
|
this.addressRegion = `${this.userInfo.person.addressRegion.province.name}${this.userInfo.person.addressRegion.city.name}${this.userInfo.person.addressRegion.area.name}`
|
|
}
|
|
},
|
|
changeUserType() {
|
|
vk.callFunction({
|
|
url: 'client/user/kh/changeUserType',
|
|
data: {
|
|
userType: this.userType
|
|
}
|
|
})
|
|
}
|
|
},
|
|
async mounted() {
|
|
await this.getIndustryList()
|
|
await this.getGoodsCate()
|
|
this.iniData()
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.layout-ident {
|
|
padding: 20rpx 30rpx;
|
|
|
|
.group {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
}
|
|
|
|
.lb, .fix {
|
|
position: relative;
|
|
min-width: 150rpx;
|
|
font-size: 26rpx;
|
|
line-height: 40rpx;
|
|
color: #666666;
|
|
}
|
|
|
|
.lbx {
|
|
font-size: 24rpx;
|
|
color: #999999;
|
|
}
|
|
|
|
.download {
|
|
padding: 8rpx 20rpx;
|
|
font-size: 24rpx;
|
|
line-height: 36rpx;
|
|
color: #ffffff;
|
|
background: #A92924;
|
|
}
|
|
|
|
.need::before {
|
|
position: absolute;
|
|
left: -16rpx;
|
|
top: 50%;
|
|
z-index: 9;
|
|
margin-top: -12rpx;
|
|
content: '*';
|
|
color: #A92924;
|
|
font-size: 32rpx;
|
|
line-height: 1;
|
|
}
|
|
}
|
|
|
|
.public-btn {
|
|
width: 100%;
|
|
margin-top: 60rpx;
|
|
color: #ffffff;
|
|
background: #A92924;
|
|
}
|
|
</style>
|