Compare commits

2 Commits

Author SHA1 Message Date
wangzhuo
af25a14c17 fea: 打卡查看-支持出差打卡类型 2025-09-24 16:51:33 +08:00
wangzhuo
082d60e2da feat: 出差打卡-简化提示 2025-09-24 16:51:33 +08:00
3 changed files with 125 additions and 117 deletions

View File

@@ -10,25 +10,26 @@
<!-- 正文内容 -->
<view>
<!-- 搜索 -->
<!-- <view class="search">-->
<!-- <picker mode="date" :value="defaultDate" :start="startDate" :end="endDate" @change="bindDateChange"-->
<!-- class="picker-bg">-->
<!-- <view class="picker">-->
<!-- <uni-icons custom-prefix="iconfont" color="#ffffff" type="icon-phoneshizhong"-->
<!-- size="18"></uni-icons>-->
<!-- <view>{{ defaultDate }}</view>-->
<!-- <uni-icons type="down" size="18"></uni-icons>-->
<!-- </view>-->
<!-- </picker>-->
<!-- <button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>-->
<!-- </view>-->
<!-- <view class="search">-->
<!-- <picker mode="date" :value="defaultDate" :start="startDate" :end="endDate" @change="bindDateChange"-->
<!-- class="picker-bg">-->
<!-- <view class="picker">-->
<!-- <uni-icons custom-prefix="iconfont" color="#ffffff" type="icon-phoneshizhong"-->
<!-- size="18"></uni-icons>-->
<!-- <view>{{ defaultDate }}</view>-->
<!-- <uni-icons type="down" size="18"></uni-icons>-->
<!-- </view>-->
<!-- </picker>-->
<!-- <button type="default" @click="handleSearch" size="mini" class="btn-search">查询</button>-->
<!-- </view>-->
<!-- 分页部分 -->
<view class="white-bg margin-bottom20" v-for="(item, index) in list">
<view class="report-list" >
<view class="report-list">
<view class="title"
:style="{color: item.mapType == 1 ? '#F5813A' : '#1989FA'}"
>类型{{ item.mapType == 1 ? '签到' : '打卡' }}</view>
:style="{color: MapType[item.mapType].color}"
>类型{{ MapType[item.mapType].label }}
</view><!--item.mapType == 1 ? '#F5813A' : '#1989FA'}-->
<view class="r-list">
<view class="r-left">开始签到时间</view>
<view class="r-right">{{ item.goVisistStartTime }}</view>
@@ -61,11 +62,12 @@
<script setup>
import customHeader from '@/components/customHeader.vue'
import { getNavBarPaddingTop } from '@/utils/system.js'
import { onMounted, ref } from 'vue';
import { getDate } from '@/utils/datetime.js'
import { CheckInInformationViewing } from '../../../../api/crm/activity/map';
import { onLoad } from '@dcloudio/uni-app';
import {getNavBarPaddingTop} from '@/utils/system.js'
import {onMounted, ref} from 'vue';
import {getDate} from '@/utils/datetime.js'
import {CheckInInformationViewing} from '../../../../api/crm/activity/map';
import {onLoad} from '@dcloudio/uni-app';
import {MapType} from "./dataMap";
const navBarPaddingTop = ref(0);
onMounted(() => {
@@ -76,13 +78,14 @@ onMounted(() => {
let startDate = getDate('start');
// 结束时间间隔10年
let endDate = getDate('end');
let defaultDate = getDate({ format: true })
let defaultDate = getDate({format: true})
let bindDateChange = (e) => {
defaultDate = e.detail.value
}
//获取list集合信息
let list = ref([])
function getList() {
CheckInInformationViewing().then(res => {
list.value = res.rows
@@ -93,13 +96,17 @@ onLoad(() => {
getList()
})
</script>
<style scoped>
.r-left {
min-width: 6em;
}
.con-bg {
overflow-y: auto;
}
.search {
display: flex;
margin-bottom: 30rpx;

View File

@@ -0,0 +1,9 @@
/**
* 签到/打卡/出差
* @type {{"1": {label: 签到, bgc: string}, "2": {label: 打卡, bgc: string}, "3": {label: 出差, bgc: string}}}
*/
export const MapType = {
'1': {label:'签到', color:'#F5813A'},
'2': {label:'打卡', color:'#1989FA'},
'3': {label:'出差', color:'#42b883'}
}

View File

@@ -131,10 +131,7 @@ const handleCancel = () => {
businessTripClockIn(form).then(res=>{
feedback(res,()=>console.log('出差打卡成功'));
}).catch(e=>{
uni.showToast({
icon: 'none',
title: e
})
console.log(e);
})
}
// 打卡
@@ -142,13 +139,8 @@ let handleConfirm = () => {
addStartMapForClockIn(form).then(res=>{
feedback(res, ()=>console.log('打卡成功'));
}).catch(e=>{
uni.showToast({
icon: 'none',
title: e
console.log(e)
})
})
}
// 判定是否在范围内