Merge branch 'mrr_sj_develop_hjy_20260520_商家改版' of https://gitee.com/qtvbidt/mrr.sj.front into mrr_sj_develop_hjy_20260520_商家改版
This commit is contained in:
commit
0a8e130c33
|
|
@ -47,14 +47,17 @@
|
||||||
<image
|
<image
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;">
|
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
|
||||||
|
v-if="!userInfo.business_time">
|
||||||
</image>
|
</image>
|
||||||
<text style="margin-right: 16rpx; color: #ec5d57;">待完善</text>
|
<text style="margin-right: 16rpx;"
|
||||||
|
:style="{ color: userInfo.business_time ? '#c9c9c9' : '#ec5d57' }">
|
||||||
|
{{ userInfo.business_time ? '已设置' : '待完善' }}
|
||||||
|
</text>
|
||||||
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 服务技能 -->
|
|
||||||
<view class="info-item" @click="navigateToServiceSkill">
|
<view class="info-item" @click="navigateToServiceSkill">
|
||||||
<view class="info-left">
|
<view class="info-left">
|
||||||
<image class="item-icon"
|
<image class="item-icon"
|
||||||
|
|
@ -66,9 +69,14 @@
|
||||||
<image
|
<image
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;">
|
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
|
||||||
|
v-if="!userInfo.servers_kill_arr || userInfo.servers_kill_arr.length === 0">
|
||||||
</image>
|
</image>
|
||||||
<text style="margin-right: 16rpx; color: #389930;">已认证</text>
|
<text style="margin-right: 16rpx;"
|
||||||
|
:style="{ color: (userInfo.servers_kill_arr && userInfo.servers_kill_arr.length > 0) ? '#333333' : '#ec5d57' }">
|
||||||
|
{{ (userInfo.servers_kill_arr && userInfo.servers_kill_arr.length > 0) ? '已设置' :
|
||||||
|
'待完善' }}
|
||||||
|
</text>
|
||||||
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -153,9 +161,14 @@
|
||||||
<image
|
<image
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;">
|
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
|
||||||
|
v-if="userInfo.credentials_state === 0">
|
||||||
</image>
|
</image>
|
||||||
<text style="margin-right: 16rpx; color: #e59e45;">审核中</text>
|
<text style="margin-right: 16rpx;"
|
||||||
|
:style="{ color: userInfo.credentials_state === 0 ? '#ec5d57' : userInfo.credentials_state === 1 ? '#e59e45' : '#c9c9c9' }">
|
||||||
|
{{ userInfo.credentials_state === 0 ? '待完善' : userInfo.credentials_state === 1 ? '审核中' :
|
||||||
|
'已认证' }}
|
||||||
|
</text>
|
||||||
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -475,7 +488,7 @@
|
||||||
console.log('调用接口获取用户信息,type:', type)
|
console.log('调用接口获取用户信息,type:', type)
|
||||||
|
|
||||||
// 调用接口获取用户信息
|
// 调用接口获取用户信息
|
||||||
const result = await request.post('/user/getuser', {
|
const result = await request.post('/sj/user/getUser', {
|
||||||
type
|
type
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -494,6 +507,7 @@
|
||||||
|
|
||||||
// 降级方案:尝试从其他可能的位置获取用户ID
|
// 降级方案:尝试从其他可能的位置获取用户ID
|
||||||
this.tryAlternativeUserInfo()
|
this.tryAlternativeUserInfo()
|
||||||
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -617,15 +631,15 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateToQualification() { // 商家手艺人:资质信息
|
navigateToQualification() { // 商家手艺人:资质信息
|
||||||
if (this.identity == '2') {
|
if (this.userInfo.credentials_state == '1') {
|
||||||
// 商家跳转到资质信息页面
|
// 商家跳转到资质信息页面
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shop/qualification_sj_change'
|
url: '/pages/ruzhu/ruzhu?type=1'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// 手艺人跳转到资质信息页面
|
// 手艺人跳转到资质信息页面
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/artisan/qualification_syr_change'
|
url: '/pages/shop/qualification_sj_change'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -177,13 +177,13 @@ export default {
|
||||||
title: "店铺装修",
|
title: "店铺装修",
|
||||||
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4b558456-2e38-4185-8713-d1f0e6645820.png",
|
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/4b558456-2e38-4185-8713-d1f0e6645820.png",
|
||||||
// https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e6e72039-eec4-414c-8a86-aad404602962.png
|
// https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/e6e72039-eec4-414c-8a86-aad404602962.png
|
||||||
path: "/pages/shop/staff/distribution-service",
|
path: "/pages/shop/qualification_sj_change",
|
||||||
go_id_type: 1,
|
go_id_type: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "财务管理",
|
title: "财务管理",
|
||||||
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/edafae37-8258-4e1c-9dcc-019484117047.png",
|
url: "https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/edafae37-8258-4e1c-9dcc-019484117047.png",
|
||||||
path: "/pages/shop/staff/distribution-service",
|
path: "/pages/wallet/wallet",
|
||||||
go_id_type: 1,
|
go_id_type: 1,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<custom-navbar :title="navTitle" :showBack="true"></custom-navbar>
|
<custom-navbar :title="navTitle" :showBack="true"></custom-navbar>
|
||||||
|
|
||||||
<!-- 步骤切换 -->
|
<!-- 步骤切换 -->
|
||||||
<step-tab v-if="currentStep !== 2" :mappedStep="mappedStep"></step-tab>
|
<step-tab v-if="currentStep !== 2 && currentStep !== 4" :mappedStep="mappedStep"></step-tab>
|
||||||
|
|
||||||
<!-- 内容区域根据身份和步骤显示不同内容 -->
|
<!-- 内容区域根据身份和步骤显示不同内容 -->
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
|
@ -23,6 +23,10 @@
|
||||||
<view v-else-if="currentStep === 3">
|
<view v-else-if="currentStep === 3">
|
||||||
<store-info ref="storeInfo"></store-info>
|
<store-info ref="storeInfo"></store-info>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view v-else-if="currentStep === 4">
|
||||||
|
<successruzhu :data="successData"></successruzhu>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="kong"></view>
|
<view class="kong"></view>
|
||||||
|
|
||||||
|
|
@ -77,6 +81,15 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 步骤4: 资质认证成功 -->
|
||||||
|
<view v-else-if="currentStep === 4" class="step-2-buttons">
|
||||||
|
<view class="button-row">
|
||||||
|
<view class="showziliao" @click="topt">
|
||||||
|
<text class="showziliaotext">进入平台</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -97,7 +110,7 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentStep:3, // 当前步骤索引
|
currentStep: 0, // 当前步骤索引
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
identity: null,
|
identity: null,
|
||||||
textData: {},
|
textData: {},
|
||||||
|
|
@ -119,10 +132,15 @@
|
||||||
if (this.currentStep === 0) return 0;
|
if (this.currentStep === 0) return 0;
|
||||||
if (this.currentStep === 1) return 1;
|
if (this.currentStep === 1) return 1;
|
||||||
if (this.currentStep === 3) return 2;
|
if (this.currentStep === 3) return 2;
|
||||||
|
if (this.currentStep === 4) return 2;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
|
console.log(options, 'options---');
|
||||||
|
if (options.type == 1) {
|
||||||
|
this.currentStep = 4
|
||||||
|
}
|
||||||
this.identity = 2;
|
this.identity = 2;
|
||||||
await this.getUserInfoSync()
|
await this.getUserInfoSync()
|
||||||
// 确保子组件也能访问到 identity
|
// 确保子组件也能访问到 identity
|
||||||
|
|
@ -328,19 +346,27 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.showLoading({ title: '提交中...' });
|
uni.showLoading({
|
||||||
|
title: '提交中...'
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let formData = this.buildBusinessData(this.qualificationData, {});
|
let formData = this.buildBusinessData(this.qualificationData, {});
|
||||||
formData.type = 1;
|
formData.type = 1;
|
||||||
formData.id_type = 1;
|
formData.id_type = 1;
|
||||||
|
if (Array.isArray(formData.qualifications_sector)) {
|
||||||
|
formData.qualifications_sector = JSON.stringify(formData.qualifications_sector);
|
||||||
|
}
|
||||||
|
if (Array.isArray(formData.qualifications_other)) {
|
||||||
|
formData.qualifications_other = JSON.stringify(formData.qualifications_other);
|
||||||
|
}
|
||||||
const res = await request.post('/sj/userSjAuth/applyOne', formData);
|
const res = await request.post('/sj/userSjAuth/applyOne', formData);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
||||||
if (res.state == 1 || res.code == 200) {
|
if (res.state == 1 || res.code == 200) {
|
||||||
this.successData = res.data.customer_service
|
this.successData = res.data.customer_service
|
||||||
console.log(this.successData,'this.successDatathis.successDatathis.successDatathis.successData=======');
|
console.log(this.successData,
|
||||||
|
'this.successDatathis.successDatathis.successDatathis.successData=======');
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提交成功',
|
title: '提交成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -366,8 +392,11 @@
|
||||||
|
|
||||||
// 构建商家数据
|
// 构建商家数据
|
||||||
buildBusinessData(qualificationData, storeData) {
|
buildBusinessData(qualificationData, storeData) {
|
||||||
|
qualificationData = qualificationData || {};
|
||||||
|
storeData = storeData || {};
|
||||||
console.log(qualificationData, 'storeDatastoreDatastoreData');
|
console.log(qualificationData, 'storeDatastoreDatastoreData');
|
||||||
const formData = {};
|
const formData = {};
|
||||||
|
Object.assign(formData, storeData);
|
||||||
|
|
||||||
if (qualificationData.uscc_type) {
|
if (qualificationData.uscc_type) {
|
||||||
formData.uscc_type = qualificationData.uscc_type;
|
formData.uscc_type = qualificationData.uscc_type;
|
||||||
|
|
@ -498,27 +527,61 @@
|
||||||
this.storeInfoData = this.$refs.storeInfo.getFormData();
|
this.storeInfoData = this.$refs.storeInfo.getFormData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.showLoading({ title: '提交中...' });
|
uni.showLoading({
|
||||||
|
title: '提交中...'
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
let formData = {};
|
const formData = this.buildBusinessData(this.qualificationData, this.storeInfoData);
|
||||||
if (this.qualificationData) {
|
if (!formData) {
|
||||||
Object.assign(formData, this.qualificationData);
|
uni.hideLoading();
|
||||||
}
|
return;
|
||||||
if (this.storeInfoData) {
|
|
||||||
Object.assign(formData, this.storeInfoData);
|
|
||||||
}
|
}
|
||||||
formData.type = 1;
|
formData.type = 1;
|
||||||
formData.id_type = 1;
|
formData.id_type = 1;
|
||||||
|
console.log(formData, '-----------');
|
||||||
|
if (formData.legal_idcard_expiry_start && formData.legal_idcard_expiry_end) {
|
||||||
|
formData.legal_idcard_expiry =
|
||||||
|
formData.legal_idcard_expiry_end === '长久有效' ?
|
||||||
|
`${formData.legal_idcard_expiry_start} —— 长久` :
|
||||||
|
`${formData.legal_idcard_expiry_start} —— ${formData.legal_idcard_expiry_end}`;
|
||||||
|
}
|
||||||
|
delete formData.legal_idcard_expiry_start
|
||||||
|
delete formData.legal_idcard_expiry_end
|
||||||
|
delete formData.contact_phone
|
||||||
|
delete formData.contact_type
|
||||||
|
delete formData.contact_name
|
||||||
|
delete formData.invite_code_other
|
||||||
|
if (Array.isArray(formData.qualifications_sector)) {
|
||||||
|
formData.qualifications_sector = JSON.stringify(formData.qualifications_sector);
|
||||||
|
}
|
||||||
|
if (Array.isArray(formData.qualifications_other)) {
|
||||||
|
formData.qualifications_other = JSON.stringify(formData.qualifications_other);
|
||||||
|
}
|
||||||
|
console.log(formData, 'formData请求参数');
|
||||||
const res = await request.post('/sj/userSjAuth/apply', formData);
|
const res = await request.post('/sj/userSjAuth/apply', formData);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (res.state == 1 || res.code == 200) {
|
if (res.state == 1 || res.code == 200) {
|
||||||
uni.showToast({ title: '提交成功', icon: 'none' });
|
this.successData = res.data ? (res.data.customer_service || {}) : {};
|
||||||
|
uni.showToast({
|
||||||
|
title: '提交成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
this.currentStep = 4;
|
||||||
|
}, 1500);
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({ title: res.msg || '提交失败', icon: 'none' });
|
uni.showToast({
|
||||||
|
title: res.msg || '提交失败了',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error('提交失败:', error);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
|
uni.showToast({
|
||||||
|
title: '提交失败,请重试',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -728,4 +791,23 @@
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.showziliao {
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: #FF4767;
|
||||||
|
border-radius: 49rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.showziliaotext {
|
||||||
|
height: 40rpx;
|
||||||
|
font-family: PingFangSC, PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
line-height: 96rpx;
|
||||||
|
font-style: normal;
|
||||||
|
margin: 0 0 0 281rpx;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -10,9 +10,8 @@
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<text class="label required">资质照片</text>
|
<text class="label required">资质照片</text>
|
||||||
<text class="upload-desc">请保证照片上的文字清晰、无遮挡、证件边角可见</text>
|
<text class="upload-desc">请保证照片上的文字清晰、无遮挡、证件边角可见</text>
|
||||||
<view class="" @click="chooseImage('business_license')">
|
<view class="" @click="chooseImage('uscc_photo')">
|
||||||
<image v-if="formData.business_license" :src="formData.business_license" mode="aspectFill"
|
<image v-if="formData.uscc_photo" :src="formData.uscc_photo" mode="aspectFill" class="upload-preview"></image>
|
||||||
class="upload-preview"></image>
|
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
<image
|
<image
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/fa75ea1c-8f9d-4b2a-8d0c-b94de516afd0.png"
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/fa75ea1c-8f9d-4b2a-8d0c-b94de516afd0.png"
|
||||||
|
|
@ -24,86 +23,46 @@
|
||||||
|
|
||||||
<view class="form-item-two box-cont">
|
<view class="form-item-two box-cont">
|
||||||
<text class="label required">商户类型</text>
|
<text class="label required">商户类型</text>
|
||||||
<input type="text" v-model="formData.household_type" placeholder="请输入商户类型" placeholder-class="placeholder"
|
<input type="text" v-model="formData.uscc_type" placeholder="请输入商户类型" placeholder-class="placeholder"
|
||||||
class="input" @input="saveFormDataToLocalDebounce" />
|
class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-two box-cont">
|
<view class="form-item-two box-cont">
|
||||||
<text class="label required">证件号码</text>
|
<text class="label required">证件号码</text>
|
||||||
<view class="picker-content">
|
<view class="picker-content">
|
||||||
<input type="text" v-model="formData.license_number" placeholder="请输入营业执照的证件号码"
|
<input type="text" v-model="formData.uscc_num" placeholder="请输入营业执照的证件号码" placeholder-class="placeholder"
|
||||||
placeholder-class="placeholder" class="input" @input="saveFormDataToLocalDebounce" />
|
class="input" />
|
||||||
<image class="label-icon"
|
<image class="label-icon"
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||||
mode="aspectFit" @click.stop="showTipPopup('license_number')"></image>
|
mode="aspectFit" @click.stop="showTipPopup('uscc_num')"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-two box-cont">
|
<view class="form-item-two box-cont">
|
||||||
<text class="label required">营业名称</text>
|
<text class="label required">营业名称</text>
|
||||||
<input type="text" v-model="formData.business_name" placeholder="请输入营业执照的企业名称" placeholder-class="placeholder"
|
<input type="text" v-model="formData.uscc_name" placeholder="请输入营业执照的企业名称" placeholder-class="placeholder"
|
||||||
class="input" @input="saveFormDataToLocalDebounce" />
|
class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-two box-cont" @click="showRegionPicker">
|
<view class="form-item-two box-cont" @click="showRegionPicker">
|
||||||
<text class="label required">注册地区</text>
|
<text class="label required">注册地区</text>
|
||||||
<view class="picker-content">
|
<view class="picker-content">
|
||||||
<text :class="formData.register_region ? 'picker-value' : 'placeholder1'">
|
<text :class="formData.uscc_dependency ? 'picker-value' : 'placeholder1'">
|
||||||
{{ formData.register_region || '请选择' }}
|
{{ formData.uscc_dependency || '请选择' }}
|
||||||
</text>
|
</text>
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
|
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
|
||||||
class="arrow-right" mode="aspectFit"></image>
|
class="arrow-right" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-two box-cont">
|
<view class="form-item-two box-cont" @click="getAddressInfo">
|
||||||
<text class="label required">注册详细地址</text>
|
<text class="label required">注册详细地址</text>
|
||||||
<view class="picker-content">
|
<view class="picker-content">
|
||||||
<input type="text" v-model="formData.register_address" placeholder="请输入注册地址" placeholder-class="placeholder"
|
<text :class="formData.uscc_address ? 'picker-value' : 'placeholder'">
|
||||||
class="input" @input="saveFormDataToLocalDebounce" />
|
{{ formData.uscc_address || '请选择' }}
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="form-item-column box-cont">
|
|
||||||
<text class="label required">营业执照有效期至:</text>
|
|
||||||
<view class="radio-group">
|
|
||||||
<view class="radio-item" @click="setIdcardExpiryType('permanent')">
|
|
||||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'permanent' }">
|
|
||||||
<image v-if="formData.legal_idcard_expiry_type === 'permanent'"
|
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
|
||||||
class="radio-icon-image" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
<text class="radio-label">永久有效</text>
|
|
||||||
</view>
|
|
||||||
<view class="radio-item" @click="setIdcardExpiryType('date')">
|
|
||||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'date' }">
|
|
||||||
<image v-if="formData.legal_idcard_expiry_type === 'date'"
|
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
|
||||||
class="radio-icon-image" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
<text class="radio-label">指定日期有效</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="date-row box-cont">
|
|
||||||
<view class="date-col" @click="showDatePicker('start')">
|
|
||||||
<text class="date-label">开始日期</text>
|
|
||||||
<view class="date-input-box">
|
|
||||||
<text :class="formData.idcard_start_date ? 'date-value' : 'date-placeholder'">
|
|
||||||
{{ formData.idcard_start_date || '选择日期' }}
|
|
||||||
</text>
|
</text>
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
|
||||||
class="date-icon" mode="aspectFit"></image>
|
class="arrow-right" mode="aspectFit"></image>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="date-col" @click="showDatePicker('end')">
|
|
||||||
<text class="date-label">结束日期</text>
|
|
||||||
<view class="date-input-box">
|
|
||||||
<text :class="formData.idcard_end_date ? 'date-value' : 'date-placeholder'">
|
|
||||||
{{ formData.idcard_end_date || '选择日期' }}
|
|
||||||
</text>
|
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
|
||||||
class="date-icon" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -117,8 +76,9 @@
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<text class="label required">身份证照片</text>
|
<text class="label required">身份证照片</text>
|
||||||
<text class="upload-desc">请保证照片上的文字清晰、无遮挡、证件边角可见</text>
|
<text class="upload-desc">请保证照片上的文字清晰、无遮挡、证件边角可见</text>
|
||||||
<view class="upload-area" @click="chooseImage('id_card_front')">
|
<view class="upload-area" @click="chooseImage('legal_idcard_positive')">
|
||||||
<image v-if="formData.id_card_front" :src="formData.id_card_front" mode="aspectFill" class="upload-preview">
|
<image v-if="formData.legal_idcard_positive" :src="formData.legal_idcard_positive" mode="aspectFill"
|
||||||
|
class="upload-preview">
|
||||||
</image>
|
</image>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
<image
|
<image
|
||||||
|
|
@ -127,8 +87,9 @@
|
||||||
</view>
|
</view>
|
||||||
<text class="placeholder1 required">请上传身份证正面(人像面)</text>
|
<text class="placeholder1 required">请上传身份证正面(人像面)</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="upload-area" @click="chooseImage('id_card_back')" style="margin-top: 48rpx;">
|
<view class="upload-area" @click="chooseImage('legal_idcard_negative')" style="margin-top: 48rpx;">
|
||||||
<image v-if="formData.id_card_back" :src="formData.id_card_back" mode="aspectFill" class="upload-preview">
|
<image v-if="formData.legal_idcard_negative" :src="formData.legal_idcard_negative" mode="aspectFill"
|
||||||
|
class="upload-preview">
|
||||||
</image>
|
</image>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
<image
|
<image
|
||||||
|
|
@ -141,36 +102,36 @@
|
||||||
|
|
||||||
<view class="form-item-two box-cont">
|
<view class="form-item-two box-cont">
|
||||||
<text class="label required">法人代表</text>
|
<text class="label required">法人代表</text>
|
||||||
<input type="text" v-model="formData.legal_person" placeholder="请输入营业执照的法人代表" placeholder-class="placeholder"
|
<input type="text" v-model="formData.legal_name" placeholder="请输入营业执照的法人代表" placeholder-class="placeholder"
|
||||||
class="input" @input="saveFormDataToLocalDebounce" />
|
class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-two box-cont">
|
<view class="form-item-two box-cont">
|
||||||
<text class="label required">法人联系方式</text>
|
<text class="label required">法人联系方式</text>
|
||||||
<input type="number" v-model="formData.legal_phone" placeholder="请输入法人的联系方式" placeholder-class="placeholder"
|
<input type="number" v-model="formData.legal_phone" placeholder="请输入法人的联系方式" placeholder-class="placeholder"
|
||||||
class="input" @input="saveFormDataToLocalDebounce" />
|
class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-two box-cont">
|
<view class="form-item-two box-cont">
|
||||||
<text class="label required">法人身份证号</text>
|
<text class="label required">法人身份证号</text>
|
||||||
<input type="text" v-model="formData.legal_id_number" placeholder="请输入法人的身份证号码" placeholder-class="placeholder"
|
<input type="text" v-model="formData.legal_idcard_num" placeholder="请输入法人的身份证号码" placeholder-class="placeholder"
|
||||||
class="input" @input="saveFormDataToLocalDebounce" />
|
class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-column box-cont">
|
<view class="form-item-column box-cont">
|
||||||
<text class="label required">营业执照有效期至:</text>
|
<text class="label required">身份证有效期:</text>
|
||||||
<view class="radio-group">
|
<view class="radio-group">
|
||||||
<view class="radio-item" @click="setIdcardExpiryType('permanent')">
|
<view class="radio-item" @click="setIdcardExpiryType('1')">
|
||||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'permanent' }">
|
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === '1' }">
|
||||||
<image v-if="formData.legal_idcard_expiry_type === 'permanent'"
|
<image v-if="formData.legal_idcard_expiry_type === '1'"
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||||
class="radio-icon-image" mode="aspectFit"></image>
|
class="radio-icon-image" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<text class="radio-label">永久有效</text>
|
<text class="radio-label">永久有效</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="radio-item" @click="setIdcardExpiryType('date')">
|
<view class="radio-item" @click="setIdcardExpiryType('2')">
|
||||||
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === 'date' }">
|
<view class="radio" :class="{ checked: formData.legal_idcard_expiry_type === '2' }">
|
||||||
<image v-if="formData.legal_idcard_expiry_type === 'date'"
|
<image v-if="formData.legal_idcard_expiry_type === '2'"
|
||||||
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||||
class="radio-icon-image" mode="aspectFit"></image>
|
class="radio-icon-image" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -182,20 +143,22 @@
|
||||||
<view class="date-col" @click="showDatePicker('start')">
|
<view class="date-col" @click="showDatePicker('start')">
|
||||||
<text class="date-label">开始日期</text>
|
<text class="date-label">开始日期</text>
|
||||||
<view class="date-input-box">
|
<view class="date-input-box">
|
||||||
<text :class="formData.idcard_start_date ? 'date-value' : 'date-placeholder'">
|
<text :class="formData.legal_idcard_expiry_start ? 'date-value' : 'date-placeholder'">
|
||||||
{{ formData.idcard_start_date || '选择日期' }}
|
{{ formData.legal_idcard_expiry_start || '选择日期' }}
|
||||||
</text>
|
</text>
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
<image
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||||
class="date-icon" mode="aspectFit"></image>
|
class="date-icon" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="date-col" @click="showDatePicker('end')">
|
<view class="date-col" @click="showDatePicker('end')">
|
||||||
<text class="date-label">结束日期</text>
|
<text class="date-label">结束日期</text>
|
||||||
<view class="date-input-box">
|
<view class="date-input-box">
|
||||||
<text :class="formData.idcard_end_date ? 'date-value' : 'date-placeholder'">
|
<text :class="formData.legal_idcard_expiry_end ? 'date-value' : 'date-placeholder'">
|
||||||
{{ formData.idcard_end_date || '选择日期' }}
|
{{ formData.legal_idcard_expiry_end || '选择日期' }}
|
||||||
</text>
|
</text>
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
<image
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/5b01823b-7672-4e60-b6cc-a4de52294605.png"
|
||||||
class="date-icon" mode="aspectFit"></image>
|
class="date-icon" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -212,25 +175,29 @@
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<text class="label required">行业资质</text>
|
<text class="label required">行业资质</text>
|
||||||
<view class="image-list">
|
<view class="image-list">
|
||||||
<view class="image-item" v-for="(img, index) in formData.industry_qualifications" :key="'industry-' + index">
|
<view class="image-item" v-for="(img, index) in formData.qualifications_sector" :key="'industry-' + index">
|
||||||
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||||
<view class="image-delete" @click="removeImage('industry_qualifications', index)">×</view>
|
<view class="image-delete" @click="removeImage('qualifications_sector', index)">×</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="image-add" @click="chooseMultiImage('industry_qualifications')"
|
<view class="image-add" @click="chooseMultiImage('qualifications_sector')"
|
||||||
v-if="formData.industry_qualifications.length < 9">
|
v-if="(formData.qualifications_sector || []).length < 9">
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png" mode="aspectFit" class="upload-icon-small"></image>
|
<image
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png"
|
||||||
|
mode="aspectFit" class="upload-icon-small"></image>
|
||||||
<text class="add-text">添加照片</text>
|
<text class="add-text">添加照片</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="label" style="margin-top: 30rpx;">其他资质</text>
|
<text class="label" style="margin-top: 30rpx;">其他资质</text>
|
||||||
<view class="image-list">
|
<view class="image-list">
|
||||||
<view class="image-item" v-for="(img, index) in formData.other_qualifications" :key="'other-' + index">
|
<view class="image-item" v-for="(img, index) in formData.qualifications_other" :key="'other-' + index">
|
||||||
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||||
<view class="image-delete" @click="removeImage('other_qualifications', index)">×</view>
|
<view class="image-delete" @click="removeImage('qualifications_other', index)">×</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="image-add" @click="chooseMultiImage('other_qualifications')"
|
<view class="image-add" @click="chooseMultiImage('qualifications_other')"
|
||||||
v-if="formData.other_qualifications.length < 9">
|
v-if="(formData.qualifications_other || []).length < 9">
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png" mode="aspectFit" class="upload-icon-small"></image>
|
<image
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png"
|
||||||
|
mode="aspectFit" class="upload-icon-small"></image>
|
||||||
<text class="add-text">添加照片</text>
|
<text class="add-text">添加照片</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -319,35 +286,33 @@
|
||||||
<script>
|
<script>
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
import ChinaCitys from '../../static/data/ChinaCitys.json';
|
import ChinaCitys from '../../static/data/ChinaCitys.json';
|
||||||
import {
|
import { recognizeIdCard, recognizeBusinessLicense, parseValidPeriod } from '../../utils/orc';
|
||||||
debounce
|
|
||||||
} from '@/utils/debounce.js';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
const loadedData = this.loadFormDataFromLocal();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
formData: loadedData || {
|
formData: {
|
||||||
business_license: '',
|
uscc_photo: '',
|
||||||
household_type: '',
|
uscc_type: '',
|
||||||
license_number: '',
|
uscc_num: '',
|
||||||
business_name: '',
|
uscc_name: '',
|
||||||
register_region: '',
|
uscc_dependency: '',
|
||||||
register_address: '',
|
uscc_address: '',
|
||||||
register_province: '',
|
uscc_province: '',
|
||||||
register_city: '',
|
uscc_city: '',
|
||||||
register_area: '',
|
uscc_area: '',
|
||||||
id_card_front: '',
|
longitude: '',
|
||||||
id_card_back: '',
|
latitude: '',
|
||||||
legal_person: '',
|
legal_idcard_positive: '',
|
||||||
|
legal_idcard_negative: '',
|
||||||
|
legal_name: '',
|
||||||
legal_phone: '',
|
legal_phone: '',
|
||||||
legal_id_number: '',
|
legal_idcard_num: '',
|
||||||
legal_idcard_expiry_type: 'permanent',
|
legal_idcard_expiry_type: '1',
|
||||||
idcard_start_date: '',
|
legal_idcard_expiry_start: '',
|
||||||
idcard_end_date: '',
|
legal_idcard_expiry_end: '',
|
||||||
industry_qualifications: [],
|
qualifications_sector: [],
|
||||||
other_qualifications: []
|
qualifications_other: []
|
||||||
},
|
},
|
||||||
ChinaCitys: ChinaCitys,
|
ChinaCitys: ChinaCitys,
|
||||||
regionCitys: [],
|
regionCitys: [],
|
||||||
|
|
@ -358,8 +323,12 @@ export default {
|
||||||
currentPickerType: 'start',
|
currentPickerType: 'start',
|
||||||
datePickerValue: [0, 0, 0],
|
datePickerValue: [0, 0, 0],
|
||||||
indicatorStyle: 'height: 68rpx;',
|
indicatorStyle: 'height: 68rpx;',
|
||||||
|
isRecognizing: false,
|
||||||
|
recognizeType: '',
|
||||||
userId: null,
|
userId: null,
|
||||||
identity: 3
|
identity: 3,
|
||||||
|
addressListener: null,
|
||||||
|
sjAddressListener: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -385,6 +354,10 @@ export default {
|
||||||
await this.getUserInfo();
|
await this.getUserInfo();
|
||||||
this.regionCitys = this.ChinaCitys[0].citys;
|
this.regionCitys = this.ChinaCitys[0].citys;
|
||||||
this.regionAreas = this.regionCitys[0].areas;
|
this.regionAreas = this.regionCitys[0].areas;
|
||||||
|
this.setupAddressListener();
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.removeAddressListener();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -396,29 +369,6 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
loadFormDataFromLocal() {
|
|
||||||
try {
|
|
||||||
const stored = uni.getStorageSync('sj_info_form_data');
|
|
||||||
if (stored) return stored;
|
|
||||||
} catch (e) { }
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
|
|
||||||
saveFormDataToLocal() {
|
|
||||||
try {
|
|
||||||
uni.setStorageSync('sj_info_form_data', this.formData);
|
|
||||||
} catch (e) { }
|
|
||||||
},
|
|
||||||
|
|
||||||
saveFormDataToLocalDebounce() {
|
|
||||||
if (!this._saveDebounce) {
|
|
||||||
this._saveDebounce = debounce(() => {
|
|
||||||
this.saveFormDataToLocal();
|
|
||||||
}, 500);
|
|
||||||
}
|
|
||||||
this._saveDebounce();
|
|
||||||
},
|
|
||||||
|
|
||||||
chooseImage(type) {
|
chooseImage(type) {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1,
|
count: 1,
|
||||||
|
|
@ -434,7 +384,13 @@ export default {
|
||||||
const url = await this.directUpload(file, this.userId, 3);
|
const url = await this.directUpload(file, this.userId, 3);
|
||||||
if (url) {
|
if (url) {
|
||||||
this.$set(this.formData, type, url);
|
this.$set(this.formData, type, url);
|
||||||
this.saveFormDataToLocal();
|
if (type === 'uscc_photo') {
|
||||||
|
await this.recognizeBusinessLicense(url);
|
||||||
|
} else if (type === 'legal_idcard_positive') {
|
||||||
|
await this.recognizeIdCardFront(url);
|
||||||
|
} else if (type === 'legal_idcard_negative') {
|
||||||
|
await this.recognizeIdCardBack(url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -474,7 +430,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$set(this.formData, type, current);
|
this.$set(this.formData, type, current);
|
||||||
this.saveFormDataToLocal();
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -484,7 +439,6 @@ export default {
|
||||||
const list = [...this.formData[type]];
|
const list = [...this.formData[type]];
|
||||||
list.splice(index, 1);
|
list.splice(index, 1);
|
||||||
this.$set(this.formData, type, list);
|
this.$set(this.formData, type, list);
|
||||||
this.saveFormDataToLocal();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async directUpload(file, userId, type) {
|
async directUpload(file, userId, type) {
|
||||||
|
|
@ -554,14 +508,19 @@ export default {
|
||||||
let province = this.ChinaCitys[index1].province;
|
let province = this.ChinaCitys[index1].province;
|
||||||
let city = this.regionCitys[index2].city;
|
let city = this.regionCitys[index2].city;
|
||||||
let area = this.regionAreas[index3].area;
|
let area = this.regionAreas[index3].area;
|
||||||
this.formData.register_region = province + '-' + city + '-' + area;
|
this.formData.uscc_dependency = province + '-' + city + '-' + area;
|
||||||
this.formData.register_province = this.ChinaCitys[index1].code ? this.ChinaCitys[index1].code.toString()
|
if (this.ChinaCitys[index1] && this.ChinaCitys[index1].code) {
|
||||||
.substring(0, 6) : '';
|
this.formData.uscc_province = String(this.ChinaCitys[index1].code).substring(0, 6);
|
||||||
this.formData.register_city = this.regionCitys[index2].code ? this.regionCitys[index2].code.toString()
|
}
|
||||||
.substring(0, 6) : '';
|
if (this.regionCitys[index2] && this.regionCitys[index2].code) {
|
||||||
this.formData.register_area = this.regionAreas[index3].code ? this.regionAreas[index3].code.toString()
|
this.formData.uscc_city = String(this.regionCitys[index2].code).substring(0, 6);
|
||||||
.substring(0, 6) : '';
|
}
|
||||||
this.saveFormDataToLocal();
|
if (this.regionAreas[index3] && this.regionAreas[index3].code) {
|
||||||
|
this.formData.uscc_area = String(this.regionAreas[index3].code).substring(0, 6);
|
||||||
|
}
|
||||||
|
this.formData.uscc_address = '';
|
||||||
|
this.formData.longitude = '';
|
||||||
|
this.formData.latitude = '';
|
||||||
this.hideRegionPopup();
|
this.hideRegionPopup();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -575,14 +534,13 @@ export default {
|
||||||
|
|
||||||
setIdcardExpiryType(type) {
|
setIdcardExpiryType(type) {
|
||||||
this.$set(this.formData, 'legal_idcard_expiry_type', type);
|
this.$set(this.formData, 'legal_idcard_expiry_type', type);
|
||||||
if (type === 'permanent') {
|
if (type === '1') {
|
||||||
this.formData.idcard_end_date = '长久有效';
|
this.formData.legal_idcard_expiry_end = '长久有效';
|
||||||
} else {
|
} else {
|
||||||
if (this.formData.idcard_end_date === '长久有效') {
|
if (this.formData.legal_idcard_expiry_end === '长久有效') {
|
||||||
this.formData.idcard_end_date = '';
|
this.formData.legal_idcard_expiry_end = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.saveFormDataToLocal();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
showDatePicker(type) {
|
showDatePicker(type) {
|
||||||
|
|
@ -604,78 +562,359 @@ export default {
|
||||||
const day = this.days[this.datePickerValue[2]];
|
const day = this.days[this.datePickerValue[2]];
|
||||||
const dateStr = `${year}年${month < 10 ? '0' + month : month}月${day < 10 ? '0' + day : day}日`;
|
const dateStr = `${year}年${month < 10 ? '0' + month : month}月${day < 10 ? '0' + day : day}日`;
|
||||||
if (this.currentPickerType === 'start') {
|
if (this.currentPickerType === 'start') {
|
||||||
this.formData.idcard_start_date = dateStr;
|
this.formData.legal_idcard_expiry_start = dateStr;
|
||||||
} else {
|
} else {
|
||||||
this.formData.idcard_end_date = dateStr;
|
this.formData.legal_idcard_expiry_end = dateStr;
|
||||||
}
|
}
|
||||||
this.saveFormDataToLocal();
|
|
||||||
this.hideDatePicker();
|
this.hideDatePicker();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
buildRegionTextForSearch() {
|
||||||
|
const dependency = String(this.formData.uscc_dependency || '').trim();
|
||||||
|
if (!dependency) return '';
|
||||||
|
const parts = dependency.split('-');
|
||||||
|
const province = parts[0] || '';
|
||||||
|
const city = parts[1] || '';
|
||||||
|
const district = parts[2] || '';
|
||||||
|
let regionText = '';
|
||||||
|
if (province) regionText += province;
|
||||||
|
if (city && city !== province) regionText += city;
|
||||||
|
if (district) regionText += district;
|
||||||
|
return regionText;
|
||||||
|
},
|
||||||
|
|
||||||
|
getAddressValueForSearch() {
|
||||||
|
const rawAddress = String(this.formData.uscc_address || '').trim();
|
||||||
|
if (!rawAddress) return '';
|
||||||
|
const dependencyText = String(this.formData.uscc_dependency || '').trim();
|
||||||
|
const regionText = this.buildRegionTextForSearch();
|
||||||
|
let detail = rawAddress;
|
||||||
|
if (regionText && detail.indexOf(regionText) === 0) {
|
||||||
|
detail = detail.slice(regionText.length).trim();
|
||||||
|
} else if (dependencyText && detail.indexOf(dependencyText) === 0) {
|
||||||
|
detail = detail.slice(dependencyText.length).trim();
|
||||||
|
}
|
||||||
|
detail = detail.replace(/^[\s,-]+/, '').trim();
|
||||||
|
return detail || rawAddress;
|
||||||
|
},
|
||||||
|
|
||||||
|
getAddressInfo() {
|
||||||
|
const dependency = String(this.formData.uscc_dependency || '').trim();
|
||||||
|
const dependencyCode = String(this.formData.uscc_area || '').trim();
|
||||||
|
const address = this.getAddressValueForSearch();
|
||||||
|
const longitude = String(this.formData.longitude || '').trim();
|
||||||
|
const latitude = String(this.formData.latitude || '').trim();
|
||||||
|
|
||||||
|
const hasDependency = !!dependency;
|
||||||
|
const hasAddress = !!address;
|
||||||
|
const hasLocation = !!(longitude && latitude);
|
||||||
|
|
||||||
|
let params = 'source=sj_info';
|
||||||
|
|
||||||
|
if (hasDependency) {
|
||||||
|
params += `&dependency=${encodeURIComponent(dependency)}`;
|
||||||
|
if (dependencyCode) {
|
||||||
|
params += `&dependency_code=${dependencyCode}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasAddress) {
|
||||||
|
params += `&address=${encodeURIComponent(address)}`;
|
||||||
|
}
|
||||||
|
if (hasLocation) {
|
||||||
|
params += `&longitude=${longitude}&latitude=${latitude}`;
|
||||||
|
}
|
||||||
|
if (!hasDependency && !hasAddress && !hasLocation) {
|
||||||
|
params += '&init_current_location=1&silent_locate=1';
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/address/search?${params}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
setupAddressListener() {
|
||||||
|
this.addressListener = (addressData) => {
|
||||||
|
this.handleAddressSelected(addressData);
|
||||||
|
};
|
||||||
|
this.sjAddressListener = (addressData) => {
|
||||||
|
this.handleAddressSelected(addressData);
|
||||||
|
};
|
||||||
|
uni.$on('address-selected', this.addressListener);
|
||||||
|
uni.$on('address-selected-for-sj', this.sjAddressListener);
|
||||||
|
},
|
||||||
|
|
||||||
|
removeAddressListener() {
|
||||||
|
if (this.addressListener) {
|
||||||
|
uni.$off('address-selected', this.addressListener);
|
||||||
|
this.addressListener = null;
|
||||||
|
}
|
||||||
|
if (this.sjAddressListener) {
|
||||||
|
uni.$off('address-selected-for-sj', this.sjAddressListener);
|
||||||
|
this.sjAddressListener = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
checkAddressData() {
|
||||||
|
try {
|
||||||
|
const storedAddress = uni.getStorageSync('sj_selected_address');
|
||||||
|
if (storedAddress) {
|
||||||
|
this.handleAddressSelected(storedAddress);
|
||||||
|
uni.removeStorageSync('sj_selected_address');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
|
||||||
|
if (getApp().globalData && getApp().globalData.selectedAddress) {
|
||||||
|
this.handleAddressSelected(getApp().globalData.selectedAddress);
|
||||||
|
delete getApp().globalData.selectedAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const selectedAddress = uni.getStorageSync('selectedAddress');
|
||||||
|
if (selectedAddress) {
|
||||||
|
this.handleAddressSelected(selectedAddress);
|
||||||
|
uni.removeStorageSync('selectedAddress');
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
},
|
||||||
|
|
||||||
|
handleAddressSelected(addressData) {
|
||||||
|
if (!addressData) return;
|
||||||
|
|
||||||
|
let detailAddress = '';
|
||||||
|
if (addressData.address) {
|
||||||
|
detailAddress = String(addressData.address).trim();
|
||||||
|
} else if (addressData.name) {
|
||||||
|
detailAddress = String(addressData.name).trim();
|
||||||
|
const regionParts = [];
|
||||||
|
if (addressData.pname) regionParts.push(addressData.pname);
|
||||||
|
if (addressData.cityname && addressData.cityname !== addressData.pname) regionParts.push(addressData.cityname);
|
||||||
|
if (addressData.adname) regionParts.push(addressData.adname);
|
||||||
|
const regionText = regionParts.join('');
|
||||||
|
if (regionText && detailAddress.indexOf(regionText) === 0) {
|
||||||
|
detailAddress = detailAddress.slice(regionText.length).trim();
|
||||||
|
}
|
||||||
|
detailAddress = detailAddress.replace(/^[\s,-]+/, '').trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$set(this.formData, 'uscc_address', detailAddress);
|
||||||
|
|
||||||
|
if (addressData.location) {
|
||||||
|
const [longitude, latitude] = String(addressData.location).split(',');
|
||||||
|
this.$set(this.formData, 'longitude', longitude || '');
|
||||||
|
this.$set(this.formData, 'latitude', latitude || '');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addressData.pname || addressData.cityname || addressData.adname) {
|
||||||
|
const locationParts = [];
|
||||||
|
if (addressData.pname) locationParts.push(addressData.pname);
|
||||||
|
if (addressData.cityname) locationParts.push(addressData.cityname);
|
||||||
|
if (addressData.adname) locationParts.push(addressData.adname);
|
||||||
|
this.$set(this.formData, 'uscc_dependency', locationParts.join('-'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addressData.provinceCode) {
|
||||||
|
this.$set(this.formData, 'uscc_province', String(addressData.provinceCode).substring(0, 6));
|
||||||
|
}
|
||||||
|
if (addressData.cityCode) {
|
||||||
|
this.$set(this.formData, 'uscc_city', String(addressData.cityCode).substring(0, 6));
|
||||||
|
}
|
||||||
|
if (addressData.districtCode) {
|
||||||
|
this.$set(this.formData, 'uscc_area', String(addressData.districtCode).substring(0, 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
|
||||||
|
async recognizeBusinessLicense(imageUrl) {
|
||||||
|
try {
|
||||||
|
this.isRecognizing = true;
|
||||||
|
this.recognizeType = 'uscc_photo';
|
||||||
|
uni.showLoading({ title: '正在识别营业执照...', mask: true });
|
||||||
|
const result = await recognizeBusinessLicense(imageUrl);
|
||||||
|
console.log('营业执照识别结果:', result);
|
||||||
|
const hasRecognizedData = this.checkBusinessLicenseRecognition(result);
|
||||||
|
if (!hasRecognizedData) {
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: '未识别到营业执照信息,请手动填写或重新拍摄', icon: 'none', duration: 3000 });
|
||||||
|
this.isRecognizing = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let recognizedFields = 0;
|
||||||
|
if (result.uscc_name && result.uscc_name.trim() && result.uscc_name !== '无') {
|
||||||
|
this.$set(this.formData, 'uscc_name', result.uscc_name);
|
||||||
|
recognizedFields++;
|
||||||
|
}
|
||||||
|
if (result.uscc_num && result.uscc_num.trim()) {
|
||||||
|
this.$set(this.formData, 'uscc_num', result.uscc_num);
|
||||||
|
recognizedFields++;
|
||||||
|
}
|
||||||
|
if (result.uscc_type && result.uscc_type.trim()) {
|
||||||
|
this.$set(this.formData, 'uscc_type', result.uscc_type);
|
||||||
|
recognizedFields++;
|
||||||
|
}
|
||||||
|
uni.hideLoading();
|
||||||
|
if (recognizedFields > 0) {
|
||||||
|
uni.showToast({ title: '营业执照识别成功', icon: 'none', duration: 2000 });
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: '识别完成,但未获取到有效信息', icon: 'none', duration: 3000 });
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('营业执照识别失败:', error);
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: error.message || '识别失败,请手动填写', icon: 'none', duration: 3000 });
|
||||||
|
} finally {
|
||||||
|
this.isRecognizing = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
checkBusinessLicenseRecognition(result) {
|
||||||
|
const requiredFields = ['uscc_num', 'uscc_name', 'uscc_type'];
|
||||||
|
for (const field of requiredFields) {
|
||||||
|
if (result[field] && result[field].trim()) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
async recognizeIdCardFront(imageUrl) {
|
||||||
|
try {
|
||||||
|
this.isRecognizing = true;
|
||||||
|
this.recognizeType = 'legal_idcard_positive';
|
||||||
|
uni.showLoading({ title: '正在识别身份证正面...', mask: true });
|
||||||
|
const result = await recognizeIdCard(imageUrl, 1);
|
||||||
|
const hasRecognizedData = (result.name && result.name.trim()) || (result.id_number && result.id_number.trim());
|
||||||
|
if (!hasRecognizedData) {
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: '未识别到身份证信息,请手动填写或重新拍摄', icon: 'none', duration: 3000 });
|
||||||
|
this.isRecognizing = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (result.name) {
|
||||||
|
this.$set(this.formData, 'legal_name', result.name);
|
||||||
|
}
|
||||||
|
if (result.id_number) {
|
||||||
|
this.$set(this.formData, 'legal_idcard_num', result.id_number);
|
||||||
|
}
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: '身份证正面识别成功', icon: 'none' });
|
||||||
|
} catch (error) {
|
||||||
|
console.error('身份证正面识别失败:', error);
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: error.message || '识别失败,请手动填写', icon: 'none', duration: 3000 });
|
||||||
|
} finally {
|
||||||
|
this.isRecognizing = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async recognizeIdCardBack(imageUrl) {
|
||||||
|
try {
|
||||||
|
this.isRecognizing = true;
|
||||||
|
this.recognizeType = 'legal_idcard_negative';
|
||||||
|
uni.showLoading({ title: '正在识别身份证反面...', mask: true });
|
||||||
|
const result = await recognizeIdCard(imageUrl, 2);
|
||||||
|
const hasRecognizedData = (result.start_date && result.start_date.trim()) || (result.end_date && result.end_date.trim());
|
||||||
|
if (!hasRecognizedData) {
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: '未识别到身份证有效期信息,请手动填写或重新拍摄', icon: 'none', duration: 3000 });
|
||||||
|
this.isRecognizing = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const validPeriod = parseValidPeriod(result.start_date, result.end_date);
|
||||||
|
if (validPeriod.startDate) {
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_start', validPeriod.startDate);
|
||||||
|
}
|
||||||
|
if (validPeriod.isPermanent) {
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_type', '1');
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_end', '长久有效');
|
||||||
|
} else if (validPeriod.endDate) {
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_type', '2');
|
||||||
|
this.$set(this.formData, 'legal_idcard_expiry_end', validPeriod.endDate);
|
||||||
|
}
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: '身份证反面识别成功', icon: 'none' });
|
||||||
|
} catch (error) {
|
||||||
|
console.error('身份证反面识别失败:', error);
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({ title: error.message || '识别失败,请手动填写', icon: 'none', duration: 3000 });
|
||||||
|
} finally {
|
||||||
|
this.isRecognizing = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
showTipPopup(field) { },
|
showTipPopup(field) { },
|
||||||
|
|
||||||
getFormData() {
|
getFormData() {
|
||||||
return this.formData;
|
return this.formData;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setData(data) {
|
||||||
|
if (!data) return;
|
||||||
|
const keys = Object.keys(this.formData);
|
||||||
|
keys.forEach(key => {
|
||||||
|
if (data[key] !== undefined && data[key] !== null) {
|
||||||
|
this.$set(this.formData, key, data[key]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
saveFormData() {
|
saveFormData() {
|
||||||
if (!this.formData.business_license) {
|
if (!this.formData.uscc_photo) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请上传营业执照',
|
title: '请上传营业执照',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.household_type) {
|
if (!this.formData.uscc_type) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择户主类型',
|
title: '请选择户主类型',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.license_number) {
|
if (!this.formData.uscc_num) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入证件号码',
|
title: '请输入证件号码',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.business_name) {
|
if (!this.formData.uscc_name) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入营业名称',
|
title: '请输入营业名称',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.register_region) {
|
if (!this.formData.uscc_dependency) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择注册地区',
|
title: '请选择注册地区',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.register_address) {
|
if (!this.formData.uscc_address) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入注册详细地址',
|
title: '请输入注册详细地址',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.id_card_front) {
|
if (!this.formData.legal_idcard_positive) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请上传法人身份证正面',
|
title: '请上传法人身份证正面',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.id_card_back) {
|
if (!this.formData.legal_idcard_negative) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请上传法人身份证反面',
|
title: '请上传法人身份证反面',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.legal_person) {
|
if (!this.formData.legal_name) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入法人代表',
|
title: '请输入法人代表',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|
@ -696,35 +935,34 @@ export default {
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.legal_id_number) {
|
if (!this.formData.legal_idcard_num) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入法人身份证号',
|
title: '请输入法人身份证号',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.idcard_start_date) {
|
if (!this.formData.legal_idcard_expiry_start) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择开始日期',
|
title: '请选择开始日期',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.idcard_end_date) {
|
if (!this.formData.legal_idcard_expiry_end) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择结束日期',
|
title: '请选择结束日期',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.formData.industry_qualifications || this.formData.industry_qualifications.length === 0) {
|
if (!this.formData.qualifications_sector || this.formData.qualifications_sector.length === 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请上传行业资质',
|
title: '请上传行业资质',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.saveFormDataToLocal();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="pages">
|
<view class="pages">
|
||||||
<custom-navbar title="入驻成功" :showBack="true"></custom-navbar>
|
<custom-navbar :title="infoData.top" :showBack="true"></custom-navbar>
|
||||||
<view class="title-icon">恭喜您!</view>
|
<view class="title-icon">{{infoData.title}}</view>
|
||||||
<!-- <view class="title-icon">{{data.residency_notice}}</view> -->
|
<view class="title-content">{{infoData.notice}}</view>
|
||||||
<view class="title-content">成功入驻成为美融融门店</view>
|
|
||||||
<!-- <view class="title-content">{{data.approve_notice}}</view> -->
|
|
||||||
<view class="erweimabox">
|
<view class="erweimabox">
|
||||||
<view class="erweimab">
|
<view class="erweimab">
|
||||||
<!-- <image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/26bd4004-c7aa-4997-9f31-8562060e7659.jpeg" mode="" style="width: 404rpx;height: 404rpx;"></image> -->
|
<image :src="infoData.photo" mode="widthFix"
|
||||||
<image :src="data.photo" mode="widthFix" style="width: 404rpx;border-radius:25rpx ;margin: 37rpx 0 0 36rpx;"></image>
|
style="width: 404rpx;border-radius:25rpx ;margin: 37rpx 0 0 36rpx;"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="kefubtn">扫码联系专属客服</view>
|
<view class="kefubtn">扫码联系专属客服</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -16,18 +14,35 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import request from '../../utils/request';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// 核心:用 props 接收
|
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object, // 类型:对象
|
type: Object,
|
||||||
default: () => ({}) // 默认空对象
|
default: () => ({})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
onLoad() {
|
return {
|
||||||
// 在 JS 里使用
|
infoData: {}
|
||||||
console.log(this.data,'--------------------')
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCustomerService();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getCustomerService() {
|
||||||
|
try {
|
||||||
|
const res = await request.post('/sj/userSjAuth/getCustomerService');
|
||||||
|
console.log('客服接口返回:', JSON.stringify(res));
|
||||||
|
if (res && (res.state == 1 || res.code == 200)) {
|
||||||
|
this.infoData = res.data || {};
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('获取客服信息失败:', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -44,6 +59,7 @@ export default {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
margin-top: 23rpx;
|
margin-top: 23rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pages {
|
.pages {
|
||||||
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/467f6b5f-32dc-4ba3-847a-22be4569c45e.png');
|
background-image: url('https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/467f6b5f-32dc-4ba3-847a-22be4569c45e.png');
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
|
|
@ -69,26 +85,26 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-icon {
|
.title-icon {
|
||||||
margin-left: 283rpx;
|
/* margin-left: 283rpx; */
|
||||||
height: 67rpx;
|
height: 67rpx;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 48rpx;
|
font-size: 48rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
line-height: 67rpx;
|
line-height: 67rpx;
|
||||||
text-align: left;
|
text-align: center;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-content {
|
.title-content {
|
||||||
margin: 14rpx 0 0 195rpx;
|
margin: 14rpx 0 0 0rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
font-family: PingFangSC, PingFang SC;
|
font-family: PingFangSC, PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
line-height: 42rpx;
|
line-height: 42rpx;
|
||||||
text-align: left;
|
text-align: center;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -125,7 +125,7 @@ export default {
|
||||||
// 加载当前营业时间
|
// 加载当前营业时间
|
||||||
async loadCurrentTime() {
|
async loadCurrentTime() {
|
||||||
try {
|
try {
|
||||||
const res = await request.post('/user/getuser', {
|
const res = await request.post('/sj/user/getuser', {
|
||||||
type: 3 // 商家类型
|
type: 3 // 商家类型
|
||||||
})
|
})
|
||||||
console.log('获取用户信息响应:', res)
|
console.log('获取用户信息响应:', res)
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,11 @@
|
||||||
<view class="upload-container">
|
<view class="upload-container">
|
||||||
<view class="upload-box" @click="editable && chooseImage('uscc_photo')">
|
<view class="upload-box" @click="editable && chooseImage('uscc_photo')">
|
||||||
<view class="upload-camera license-upload">
|
<view class="upload-camera license-upload">
|
||||||
<image v-if="displayData.uscc_photo" :src="displayData.uscc_photo" mode="aspectFill" class="preview-image"></image>
|
<image v-if="displayData.uscc_photo" :src="displayData.uscc_photo" mode="aspectFill"
|
||||||
<image v-else src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/92bd4268-b4d7-4725-8664-9e44f828c7d9" mode="aspectFit" class="camera-icon"></image>
|
class="preview-image"></image>
|
||||||
|
<image v-else
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/92bd4268-b4d7-4725-8664-9e44f828c7d9"
|
||||||
|
mode="aspectFit" class="camera-icon"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="upload-label required">请上传营业执照原件</text>
|
<text class="upload-label required">请上传营业执照原件</text>
|
||||||
|
|
@ -36,27 +39,57 @@
|
||||||
<view class="label-wrapper">
|
<view class="label-wrapper">
|
||||||
<text class="label required">商户类型</text>
|
<text class="label required">商户类型</text>
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="displayData.uscc_type" placeholder="请输入商户类型"
|
<input type="text" v-model="displayData.uscc_type" placeholder="请输入商户类型" :disabled="!editable"
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
placeholder-class="placeholder" class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 营业执照信息 -->
|
<!-- 营业执照信息 -->
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<view class="label-wrapper">
|
<view class="label-wrapper">
|
||||||
<text class="label required">证件号码</text>
|
<text class="label required">证件号码</text>
|
||||||
<image class="label-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108" mode="aspectFit" @click="showTipPopup('uscc_num')"></image>
|
<image class="label-icon"
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||||
|
mode="aspectFit" @click="showTipPopup('uscc_num')"></image>
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="displayData.uscc_num" placeholder="请输入营业执照的证件号码"
|
<input type="text" v-model="displayData.uscc_num" placeholder="请输入营业执照的证件号码" :disabled="!editable"
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
placeholder-class="placeholder" class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<view class="label-wrapper">
|
<view class="label-wrapper">
|
||||||
<text class="label required">企业名称</text>
|
<text class="label required">企业名称</text>
|
||||||
<image class="label-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108" mode="aspectFit" @click="showTipPopup('uscc_name')"></image>
|
<image class="label-icon"
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||||
|
mode="aspectFit" @click="showTipPopup('uscc_name')"></image>
|
||||||
|
</view>
|
||||||
|
<input type="text" v-model="displayData.uscc_name" placeholder="请输入营业执照的企业名称" :disabled="!editable"
|
||||||
|
placeholder-class="placeholder" class="input" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form-item-one box-cont" @click="editable && showRegionPicker()">
|
||||||
|
<view class="label-wrapper">
|
||||||
|
<text class="label required">注册地区</text>
|
||||||
|
</view>
|
||||||
|
<view class="picker-content">
|
||||||
|
<text :class="displayData.uscc_dependency ? 'picker-value' : 'placeholder'">
|
||||||
|
{{ displayData.uscc_dependency || '请选择' }}
|
||||||
|
</text>
|
||||||
|
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
|
||||||
|
class="arrow-right" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form-item-one box-cont" @click="editable && getAddressInfo()">
|
||||||
|
<view class="label-wrapper">
|
||||||
|
<text class="label required">注册详细地址</text>
|
||||||
|
</view>
|
||||||
|
<view class="picker-content">
|
||||||
|
<text :class="displayData.uscc_address ? 'picker-value' : 'placeholder'">
|
||||||
|
{{ displayData.uscc_address || '请选择' }}
|
||||||
|
</text>
|
||||||
|
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/dccc4513-377c-4bfa-9fd2-a5cfdb9798f3"
|
||||||
|
class="arrow-right" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="displayData.uscc_name" placeholder="请输入营业执照的企业名称"
|
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -79,8 +112,11 @@
|
||||||
<view class="idcard-upload-vertical-item">
|
<view class="idcard-upload-vertical-item">
|
||||||
<view class="upload-box" @click="editable && chooseImage('legal_idcard_positive')">
|
<view class="upload-box" @click="editable && chooseImage('legal_idcard_positive')">
|
||||||
<view class="upload-camera idcard-front">
|
<view class="upload-camera idcard-front">
|
||||||
<image v-if="displayData.legal_idcard_positive" :src="displayData.legal_idcard_positive" mode="aspectFill" class="preview-image"></image>
|
<image v-if="displayData.legal_idcard_positive" :src="displayData.legal_idcard_positive"
|
||||||
<image v-else src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/043b0c97-79c1-4f95-810f-c33e3d5269a3" mode="aspectFit" class="camera-icon"></image>
|
mode="aspectFill" class="preview-image"></image>
|
||||||
|
<image v-else
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/043b0c97-79c1-4f95-810f-c33e3d5269a3"
|
||||||
|
mode="aspectFit" class="camera-icon"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="upload-label required">请上传身份证正面(人像面)</text>
|
<text class="upload-label required">请上传身份证正面(人像面)</text>
|
||||||
|
|
@ -90,8 +126,11 @@
|
||||||
<view class="idcard-upload-vertical-item">
|
<view class="idcard-upload-vertical-item">
|
||||||
<view class="upload-box" @click="editable && chooseImage('legal_idcard_negative')">
|
<view class="upload-box" @click="editable && chooseImage('legal_idcard_negative')">
|
||||||
<view class="upload-camera idcard-back">
|
<view class="upload-camera idcard-back">
|
||||||
<image v-if="displayData.legal_idcard_negative" :src="displayData.legal_idcard_negative" mode="aspectFill" class="preview-image"></image>
|
<image v-if="displayData.legal_idcard_negative" :src="displayData.legal_idcard_negative"
|
||||||
<image v-else src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/203cfdf4-2501-44e6-8565-ad251c6bf0fa" mode="aspectFit" class="camera-icon"></image>
|
mode="aspectFill" class="preview-image"></image>
|
||||||
|
<image v-else
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/203cfdf4-2501-44e6-8565-ad251c6bf0fa"
|
||||||
|
mode="aspectFit" class="camera-icon"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="upload-label required">请上传身份证反面(国徽面)</text>
|
<text class="upload-label required">请上传身份证反面(国徽面)</text>
|
||||||
|
|
@ -104,22 +143,24 @@
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<view class="label-wrapper">
|
<view class="label-wrapper">
|
||||||
<text class="label required">法人代表</text>
|
<text class="label required">法人代表</text>
|
||||||
<image class="label-icon" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108" mode="aspectFit" @click="showTipPopup('legal_name')"></image>
|
<image class="label-icon"
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/25bd7f38-1a3e-4282-84ea-190d7f820108"
|
||||||
|
mode="aspectFit" @click="showTipPopup('legal_name')"></image>
|
||||||
</view>
|
</view>
|
||||||
<input type="text" v-model="displayData.legal_name" placeholder="请输入营业执照的法人代表"
|
<input type="text" v-model="displayData.legal_name" placeholder="请输入营业执照的法人代表" :disabled="!editable"
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
placeholder-class="placeholder" class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<text class="label required">法人联系方式</text>
|
<text class="label required">法人联系方式</text>
|
||||||
<input type="number" v-model="displayData.legal_phone" placeholder="请输入法人的联系方式"
|
<input type="number" v-model="displayData.legal_phone" placeholder="请输入法人的联系方式" :disabled="!editable"
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
placeholder-class="placeholder" class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont">
|
||||||
<text class="label required">法人身份证号</text>
|
<text class="label required">法人身份证号</text>
|
||||||
<input type="idcard" v-model="displayData.legal_idcard_num" placeholder="请输入法人身份证号"
|
<input type="idcard" v-model="displayData.legal_idcard_num" placeholder="请输入法人身份证号" :disabled="!editable"
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
placeholder-class="placeholder" class="input" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 身份证有效期 -->
|
<!-- 身份证有效期 -->
|
||||||
|
|
@ -128,13 +169,17 @@
|
||||||
<view class="radio-group">
|
<view class="radio-group">
|
||||||
<view class="radio-item" @click="editable && setIdcardValidType('permanent')">
|
<view class="radio-item" @click="editable && setIdcardValidType('permanent')">
|
||||||
<view class="radio" :class="{ checked: displayData.legal_idcard_expiry_type === 1 }">
|
<view class="radio" :class="{ checked: displayData.legal_idcard_expiry_type === 1 }">
|
||||||
<image v-if="displayData.legal_idcard_expiry_type === 1" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60" class="radio-icon-image" mode="aspectFit"></image>
|
<image v-if="displayData.legal_idcard_expiry_type === 1"
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||||
|
class="radio-icon-image" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<text class="radio-label">长久有效</text>
|
<text class="radio-label">长久有效</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="radio-item" @click="editable && setIdcardValidType('date')">
|
<view class="radio-item" @click="editable && setIdcardValidType('date')">
|
||||||
<view class="radio" :class="{ checked: displayData.legal_idcard_expiry_type === 2 }">
|
<view class="radio" :class="{ checked: displayData.legal_idcard_expiry_type === 2 }">
|
||||||
<image v-if="displayData.legal_idcard_expiry_type === 2" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60" class="radio-icon-image" mode="aspectFit"></image>
|
<image v-if="displayData.legal_idcard_expiry_type === 2"
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||||
|
class="radio-icon-image" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<text class="radio-label">指定日期有效</text>
|
<text class="radio-label">指定日期有效</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -151,7 +196,9 @@
|
||||||
{{ formatDateForDisplay(displayData.idcard_start_date) || '请选择日期' }}
|
{{ formatDateForDisplay(displayData.idcard_start_date) || '请选择日期' }}
|
||||||
</text>
|
</text>
|
||||||
<view class="date-divider"></view>
|
<view class="date-divider"></view>
|
||||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ce52b49f-2261-49ca-96ed-e9ad47049649" class="date-arrow" mode="aspectFit"></image>
|
<image
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ce52b49f-2261-49ca-96ed-e9ad47049649"
|
||||||
|
class="date-arrow" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="date-item">
|
<view class="date-item">
|
||||||
|
|
@ -172,6 +219,46 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 其他信息部分 -->
|
||||||
|
<view class="section">
|
||||||
|
<view class="section-title">
|
||||||
|
<view class="title-bar"></view>
|
||||||
|
<text class="title-text">其他信息</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form-item-image-box box-cont">
|
||||||
|
<text class="label required">行业资质</text>
|
||||||
|
<view class="image-list">
|
||||||
|
<view class="image-item" v-for="(img, index) in displayData.qualifications_sector"
|
||||||
|
:key="'industry-' + index">
|
||||||
|
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||||
|
<view class="image-delete" v-if="editable" @click="removeImage('qualifications_sector', index)">×</view>
|
||||||
|
</view>
|
||||||
|
<view class="image-add" @click="editable && chooseMultiImage('qualifications_sector')"
|
||||||
|
v-if="(displayData.qualifications_sector || []).length < 9">
|
||||||
|
<image
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png"
|
||||||
|
mode="aspectFit" class="upload-icon-small"></image>
|
||||||
|
<text class="add-text">添加照片</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text class="label" style="margin-top: 30rpx;">其他资质</text>
|
||||||
|
<view class="image-list">
|
||||||
|
<view class="image-item" v-for="(img, index) in displayData.qualifications_other" :key="'other-' + index">
|
||||||
|
<image :src="img" mode="aspectFill" class="qualification-image"></image>
|
||||||
|
<view class="image-delete" v-if="editable" @click="removeImage('qualifications_other', index)">×</view>
|
||||||
|
</view>
|
||||||
|
<view class="image-add" @click="editable && chooseMultiImage('qualifications_other')"
|
||||||
|
v-if="(displayData.qualifications_other || []).length < 9">
|
||||||
|
<image
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/0d4af728-c7bf-447d-85b2-e7c682471b86.png"
|
||||||
|
mode="aspectFit" class="upload-icon-small"></image>
|
||||||
|
<text class="add-text">添加照片</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 底部安全间距 -->
|
<!-- 底部安全间距 -->
|
||||||
<view class="safe-bottom"></view>
|
<view class="safe-bottom"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -226,7 +313,9 @@
|
||||||
<view class="radio-item" v-for="(item, index) in merchantTypeList" :key="index"
|
<view class="radio-item" v-for="(item, index) in merchantTypeList" :key="index"
|
||||||
@click="selectMerchantType(item)">
|
@click="selectMerchantType(item)">
|
||||||
<view class="radio" :class="{ checked: displayData.uscc_type === item.value }">
|
<view class="radio" :class="{ checked: displayData.uscc_type === item.value }">
|
||||||
<image v-if="displayData.uscc_type === item.value" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60" class="radio-icon-image" mode="aspectFit"></image>
|
<image v-if="displayData.uscc_type === item.value"
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/cb185ec8-9d30-4e53-b5dc-14b546013a60"
|
||||||
|
class="radio-icon-image" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<text class="radio-label">{{ item.label }}</text>
|
<text class="radio-label">{{ item.label }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -271,7 +360,9 @@
|
||||||
<view class="tip-popup-mask" @click="hideTipPopup"></view>
|
<view class="tip-popup-mask" @click="hideTipPopup"></view>
|
||||||
<view class="tip-popup-content">
|
<view class="tip-popup-content">
|
||||||
<!-- 弹窗背景图片 -->
|
<!-- 弹窗背景图片 -->
|
||||||
<image class="tip-popup-bg" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ab410a5d-5819-47f2-a0fc-3fd6b90d6770" mode="aspectFit"></image>
|
<image class="tip-popup-bg"
|
||||||
|
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ab410a5d-5819-47f2-a0fc-3fd6b90d6770"
|
||||||
|
mode="aspectFit"></image>
|
||||||
|
|
||||||
<!-- 弹窗内容 -->
|
<!-- 弹窗内容 -->
|
||||||
<view class="tip-popup-body">
|
<view class="tip-popup-body">
|
||||||
|
|
@ -290,6 +381,46 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 注册地区选择器 -->
|
||||||
|
<view class="popup" :class="{ show: showRegionPopupFlag }">
|
||||||
|
<view class="popup-mask" @click="hideRegionPopup"></view>
|
||||||
|
<view class="popup-content">
|
||||||
|
<view class="popup-header">
|
||||||
|
<text class="popup-title">选择注册地区</text>
|
||||||
|
<text class="popup-close" @click="hideRegionPopup">×</text>
|
||||||
|
</view>
|
||||||
|
<view class="region-body">
|
||||||
|
<picker-view @change="bindChangeRegion" class="picker-scroll" :indicator-style="indicatorStyle"
|
||||||
|
:value="regionValue">
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="picker-item" v-for="(item, index) in ChinaCitys" :key="index">
|
||||||
|
{{ item.province }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="picker-item" v-for="(item, index) in regionCitys" :key="index">
|
||||||
|
{{ item.city }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="picker-item" v-for="(item, index) in regionAreas" :key="index">
|
||||||
|
{{ item.area }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
</picker-view>
|
||||||
|
</view>
|
||||||
|
<view class="popup-footer">
|
||||||
|
<view class="popup-btn cancel" @click="hideRegionPopup">
|
||||||
|
<text class="btn-text">取消</text>
|
||||||
|
</view>
|
||||||
|
<view class="popup-btn confirm" @click="confirmRegionSelect">
|
||||||
|
<text class="btn-text">确定</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 存储权限提示 -->
|
<!-- 存储权限提示 -->
|
||||||
<view class="permission" :class="{ transform: isShowStoragePer }">
|
<view class="permission" :class="{ transform: isShowStoragePer }">
|
||||||
<view class="per-tit">美融融plus 对储存空间/照片权限申请说明</view>
|
<view class="per-tit">美融融plus 对储存空间/照片权限申请说明</view>
|
||||||
|
|
@ -310,6 +441,7 @@ import uploadImage from '../../utils/uploadImage';
|
||||||
import permissionUtils from '../../utils/per';
|
import permissionUtils from '../../utils/per';
|
||||||
import locationService from '../../utils/locationService';
|
import locationService from '../../utils/locationService';
|
||||||
import { recognizeIdCard, recognizeBusinessLicense, formatDateFromNumber, parseValidPeriod } from '../../utils/orc';
|
import { recognizeIdCard, recognizeBusinessLicense, formatDateFromNumber, parseValidPeriod } from '../../utils/orc';
|
||||||
|
import ChinaCitys from '../../static/data/ChinaCitys.json';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -364,6 +496,14 @@ export default {
|
||||||
|
|
||||||
isShowStoragePer: false,
|
isShowStoragePer: false,
|
||||||
isShowCameraPer: false,
|
isShowCameraPer: false,
|
||||||
|
|
||||||
|
showRegionPopupFlag: false,
|
||||||
|
ChinaCitys: ChinaCitys,
|
||||||
|
regionCitys: [],
|
||||||
|
regionAreas: [],
|
||||||
|
regionValue: [0, 0, 0],
|
||||||
|
addressListener: null,
|
||||||
|
sjAddressListener: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -378,6 +518,11 @@ export default {
|
||||||
this.hasResubmitted = false;
|
this.hasResubmitted = false;
|
||||||
this.backText = '';
|
this.backText = '';
|
||||||
|
|
||||||
|
this.regionCitys = this.ChinaCitys[0].citys;
|
||||||
|
this.regionAreas = this.regionCitys[0].areas;
|
||||||
|
|
||||||
|
this.setupAddressListener();
|
||||||
|
|
||||||
this.getUserInfo().then(() => {
|
this.getUserInfo().then(() => {
|
||||||
this.loadApplyDetails();
|
this.loadApplyDetails();
|
||||||
});
|
});
|
||||||
|
|
@ -386,19 +531,18 @@ export default {
|
||||||
this.getButtonAreaHeight();
|
this.getButtonAreaHeight();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// 只有在非编辑状态下才重新加载数据
|
this.checkAddressData();
|
||||||
if (!this.editable) {
|
if (!this.editable) {
|
||||||
console.log('非编辑状态,刷新数据');
|
|
||||||
this.loadApplyDetails();
|
this.loadApplyDetails();
|
||||||
|
|
||||||
if (this.auditStatus !== 3) {
|
if (this.auditStatus !== 3) {
|
||||||
this.backText = '';
|
this.backText = '';
|
||||||
this.hasResubmitted = false;
|
this.hasResubmitted = false;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
console.log('编辑状态,保持当前状态不刷新');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.removeAddressListener();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 识别营业执照
|
* 识别营业执照
|
||||||
|
|
@ -637,7 +781,7 @@ export default {
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const userType = 3;
|
const userType = 3;
|
||||||
request.post('/user/getuser', { type: userType }).then(result => {
|
request.post('/sj/user/getUser', { type: userType }).then(result => {
|
||||||
if (result.state === 1) {
|
if (result.state === 1) {
|
||||||
this.userId = result.data.id;
|
this.userId = result.data.id;
|
||||||
console.log('用户ID获取成功:', this.userId);
|
console.log('用户ID获取成功:', this.userId);
|
||||||
|
|
@ -661,10 +805,17 @@ export default {
|
||||||
|
|
||||||
// 初始化老数据
|
// 初始化老数据
|
||||||
this.originalData = {
|
this.originalData = {
|
||||||
uscc_type: userData.uscc_type ? String(userData.uscc_type) : null, // 转换为字符串
|
uscc_type: userData.uscc_type ? String(userData.uscc_type) : null,
|
||||||
uscc_photo: userData.uscc_photo || '',
|
uscc_photo: userData.uscc_photo || '',
|
||||||
uscc_num: userData.uscc_num || '',
|
uscc_num: userData.uscc_num || '',
|
||||||
uscc_name: userData.uscc_name || '',
|
uscc_name: userData.uscc_name || '',
|
||||||
|
uscc_dependency: userData.uscc_dependency || '',
|
||||||
|
uscc_address: userData.uscc_address || '',
|
||||||
|
uscc_province: userData.uscc_province || '',
|
||||||
|
uscc_city: userData.uscc_city || '',
|
||||||
|
uscc_area: userData.uscc_area || '',
|
||||||
|
longitude: userData.longitude || '',
|
||||||
|
latitude: userData.latitude || '',
|
||||||
uscc_expiry_type: userData.uscc_expiry_type || null,
|
uscc_expiry_type: userData.uscc_expiry_type || null,
|
||||||
uscc_expiry: userData.uscc_expiry || '',
|
uscc_expiry: userData.uscc_expiry || '',
|
||||||
license_start_date: '',
|
license_start_date: '',
|
||||||
|
|
@ -677,15 +828,30 @@ export default {
|
||||||
idcard_start_date: '',
|
idcard_start_date: '',
|
||||||
idcard_end_date: '',
|
idcard_end_date: '',
|
||||||
legal_idcard_positive: userData.legal_idcard_positive || '',
|
legal_idcard_positive: userData.legal_idcard_positive || '',
|
||||||
legal_idcard_negative: userData.legal_idcard_negative || ''
|
legal_idcard_negative: userData.legal_idcard_negative || '',
|
||||||
|
qualifications_sector: [],
|
||||||
|
qualifications_other: []
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理营业执照有效期显示
|
if (userData.qualifications_sector) {
|
||||||
|
try {
|
||||||
|
this.originalData.qualifications_sector = typeof userData.qualifications_sector === 'string' ? JSON.parse(userData.qualifications_sector) : userData.qualifications_sector;
|
||||||
|
} catch (e) {
|
||||||
|
this.originalData.qualifications_sector = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (userData.qualifications_other) {
|
||||||
|
try {
|
||||||
|
this.originalData.qualifications_other = typeof userData.qualifications_other === 'string' ? JSON.parse(userData.qualifications_other) : userData.qualifications_other;
|
||||||
|
} catch (e) {
|
||||||
|
this.originalData.qualifications_other = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.originalData.uscc_expiry) {
|
if (this.originalData.uscc_expiry) {
|
||||||
this.processLicenseExpiry(this.originalData.uscc_expiry, this.originalData);
|
this.processLicenseExpiry(this.originalData.uscc_expiry, this.originalData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理身份证有效期显示
|
|
||||||
if (this.originalData.legal_idcard_expiry) {
|
if (this.originalData.legal_idcard_expiry) {
|
||||||
this.processIdcardExpiry(this.originalData.legal_idcard_expiry, this.originalData);
|
this.processIdcardExpiry(this.originalData.legal_idcard_expiry, this.originalData);
|
||||||
}
|
}
|
||||||
|
|
@ -853,6 +1019,13 @@ export default {
|
||||||
uscc_photo: detail.uscc_photo || this.originalData.uscc_photo,
|
uscc_photo: detail.uscc_photo || this.originalData.uscc_photo,
|
||||||
uscc_num: detail.uscc_num || this.originalData.uscc_num,
|
uscc_num: detail.uscc_num || this.originalData.uscc_num,
|
||||||
uscc_name: detail.uscc_name || this.originalData.uscc_name,
|
uscc_name: detail.uscc_name || this.originalData.uscc_name,
|
||||||
|
uscc_dependency: detail.uscc_dependency || this.originalData.uscc_dependency,
|
||||||
|
uscc_address: detail.uscc_address || this.originalData.uscc_address,
|
||||||
|
uscc_province: detail.uscc_province || this.originalData.uscc_province,
|
||||||
|
uscc_city: detail.uscc_city || this.originalData.uscc_city,
|
||||||
|
uscc_area: detail.uscc_area || this.originalData.uscc_area,
|
||||||
|
longitude: detail.longitude || this.originalData.longitude || '',
|
||||||
|
latitude: detail.latitude || this.originalData.latitude || '',
|
||||||
uscc_expiry_type: detail.uscc_expiry_type || this.originalData.uscc_expiry_type,
|
uscc_expiry_type: detail.uscc_expiry_type || this.originalData.uscc_expiry_type,
|
||||||
uscc_expiry: detail.uscc_expiry || this.originalData.uscc_expiry,
|
uscc_expiry: detail.uscc_expiry || this.originalData.uscc_expiry,
|
||||||
license_start_date: '',
|
license_start_date: '',
|
||||||
|
|
@ -865,9 +1038,26 @@ export default {
|
||||||
idcard_start_date: '',
|
idcard_start_date: '',
|
||||||
idcard_end_date: '',
|
idcard_end_date: '',
|
||||||
legal_idcard_positive: detail.legal_idcard_positive || this.originalData.legal_idcard_positive,
|
legal_idcard_positive: detail.legal_idcard_positive || this.originalData.legal_idcard_positive,
|
||||||
legal_idcard_negative: detail.legal_idcard_negative || this.originalData.legal_idcard_negative
|
legal_idcard_negative: detail.legal_idcard_negative || this.originalData.legal_idcard_negative,
|
||||||
|
qualifications_sector: this.originalData.qualifications_sector || [],
|
||||||
|
qualifications_other: this.originalData.qualifications_other || []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (detail.qualifications_sector) {
|
||||||
|
try {
|
||||||
|
this.pendingData.qualifications_sector = typeof detail.qualifications_sector === 'string' ? JSON.parse(detail.qualifications_sector) : detail.qualifications_sector;
|
||||||
|
} catch (e) {
|
||||||
|
this.pendingData.qualifications_sector = this.originalData.qualifications_sector || [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (detail.qualifications_other) {
|
||||||
|
try {
|
||||||
|
this.pendingData.qualifications_other = typeof detail.qualifications_other === 'string' ? JSON.parse(detail.qualifications_other) : detail.qualifications_other;
|
||||||
|
} catch (e) {
|
||||||
|
this.pendingData.qualifications_other = this.originalData.qualifications_other || [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
console.log('处理前的pendingData日期字段:', {
|
console.log('处理前的pendingData日期字段:', {
|
||||||
uscc_expiry: this.pendingData.uscc_expiry,
|
uscc_expiry: this.pendingData.uscc_expiry,
|
||||||
legal_idcard_expiry: this.pendingData.legal_idcard_expiry
|
legal_idcard_expiry: this.pendingData.legal_idcard_expiry
|
||||||
|
|
@ -891,7 +1081,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
console.log('刷新商家最新数据...');
|
console.log('刷新商家最新数据...');
|
||||||
const userType = 3;
|
const userType = 3;
|
||||||
const result = await request.post('/user/getuser', { type: userType });
|
const result = await request.post('/sj/user/getUser', { type: userType });
|
||||||
|
|
||||||
if (result.state === 1 && result.data) {
|
if (result.state === 1 && result.data) {
|
||||||
const userData = result.data;
|
const userData = result.data;
|
||||||
|
|
@ -936,6 +1126,13 @@ export default {
|
||||||
uscc_photo: userData.uscc_photo || '',
|
uscc_photo: userData.uscc_photo || '',
|
||||||
uscc_num: userData.uscc_num || '',
|
uscc_num: userData.uscc_num || '',
|
||||||
uscc_name: userData.uscc_name || '',
|
uscc_name: userData.uscc_name || '',
|
||||||
|
uscc_dependency: userData.uscc_dependency || '',
|
||||||
|
uscc_address: userData.uscc_address || '',
|
||||||
|
uscc_province: userData.uscc_province || '',
|
||||||
|
uscc_city: userData.uscc_city || '',
|
||||||
|
uscc_area: userData.uscc_area || '',
|
||||||
|
longitude: userData.longitude || '',
|
||||||
|
latitude: userData.latitude || '',
|
||||||
uscc_expiry_type: userData.uscc_expiry_type || null,
|
uscc_expiry_type: userData.uscc_expiry_type || null,
|
||||||
uscc_expiry: userData.uscc_expiry || '',
|
uscc_expiry: userData.uscc_expiry || '',
|
||||||
license_start_date: '',
|
license_start_date: '',
|
||||||
|
|
@ -948,15 +1145,30 @@ export default {
|
||||||
idcard_start_date: '',
|
idcard_start_date: '',
|
||||||
idcard_end_date: '',
|
idcard_end_date: '',
|
||||||
legal_idcard_positive: userData.legal_idcard_positive || '',
|
legal_idcard_positive: userData.legal_idcard_positive || '',
|
||||||
legal_idcard_negative: userData.legal_idcard_negative || ''
|
legal_idcard_negative: userData.legal_idcard_negative || '',
|
||||||
|
qualifications_sector: [],
|
||||||
|
qualifications_other: []
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理营业执照有效期显示
|
if (userData.qualifications_sector) {
|
||||||
|
try {
|
||||||
|
this.originalData.qualifications_sector = typeof userData.qualifications_sector === 'string' ? JSON.parse(userData.qualifications_sector) : userData.qualifications_sector;
|
||||||
|
} catch (e) {
|
||||||
|
this.originalData.qualifications_sector = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (userData.qualifications_other) {
|
||||||
|
try {
|
||||||
|
this.originalData.qualifications_other = typeof userData.qualifications_other === 'string' ? JSON.parse(userData.qualifications_other) : userData.qualifications_other;
|
||||||
|
} catch (e) {
|
||||||
|
this.originalData.qualifications_other = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.originalData.uscc_expiry) {
|
if (this.originalData.uscc_expiry) {
|
||||||
this.processLicenseExpiry(this.originalData.uscc_expiry, this.originalData);
|
this.processLicenseExpiry(this.originalData.uscc_expiry, this.originalData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理身份证有效期显示
|
|
||||||
if (this.originalData.legal_idcard_expiry) {
|
if (this.originalData.legal_idcard_expiry) {
|
||||||
this.processIdcardExpiry(this.originalData.legal_idcard_expiry, this.originalData);
|
this.processIdcardExpiry(this.originalData.legal_idcard_expiry, this.originalData);
|
||||||
}
|
}
|
||||||
|
|
@ -1139,6 +1351,11 @@ export default {
|
||||||
uscc_photo: this.displayData.uscc_photo,
|
uscc_photo: this.displayData.uscc_photo,
|
||||||
uscc_num: this.displayData.uscc_num,
|
uscc_num: this.displayData.uscc_num,
|
||||||
uscc_name: this.displayData.uscc_name,
|
uscc_name: this.displayData.uscc_name,
|
||||||
|
uscc_dependency: this.displayData.uscc_dependency,
|
||||||
|
uscc_address: this.displayData.uscc_address,
|
||||||
|
uscc_province: this.displayData.uscc_province,
|
||||||
|
uscc_city: this.displayData.uscc_city,
|
||||||
|
uscc_area: this.displayData.uscc_area,
|
||||||
uscc_expiry_type: this.displayData.uscc_expiry_type,
|
uscc_expiry_type: this.displayData.uscc_expiry_type,
|
||||||
uscc_expiry: this.displayData.uscc_expiry,
|
uscc_expiry: this.displayData.uscc_expiry,
|
||||||
legal_name: this.displayData.legal_name,
|
legal_name: this.displayData.legal_name,
|
||||||
|
|
@ -1147,7 +1364,9 @@ export default {
|
||||||
legal_idcard_expiry_type: this.displayData.legal_idcard_expiry_type,
|
legal_idcard_expiry_type: this.displayData.legal_idcard_expiry_type,
|
||||||
legal_idcard_expiry: this.displayData.legal_idcard_expiry,
|
legal_idcard_expiry: this.displayData.legal_idcard_expiry,
|
||||||
legal_idcard_positive: this.displayData.legal_idcard_positive,
|
legal_idcard_positive: this.displayData.legal_idcard_positive,
|
||||||
legal_idcard_negative: this.displayData.legal_idcard_negative
|
legal_idcard_negative: this.displayData.legal_idcard_negative,
|
||||||
|
qualifications_sector: JSON.stringify(this.displayData.qualifications_sector || []),
|
||||||
|
qualifications_other: JSON.stringify(this.displayData.qualifications_other || [])
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理营业执照有效期
|
// 处理营业执照有效期
|
||||||
|
|
@ -1232,6 +1451,85 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
showRegionPicker() {
|
||||||
|
this.regionCitys = this.ChinaCitys[0].citys;
|
||||||
|
this.regionAreas = this.regionCitys[0].areas;
|
||||||
|
this.showRegionPopupFlag = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
hideRegionPopup() {
|
||||||
|
this.showRegionPopupFlag = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
bindChangeRegion(e) {
|
||||||
|
this.regionValue = e.detail.value;
|
||||||
|
let index1 = e.detail.value[0] || 0;
|
||||||
|
let index2 = e.detail.value[1] || 0;
|
||||||
|
this.regionCitys = this.ChinaCitys[index1].citys;
|
||||||
|
this.regionAreas = this.regionCitys[index2].areas;
|
||||||
|
},
|
||||||
|
|
||||||
|
confirmRegionSelect() {
|
||||||
|
let valueArr = this.regionValue;
|
||||||
|
let index1 = valueArr[0] || 0;
|
||||||
|
let index2 = valueArr[1] || 0;
|
||||||
|
let index3 = valueArr[2] || 0;
|
||||||
|
let province = this.ChinaCitys[index1].province;
|
||||||
|
let city = this.regionCitys[index2].city;
|
||||||
|
let area = this.regionAreas[index3].area;
|
||||||
|
this.$set(this.displayData, 'uscc_dependency', province + '-' + city + '-' + area);
|
||||||
|
if (this.ChinaCitys[index1] && this.ChinaCitys[index1].code) {
|
||||||
|
this.$set(this.displayData, 'uscc_province', String(this.ChinaCitys[index1].code).substring(0, 6));
|
||||||
|
}
|
||||||
|
if (this.regionCitys[index2] && this.regionCitys[index2].code) {
|
||||||
|
this.$set(this.displayData, 'uscc_city', String(this.regionCitys[index2].code).substring(0, 6));
|
||||||
|
}
|
||||||
|
if (this.regionAreas[index3] && this.regionAreas[index3].code) {
|
||||||
|
this.$set(this.displayData, 'uscc_area', String(this.regionAreas[index3].code).substring(0, 6));
|
||||||
|
}
|
||||||
|
this.$set(this.displayData, 'uscc_address', '');
|
||||||
|
this.$set(this.displayData, 'longitude', '');
|
||||||
|
this.$set(this.displayData, 'latitude', '');
|
||||||
|
this.hideRegionPopup();
|
||||||
|
},
|
||||||
|
|
||||||
|
chooseMultiImage(type) {
|
||||||
|
const current = this.displayData[type] || [];
|
||||||
|
const remaining = 9 - current.length;
|
||||||
|
if (remaining <= 0) {
|
||||||
|
uni.showToast({ title: '最多上传9张图片', icon: 'none' });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.chooseImage({
|
||||||
|
count: remaining,
|
||||||
|
sizeType: ['compressed'],
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: async (res) => {
|
||||||
|
if (!res.tempFilePaths || res.tempFilePaths.length === 0) return;
|
||||||
|
uni.showLoading({ title: '上传中...' });
|
||||||
|
for (const tempFilePath of res.tempFilePaths) {
|
||||||
|
const file = { path: tempFilePath, size: 0 };
|
||||||
|
try {
|
||||||
|
const url = await this.directUpload(file, this.userId, 3, type);
|
||||||
|
if (url) {
|
||||||
|
current.push(url);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('上传失败:', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$set(this.displayData, type, [...current]);
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
removeImage(type, index) {
|
||||||
|
const list = [...(this.displayData[type] || [])];
|
||||||
|
list.splice(index, 1);
|
||||||
|
this.$set(this.displayData, type, list);
|
||||||
|
},
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
validateForm() {
|
validateForm() {
|
||||||
const validationRules = [
|
const validationRules = [
|
||||||
|
|
@ -1239,6 +1537,8 @@ export default {
|
||||||
{ field: 'uscc_type', message: '请输入商户类型' },
|
{ field: 'uscc_type', message: '请输入商户类型' },
|
||||||
{ field: 'uscc_num', message: '请输入营业执照号码' },
|
{ field: 'uscc_num', message: '请输入营业执照号码' },
|
||||||
{ field: 'uscc_name', message: '请输入企业名称' },
|
{ field: 'uscc_name', message: '请输入企业名称' },
|
||||||
|
{ field: 'uscc_dependency', message: '请选择注册地区' },
|
||||||
|
{ field: 'uscc_address', message: '请输入注册详细地址' },
|
||||||
{ field: 'legal_idcard_positive', message: '请上传身份证正面照片' },
|
{ field: 'legal_idcard_positive', message: '请上传身份证正面照片' },
|
||||||
{ field: 'legal_idcard_negative', message: '请上传身份证反面照片' },
|
{ field: 'legal_idcard_negative', message: '请上传身份证反面照片' },
|
||||||
{ field: 'legal_name', message: '请输入法人代表' },
|
{ field: 'legal_name', message: '请输入法人代表' },
|
||||||
|
|
@ -1528,6 +1828,163 @@ export default {
|
||||||
this.showTipPopupFlag = false;
|
this.showTipPopupFlag = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
buildRegionTextForSearch() {
|
||||||
|
const dependency = String(this.displayData.uscc_dependency || '').trim();
|
||||||
|
if (!dependency) return '';
|
||||||
|
const parts = dependency.split('-');
|
||||||
|
const province = parts[0] || '';
|
||||||
|
const city = parts[1] || '';
|
||||||
|
const district = parts[2] || '';
|
||||||
|
let regionText = '';
|
||||||
|
if (province) regionText += province;
|
||||||
|
if (city && city !== province) regionText += city;
|
||||||
|
if (district) regionText += district;
|
||||||
|
return regionText;
|
||||||
|
},
|
||||||
|
|
||||||
|
getAddressValueForSearch() {
|
||||||
|
const rawAddress = String(this.displayData.uscc_address || '').trim();
|
||||||
|
if (!rawAddress) return '';
|
||||||
|
const dependencyText = String(this.displayData.uscc_dependency || '').trim();
|
||||||
|
const regionText = this.buildRegionTextForSearch();
|
||||||
|
let detail = rawAddress;
|
||||||
|
if (regionText && detail.indexOf(regionText) === 0) {
|
||||||
|
detail = detail.slice(regionText.length).trim();
|
||||||
|
} else if (dependencyText && detail.indexOf(dependencyText) === 0) {
|
||||||
|
detail = detail.slice(dependencyText.length).trim();
|
||||||
|
}
|
||||||
|
detail = detail.replace(/^[\s,-]+/, '').trim();
|
||||||
|
return detail || rawAddress;
|
||||||
|
},
|
||||||
|
|
||||||
|
getAddressInfo() {
|
||||||
|
const dependency = String(this.displayData.uscc_dependency || '').trim();
|
||||||
|
const dependencyCode = String(this.displayData.uscc_area || '').trim();
|
||||||
|
const address = this.getAddressValueForSearch();
|
||||||
|
const longitude = String(this.displayData.longitude || '').trim();
|
||||||
|
const latitude = String(this.displayData.latitude || '').trim();
|
||||||
|
|
||||||
|
const hasDependency = !!dependency;
|
||||||
|
const hasAddress = !!address;
|
||||||
|
const hasLocation = !!(longitude && latitude);
|
||||||
|
|
||||||
|
let params = 'source=sj_change';
|
||||||
|
|
||||||
|
if (hasDependency) {
|
||||||
|
params += `&dependency=${encodeURIComponent(dependency)}`;
|
||||||
|
if (dependencyCode) {
|
||||||
|
params += `&dependency_code=${dependencyCode}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasAddress) {
|
||||||
|
params += `&address=${encodeURIComponent(address)}`;
|
||||||
|
}
|
||||||
|
if (hasLocation) {
|
||||||
|
params += `&longitude=${longitude}&latitude=${latitude}`;
|
||||||
|
}
|
||||||
|
if (!hasDependency && !hasAddress && !hasLocation) {
|
||||||
|
params += '&init_current_location=1&silent_locate=1';
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/address/search?${params}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
setupAddressListener() {
|
||||||
|
this.addressListener = (addressData) => {
|
||||||
|
this.handleAddressSelected(addressData);
|
||||||
|
};
|
||||||
|
this.sjAddressListener = (addressData) => {
|
||||||
|
this.handleAddressSelected(addressData);
|
||||||
|
};
|
||||||
|
uni.$on('address-selected', this.addressListener);
|
||||||
|
uni.$on('address-selected-for-sj', this.sjAddressListener);
|
||||||
|
},
|
||||||
|
|
||||||
|
removeAddressListener() {
|
||||||
|
if (this.addressListener) {
|
||||||
|
uni.$off('address-selected', this.addressListener);
|
||||||
|
this.addressListener = null;
|
||||||
|
}
|
||||||
|
if (this.sjAddressListener) {
|
||||||
|
uni.$off('address-selected-for-sj', this.sjAddressListener);
|
||||||
|
this.sjAddressListener = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
checkAddressData() {
|
||||||
|
try {
|
||||||
|
const storedAddress = uni.getStorageSync('sj_selected_address');
|
||||||
|
if (storedAddress) {
|
||||||
|
this.handleAddressSelected(storedAddress);
|
||||||
|
uni.removeStorageSync('sj_selected_address');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
|
||||||
|
if (getApp().globalData && getApp().globalData.selectedAddress) {
|
||||||
|
this.handleAddressSelected(getApp().globalData.selectedAddress);
|
||||||
|
delete getApp().globalData.selectedAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const selectedAddress = uni.getStorageSync('selectedAddress');
|
||||||
|
if (selectedAddress) {
|
||||||
|
this.handleAddressSelected(selectedAddress);
|
||||||
|
uni.removeStorageSync('selectedAddress');
|
||||||
|
}
|
||||||
|
} catch (e) { }
|
||||||
|
},
|
||||||
|
|
||||||
|
handleAddressSelected(addressData) {
|
||||||
|
if (!addressData) return;
|
||||||
|
|
||||||
|
let detailAddress = '';
|
||||||
|
if (addressData.address) {
|
||||||
|
detailAddress = String(addressData.address).trim();
|
||||||
|
} else if (addressData.name) {
|
||||||
|
detailAddress = String(addressData.name).trim();
|
||||||
|
const regionParts = [];
|
||||||
|
if (addressData.pname) regionParts.push(addressData.pname);
|
||||||
|
if (addressData.cityname && addressData.cityname !== addressData.pname) regionParts.push(addressData.cityname);
|
||||||
|
if (addressData.adname) regionParts.push(addressData.adname);
|
||||||
|
const regionText = regionParts.join('');
|
||||||
|
if (regionText && detailAddress.indexOf(regionText) === 0) {
|
||||||
|
detailAddress = detailAddress.slice(regionText.length).trim();
|
||||||
|
}
|
||||||
|
detailAddress = detailAddress.replace(/^[\s,-]+/, '').trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$set(this.displayData, 'uscc_address', detailAddress);
|
||||||
|
|
||||||
|
if (addressData.location) {
|
||||||
|
const [longitude, latitude] = String(addressData.location).split(',');
|
||||||
|
this.$set(this.displayData, 'longitude', longitude || '');
|
||||||
|
this.$set(this.displayData, 'latitude', latitude || '');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addressData.pname || addressData.cityname || addressData.adname) {
|
||||||
|
const locationParts = [];
|
||||||
|
if (addressData.pname) locationParts.push(addressData.pname);
|
||||||
|
if (addressData.cityname) locationParts.push(addressData.cityname);
|
||||||
|
if (addressData.adname) locationParts.push(addressData.adname);
|
||||||
|
this.$set(this.displayData, 'uscc_dependency', locationParts.join('-'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addressData.provinceCode) {
|
||||||
|
this.$set(this.displayData, 'uscc_province', String(addressData.provinceCode).substring(0, 6));
|
||||||
|
}
|
||||||
|
if (addressData.cityCode) {
|
||||||
|
this.$set(this.displayData, 'uscc_city', String(addressData.cityCode).substring(0, 6));
|
||||||
|
}
|
||||||
|
if (addressData.districtCode) {
|
||||||
|
this.$set(this.displayData, 'uscc_area', String(addressData.districtCode).substring(0, 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
|
|
||||||
// 图片上传方法
|
// 图片上传方法
|
||||||
async chooseImage(type) {
|
async chooseImage(type) {
|
||||||
if (!this.editable) return;
|
if (!this.editable) return;
|
||||||
|
|
@ -1960,8 +2417,13 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% { transform: rotate(0deg); }
|
0% {
|
||||||
100% { transform: rotate(360deg); }
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker-content {
|
.picker-content {
|
||||||
|
|
@ -2149,7 +2611,9 @@ export default {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.change-info-btn, .view-change-btn, .resubmit-btn {
|
.change-info-btn,
|
||||||
|
.view-change-btn,
|
||||||
|
.resubmit-btn {
|
||||||
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%);
|
background: linear-gradient(180deg, #f52540 0%, #e8101e 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2277,7 +2741,8 @@ export default {
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-text, .confirm-text {
|
.cancel-text,
|
||||||
|
.confirm-text {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
padding: 16rpx;
|
padding: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
@ -2411,4 +2876,79 @@ export default {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 16rpx;
|
||||||
|
margin-top: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-item {
|
||||||
|
position: relative;
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qualification-image {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-delete {
|
||||||
|
position: absolute;
|
||||||
|
top: -10rpx;
|
||||||
|
right: -10rpx;
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
background: #E8101E;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-add {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 2rpx dashed #DDDDDD;
|
||||||
|
width: 214rpx;
|
||||||
|
height: 214rpx;
|
||||||
|
background: #F5F5F5;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-icon-small {
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-text {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.region-body {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.region-body .picker-scroll {
|
||||||
|
height: 400rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item-image-box {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item-image-box .label {
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -192,7 +192,16 @@ const request = async (options, isUpdate) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
resolve(responseInterceptor(options, res, resolve, reject))
|
try {
|
||||||
|
const result = responseInterceptor(options, res, resolve, reject)
|
||||||
|
if (result && typeof result.then === 'function') {
|
||||||
|
result.then(data => resolve(data)).catch(err => reject(err))
|
||||||
|
} else {
|
||||||
|
resolve(result)
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
|
@ -221,6 +230,7 @@ const request = async (options, isUpdate) => {
|
||||||
// 处理 401 未授权
|
// 处理 401 未授权
|
||||||
async function handleUnauthorized(originalRequest, resolve, reject) {
|
async function handleUnauthorized(originalRequest, resolve, reject) {
|
||||||
if (!getToken()) {
|
if (!getToken()) {
|
||||||
|
reject(new Error('未登录'))
|
||||||
return redirectToLogin()
|
return redirectToLogin()
|
||||||
}
|
}
|
||||||
// 如果正在刷新 Token,将请求加入队列
|
// 如果正在刷新 Token,将请求加入队列
|
||||||
|
|
@ -246,7 +256,7 @@ async function handleUnauthorized(originalRequest, resolve, reject) {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
removeToken()
|
removeToken()
|
||||||
redirectToLogin()
|
redirectToLogin()
|
||||||
// reject(error)
|
reject(error)
|
||||||
return error
|
return error
|
||||||
} finally {
|
} finally {
|
||||||
isRefreshing = false
|
isRefreshing = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue