|
@@ -7,7 +7,7 @@
|
|
|
<el-input size="small" v-if="isModifyMode" v-model="authentication.enterpriseName"></el-input>
|
|
|
<!--<span v-if="!isModifyMode">{{authentication.name}}</span>-->
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="公司营业执照" prop="file">
|
|
|
+ <el-form-item label="公司营业执照" prop="businessLicensePhoto">
|
|
|
<el-upload
|
|
|
class="avatar-uploader"
|
|
|
action="https://jsonplaceholder.typicode.com/posts/"
|
|
@@ -86,6 +86,19 @@ export default {
|
|
|
{required: true, message: '请输入公司名称', trigger: 'blur'},
|
|
|
{min: 3, max: 50, message: '机构名称长度在 3 到 50 个字符', trigger: 'blur'}
|
|
|
],
|
|
|
+ businessLicensePhoto: [
|
|
|
+ {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ console.log(value);
|
|
|
+ if (value == null || value == '') {
|
|
|
+ callback(new Error('公司营业执照不能为空'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: 'blue'
|
|
|
+ },
|
|
|
+ ],
|
|
|
legalPersonName: [
|
|
|
{required: true, message: '请输入公司法人姓名', trigger: 'blur'}
|
|
|
],
|
|
@@ -98,7 +111,8 @@ export default {
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
- }, trigger: 'blur'
|
|
|
+ },
|
|
|
+ trigger: 'blur'
|
|
|
},
|
|
|
],
|
|
|
unifiedSocialCreditCode: [
|
|
@@ -218,6 +232,7 @@ export default {
|
|
|
},
|
|
|
//上传文件,此处为上传图片
|
|
|
uploadFile (param) {
|
|
|
+ this.showLoading();
|
|
|
const formData = new FormData()
|
|
|
let config = {
|
|
|
//添加请求头
|
|
@@ -225,11 +240,14 @@ export default {
|
|
|
}
|
|
|
formData.append('file', param.file)
|
|
|
Http.upload(Apis.FILE.UPLOAD_IMAGE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
+ this.hideLoading();
|
|
|
console.log('上传成功')
|
|
|
this.authentication.businessLicensePhoto = res.data
|
|
|
console.log(res.data)
|
|
|
notify('success', '上传成功')
|
|
|
+ this.$refs['authentication'].validateField('businessLicensePhoto');
|
|
|
}).catch(error => {
|
|
|
+ this.hideLoading();
|
|
|
notify('error', error.data.msg)
|
|
|
})
|
|
|
},
|