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