bug
parent
bd73933614
commit
3c9d2b01f0
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
<view class="h-40vh flex-center flex-col">
|
<view class="h-40vh flex-center flex-col">
|
||||||
<view
|
<view
|
||||||
:disabled="noCheck"
|
:disabled="!(Check && isType)"
|
||||||
@click="clockIn"
|
@click="clockIn"
|
||||||
class="w-220rpx h-220rpx rounded-full overflow-hidden card-shadow1 flex-center btn"
|
class="w-220rpx h-220rpx rounded-full overflow-hidden card-shadow1 flex-center btn"
|
||||||
>
|
>
|
||||||
|
|
@ -71,9 +71,9 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="mt-40rpx text-center flex-center flex-col">
|
<view class="mt-40rpx text-center flex-center flex-col">
|
||||||
<view v-if="isGPS === false" class="text-primary text-26rpx"
|
<!-- <view v-if="isGPS === false" class="text-primary text-26rpx"
|
||||||
>定位失败,请检查手机定位权限是否开启</view
|
>定位失败,请检查手机定位权限是否开启</view
|
||||||
>
|
> -->
|
||||||
|
|
||||||
<view class="text-hex-999 text-26rpx">{{ detail.description }}</view>
|
<view class="text-hex-999 text-26rpx">{{ detail.description }}</view>
|
||||||
<view
|
<view
|
||||||
|
|
@ -127,9 +127,20 @@ const form = reactive({
|
||||||
})
|
})
|
||||||
const rules = ref({})
|
const rules = ref({})
|
||||||
|
|
||||||
const noCheck = computed(() => {
|
const Check = computed(() => {
|
||||||
return !detail.value.enable
|
return detail.value.enable
|
||||||
})
|
})
|
||||||
|
const isType = computed(() => {
|
||||||
|
if (detail.value.type == 2) {
|
||||||
|
if (form.type == 2) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
|
||||||
const maxDistance = computed(() => {
|
const maxDistance = computed(() => {
|
||||||
return detail.value.maxDistance
|
return detail.value.maxDistance
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<view
|
<view
|
||||||
class="w-16rpx h-16rpx rounded-full"
|
class="w-16rpx h-16rpx rounded-full"
|
||||||
:style="{background: current.first_time ? '#3c9cff' : '#999'}"
|
:style="{ background: current.first_time ? '#3c9cff' : '#999' }"
|
||||||
></view>
|
></view>
|
||||||
</template>
|
</template>
|
||||||
<template #desc>
|
<template #desc>
|
||||||
|
|
@ -33,6 +33,12 @@
|
||||||
</template>
|
</template>
|
||||||
</uv-steps-item>
|
</uv-steps-item>
|
||||||
<uv-steps-item title="下班打卡">
|
<uv-steps-item title="下班打卡">
|
||||||
|
<template #icon>
|
||||||
|
<view
|
||||||
|
class="w-16rpx h-16rpx rounded-full"
|
||||||
|
:style="{ background: current.last_time ? '#3c9cff' : '#999' }"
|
||||||
|
></view>
|
||||||
|
</template>
|
||||||
<template #desc>
|
<template #desc>
|
||||||
<view class="text-24rpx text-hex-999">{{ current.last_time }}</view>
|
<view class="text-24rpx text-hex-999">{{ current.last_time }}</view>
|
||||||
<view class="flex" v-if="!current.last_time">
|
<view class="flex" v-if="!current.last_time">
|
||||||
|
|
@ -44,7 +50,7 @@
|
||||||
<view
|
<view
|
||||||
@click="goC"
|
@click="goC"
|
||||||
class="flex text-24rpx mt-10rpx"
|
class="flex text-24rpx mt-10rpx"
|
||||||
v-if="current?.sign_status == 2 || current?.sign_status == 3"
|
v-if="current?.sign_status != 1"
|
||||||
>
|
>
|
||||||
<view class="text-hex-3c9cff">补卡申请></view>
|
<view class="text-hex-3c9cff">补卡申请></view>
|
||||||
<view>更新打卡</view>
|
<view>更新打卡</view>
|
||||||
|
|
@ -53,23 +59,27 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { http } from '@/utils/request'
|
import { http } from '@/utils/request'
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
|
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
|
||||||
import CuCalendars from '@/components/cu-calendars/uv-calendars'
|
import CuCalendars from '@/components/cu-calendars/uv-calendars'
|
||||||
const selected = ref([])
|
const selected = ref([])
|
||||||
|
const time = ref('')
|
||||||
|
const date = ref('')
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getData()
|
getData()
|
||||||
})
|
})
|
||||||
|
|
||||||
const current = ref(null)
|
const current = computed(
|
||||||
|
() => selected.value.find((e) => e.date == date.value)?.data ?? {}
|
||||||
|
)
|
||||||
|
|
||||||
const getData = async (date) => {
|
const getData = async () => {
|
||||||
const res = await http.get('/hr/sign', {
|
const res = await http.get('/hr/sign', {
|
||||||
params: {
|
params: {
|
||||||
time: date,
|
time: time.value,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if (!current.value)
|
if (!current.value)
|
||||||
|
|
@ -92,11 +102,12 @@ const getData = async (date) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChange = ({ year, month }) => {
|
const onChange = ({ year, month }) => {
|
||||||
getData(`${year}-${month}`)
|
time.value = `${year}-${month}`
|
||||||
|
getData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChangeDay = (e) => {
|
const onChangeDay = (e) => {
|
||||||
current.value = e.extraInfo?.data
|
date.value = e.fulldate
|
||||||
}
|
}
|
||||||
|
|
||||||
const goC = () => {
|
const goC = () => {
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,7 @@ const rules = reactive({
|
||||||
{ required: true, message: '请输入新登录密码' },
|
{ required: true, message: '请输入新登录密码' },
|
||||||
{
|
{
|
||||||
min: 6,
|
min: 6,
|
||||||
max: 15,
|
message: '密码不能少于6位字符',
|
||||||
message: '密码长度在 6 到 15 个字符',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (rule, value) => {
|
validator: (rule, value) => {
|
||||||
|
|
|
||||||
|
|
@ -124,9 +124,7 @@ const rules = computed(() => {
|
||||||
phone: [
|
phone: [
|
||||||
{ required: true, message: '请输入手机号' },
|
{ required: true, message: '请输入手机号' },
|
||||||
{
|
{
|
||||||
validator: (rule, value) => {
|
max: 11,
|
||||||
return mobile(value)
|
|
||||||
},
|
|
||||||
message: '请输入正确的手机号',
|
message: '请输入正确的手机号',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -135,8 +133,7 @@ const rules = computed(() => {
|
||||||
{ required: !isEdit.value, message: '请输入登录密码' },
|
{ required: !isEdit.value, message: '请输入登录密码' },
|
||||||
{
|
{
|
||||||
min: 6,
|
min: 6,
|
||||||
max: 15,
|
message: '密码不能少于6位字符',
|
||||||
message: '密码长度在 6 到 15 个字符',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (rule, value) => {
|
validator: (rule, value) => {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<uv-form-item required label="性别" prop="sex" @click="openPicker">
|
<uv-form-item required label="性别" prop="sex" @click="openPicker">
|
||||||
<uv-input
|
<uv-input
|
||||||
placeholder="请选择性别"
|
placeholder="请选择性别"
|
||||||
disabled
|
readonly
|
||||||
inputAlign="right"
|
inputAlign="right"
|
||||||
:border="`none`"
|
:border="`none`"
|
||||||
v-model="form.sex"
|
v-model="form.sex"
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
>
|
>
|
||||||
<uv-input
|
<uv-input
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
disabled
|
readonly
|
||||||
inputAlign="right"
|
inputAlign="right"
|
||||||
:border="`none`"
|
:border="`none`"
|
||||||
v-model="form.first_work_time"
|
v-model="form.first_work_time"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue