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

@@ -27,8 +27,9 @@
<view class="white-bg margin-bottom20" v-for="(item, index) in list"> <view class="white-bg margin-bottom20" v-for="(item, index) in list">
<view class="report-list"> <view class="report-list">
<view class="title" <view class="title"
:style="{color: item.mapType == 1 ? '#F5813A' : '#1989FA'}" :style="{color: MapType[item.mapType].color}"
>类型{{ item.mapType == 1 ? '签到' : '打卡' }}</view> >类型{{ MapType[item.mapType].label }}
</view><!--item.mapType == 1 ? '#F5813A' : '#1989FA'}-->
<view class="r-list"> <view class="r-list">
<view class="r-left">开始签到时间</view> <view class="r-left">开始签到时间</view>
<view class="r-right">{{ item.goVisistStartTime }}</view> <view class="r-right">{{ item.goVisistStartTime }}</view>
@@ -66,6 +67,7 @@ import { onMounted, ref } from 'vue';
import {getDate} from '@/utils/datetime.js' import {getDate} from '@/utils/datetime.js'
import {CheckInInformationViewing} from '../../../../api/crm/activity/map'; import {CheckInInformationViewing} from '../../../../api/crm/activity/map';
import {onLoad} from '@dcloudio/uni-app'; import {onLoad} from '@dcloudio/uni-app';
import {MapType} from "./dataMap";
const navBarPaddingTop = ref(0); const navBarPaddingTop = ref(0);
onMounted(() => { onMounted(() => {
@@ -83,6 +85,7 @@ let bindDateChange = (e) => {
//获取list集合信息 //获取list集合信息
let list = ref([]) let list = ref([])
function getList() { function getList() {
CheckInInformationViewing().then(res => { CheckInInformationViewing().then(res => {
list.value = res.rows list.value = res.rows
@@ -93,13 +96,17 @@ onLoad(() => {
getList() getList()
}) })
</script> </script>
<style scoped> <style scoped>
.r-left {
min-width: 6em;
}
.con-bg {
overflow-y: auto;
}
.search { .search {
display: flex; display: flex;
margin-bottom: 30rpx; 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=>{ businessTripClockIn(form).then(res=>{
feedback(res,()=>console.log('出差打卡成功')); feedback(res,()=>console.log('出差打卡成功'));
}).catch(e=>{ }).catch(e=>{
uni.showToast({ console.log(e);
icon: 'none',
title: e
})
}) })
} }
// 打卡 // 打卡
@@ -142,13 +139,8 @@ let handleConfirm = () => {
addStartMapForClockIn(form).then(res=>{ addStartMapForClockIn(form).then(res=>{
feedback(res, ()=>console.log('打卡成功')); feedback(res, ()=>console.log('打卡成功'));
}).catch(e=>{ }).catch(e=>{
uni.showToast({ console.log(e)
icon: 'none',
title: e
}) })
})
} }
// 判定是否在范围内 // 判定是否在范围内