main
parent
a8820eeaa9
commit
453cef0e2e
|
|
@ -2,7 +2,11 @@
|
||||||
<view class="px-base">
|
<view class="px-base">
|
||||||
<CuNavbar title="考勤打卡">
|
<CuNavbar title="考勤打卡">
|
||||||
<template #right>
|
<template #right>
|
||||||
<view @click="goPage('/pages/clockout/logs')" class="text-24rpx text-white">打卡记录</view>
|
<view
|
||||||
|
@click="goPage('/pages/clockout/logs')"
|
||||||
|
class="text-24rpx text-white"
|
||||||
|
>打卡记录</view
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</CuNavbar>
|
</CuNavbar>
|
||||||
<view class="card-shadow px-base mt-base">
|
<view class="card-shadow px-base mt-base">
|
||||||
|
|
@ -14,12 +18,18 @@
|
||||||
labelWidth="160rpx"
|
labelWidth="160rpx"
|
||||||
errorType="toast"
|
errorType="toast"
|
||||||
>
|
>
|
||||||
<uv-form-item @click="openPicker" prop="sign">
|
<uv-form-item :label="form.sign_time" @click="openPicker" prop="sign">
|
||||||
<uv-input
|
<view class="w-full">
|
||||||
:border="`none`"
|
<view class="text-hex-999" v-if="!form.sign_time">
|
||||||
readonly
|
请选择打卡时间
|
||||||
v-model="form.sign_time"
|
</view>
|
||||||
></uv-input>
|
<!-- <uv-input
|
||||||
|
:border="`none`"
|
||||||
|
readonly
|
||||||
|
v-model="form.sign_time"
|
||||||
|
placeholder="请选择打卡时间"
|
||||||
|
></uv-input> -->
|
||||||
|
</view>
|
||||||
<template v-slot:right>
|
<template v-slot:right>
|
||||||
<uv-icon name="arrow-right"></uv-icon>
|
<uv-icon name="arrow-right"></uv-icon>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -50,7 +60,7 @@
|
||||||
|
|
||||||
<view class="h-40vh flex-center flex-col">
|
<view class="h-40vh flex-center flex-col">
|
||||||
<view
|
<view
|
||||||
:disabled="noCheck && maxDistance!=0"
|
:disabled="noCheck && maxDistance != 0"
|
||||||
@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"
|
||||||
>
|
>
|
||||||
|
|
@ -87,7 +97,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import CuNavbar from '@/components/cu-navbar/index'
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import { ref, onMounted, reactive,computed } from 'vue'
|
import { ref, onMounted, reactive, computed } from 'vue'
|
||||||
import { http } from '@/utils/request'
|
import { http } from '@/utils/request'
|
||||||
import { timeFormat } from '@climblee/uv-ui/libs/function'
|
import { timeFormat } from '@climblee/uv-ui/libs/function'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
|
@ -154,7 +164,7 @@ const getLoca = async () => {
|
||||||
position.value = {
|
position.value = {
|
||||||
lat: e.latitude,
|
lat: e.latitude,
|
||||||
lon: e.longitude,
|
lon: e.longitude,
|
||||||
...e
|
...e,
|
||||||
}
|
}
|
||||||
initLo()
|
initLo()
|
||||||
},
|
},
|
||||||
|
|
@ -162,14 +172,13 @@ const getLoca = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const initLo = async () => {
|
const initLo = async () => {
|
||||||
console.log(position.value);
|
const resdata = await http.get('/hr/sign/info', {
|
||||||
const resdata = await http.get('/hr/sign/info',{
|
|
||||||
params: {
|
params: {
|
||||||
...position.value
|
...position.value,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
detail.value = resdata
|
detail.value = resdata
|
||||||
form.type = resdata.type
|
// form.type = resdata.type
|
||||||
form.sign_time = timeList.value[0].find((e) => e.value == resdata.time)?.name
|
form.sign_time = timeList.value[0].find((e) => e.value == resdata.time)?.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,13 +56,14 @@
|
||||||
import { ref } from 'vue'
|
import { ref } 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 } 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([])
|
||||||
onLoad(() => {
|
onShow(() => {
|
||||||
getData()
|
getData()
|
||||||
})
|
})
|
||||||
|
|
||||||
const current = ref(null)
|
const current = ref(null)
|
||||||
|
|
||||||
const getData = async (date) => {
|
const getData = async (date) => {
|
||||||
|
|
@ -101,8 +102,8 @@ const onChangeDay = (e) => {
|
||||||
const goC = () => {
|
const goC = () => {
|
||||||
// /pages/make-card/create
|
// /pages/make-card/create
|
||||||
let type
|
let type
|
||||||
if (!current.value.last_time) type = 1
|
if (!current.value.last_time) type = 2
|
||||||
if (!current.value.first_time) type = 2
|
if (!current.value.first_time) type = 1
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/make-card/create?date=${current.value.date}&type=${type}`,
|
url: `/pages/make-card/create?date=${current.value.date}&type=${type}`,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,16 @@
|
||||||
class="absolute top-20rpx right-20rpx z-888"
|
class="absolute top-20rpx right-20rpx z-888"
|
||||||
@click="goPath('/pages/message/index')"
|
@click="goPath('/pages/message/index')"
|
||||||
>
|
>
|
||||||
<cu-badge :value="unread_notifications" color="#fff" bgColor="transparent">
|
<cu-badge
|
||||||
|
:value="unread_notifications"
|
||||||
|
color="#fff"
|
||||||
|
bgColor="transparent"
|
||||||
|
>
|
||||||
<uv-icon color="#fff" size="48rpx" name="chat"></uv-icon>
|
<uv-icon color="#fff" size="48rpx" name="chat"></uv-icon>
|
||||||
</cu-badge>
|
</cu-badge>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<swiper>
|
<swiper class="h-300rpx">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="mt-60rpx">昨日累计金额</view>
|
<view class="mt-60rpx">昨日累计金额</view>
|
||||||
<view class="mt-20rpx">截止{{ yesday_ledger.date }}</view>
|
<view class="mt-20rpx">截止{{ yesday_ledger.date }}</view>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue