Commit 631ae8d8 by 前端

收入

1 parent 4b3bb5df
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-08 15:20:30
* @LastEditTime: 2025-01-13 11:09:59
* @FilePath: \gl-tape\api\module\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -59,5 +59,86 @@ module.exports = {
projectName: 'boutique',
...data
})
},
badgeList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.month.badge.list',
projectName: 'boutique',
...data
})
},
incomeMeasurementConfig(data) {
return http.post({
method: 'dj.smartcarlife.api.incomeMeasurement.switch.config.search',
projectName: 'boutique',
...data
})
},
/**员工收入测算获取员工信息 */
incomeCalculation(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.staffInfo',
projectName: 'boutique',
...data
})
},
/**获取员工绩效测算详情 */
incomeCalculationDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.detail',
projectName: 'boutique',
...data
})
},
/**分页查询员工月度工资统计列表 */
pageStat(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.monthSalary.pageStat',
projectName: 'boutique',
...data
})
},
/**获取员工(测算/历史)月度工资明细 */
monthSalaryDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.monthSalary.detail',
projectName: 'boutique',
...data
})
},
/**获取试算门店工资绩效配置详细 */
getLatestConfigDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.getLatestConfigDetail',
projectName: 'boutique',
...data
})
},
/**员工工资试算*/
monthSalaryCalculation(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.incomeCalculation.monthSalaryCalculation',
projectName: 'boutique',
...data
})
},
/**员工考勤日历 */
calendarDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.clock.in.staff.calendar',
projectName: 'boutique',
...data
})
},
/**查询员工提示信息 */
getTipsMessage(data) {
return http.post({
method: 'dj.api.smartcarlife.staff.tipsMessage.list',
projectName: 'boutique',
...data
})
}
}

7.51 MB | W: | H:

7.66 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

28.9 KB | W: | H:

30.6 KB | W: | H:

assets/spritesmith/point-active.png
assets/spritesmith/point-active.png
assets/spritesmith/point-active.png
assets/spritesmith/point-active.png
  • 2-up
  • Swipe
  • Onion skin

6.17 KB | W: | H:

6.84 KB | W: | H:

assets/spritesmith/point.png
assets/spritesmith/point.png
assets/spritesmith/point.png
assets/spritesmith/point.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -20,8 +20,8 @@
<view class="calendar-date" v-for="(date, index) in dates" :key="index">
<template v-if="date">
<view class="date-num">{{ date }}</view>
<!-- <view class="date-desc">出勤</view> -->
<view class="date-desc date-card">未打卡</view>
<view class="date-desc" v-if="isClock(date) == 2">出勤</view>
<view class="date-desc date-card" v-if="isClock(date) == 1">未打卡</view>
</template>
</view>
</view>
......@@ -51,6 +51,7 @@ export default {
// 当前所处日期 年月日
nowDate: '7',
datesd: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31],
clockInDateList: [],
// 当前所处年
year: new Date().getFullYear(),
// 当前所处月
......@@ -62,7 +63,6 @@ export default {
computed: {
dates() {
const firstDayOfMonth = new Date(this.year, this.month - 1, 1)
const lastDayOfMonth = new Date(this.year, this.month, 0)
const dates = []
for (let i = 0, len = this.datesd.length; i < len; i++) {
dates.push(this.datesd[i])
......@@ -81,63 +81,19 @@ export default {
return dates
}
},
watch: {
// month: {
// handler() {
// // 日期格式化获取当前月份
// const todayMonth = uni.$jy.formatDate(new Date(), 'M')
// // 日期格式化获取当前年
// const y = uni.$jy.formatDate(new Date(), 'YYYY')
// if (Number(todayMonth) == 12) {
// if (this.year > Number(y)) {
// this.showNextMonth = false
// return
// }
// }
// if (Number(y) < this.year) {
// this.showNextMonth = true
// return
// }
// if (Number(y) == this.year) {
// if (this.month < Number(todayMonth)) {
// this.showNextMonth = true
// return
// }
// let a = Math.abs(this.month - Number(todayMonth))
// if (a == 1) {
// this.showNextMonth = false
// return
// }
// }
// this.showNextMonth = true
// return
// }
// }
},
methods: {
/* 上个月 */
prevMonth() {
if (this.month === 1) {
this.year -= 1
this.month = 12
} else {
this.month -= 1
isClock(day) {
if (this.day < day) {
return
}
let callMonth = this.month >= 10 ? String(this.month) : '0' + String(this.month)
let callBackDate = String(this.year) + '-' + callMonth
this.$emit('prev', callBackDate)
const clock = this.clockInDateList.find(i => i.day == day)
return clock.isClock
},
/* 下个月 */
nextMonth() {
if (this.month === 12) {
this.year += 1
this.month = 1
} else {
this.month += 1
}
let callMonth = this.month >= 10 ? String(this.month) : '0' + String(this.month)
let callBackDate = String(this.year) + '-' + callMonth
this.$emit('next', callBackDate)
getDetail() {
const { phone: staffPhone } = uni.$storage.get('userInfo')
uni.$api.pointApi.calendarDetail({ staffPhone }).then(res => {
this.clockInDateList = res.clockInDateList || []
})
},
/** 回显每日日期文本
* @param {Object} date
......@@ -147,10 +103,6 @@ export default {
return '今天'
}
// return uni.$jy.formatDate(date, 'D')
},
/* 每日点击事件 */
itemHandle(item) {
this.$emit('item-cilck', item)
}
}
}
......
<template>
<Dailog @close="close" v-if="show" width="1288rpx" :title="detail.label" :icon="detail.icon">
<view class="dailog-body" slot="content">
<view class="table-container">
<table class="table-box">
<tr class="th">
<th v-for="(item, index) in tabelTh" :key="index" :style="{ width: item.width + '%' }">{{ item.title }}</th>
</tr>
<tr class="tr" v-for="(item, index) in detail.recordList" :key="index">
<td>{{ index + 1 }}</td>
<td v-for="(colValue, colKey) in tabelTr" :key="colKey">
{{ item[colValue] }}
</td>
</tr>
</table>
</view>
<view class="table-footer flex">
<text>{{ detail.label }}合计:</text>
<text class="price">¥ {{ detail.total }}</text>
</view>
</view>
</Dailog>
</template>
<script>
import Dailog from './Dailog'
export default {
props: {
detail: {
type: Object,
default: () => {}
},
show: {
type: Boolean,
default: false
},
tabelTh: {
type: Array,
default: () => []
},
tabelTr: {
type: Array,
default: () => []
}
},
components: {
Dailog
},
data() {
return {}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style scoped lang="scss">
.table-container {
max-height: 50vh;
overflow: auto;
}
.table-box {
width: 100%;
padding: 0 64rpx;
border-collapse: separate;
/* 防止边框合并 */
border-spacing: 0;
border: none;
.th {
position: sticky;
top: 0;
}
/* 单元格之间没有间距 */
tr {
border: none;
text-align: center;
&.line {
td {
border-top: 16rpx solid rgba($color: #fff, $alpha: 0.9);
}
}
th {
border: 4rpx solid #fff;
/* 所有单元格都有边框 */
border-top: none;
/* 除了首行外,所有行的上方无边框 */
background: #edf2ff;
height: 88rpx;
font-size: 26rpx;
box-sizing: border-box;
color: #333333;
&:first-child {
border-left: none;
border-radius: 16rpx 0 0 16rpx;
}
&:last-child {
border-radius: 0 16rpx 16rpx 0;
text-align: right;
padding-right: 48rpx;
}
}
td {
border: 4rpx solid #fff;
/* 所有单元格都有边框 */
border-top: none;
/* 除了首行外,所有行的上方无边框 */
background: #f7f8fa;
height: 88rpx;
font-size: 26rpx;
color: #333333;
text-align: center;
box-sizing: border-box;
&:last-child {
text-align: right;
padding-right: 48rpx;
}
text {
color: #c8c8cc;
}
&.line {
border-bottom: 16rpx solid #fff;
}
&:first-child {
border-left: none;
}
&:last-child {
border-right: none;
}
}
}
}
.table-footer {
margin: 0 64rpx;
height: 88rpx;
padding: 0 48rpx;
background: #edf3ff;
border-radius: 0 0 16rpx 16rpx;
font-size: 26rpx;
color: #333333;
font-weight: 600;
.price {
margin-left: auto;
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-08 10:44:53
* @LastEditTime: 2025-01-13 10:56:02
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -17,7 +17,7 @@
<view class="history-box">
<view class="chart-box">
<view class="chart-header">
<text class="year-text">2025年</text>
<text class="year-text">{{ year }}年</text>
<view class="sprite-icon icon-tips-g"></view>
<text>点击柱形图切换月份</text>
</view>
......@@ -27,54 +27,52 @@
</view>
<view class="income-box">
<view class="income-header">
<text>2024年8月收入</text>
<text>{{ year }}年8月收入</text>
</view>
<view class="income-tips">
<view class="sprite-icon icon-tips-b"></view>
<text>以下未包括 个人所得税、社保等事项</text>
</view>
<view class="income-list">
<view class="income-item" v-for="(item, index) in caseList" :key="index">
<view class="item-label" @click="handleShow(item)">{{ item.title }}</view>
<uni-icons type="help" size="18" color="#A2A2A8"></uni-icons>
<view class="item-price">{{ item.price }}</view>
<view class="item-expand"></view>
<view class="income-item" v-for="(item, index) in IncomeList" :key="index">
<view class="item-label" @click="handleShow(item)">{{ item.label }}</view>
<uni-icons type="help" size="18" color="#A2A2A8" @click="clickTips(item)"></uni-icons>
<view class="item-price">{{ salaryDetail[item.value] || 0 }}</view>
<view class="item-expand" @click="showDetail(item)" v-if="salaryDetail[item.value] && item.tabelTh"></view>
</view>
</view>
<view class="income-footer">
<view class="footer-label">当月收入</view>
<view class="footer-price">
<text>¥</text>
23,746.60
{{ salaryDetail.correctSalary }}
</view>
</view>
</view>
</view>
<Tips @close="show = false" v-if="show">
<view class="dailog-body" slot="content">
<view class="dailog-content">6</view>
<view class="dailog-desc">6</view>
</view>
<template slot="footer">
<view class="dailog-footer">
<view class="dailog-btn">再测一次</view>
<view class="dailog-btn disabled">关闭</view>
</view>
</template>
</Tips>
<Detail @close="show = false" :show="show" :detail="detail" :tabelTh="detail.tabelTh" :tabelTr="detail.tabelTr"></Detail>
<Question @close="tipsShow = false" :show="tipsShow" :detail="tipsDetail"></Question>
</view>
</template>
<script>
import Tips from './Dailog.vue'
import Detail from './Detail'
import point from '@/mixin/point'
import Question from './Question.vue'
export default {
mixins: [point],
components: {
Tips
Detail,
Question
},
data() {
return {
title: '学习数据',
show: false,
tipsShow: false,
tipsDetail: {},
salaryDetail: {},
detail: {},
canvasList: [
{ date: '1月', num: 0 },
{ date: '2月', num: 24 },
......@@ -82,53 +80,18 @@ export default {
{ date: '4月', num: 45 },
{ date: '5月', num: 15 },
{ date: '6月', num: 54 },
{ date: '7月', num: 10 },
{ date: '8月', num: 10 },
{ date: '9月', num: 10 },
{ date: '10月', num: 10 },
{ date: '11月', num: 10 },
{ date: '12月', num: 10 }
],
caseList: [
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
},
{
title: '基本工资',
price: 100
}
{ date: '7月', num: 0 },
{ date: '8月', num: 0 },
{ date: '9月', num: 0 },
{ date: '10月', num: 0 },
{ date: '11月', num: 0 },
{ date: '12月', num: 0 }
],
width: 600,
height: 420,
canPersent: [], //百分比数组
listIndex: 0,
navList: ['最近七天', '最近七个月']
listIndex: 0
}
},
mounted() {
......@@ -138,21 +101,102 @@ export default {
.boundingClientRect(data => {
this.width = data.width
this.height = data.height - 60
this.showChart()
// this.showChart()
})
.exec()
},
methods: {
handleShow(item) {
this.selectItem = item
getDetail(date) {
uni.$api.pointApi.pageStat({ salaryMonthBegin: `${this.year - 1}-1`, salaryMonthEnd: `${this.year - 1}-12` }).then(res => {
const list = res.list || []
const canvasList = []
for (let i = 0; i < 12; i++) {
const num = list.find(item => {
const m = item.salaryMonth.replace(/\d+-/, '')
return m - 1 == i
})
canvasList.push({
date: `${i + 1}月`,
num: 0
})
if (num) {
canvasList[i].num = num.correctSalary
}
}
this.canvasList = canvasList
this.showChart()
})
this.monthSalaryDetail(date)
},
/**
* 个人月薪资明细
* @param {String} salaryMonth - 月份,格式为:YYYY-MM
* @return {Promise}
*/
monthSalaryDetail(salaryMonth) {
uni.$api.pointApi.monthSalaryDetail({ salaryMonth }).then(res => {
this.salaryDetail = res
})
},
/**
* 点击tips
* @param {Object} item - 点击的tips对象
*/
clickTips(item) {
this.tipsDetail = item
this.tipsShow = true
},
/**
* 显示薪资明细
* @param {Object} item - 点击的月份对象
*/
showDetail(item) {
console.log(this.salaryDetail)
const total = this.salaryDetail[item.value]
const recordList = this.salaryDetail[item.recordKey]
this.detail = { ...item, total, recordList }
console.log(this.detail, 'detail')
this.show = true
},
back() {},
/**
* 点击柱状图时的回调函数
* @param {Object} e - 点击事件对象
*/
handleCanvasClick(e) {
// 获取点击位置
const touchX = e.touches[0].x
const touchY = e.touches[0].y
// 计算柱状图之间的间隔
const gap = this.width / this.canPersent.length
// 判断点击的是哪个柱形图
for (let i = 0; i < this.canPersent.length; i++) {
const startX = 10 + gap * i
const endX = startX + 40 // 柱形图的宽度假设为10
const startY = 0
// const startY = this.height - this.canPersent[i] - 6;
const endY = this.height - 6
// 判断点击位置是否在柱形图内
if (touchX >= startX && touchX <= endX && touchY >= startY && touchY <= endY) {
// 点击了第 i 个柱形图
console.log(`点击了 ${this.canvasList[i].date} 的柱形图`)
// 在这里可以添加切换月份或显示详细信息的逻辑
if (this.canvasList[i].num) {
this.showChart(i) // 重新绘制图表,如果需要更新显示
const month = this.canvasList[i].date.replace(/\D+/, '')
this.monthSalaryDetail(this.year + '-' + month)
}
break
}
}
},
// 坐标图
showChart() {
showChart(index) {
const ctx = uni.createCanvasContext('DataCanvas')
ctx.lineWidth = 1
// 横坐标
......@@ -192,18 +236,22 @@ export default {
console.log('--gap----->', gap)
for (var i = 0; i < this.canPersent.length; i++) {
console.log(this.canvasList[i], 'this.canvasList[i]')
// 横坐标的数据
ctx.fillText(this.canvasList[i].date, 30 + gap * i, this.height + 10)
if (this.canvasList[i].num == 0) {
continue
}
// 柱状图上的数据
this.canvasList[i].num && ctx.fillText(this.canvasList[i].num, 33 + gap * i, this.height - this.canPersent[i] - 15)
ctx.fillText(this.canvasList[i].num, 33 + gap * i, this.height - this.canPersent[i] - 15)
if (this.canPersent[i] == 0) {
i++
ctx.fillText(this.canvasList[i].date, 30 + gap * i, this.height + 10)
this.canvasList[i].num && ctx.fillText(this.canvasList[i].num, 33 + gap * i, this.height - this.canPersent[i] - 15)
}
// if (this.canPersent[i] == 0) {
// i++
// ctx.fillText(this.canvasList[i].date, 30 + gap * i, this.height + 10)
// this.canvasList[i].num && ctx.fillText(this.canvasList[i].num, 33 + gap * i, this.height - this.canPersent[i] - 15)
// }
ctx.beginPath()
ctx.setStrokeStyle(i == 1 ? 'rgba(44, 102, 247, 1)' : 'rgba(44, 102, 247, 0.2)') //设置柱状图颜色
ctx.setStrokeStyle(i == index ? 'rgba(44, 102, 247, 1)' : 'rgba(44, 102, 247, 0.2)') //设置柱状图颜色
ctx.moveTo(40 + gap * i, this.height - this.canPersent[i] - 6)
ctx.lineTo(40 + gap * i, this.height - 6)
ctx.lineWidth = 10
......@@ -328,9 +376,9 @@ export default {
margin-left: 24rpx;
width: 0;
height: 0;
border-left: 14rpx solid transparent;
border-right: 14rpx solid transparent;
border-top: 14rpx solid #808291; /* 箭头颜色 */
border-left: 10rpx solid #808291;
border-bottom: 10rpx solid transparent;
border-top: 10rpx solid transparent; /* 箭头颜色 */
}
}
}
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-10 14:54:29
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-10 15:15:36
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Promotion.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="calendar-container">
<view class="nav-bar">
......@@ -11,7 +19,9 @@
</template>
<script>
import point from '@/mixin/point'
export default {
mixins: [point],
data() {
return {}
},
......
<template>
<Tips @close="close" v-if="show" width="1288rpx" :title="detail.label">
<view class="dailog-body" slot="content">
<view class="dailog-content">{{ detail.content }}</view>
<view class="dailog-content" v-if="detail.subContent">{{ detail.subContent }}</view>
<view class="dailog-warn" v-if="detail.warnList">
<view class="warn-label">注:</view>
<view>
<view v-for="(item, index) in detail.warnList" :key="index" :style="item.style">{{ item.message }}</view>
</view>
</view>
<template v-if="detail.base">
<view class="base-line">
<view class="base-label">职级工资</view>
<view class="base-times">(初级销售)</view>
<view class="base-value">3,500</view>
</view>
<view class="base-line">
<view class="base-label">应出勤天数</view>
<view class="base-times">(本月31-4)</view>
<view class="base-value">27天</view>
</view>
<view class="base-line">
<view class="base-label">实际出勤天数</view>
<view class="base-times">(截至2025-1-6)</view>
<view class="base-value">22天</view>
</view>
</template>
<view class="dailog-desc" v-if="detail.desc">{{ detail.desc }}</view>
</view>
</Tips>
</template>
<script>
import Tips from './Tips'
export default {
props: {
detail: {
type: Object,
default: () => {}
},
show: {
type: Boolean,
default: false
}
},
components: {
Tips
},
data() {
return {}
},
methods: {
close() {
this.$emit('close')
}
}
}
</script>
<style scoped lang="scss">
.dailog-body {
padding: 0 152rpx;
.dailog-content {
font-size: 32rpx;
color: #1a1a1a;
line-height: 52rpx;
margin-bottom: 32rpx;
}
.dailog-warn {
display: flex;
.warn-label {
font-size: 28rpx;
color: #808291;
}
}
.dailog-desc {
font-size: 32rpx;
color: #808291;
line-height: 52rpx;
margin-top: 32rpx;
}
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 10:31:49
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-10 13:47:22
* @LastEditTime: 2025-01-10 17:47:07
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Dailog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -67,7 +67,7 @@ export default {
font-size: 40rpx;
color: #1a1a1a;
font-weight: 600;
margin-top: -4rpx;
margin-top: -10rpx;
}
.enlarge {
transform: scale(1.5);
......
<template>
<view class="income-container">
<view class="income-header">
<view class="level-box">
<view class="sprite-icon icon-zj-icon"></view>
<view class="level-label">职级</view>
<view class="level-desc">初级驻店</view>
<view class="sprite-icon icon-js-icon"></view>
<view class="income-container" @click="handleTouch">
<template v-if="isShow">
<view class="income-header">
<view class="level-box" @click="jump('Promotion')">
<view class="sprite-icon icon-zj-icon"></view>
<view class="level-label">职级</view>
<view class="level-desc">初级驻店</view>
<view class="sprite-icon icon-js-icon"></view>
</view>
<view class="time-box" @click="jump('Calendar')">
<view class="sprite-icon icon-work-icon"></view>
<view class="level-label">本月出勤</view>
<view class="time-day">{{ incomeDetail.checkInDays }}/{{ incomeDetail.shouldCheckInDays }}</view>
<view class="time-go"></view>
</view>
</view>
<view class="time-box" @click="jump('Calendar')">
<view class="sprite-icon icon-work-icon"></view>
<view class="level-label">本月出勤</view>
<view class="time-day">22/27</view>
<view class="time-go"></view>
<view class="footer-box flex-center">
<view class="sprite-icon icon-tips-b"></view>
最终的交付数以厂家提供的交付数为准,个人填写的交付数仅为工资测算参考。
</view>
</view>
<view class="footer-box flex-center">
<view class="sprite-icon icon-tips-b"></view>
最终的交付数以厂家提供的交付数为准,个人填写的交付数仅为工资测算参考。
</view>
<view class="income-body">
<view class="income-store">
<My-Store></My-Store>
<view class="income-body" v-if="incomeDetail.merchants.length">
<view class="income-store">
<My-Store :merchants="incomeDetail.merchants"></My-Store>
</view>
<view class="income-item">
<Day-Tips :merchants="incomeDetail.merchants"></Day-Tips>
</view>
</view>
<view class="income-item">
<Day-Tips></Day-Tips>
<Password v-if="showPassword" @close="showPassword = false"></Password>
</template>
<view class="dailog-panel" v-else>
<view class="dailog-box">
<view class="dailog-header flex">
<view class="dailog-close" @click="close"><uni-icons type="closeempty" size="20"></uni-icons></view>
</view>
<view class="sprite-icon icon-prompt"></view>
<view class="dailog-tips">温馨提示</view>
<view class="dailog-desc">收入计算功能仅限广联直营驻店销售人员使用</view>
<view class="dailog-btn" @click="close">好的</view>
</view>
</view>
<Password v-if="showPassword" @close="showPassword = false"></Password>
</view>
</template>
......@@ -38,17 +52,76 @@ export default {
components: { DayTips, Password, MyStore },
data() {
return {
showPassword: false
showPassword: false,
incomeDetail: {
staffName: 'string',
staffPhone: 'string',
jobType: 'string',
checkInDays: 0,
shouldCheckInDays: 0,
merchants: []
},
isShow: true,
times: 0
}
},
inject: ['hideFooter', 'showPage'],
mounted() {
async mounted() {
this.hideFooter(false)
const { phone } = uni.$storage.get('userInfo')
const res = await uni.$api.pointApi.incomeMeasurementConfig({ staffPhone: phone })
const phoneList = res.staffPhone || []
console.log(res.configFlag == 0, res.configFlag == 2 && phoneList.includes(phone))
if (res.configFlag == 0 || (res.configFlag == 2 && phoneList.includes(phone))) {
this.isShow = true
} else {
// return
}
this.incomeCalculation()
this.start()
},
destroyed() {
this.hideFooter(true)
clearInterval(this.interval)
},
methods: {
/**
* 每1s执行一次,执行60次后,触发close方法
* @returns {undefined}
*/
start() {
this.interval = setInterval(() => {
this.times++
if (this.times == 60) {
this.close()
clearInterval(this.interval)
}
}, 1000)
},
/**
* 点击页面时,清除定时器
*/
handleTouch() {
clearInterval(this.interval)
},
close() {
this.$emit('selectTab', 0)
},
/**
* 员工收入测算
* @returns {Promise<void>}
*/
incomeCalculation() {
uni.$api.pointApi.incomeCalculation().then(res => {
console.log(res, 999)
this.incomeDetail = res
})
},
/**
* 跳转到对应的页面
* @param {String} name pages/HomeFrame/components/Point/下的vue文件名
* @param {Number|String} val 传递的参数
*/
jump(name, val) {
console.log(name, 99)
this.showPage(name, val)
......@@ -141,4 +214,68 @@ export default {
border-radius: 48rpx;
}
}
.dailog-panel {
position: fixed;
width: 100vw;
height: 100vh;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
.dailog-box {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: #fff;
background-image: linear-gradient(179deg, #d6e9ff 12%, #ffffff 100%); /* 顶部渐变和底部白色 */
background-size:
100% 110rpx,
100% calc(100% - 110rpx); /* 分别设置渐变和白色的背景大小 */
background-repeat: no-repeat, no-repeat; /* 确保背景不重复 */
background-position: top, bottom; /* 分别设置渐变和白色的位置 */
width: 1040rpx;
height: 784rpx;
background: #ffffff;
border-radius: 48rpx;
padding-bottom: 96rpx;
.dailog-header {
padding: 40rpx 48rpx;
.dailog-close {
margin-left: auto;
text-align: right;
.uni-icons {
color: #808291 !important;
font-size: 40rpx;
}
}
}
.icon-prompt {
margin: 0 auto;
}
.dailog-tips {
margin-top: 54rpx;
font-size: 40rpx;
color: #1a1a1a;
text-align: center;
}
.dailog-desc {
font-size: 32rpx;
color: #808291;
text-align: center;
margin-top: 16rpx;
}
.dailog-btn {
width: 400rpx;
height: 96rpx;
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff80;
border-radius: 16rpx;
margin: 96rpx auto 0;
font-size: 36rpx;
color: #ffffff;
line-height: 96rpx;
text-align: center;
}
}
}
</style>
......@@ -53,7 +53,7 @@ export default {
icon: "record",
},
{
label: "积分权益",
label: "个人中心",
icon: "point",
},
],
......
......@@ -11,7 +11,7 @@
<view class="tab-box">
<view @click="selectTab(index)" :class="{ 'tab-item': true, active: activeIndex == index }" v-for="(i, index) in tabList" :key="index">{{ i.name }}</view>
</view>
<component :is="tabName"></component>
<component :is="tabName" @selectTab="selectTab"></component>
</view>
</template>
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-09 10:38:48
* @LastEditTime: 2025-01-10 15:54:24
-->
<template>
<view class="point-box">
......@@ -12,21 +12,21 @@
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view v-if="isHigh" class="title"><text>兑换券介绍</text></view>
<!-- <view class="month-box" v-else>
<view class="month-box" v-else>
<view class="month-tabs">
<view class="tab-prev" v-if="month <= currentMonth" @click="prevTab">
<view class="tab-prev" v-if="month <= currentMonth && month > 1" @click="prevTab">
<view class="tab-icon">
<uni-icons type="left" size="20"></uni-icons>
<uni-icons type="left" size="16"></uni-icons>
</view>
</view>
<view class="tab-mid">{{ month == currentMonth ? '本' : (month + '').padStart(2, '0') }}月</view>
<view class="tab-next" v-if="month != currentMonth" @click="nextTab">
<view class="tab-icon">
<uni-icons type="right" size="20"></uni-icons>
<uni-icons type="right" size="16"></uni-icons>
</view>
</view>
</view>
</view> -->
</view>
</view>
<view class="point-body">
<view class="level-box">
......@@ -109,9 +109,15 @@ export default {
this.isHigh = isHigh
},
methods: {
getDetail() {
getDetail(countDate) {
this.getRule(1)
this.getRule(2)
this.getBadgeList(countDate)
},
getBadgeList(countDate) {
uni.$api.pointApi.badgeList({ countDate }).then(res => {
this.badgeList = res.map(item => item.medalType)
})
},
getRule(levelType) {
uni.$api.pointApi.rewardRule({ levelType }).then(res => {
......@@ -131,7 +137,7 @@ export default {
})
},
updateDetail(countDate) {
this.getDetail(countDate)
this.getBadgeList(countDate)
}
}
}
......
export default {
data() {
return {
IncomeList: [
{
label: '基本工资',
icon: 'jbgz-icon',
content: '基本工资 = 职级工资÷应出勤天数×实际出勤天数',
value: 'basicSalary'
},
{
label: '退单冲减',
icon: 'tdcj-icon',
content: '历史已发放提成订单客户本月退单,当月冲减该月提成',
value: 'refundOffset',
recordKey: 'refundOffsetRecord',
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '退单记录描述'
},
{
title: '提成',
width: 20
}
]
},
{
label: '会员权益/升级',
icon: 'qytc-icon',
content: '权益提成 = 权益产值 × 提成系数 × 提成比例',
subContent: '延保提成 = 售前延保产值×提成系数×安心包max考核系数×提成比例 +售后延保产值×提成比例 +安心包Max产值×提成系数×提成比例',
warnList: [
{ style: 'font-size: 28rpx;color: #808291;line-height: 48rpx;', message: '当安心包Max渗透率<15%,安心包Max考核系数为 0.8' },
{
style: 'font-size: 28rpx;color: #808291;line-height: 48rpx;',
message: '当安心包Max渗透率>15%,安心包Max考核系数为 1.0'
},
{
style: 'font-size: 28rpx;color: #F47F13;line-height: 48rpx;',
message: '问界安心包、安心包PRO、轮胎服务,三项合计交付渗透率>15% 的部分,可以计入安心包Max渗透率;如三项渗透率为20%,其中5%计入安心包Max考核。'
}
],
value: 'equityCommission',
recordKey: 'equityMerchantCommissions',
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '门店名称'
},
{
title: '提成',
width: 20
}
],
tabelTr: ['merchantName', 'commission']
},
{
label: '日报扣款',
icon: 'rbkk-icon',
content: '日报填写错误或未在约定时间内填写日版',
value: 'dailyDeductMoney',
recordKey: 'dailyDeductionRecords',
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '扣款',
width: 20
}
],
tabelTr: ['deductDate', 'configDeductMoney']
},
{
label: '轻改提成',
icon: 'qgtc-icon',
content: '轻改产值x提成系数x提成比例',
value: 'lightCommission',
recordKey: 'lightMerchantCommissions',
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '门店名称'
},
{
title: '提成',
width: 20
}
],
tabelTr: ['merchantName', 'commission']
},
{
label: '平板接待扣款',
icon: 'pbjd-icon',
content: '无效或虚假平板接待以及末使用平板接待',
value: 'padDeductMoney',
recordKey: 'padDeductionRecords',
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '扣款',
width: 20
}
],
tabelTr: ['deductDate', 'configDeductMoney']
},
{
label: '本月递延金',
icon: 'bydyj-icon',
content: '本月递延金 = 本月提成 × 10%',
desc: '递延金将于6个月后提成发放时返还',
value: 'deferExpenses'
},
{
label: '返还递延金',
icon: 'ffdyj-icon',
content: '本月递延金 = 提成(M-6)× 10%',
desc: '6个月前提成递延金在本月返还',
value: 'deferIncome'
},
{
label: '其他',
icon: 'qt-icon',
content: '其他扣款、奖励事项',
recordKey: 'otherDeductionRecord',
tabelTh: [
{
title: '序号',
width: 10
},
{
title: '日期'
},
{
title: '备注'
},
{
title: '金额',
width: 20
}
],
tabelTr: ['createdDate', 'remark', 'deduction'],
value: 'otherDeduction'
}
],
year: '',
month: '',
currentMonth: ''
currentMonth: '',
date: ''
}
},
mounted() {
......@@ -12,8 +175,10 @@ export default {
const day = new Date().getDate()
this.year = year
this.month = month
this.day = day
this.currentMonth = month
this.getDetail && this.getDetail(`${this.year}-${this.month}`, day)
this.date = `${this.year}-${this.month}-${day}`
},
methods: {
back() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!