feat: 完成商家改版相关页面与请求工具修改
This commit is contained in:
parent
d723a5f2db
commit
2e13ec14aa
|
|
@ -475,7 +475,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
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -328,19 +328,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 +374,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 +509,59 @@
|
||||||
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
|
||||||
|
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' });
|
uni.showToast({
|
||||||
|
title: '提交成功',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shop/qualification_sj_change'
|
||||||
|
})
|
||||||
} 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'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,32 +23,32 @@
|
||||||
|
|
||||||
<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>
|
||||||
|
|
@ -59,51 +58,8 @@
|
||||||
<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.register_address" placeholder="请输入注册地址" placeholder-class="placeholder"
|
<input type="text" v-model="formData.uscc_address" placeholder="请输入注册地址" placeholder-class="placeholder"
|
||||||
class="input" @input="saveFormDataToLocalDebounce" />
|
class="input" />
|
||||||
</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>
|
|
||||||
<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 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 +73,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 +84,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 +99,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 +140,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 +172,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 +283,28 @@
|
||||||
<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: '',
|
legal_idcard_positive: '',
|
||||||
register_city: '',
|
legal_idcard_negative: '',
|
||||||
register_area: '',
|
legal_name: '',
|
||||||
id_card_front: '',
|
|
||||||
id_card_back: '',
|
|
||||||
legal_person: '',
|
|
||||||
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,6 +315,8 @@ 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
|
||||||
}
|
}
|
||||||
|
|
@ -396,29 +355,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 +370,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 +416,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$set(this.formData, type, current);
|
this.$set(this.formData, type, current);
|
||||||
this.saveFormDataToLocal();
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -484,7 +425,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 +494,7 @@ 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()
|
|
||||||
.substring(0, 6) : '';
|
|
||||||
this.formData.register_city = this.regionCitys[index2].code ? this.regionCitys[index2].code.toString()
|
|
||||||
.substring(0, 6) : '';
|
|
||||||
this.formData.register_area = this.regionAreas[index3].code ? this.regionAreas[index3].code.toString()
|
|
||||||
.substring(0, 6) : '';
|
|
||||||
this.saveFormDataToLocal();
|
|
||||||
this.hideRegionPopup();
|
this.hideRegionPopup();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -575,14 +508,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 +536,202 @@ 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();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
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 +752,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.notice" :showBack="true"></custom-navbar>
|
||||||
<view class="title-icon">恭喜您!</view>
|
<view class="title-icon">{{infoData.top}}</view>
|
||||||
<!-- <view class="title-icon">{{data.residency_notice}}</view> -->
|
<view class="title-content">{{infoData.title}}</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)
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,27 @@
|
||||||
<input type="text" v-model="displayData.uscc_name" placeholder="请输入营业执照的企业名称"
|
<input type="text" v-model="displayData.uscc_name" placeholder="请输入营业执照的企业名称"
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||||
</view>
|
</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">
|
||||||
|
<view class="label-wrapper">
|
||||||
|
<text class="label required">注册详细地址</text>
|
||||||
|
</view>
|
||||||
|
<input type="text" v-model="displayData.uscc_address" placeholder="请输入注册地址"
|
||||||
|
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 法人信息部分 -->
|
<!-- 法人信息部分 -->
|
||||||
|
|
@ -172,6 +193,45 @@
|
||||||
</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>
|
||||||
|
|
@ -290,6 +350,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 +410,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 +465,12 @@ export default {
|
||||||
|
|
||||||
isShowStoragePer: false,
|
isShowStoragePer: false,
|
||||||
isShowCameraPer: false,
|
isShowCameraPer: false,
|
||||||
|
|
||||||
|
showRegionPopupFlag: false,
|
||||||
|
ChinaCitys: ChinaCitys,
|
||||||
|
regionCitys: [],
|
||||||
|
regionAreas: [],
|
||||||
|
regionValue: [0, 0, 0],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -378,6 +485,9 @@ 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.getUserInfo().then(() => {
|
this.getUserInfo().then(() => {
|
||||||
this.loadApplyDetails();
|
this.loadApplyDetails();
|
||||||
});
|
});
|
||||||
|
|
@ -637,7 +747,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 +771,12 @@ 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_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 +789,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 +980,8 @@ 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_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 +994,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 +1037,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 +1082,8 @@ 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_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 +1096,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 +1302,8 @@ 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_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 +1312,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 +1399,73 @@ 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);
|
||||||
|
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 +1473,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: '请输入法人代表' },
|
||||||
|
|
@ -2411,4 +2647,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