精选品牌分类,技能审核中修复

This commit is contained in:
丁杰 2026-06-15 16:01:57 +08:00
parent d01b04bce0
commit 7a071227e7
3 changed files with 113 additions and 31 deletions

View File

@ -70,12 +70,11 @@
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
mode="widthFix" mode="widthFix"
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;" style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
v-if="!userInfo.servers_kill_arr || userInfo.servers_kill_arr.length === 0"> v-if="shouldShowServiceSkillWarningIcon()">
</image> </image>
<text style="margin-right: 16rpx;" <text style="margin-right: 16rpx;"
:style="{ color: (userInfo.servers_kill_arr && userInfo.servers_kill_arr.length > 0) ? '#c9c9c9' : '#ec5d57' }"> :style="{ color: serviceSkillStatusColor() }">
{{ (userInfo.servers_kill_arr && userInfo.servers_kill_arr.length > 0) ? '已设置' : {{ serviceSkillStatusText() }}
'待完善' }}
</text> </text>
<image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit"> <image class="arrow-right" src="/static/images/arrow_right.png" mode="aspectFit">
</image> </image>
@ -162,7 +161,7 @@
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/338d957b-cbb6-409b-9e7a-ef5faa0f9b70.png"
mode="widthFix" mode="widthFix"
style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;" style="width:26rpx;margin-top: 26rpx;position: relative;top: 4rpx;left: -10rpx;"
v-if="userInfo.credentials_state === 0 || userInfo.id_type < 0 || qualificationAuditStatus == 3"> v-if="shouldShowQualificationWarningIcon()">
</image> </image>
<text style="margin-right: 16rpx;" <text style="margin-right: 16rpx;"
:style="{ color: qualificationStatusColor() }"> :style="{ color: qualificationStatusColor() }">
@ -202,6 +201,8 @@ export default {
currentUserId: '', // ID currentUserId: '', // ID
userInfo: {}, // userInfo: {}, //
authDetails: null, authDetails: null,
serviceSkillAuditStatus: null,
isServiceSkillAuditLoaded: false,
qualificationAuditStatus: null, qualificationAuditStatus: null,
isQualificationAuditLoaded: false, isQualificationAuditLoaded: false,
sharing: false // sharing: false //
@ -497,6 +498,7 @@ export default {
if (result.data && result.data.id) { if (result.data && result.data.id) {
this.userInfo = result.data this.userInfo = result.data
this.currentUserId = result.data.id this.currentUserId = result.data.id
this.fetchServiceSkillApplyDetails()
this.fetchQualificationApplyDetails() this.fetchQualificationApplyDetails()
if (this.isSettled()) { if (this.isSettled()) {
this.fetchAuthDetails() this.fetchAuthDetails()
@ -567,13 +569,34 @@ export default {
}); });
}, },
fetchServiceSkillApplyDetails() {
this.isServiceSkillAuditLoaded = false;
return request.post('/sj/userSjAuth/details', {
apply_type: 2
}).then(res => {
if ((res.code == 200 || res.state == 1) && res.data) {
const status = Number(res.data.apply_state);
this.serviceSkillAuditStatus = Number.isNaN(status) ? null : status;
} else {
this.serviceSkillAuditStatus = null;
}
this.isServiceSkillAuditLoaded = true;
return res;
}).catch(error => {
console.log('获取服务技能申请详情失败:', error);
this.serviceSkillAuditStatus = null;
this.isServiceSkillAuditLoaded = true;
});
},
fetchQualificationApplyDetails() { fetchQualificationApplyDetails() {
this.isQualificationAuditLoaded = false; this.isQualificationAuditLoaded = false;
return request.post('/sj/userSjAuth/details', { return request.post('/sj/userSjAuth/details', {
apply_type: 4 apply_type: 4
}).then(res => { }).then(res => {
if ((res.code == 200 || res.state == 1) && res.data) { if ((res.code == 200 || res.state == 1) && res.data) {
this.qualificationAuditStatus = Number(res.data.apply_state); const statusCheck = this.getQualificationApplyStatus(res.data);
this.qualificationAuditStatus = statusCheck.isValid ? statusCheck.status : null;
} else { } else {
this.qualificationAuditStatus = null; this.qualificationAuditStatus = null;
} }
@ -604,6 +627,27 @@ export default {
} }
await this.fetchAuthDetails(); await this.fetchAuthDetails();
}, },
getQualificationApplyStatus(detail) {
const status = Number(detail.apply_state);
if (Number.isNaN(status)) {
return {
isValid: false,
status: null
};
}
if (status === 2) {
return {
isValid: true,
status
};
}
return {
isValid: true,
status
};
},
loadIdentity() { loadIdentity() {
// //
@ -716,19 +760,49 @@ export default {
url: '/pages/artisan/belong_shop' url: '/pages/artisan/belong_shop'
}) })
}, },
hasServiceSkills() {
return this.userInfo.servers_kill_arr && this.userInfo.servers_kill_arr.length > 0;
},
serviceSkillStatusText() {
if (this.serviceSkillAuditStatus === 1) return '审核中';
if (this.serviceSkillAuditStatus === 3) return '审核未通过';
return this.hasServiceSkills() ? '已设置' : '待完善';
},
serviceSkillStatusColor() {
const statusText = this.serviceSkillStatusText();
if (statusText === '审核未通过' || statusText === '待完善') return '#ec5d57';
if (statusText === '审核中') return '#e59e45';
return '#c9c9c9';
},
shouldShowServiceSkillWarningIcon() {
const statusText = this.serviceSkillStatusText();
return statusText === '审核未通过' || statusText === '待完善';
},
getCredentialsState() {
const state = Number(this.userInfo.credentials_state);
return Number.isNaN(state) ? null : state;
},
qualificationStatusText() { qualificationStatusText() {
if (this.qualificationAuditStatus == 3) return '审核未通过';
if (this.userInfo.id_type < 0) return '审核未通过';
if (this.qualificationAuditStatus == 1) return '审核中';
if (!this.isQualificationAuditLoaded) return ''; if (!this.isQualificationAuditLoaded) return '';
if (this.userInfo.credentials_state === 0) return '待完善'; if (this.qualificationAuditStatus === 1) return '审核中';
if (this.userInfo.credentials_state === 1) return '审核中'; if (this.qualificationAuditStatus === 2) return '已认证';
if (this.qualificationAuditStatus === 3) return '审核未通过';
const credentialsState = this.getCredentialsState();
if (credentialsState === 0) return '待完善';
if (credentialsState === 1) return '审核中';
if (this.userInfo.id_type < 0) return '审核未通过';
return '已认证'; return '已认证';
}, },
qualificationStatusColor() { qualificationStatusColor() {
if (this.qualificationAuditStatus == 3 || this.userInfo.id_type < 0 || this.userInfo.credentials_state === 0) return '#ec5d57'; const statusText = this.qualificationStatusText();
if (this.qualificationAuditStatus == 1 || this.userInfo.credentials_state === 1) return '#e59e45'; if (statusText === '审核未通过' || statusText === '待完善') return '#ec5d57';
if (statusText === '审核中') return '#e59e45';
return '#389930'; return '#389930';
},
shouldShowQualificationWarningIcon() {
const statusText = this.qualificationStatusText();
return statusText === '审核未通过' || statusText === '待完善';
} }
} }
} }

View File

@ -206,6 +206,7 @@ export default {
if (this.activeId === id) return; if (this.activeId === id) return;
this.activeId = id; this.activeId = id;
this.currentSecondClass = ""; this.currentSecondClass = "";
this.selectedSecondIds = [];
this.getSecondClassList(); this.getSecondClassList();
this.refreshBrandList(); this.refreshBrandList();
}, },
@ -229,6 +230,12 @@ export default {
}); });
if (this.$refs.brandListRef) { if (this.$refs.brandListRef) {
// CommonList queryData
['first_class', 'second_class', 'order_type'].forEach(key => {
if (!Object.prototype.hasOwnProperty.call(params, key) && this.$refs.brandListRef.queryData) {
this.$delete(this.$refs.brandListRef.queryData, key);
}
});
this.$refs.brandListRef.manualRefresh(params); this.$refs.brandListRef.manualRefresh(params);
} }
}, },

View File

@ -149,13 +149,10 @@ export default {
}, },
// //
shouldShowRejectReason() { shouldShowRejectReason() {
// //
return this.auditStatus === 3 && return Number(this.auditStatus) === 3 &&
!this.showPendingSkills && !this.showPendingSkills &&
!this.hasChanges &&
this.backText; this.backText;
//
!this.hasPendingApply();
}, },
// //
hasPendingApply() { hasPendingApply() {
@ -163,9 +160,12 @@ export default {
// //
return true; return true;
}, },
// / // /
isChangeUnderReview() { isChangeUnderReview() {
return this.auditStatus === 1 || this.showAuditTip || this.buttonType === 'view'; return Number(this.auditStatus) === 1 ||
Number(this.auditStatus) === 3 ||
this.showAuditTip ||
this.buttonType === 'view';
} }
}, },
async onLoad() { async onLoad() {
@ -311,7 +311,8 @@ export default {
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
const detail = res.data; const detail = res.data;
this.applyId = detail.id; this.applyId = detail.id;
this.auditStatus = detail.apply_state; const auditStatus = Number(detail.apply_state);
this.auditStatus = Number.isNaN(auditStatus) ? null : auditStatus;
this.backText = detail.back_text || ''; // this.backText = detail.back_text || ''; //
console.log('审核状态:', this.auditStatus); console.log('审核状态:', this.auditStatus);