This commit is contained in:
hezhidong
2025-04-23 18:00:35 +08:00
parent 44cba1950d
commit d2c8a95723
6 changed files with 609 additions and 459 deletions
+17 -5
View File
@@ -10,7 +10,7 @@
<view class="right"><text class="blue-text">月度考勤</text></view>
</view>
<view class="section-content" style="display: flex; justify-content: space-between; align-items: center">
<text class="title">{{ selectedYear }}{{ selectedMonth < 10 ? '0' + selectedMonth : selectedMonth }}月考勤统计</text>
<text class="title">{{ thisYear }}{{ thisMonth }}月考勤统计</text>
<view class="combination" @click="viewDetails">
<text class="detail">查看详情</text>
<image class="icon" src="/static/arr.png" mode="aspectFit"></image>
@@ -71,24 +71,35 @@
</template>
<script>
export default {
data() {
const currentDate = new Date();
const currentYear = currentDate.getFullYear();
return {
// 今年
thisYear:'',
// 今月
thisMonth:'',
showModal: false,
currentYear,
selectedYear: currentYear,
selectedMonth: currentDate.getMonth() + 1,
selectedMonth: currentDate.getMonth(),
months: Array.from({ length: 12 }, (_, i) => i + 1),
currentStep: 'year',
tempSelectedYear: currentYear,
tempSelectedMonth: currentDate.getMonth() + 1,
tempSelectedMonth: currentDate.getMonth(),
availableYears: Array.from({ length: 7 }, (_, i) => currentYear - 3 + i)
};
},
created() {
async created() {
this.thisYear = this.selectedYear
this.thisMonth = this.selectedMonth
this.$setNavigationBar('人资系统');
if (uni.getStorageSync('token')) {
} else {
let a = await this.$login();
}
},
methods: {
showDatePicker() {
@@ -126,7 +137,8 @@ export default {
},
viewSalaryDetails(){
this.$navTo('/pages/salaryDetails/salaryDetails');
}
},
}
};
</script>