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

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 { 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,6 +748,11 @@ export default {
}) })
}, },
confirm() { confirm() {
this.$confirm('此操作将会修改企业登录密码为Aa@123456789是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
const loading = this.$loading({ const loading = this.$loading({
@ -809,6 +814,8 @@ export default {
}) })
} }
}) })
}).catch(() => {
})
}, },
// 线 // 线