Commit 9980c3e1 by 胡悦

Merge branch 'SAAS+V5.6.1' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.6.1

2 parents 774abdcb 286810fa
......@@ -602,6 +602,17 @@ module.exports = {
...data,
})
},
/**
* 检查今天是否在T1-T5之间
*/
checkTodayInT1T5(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.daily.report.fill.check',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉入口判断
getWageAppealEntrance(data={}) {
return http.post({
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-17 21:26:09
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="point-container">
<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" ref="centerRef" @selectTab="selectTab"></component>
</view>
</template>
<script type="text/ecmascript-6">
import Point from './Point/index.vue'
import Income from './Income/index.vue'
import Attendance from './Attendance/index.vue'
import { mapState } from 'vuex'
export default {
name: '',
components: {
Point,
Income,
Attendance
},
data () {
return {
activeIndex: 0,
componentList:['Attendance','Income'],
tabName: 'Attendance',
tabList:[
// {
// name:'我的积分',
// },
{
name:'我的考勤',
},
{
name:'我的收入',
}
]
}
},
computed: {
...mapState(['point.tabIndex']),
},
watch: {
'$store.state.point.tabIndex'(val) {
console.log(val)
this.activeIndex = val
this.tabName = this.componentList[val]
}
},
mounted() {
this.$store.dispatch('setTab', 0)
},
methods: {
selectTab(index){
this.$store.dispatch('setTab', index)
}
},
}
</script>
<style scoped lang="scss">
.tab-box {
margin-top: 68rpx;
width: 550rpx;
height: 84rpx;
line-height: 74rpx;
background: rgba(101, 171, 250, 0.12);
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
.tab-item {
font-size: 28rpx;
color: #1a1a1a;
text-align: center;
width: 50%;
&.active {
width: 260rpx;
height: 72rpx;
background: #ffffff;
border-radius: 16rpx;
text-align: center;
font-weight: 600;
color: #4673ff;
}
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-17 21:26:09
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="point-container">
<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" ref="centerRef" @selectTab="selectTab"></component>
</view>
</template>
<script type="text/ecmascript-6">
import Point from './Point/index.vue'
import Income from './Income/index.vue'
import Attendance from './Attendance/index.vue'
import { mapState } from 'vuex'
export default {
name: '',
components: {
Point,
Income,
Attendance
},
data () {
return {
activeIndex: 0,
componentList:['Attendance','Income'],
tabName: 'Attendance',
tabList:[
{
name:'我的考勤',
},
]
}
},
computed: {
...mapState(['point.tabIndex']),
},
watch: {
'$store.state.point.tabIndex'(val) {
console.log(val)
this.activeIndex = val
this.tabName = this.componentList[val]
}
},
mounted() {
this.$store.dispatch('setTab', 0)
},
methods: {
selectTab(index){
this.$store.dispatch('setTab', index)
}
},
}
</script>
<style scoped lang="scss">
.tab-box {
margin-top: toRpx(68);
width: toRpx(290);
height: toRpx(84);
line-height: toRpx(74);
background: rgba(101, 171, 250, 0.12);
border-radius: toRpx(20);
display: flex;
align-items: center;
justify-content: center;
.tab-item {
font-size: toRpx(28);
color: #1a1a1a;
text-align: center;
width: 50%;
&.active {
width: toRpx(260);
height: toRpx(72);
background: #ffffff;
border-radius: toRpx(16);
text-align: center;
font-weight: 600;
color: #4673ff;
}
}
}
</style>
......@@ -229,7 +229,7 @@
src="../../../../assets/images/common/report-no-data.webp"
class="icon"
/>
已超过 7 个自然日,暂不支持补填操作
暂不支持补填操作
</view>
</template>
</template>
......@@ -377,6 +377,7 @@ export default {
]),
weeklyList: [],
isEditReport: false,
editableDay: null
}
},
computed: {
......@@ -503,8 +504,9 @@ export default {
this.isEditReport = false
},
methods: {
initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
async initData () {
let inT1T5 = await uni.$api.commonApi.checkTodayInT1T5(),
{ merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = {
yqMerchantId: merchantId,
yqMerchantName: merchantName,
......@@ -513,6 +515,7 @@ export default {
merchantId: shopMerchantId,
merchantName: shopMerchantName
}
if (inT1T5) this.editableDay = dayjs().subtract(1, 'M').startOf('M')
this.getDailyReportCarBrand()
},
async getDailyReportCarBrand () {
......@@ -598,7 +601,9 @@ export default {
carBandList,
hwOhterObjArray,
orderObj,
isHmStore } = this,
isHmStore,
editableDay
} = this,
{ shopMerchantId, merchantId, uuid } = userInfo
uni.showLoading({
mask: true
......@@ -654,14 +659,15 @@ export default {
return item
})
}
let diffDay = dayjs().diff(dayjs(currentDate), 'day')
let diffDay = dayjs().diff(dayjs(currentDate), 'day'),
disabledReport = false
if (editableDay && editableDay.diff(dayjs(currentDate), 'day') > 0) disabledReport = true
this.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList
this.orderObj = {
...orderObj,
reportDate: currentDate,
isDateWithin7Days: diffDay < 7,
isDateWithin60Days: diffDay < 60,
isDateWithin7Days:editableDay ? !disabledReport : diffDay < 7,
remark,
lastStaffName: data.lastStaffName,
lastStaffUuid: data.lastStaffUuid,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!