Commit caa9dd62 authored by dcy's avatar dcy

会员认证修改

parent 0e82810f
...@@ -244,7 +244,7 @@ import FileUpload from "@/components/FileUpload" ...@@ -244,7 +244,7 @@ import FileUpload from "@/components/FileUpload"
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
import uploadImage from "@/components/UploadImage"; import uploadImage from "@/components/UploadImage";
import {CommonStatusEnum} from "@/utils/constants"; import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user"; import {changeUserStatus, listServiceUser, listSimpleUsers} from "@/api/system/user";
let stateId = { let stateId = {
0:'审核中', 0:'审核中',
...@@ -492,11 +492,12 @@ export default { ...@@ -492,11 +492,12 @@ export default {
userCardAuthId:this.IdDetails.id, userCardAuthId:this.IdDetails.id,
auditRemark:this.IdDetails.auditRemark auditRemark:this.IdDetails.auditRemark
} }
if(val === 3){ if(val === 2){
p.auditRemark = undefined p.auditRemark = undefined
} }
memberUserAuditIdCard(p).then(r => { memberUserAuditIdCard(p).then(r => {
if(r.code === 0){ if(r.code === 0){
this.$message.success('修改成功');
this.getList() this.getList()
this.getIdentityDetails() this.getIdentityDetails()
} }
...@@ -509,7 +510,7 @@ export default { ...@@ -509,7 +510,7 @@ export default {
userCardAuthId:this.enterpriseFrom.id, userCardAuthId:this.enterpriseFrom.id,
auditRemark:this.enterpriseFrom.auditRemark auditRemark:this.enterpriseFrom.auditRemark
} }
if(val === 3){ if(val === 2){
p.auditRemark = undefined p.auditRemark = undefined
} }
memberUserAuditEnterprise(p).then(r => { memberUserAuditEnterprise(p).then(r => {
...@@ -520,8 +521,7 @@ export default { ...@@ -520,8 +521,7 @@ export default {
}) })
}, },
setMemberUserUpdateIdCard(){ setMemberUserUpdateIdCard(){
this.$refs.formId.validate(valid =>{ this.$refs.formId.validate(async valid =>{
if(valid){
let p ={ let p ={
cardNumber:this.IdDetails.cardNumber, cardNumber:this.IdDetails.cardNumber,
cardType:this.IdDetails.cardType, cardType:this.IdDetails.cardType,
...@@ -529,31 +529,38 @@ export default { ...@@ -529,31 +529,38 @@ export default {
img2:this.IdDetails.img2, img2:this.IdDetails.img2,
name:this.IdDetails.name, name:this.IdDetails.name,
userCardAuthId:this.IdDetails.id, userCardAuthId:this.IdDetails.id,
auditPass:this.IdDetails.status === 3 ? true : false, };
} ; if(valid && this.IdDetails.status === 3){
memberUserUpdateIdCard(p).then(r => { let res = await new Promise((resolve)=>{
if(r.code === 0){
if(this.IdDetails.status === 3){
this.$confirm('是否要将当前状态修改为审核成功?', '状态修改', { this.$confirm('是否要将当前状态修改为审核成功?', '状态修改', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(r =>{
this.idCardAuditFn(2); resolve(r)
}).catch(() => { }).catch((r)=>{
resolve(r)
})
})
p.auditPass = res === 'confirm' ? true : false;
} else if(valid) {
p.auditPass = false;
} else {
return
}
memberUserUpdateIdCard(p).then(r => {
if(r.code === 0){
this.$message.success('修改成功')
if(p.auditPass === true ){
this.getIdentityDetails() this.getIdentityDetails()
});
} }
this.getList() this.getList()
this.$message.success('修改成功');
} }
}) })
}
}) })
}, },
setMemberUserUpdateEnterprise(){ setMemberUserUpdateEnterprise(){
this.$refs.formEnter.validate(valid =>{ this.$refs.formEnter.validate(async valid =>{
if(valid){
let p = { let p = {
cardNumber:this.enterpriseFrom.cardNumber, cardNumber:this.enterpriseFrom.cardNumber,
img1:this.enterpriseFrom.img1, img1:this.enterpriseFrom.img1,
...@@ -561,26 +568,30 @@ export default { ...@@ -561,26 +568,30 @@ export default {
legalName:this.enterpriseFrom.legalName, legalName:this.enterpriseFrom.legalName,
name:this.enterpriseFrom.name, name:this.enterpriseFrom.name,
userEnterpriseAuthId:this.enterpriseFrom.id, userEnterpriseAuthId:this.enterpriseFrom.id,
auditPass:this.enterpriseFrom.status === 3 ? true : false,
} }
memberUserUpdateEnterprise(p).then(r =>{ if(valid && this.enterpriseFrom.status === 3){
if(r.code === 0){ let res = await new Promise((resolve)=>{
if(this.enterpriseFrom.status === 3){
this.$confirm('是否要将当前状态修改为审核成功?', '状态修改', { this.$confirm('是否要将当前状态修改为审核成功?', '状态修改', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(r =>resolve(r)).catch(r => resolve(r))
this.certificateVerificationFn(2); })
}).catch(() => { p.auditPass = res === 'confirm' ? true : false;
}else if(valid){
p.auditPass = false;
}else {
return
}
memberUserUpdateEnterprise(p).then(r =>{
if(r.code === 0){
if(p.auditPass === 3){
this.getEnterpriseFn(); this.getEnterpriseFn();
});
} }
this.getList() this.getList()
this.$message.success('修改成功'); this.$message.success('修改成功');
} }
}) })
}
}) })
}, },
authentication(row){ authentication(row){
...@@ -608,10 +619,9 @@ export default { ...@@ -608,10 +619,9 @@ export default {
console.log(r); console.log(r);
if(r.code === 0){ if(r.code === 0){
this.$message.success('添加成功!'); this.$message.success('添加成功!');
this.enterpriseFrom.status = 3 this.enterpriseFrom.status = 2
this.enterpriseFrom.auditTime = new Date().getTime() this.enterpriseFrom.auditTime = new Date().getTime()
this.getEnterpriseFn();
} }
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment