Commit 9dbc508d by 胡悦

feat(wageAppeal): 完善工资申诉功能并调整环境配置

- 在主页框架拦截列表中添加工资申诉页面
- 考勤申诉弹窗支持动态申诉时间显示和数据回显
- 工资申诉主页面优化数据显示逻辑和样式
- 调整环境配置文件中的默认环境
1 parent 7f8426e2
......@@ -720,7 +720,7 @@ export default {
async entranceClick (item) {
console.log(item, 'item')
// 清除评估单的图片视频资源缓存
const noInterceptPage = ['DailyReport', 'DeliveryManagement', 'ReportManagement'],
const noInterceptPage = ['DailyReport', 'DeliveryManagement', 'ReportManagement', 'WageAppeal'],
{ sceneType } = this
if (!noInterceptPage.includes(item.name)) {
if (sceneType != 7) {
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 0
const index = 1
/**
*
0本地
......
......@@ -2,13 +2,13 @@
<RightPopup ref="rightPopup" :title="title[type]" :showFooter="true" @confirm="confirm" :confirmDisabled="confirmDisabled">
<view class="popup-content">
<view class="appeal-desc">
<view class="sprite-icon icon-icon-appeal"></view>规定申诉时间为<view class="blod-text">每月6号-每月15号</view>
<view class="sprite-icon icon-icon-appeal"></view>规定申诉时间为<view class="blod-text">每月{{appealStartTime}}号-每月{{appealEndTime}}号</view>
,支持提交修订异议处理,总部流转审批,请在规定时间内完成,逾期不再受理。
</view>
<view class="form-item flex-item line">
<view class="label">{{formItem[type][0].label}}</view>
<view class="value"><text class="blue-text">{{ currentCount }}</text> {{formItem[type][1].unit}}</view>
<view class="value"><text class="blue-text">{{ count }}</text> {{formItem[type][1].unit}}</view>
</view>
<view class="form-item">
......@@ -94,7 +94,15 @@ export default {
lastRecord: {
type: Object,
default: () => {}
}
},
appealStartTime: {
type: String,
default: ''
},
appealEndTime: {
type: String,
default: ''
},
},
data() {
return {
......@@ -106,7 +114,8 @@ export default {
remark: '',
otherAbnormalMessage: ''
},
confirmDisabled: true
confirmDisabled: true,
count: ''
}
},
watch: {
......@@ -119,23 +128,31 @@ export default {
},
lastRecord: {
handler(val) {
console.log(val)
if (!val) return
const { appealType, actualAttendanceDays, applyActualAttendanceDays, padRecordNum, applyPadRecordNum, remark, otherAbnormalMessage, attachmentList } = val
const { appealType, actualAttendanceDays, applyActualAttendanceDays, padRecordNum, applyPadRecordNum, remark, otherAbnormalMessage, attachmentList, shopCount } = val
const typeMap = {
1: { count: actualAttendanceDays, modify: applyActualAttendanceDays },
2: { count: padRecordNum, modify: applyPadRecordNum }
}
const currentType = typeMap[appealType]
if (currentType) {
this.currentCount = currentType.count
this.count = currentType.count
if (currentType.modify) this.formData.modifyCount = currentType.modify
}
if (remark) this.formData.remark = remark
if (otherAbnormalMessage) this.formData.otherAbnormalMessage = otherAbnormalMessage
if (attachmentList) this.formData.images = attachmentList
if (shopCount) this.formData.shopCount = shopCount
console.log(this.formData, '==')
},
deep: true
},
currentCount: {
handler(val) {
if (val) this.count = val
}
}
},
methods: {
......@@ -252,7 +269,7 @@ export default {
})
},
async confirm() {
const { modifyCount, remark, images, otherAbnormalMessage} = this.formData, {currentCount} = this
const { modifyCount, remark, images, otherAbnormalMessage, shopCount} = this.formData, {currentCount} = this
// 校验申诉天数是否在上个月自然日天数内
if (this.type == 'attendance' && modifyCount && !this.checkLastNaturalDay(modifyCount)) return
const { sceneType, shopMerchantId } = uni.$storage.get('userInfo')
......@@ -267,6 +284,7 @@ export default {
if (this.type == 'record') {
params.appealType = 2
params.padRecordNum = currentCount
params.shopCount = shopCount
if (modifyCount) params.applyPadRecordNum = modifyCount
} else if (this.type == 'attendance') {
params.appealType = 1
......@@ -276,10 +294,14 @@ export default {
console.log(params, 'params')
const res = await uni.$api.commonApi.addWageAppeal(params)
console.log(res, '=res')
// this.$emit('confirm', {
// month: this.month,
// ...this.formData
// })
if (res) uni.showToast({
title: '申诉成功',
icon: 'success'
})
this.$emit('confirm', {
month: this.month,
...this.formData
})
this.close()
}
}
......@@ -288,14 +310,14 @@ export default {
<style scoped lang="scss">
.popup-content {
padding: 16rpx 64rpx;
padding: toRpx(16) toRpx(64);
}
.appeal-desc {
border-radius: 8rpx;
font-size: 24rpx;
border-radius: toRpx(8);
font-size: toRpx(24);
line-height: 1.5;
margin-bottom: 56rpx;
margin-bottom: toRpx(56);
display: inline-block;
display: block;
......@@ -307,12 +329,12 @@ export default {
.sprite-icon {
display: inline-block;
vertical-align: middle;
margin-right: 8rpx;
margin-right: toRpx(8);
}
}
.form-item {
margin-bottom: 32rpx;
margin-bottom: toRpx(32);
&.flex-item {
display: flex;
......@@ -321,60 +343,60 @@ export default {
}
&.line {
border-bottom: 1rpx solid #EFF0F2;
padding-bottom: 32rpx;
border-bottom: toRpx(1) solid #EFF0F2;
padding-bottom: toRpx(32);
}
.label {
font-size: 28rpx;
font-size: toRpx(28);
font-weight: 500;
color: #333;
&.m-b {
margin-bottom: 16rpx;
margin-bottom: toRpx(16);
}
}
.value {
font-size: 28rpx;
font-size: toRpx(28);
color: #333;
.blue-text {
color: #2A82E4;
margin-right: 8rpx;
margin-right: toRpx(8);
}
}
.input-box {
background: #F5F6F8;
border-radius: 16rpx;
height: 80rpx;
border-radius: toRpx(16);
height: toRpx(80);
display: flex;
align-items: center;
padding: 0 24rpx;
padding: 0 toRpx(24);
input {
flex: 1;
font-size: 28rpx;
font-size: toRpx(28);
color: #333;
}
.suffix {
font-size: 28rpx;
font-size: toRpx(28);
color: #333;
margin-left: 16rpx;
margin-left: toRpx(16);
}
}
.textarea-box {
background: #F5F6F8;
border-radius: 8rpx;
padding: 24rpx;
border-radius: toRpx(8);
padding: toRpx(24);
textarea {
width: 100%;
height: 192rpx;
font-size: 28rpx;
height: toRpx(192);
font-size: toRpx(28);
color: #333;
line-height: 1.5;
}
......@@ -384,12 +406,12 @@ export default {
.upload-container {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
gap: toRpx(20);
.image-item {
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
width: toRpx(160);
height: toRpx(160);
border-radius: toRpx(16);
position: relative;
overflow: hidden;
......@@ -402,8 +424,8 @@ export default {
position: absolute;
top: 0;
right: 0;
width: 40rpx;
height: 40rpx;
width: toRpx(40);
height: toRpx(40);
background: rgba(0, 0, 0, 0.5);
// border-bottom-left-radius: 8rpx;
border-radius: 50%;
......@@ -414,19 +436,19 @@ export default {
}
.upload-btn {
width: 160rpx;
height: 160rpx;
width: toRpx(160);
height: toRpx(160);
background: #F5F8FF;
border-radius: 8rpx;
border-radius: toRpx(8);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.count {
font-size: 24rpx;
font-size: toRpx(24);
color: #999;
margin-top: 8rpx;
margin-top: toRpx(8);
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!