精选品牌分类,技能审核中修复
This commit is contained in:
parent
d01b04bce0
commit
7a071227e7
|
|
@ -66,20 +66,19 @@
|
||||||
<text class="item-label">服务技能</text>
|
<text class="item-label">服务技能</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<image
|
<image
|
||||||
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>
|
</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 门店信息 -->
|
<!-- 门店信息 -->
|
||||||
|
|
@ -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 === '待完善';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue