<!--
|
* @Author: 小明丶
|
* @Date: 2019-08-30 18:04:49
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2021-01-04 15:30:29
|
* @Description:
|
-->
|
/*
|
* @Author: c.y
|
* @Date: 2018-12-24 15:04:57
|
* @Last Modified by: mikey.zhaopeng
|
* @Last Modified time: 2019-11-15 09:02:18
|
* @文件说明:花呗分期--开通花呗--上传门店相关照片
|
*/
|
<template>
|
<div class="huabei-picture-page">
|
<x-header
|
:title="'开通' + this.$route.query.title"
|
:left-options="{backText:'',preventGoBack:true}"
|
@on-click-back="pageGoBack()"
|
></x-header>
|
<group v-if="alAccountTypeList instanceof Array && alAccountTypeList.length">
|
<selector
|
:title="isddxt?'商户类型':'支付宝类型'"
|
ref="insTerm"
|
placeholder="请选择"
|
v-model="accountType"
|
:options="alAccountTypeList"
|
:value-map="['code', 'name']"
|
direction="rtl"
|
></selector>
|
</group>
|
<div class="pic-content">
|
<UploadFile
|
:fileType="0"
|
:title="isddxt && accountType == 3?'民办非企业登记证书':'营业执照'"
|
:typeId="this.$route.query.typeId"
|
:sourceType="this.$route.query.zfbVersion"
|
:picList="uploadObj.licencePhotos"
|
></UploadFile>
|
<UploadFile
|
v-if="isddxt && accountType == 3"
|
:fileType="24"
|
:title="'办学许可证'"
|
:typeId="this.$route.query.typeId"
|
:sourceType="this.$route.query.zfbVersion"
|
:picList="uploadObj.schoolPermit"
|
></UploadFile>
|
<UploadFile
|
:fileType="2"
|
:title="'身份证正面照'"
|
:typeId="this.$route.query.typeId"
|
:sourceType="this.$route.query.zfbVersion"
|
:picList="uploadObj.cardFrontPhotos"
|
></UploadFile>
|
<UploadFile
|
:fileType="3"
|
:title="'身份证反面照'"
|
:typeId="this.$route.query.typeId"
|
:sourceType="this.$route.query.zfbVersion"
|
:picList="uploadObj.cardBackPhotos"
|
></UploadFile>
|
<UploadFile
|
:fileType="6"
|
:title="'门店店内照'"
|
:typeId="this.$route.query.typeId"
|
:sourceType="this.$route.query.zfbVersion"
|
:picList="uploadObj.storeInnerPhotos"
|
></UploadFile>
|
<UploadFile
|
:fileType="7"
|
:title="'门店招牌照'"
|
:typeId="this.$route.query.typeId"
|
:sourceType="this.$route.query.zfbVersion"
|
:picList="uploadObj.storeSignPhotos"
|
></UploadFile>
|
</div>
|
<f-space></f-space>
|
<f-button @on-click="handleOpenHuaBei">提交开通</f-button>
|
</div>
|
</template>
|
|
<script>
|
import UploadFile from "@/components/old/upload/uploadImg";
|
|
export default {
|
name: "add-account",
|
components: {
|
UploadFile
|
},
|
data() {
|
return {
|
alAccountTypeList: [],
|
accountType: "", // 选择的账号类型
|
uploadObj: {
|
licencePhotos: [], // 营业执照
|
schoolPermit:[],//办学许可证
|
cardFrontPhotos: [], // 身份证正面照
|
cardBackPhotos: [], // 身份证反面照
|
storeSignPhotos: [], // 门店招牌照
|
storeInnerPhotos: [] // 门店店内照
|
}
|
};
|
},
|
computed:{
|
isddxt(){
|
if(sessionStorage.isddxt == 1 || this.$route.query.zfbVersion == 6){
|
return true
|
}else{
|
return false
|
}
|
}
|
},
|
methods: {
|
pageGoBack() {
|
if(this.$route.query.isApp == 1){
|
this.$router.go(-1)
|
}else{
|
if (this.$route.query.accountType) {
|
this.$router.push({
|
path: "/huabei/alipay",
|
query: { accountType: this.$route.query.accountType,...this.$route.query }
|
});
|
} else {
|
this.$router.push({
|
path: "/huabei/alipay",
|
query: { ...this.$route.query }
|
});
|
}
|
}
|
|
},
|
// 开通花呗
|
handleOpenHuaBei() {
|
if (this.$tool.checkValEmpty(this.accountType)) {
|
this.$tool.toast("请选择支付宝类型");
|
return false;
|
}
|
if (this.$tool.checkValEmpty(this.uploadObj.licencePhotos)) {
|
let str ;
|
if(this.isddxt){
|
str="请上传营业执照"
|
}else{
|
str="民办非企业登记证书"
|
}
|
this.$tool.toast(str);
|
return false;
|
}
|
if (this.$tool.checkValEmpty(this.uploadObj.schoolPermit)&&this.isddxt && this.accountType == 3) {
|
this.$tool.toast("请上传办学许可证");
|
return false;
|
}
|
if (this.$tool.checkValEmpty(this.uploadObj.cardFrontPhotos)) {
|
this.$tool.toast("请上传身份证正面照");
|
return false;
|
}
|
if (this.$tool.checkValEmpty(this.uploadObj.cardBackPhotos)) {
|
this.$tool.toast("请上传身份证反面照");
|
return false;
|
}
|
if (this.$tool.checkValEmpty(this.uploadObj.storeSignPhotos)) {
|
this.$tool.toast("请上传门店招牌照");
|
return false;
|
}
|
if (this.$tool.checkValEmpty(this.uploadObj.storeInnerPhotos)) {
|
this.$tool.toast("请上传门店店内照");
|
return false;
|
}
|
console.log(this.uploadObj)
|
let picIdList = {
|
licencePhotos: [],
|
schoolPermit:[],
|
cardFrontPhotos: [],
|
cardBackPhotos: [],
|
storeSignPhotos: [],
|
storeInnerPhotos: []
|
};
|
|
for (let i in this.uploadObj) {
|
this.uploadObj[i].forEach(item => {
|
picIdList[i].push(item.id + "");
|
});
|
}
|
console.log(JSON.parse(sessionStorage.getItem("huabei_addr")));
|
let submitInfo = {
|
aliAccount: sessionStorage.getItem("huabei_accountNumber"),
|
aliAccountName: sessionStorage.getItem("huabei_accountName"),
|
servicePhone: sessionStorage.getItem("huabei_servicePhone"),
|
addr: JSON.parse(sessionStorage.getItem("huabei_addr")),
|
aliAccountType: this.accountType,
|
zfbVersion: this.$route.query.zfbVersion,
|
...picIdList
|
};
|
// if(sessionStorage.isddxt==1){
|
// submitInfo.mcc = Number(JSON.parse(sessionStorage.getItem('huabei_category')))
|
// }
|
console.log(submitInfo);
|
// if (this.$route.query.typeId == "200011") {
|
// this.$api.hbOpenXygOpen(submitInfo).then(res => {
|
// this.$router.push({
|
// path: "/huabei/open-result",
|
// query: {
|
// title: "信用购-花呗分期",
|
// ...this.$route.query
|
// }
|
// });
|
// });
|
// } else {
|
this.$api.hbOpenOpen(submitInfo).then(res => {
|
this.$router.push({
|
path: "/huabei/open-result",
|
query: {
|
title: "花呗分期",
|
...this.$route.query
|
}
|
});
|
});
|
// }
|
},
|
// 获取返显资料
|
getMyMation() {
|
if (sessionStorage.getItem("huabei_detailInfo")) {
|
console.log(JSON.parse(sessionStorage.getItem("huabei_detailInfo")));
|
var obj = JSON.parse(sessionStorage.getItem("huabei_detailInfo"));
|
if(obj.aliAccountType){
|
this.accountType = obj.aliAccountType
|
}
|
if(obj.licencePhotos && obj.licencePhotos.length > 0){
|
this.uploadObj.licencePhotos = obj.licencePhotos
|
}
|
if(obj.schoolPermit && obj.schoolPermit.length > 0){
|
this.uploadObj.schoolPermit = obj.schoolPermit
|
}
|
if(obj.cardFrontPhotos && obj.cardFrontPhotos.length > 0){
|
this.uploadObj.cardFrontPhotos = obj.cardFrontPhotos
|
}
|
if(obj.cardBackPhotos && obj.cardBackPhotos.length > 0){
|
this.uploadObj.cardBackPhotos = obj.cardBackPhotos
|
}
|
if(obj.storeSignPhotos && obj.storeSignPhotos.length > 0){
|
this.uploadObj.storeSignPhotos = obj.storeSignPhotos
|
}
|
if(obj.storeInnerPhotos && obj.storeInnerPhotos.length > 0){
|
this.uploadObj.storeInnerPhotos = obj.storeInnerPhotos
|
}
|
}
|
}
|
},
|
created() {
|
if (typeof sessionStorage.huabei_accountTypeList !== "undefined") {
|
this.alAccountTypeList = JSON.parse(
|
sessionStorage.getItem("huabei_accountTypeList")
|
);
|
}
|
//this.getMyMation();
|
this.accountType = "";
|
this.uploadObj = {
|
licencePhotos: [], // 营业执照
|
schoolPermit:[],
|
cardFrontPhotos: [], // 身份证正面照
|
cardBackPhotos: [], // 身份证反面照
|
storeSignPhotos: [], // 门店招牌照
|
storeInnerPhotos: [] // 门店店内照
|
};
|
this.getMyMation();
|
}
|
};
|
</script>
|
|
<style lang="less">
|
.huabei-picture-page {
|
padding-top: 45px;
|
background: @color-white;
|
.pic-content {
|
padding: 0 24px;
|
}
|
}
|
</style>
|