main
parent
4f5d873a2a
commit
c2b770628a
|
|
@ -5,6 +5,10 @@ export default {
|
||||||
const userStore = useUserStoreWithOut()
|
const userStore = useUserStoreWithOut()
|
||||||
if (userStore.isLogin) {
|
if (userStore.isLogin) {
|
||||||
userStore.fetchUserInfo()
|
userStore.fetchUserInfo()
|
||||||
|
}else{
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/index',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
if (userStore.isLogin) {
|
if (userStore.isLogin) {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
<template>
|
<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-30rpx"> 请假申请</view>
|
||||||
<view class="text-24rpx text-hex-999999 flex">
|
<view class="text-24rpx text-hex-999999 flex">
|
||||||
<view class="text-24rpx w-140rpx">请假类型:</view>
|
<view class="text-24rpx w-140rpx">请假类型:</view>
|
||||||
<view class="">{{ item.type.name }}</view>
|
<view class="">{{ item.type?.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-24rpx text-hex-999999 flex">
|
<view class="text-24rpx text-hex-999999 flex">
|
||||||
<view class="text-24rpx w-140rpx">请假事由:</view>
|
<view class="text-24rpx w-140rpx">请假事由:</view>
|
||||||
|
|
@ -11,26 +14,44 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center text-hex-999999 flex">
|
<view class="flex items-center text-hex-999999 flex">
|
||||||
<view class="text-24rpx w-140rpx"> 申请时间:</view>
|
<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>
|
||||||
<view
|
<view
|
||||||
:style="{
|
:style="{
|
||||||
color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color')
|
color: statusFun(
|
||||||
|
item.workflow_check.check_status,
|
||||||
|
'workflow_check',
|
||||||
|
'color'
|
||||||
|
),
|
||||||
}"
|
}"
|
||||||
class="text-24rpx"
|
class="text-24rpx"
|
||||||
>{{ statusFun(item.workflow_check.check_status, "workflow_check", "name") }}</view
|
>{{
|
||||||
|
statusFun(item.workflow_check.check_status, 'workflow_check', 'name')
|
||||||
|
}}</view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import statusFun from "@/utils/status"
|
import statusFun from '@/utils/status'
|
||||||
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
|
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: Object
|
item: Object,
|
||||||
|
type: Number,
|
||||||
|
subject_type: String,
|
||||||
})
|
})
|
||||||
const goPath = () => {
|
const goPath = () => {
|
||||||
uni.navigateTo({
|
const type = props.type
|
||||||
url: `/pages/ask-leave/detail?id=${props.item.id}`
|
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>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<template v-slot="{ list }">
|
<template v-slot="{ list }">
|
||||||
<view class="space-y-15rpx p-base">
|
<view class="space-y-15rpx p-base">
|
||||||
<view v-for="(item, i) in list" :key="i">
|
<view v-for="(item, i) in list" :key="i">
|
||||||
<Item :item="item"></Item>
|
<Item :item="item" :type="0"></Item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -39,11 +39,16 @@
|
||||||
:i="1"
|
:i="1"
|
||||||
:index="tabIndex"
|
:index="tabIndex"
|
||||||
:apiUrl="tabList[1].apiUrl"
|
:apiUrl="tabList[1].apiUrl"
|
||||||
|
:params="tabList[1].params"
|
||||||
>
|
>
|
||||||
<template v-slot="{ list }">
|
<template v-slot="{ list }">
|
||||||
<view class="space-y-15rpx p-base">
|
<view class="space-y-15rpx p-base">
|
||||||
<view v-for="(item, i) in list" :key="i">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -67,6 +72,7 @@ const tabList = ref([
|
||||||
apiUrl: '/workflow',
|
apiUrl: '/workflow',
|
||||||
params: {
|
params: {
|
||||||
subject_type: 'holiday_applies',
|
subject_type: 'holiday_applies',
|
||||||
|
include: 'employee,store,type',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -164,25 +164,25 @@ export default {
|
||||||
}, {
|
}, {
|
||||||
title: '电话号码',
|
title: '电话号码',
|
||||||
dataIndex: 'employee.phone'
|
dataIndex: 'employee.phone'
|
||||||
},{
|
}, {
|
||||||
title: '申请时间',
|
title: '申请时间',
|
||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
format: timeFormat,
|
format: timeFormat,
|
||||||
},{
|
}, {
|
||||||
title: '补卡时间',
|
title: '补卡时间',
|
||||||
dataIndex: 'date',
|
dataIndex: 'date',
|
||||||
format: (e)=>timeFormat(e,'yyyy-mm-dd hh:MM')
|
format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM')
|
||||||
},{
|
}, {
|
||||||
title: '补卡原因',
|
title: '补卡原因',
|
||||||
dataIndex: 'reason',
|
dataIndex: 'reason',
|
||||||
labelPosition: 'top',
|
labelPosition: 'top',
|
||||||
},{
|
}, {
|
||||||
title: '是否外勤',
|
title: '是否外勤',
|
||||||
dataIndex: 'sign_type',
|
dataIndex: 'sign_type',
|
||||||
format: (e) => {
|
format: (e) => {
|
||||||
return e == 1 ? '否' : '是'
|
return e == 1 ? '否' : '是'
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
title: '外勤事由',
|
title: '外勤事由',
|
||||||
dataIndex: 'outside_remarks',
|
dataIndex: 'outside_remarks',
|
||||||
labelPosition: 'top',
|
labelPosition: 'top',
|
||||||
|
|
@ -191,5 +191,51 @@ export default {
|
||||||
return item?.sign_type == 2
|
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',
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue