feat: 1.下发记录 2.打卡时间限制
This commit is contained in:
parent
b5ce56a37e
commit
edefa05ae1
@ -15,7 +15,7 @@
|
||||
<view class="text-center mt-2 color-gray">你所在考勤组无法手机打卡</view>
|
||||
<view class="text-center color-gray">请在考勤机或者门禁设备上打卡</view>
|
||||
</view>
|
||||
<view class="w-100% h-17 bg-blue mt-2 rounded-1" @click="goHelper"></view>
|
||||
<view class="w-100% h-17 bg-[#3372FA] mt-2 rounded-1" @click="goHelper"></view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
@ -32,7 +32,10 @@
|
||||
<image src="/static/images/icon_wechat.png" class="w-6 h-6 mr-2" />
|
||||
<view class="text-3">班次管理</view>
|
||||
</view>
|
||||
<view class="p-3.5 bg-white rounded-1.2 flex-1 ml-1 flex flex-row items-center">
|
||||
<view
|
||||
@click="goIssueRecord"
|
||||
class="p-3.5 bg-white rounded-1.2 flex-1 ml-1 flex flex-row items-center"
|
||||
>
|
||||
<image src="/static/images/icon_wechat.png" class="w-6 h-6 mr-2" />
|
||||
<view class="text-3">下发记录</view>
|
||||
</view>
|
||||
@ -97,6 +100,12 @@
|
||||
url: '/pages/attendance/classes-manage'
|
||||
})
|
||||
}
|
||||
const goIssueRecord = () => {
|
||||
console.log('goIssueRecord')
|
||||
uni.navigateTo({
|
||||
url: '/pages/attendance/issue-record'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
73
src/pages/attendance/allowed-time.vue
Normal file
73
src/pages/attendance/allowed-time.vue
Normal file
@ -0,0 +1,73 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom'
|
||||
}
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="flex flex-col h-100vh">
|
||||
<TopNavigation title="打卡时间限制"></TopNavigation>
|
||||
<view class="bg-[#E2EAFA] px-3 py-2 color-[#3372FA] text-3.3">
|
||||
可设置每次上下班是否需要打卡、允许打卡的时间范围
|
||||
</view>
|
||||
<scroll-view scroll-y class="flex-1">
|
||||
<view class="" v-for="(item, index) in times" :key="index">
|
||||
<view class="color-gray text-3.3 p-3">上班时间段{{ index + 1 }}</view>
|
||||
<view class="bg-white" v-for="(t, i) in item.times" :key="i">
|
||||
<CommonItem :text="'上班' + t" :isNext="false" hint="" noLine>
|
||||
<template v-slot:child>
|
||||
<wd-switch v-model="item.switch[i]" class="ml-a" />
|
||||
</template>
|
||||
</CommonItem>
|
||||
<view class="flex flex-row flex-justify-between mx-4">
|
||||
<view class="bg-[#f6f8fc] rounded-1 p-2 w-48% box-border">
|
||||
<view class="text-2.8 color-gray">最早打卡时间</view>
|
||||
<view class="flex flex-row items-center mt-1.5">
|
||||
<view class="color-[#3372FA] text-3">未设置</view>
|
||||
<view class="i-carbon-next-outline ml-1 text-2.3 color-gray"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-[#f6f8fc] rounded-1 p-2 w-48% box-border">
|
||||
<view class="text-2.8 color-gray">最早打卡时间</view>
|
||||
<view class="flex flex-row items-center mt-1.5">
|
||||
<view class="color-[#3372FA] text-3">未设置</view>
|
||||
<view class="i-carbon-next-outline ml-1 text-2.3 color-gray"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
:class="i != item.times.length - 1 ? '' : 'invisible'"
|
||||
class="hpx mx-4 mt-3 bg-gray-200"
|
||||
></view>
|
||||
</view>
|
||||
<!-- <view v-if="index == times.length - 1">若未设置,</view>s -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="mt-a w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200">
|
||||
<wd-button block>保存</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import CommonItem from '@/components/CommonItemItem/CommonItem.vue'
|
||||
|
||||
const times = ref([
|
||||
{
|
||||
times: ['07:00', '09:00'],
|
||||
switch: [true, false]
|
||||
},
|
||||
{
|
||||
times: ['07:00', '09:00'],
|
||||
switch: [true, false]
|
||||
}
|
||||
])
|
||||
//
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
@ -148,7 +148,7 @@
|
||||
<view
|
||||
class="fixed bottom-0 left-0 w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200"
|
||||
>
|
||||
<wd-button block>保存</wd-button>
|
||||
<wd-button :round="false" block>保存</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
<view
|
||||
class="fixed bottom-0 left-0 w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200"
|
||||
>
|
||||
<wd-button block>保存</wd-button>
|
||||
<wd-button :round="false" block>保存</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
128
src/pages/attendance/classes-add-edit.vue
Normal file
128
src/pages/attendance/classes-add-edit.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom'
|
||||
}
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="h-100vh flex flex-col">
|
||||
<TopNavigation title="新增班次"></TopNavigation>
|
||||
<view class="flex-1 p-3 box-border">
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="班次名称" isMust :isNext="false" value="" hint="" noLine></CommonItem>
|
||||
<view class="flex items-center px-4.3 pb-3 box-border">
|
||||
<input
|
||||
class="w-100%"
|
||||
v-model="name"
|
||||
placeholder="必填"
|
||||
placeholder-class="color-gray"
|
||||
:maxlength="8"
|
||||
/>
|
||||
<view
|
||||
@click="name = ''"
|
||||
v-show="name"
|
||||
class="i-carbon-close-filled color-gray text-4"
|
||||
></view>
|
||||
<view class="text-3 self-center color-gray ml-1">{{ name.length }}/{{ 8 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in times" :key="index">
|
||||
<view class="flex items-center my-3 flex-justify-between text-3">
|
||||
<view class="color-gray ml-4.2">上下班时段{{ index + 1 }}</view>
|
||||
<view v-show="times.length > 1" @click="times.splice(index, 1)" class="color-red mr-4">
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="上班" value="09:00"></CommonItem>
|
||||
<CommonItem text="下班" value="17:00"></CommonItem>
|
||||
<view
|
||||
@click="times.push({ start: '09:00', end: '17:00' })"
|
||||
v-show="index == times.length - 1 && times.length < 3"
|
||||
class="flex flex-justify-center items-center flex-row py-4 box-border"
|
||||
>
|
||||
<wd-icon name="add-circle mr-2" class="color-[#3372FA]" size="17"></wd-icon>
|
||||
<view class="color-[#3372FA]">添加时段</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem @click="goAllowedTime" text="允许打卡时间" value="" hint=""></CommonItem>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem @click="goFlexblePunching" text="弹性打卡" value="" hint="不设置"></CommonItem>
|
||||
</view>
|
||||
<view v-show="times.length == 1" class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem value="" :noLine="haveRest ? false : true">
|
||||
<template v-slot:leftChild>
|
||||
<view>
|
||||
<view>休息时间</view>
|
||||
<view class="color-gray mt-1">中途休息时间不计入出勤时长</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:child>
|
||||
<wd-switch v-model="haveRest" class="ml-a" />
|
||||
</template>
|
||||
</CommonItem>
|
||||
<CommonItem v-show="haveRest" text="休息开始时间" value="12:00"></CommonItem>
|
||||
<CommonItem v-show="haveRest" text="休息结束时间" value="13:00"></CommonItem>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="!isEdit"
|
||||
class="fixed bottom-0 left-0 w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200"
|
||||
>
|
||||
<wd-button :round="false" block>保存</wd-button>
|
||||
</view>
|
||||
<view v-else class="flex flex-row flex-justify-between p-4">
|
||||
<view class="flex-1 mr-2">
|
||||
<wd-button
|
||||
size="large"
|
||||
custom-style="background:#E9EBEF;color:#3372FA"
|
||||
:round="false"
|
||||
block
|
||||
>
|
||||
删除
|
||||
</wd-button>
|
||||
</view>
|
||||
<view class="flex-1 ml-2">
|
||||
<wd-button size="large" :round="false" block>保存</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import CommonItem from '@/components/CommonItemItem/CommonItem.vue'
|
||||
onLoad(options => {
|
||||
isEdit.value = options.isEdit ?? false
|
||||
})
|
||||
const isEdit = ref(false)
|
||||
const name = ref('')
|
||||
const haveRest = ref(false)
|
||||
const times = ref([
|
||||
{
|
||||
start: '09:00',
|
||||
end: '17:00'
|
||||
}
|
||||
])
|
||||
|
||||
const goFlexblePunching = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/attendance/flexible-punching'
|
||||
})
|
||||
}
|
||||
const goAllowedTime = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/attendance/allowed-time'
|
||||
})
|
||||
}
|
||||
//
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
@ -1,101 +0,0 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom'
|
||||
}
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<TopNavigation title="新增班次"></TopNavigation>
|
||||
<view class="h-[calc(100vh-60px)] p-3 box-border">
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="考勤组名称" isMust :isNext="false" value="" hint="" noLine></CommonItem>
|
||||
<view class="flex items-center px-4.3 pb-3 box-border">
|
||||
<input
|
||||
class="w-100%"
|
||||
v-model="name"
|
||||
placeholder="必填"
|
||||
placeholder-class="color-gray"
|
||||
:maxlength="8"
|
||||
/>
|
||||
<view
|
||||
@click="name = ''"
|
||||
v-show="name"
|
||||
class="i-carbon-close-filled color-gray text-4"
|
||||
></view>
|
||||
<view class="text-3 self-center color-gray ml-1">{{ name.length }}/{{ 8 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in times" :key="index">
|
||||
<view class="flex items-center my-3 flex-justify-between text-3">
|
||||
<view class="color-gray ml-4.2">上下班时段{{ index + 1 }}</view>
|
||||
<view v-show="times.length > 1" @click="times.splice(index, 1)" class="color-red mr-4">
|
||||
删除
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="上班" value="09:00"></CommonItem>
|
||||
<CommonItem text="下班" value="17:00"></CommonItem>
|
||||
<view
|
||||
@click="times.push({ start: '09:00', end: '17:00' })"
|
||||
v-show="index == times.length - 1 && times.length < 3"
|
||||
class="flex flex-justify-center items-center flex-row py-4 box-border"
|
||||
>
|
||||
<wd-icon name="add-circle mr-2" class="color-[#3372FA]" size="17"></wd-icon>
|
||||
<view class="color-[#3372FA]">添加时段</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="允许打卡时间" value="" hint=""></CommonItem>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem @click="goFlexblePunching" text="弹性打卡" value="" hint="不设置"></CommonItem>
|
||||
</view>
|
||||
<view v-show="times.length == 1" class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem value="" :noLine="haveRest ? false : true">
|
||||
<template v-slot:leftChild>
|
||||
<view>
|
||||
<view>休息时间</view>
|
||||
<view class="color-gray mt-1">中途休息时间不计入出勤时长</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:child>
|
||||
<wd-switch v-model="haveRest" class="ml-a" />
|
||||
</template>
|
||||
</CommonItem>
|
||||
<CommonItem v-show="haveRest" text="休息开始时间" value="12:00"></CommonItem>
|
||||
<CommonItem v-show="haveRest" text="休息结束时间" value="13:00"></CommonItem>
|
||||
</view>
|
||||
<view
|
||||
class="fixed bottom-0 left-0 w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200"
|
||||
>
|
||||
<wd-button block>保存</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import CommonItem from '@/components/CommonItemItem/CommonItem.vue'
|
||||
|
||||
const name = ref('')
|
||||
const haveRest = ref(false)
|
||||
const times = ref([
|
||||
{
|
||||
start: '09:00',
|
||||
end: '17:00'
|
||||
}
|
||||
])
|
||||
const goFlexblePunching = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/attendance/flexible-punching'
|
||||
})
|
||||
}
|
||||
//
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
@ -21,7 +21,7 @@
|
||||
/>
|
||||
<view v-show="key" class="i-carbon-close-filled color-gray text-4"></view>
|
||||
</view>
|
||||
<view @click="goClassesAdd()" class="bg-white rounded-1.2 mt-2">
|
||||
<view @click="goClassesAddOrEdit(false)" class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="添加班次" noLine value="">
|
||||
<template v-slot:child>
|
||||
<wd-icon name="add-circle" class="ml-a" size="20"></wd-icon>
|
||||
@ -38,7 +38,12 @@
|
||||
:refresher-triggered="scrollViewStatus"
|
||||
>
|
||||
<view class="bg-white rounded-1.2">
|
||||
<CommonItem v-for="(item, index) in classList" :key="index" value="">
|
||||
<CommonItem
|
||||
@click="goClassesAddOrEdit(true)"
|
||||
v-for="(item, index) in classList"
|
||||
:key="index"
|
||||
value=""
|
||||
>
|
||||
<template v-slot:leftChild>
|
||||
<view>
|
||||
<view>{{ item.name }}</view>
|
||||
@ -66,11 +71,12 @@
|
||||
scrollViewStatus.value = false
|
||||
}, 2000)
|
||||
}
|
||||
const goClassesAdd = () => {
|
||||
const goClassesAddOrEdit = (isEdit: boolean) => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/attendance/classes-add'
|
||||
url: '/pages/attendance/classes-add-edit?isEdit=' + isEdit
|
||||
})
|
||||
}
|
||||
|
||||
const classList = ref([
|
||||
{
|
||||
name: '默认班次',
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
<view
|
||||
class="fixed bottom-0 left-0 w-full p-3 box-border border-solid border-0 border-t-1 border-gray-200"
|
||||
>
|
||||
<wd-button block>确定</wd-button>
|
||||
<wd-button :round="false" block>确定</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
50
src/pages/attendance/issue-record.vue
Normal file
50
src/pages/attendance/issue-record.vue
Normal file
@ -0,0 +1,50 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom'
|
||||
}
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="h-100vh flex flex-col">
|
||||
<TopNavigation title="下发记录"></TopNavigation>
|
||||
<view class="bg-orange-100 px-2 py-2 color-orange text-3.3">
|
||||
此处仅展示考勤组中打卡设备的下发记录
|
||||
</view>
|
||||
<scroll-view scroll-y class="flex-1 p-3.5 box-border">
|
||||
<view class="bg-white rounded-1 p-3">
|
||||
<view class="flex flex-row flex-justify-between">
|
||||
<view class="flex flex-col">
|
||||
<view>系统自动操作下发</view>
|
||||
<view class="color-gray">2025-01-07 10:19:28</view>
|
||||
</view>
|
||||
<view class="flex flex-row">
|
||||
<view class="color-[#3372FA]">已完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view
|
||||
class="flex flex-row flex-justify-between px-4 py-3 box-border border-solid border-0 border-t-1 border-gray-200"
|
||||
>
|
||||
<view class="flex-1 mr-2">
|
||||
<wd-button custom-style="background:#E9EBEF;color:#3372FA" :round="false" block>
|
||||
刷新纪录
|
||||
</wd-button>
|
||||
</view>
|
||||
<view class="flex-1 ml-2">
|
||||
<wd-button :round="false" block>手动下发</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
//
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
Loading…
x
Reference in New Issue
Block a user