feat: 1.考勤规则页面
This commit is contained in:
parent
e2653a3674
commit
b73b5e52b2
@ -32,6 +32,7 @@
|
||||
>
|
||||
确定
|
||||
</wd-button>
|
||||
<view v-else class="mx-3 my-5"></view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
</template>
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
<template>
|
||||
<view class="mx-2">
|
||||
<view class="flex flex-row items-center py-4">
|
||||
<view class="mr-0.5" :class="isMust ? 'color-transparent' : 'color-red'">*</view>
|
||||
<view class="mr-0.5" :class="isMust ? 'color-red' : 'color-transparent'">*</view>
|
||||
<view>{{ text }}</view>
|
||||
<view v-if="$slots.child" class="flex-1 mx-2"><slot name="child" class="flex-1"></slot></view>
|
||||
<view v-if="$slots.child" class="flex-1 flex flex-row mx-2">
|
||||
<slot name="child" class="flex-1"></slot>
|
||||
</view>
|
||||
<view v-if="!$slots.child" class="flex-1 flex flex-row flex-justify-end items-center">
|
||||
<view v-if="!value" class="color-gray">{{ hint }}</view>
|
||||
<view v-else class="color-[#656567]">{{ value }}</view>
|
||||
@ -15,7 +17,7 @@
|
||||
></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!noLine" class="hpx bg-gray-300 mx-2.5"></view>
|
||||
<view v-if="!noLine" class="hpx bg-gray-100 mx-2.5"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@ -55,7 +55,6 @@
|
||||
showWay = false
|
||||
}
|
||||
"
|
||||
:onSure="() => {}"
|
||||
noSure
|
||||
>
|
||||
<template v-slot:child>
|
||||
@ -63,7 +62,12 @@
|
||||
<view class="bg-white rounded-1 mt-2">
|
||||
<view
|
||||
class="flex flex-row items-center p-3 box-border"
|
||||
@click="wayIndex = index"
|
||||
@click="
|
||||
() => {
|
||||
wayIndex = index
|
||||
showWay = false
|
||||
}
|
||||
"
|
||||
v-for="(item, index) in wayList"
|
||||
:key="index"
|
||||
>
|
||||
@ -85,7 +89,7 @@
|
||||
<CommonItem text="考勤组名称" isMust value="有多少">
|
||||
<template v-slot:child>
|
||||
<input
|
||||
class="text-right"
|
||||
class="text-right w-100%"
|
||||
v-model="name"
|
||||
placeholder="必填"
|
||||
placeholder-class="color-gray"
|
||||
@ -117,12 +121,23 @@
|
||||
}
|
||||
"
|
||||
text="打卡方式"
|
||||
value="打卡设备"
|
||||
:value="wayList[wayIndex].title"
|
||||
></CommonItem>
|
||||
<CommonItem text="打卡设备" isMust noLine value="" hint="未选择"></CommonItem>
|
||||
<CommonItem
|
||||
text="打卡设备"
|
||||
:isMust="wayIndex == 0"
|
||||
:noLine="wayIndex == 0"
|
||||
value=""
|
||||
hint="未选择"
|
||||
></CommonItem>
|
||||
<CommonItem text="打卡地点" v-show="wayIndex == 1" value="" hint="未设置"></CommonItem>
|
||||
<CommonItem text="打卡WIFI" v-show="wayIndex == 1" noLine value="" hint="未设置"></CommonItem>
|
||||
</view>
|
||||
<view @click="goOtsideRule()" v-show="wayIndex == 1" class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="外勤规则" noLine value="允许外勤卡" hint=""></CommonItem>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="加班统计规则" noLine value="" hint="未开启"></CommonItem>
|
||||
<CommonItem text="加班统计规则" noLine value="未开启" hint=""></CommonItem>
|
||||
</view>
|
||||
<view class="fixed bottom-0 left-0 w-full p-3 box-border">
|
||||
<wd-button block>保存</wd-button>
|
||||
@ -169,6 +184,17 @@
|
||||
desc: '选择后可开启外勤打卡'
|
||||
}
|
||||
]
|
||||
const outsideRule = {
|
||||
allow: false,
|
||||
takePhoto: false,
|
||||
remark: false,
|
||||
selectPhoto: false
|
||||
}
|
||||
const goOtsideRule = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/attendance/attendance-add-group/outside-rules'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
56
src/pages/attendance/attendance-add-group/outside-rules.vue
Normal file
56
src/pages/attendance/attendance-add-group/outside-rules.vue
Normal file
@ -0,0 +1,56 @@
|
||||
<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">
|
||||
<CommonItem text="允许外勤打卡" noLine value="">
|
||||
<template v-slot:child>
|
||||
<wd-switch v-model="checked" class="ml-a" />
|
||||
</template>
|
||||
</CommonItem>
|
||||
</view>
|
||||
<view class="bg-white rounded-1.2 mt-2">
|
||||
<CommonItem text="外勤打卡必须拍照" value="">
|
||||
<template v-slot:child>
|
||||
<wd-switch v-model="checked" class="ml-a" />
|
||||
</template>
|
||||
</CommonItem>
|
||||
<CommonItem text="外勤卡必须填写备注" value="">
|
||||
<template v-slot:child>
|
||||
<wd-switch v-model="checked" class="ml-a" />
|
||||
</template>
|
||||
</CommonItem>
|
||||
<CommonItem text="允许从手机相册选择照片" noLine value="">
|
||||
<template v-slot:child>
|
||||
<wd-switch v-model="checked" class="ml-a" />
|
||||
</template>
|
||||
</CommonItem>
|
||||
</view>
|
||||
<view class=""></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import CommonItem from '@/components/CommonItemItem/CommonItem.vue'
|
||||
const checked = ref(false)
|
||||
const props = defineProps({
|
||||
outsideRules: {
|
||||
type: OutsideRules,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f6f8fc;
|
||||
}
|
||||
</style>
|
||||
@ -47,3 +47,9 @@ export enum PlatId {
|
||||
miniProgram = 3,
|
||||
pc = 4
|
||||
}
|
||||
export type OutsideRules = {
|
||||
allow: boolean
|
||||
takePhoto: boolean
|
||||
remark: boolean
|
||||
selectPhoto: boolean
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user