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 = { ...@@ -602,6 +602,17 @@ module.exports = {
...data, ...data,
}) })
}, },
/**
* 检查今天是否在T1-T5之间
*/
checkTodayInT1T5(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.daily.report.fill.check',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉入口判断 // 工资申诉入口判断
getWageAppealEntrance(data={}) { getWageAppealEntrance(data={}) {
return http.post({ return http.post({
......
...@@ -33,15 +33,9 @@ export default { ...@@ -33,15 +33,9 @@ export default {
componentList:['Attendance','Income'], componentList:['Attendance','Income'],
tabName: 'Attendance', tabName: 'Attendance',
tabList:[ tabList:[
// {
// name:'我的积分',
// },
{ {
name:'我的考勤', name:'我的考勤',
}, },
{
name:'我的收入',
}
] ]
} }
}, },
...@@ -67,25 +61,25 @@ export default { ...@@ -67,25 +61,25 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tab-box { .tab-box {
margin-top: 68rpx; margin-top: toRpx(68);
width: 550rpx; width: toRpx(290);
height: 84rpx; height: toRpx(84);
line-height: 74rpx; line-height: toRpx(74);
background: rgba(101, 171, 250, 0.12); background: rgba(101, 171, 250, 0.12);
border-radius: 20rpx; border-radius: toRpx(20);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.tab-item { .tab-item {
font-size: 28rpx; font-size: toRpx(28);
color: #1a1a1a; color: #1a1a1a;
text-align: center; text-align: center;
width: 50%; width: 50%;
&.active { &.active {
width: 260rpx; width: toRpx(260);
height: 72rpx; height: toRpx(72);
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: toRpx(16);
text-align: center; text-align: center;
font-weight: 600; font-weight: 600;
color: #4673ff; color: #4673ff;
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
src="../../../../assets/images/common/report-no-data.webp" src="../../../../assets/images/common/report-no-data.webp"
class="icon" class="icon"
/> />
已超过 7 个自然日,暂不支持补填操作 暂不支持补填操作
</view> </view>
</template> </template>
</template> </template>
...@@ -390,7 +390,8 @@ export default { ...@@ -390,7 +390,8 @@ export default {
return `¥${this.orderObj.totalOrderMoney || 0}` return `¥${this.orderObj.totalOrderMoney || 0}`
} }
} }
]) ]),
editableDay: null
} }
}, },
computed: { computed: {
...@@ -426,8 +427,9 @@ export default { ...@@ -426,8 +427,9 @@ export default {
back () { back () {
uni.navigateBack() uni.navigateBack()
}, },
initData () { async initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo let inT1T5 = await uni.$api.commonApi.checkTodayInT1T5(),
{ merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = { this.orderObj = {
yqMerchantId: merchantId, yqMerchantId: merchantId,
yqMerchantName: merchantName, yqMerchantName: merchantName,
...@@ -436,6 +438,7 @@ export default { ...@@ -436,6 +438,7 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName merchantName: shopMerchantName
} }
if (inT1T5) this.editableDay = dayjs().subtract(1, 'M').startOf('M')
this.getDailyReportCarBrand() this.getDailyReportCarBrand()
}, },
async getDailyReportCarBrand () { async getDailyReportCarBrand () {
...@@ -509,11 +512,14 @@ export default { ...@@ -509,11 +512,14 @@ export default {
async getStaffDailyReportDetail () { async getStaffDailyReportDetail () {
this.isEditReport = false this.isEditReport = false
this.loadComplete = false this.loadComplete = false
let { currentDate, let {
currentDate,
userInfo, userInfo,
carBandList, carBandList,
hwOhterObjArray, hwOhterObjArray,
orderObj } = this, orderObj,
editableDay
} = this,
{ shopMerchantId, merchantId, uuid } = userInfo { shopMerchantId, merchantId, uuid } = userInfo
uni.showLoading({ uni.showLoading({
mask: true mask: true
...@@ -567,14 +573,15 @@ export default { ...@@ -567,14 +573,15 @@ export default {
return item 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.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList this.carBandList = carBandList
this.orderObj = { this.orderObj = {
...orderObj, ...orderObj,
reportDate: currentDate, reportDate: currentDate,
isDateWithin7Days: diffDay < 7, isDateWithin7Days:editableDay ? !disabledReport : diffDay < 7,
isDateWithin60Days: diffDay < 60,
remark, remark,
lastStaffName: data.lastStaffName, lastStaffName: data.lastStaffName,
lastStaffUuid: data.lastStaffUuid, lastStaffUuid: data.lastStaffUuid,
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
src="../../../../assets/images/common/report-no-data.webp" src="../../../../assets/images/common/report-no-data.webp"
class="icon" class="icon"
/> />
已超过 7 个自然日,暂不支持补填操作 暂不支持补填操作
</view> </view>
</template> </template>
</template> </template>
...@@ -377,6 +377,7 @@ export default { ...@@ -377,6 +377,7 @@ export default {
]), ]),
weeklyList: [], weeklyList: [],
isEditReport: false, isEditReport: false,
editableDay: null
} }
}, },
computed: { computed: {
...@@ -503,8 +504,9 @@ export default { ...@@ -503,8 +504,9 @@ export default {
this.isEditReport = false this.isEditReport = false
}, },
methods: { methods: {
initData () { async initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo let inT1T5 = await uni.$api.commonApi.checkTodayInT1T5(),
{ merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = { this.orderObj = {
yqMerchantId: merchantId, yqMerchantId: merchantId,
yqMerchantName: merchantName, yqMerchantName: merchantName,
...@@ -513,6 +515,7 @@ export default { ...@@ -513,6 +515,7 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName merchantName: shopMerchantName
} }
if (inT1T5) this.editableDay = dayjs().subtract(1, 'M').startOf('M')
this.getDailyReportCarBrand() this.getDailyReportCarBrand()
}, },
async getDailyReportCarBrand () { async getDailyReportCarBrand () {
...@@ -598,7 +601,9 @@ export default { ...@@ -598,7 +601,9 @@ export default {
carBandList, carBandList,
hwOhterObjArray, hwOhterObjArray,
orderObj, orderObj,
isHmStore } = this, isHmStore,
editableDay
} = this,
{ shopMerchantId, merchantId, uuid } = userInfo { shopMerchantId, merchantId, uuid } = userInfo
uni.showLoading({ uni.showLoading({
mask: true mask: true
...@@ -654,14 +659,15 @@ export default { ...@@ -654,14 +659,15 @@ export default {
return item 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.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList this.carBandList = carBandList
this.orderObj = { this.orderObj = {
...orderObj, ...orderObj,
reportDate: currentDate, reportDate: currentDate,
isDateWithin7Days: diffDay < 7, isDateWithin7Days:editableDay ? !disabledReport : diffDay < 7,
isDateWithin60Days: diffDay < 60,
remark, remark,
lastStaffName: data.lastStaffName, lastStaffName: data.lastStaffName,
lastStaffUuid: data.lastStaffUuid, lastStaffUuid: data.lastStaffUuid,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!