Commit 9dbc508d by 胡悦

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

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