main
ihzero 2024-04-27 23:08:50 +08:00
parent 4f5d873a2a
commit c2b770628a
4 changed files with 96 additions and 19 deletions

View File

@ -5,6 +5,10 @@ export default {
const userStore = useUserStoreWithOut()
if (userStore.isLogin) {
userStore.fetchUserInfo()
}else{
uni.reLaunch({
url: '/pages/login/index',
})
}
// #ifdef APP-PLUS
if (userStore.isLogin) {

View File

@ -1,9 +1,12 @@
<template>
<view class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="goPath">
<view
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
@click="goPath"
>
<view class="text-30rpx"> 请假申请</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">请假类型</view>
<view class="">{{ item.type.name }}</view>
<view class="">{{ item.type?.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">请假事由</view>
@ -11,26 +14,44 @@
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx"> 申请时间</view>
<view class="text-24rpx">{{ timeFormat(item.created_at, "yyyy-mm-dd hh:MM") }}</view>
<view class="text-24rpx">{{
timeFormat(item.created_at, 'yyyy-mm-dd hh:MM')
}}</view>
</view>
<view
:style="{
color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color')
color: statusFun(
item.workflow_check.check_status,
'workflow_check',
'color'
),
}"
class="text-24rpx"
>{{ statusFun(item.workflow_check.check_status, "workflow_check", "name") }}</view
>{{
statusFun(item.workflow_check.check_status, 'workflow_check', 'name')
}}</view
>
</view>
</template>
<script setup>
import statusFun from "@/utils/status"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
import statusFun from '@/utils/status'
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
const props = defineProps({
item: Object
item: Object,
type: Number,
subject_type: String,
})
const goPath = () => {
uni.navigateTo({
url: `/pages/ask-leave/detail?id=${props.item.id}`
})
const type = props.type
if (type == 0) {
uni.navigateTo({
url: `/pages/ask-leave/detail?id=${props.item.id}`,
})
}
if (type == 1) {
uni.navigateTo({
url: `/pages/audits/detail?id=${props.item.id}&type=${props.subject_type}`
})
}
}
</script>

View File

@ -28,7 +28,7 @@
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<Item :item="item" :type="0"></Item>
</view>
</view>
</template>
@ -39,11 +39,16 @@
:i="1"
:index="tabIndex"
:apiUrl="tabList[1].apiUrl"
:params="tabList[1].params"
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<Item
:item="item"
:type="1"
:subject_type="tabList[1].params.subject_type"
></Item>
</view>
</view>
</template>
@ -67,6 +72,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'holiday_applies',
include: 'employee,store,type',
},
},
])

View File

@ -164,25 +164,25 @@ export default {
}, {
title: '电话号码',
dataIndex: 'employee.phone'
},{
}, {
title: '申请时间',
dataIndex: 'created_at',
format: timeFormat,
},{
}, {
title: '补卡时间',
dataIndex: 'date',
format: (e)=>timeFormat(e,'yyyy-mm-dd hh:MM')
},{
format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM')
}, {
title: '补卡原因',
dataIndex: 'reason',
labelPosition: 'top',
},{
}, {
title: '是否外勤',
dataIndex: 'sign_type',
format: (e) => {
return e == 1 ? '否' : '是'
}
},{
}, {
title: '外勤事由',
dataIndex: 'outside_remarks',
labelPosition: 'top',
@ -191,5 +191,51 @@ export default {
return item?.sign_type == 2
}
}]
},
//请假申请
holiday_applies: {
params: {
include: 'employee,store,type'
},
data: [{
title: '审核状态',
dataIndex: 'workflow_check.check_status_text',
},
{
title: '未通过理由',
dataIndex: 'workflow_check.check_remarks',
labelPosition: 'top',
isShow: (item) => {
return item?.workflow_check?.check_status == 4
},
}, {
title: '申请人',
dataIndex: 'employee.name',
}, {
title: '所属门店',
dataIndex: 'store.title',
}, {
title: '电话号码',
dataIndex: 'employee.phone'
}, {
title: '申请时间',
dataIndex: 'created_at',
format: (e)=>timeFormat(e,'yyyy-mm-dd hh:MM'),
}, {
title: '请假类型',
dataIndex: 'type.name',
}, {
title: '请假开始时间',
dataIndex: 'start_at',
format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'),
}, {
title: '请假结束时间',
dataIndex: 'end_at',
format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'),
}, {
title: '请假原因',
dataIndex: 'reason',
labelPosition: 'top',
}]
}
}