企业统一社会信用代码取消必填与校验,并添加修改信息会重置密码提示

pull/5/head
dearlin 2023-11-13 17:46:25 +08:00
parent 670c0f6622
commit 8e406d0fdb
1 changed files with 89 additions and 82 deletions

View File

@ -496,27 +496,27 @@ import { upload } from '@/utils/upload'
export default {
components: { SelectTree },
data() {
var hasCode = (rule, value, callback) => {
if (value) {
requestFN(
'/corpinfo/hasCode',
{
CODE: value,
CORPINFO_ID: this.form.CORPINFO_ID
}
).then((data) => {
if (!data.pd) {
callback()
} else {
callback(new Error('统一社会信用代码重复'))
}
}).catch((e) => {
})
} else {
callback()
}
}
// var hasCode = (rule, value, callback) => {
// if (value) {
// requestFN(
// '/corpinfo/hasCode',
// {
// CODE: value,
// CORPINFO_ID: this.form.CORPINFO_ID
// }
// ).then((data) => {
// if (!data.pd) {
// callback()
// } else {
// callback(new Error(''))
// }
// }).catch((e) => {
//
// })
// } else {
// callback()
// }
// }
return {
config: config,
dialogMap: false,
@ -569,12 +569,12 @@ export default {
{ required: true, message: '企业名称不能为空', trigger: 'blur' }
],
CODE: [
{ required: true, message: '统一社会信用代码不能为空', trigger: 'blur' },
{
pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/,
message: '请输入正确的统一社会信用代码'
},
{ validator: hasCode, trigger: 'blur' }
{ required: false, message: '统一社会信用代码不能为空', trigger: 'blur' }
// , {
// pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/,
// message: ''
// },
// { validator: hasCode, trigger: 'blur' }
],
PROVINCE: [
{ required: true, message: '省不能为空', trigger: 'blur' }
@ -748,6 +748,11 @@ export default {
})
},
confirm() {
this.$confirm('此操作将会修改企业登录密码为Aa@123456789是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$refs.form.validate(valid => {
if (valid) {
const loading = this.$loading({
@ -809,6 +814,8 @@ export default {
})
}
})
}).catch(() => {
})
},
// 线