Commit 2d731edd by 胡悦

feat: 添加工资申诉功能及相关组件

- 新增工资申诉页面及功能组件
- 添加右侧弹窗和月份选择器通用组件
- 实现申诉记录展示和表单提交功能
- 更新入口组件支持不同类型布局
- 添加相关API接口和常量配置
1 parent befee03d
...@@ -563,4 +563,44 @@ module.exports = { ...@@ -563,4 +563,44 @@ module.exports = {
...data, ...data,
}) })
}, },
// 工资新增申诉
addWageAppeal(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.pad.create',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉概览信息(包含申诉状态、申诉类型、申诉时间等)
getWageAppealOverview(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.summary',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉订单统计查询
getWageAppealStatistics(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.order.statistics',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉复议记录
replyList(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.reply.list',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉最新记录查询
getWageAppealLatestRecord(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.latest',
projectName: 'staffMiniprogram',
...data,
})
},
} }

2.94 MB | W: | H:

2.95 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="entrance-box"> <view class="entrance-box">
<template v-if="entranceList.length"> <template v-if="entranceList.length">
<view class="entrance-container"> <view class="entrance-container">
<view class="entrance-list"> <view :class="['entrance-list', `entrance-list-${type}`]">
<view class="entrance-item" v-for="(item, index) in entranceList" :key="index" @click="handleClick(item)"> <view class="entrance-item" v-for="(item, index) in entranceList" :key="index" @click="handleClick(item)">
<view :class="['sprite-icon', `icon-${item.icon}`]"></view> <view :class="['sprite-icon', `icon-${item.icon}`]"></view>
<view class="entrance-name">{{ item.label }}</view> <view class="entrance-name">{{ item.label }}</view>
...@@ -22,6 +22,13 @@ ...@@ -22,6 +22,13 @@
<script> <script>
export default { export default {
name: 'Entrance', name: 'Entrance',
props: {
// 默认一行展示5个,type传1展示4个
type: {
type: Number,
default: 0
}
},
data() { data() {
return {} return {}
}, },
...@@ -60,6 +67,12 @@ export default { ...@@ -60,6 +67,12 @@ export default {
sceneType: [0, 1] sceneType: [0, 1]
}, },
{ {
icon: 'wage-appeal',
label: '工资申诉',
name: 'WageAppeal',
sceneType: [0, 1]
},
{
icon: 'evaluation-management', icon: 'evaluation-management',
label: '评估单管理', label: '评估单管理',
name: 'EvaluationFormList', name: 'EvaluationFormList',
...@@ -94,10 +107,16 @@ export default { ...@@ -94,10 +107,16 @@ export default {
} }
.entrance-list { .entrance-list {
display: flex; width: 100%;
flex-wrap: wrap; display: grid;
gap: toRpx(68); row-gap: toRpx(30);
justify-content: flex-start; column-gap: toRpx(68);
&.entrance-list-0 {
grid-template-columns: repeat(5, 1fr);
}
&.entrance-list-1 {
grid-template-columns: repeat(4, 1fr);
}
} }
.entrance-item { .entrance-item {
......
...@@ -160,7 +160,8 @@ const pathEnum = { ...@@ -160,7 +160,8 @@ const pathEnum = {
merchants: '/rop-merchants/', merchants: '/rop-merchants/',
pad: '/rop-dj-pad/', pad: '/rop-dj-pad/',
clue: '/rop-scrm-clue/', clue: '/rop-scrm-clue/',
evaluation: '/gsc-vcp-pad-facade' evaluation: '/gsc-vcp-pad-facade',
staffMiniprogram: '/rop-dj-staff-miniprogram/',
} }
const CONFIG_ENV_MAP = { const CONFIG_ENV_MAP = {
1: 'develop', 1: 'develop',
......
...@@ -299,6 +299,12 @@ ...@@ -299,6 +299,12 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
},
{
"path": "pages/common/wageAppeal/index",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -22,11 +22,8 @@ ...@@ -22,11 +22,8 @@
src="../../../assets/images/common/tool_banner.png" src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill" mode="scaleToFill"
/> />
<template v-if="toolComponentName !== 'DailyReport'"> <template v-if="toolComponentName === 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance> <uni-calendar
</template>
<template v-else>
<uni-calendar
ref="calendar" ref="calendar"
:clearDate="false" :clearDate="false"
:endDate="endDate" :endDate="endDate"
...@@ -38,6 +35,12 @@ ...@@ -38,6 +35,12 @@
:date="currentDate" :date="currentDate"
/> />
</template> </template>
<template v-else-if="toolComponentName === 'WageAppeal'">
<MonthCalendar @confirm="confirmMonth"></MonthCalendar>
</template>
<template v-else>
<Entrance @entranceClick="entranceClick" :type="1"></Entrance>
</template>
</view> </view>
</view> </view>
<view class="detail-right"> <view class="detail-right">
...@@ -47,6 +50,7 @@ ...@@ -47,6 +50,7 @@
:transmission-of-data="transmissionOfData" :transmission-of-data="transmissionOfData"
:currentDate="currentDate" :currentDate="currentDate"
:currentMonth="currentMonth" :currentMonth="currentMonth"
:lastMonth="lastMonth"
@setCalendarSelected="selectedDays = $event" @setCalendarSelected="selectedDays = $event"
/> />
</view> </view>
...@@ -78,6 +82,8 @@ import dayjs from 'dayjs' ...@@ -78,6 +82,8 @@ import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index' import { interceptionMixin } from '@/mixin/index'
import StudyPopup from '@/components/StudyPopup.vue' import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue' import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
import WageAppeal from '../../common/wageAppeal/index.vue'
import MonthCalendar from '../../common/components/MonthCalendar.vue'
export default { export default {
mixins: [interceptionMixin], mixins: [interceptionMixin],
...@@ -92,7 +98,9 @@ export default { ...@@ -92,7 +98,9 @@ export default {
UploadProofOfPayment, UploadProofOfPayment,
OrderDetail, OrderDetail,
StudyPopup, StudyPopup,
StudyCenterPermissionPopup StudyCenterPermissionPopup,
WageAppeal,
MonthCalendar
}, },
data () { data () {
return { return {
...@@ -103,7 +111,8 @@ export default { ...@@ -103,7 +111,8 @@ export default {
currentMonth: dayjs().format('YYYY-MM'), currentMonth: dayjs().format('YYYY-MM'),
selectedDays: [], selectedDays: [],
lockReason: '', lockReason: '',
showStudyPermissionPopup: false showStudyPermissionPopup: false,
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM')
} }
}, },
onLoad (options) { onLoad (options) {
...@@ -194,11 +203,18 @@ export default { ...@@ -194,11 +203,18 @@ export default {
}, 100) }, 100)
} }
}) })
} },
// 确认选择的月份
confirmMonth(month) {
this.lastMonth = month
},
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.nav-bar {
z-index: 1;
}
.detail-content { .detail-content {
display: flex; display: flex;
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
......
<template>
<view class="month-calendar">
<view class="calendar-header">
<view class="arrow-box" @click="changeYear(-1)">
<uni-icons :style="{ opacity: canGoPrev ? 1 : 0 }" type="left" size="16" color="#414348"></uni-icons>
</view>
<view class="year-text">{{ displayYear }}</view>
<view class="arrow-box" @click="changeYear(1)">
<uni-icons :style="{ opacity: canGoNext ? 1 : 0 }" type="right" size="16" color="#414348"></uni-icons>
</view>
</view>
<view class="month-grid">
<view
class="month-item"
v-for="m in 12"
:key="m"
:class="{
'active': isSelected(m),
'disabled': isDisabled(m)
}"
@click="onMonthClick(m)"
>
{{ m }}月
</view>
</view>
</view>
</template>
<script>
import dayjs from 'dayjs';
export default {
name: 'MonthCalendar',
props: {
// 默认选中的日期,格式 YYYY-MM
defaultDate: {
type: String,
default: ''
}
},
data() {
// 1. 先计算出上个月的时间对象
const lastMonthDate = dayjs().subtract(1, 'month');
// 2. 分别获取
const yearNum = lastMonthDate.year();
const monthNum = lastMonthDate.month() + 1;
const todayYear = dayjs().year();
const todayMonth = dayjs().month() + 1;
const lastYear = lastMonthDate.year();
return {
today: { year: todayYear, month: todayMonth },
displayYear: lastYear,
selected: { year: yearNum, month: monthNum }
}
},
computed: {
canGoNext() {
return this.displayYear < this.today.year
},
canGoPrev() {
return this.displayYear > this.today.year - 1
}
},
watch: {
defaultDate: {
handler(val) {
if (val) {
const d = dayjs(val)
if (!d.isValid()) return
const y = d.year()
const m = d.month() + 1
this.selected = { year: y, month: m }
this.displayYear = y
}
},
immediate: true
}
},
methods: {
changeYear(step) {
const targetYear = this.displayYear + step
// 不允许切换到未来年份
if (step > 0 && targetYear > this.today.year) return
// 不允许切换到早于去年的年份
if (step < 0 && targetYear < this.today.year - 1) return
this.displayYear = targetYear
},
isSelected(m) {
return this.selected.year === this.displayYear && this.selected.month === m
},
isDisabled(m) {
// 未来年份的所有月份都不可选(虽然已经限制了年份切换,但作为兜底)
if (this.displayYear > this.today.year) return true
// 当前年份,超过当前月份的不可选
if (this.displayYear === this.today.year && m > this.today.month) return true
return false
},
onMonthClick(m) {
if (this.isDisabled(m)) return
this.selected = {
year: this.displayYear,
month: m
}
const date = dayjs().year(this.displayYear).month(m - 1).date(1)
this.$emit('confirm', date.format('YYYY-MM'))
}
}
}
</script>
<style lang="scss" scoped>
.month-calendar {
padding: 16rpx 0;
}
.calendar-header {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 24rpx;
.year-text {
font-size: 28rpx;
color: #37393D;
margin: 0 60rpx;
}
.arrow-box {
padding: 10rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
.month-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
row-gap: 32rpx;
column-gap: 30rpx;
}
.month-item {
height: 88rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
color: #37393D;
border-radius: 12rpx;
&.active {
background-color: #4673FF;
color: #fff;
}
&.disabled {
color: #AAAFBD;
background-color: transparent;
}
}
</style>
<template>
<uni-popup ref="popup" type="right" :mask-click="maskClick" @change="change">
<view class="right-popup-container" :style="{ width: width }">
<!-- Header -->
<view class="popup-header">
<text class="popup-title">{{ title }}</text>
<uni-icons class="close-icon" type="closeempty" size="20" color="#999EA8" @click="close" />
</view>
<!-- Content -->
<scroll-view scroll-y class="popup-body">
<slot></slot>
</scroll-view>
<!-- Footer -->
<view class="popup-footer" v-if="$slots.footer || showFooter">
<slot name="footer">
<view class="footer-btns">
<button class="btn cancel" :class="{ 'disabled': cancelDisabled }" :disabled="cancelDisabled" @click="close">取消</button>
<button class="btn confirm" :class="{ 'disabled': confirmDisabled }" :disabled="confirmDisabled" @click="confirm">确定</button>
</view>
</slot>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'RightPopup',
props: {
title: {
type: String,
default: '标题'
},
width: {
type: String,
default: '1400rpx'
},
maskClick: {
type: Boolean,
default: false
},
showFooter: {
type: Boolean,
default: false
},
confirmDisabled: {
type: Boolean,
default: false
},
cancelDisabled: {
type: Boolean,
default: false
}
},
methods: {
open() {
this.$refs.popup.open()
},
close() {
this.$refs.popup.close()
},
change(e) {
this.$emit('change', e)
},
confirm() {
this.$emit('confirm')
}
}
}
</script>
<style lang="scss" scoped>
.right-popup-container {
height: 100vh;
background-color: #fff;
display: flex;
flex-direction: column;
border-radius: 48rpx 0 0 48rpx;
}
.popup-header {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
height: 152rpx;
// border-bottom: 1rpx solid #eee;
background: url('@/assets/images/common/right-header.png') no-repeat center center;
background-size: 100% 100%;
border-radius: 48rpx 0 0 0;
.popup-title {
font-size: 40rpx;
font-weight: 500;
color: #292D33;
text-align: center;
width: 100%;
}
.close-icon {
position: absolute;
right: 64rpx;
top: 50%;
transform: translateY(-50%);
}
}
.popup-body {
flex: 1;
overflow-y: auto;
// padding: 16rpx 64rpx;
box-sizing: border-box;
}
.popup-footer {
height: 144rpx;
padding: 24rpx 40rpx;
// border-top: 1rpx solid #eee;
border-radius: 0 0 0 48rpx;
background-color: #fff;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btns {
display: flex;
justify-content: space-between;
gap: 20rpx;
.btn {
flex: 1;
font-size: 28rpx;
font-weight: 500;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
margin: 0;
&.cancel {
background: #3b73ff1a;
color: #4673FF;
&::after { border: none; }
&.disabled {
background: #f5f5f5;
color: #cccccc;
}
}
&.confirm {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
&::after { border: none; }
&.disabled {
background: linear-gradient(0deg, rgba(44, 102, 247, 0.5) 0%, rgba(72, 166, 255, 0.5) 100%);
color: #ffffff;
}
}
}
}
}
</style>
const title = {
attendance: '申诉考勤',
record: '申诉平板'
}
const formItem = {
attendance: [
{
label: '本月实际出勤天数',
value: 'actualAttendanceDays',
unit: '天',
},
{
label: '申诉修改实际出勤天数',
value: 'applyActualAttendanceDays',
unit: '天',
maxlength: 5
}
],
record: [
{
label: '平板录音完成总数',
value: 'padRecordNum',
unit: '条'
},
{
label: '申诉修改平板录音总数',
value: 'applyPadRecordNum',
unit: '条',
maxlength: 3
}
]
}
const BOUTIQUE_ORDER_COUNT_FIELDS = [
{
label: '窗膜',
prop: 'windowFilmDealCount'
},
{
label: '车衣',
prop: 'carCoverDealCount'
},
{
label: '精品',
prop: 'boutiqueAccessoryDealCount'
}
]
// 权益订单数统计字段
const EQUITY_ORDER_COUNT_FIELDS = [
{
label: '整车延保',
prop: 'wholeCarWarrantyDealCount'
},
{
label: '轮胎险',
prop: 'tireInsuranceAchieveCount'
},
{
label: '安心包max',
prop: 'safePackageMaxAchieveCount'
},
{
label: '安心包',
prop: 'safePackageAchieveCount'
},
{
label: '电池延保',
prop: 'batteryWarrantyDealCount'
},
{
label: '北汽无忧成交',
prop: 'baicWorryFreeDealCount'
},
{
label: '广爱无忧成交',
prop: 'guangAiWorryFreeDealCount'
},
{
label: '广联权益',
prop: 'guangLianBenefitDealCount'
}
]
export {
title,
formItem,
BOUTIQUE_ORDER_COUNT_FIELDS,
EQUITY_ORDER_COUNT_FIELDS
}
\ No newline at end of file \ No newline at end of file
...@@ -11,16 +11,19 @@ ...@@ -11,16 +11,19 @@
<view class="common-title">展业</view> <view class="common-title">展业</view>
<view class="content"> <view class="content">
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" /> <image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
<template v-if="toolComponentName !== 'DailyReport'"> <template v-if="toolComponentName === 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance> <uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" />
</template>
<template v-else-if="toolComponentName === 'WageAppeal'">
<MonthCalendar @confirm="confirmMonth"></MonthCalendar>
</template> </template>
<template v-else> <template v-else>
<uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" /> <Entrance @entranceClick="entranceClick" :type="1"></Entrance>
</template> </template>
</view> </view>
</view> </view>
<view class="detail-right"> <view class="detail-right">
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" /> <component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" :lastMonth="lastMonth" @setCalendarSelected="selectedDays = $event" />
</view> </view>
</view> </view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup> <NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
...@@ -51,7 +54,8 @@ import EquityManagement from './components/EquityManagement.vue' ...@@ -51,7 +54,8 @@ import EquityManagement from './components/EquityManagement.vue'
import CreateEquity from './components/CreateEquity.vue' import CreateEquity from './components/CreateEquity.vue'
import SignName from './components/SignName.vue' import SignName from './components/SignName.vue'
import PreviewList from './components/PreviewList.vue' import PreviewList from './components/PreviewList.vue'
import WageAppeal from '../../common/wageAppeal/index.vue'
import MonthCalendar from '../../common/components/MonthCalendar.vue'
export default { export default {
mixins: [interceptionMixin], mixins: [interceptionMixin],
components: { components: {
...@@ -69,7 +73,9 @@ export default { ...@@ -69,7 +73,9 @@ export default {
EquityManagement, EquityManagement,
CreateEquity, CreateEquity,
SignName, SignName,
PreviewList PreviewList,
WageAppeal,
MonthCalendar
}, },
data() { data() {
return { return {
...@@ -80,7 +86,8 @@ export default { ...@@ -80,7 +86,8 @@ export default {
currentMonth: dayjs().format('YYYY-MM'), currentMonth: dayjs().format('YYYY-MM'),
selectedDays: [], selectedDays: [],
lockReason: '', lockReason: '',
showStudyPermissionPopup: false showStudyPermissionPopup: false,
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM')
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -169,11 +176,18 @@ export default { ...@@ -169,11 +176,18 @@ export default {
}, 100) }, 100)
} }
}) })
} },
// 确认选择的月份
confirmMonth(month) {
this.lastMonth = month
},
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.nav-bar {
z-index: 1;
}
.detail-content { .detail-content {
display: flex; display: flex;
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!