sadjv3_jishi/pages/index/technicianLevel.vue

442 lines
11 KiB
Vue
Raw Normal View History

2024-06-26 16:58:53 +08:00
<template>
<view class="content">
<view class="nav-tab">
2024-07-02 22:25:01 +08:00
<image src="../../static/index/fanhui.png" mode="" @click="fanhui()"></image>
2024-06-26 16:58:53 +08:00
<span class="nav-title">技师等级</span>
2024-07-02 22:25:01 +08:00
<span class="nav-btn"></span>
2024-06-26 16:58:53 +08:00
</view>
<view class="mian">
<view class="header">
<view class="header-right">
<view class="header-right-top">
<span>当前周期</span>
2024-06-26 22:05:13 +08:00
<span>{{ artificerData.beginTime }}~{{ artificerData.finishTime }}</span>
2024-06-26 16:58:53 +08:00
</view>
2024-08-29 13:54:46 +08:00
2024-06-26 16:58:53 +08:00
<view class="header-right-text">
2024-08-29 13:54:46 +08:00
<!-- <view v-if="ultimately">
2024-08-23 22:30:21 +08:00
<view v-if="lastGrade">
上周期等级{{lastGrade}}
</view>
<view v-if="grade">
2024-08-26 15:26:01 +08:00
本周期到达等级{{grade}}
2024-08-23 22:30:21 +08:00
</view>
<view v-if="maxStatus==true">
已满级
</view>
<view v-else>
<view>升级到{{differenceGrade}}还差</view>
<span v-if="differenceDurationOnline">
{{differenceDurationOnline}}小时
</span>
<span v-if="differenceOutstandingAchievement">
{{differenceOutstandingAchievement}}业绩
</span>
<span v-if="differenceIntegral">
{{differenceIntegral}}积分
</span>
</view>
</view>
<view v-else>
备注: 本期等级是根据技师上个周期的业绩最终计算得出
2024-08-29 13:54:46 +08:00
</view> -->
2024-08-29 15:08:11 +08:00
<view v-if="grade" class="dengji-text">
2024-08-29 14:33:43 +08:00
本周期到达等级{{grade}}
</view>
2024-08-29 15:08:11 +08:00
<u-line-progress active-color="#9dd47a" :show-percent="false" :height="15" inactive-color="#098f7a"
2024-08-29 14:33:43 +08:00
:percent="lineProgressData" :striped-active="true"></u-line-progress>
<view v-if="!maxStatus && longUpgradeDescriptionSet.differenceOutstandingAchievement" class="dengji-text">
2024-08-29 15:08:11 +08:00
还差<span class="memo">{{ longUpgradeDescriptionSet.differenceDurationOnline }}</span>小时<span class="memo">{{ longUpgradeDescriptionSet.differenceOutstandingAchievement }}</span>业绩<span class="memo">{{ longUpgradeDescriptionSet.differenceIntegral }}</span>积分;可以升级<span class="memo">{{ longUpgradeDescriptionSet.differenceGrade }}</span>
2024-08-29 14:33:43 +08:00
</view>
<view v-if="maxStatus" class=" dengji-text">
您已达到最高等级
2024-08-23 22:30:21 +08:00
</view>
2024-06-26 16:58:53 +08:00
</view>
</view>
<view class="header-right-bottom">
2024-06-26 22:05:13 +08:00
<view class="djimg">{{ artificerData.grade }}</view>
2024-06-28 13:45:11 +08:00
<!---<view class="djimg-text">当期等级</view>-->
2024-06-26 16:58:53 +08:00
</view>
</view>
<view class="mian-view">
2024-06-26 22:05:13 +08:00
<view class="mian-list" v-for="(item, index) in ArtificerLevelList" :key="item.id">
2024-06-26 16:58:53 +08:00
<view class="mian-list-top">
2024-06-26 23:09:29 +08:00
<view>
<view class="djimg-s">{{ item.grade }}</view>
</view>
2024-06-26 16:58:53 +08:00
<view class="fencheng">
<span>分成比例 </span>
2024-06-26 22:05:13 +08:00
<span>{{ item.proportionalSharing*100 }}%</span>
2024-06-26 16:58:53 +08:00
</view>
</view>
<view class="mian-list-bottom">
<view class="mian-list-view">
2024-06-29 15:23:17 +08:00
<span>{{ item.durationOnline }}h</span>
2024-06-26 16:58:53 +08:00
<span>在线时长</span>
</view>
<view class="mian-list-view">
2024-08-23 22:30:21 +08:00
<span>{{ item.outstandingAchievement }}</span>
<span>最低业绩</span>
</view>
<!-- <view class="mian-list-view">
2024-06-26 23:09:29 +08:00
<span>{{ item.clockRate*100 }}%</span>
2024-06-26 16:58:53 +08:00
<span>加钟率</span>
2024-08-23 22:30:21 +08:00
</view> -->
2024-06-26 16:58:53 +08:00
<view class="mian-list-view">
2024-06-26 22:05:13 +08:00
<span>{{ item.integral }}</span>
2024-06-26 16:58:53 +08:00
<span>积分</span>
</view>
</view>
</view>
</view>
2024-08-23 22:30:21 +08:00
2024-06-26 16:58:53 +08:00
</view>
</view>
</template>
<script>
2024-06-26 22:05:13 +08:00
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
userId: 0,
page: 1,
limit: 10,
artificerData: {},
2024-08-23 22:30:21 +08:00
ArtificerLevelList: [],
ultimately: "",
lastGrade: "",
grade: "",
2024-08-29 14:33:43 +08:00
// maxStatus: "",
2024-08-23 22:30:21 +08:00
differenceDurationOnline: "",
differenceOutstandingAchievement: "",
differenceIntegral: "",
differenceGrade: "",
2024-08-29 14:33:43 +08:00
currentWholeIncome: null, //App首页当期总收益
totalIncomeRange: null, //App首页当前阶段收益总数
currentRealIncome: null, //App首页当期实际收益已扣除各项
currentIntegral: null, //App首页当期积分
currentOrdersNum: null, //App首页当期订单数量
currentRenewalNum: null, //App首页当期加钟率
currentRechargeNum: null, //App首页当期充值率
upgradeDescriptionStatus: false, // App首页升级描述
currentGrade: null, //App首页当前等级
lineProgressData: 0,
maxStatus: null,
longUpgradeDescriptionSet:{}
2024-06-26 22:05:13 +08:00
}
},
onLoad(e) {
2024-08-23 22:30:21 +08:00
this.ultimately = e.ultimately;
this.lastGrade = e.lastGrade;
this.grade = e.grade;
2024-08-29 14:33:43 +08:00
// this.maxStatus = e.maxStatus;
2024-08-23 22:30:21 +08:00
this.differenceDurationOnline = e.differenceDurationOnline;
this.differenceOutstandingAchievement = e.differenceOutstandingAchievement;
this.differenceIntegral = e.differenceIntegral;
this.differenceGrade = e.differenceGrade;
2024-06-26 22:05:13 +08:00
this.getArtificerLevels();
2024-08-29 14:33:43 +08:00
this.getHomeListData();
2024-06-26 22:05:13 +08:00
},
methods: {
2024-08-29 14:33:43 +08:00
//获取App首页数据
getHomeListData() {
let artificerId = uni.getStorageSync("artificerId");
console.log('artificerId------->',artificerId);
if (artificerId) {
this.$Request.getXZX("/app/artificer/integral/home/?artificerId=" + artificerId,).then((res) => {
if (res && res.data) {
this.longUpgradeDescriptionSet = {
differenceOutstandingAchievement: res?.data?.differenceOutstandingAchievement,
differenceIntegral: res?.data?.differenceIntegral,
differenceClockRate: res?.data?.differenceClockRate + "%",
differenceDurationOnline: res?.data?.differenceDurationOnline,
currentLevel: res?.data?.currentLevel,
differenceGrade: res?.data?.differenceGrade,
};
this.upgradeDescriptionStatus = res?.data?.ultimately;
this.currentGrade = res?.data?.lastGrade;
uni.setStorageSync("currentRealIncome", res?.data?.earnings);
this.totalIncomeRange = res?.data?.suffix;
if (this.currentWholeIncome < 4000) {
this.totalIncomeRange = 4000;
} else if (this.currentWholeIncome < 6000 && this.currentWholeIncome > 4000) {
this.totalIncomeRange = 6000;
} else if (this.currentWholeIncome < 8000 && this.currentWholeIncome > 6000) {
this.totalIncomeRange = 8000;
} else if (this.currentWholeIncome < 10000 && this.currentWholeIncome > 8000) {
this.totalIncomeRange = 10000;
} else {
this.totalIncomeRange = 4000;
}
this.currentWholeIncome = 2000;
this.lineProgressData = this.currentWholeIncome / this.totalIncomeRange * 100;
}
})
}
},
2024-07-02 22:25:01 +08:00
fanhui(){
uni.switchTab({
url:'/pages/index/index'
})
},
2024-06-26 22:05:13 +08:00
getArtificerLevels() {
let artificerId = uni.getStorageSync("artificerId");
let data = {
page: 1,
limit: 100,
artificerId: artificerId
}
this.$Request.get("/app/artificer/integral/getArtificerLevels",data).then((res) => {
if (res && res.code === 0) {
this.artificerData = res.artificerData;
this.ArtificerLevelList = res.levelData.records;
}
})
}
}
}
2024-06-26 16:58:53 +08:00
</script>
<style scoped>
.djimg-s{
position: absolute;
top: 0;
background: url(../../static/images/index/vip.png) no-repeat center;
background-size: cover;
2024-06-28 13:45:11 +08:00
width: 96.39rpx;
height:74rpx;
2024-06-26 16:58:53 +08:00
text-align: center;
2024-06-29 15:23:17 +08:00
line-height: 43px;
2024-06-26 16:58:53 +08:00
font-weight: bold;
2024-06-28 13:45:11 +08:00
font-size: 23rpx;
2024-06-26 16:58:53 +08:00
color: #FFFFFF;
}
.mian-list-view span:nth-child(1){
2024-06-29 15:23:17 +08:00
font-size: 40rpx;
2024-06-28 13:45:11 +08:00
color: #019c88;
font-weight: bold;
2024-06-26 16:58:53 +08:00
}
.mian-list-view span:nth-child(2){
2024-06-29 15:23:17 +08:00
font-size: 24rpx;
2024-06-28 13:45:11 +08:00
color: #333;
margin-top: 2px;
2024-06-26 16:58:53 +08:00
}
.mian-list-view{
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.mian-list-bottom{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
2024-06-29 15:23:17 +08:00
margin-top: 40rpx;
2024-06-26 16:58:53 +08:00
}
.fencheng span{
2024-06-29 15:23:17 +08:00
font-size: 25rpx;
2024-06-26 16:58:53 +08:00
}
.fencheng span:nth-child(1){
color: #333333;
}
.fencheng span:nth-child(2){
color: #FE912A;
margin-top: 2px;
margin-left: 5px;
2024-06-28 13:45:11 +08:00
font-weight: bold;
2024-06-26 16:58:53 +08:00
}
.fencheng{
display: flex;
flex-direction: row;
align-items: center;
}
.xinren{
font-weight: bold;
font-size: 23rpx;
color: #333333;
}
.mian-list-top{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
2024-08-23 22:30:21 +08:00
2024-06-26 16:58:53 +08:00
}
.mian-list{
width: 100%;
background: #F7F7F7;
border-radius: 14rpx;
display: flex;
flex-direction: column;
2024-06-28 13:45:11 +08:00
padding: 15px;
2024-06-26 16:58:53 +08:00
margin-bottom: 10px;
position: relative;
}
.mian-view{
2024-08-29 15:08:11 +08:00
width:100%;
2024-06-26 16:58:53 +08:00
display: flex;
flex-direction: column;
position: absolute;
top: 0;
2024-08-29 15:08:11 +08:00
margin-top: 140px;
background: #fff;
2024-06-26 16:58:53 +08:00
}
.djimg-text{
font-size: 23rpx;
color: #FFFFFF;
2024-08-23 22:30:21 +08:00
2024-06-26 16:58:53 +08:00
}
2024-08-23 22:30:21 +08:00
2024-06-26 16:58:53 +08:00
.djimg {
position: absolute;
right: 20px;
top: 0;
background: url(../../static/images/index/vip.png) no-repeat center;
2024-09-03 14:15:49 +08:00
background-size:100%;
2024-06-26 16:58:53 +08:00
width: 198rpx;
2024-09-03 14:15:49 +08:00
height: 70px;
2024-06-26 16:58:53 +08:00
text-align: center;
2024-09-03 14:15:49 +08:00
line-height: 82px;
2024-06-26 16:58:53 +08:00
font-weight: normal;
2024-06-28 13:45:11 +08:00
font-size: 40rpx;
2024-06-26 16:58:53 +08:00
color: #FEFEFE;
font-style: italic;
2024-06-28 13:45:11 +08:00
font-weight: bold;
2024-06-26 16:58:53 +08:00
}
.header-right-bottom{
width: 30%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
2024-06-28 13:45:11 +08:00
margin-top: 20px;
margin-right: 6px;
2024-06-26 16:58:53 +08:00
}
.header-right-text{
2024-08-29 15:08:11 +08:00
width: 100%;
2024-08-29 14:33:43 +08:00
margin-top: 25px;
2024-08-23 22:30:21 +08:00
font-size: 26rpx;
2024-06-26 16:58:53 +08:00
color: #FFFFFF;
}
.header-right-top span:nth-child(1){
2024-06-29 15:23:17 +08:00
width: 126rpx;
2024-06-26 16:58:53 +08:00
height: 34rpx;
text-align: center;
2024-06-29 15:23:17 +08:00
line-height: 36rpx;
2024-06-28 13:45:11 +08:00
font-size: 24rpx;
2024-06-26 16:58:53 +08:00
color: #843200;
background: linear-gradient(-36deg, #FFE45A, #FFBB46);
border-radius: 15rpx 0rpx 15rpx 0rpx;
}
.header-right-top span:nth-child(2){
2024-06-29 15:23:17 +08:00
font-size: 24rpx;
2024-06-26 16:58:53 +08:00
color: #FFF5BC;
margin-left: 5px;
}
.header-right-top{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
2024-06-29 15:23:17 +08:00
margin-top: 16px;
2024-06-26 16:58:53 +08:00
}
.header-right{
2024-08-23 22:30:21 +08:00
width: 100%;
2024-06-26 16:58:53 +08:00
display: flex;
flex-direction: column;
align-items: center;
}
2024-08-23 22:30:21 +08:00
2024-06-26 16:58:53 +08:00
.header{
width: 100%;
2024-06-29 15:23:17 +08:00
padding: 13px 20px;
2024-06-26 16:58:53 +08:00
height: 263rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
background: linear-gradient(-90deg, #019C88, #1BB9A5, #029D88);
border-top-left-radius: 56rpx;
border-top-right-radius: 56rpx;
position: relative;
}
.mian{
width: 95%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: #fff;
border-radius: 56rpx;
position: relative;
}
.nav-btn{
display: inline-block;
width: 49rpx;
height: 24rpx;
}
.nav-title{
font-weight: bold;
font-size: 38rpx;
color: #17181C;
}
.nav-tab image{
width: 15.42rpx;
height: 27.64rpx;
}
.nav-tab{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
2024-07-04 23:07:07 +08:00
padding: 30px 10px 10px 10px;
2024-06-26 16:58:53 +08:00
}
.content{
width: 100%;
2024-08-29 15:08:11 +08:00
/* height: 100vh;
background:#f7f7f7;*/
2024-06-26 16:58:53 +08:00
background-repeat: no-repeat;
background-size: 100%;
display: flex;
flex-direction: column;
align-items: center;
2024-08-29 15:08:11 +08:00
}
2024-07-01 23:07:29 +08:00
.be-remarks{
border: 1px dashed #FE912E;
padding: 10rpx 20rpx;
border-radius: 8rpx;
color: #fe912E;
font-size: 24rpx;
}
2024-08-29 13:54:46 +08:00
.progress-bar{
margin-top:40rpx;
width: 130%;
}
.u-demo-block__content {
flex-direction: column !important;
flex-wrap: nowrap;
align-items: stretch;
width: 100%;
}
.memo{
2024-08-29 15:08:11 +08:00
font-size: 24rpx;
color: #ffe35d;
padding: 0 6rpx;
}
.dengji-text{
2024-08-29 13:54:46 +08:00
font-size: 22rpx;
2024-08-29 15:08:11 +08:00
2024-08-29 13:54:46 +08:00
}
2024-08-23 22:30:21 +08:00
</style>