企业统一社会信用代码取消必填与校验,并添加修改信息会重置密码提示
parent
670c0f6622
commit
8e406d0fdb
|
@ -496,27 +496,27 @@ import { upload } from '@/utils/upload'
|
||||||
export default {
|
export default {
|
||||||
components: { SelectTree },
|
components: { SelectTree },
|
||||||
data() {
|
data() {
|
||||||
var hasCode = (rule, value, callback) => {
|
// var hasCode = (rule, value, callback) => {
|
||||||
if (value) {
|
// if (value) {
|
||||||
requestFN(
|
// requestFN(
|
||||||
'/corpinfo/hasCode',
|
// '/corpinfo/hasCode',
|
||||||
{
|
// {
|
||||||
CODE: value,
|
// CODE: value,
|
||||||
CORPINFO_ID: this.form.CORPINFO_ID
|
// CORPINFO_ID: this.form.CORPINFO_ID
|
||||||
}
|
// }
|
||||||
).then((data) => {
|
// ).then((data) => {
|
||||||
if (!data.pd) {
|
// if (!data.pd) {
|
||||||
callback()
|
// callback()
|
||||||
} else {
|
// } else {
|
||||||
callback(new Error('统一社会信用代码重复'))
|
// callback(new Error('统一社会信用代码重复'))
|
||||||
}
|
// }
|
||||||
}).catch((e) => {
|
// }).catch((e) => {
|
||||||
|
//
|
||||||
})
|
// })
|
||||||
} else {
|
// } else {
|
||||||
callback()
|
// callback()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return {
|
return {
|
||||||
config: config,
|
config: config,
|
||||||
dialogMap: false,
|
dialogMap: false,
|
||||||
|
@ -569,12 +569,12 @@ export default {
|
||||||
{ required: true, message: '企业名称不能为空', trigger: 'blur' }
|
{ required: true, message: '企业名称不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
CODE: [
|
CODE: [
|
||||||
{ required: true, message: '统一社会信用代码不能为空', trigger: 'blur' },
|
{ required: false, message: '统一社会信用代码不能为空', trigger: 'blur' }
|
||||||
{
|
// , {
|
||||||
pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/,
|
// pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/,
|
||||||
message: '请输入正确的统一社会信用代码'
|
// message: '请输入正确的统一社会信用代码'
|
||||||
},
|
// },
|
||||||
{ validator: hasCode, trigger: 'blur' }
|
// { validator: hasCode, trigger: 'blur' }
|
||||||
],
|
],
|
||||||
PROVINCE: [
|
PROVINCE: [
|
||||||
{ required: true, message: '省不能为空', trigger: 'blur' }
|
{ required: true, message: '省不能为空', trigger: 'blur' }
|
||||||
|
@ -748,66 +748,73 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
this.$refs.form.validate(valid => {
|
this.$confirm('此操作将会修改企业登录密码为Aa@123456789是否继续?', '提示', {
|
||||||
if (valid) {
|
confirmButtonText: '确定',
|
||||||
const loading = this.$loading({
|
cancelButtonText: '取消',
|
||||||
lock: true,
|
type: 'warning'
|
||||||
text: '提交中...',
|
}).then(() => {
|
||||||
spinner: 'el-icon-loading',
|
this.$refs.form.validate(valid => {
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
if (valid) {
|
||||||
})
|
const loading = this.$loading({
|
||||||
if (this.form.INDUSTRYALL && this.form.INDUSTRYALL.length > 0) {
|
lock: true,
|
||||||
this.form.CORP_TYPE = this.form.INDUSTRYALL[0] || ''
|
text: '提交中...',
|
||||||
this.form.CORP_TYPE2 = this.form.INDUSTRYALL[1] || ''
|
spinner: 'el-icon-loading',
|
||||||
this.form.CORP_TYPE3 = this.form.INDUSTRYALL[2] || ''
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
this.form.CORP_TYPE4 = this.form.INDUSTRYALL[3] || ''
|
})
|
||||||
}
|
if (this.form.INDUSTRYALL && this.form.INDUSTRYALL.length > 0) {
|
||||||
const formData = new FormData()
|
this.form.CORP_TYPE = this.form.INDUSTRYALL[0] || ''
|
||||||
Object.keys(this.pdrelated).map(key => {
|
this.form.CORP_TYPE2 = this.form.INDUSTRYALL[1] || ''
|
||||||
formData.append(key, this.pdrelated[key])
|
this.form.CORP_TYPE3 = this.form.INDUSTRYALL[2] || ''
|
||||||
})
|
this.form.CORP_TYPE4 = this.form.INDUSTRYALL[3] || ''
|
||||||
Object.keys(this.form).map(key => {
|
}
|
||||||
formData.append(key, this.form[key])
|
const formData = new FormData()
|
||||||
})
|
Object.keys(this.pdrelated).map(key => {
|
||||||
if (this.form.FOURTYPE == '1') {
|
formData.append(key, this.pdrelated[key])
|
||||||
if (this.$refs.fourUpload.uploadFiles.length > 0) {
|
})
|
||||||
// eslint-disable-next-line no-redeclare
|
Object.keys(this.form).map(key => {
|
||||||
for (var i = 0; i < this.$refs.fourUpload.uploadFiles.length; i++) {
|
formData.append(key, this.form[key])
|
||||||
if (this.$refs.fourUpload.uploadFiles[i]) {
|
})
|
||||||
formData.append('fourFiles', this.$refs.fourUpload.uploadFiles[i].raw)
|
if (this.form.FOURTYPE == '1') {
|
||||||
|
if (this.$refs.fourUpload.uploadFiles.length > 0) {
|
||||||
|
// eslint-disable-next-line no-redeclare
|
||||||
|
for (var i = 0; i < this.$refs.fourUpload.uploadFiles.length; i++) {
|
||||||
|
if (this.$refs.fourUpload.uploadFiles[i]) {
|
||||||
|
formData.append('fourFiles', this.$refs.fourUpload.uploadFiles[i].raw)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (this.form.FOURTYPE == '2') {
|
||||||
|
formData.append('fourFiles', this.FFILE)
|
||||||
}
|
}
|
||||||
} else if (this.form.FOURTYPE == '2') {
|
|
||||||
formData.append('fourFiles', this.FFILE)
|
|
||||||
}
|
|
||||||
|
|
||||||
formData.append('COMPANY_AREA', this.$refs.PROVINCE.selected.label + this.$refs.CITY.selected.label + this.$refs.COUNTRY.selected.label)
|
formData.append('COMPANY_AREA', this.$refs.PROVINCE.selected.label + this.$refs.CITY.selected.label + this.$refs.COUNTRY.selected.label)
|
||||||
this.form.COMPANY_AREA =
|
this.form.COMPANY_AREA =
|
||||||
upload(
|
upload(
|
||||||
'/corpinfo/edit',
|
'/corpinfo/edit',
|
||||||
formData
|
formData
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
if (this.$refs.upload.uploadFiles.length > 0) {
|
if (this.$refs.upload.uploadFiles.length > 0) {
|
||||||
loading.close()
|
loading.close()
|
||||||
this.uploadImg()
|
this.uploadImg()
|
||||||
} else {
|
} else {
|
||||||
loading.close()
|
loading.close()
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '操作成功',
|
message: '操作成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.goOut('0')
|
||||||
|
// this.$parent.activeName = 'CorpView'
|
||||||
|
}
|
||||||
|
}).catch((e) => {
|
||||||
|
loading.close()
|
||||||
|
this.$message({
|
||||||
|
message: '操作失败',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
this.goOut('0')
|
}
|
||||||
// this.$parent.activeName = 'CorpView'
|
})
|
||||||
}
|
}).catch(() => {
|
||||||
}).catch((e) => {
|
|
||||||
loading.close()
|
|
||||||
this.$message({
|
|
||||||
message: '操作失败',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue