入驻流程优化
This commit is contained in:
parent
21425c0306
commit
e79c8eda8a
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -55,11 +55,14 @@
|
||||||
</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.uscc_address" placeholder="请输入注册地址" placeholder-class="placeholder"
|
<text :class="formData.uscc_address ? 'picker-value' : 'placeholder'">
|
||||||
class="input" />
|
{{ formData.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>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -295,6 +298,11 @@ export default {
|
||||||
uscc_name: '',
|
uscc_name: '',
|
||||||
uscc_dependency: '',
|
uscc_dependency: '',
|
||||||
uscc_address: '',
|
uscc_address: '',
|
||||||
|
uscc_province: '',
|
||||||
|
uscc_city: '',
|
||||||
|
uscc_area: '',
|
||||||
|
longitude: '',
|
||||||
|
latitude: '',
|
||||||
legal_idcard_positive: '',
|
legal_idcard_positive: '',
|
||||||
legal_idcard_negative: '',
|
legal_idcard_negative: '',
|
||||||
legal_name: '',
|
legal_name: '',
|
||||||
|
|
@ -318,7 +326,9 @@ export default {
|
||||||
isRecognizing: false,
|
isRecognizing: false,
|
||||||
recognizeType: '',
|
recognizeType: '',
|
||||||
userId: null,
|
userId: null,
|
||||||
identity: 3
|
identity: 3,
|
||||||
|
addressListener: null,
|
||||||
|
sjAddressListener: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -344,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: {
|
||||||
|
|
@ -495,6 +509,18 @@ export default {
|
||||||
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.uscc_dependency = province + '-' + city + '-' + area;
|
this.formData.uscc_dependency = province + '-' + city + '-' + area;
|
||||||
|
if (this.ChinaCitys[index1] && this.ChinaCitys[index1].code) {
|
||||||
|
this.formData.uscc_province = String(this.ChinaCitys[index1].code).substring(0, 6);
|
||||||
|
}
|
||||||
|
if (this.regionCitys[index2] && this.regionCitys[index2].code) {
|
||||||
|
this.formData.uscc_city = String(this.regionCitys[index2].code).substring(0, 6);
|
||||||
|
}
|
||||||
|
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();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -543,6 +569,163 @@ export default {
|
||||||
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) {
|
async recognizeBusinessLicense(imageUrl) {
|
||||||
try {
|
try {
|
||||||
this.isRecognizing = true;
|
this.isRecognizing = true;
|
||||||
|
|
|
||||||
|
|
@ -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,31 @@
|
||||||
<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>
|
</view>
|
||||||
<input type="text" v-model="displayData.uscc_name" placeholder="请输入营业执照的企业名称"
|
<input type="text" v-model="displayData.uscc_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" @click="editable && showRegionPicker()">
|
<view class="form-item-one box-cont" @click="editable && showRegionPicker()">
|
||||||
|
|
@ -72,12 +79,17 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-one box-cont">
|
<view class="form-item-one box-cont" @click="editable && getAddressInfo()">
|
||||||
<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_address" placeholder="请输入注册地址"
|
<view class="picker-content">
|
||||||
:disabled="!editable" placeholder-class="placeholder" class="input" />
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -100,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>
|
||||||
|
|
@ -111,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>
|
||||||
|
|
@ -125,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>
|
||||||
|
|
||||||
<!-- 身份证有效期 -->
|
<!-- 身份证有效期 -->
|
||||||
|
|
@ -149,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>
|
||||||
|
|
@ -169,21 +193,23 @@
|
||||||
<text class="date-label">开始日期</text>
|
<text class="date-label">开始日期</text>
|
||||||
<view class="date-picker-box" @click="editable && openDatePicker('idcard_start_date')">
|
<view class="date-picker-box" @click="editable && openDatePicker('idcard_start_date')">
|
||||||
<text :class="displayData.idcard_start_date ? 'date-value' : 'placeholder'">
|
<text :class="displayData.idcard_start_date ? 'date-value' : 'placeholder'">
|
||||||
{{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">
|
||||||
<text class="date-label">结束日期</text>
|
<text class="date-label">结束日期</text>
|
||||||
<view class="date-picker-box" :class="{ disabled: displayData.legal_idcard_expiry_type === 1 }"
|
<view class="date-picker-box" :class="{ disabled: displayData.legal_idcard_expiry_type === 1 }"
|
||||||
@click="editable && displayData.legal_idcard_expiry_type !== 1 && openDatePicker('idcard_end_date')">
|
@click="editable && displayData.legal_idcard_expiry_type !== 1 && openDatePicker('idcard_end_date')">
|
||||||
<text :class="displayData.idcard_end_date ? 'date-value' : 'placeholder'">
|
<text :class="displayData.idcard_end_date ? 'date-value' : 'placeholder'">
|
||||||
{{formatDateForDisplay(displayData.idcard_end_date) || '请选择日期'}}
|
{{ formatDateForDisplay(displayData.idcard_end_date) || '请选择日期' }}
|
||||||
</text>
|
</text>
|
||||||
<view class="date-divider"></view>
|
<view class="date-divider"></view>
|
||||||
<image :src="displayData.legal_idcard_expiry_type === 1 ?
|
<image :src="displayData.legal_idcard_expiry_type === 1 ?
|
||||||
'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/bb9a757f-a36c-46bb-a59f-2caddac5365b' :
|
'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/bb9a757f-a36c-46bb-a59f-2caddac5365b' :
|
||||||
'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ce52b49f-2261-49ca-96ed-e9ad47049649'"
|
'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/ce52b49f-2261-49ca-96ed-e9ad47049649'"
|
||||||
class="date-arrow" mode="aspectFit"></image>
|
class="date-arrow" mode="aspectFit"></image>
|
||||||
|
|
@ -200,10 +226,11 @@
|
||||||
<text class="title-text">其他信息</text>
|
<text class="title-text">其他信息</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item-image-box box-cont" >
|
<view class="form-item-image-box 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 displayData.qualifications_sector" :key="'industry-' + index">
|
<view class="image-item" v-for="(img, index) in displayData.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" v-if="editable" @click="removeImage('qualifications_sector', index)">×</view>
|
<view class="image-delete" v-if="editable" @click="removeImage('qualifications_sector', index)">×</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -284,11 +311,13 @@
|
||||||
<view class="popup-body">
|
<view class="popup-body">
|
||||||
<view class="radio-list">
|
<view class="radio-list">
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -311,15 +340,15 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="region-body">
|
<view class="region-body">
|
||||||
<picker-view :value="dateValue" @change="bindDateChange" class="picker-scroll"
|
<picker-view :value="dateValue" @change="bindDateChange" class="picker-scroll"
|
||||||
:indicator-style="indicatorStyle" mode="date" fields="day">
|
:indicator-style="indicatorStyle" mode="date" fields="day">
|
||||||
<picker-view-column>
|
<picker-view-column>
|
||||||
<view class="picker-item" v-for="(year, index) in years" :key="index">{{year}}年</view>
|
<view class="picker-item" v-for="(year, index) in years" :key="index">{{ year }}年</view>
|
||||||
</picker-view-column>
|
</picker-view-column>
|
||||||
<picker-view-column>
|
<picker-view-column>
|
||||||
<view class="picker-item" v-for="(month, index) in months" :key="index">{{month}}月</view>
|
<view class="picker-item" v-for="(month, index) in months" :key="index">{{ month }}月</view>
|
||||||
</picker-view-column>
|
</picker-view-column>
|
||||||
<picker-view-column>
|
<picker-view-column>
|
||||||
<view class="picker-item" v-for="(day, index) in days" :key="index">{{day}}日</view>
|
<view class="picker-item" v-for="(day, index) in days" :key="index">{{ day }}日</view>
|
||||||
</picker-view-column>
|
</picker-view-column>
|
||||||
</picker-view>
|
</picker-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -331,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">
|
||||||
|
|
@ -392,13 +423,13 @@
|
||||||
|
|
||||||
<!-- 存储权限提示 -->
|
<!-- 存储权限提示 -->
|
||||||
<view class="permission" :class="{ transform: isShowStoragePer }">
|
<view class="permission" :class="{ transform: isShowStoragePer }">
|
||||||
<view class="per-tit">美融融plus 对储存空间/照片权限申请说明</view>
|
<view class="per-tit">美融融plus 对储存空间/照片权限申请说明</view>
|
||||||
<view class="per-cont">便于您使用该功能上传您的照片/图片/视频以及用于更换头像、发布商品等场景中读取相册和文件内容。</view>
|
<view class="per-cont">便于您使用该功能上传您的照片/图片/视频以及用于更换头像、发布商品等场景中读取相册和文件内容。</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 相机权限提示 -->
|
<!-- 相机权限提示 -->
|
||||||
<view class="permission" :class="{ transform: isShowCameraPer }">
|
<view class="permission" :class="{ transform: isShowCameraPer }">
|
||||||
<view class="per-tit">美融融plus 对相机拍摄权限申请说明</view>
|
<view class="per-tit">美融融plus 对相机拍摄权限申请说明</view>
|
||||||
<view class="per-cont">便于您使用该功能上传您的照片/图片/视频以及用于更换头像、发布商品等场景中所需内容。</view>
|
<view class="per-cont">便于您使用该功能上传您的照片/图片/视频以及用于更换头像、发布商品等场景中所需内容。</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -416,9 +447,9 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
const years = Array.from({length: 130}, (_, i) => 1970 + i);
|
const years = Array.from({ length: 130 }, (_, i) => 1970 + i);
|
||||||
const months = Array.from({length: 12}, (_, i) => i + 1);
|
const months = Array.from({ length: 12 }, (_, i) => i + 1);
|
||||||
const days = Array.from({length: 31}, (_, i) => i + 1);
|
const days = Array.from({ length: 31 }, (_, i) => i + 1);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 页面状态
|
// 页面状态
|
||||||
|
|
@ -471,6 +502,8 @@ export default {
|
||||||
regionCitys: [],
|
regionCitys: [],
|
||||||
regionAreas: [],
|
regionAreas: [],
|
||||||
regionValue: [0, 0, 0],
|
regionValue: [0, 0, 0],
|
||||||
|
addressListener: null,
|
||||||
|
sjAddressListener: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -488,6 +521,8 @@ export default {
|
||||||
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();
|
||||||
|
|
||||||
this.getUserInfo().then(() => {
|
this.getUserInfo().then(() => {
|
||||||
this.loadApplyDetails();
|
this.loadApplyDetails();
|
||||||
});
|
});
|
||||||
|
|
@ -496,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: {
|
||||||
/**
|
/**
|
||||||
* 识别营业执照
|
* 识别营业执照
|
||||||
|
|
@ -734,7 +768,7 @@ export default {
|
||||||
// 检查身份证反面识别结果是否有效
|
// 检查身份证反面识别结果是否有效
|
||||||
checkIdCardBackRecognition(result) {
|
checkIdCardBackRecognition(result) {
|
||||||
return (result.start_date && result.start_date.trim()) ||
|
return (result.start_date && result.start_date.trim()) ||
|
||||||
(result.end_date && result.end_date.trim());
|
(result.end_date && result.end_date.trim());
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取商户类型文本
|
// 获取商户类型文本
|
||||||
|
|
@ -777,6 +811,11 @@ export default {
|
||||||
uscc_name: userData.uscc_name || '',
|
uscc_name: userData.uscc_name || '',
|
||||||
uscc_dependency: userData.uscc_dependency || '',
|
uscc_dependency: userData.uscc_dependency || '',
|
||||||
uscc_address: userData.uscc_address || '',
|
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: '',
|
||||||
|
|
@ -982,6 +1021,11 @@ export default {
|
||||||
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_dependency: detail.uscc_dependency || this.originalData.uscc_dependency,
|
||||||
uscc_address: detail.uscc_address || this.originalData.uscc_address,
|
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: '',
|
||||||
|
|
@ -1084,6 +1128,11 @@ export default {
|
||||||
uscc_name: userData.uscc_name || '',
|
uscc_name: userData.uscc_name || '',
|
||||||
uscc_dependency: userData.uscc_dependency || '',
|
uscc_dependency: userData.uscc_dependency || '',
|
||||||
uscc_address: userData.uscc_address || '',
|
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: '',
|
||||||
|
|
@ -1304,6 +1353,9 @@ export default {
|
||||||
uscc_name: this.displayData.uscc_name,
|
uscc_name: this.displayData.uscc_name,
|
||||||
uscc_dependency: this.displayData.uscc_dependency,
|
uscc_dependency: this.displayData.uscc_dependency,
|
||||||
uscc_address: this.displayData.uscc_address,
|
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,
|
||||||
|
|
@ -1387,16 +1439,16 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
showPermissionDialog(title, content) {
|
showPermissionDialog(title, content) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title,
|
title,
|
||||||
content,
|
content,
|
||||||
confirmText: '去开启',
|
confirmText: '去开启',
|
||||||
success(res) {
|
success(res) {
|
||||||
resolve(res.confirm);
|
resolve(res.confirm);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
showRegionPicker() {
|
showRegionPicker() {
|
||||||
|
|
@ -1426,6 +1478,18 @@ export default {
|
||||||
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.$set(this.displayData, 'uscc_dependency', province + '-' + city + '-' + 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();
|
this.hideRegionPopup();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -1764,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;
|
||||||
|
|
@ -1913,7 +2134,7 @@ export default {
|
||||||
let name = `${userId}_${artisan}_${fieldName}_${timestamp}_${random}.${fileExtension}`;
|
let name = `${userId}_${artisan}_${fieldName}_${timestamp}_${random}.${fileExtension}`;
|
||||||
console.log('唯一文件名(包含时间戳):', name);
|
console.log('唯一文件名(包含时间戳):', name);
|
||||||
|
|
||||||
const ossConfig = await request.post('/user/getalioss', {type: type, kind: 1});
|
const ossConfig = await request.post('/user/getalioss', { type: type, kind: 1 });
|
||||||
|
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
|
|
@ -2196,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 {
|
||||||
|
|
@ -2385,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%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2513,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;
|
||||||
}
|
}
|
||||||
|
|
@ -2643,9 +2872,9 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.permission.transform {
|
.permission.transform {
|
||||||
top: calc(var(--status-bar-height) + 88rpx + 20rpx);
|
top: calc(var(--status-bar-height) + 88rpx + 20rpx);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-list {
|
.image-list {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue