Compare commits

..

No commits in common. "c2b770628a45b844523304ea36e220ee89c6a89b" and "2e7bd9d7d08cc78644e62dcc500a96efc169b516" have entirely different histories.

13 changed files with 62 additions and 308 deletions

View File

@ -5,10 +5,6 @@ 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) {

View File

@ -1,12 +1,9 @@
<template> <template>
<view <view class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="goPath">
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>
@ -14,44 +11,26 @@
</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">{{ <view class="text-24rpx">{{ timeFormat(item.created_at, "yyyy-mm-dd hh:MM") }}</view>
timeFormat(item.created_at, 'yyyy-mm-dd hh:MM')
}}</view>
</view> </view>
<view <view
:style="{ :style="{
color: statusFun( color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color')
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 = () => {
const type = props.type
if (type == 0) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/ask-leave/detail?id=${props.item.id}`, 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>

View File

@ -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" :type="0"></Item> <Item :item="item"></Item>
</view> </view>
</view> </view>
</template> </template>
@ -39,16 +39,11 @@
: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>
@ -72,7 +67,6 @@ const tabList = ref([
apiUrl: '/workflow', apiUrl: '/workflow',
params: { params: {
subject_type: 'holiday_applies', subject_type: 'holiday_applies',
include: 'employee,store,type',
}, },
}, },
]) ])

View File

@ -1,11 +1,10 @@
<template> <template>
<uv-form labelWidth="200rpx"> <uv-form labelWidth="160rpx">
<template v-for="(item, i) in columsList" :key="i"> <template v-for="(item, i) in columsList" :key="i">
<template v-if="item.show"> <template v-if="item.show">
<uv-form-item <uv-form-item
v-if="item.type == 'album'" v-if="item.type == 'album'"
:label="item.title" :label="item.title"
:labelWidth="item.labelWidth"
labelPosition="top" labelPosition="top"
> >
<!-- {{ item.value }} --> <!-- {{ item.value }} -->
@ -24,7 +23,6 @@
v-else v-else
:label="item.title" :label="item.title"
:labelPosition="item.labelPosition" :labelPosition="item.labelPosition"
:labelWidth="item.labelWidth"
> >
<view <view
class="w-full text-hex-999" class="w-full text-hex-999"

View File

@ -3,18 +3,10 @@ export default {
//清洁任务 //清洁任务
task_hygienes: { task_hygienes: {
data: [ data: [
{ // {
title: '审核状态', // title: '申请人',
dataIndex: 'workflow_check.check_status_text', // dataIndex: 'name',
}, // },
{
title: '未通过理由',
dataIndex: 'workflow_check.check_remarks',
labelPosition: 'top',
isShow: (item) => {
return item?.workflow_check?.check_status == 4
},
},
{ {
title: '所属门店', title: '所属门店',
dataIndex: 'taskable.store.title', dataIndex: 'taskable.store.title',
@ -42,7 +34,6 @@ export default {
}, },
], ],
}, },
//报销
reimbursements: { reimbursements: {
params: { params: {
include: 'employee,store,type', include: 'employee,store,type',
@ -55,7 +46,6 @@ export default {
{ {
title: '未通过理由', title: '未通过理由',
dataIndex: 'workflow_check.check_remarks', dataIndex: 'workflow_check.check_remarks',
labelPosition: 'top',
isShow: (item) => { isShow: (item) => {
return item?.workflow_check?.check_status == 4 return item?.workflow_check?.check_status == 4
}, },
@ -79,163 +69,5 @@ export default {
type: 'album', type: 'album',
}, },
] ]
},
//升职
employee_promotions: {
params: {
include: 'employee,invitor,job',
},
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: 'job.name',
}, {
title: '推荐人',
dataIndex: 'invitor.name',
}, {
title: '申请人',
dataIndex: 'employee.name',
}, {
title: '年龄',
dataIndex: 'employee_data.age',
}, {
title: '性别',
dataIndex: 'employee_data.sex',
}, {
title: '学历',
dataIndex: 'employee_data.education',
}, {
title: '首次参加工作时间',
dataIndex: 'employee_data.first_work_time',
labelWidth: "250rpx"
}, {
title: '工作年限',
dataIndex: 'employee_data.work_years',
}, {
title: '本公司工作年限',
dataIndex: 'employee_data.work_years_in_company',
}, {
title: '员工自评',
dataIndex: 'employee_data.comment_self',
labelPosition: 'top',
}, {
title: '未来计划',
dataIndex: 'employee_data.plans',
labelPosition: 'top',
}, {
title: '推荐理由',
dataIndex: 'employee_data.reason',
labelPosition: 'top',
}]
},
//补卡申请
employee_sign_repairs: {
params: {
include: 'employee,store',
},
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: timeFormat,
}, {
title: '补卡时间',
dataIndex: 'date',
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',
isShow: (item) => {
console.log(item);
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',
}]
} }
} }

View File

@ -124,6 +124,7 @@ const getData = async () => {
}) })
data.value = resData.data data.value = resData.data
checkable.value = resData.checkable checkable.value = resData.checkable
console.log(resData)
} }
const goPath = (url) => { const goPath = (url) => {

View File

@ -10,13 +10,9 @@
:desc="timeFormat(item.checked_at, 'yyyy-mm-dd hh:MM:ss')" :desc="timeFormat(item.checked_at, 'yyyy-mm-dd hh:MM:ss')"
> >
<template #icon> <template #icon>
<view <view class="w-31rpx h-31rpx rounded-full mt-4rpx"
class="w-31rpx h-31rpx rounded-full mt-4rpx"
:class="[ :class="[item.check_status==2 || item.check_status==3 ? 'bg-blue' : 'bg-gray-300']"
item.check_status == 2 || item.check_status == 3
? 'bg-blue'
: 'bg-gray-300',
]"
></view> ></view>
</template> </template>
<template #title> <template #title>
@ -32,9 +28,6 @@
}" }"
>{{ item.check_status_text }}</view >{{ item.check_status_text }}</view
> >
<view class="text-24rpx text-hex-999" v-if="item.check_status == 4">{{
item.remarks
}}</view>
</view> </view>
</template> </template>
<template #desc> <template #desc>

View File

@ -1,16 +1,13 @@
<template> <template>
<view <view class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="goPath">
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"> <view class="text-24rpx text-hex-999999 flex">
<text class="text-24rpx w-140rpx inline-block">补卡原因</text> <view class="text-24rpx w-140rpx">补卡原因</view>
<text class="">{{ item.reason }}</text> <view class="">{{ item.reason }}</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>
<view class="">{{ item.sign_time == 1 ? '上班打卡' : '下班打卡' }}</view> <view class="">{{ item.sign_time == 1 ? "上班打卡" : "下班打卡" }}</view>
</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>
@ -18,40 +15,26 @@
</view> </view>
<view <view
:style="{ :style="{
color: statusFun( color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color')
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 { computed } from 'vue' import { computed } from "vue"
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
subject_type: String,
type: Number,
}) })
const valueFormat = computed(() => { const valueFormat = computed(() => {
return timeFormat(props.item.date, 'yyyy-mm-dd hh:MM') return timeFormat(props.item.date, "yyyy-mm-dd hh:MM")
}) })
const goPath = () => { const goPath = () => {
if (props.type == 1) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/audits/detail?id=${props.item.id}&type=${props.subject_type}`, url: `/pages/make-card/detail?id=${props.item.id}`
}) })
} else {
uni.navigateTo({
url: `/pages/make-card/detail?id=${props.item.id}`,
})
}
} }
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="px-base" v-if="detail"> <view class="px-base" v-if="detail">
<CuNavbar title="补卡详情"> <CuNavbar title="加班审核">
<template v-if="!isEdit" #right> <template v-if="!isEdit" #right>
<uv-icon color="white" @click="open" name="more-dot-fill"></uv-icon> <uv-icon color="white" @click="open" name="more-dot-fill"></uv-icon>
</template> </template>
@ -10,47 +10,47 @@
<view>申请人</view> <view>申请人</view>
<view class="text-hex-999999">{{ detail.employee.name }}</view> <view class="text-hex-999999">{{ detail.employee.name }}</view>
</view> </view>
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between"> <view class="py-20rpx flex items-center justify-between">
<view>所属门店</view> <view>所属门店</view>
<view class="text-hex-999999">{{ detail.store.title }}</view> <view class="text-hex-999999">{{ detail.store.title }}</view>
</view> </view>
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between"> <view class="py-20rpx flex items-center justify-between">
<view>电话号码</view> <view>电话号码</view>
<view class="text-hex-999999">{{ detail.employee.phone }}</view> <view class="text-hex-999999">{{ detail.employee.phone }}</view>
</view> </view>
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between"> <view class="py-20rpx flex items-center justify-between">
<view>申请时间</view> <view>申请时间</view>
<view class="text-hex-999999">{{ timeFormat(detail.created_at, "yyyy-mm-dd hh:MM") }}</view> <view class="text-hex-999999">{{ timeFormat(detail.created_at, "yyyy-mm-dd hh:MM") }}</view>
</view> </view>
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between"> <view class="py-20rpx flex items-center justify-between">
<view>补卡时间</view> <view>补卡时间</view>
<view class="text-hex-999999">{{ timeFormat(detail.date, "yyyy-mm-dd hh:MM") }}</view> <view class="text-hex-999999">{{ timeFormat(detail.date, "yyyy-mm-dd hh:MM") }}</view>
</view> </view>
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
<view class="py-20rpx"> <view class="py-20rpx">
<text class="">补卡原因</text> <view>补卡原因</view>
<text class="text-hex-999999 mt-20rpx">{{ detail.reason }}</text> <view class="text-hex-999999 mt-20rpx">{{ detail.reason }}</view>
</view> </view>
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between"> <view class="py-20rpx flex items-center justify-between">
<view>是否外勤</view> <view>是否外勤</view>
<view class="text-hex-999999">{{ detail.sign_type == 1 ? "否" : "是" }}</view> <view class="text-hex-999999">{{ detail.sign_type == 1 ? "否" : "是" }}</view>
</view> </view>
<template v-if="detail.sign_type == 2"> <template v-if="detail.sign_type == 2">
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
<view class="py-20rpx"> <view class="py-20rpx">
<view>外勤事由</view> <view>外勤事由</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.outside_remarks }}</view> <view class="text-hex-999999 mt-20rpx">{{ detail.outside_remarks }}</view>
</view> </view>
</template> </template>
<uv-line color="#f5f5f5"></uv-line> <uv-line></uv-line>
</view> </view>
<!-- <view class="h-100rpx"> <view class="h-100rpx">
<view class="fixed bottom-0 left-0 right-0 h-120rpx bg-white flex items-center px-base space-x-30rpx"> <view class="fixed bottom-0 left-0 right-0 h-120rpx bg-white flex items-center px-base space-x-30rpx">
<view class="flex-1"> <view class="flex-1">
<uv-button color="#999999" shape="circle" plain block> 拒绝 </uv-button> <uv-button color="#999999" shape="circle" plain block> 拒绝 </uv-button>
@ -59,7 +59,7 @@
<uv-button type="primary" shape="circle" block> 通过 </uv-button> <uv-button type="primary" shape="circle" block> 通过 </uv-button>
</view> </view>
</view> </view>
</view> --> </view>
<uv-picker ref="pickerRef" :columns="columns" @confirm="confirmPicker"></uv-picker> <uv-picker ref="pickerRef" :columns="columns" @confirm="confirmPicker"></uv-picker>
<uv-modal ref="modalRef" title="提示" content="确定删除吗?" @confirm="onSubmit" :showCancelButton="true"></uv-modal> <uv-modal ref="modalRef" title="提示" content="确定删除吗?" @confirm="onSubmit" :showCancelButton="true"></uv-modal>
</view> </view>

View File

@ -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" :type="0"></Item> <Item :item="item"></Item>
</view> </view>
</view> </view>
</template> </template>
@ -44,11 +44,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="1"
:subject_type="tabList[1].params.subject_type"
></Item>
</view> </view>
</view> </view>
</template> </template>
@ -91,6 +87,7 @@ onLoad(() => {
}) })
}) })
const goPath = (url) => { const goPath = (url) => {
uni.navigateTo({ uni.navigateTo({
url, url,

View File

@ -269,9 +269,8 @@ const onSubmit = async () => {
const params = { const params = {
...form, ...form,
} }
const resData = await http.request({ const resData = await http.request({
url: `/hr/promotion/${props.id}`, url: `/hr/promotion/${props.id}/apply`,
method: 'POST', method: 'POST',
header: { header: {
Accept: 'application/json', Accept: 'application/json',

View File

@ -13,14 +13,10 @@
>{{ item.promotion_status_text }}</view >{{ item.promotion_status_text }}</view
> >
</view> </view>
<view class="text-24rpx text-hex-999999 flex" v-if="type==0 || type==2"> <view class="text-24rpx text-hex-999999 flex">
<view class="w-140rpx">推荐人</view> <view class="w-140rpx">推荐人</view>
<view class="">{{ item?.invitor?.name }}</view> <view class="">{{ item?.invitor?.name }}</view>
</view> </view>
<view class="text-24rpx text-hex-999999 flex" v-if="type==1 || type==2">
<view class="w-140rpx">申请人</view>
<view class="">{{ item?.employee?.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex"> <view class="text-24rpx text-hex-999999 flex">
<view class="w-140rpx">晋升职位</view> <view class="w-140rpx">晋升职位</view>
<view class="">{{ item.job.name }}</view> <view class="">{{ item.job.name }}</view>
@ -54,21 +50,8 @@ const props = defineProps({
const onOption = (e) => {} const onOption = (e) => {}
const onClick = () => { const onClick = () => {
// tab==0 let url
//1 = if (props.type == 3) {
//tab===1
//2 =
let url = ''
const tab = props.type
if (
(tab == 0 && props.item.promotion_status == 1) ||
(tab == 1 && props.item.promotion_status == 2)
) {
url = `/pages/work/create?id=${props.item.id}&type=${tab}`
} else if (tab === 2) {
url = `/pages/audits/detail?id=${props.item.id}&type=${props.subject_type}`
} else { } else {
url = `/pages/work/detail?id=${props.item.id}` url = `/pages/work/detail?id=${props.item.id}`
} }

View File

@ -84,7 +84,6 @@ const tabList = ref([
apiUrl: '/workflow', apiUrl: '/workflow',
params: { params: {
subject_type: 'employee_promotions', subject_type: 'employee_promotions',
include: 'employee,invitor,job',
}, },
}, },
]) ])