<template>
|
<view class="login-container">
|
<view class="p30">
|
<view class="group-bd">
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">账户名称:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.account" placeholder="请输入账户名称" /></view>
|
</view>
|
|
<picker class="" value="2" @change="changeSelect($event)"
|
:range="business_type_list">
|
<view class="certification_head_body_item d-b-c">
|
<text class="orange">*</text>
|
<view class="make-item input-box flex-1" v-if="business_type_active">{{business_type_active}}</view>
|
<view class="make-item input-box flex-1" style="color: #777777;" v-else>请选择客户类型</view>
|
<view class="icon iconfont icon-jiantou" style="font-size: 24rpx;"></view>
|
</view>
|
</picker>
|
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">营业执照号:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.license_no" placeholder="请输入营业执照号" /></view>
|
</view>
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">营业执照名称:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.license_name" placeholder="请输入营业执照名称" /></view>
|
</view>
|
<view class="certification_body" v-if="formData.business_type == 1">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传营业执照</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('license_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="license_photo!=''" class="img">
|
<image :src="license_photo"></image>
|
</view>
|
<view v-if="license_photo==''">点击上传营业执照</view>
|
<input style="display:none" name="license_photo" v-model="form.license_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">法人姓名:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.legal_person_name" placeholder="企业填营业执照法人姓名/个人填持卡人姓名" /></view>
|
</view>
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">法人证件号:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.legal_person_id_card_no" placeholder="企业填营业执照法人号码/个人填持卡人身份证" /></view>
|
</view>
|
<view class="certification_body">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传法人证件正面照片</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('legal_person_id_card_front_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="legal_person_id_card_front_photo!=''" class="img">
|
<image :src="legal_person_id_card_front_photo"></image>
|
</view>
|
<view v-if="legal_person_id_card_front_photo==''">点击上传法人证件正面照片</view>
|
<input style="display:none" name="legal_person_id_card_front_photo" v-model="form.legal_person_id_card_front_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="certification_body">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传法人证件反面照片</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('legal_person_id_card_back_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="legal_person_id_card_back_photo!=''" class="img">
|
<image :src="legal_person_id_card_back_photo"></image>
|
</view>
|
<view v-if="legal_person_id_card_back_photo==''">点击上传法人证件反面照片</view>
|
<input style="display:none" name="legal_person_id_card_back_photo" v-model="form.legal_person_id_card_back_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
|
<picker class="" value="1" @change="changeIdCardSelect($event)"
|
:range="id_card_type_list" v-if="formData.business_type == 1">
|
<view class="certification_head_body_item d-b-c">
|
<text class="orange">*</text>
|
<view class="make-item input-box flex-1" v-if="id_card_type_active">{{id_card_type_active}}</view>
|
<view class="make-item input-box flex-1" style="color: #777777;" v-else>请选择结算人证件类型</view>
|
<view class="icon iconfont icon-jiantou" style="font-size: 24rpx;"></view>
|
</view>
|
</picker>
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">结算人证件号:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.id_card_no" placeholder="请填写结算人证件号" /></view>
|
</view>
|
<view class="certification_body" v-if="formData.business_type == 1">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传结算人证件正面照片</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('settlement_person_id_card_front_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="settlement_person_id_card_front_photo!=''" class="img">
|
<image :src="settlement_person_id_card_front_photo"></image>
|
</view>
|
<view v-if="settlement_person_id_card_front_photo==''">点击上传结算人证件正面照片</view>
|
<input style="display:none" name="settlement_person_id_card_front_photo" v-model="form.settlement_person_id_card_front_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="certification_body" v-if="formData.business_type == 1">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传结算人证件反面照片</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('settlement_person_id_card_back_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="settlement_person_id_card_back_photo!=''" class="img">
|
<image :src="settlement_person_id_card_back_photo"></image>
|
</view>
|
<view v-if="settlement_person_id_card_back_photo==''">点击上传结算人证件反面照片</view>
|
<input style="display:none" name="settlement_person_id_card_back_photo" v-model="form.settlement_person_id_card_back_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<picker class="" value="1" @change="changeAccountSelect($event)"
|
:range="account_type_list" v-if="formData.business_type == 1">
|
<view class="certification_head_body_item d-b-c">
|
<text class="orange">*</text>
|
<view class="make-item input-box flex-1" v-if="account_type_active">{{account_type_active}}</view>
|
<view class="make-item input-box flex-1" style="color: #777777;" v-else>请选择结算账户类型</view>
|
<view class="icon iconfont icon-jiantou" style="font-size: 24rpx;"></view>
|
</view>
|
</picker>
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">结算银行卡号:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.account_no" placeholder="请输入结算银行卡号" /></view>
|
</view>
|
<view class="certification_body">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传结算银行卡照片</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('bank_card_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="bank_card_photo!=''" class="img">
|
<image :src="bank_card_photo"></image>
|
</view>
|
<view v-if="bank_card_photo==''">点击上传结算银行卡照片</view>
|
<input style="display:none" name="bank_card_photo" v-model="form.bank_card_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">结算银行卡开户名:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.account_name" placeholder="请输入结算银行卡开户名" /></view>
|
</view>
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">开户总行:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.bank_name" placeholder="请输入开户总行,如中国建设银行" /></view>
|
</view>
|
<view class="form-level d-s-c" v-if="formData.account_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">联行号:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.bank_no" placeholder="请输入联行号" /></view>
|
</view>
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">预留手机号:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.bank_cell_phone" placeholder="请输入预留手机号,用于提现失败通知等" /></view>
|
</view>
|
<view class="certification_body" v-if="formData.business_type == 1">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传门头照</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('store_front_img_url')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="store_front_img_url!=''" class="img">
|
<image :src="store_front_img_url"></image>
|
</view>
|
<view v-if="store_front_img_url==''">点击上传门头照</view>
|
<input style="display:none" name="store_front_img_url" v-model="form.store_front_img_url" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="certification_body" v-if="formData.business_type == 1">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传收银台照片</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('store_cash_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="store_cash_photo!=''" class="img">
|
<image :src="store_cash_photo"></image>
|
</view>
|
<view v-if="store_cash_photo==''">点击上传结收银台照片</view>
|
<input style="display:none" name="store_cash_photo" v-model="form.store_cash_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class="certification_body" v-if="formData.business_type == 1">
|
<view class="login_index_updata_name">
|
<text style="color:red;">*</text>
|
<text style="">请上传店内环境照</text>
|
</view>
|
<view class="login_index_updata_updata">
|
<view class="login_index_updata_updata_item2" @click="openUpload('store_env_photo')">
|
<view class="login_index_updata_updata_item_body">
|
<view v-if="store_env_photo!=''" class="img">
|
<image :src="store_env_photo"></image>
|
</view>
|
<view v-if="store_env_photo==''">点击上传店内环境照</view>
|
<input style="display:none" name="store_env_photo" v-model="form.store_env_photo" />
|
</view>
|
</view>
|
</view>
|
</view>
|
<picker mode="multiSelector" @change="bindAreasPickerChange($event)" @columnchange="bindAreasPickerColumnChange($event)" class="" :value="areasIndex"
|
:range="areasArray" v-if="formData.business_type == 1">
|
<view class="certification_head_body_item d-b-c">
|
<text class="orange">*</text>
|
<view class="make-item input-box flex-1" v-if="formData.area_name">{{formData.province_name}}{{formData.city_name}}{{formData.area_name}}</view>
|
<view class="make-item input-box flex-1" style="color: #777777;" v-else>请选择地区</view>
|
<view class="icon iconfont icon-jiantou" style="font-size: 24rpx;"></view>
|
</view>
|
</picker>
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">详细地址:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.street_address" placeholder="请输入详细地址" /></view>
|
</view>
|
<picker mode="multiSelector" @change="bindMultiPickerChange($event)" @columnchange="bindMultiPickerColumnChange($event)" class="" :value="multiIndex"
|
:range="multiArray" v-if="formData.business_type == 1">
|
<view class="certification_head_body_item d-b-c">
|
<text class="orange">*</text>
|
<view class="make-item input-box flex-1" v-if="formData.unity_category_name">{{formData.unity_category_name}}</view>
|
<view class="make-item input-box flex-1" style="color: #777777;" v-else>请选择行业类目</view>
|
<view class="icon iconfont icon-jiantou" style="font-size: 24rpx;"></view>
|
</view>
|
</picker>
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">户籍地址:</text>
|
</view>
|
<view class="val flex-1"><input type="text" v-model="formData.residence_address" placeholder="企业填法人户籍地址,个人填写结算人户籍地址" /></view>
|
</view>
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">法人身份证开始时间:</text>
|
</view>
|
<view class="val flex-1">
|
<picker class="datapicker" mode="date" value="" @change="getDateFunc($event,'legal_person_lic_stt')">
|
<view class="make-item selectpicker input-box">{{formData.legal_person_lic_stt || '请选择法人身份证开始时间'}}</view>
|
</picker>
|
</view>
|
</view>
|
<view class="form-level d-s-c">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">法人身份证结束时间:</text>
|
</view>
|
<view class="val flex-1">
|
<picker class="datapicker" mode="date" value="" @change="getDateFunc($event,'legal_person_lic_ent')">
|
<view class="make-item selectpicker input-box">{{formData.legal_person_lic_ent || '请选择法人身份证结束时间'}}</view>
|
</picker>
|
</view>
|
</view>
|
<picker class="" value="0" @change="changeLegalSelect($event)"
|
:range="legal_effect_list">
|
<view class="certification_head_body_item d-b-c">
|
<text class="orange">*</text>
|
<view class="make-item input-box flex-1" v-if="formData.legal_person_lic_effect">{{formData.legal_person_lic_effect}}</view>
|
<view class="make-item input-box flex-1" style="color: #777777;" v-else>请选择法人身份证是否长期有效</view>
|
<view class="icon iconfont icon-jiantou" style="font-size: 24rpx;"></view>
|
</view>
|
</picker>
|
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">结算人身份证开始时间:</text>
|
</view>
|
<view class="val flex-1">
|
<picker class="datapicker" mode="date" value="" @change="getDateFunc($event,'settlement_person_lic_stt')">
|
<view class="make-item selectpicker input-box">{{formData.settlement_person_lic_stt || '请选择结算人身份证开始时间'}}</view>
|
</picker>
|
</view>
|
</view>
|
<view class="form-level d-s-c" v-if="formData.business_type == 1">
|
<view class="d-s-c field-name">
|
<text class="orange">*</text>
|
<text class="gray3">结算人身份证结束时间:</text>
|
</view>
|
<view class="val flex-1">
|
<picker class="datapicker" mode="date" value="" @change="getDateFunc($event,'settlement_person_lic_ent')">
|
<view class="make-item selectpicker input-box">{{formData.settlement_person_lic_ent || '请选择结算人身份证结束时间'}}</view>
|
</picker>
|
</view>
|
</view>
|
<picker class="" value="0" @change="changeSettlementSelect($event)"
|
:range="settlement_effect_list" v-if="formData.business_type == 1">
|
<view class="certification_head_body_item d-b-c">
|
<text class="orange">*</text>
|
<view class="make-item input-box flex-1" v-if="formData.settlement_person_lic_effect">{{formData.settlement_person_lic_effect}}</view>
|
<view class="make-item input-box flex-1" style="color: #777777;" v-else>请选择结算人身份证是否长期有效</view>
|
<view class="icon iconfont icon-jiantou" style="font-size: 24rpx;"></view>
|
</view>
|
</picker>
|
|
</view>
|
</view>
|
|
|
<view class="btns p30"><button type="default" @click="formSubmit">提交</button></view>
|
<Upload v-if="isupload" :isupload="isupload" :type="type" @getImgs="getImgsFunc">上传图片</Upload>
|
</view>
|
</template>
|
|
<script>
|
import Upload from '@/components/upload/upload';
|
export default {
|
components: {
|
/*编辑组件*/
|
Upload,
|
},
|
data() {
|
return {
|
/*表单数据对象*/
|
formData: {
|
account: '',/*账户名称*/
|
/*客户类型*/
|
business_type: '',//选中的下标数
|
license_no:'',
|
license_name:'',
|
license_photo:'',//加密的图片链接
|
license_photo_id:'',//图片ID
|
legal_person_name:'',//法人姓名
|
legal_person_id_card_type:'IDCARD',//证件类型,默认身份证
|
legal_person_id_card_no:'',//证件号
|
legal_person_id_card_front_photo:'',//法人证件照正面,注:人像面
|
legal_person_id_card_front_photo_id:'',//法人证件照正面,注:人像面
|
legal_person_id_card_back_photo:'',//法人证件照反面,注:国徽面
|
legal_person_id_card_back_photo_id:'',//法人证件照反面,注:国徽面
|
id_card_type:'',//结算人证件类型 IDCARD 身份证、LICENSE 营业执照
|
id_card_no:'',//结算人证件号
|
settlement_person_id_card_front_photo:'',//结算人证件照正面,注:人像面
|
settlement_person_id_card_front_photo_id:'',//结算人证件照正面,注:人像面
|
settlement_person_id_card_back_photo:'',//结算证件照正面,注:人像面
|
settlement_person_id_card_back_photo_id:'',//结算证件照正面,注:人像面
|
account_type:'2',//结算账户类型:1对公、2对私 注:默认是对私,因为个人不能选择
|
account_no:'',//结算银行卡号
|
bank_card_photo:'',//结算银行卡照片
|
bank_card_photo_id:'',//结算银行卡照片
|
account_name:'',//结算银行卡开户名
|
bank_name:'',//开户总行,如中国建设银行
|
bank_no:'',//联行号,对公必填
|
bank_cell_phone:'',//预留手机号
|
store_front_img_url:'',//门头照
|
store_front_img_url_id:'',//门头照
|
store_cash_photo:'',//收银台照
|
store_cash_photo_id:'',//收银台照
|
store_env_photo:'',//店内环境照
|
store_env_photo_id:'',//店内环境照
|
province_code:'',//省份编码
|
city_code:'',//城市编码
|
area_code:'',//区域编码
|
province_name:'',//省份名称
|
city_name:'',//城市名称
|
area_name:'',//区域名称
|
area_index:'',//选中的下标
|
street_address:'',//详细地址
|
unity_category_id:'',//行业类目id
|
unity_category_name:'',//行业类目名称
|
residence_address:'',//户籍地址
|
legal_person_lic_stt:'',//法人身份证开始时间,如2019-01-30
|
legal_person_lic_ent:'',//法人身份证结束时间,如2019-01-30
|
legal_person_lic_effect:'',//法人身份证是否长期有效 YES 是 NO 否
|
settlement_person_lic_stt:'',//结算人身份证开始时间,如2019-01-30
|
settlement_person_lic_ent:'',//结算人身份证结束时间,如2019-01-30
|
settlement_person_lic_effect:'',//结算人身份证是否长期有效 YES 是 NO 否
|
},
|
isupload: false,
|
type:'',
|
business_type_list: ['','企业','个人'], //列表名字
|
business_type_active:'',//选中的名称
|
id_card_type_list: ['','身份证','营业执照'], //结算人证件列表
|
id_card_type_value: ['','IDCARD','LICENSE'], //结算人证件列表
|
id_card_type_active:'',//选中的名称
|
account_type_list: ['','对公','对私'], //结算账户类型列表
|
account_type_active:'',//选中的名称
|
license_photo:'',//没加密的图片链接
|
legal_person_id_card_front_photo:'',//没加密的图片链接
|
legal_person_id_card_back_photo:'',//没加密的图片链接
|
settlement_person_id_card_front_photo:'',//没加密的图片链接
|
settlement_person_id_card_back_photo:'',//没加密的图片链接
|
bank_card_photo:'',//没加密的图片链接
|
store_front_img_url:'',//门头照
|
store_cash_photo:'',//收银台照
|
store_env_photo:'',//店内环境照
|
unity_category_list:'', //行业类目列表
|
unity_category_first:'', //行业类目第一级
|
multiArray: [[], []],
|
multiIndex: [0, 0],
|
legal_effect_list: ['YES','NO'], //法人身份证是否长期有效
|
settlement_effect_list: ['YES','NO'], //结算人身份证是否长期有效
|
areas_list:'', //城市列表
|
areasArray: [[], [],[]],
|
areasIndex: [0, 0, 0],
|
};
|
},
|
onLoad() {
|
/*获取数据*/
|
this.getData();
|
//获取行业类目
|
this.getCategory();
|
//获取地区
|
this.getAreas();
|
},
|
methods: {
|
/*获取数据*/
|
getData() {
|
let self = this;
|
uni.showLoading({
|
title: '加载中'
|
});
|
self._get('user.auth/detail', {}, function(res) {
|
if(res.code == 1){
|
var data = res.data.data;
|
if(data){
|
self.formData = data;
|
self.legal_person_id_card_front_photo = data.idCardFrontPhoto?data.idCardFrontPhoto.file_path:'';
|
self.legal_person_id_card_back_photo = data.idCardBackPhoto.file_path;
|
if(data.licensePhoto){
|
self.license_photo = data.licensePhoto.file_path;
|
}
|
if(data.settlementIdCardFrontPhoto){
|
self.settlement_person_id_card_front_photo = data.settlementIdCardFrontPhoto.file_path;
|
}
|
if(data.settlementIdCardBackPhoto){
|
self.settlement_person_id_card_back_photo = data.settlementIdCardBackPhoto.file_path;
|
}
|
if(data.bankCardPhoto){
|
self.bank_card_photo = data.bankCardPhoto.file_path;
|
}
|
if(data.storeFrontPhoto){
|
self.store_front_img_url = data.storeFrontPhoto.file_path;
|
}
|
if(data.storeCashPhoto){
|
self.store_cash_photo = data.storeCashPhoto.file_path;
|
}
|
if(data.storeEnvPhoto){
|
self.store_env_photo = data.storeEnvPhoto.file_path;
|
}
|
var business_type_list = self.business_type_list;
|
self.business_type_active = business_type_list[data.business_type];
|
}
|
|
}
|
uni.hideLoading();
|
});
|
},
|
//类目改变
|
bindMultiPickerChange(e) {
|
var unity_category_list = this.unity_category_list;
|
var val = e.detail.value;
|
this.multiIndex= val;
|
this.formData.unity_category_name = unity_category_list[val[0]]['children'][val[1]]['name'];
|
this.formData.unity_category_id = unity_category_list[val[0]]['children'][val[1]]['code'];
|
},
|
bindMultiPickerColumnChange(e) {
|
var self = this;
|
var val = e.detail.value;
|
//只滚动第一列
|
if(e.detail.column > 0){
|
return;
|
}
|
var unity_category_list = this.unity_category_list;
|
|
var childdata = unity_category_list[val]['children'];//获取第一个的下级
|
var arr2 = [];
|
//只获取数组的名称
|
childdata.forEach(function(vv) {
|
arr2.push(vv.name);
|
});
|
self.multiIndex= [val, 0];
|
self.multiArray= [this.unity_category_first, arr2];
|
|
},
|
//地区改变
|
bindAreasPickerChange(e) {
|
var areas_list = this.areas_list;
|
var val = e.detail.value;
|
this.areasIndex= val;
|
this.formData.area_index= val;
|
this.formData.province_code = areas_list[val[0]]['code'];
|
this.formData.province_name = areas_list[val[0]]['name'];
|
this.formData.city_code = areas_list[val[0]]['children'][val[1]]['code'];
|
this.formData.city_name = areas_list[val[0]]['children'][val[1]]['name'];
|
this.formData.area_code = areas_list[val[0]]['children'][val[1]]['children'][val[2]]['code'];
|
this.formData.area_name = areas_list[val[0]]['children'][val[1]]['children'][val[2]]['name'];
|
},
|
bindAreasPickerColumnChange(e) {
|
var self = this;
|
var val = e.detail.value;
|
var areas_list = this.areas_list;
|
if(e.detail.column == 0){
|
//滑动省
|
var childdata = areas_list[val]['children'];//获取第一个的下级
|
var sondata = areas_list[val]['children'][0]['children'];//获取第二个的下级
|
var arr2 = [];
|
var arr3 = [];
|
//只获取数组的名称
|
childdata.forEach(function(vv) {
|
arr2.push(vv.name);
|
});
|
//只获取数组的名称
|
sondata.forEach(function(val) {
|
arr3.push(val.name);
|
});
|
self.areasIndex= [val, 0, 0];
|
self.areasArray= [this.areasArray[0], arr2, arr3];
|
}else if(e.detail.column == 1){
|
//滑动市
|
var childdata = areas_list[this.areasIndex[0]]['children'];//获取第一个的下级
|
var sondata = areas_list[this.areasIndex[0]]['children'][val]['children'];//获取第二个的下级
|
var arr2 = [];
|
var arr3 = [];
|
//只获取数组的名称
|
childdata.forEach(function(vv) {
|
arr2.push(vv.name);
|
});
|
//只获取数组的名称
|
sondata.forEach(function(vv) {
|
arr3.push(vv.name);
|
});
|
self.areasIndex= [this.areasIndex[0], val, 0];
|
self.areasArray= [this.areasArray[0],arr2, arr3];
|
}
|
},
|
/* 下拉框 */
|
changeSelect(e) {
|
console.log(this.formData);
|
this.formData.business_type= e.detail.value;
|
this.business_type_active= this.business_type_list[e.detail.value];
|
//如选择个人,则结算账户类型改为对私
|
if(e.detail.value == 1){
|
this.formData.account_type= 2;
|
}
|
},
|
/* 结算人证件下拉框 */
|
changeIdCardSelect(e) {
|
this.formData.id_card_type = this.id_card_type_value[e.detail.value];
|
this.id_card_type_active = this.id_card_type_list[e.detail.value];
|
},
|
/* 结算账户类型下拉框 */
|
changeAccountSelect(e) {
|
this.formData.account_type= e.detail.value;
|
this.account_type_active= this.account_type_list[e.detail.value];
|
},
|
/* 行业类目下拉框 */
|
getCategory() {
|
let self = this;
|
let url="http://lifecircle-ark-public.oss-cn-hangzhou.aliyuncs.com/openapi/categories.json";
|
uni.request({
|
url: url,
|
method: 'GET',
|
success: (res) => {
|
if(res.data.success){
|
var data = res.data.data;
|
var childdata = data[0]['children'];//获取第一个的下级
|
self.unity_category_list = data;
|
var arr1=[];
|
var arr2=[];
|
//只获取数组的名称
|
data.forEach(function(val) {
|
arr1.push(val.name);
|
});
|
//只获取数组的名称
|
childdata.forEach(function(vv) {
|
arr2.push(vv.name);
|
});
|
self.unity_category_first = arr1;
|
self.multiArray = [arr1,arr2];
|
}else{
|
uni.showToast({
|
title: '获取行业类目失败,请稍后再试!',
|
duration: 2000,
|
icon: 'none'
|
});
|
return;
|
}
|
},
|
});
|
|
},
|
/* 获取地区 */
|
getAreas() {
|
let self = this;
|
let url="http://lifecircle-ark-public.oss-cn-hangzhou.aliyuncs.com/openapi/areas.json";
|
uni.request({
|
url: url,
|
method: 'GET',
|
success: (res) => {
|
if(res.data.success){
|
var data = res.data.data;
|
var childdata = data[0]['children'];//获取第一个的下级
|
var sondata = data[0]['children'][0]['children'];//获取第二个的下级
|
self.areas_list = data;
|
var arr1=[];
|
var arr2=[];
|
var arr3=[];
|
//只获取数组的名称
|
data.forEach(function(val) {
|
arr1.push(val.name);
|
});
|
//只获取数组的名称
|
childdata.forEach(function(vv) {
|
arr2.push(vv.name);
|
});
|
//只获取数组的名称
|
sondata.forEach(function(vv) {
|
arr3.push(vv.name);
|
});
|
self.areasArray = [arr1,arr2,arr3];
|
}else{
|
uni.showToast({
|
title: '获取城市列表失败,请稍后再试!',
|
duration: 2000,
|
icon: 'none'
|
});
|
return;
|
}
|
},
|
});
|
|
},
|
/* 法人证件是否长期有效 */
|
changeLegalSelect(e) {
|
this.formData.legal_person_lic_effect= this.legal_effect_list[e.detail.value];
|
},
|
/* 结算人证件是否长期有效 */
|
changeSettlementSelect(e) {
|
this.formData.settlement_person_lic_effect= this.settlement_effect_list[e.detail.value];
|
},
|
/*上传*/
|
openUpload(e) {
|
this.type = e;
|
this.isupload = true;
|
},
|
|
/*获取图片*/
|
getImgsFunc(e) {
|
if (e != null && e.length > 0) {
|
var self = this;
|
uni.showLoading({
|
title:'上传中'
|
})
|
var type = this.type;
|
var type_id = this.type+"_id"
|
this[type] = e[0].file_path;//展示的图片
|
this.formData[type_id] = e[0].file_id;//存数据库的图片ID
|
if (type == 'bank_card_photo') {
|
var buy_type = 'bankCard';//银行卡
|
}else if(type == 'legal_person_id_card_front_photo' || type == 'legal_person_id_card_back_photo' || type == 'settlement_person_id_card_front_photo' || type == 'settlement_person_id_card_back_photo'){
|
var buy_type = 'idCard';//身份证
|
}else if(type == 'license_photo'){
|
var buy_type = 'license';//营业执照
|
}else if(type == 'store_front_img_url' || type == 'store_cash_photo' || type == 'store_env_photo'){
|
var buy_type = 'store';//门店
|
}else{
|
var buy_type = 'other';//其他
|
}
|
wx.getFileSystemManager().readFile({
|
filePath: e.beforeFilePath, //选择图片返回的相对路径
|
encoding: 'base64', //编码格式
|
success: res => {
|
//成功的回调
|
//console.log('data:image/png;base64,' + res.data)
|
var img= 'data:image/png;base64,' + res.data;
|
this._post('file.upload/imageFbEncryption', {
|
img: img,
|
bus_type:buy_type
|
}, function(res) {
|
uni.hideLoading()
|
if(res.code == 1){
|
self.formData[self.type] =res.data;//加密的图片
|
}else{
|
uni.showToast({
|
title: '图片加密失败',
|
duration: 2000
|
});
|
}
|
|
})
|
false,
|
() => {
|
uni.hideLoading();
|
}
|
}
|
})
|
}
|
this.isupload = false;
|
},
|
/*获取时间*/
|
getDateFunc(e, index) {
|
this.formData[index] = e.detail.value;
|
},
|
/*提交*/
|
formSubmit() {
|
let self = this;
|
uni.showLoading({
|
title: '正在提交'
|
});
|
uni.navigateBack();
|
self._post(
|
'user.auth/save',
|
self.formData,
|
result => {
|
if(result.code == 1){
|
uni.showToast({
|
title: '提交成功',
|
duration: 2000
|
});
|
setTimeout(function(){
|
// 执行回调函数
|
uni.navigateBack();
|
}, 2000);
|
}else{
|
uni.showToast({
|
title: '提交失败',
|
duration: 2000
|
});
|
}
|
|
},
|
false,
|
() => {
|
uni.hideLoading();
|
}
|
);
|
},
|
|
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.login-container {
|
background: #ffffff;
|
}
|
.login-container input {
|
height: 88rpx;
|
line-height: 88rpx;
|
}
|
.wechatapp {
|
padding: 80rpx 0 48rpx;
|
border-bottom: 1rpx solid #e3e3e3;
|
margin-bottom: 72rpx;
|
text-align: center;
|
}
|
|
.wechatapp .header {
|
width: 190rpx;
|
height: 190rpx;
|
border: 2px solid #fff;
|
margin: 0rpx auto 0;
|
border-radius: 50%;
|
overflow: hidden;
|
box-shadow: 1px 0px 5px rgba(50, 50, 50, 0.3);
|
}
|
|
.auth-title {
|
color: #585858;
|
font-size: 34rpx;
|
margin-bottom: 40rpx;
|
}
|
|
.auth-subtitle {
|
color: #888;
|
margin-bottom: 88rpx;
|
font-size: 28rpx;
|
}
|
|
.login-btn {
|
padding: 0 20rpx;
|
}
|
|
.login-btn button {
|
height: 88rpx;
|
line-height: 88rpx;
|
background: #04be01;
|
color: #fff;
|
font-size: 30rpx;
|
border-radius: 999rpx;
|
text-align: center;
|
}
|
|
.no-login-btn {
|
margin-top: 20rpx;
|
padding: 0 20rpx;
|
}
|
|
.no-login-btn button {
|
height: 88rpx;
|
line-height: 88rpx;
|
background: #dfdfdf;
|
color: #fff;
|
font-size: 30rpx;
|
border-radius: 999rpx;
|
text-align: center;
|
}
|
|
.get-code-btn {
|
width: 200rpx;
|
height: 80rpx;
|
line-height: 76rpx;
|
padding: 0rpx 30rpx;
|
border-radius: 40rpx;
|
white-space: nowrap;
|
border: 1rpx solid $dominant-color;
|
color: $dominant-color;
|
font-size: 30rpx;
|
}
|
.get-code-btn[disabled='true'] {
|
border: 1rpx solid #cccccc;
|
}
|
|
.btns button {
|
height: 90rpx;
|
line-height: 90rpx;
|
font-size: 34rpx;
|
border-radius: 45rpx;
|
background: $dominant-color;
|
color: #ffffff;
|
}
|
.certification_head_body_item {
|
width: 100%;
|
height: 100rpx;
|
display: flex;
|
align-items: center;
|
}
|
.certification_head_body_item view {
|
margin-right: 10rpx;
|
}
|
.certification_head_body_item button {
|
width: 172rpx;
|
height: 56rpx;
|
line-height: 56rpx;
|
border: 1rpx #E2231A solid;
|
border-radius: 40rpx;
|
font-size: 26rpx;
|
color: #E2231A;
|
padding: 0 20rpx;
|
}
|
.login_index_updata_updata {
|
width: 90%;
|
height: 360rpx;
|
margin: 0 auto;
|
margin: 10rpx 0 30rpx;
|
}
|
|
.login_index_updata_updata_item2 {
|
width: 100%;
|
height: 360rpx;
|
border: 1rpx #9a9a9a dotted;
|
border-radius: 15rpx;
|
text-align: center;
|
|
}
|
|
.login_index_updata_updata_item_body {
|
width: 150rpx;
|
height: 360rpx;
|
text-align: center;
|
margin: 0 auto;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.img image {
|
width: 554rpx;
|
height: 360rpx;
|
position: relative;
|
}
|
.selectpicker {
|
width: auto;
|
height: 88rpx;
|
line-height: 88rpx;
|
box-sizing: border-box;
|
color: #575757;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
|
</style>
|