diff --git a/src/views/register/companyRegister.vue b/src/views/register/companyRegister.vue index 8c5af4a1..c59eebae 100644 --- a/src/views/register/companyRegister.vue +++ b/src/views/register/companyRegister.vue @@ -23,11 +23,8 @@ - - - @@ -35,7 +32,12 @@ - + + + + @@ -158,6 +160,7 @@ export default { columns:[], fileListKHZM:[], fileListFRZJZ:[], + fileListYYZZ:[], form: { phone: "", //账号 code: "", //验证码 @@ -247,6 +250,16 @@ export default { }) return; } + if (this.userForm.companyLicense == ''){ + this.$toast({ + icon: 'error', // 找到自己需要的图标 + message: '请上传营业执照', + duration:"2000", + onClose:function(){ + } + }) + return; + } this.form.accountType = '1'; var that = this userRegister(this.form).then((res) => { @@ -302,6 +315,27 @@ export default { this.form.accountOpenCert = ''; } }, + afterReadYYZZ(file) { + this.$toast.loading({ + message: "上传中...", + forbidClick: true, + duration: 0, + }); + // 此时可以自行将文件上传至服务器 + let params1 = { + file:file.content + } + base64Upload(params1).then((r1) => { + this.form.companyLicense = r1.fileName; + }) + }, + deleteFileYYZZ(elIndex){ + return (file, name) => { + let fileIndex = name.index + this.fileListYYZZ[elIndex].splice(fileIndex, 1) + this.form.companyLicense = ''; + } + }, searchBankAddress(){ let data = { @@ -354,6 +388,9 @@ export default { width: 220px; } } +::v-deep .van-divider{ + margin-bottom: 0; +} .submit{ width: 90%; margin: 2vh auto 0; diff --git a/src/views/user/accountSetting/userInformation/companyInformation.vue b/src/views/user/accountSetting/userInformation/companyInformation.vue index 003c72da..8239ba9a 100644 --- a/src/views/user/accountSetting/userInformation/companyInformation.vue +++ b/src/views/user/accountSetting/userInformation/companyInformation.vue @@ -60,7 +60,7 @@ /> - + @@ -73,7 +73,13 @@ - + + + + + @@ -107,6 +113,7 @@ export default { companyNameList:[], fileListKHZM:[], fileListFRZJZ:[], + fileListYYZZ:[], form: { files:[], fileType:'', @@ -171,7 +178,7 @@ export default { this.userForm.companyTimeLimit = response.data.companyTimeLimit; this.userForm.companySetupTime = response.data.companySetupTime; this.userForm.companyCapital = response.data.companyCapital; - this.userForm.companyLicense = response.data.companyLicense; + // this.userForm.companyLicense = response.data.companyLicense; this.userForm.address = response.data.address; if (response.data.accountOpenCert!=''){ @@ -188,6 +195,13 @@ export default { }]; } + if (response.data.companyLicense!=''){ + this.fileListYYZZ = [{ + url:'/api'+response.data.companyLicense, + isImage: true + }]; + } + this.tel = response.data.phone this.getDicts("company_nature").then(res => { @@ -243,6 +257,27 @@ export default { this.userForm.accountOpenCert = ''; } }, + afterReadYYZZ(file) { + this.$toast.loading({ + message: "上传中...", + forbidClick: true, + duration: 0, + }); + // 此时可以自行将文件上传至服务器 + let params1 = { + file:file.content + } + base64Upload(params1).then((r1) => { + this.form.companyLicense = r1.fileName; + }) + }, + deleteFileYYZZ(elIndex){ + return (file, name) => { + let fileIndex = name.index + this.fileListYYZZ[elIndex].splice(fileIndex, 1) + this.form.companyLicense = ''; + } + }, submitForm(){ if (this.userForm.accountOpenCert == ''){ this.$toast({ @@ -254,6 +289,16 @@ export default { }) return; } + if (this.userForm.companyLicense == ''){ + this.$toast({ + icon: 'error', // 找到自己需要的图标 + message: '请上传营业执照', + duration:"2000", + onClose:function(){ + } + }) + return; + } userUpdate(this.userForm).then(response => { if(response.code == 200) { Dialog.confirm({