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