|
@@ -32,52 +32,52 @@
|
|
|
<el-form label-width="135px" ref="formData" :model="formData" :rules="rules">
|
|
<el-form label-width="135px" ref="formData" :model="formData" :rules="rules">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="公司名称" style="width: 100%" prop="SupplierName">
|
|
|
|
|
|
|
+ <el-form-item label="公司名称" label-width="150px" style="width: 100%" prop="SupplierName">
|
|
|
<el-input v-model="formData.SupplierName" placeholder="请输入公司名称"></el-input>
|
|
<el-input v-model="formData.SupplierName" placeholder="请输入公司名称"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
- <el-form-item label="组织机构代码" style="width: 100%" prop="OrganCode">
|
|
|
|
|
- <el-input v-model="formData.OrganCode" placeholder="请输入组织机构代码"></el-input>
|
|
|
|
|
|
|
+ <el-form-item label="组织机构代码" label-width="150px" style="width: 100%" prop="OrganCode">
|
|
|
|
|
+ <el-input v-model="formData.OrganCode" placeholder="请输入组织机构代码"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="法定代表人姓名" style="width: 100%" prop="LegalPerson">
|
|
|
|
|
- <el-input v-model="formData.LegalPerson" placeholder="法定代表人姓名"></el-input>
|
|
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="法定代表人姓名" label-width="150px" style="width: 100%" prop="LegalPerson">
|
|
|
|
|
+ <el-input v-model="formData.LegalPerson" placeholder="请输入法定代表人姓名"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
|
|
|
|
+ <el-col :span="16">
|
|
|
<el-form-item label="法定代表人身份证号" label-width="150px" style="width: 100%" prop="LegalPersonId">
|
|
<el-form-item label="法定代表人身份证号" label-width="150px" style="width: 100%" prop="LegalPersonId">
|
|
|
- <el-input v-model="formData.LegalPersonId" placeholder="法定代表人身份证号"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="formData.LegalPersonId" placeholder="请输入法定代表人身份证号"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="" label-width="60px" prop="LegalPersonImg">
|
|
<el-form-item label="" label-width="60px" prop="LegalPersonImg">
|
|
|
<el-upload action="" ref="LegalPersonUpload"
|
|
<el-upload action="" ref="LegalPersonUpload"
|
|
|
- :limit="1"
|
|
|
|
|
|
|
+ :limit="2"
|
|
|
:http-request="uploadRequest"
|
|
:http-request="uploadRequest"
|
|
|
- :show-file-list="true"
|
|
|
|
|
|
|
+ :show-file-list="true"
|
|
|
:before-upload="beforeUpload">
|
|
:before-upload="beforeUpload">
|
|
|
<el-button size="small" type="primary">上传身份证扫描件<i class="el-icon-upload el-icon--right"></i></el-button>
|
|
<el-button size="small" type="primary">上传身份证扫描件<i class="el-icon-upload el-icon--right"></i></el-button>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="联系人姓名" style="width: 100%" prop="ContactName">
|
|
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="联系人姓名" label-width="150px" style="width: 100%" prop="ContactName">
|
|
|
<el-input v-model="formData.ContactName" placeholder="请输入联系人姓名"></el-input>
|
|
<el-input v-model="formData.ContactName" placeholder="请输入联系人姓名"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
|
|
|
|
+ <el-col :span="16">
|
|
|
<el-form-item label="联系人身份证号" label-width="150px" style="width: 100%" prop="ContactId">
|
|
<el-form-item label="联系人身份证号" label-width="150px" style="width: 100%" prop="ContactId">
|
|
|
<el-input v-model="formData.ContactId" placeholder="请输入联系人身份证号"></el-input>
|
|
<el-input v-model="formData.ContactId" placeholder="请输入联系人身份证号"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="" label-width="60px" prop="ContactImg">
|
|
<el-form-item label="" label-width="60px" prop="ContactImg">
|
|
|
<el-upload action="" ref="ContactUpload"
|
|
<el-upload action="" ref="ContactUpload"
|
|
|
- :limit="1"
|
|
|
|
|
|
|
+ :limit="2"
|
|
|
:http-request="uploadRequest"
|
|
:http-request="uploadRequest"
|
|
|
- :show-file-list="true"
|
|
|
|
|
|
|
+ :show-file-list="true"
|
|
|
:before-upload="beforeUpload">
|
|
:before-upload="beforeUpload">
|
|
|
<el-button size="small" type="primary">上传身份证扫描件<i class="el-icon-upload el-icon--right"></i></el-button>
|
|
<el-button size="small" type="primary">上传身份证扫描件<i class="el-icon-upload el-icon--right"></i></el-button>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -85,22 +85,27 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="账号/Email" style="width: 100%" prop="UserName">
|
|
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item label="账号/Email" label-width="150px" style="width: 100%" prop="UserName">
|
|
|
<el-input v-model="formData.UserName" placeholder="请输入账号"></el-input>
|
|
<el-input v-model="formData.UserName" placeholder="请输入账号"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="用户名" style="width: 100%" prop="Realname">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="用户名" label-width="150px" style="width: 100%" prop="Realname">
|
|
|
<el-input v-model="formData.Realname" placeholder="请输入用户名"></el-input>
|
|
<el-input v-model="formData.Realname" placeholder="请输入用户名"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="密码" style="width: 100%" prop="UserPass" >
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="手机号" style="width: 100%" prop="Telephone">
|
|
|
|
|
+ <el-input v-model="formData.Telephone" placeholder="用于审核通知和密码找回"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="密码" label-width="150px" style="width: 100%" prop="UserPass" >
|
|
|
<el-input type="password" v-model="formData.UserPass" auto-complete="off" placeholder="请输入密码"></el-input>
|
|
<el-input type="password" v-model="formData.UserPass" auto-complete="off" placeholder="请输入密码"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="确认密码" style="width: 100%" prop="UserPass2" >
|
|
<el-form-item label="确认密码" style="width: 100%" prop="UserPass2" >
|
|
|
<el-input type="password" v-model="formData.UserPass2" auto-complete="off" placeholder="请输入确认密码"></el-input>
|
|
<el-input type="password" v-model="formData.UserPass2" auto-complete="off" placeholder="请输入确认密码"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -112,7 +117,7 @@
|
|
|
<el-checkbox v-model="checked1" style="margin-left: 80px">阅读并同意</el-checkbox>
|
|
<el-checkbox v-model="checked1" style="margin-left: 80px">阅读并同意</el-checkbox>
|
|
|
<router-link to="#">《麦吉轮用户注册协议》</router-link><router-link to="#">《隐私政策》</router-link> -->
|
|
<router-link to="#">《麦吉轮用户注册协议》</router-link><router-link to="#">《隐私政策》</router-link> -->
|
|
|
</el-row>
|
|
</el-row>
|
|
|
- <el-row style="margin-left: 40%; margin-top: 10px; margin-bottom: 20px;">
|
|
|
|
|
|
|
+ <el-row style="margin-left: 50%; margin-top: 10px; margin-bottom: 20px;">
|
|
|
<el-button type="primary" @click="register" style="width: 30%">立即注册</el-button>
|
|
<el-button type="primary" @click="register" style="width: 30%">立即注册</el-button>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -155,7 +160,6 @@
|
|
|
this.$alert('该公司已注册!', '提示:', {
|
|
this.$alert('该公司已注册!', '提示:', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
})
|
|
|
- // callback(new Error('该公司已注册!'));
|
|
|
|
|
} else {
|
|
} else {
|
|
|
callback();
|
|
callback();
|
|
|
}
|
|
}
|
|
@@ -180,6 +184,7 @@
|
|
|
UserId: '', //int
|
|
UserId: '', //int
|
|
|
UserName: '', //账号/Email
|
|
UserName: '', //账号/Email
|
|
|
Realname: '', //用户名
|
|
Realname: '', //用户名
|
|
|
|
|
+ Telephone: '', //用户手机号
|
|
|
UserPass: '',
|
|
UserPass: '',
|
|
|
UserPass2: '',
|
|
UserPass2: '',
|
|
|
SupplierName: '',
|
|
SupplierName: '',
|
|
@@ -274,6 +279,9 @@
|
|
|
Realname: [
|
|
Realname: [
|
|
|
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
|
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
|
|
+ Telephone: [
|
|
|
|
|
+ { required: true, message: '请输入手机号', trigger: 'blur' }
|
|
|
|
|
+ ],
|
|
|
UserPass: [
|
|
UserPass: [
|
|
|
{ required: true, message: '请输入密码', trigger: 'blur' }
|
|
{ required: true, message: '请输入密码', trigger: 'blur' }
|
|
|
],
|
|
],
|
|
@@ -298,6 +306,16 @@
|
|
|
register () {
|
|
register () {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
|
|
|
|
+ //判断公司是否注册
|
|
|
|
|
+ for (let i = 0; i < _this.supplierNameList.length; i++) {
|
|
|
|
|
+ if (_this.formData.SupplierName == _this.supplierNameList[i].SupplierName) {
|
|
|
|
|
+ this.$alert('该公司已注册!', '提示:', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//身份证号验证
|
|
//身份证号验证
|
|
|
let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
|
if (!re1.test(_this.formData.LegalPersonId)) {
|
|
if (!re1.test(_this.formData.LegalPersonId)) {
|
|
@@ -313,38 +331,47 @@
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //密码验证 字母数字组成8-20位 正向断言
|
|
|
|
|
- let re2 = /^(?=.*[0-9])[0-9A-Za-z]{8,20}$/g
|
|
|
|
|
- if (!re2.test(_this.formData.UserPass)) {
|
|
|
|
|
- this.$alert('请输入正确格式的密码(8——20位,包含英文字母、数字)!', '提示', {
|
|
|
|
|
|
|
+ // 判断法定代表人身份证文件上传是否完成
|
|
|
|
|
+ if (!_this.checkSuccess(_this.$refs.LegalPersonUpload.uploadFiles)) {
|
|
|
|
|
+ this.$alert('上传文件失败,请重新上传法定代表人身份证文件! ', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- if (_this.formData.UserPass != _this.formData.UserPass2) {
|
|
|
|
|
- this.$alert('两次输入的密码不一致,请重新输入!', '提示', {
|
|
|
|
|
|
|
+ _this.formData.LegalPersonURL = _this.getFileURL(_this.$refs.LegalPersonUpload.uploadFiles) //获取地址
|
|
|
|
|
+
|
|
|
|
|
+ // 判断联系人身份证文件上传是否完成
|
|
|
|
|
+ if (!_this.checkSuccess(_this.$refs.ContactUpload.uploadFiles)) {
|
|
|
|
|
+ this.$alert('上传文件失败,请重新上传联系人身份证文件! ', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ _this.formData.ContactURL = _this.getFileURL(_this.$refs.ContactUpload.uploadFiles)
|
|
|
|
|
|
|
|
- // 判断法定代表人身份证文件上传是否完成
|
|
|
|
|
- if (!_this.checkSuccess(_this.$refs.LegalPersonUpload.uploadFiles)) {
|
|
|
|
|
- this.$alert('上传文件失败,请重新上传法定代表人身份证文件! ', '提示', {
|
|
|
|
|
|
|
+ //手机号验证
|
|
|
|
|
+ let re3 = /^[1][3456789]\d{9}$/
|
|
|
|
|
+ if (!re3.test(_this.formData.Telephone)) {
|
|
|
|
|
+ this.$alert('请填写正确的手机号!', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- _this.formData.LegalPersonURL = _this.getFileURL(_this.$refs.LegalPersonUpload.uploadFiles) //获取地址
|
|
|
|
|
|
|
|
|
|
- // 判断联系人身份证文件上传是否完成
|
|
|
|
|
- if (!_this.checkSuccess(_this.$refs.ContactUpload.uploadFiles)) {
|
|
|
|
|
- this.$alert('上传文件失败,请重新上传联系人身份证文件! ', '提示', {
|
|
|
|
|
|
|
+ //密码验证 字母数字组成8-20位 正向断言
|
|
|
|
|
+ let re2 = /^(?=.*[0-9])[0-9A-Za-z]{8,20}$/g
|
|
|
|
|
+ if (!re2.test(_this.formData.UserPass)) {
|
|
|
|
|
+ this.$alert('请输入正确格式的密码(8——20位,包含英文字母、数字)!', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (_this.formData.UserPass != _this.formData.UserPass2) {
|
|
|
|
|
+ this.$alert('两次输入的密码不一致,请重新输入!', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- _this.formData.ContactURL = _this.getFileURL(_this.$refs.ContactUpload.uploadFiles)
|
|
|
|
|
|
|
|
|
|
_this.$axios.post('/register/addentity', _this.formData)
|
|
_this.$axios.post('/register/addentity', _this.formData)
|
|
|
.then(function (response) {
|
|
.then(function (response) {
|
|
@@ -377,14 +404,20 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- //文件大小限制
|
|
|
|
|
|
|
+ //图片格式以及文件大小限制
|
|
|
beforeUpload(file) {
|
|
beforeUpload(file) {
|
|
|
let isLt10m = file.size / 1024 / 1024 / 10 < 1
|
|
let isLt10m = file.size / 1024 / 1024 / 10 < 1
|
|
|
|
|
+ let isIMAGE1 = file.name.split('.')[1] === 'jpg'
|
|
|
|
|
+ let isIMAGE2 = file.name.split('.')[1] === 'jpeg'
|
|
|
|
|
+ let isIMAGE3 = file.name.split('.')[1] === 'png'
|
|
|
|
|
+
|
|
|
|
|
+ if (!isIMAGE1 && !isIMAGE2 && !isIMAGE3) {
|
|
|
|
|
+ this.$message.error('上传文件只能是图片格式(jpg/jpeg/png)!')
|
|
|
|
|
+ }
|
|
|
if (!isLt10m) {
|
|
if (!isLt10m) {
|
|
|
this.$message.error('上传文件大小不能超过 10MB!')
|
|
this.$message.error('上传文件大小不能超过 10MB!')
|
|
|
- return false
|
|
|
|
|
}
|
|
}
|
|
|
- return true
|
|
|
|
|
|
|
+ return isIMAGE1 || isIMAGE2 || isIMAGE3 && isLt10m
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//判断是否上传成功
|
|
//判断是否上传成功
|