审核流程

main
panliang 2024-04-28 01:29:47 +08:00
parent 9e0fbd41d4
commit 7622ee0af9
22 changed files with 457 additions and 331 deletions

View File

@ -307,19 +307,19 @@
{
"path": "list",
"style": {
"navigationBarTitleText": "加班报备"
"navigationBarTitleText": "合同管理"
}
},
{
"path": "create",
"style": {
"navigationBarTitleText": "加班报备"
"navigationBarTitleText": "我的合同"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "加班详情"
"navigationBarTitleText": "合同详细"
}
}
]

View File

@ -1,57 +0,0 @@
<template>
<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>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">请假事由</view>
<view class="">{{ item.reason }}</view>
</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>
<view
:style="{
color: statusFun(
item.workflow_check.check_status,
'workflow_check',
'color'
),
}"
class="text-24rpx"
>{{
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'
const props = defineProps({
item: Object,
type: Number,
subject_type: String,
})
const goPath = () => {
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

@ -1,8 +1,8 @@
<template>
<view class="px-base" v-if="detail">
<CuNavbar title="请假详情">
<template v-if="!isEdit" #right>
<uv-icon color="white" @click="open" name="more-dot-fill"></uv-icon>
<template #right>
<uv-icon v-if="columns[0].length > 0" color="white" @click="open" name="more-dot-fill"></uv-icon>
</template>
</CuNavbar>
<view class="mt-30rpx card-shadow bg-white rounded-19rpx px-base text-[#333333] text-27rpx">
@ -44,16 +44,6 @@
<view class="text-hex-999999 mt-20rpx">{{ detail.reason }}</view>
</view>
</view>
<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="flex-1">
<uv-button color="#999999" shape="circle" plain block> 拒绝 </uv-button>
</view>
<view class="flex-1">
<uv-button type="primary" shape="circle" block> 通过 </uv-button>
</view>
</view>
</view>
<uv-picker ref="pickerRef" :columns="columns" @confirm="confirmPicker"></uv-picker>
<uv-modal ref="modalRef" title="提示" content="确定删除吗?" @confirm="onSubmit" :showCancelButton="true"></uv-modal>
</view>
@ -65,7 +55,7 @@ import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
const modalRef = ref(null)
const columns = [["修改", "删除"]]
const columns = ref([[]])
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
@ -108,12 +98,15 @@ onLoad(options => {
.request({
url: `/hr/holidays/${options.id}`,
method: "GET",
header: {
Accept: "application/json"
}
})
.then(res => {
detail.value = res
const options = []
if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
options.push('修改', '删除')
}
columns.value = [options]
})
})
</script>

View File

@ -27,8 +27,25 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item" :type="0"></Item>
<view
v-for="item in list" :key="item.id"
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
@click="applyDetail(item)"
>
<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>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">请假事由</view>
<view class="">{{ item.reason }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx">申请时间</view>
<view class="text-24rpx">{{ item.created_format }}</view>
</view>
<view :style="{ color: statusFun( item.workflow_check.check_status,'statusExpense','color')}" class="text-24rpx">{{ item.workflow_check.check_status_text }}</view>
</view>
</view>
</template>
@ -43,12 +60,29 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item
:item="item"
:type="1"
:subject_type="tabList[1].params.subject_type"
></Item>
<view
v-for="item in list" :key="item.id"
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
@click="checkDetail(item)"
>
<view class="text-30rpx">请假申请</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">申请人</view>
<view class="">{{ item.check.subject.employee.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">请假类型</view>
<view class="">{{ item.check.subject.type.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">请假事由</view>
<view class="">{{ item.check.subject.reason }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx">申请时间</view>
<view class="text-24rpx">{{ item.check.subject.created_format }}</view>
</view>
<view :style="{ color: statusFun( item.check_status,'statusExpense','color')}" class="text-24rpx">{{ item.check_status_text }}</view>
</view>
</view>
</template>
@ -61,7 +95,7 @@ import { ref } from 'vue'
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
import Item from './components/item.vue'
import statusFun from '@/utils/status'
const tabList = ref([
{
name: '我的请假',
@ -72,7 +106,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'holiday_applies',
include: 'employee,store,type',
include: 'check.subject.employee,check.subject.type',
},
},
])
@ -94,4 +128,17 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
const applyDetail = (item) => {
uni.navigateTo({
url: `/pages/ask-leave/detail?id=${item.id}`,
})
}
const checkDetail = (item) => {
uni.navigateTo({
url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
})
}
</script>

View File

@ -96,111 +96,108 @@ export default {
//升职
employee_promotions: {
params: {
include: 'employee,invitor,job',
include: 'check.subject.store,check.subject.invitor,check.subject.employee,check.subject.job',
},
data: [
{
title: '审核状态',
dataIndex: 'workflow_check.check_status_text',
dataIndex: 'check_status_text',
},
{
title: '未通过理由',
dataIndex: 'workflow_check.check_remarks',
dataIndex: 'remarks',
labelPosition: 'top',
isShow: (item) => {
return item?.workflow_check?.check_status == 4
return item?.check_status == 4
},
}, {
title: '晋升职位',
dataIndex: 'job.name',
dataIndex: 'check.subject.job.name',
}, {
title: '推荐人',
dataIndex: 'invitor.name',
dataIndex: 'check.subject.invitor.name',
}, {
title: '申请人',
dataIndex: 'employee.name',
dataIndex: 'check.subject.employee.name',
}, {
title: '年龄',
dataIndex: 'employee_data.age',
dataIndex: 'check.subject.employee_data.age',
}, {
title: '性别',
dataIndex: 'employee_data.sex',
dataIndex: 'check.subject.employee_data.sex',
}, {
title: '学历',
dataIndex: 'employee_data.education',
dataIndex: 'check.subject.employee_data.education',
}, {
title: '首次参加工作时间',
dataIndex: 'employee_data.first_work_time',
dataIndex: 'check.subject.employee_data.first_work_time',
labelWidth: "250rpx"
}, {
title: '工作年限',
dataIndex: 'employee_data.work_years',
dataIndex: 'check.subject.employee_data.work_years',
}, {
title: '本公司工作年限',
dataIndex: 'employee_data.work_years_in_company',
dataIndex: 'check.subject.employee_data.work_years_in_company',
}, {
title: '员工自评',
dataIndex: 'employee_data.comment_self',
dataIndex: 'check.subject.employee_data.comment_self',
labelPosition: 'top',
}, {
title: '未来计划',
dataIndex: 'employee_data.plans',
dataIndex: 'check.subject.employee_data.plans',
labelPosition: 'top',
}, {
title: '推荐理由',
dataIndex: 'employee_data.reason',
dataIndex: 'check.subject.employee_data.reason',
labelPosition: 'top',
}]
},
//补卡申请
employee_sign_repairs: {
params: {
include: 'employee,store',
include: 'check.subject.employee,check.subject.store',
},
data: [{
title: '审核状态',
dataIndex: 'workflow_check.check_status_text',
dataIndex: 'check_status_text',
},
{
title: '未通过理由',
dataIndex: 'workflow_check.check_remarks',
dataIndex: 'remarks',
labelPosition: 'top',
isShow: (item) => {
return item?.workflow_check?.check_status == 4
return item?.check_status == 4
},
}, {
title: '申请人',
dataIndex: 'employee.name',
dataIndex: 'check.subject.employee.name',
}, {
title: '所属门店',
dataIndex: 'store.title',
dataIndex: 'check.subject.store.title',
}, {
title: '电话号码',
dataIndex: 'employee.phone'
dataIndex: 'check.subject.employee.phone'
}, {
title: '申请时间',
dataIndex: 'created_at',
format: timeFormat,
dataIndex: 'check.subject.created_format'
}, {
title: '补卡时间',
dataIndex: 'date',
format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM')
dataIndex: 'check.subject.date_format',
}, {
title: '补卡原因',
dataIndex: 'reason',
dataIndex: 'check.subject.reason',
labelPosition: 'top',
}, {
title: '是否外勤',
dataIndex: 'sign_type',
dataIndex: 'check.subject.sign_type',
format: (e) => {
return e == 1 ? '否' : '是'
}
}, {
title: '外勤事由',
dataIndex: 'outside_remarks',
dataIndex: 'check.subject.outside_remarks',
labelPosition: 'top',
isShow: (item) => {
console.log(item);
return item?.sign_type == 2
}
}]
@ -208,47 +205,86 @@ export default {
//请假申请
holiday_applies: {
params: {
include: 'employee,store,type'
include: 'check.subject.employee,check.subject.type,check.subject.store'
},
data: [{
title: '审核状态',
dataIndex: 'workflow_check.check_status_text',
dataIndex: 'check_status_text',
},
{
title: '未通过理由',
dataIndex: 'workflow_check.check_remarks',
dataIndex: 'remarks',
labelPosition: 'top',
isShow: (item) => {
return item?.workflow_check?.check_status == 4
return item?.check_status == 4
},
}, {
title: '申请人',
dataIndex: 'employee.name',
dataIndex: 'check.subject.employee.name',
}, {
title: '所属门店',
dataIndex: 'store.title',
dataIndex: 'check.subject.store.title',
}, {
title: '电话号码',
dataIndex: 'employee.phone'
dataIndex: 'check.subject.employee.phone'
}, {
title: '申请时间',
dataIndex: 'created_at',
format: (e)=>timeFormat(e,'yyyy-mm-dd hh:MM'),
dataIndex: 'check.subject.created_format',
}, {
title: '请假类型',
dataIndex: 'type.name',
dataIndex: 'check.subject.type.name',
}, {
title: '请假开始时间',
dataIndex: 'start_at',
format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'),
dataIndex: 'check.subject.start_format',
}, {
title: '请假结束时间',
dataIndex: 'end_at',
format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'),
dataIndex: 'check.subject.end_format',
}, {
title: '请假原因',
dataIndex: 'reason',
dataIndex: 'check.subject.reason',
labelPosition: 'top',
}]
},
offical_business: {
params: {
include: 'check.subject.employee,check.subject.store'
},
data: [
{ title: '审核状态', dataIndex: 'check_status_text' },
{ title: '未通过理由', dataIndex: 'remarks', labelPosition: 'top', isShow: (item) => item?.check_status == 4 },
{ title: '申请人', dataIndex: 'check.subject.employee.name' },
{ title: '所属门店', dataIndex: 'check.subject.store.title' },
{ title: '目的地', dataIndex: 'check.subject.address' },
{ title: '开始时间', dataIndex: 'check.subject.start_format' },
{ title: '结束时间', dataIndex: 'check.subject.end_format' },
{ title: '出差事由', dataIndex: 'check.subject.reason', labelPosition: 'top' },
]
},
overtime_applies: {
params: {
include: 'check.subject.employee,check.subject.store'
},
data: [
{ title: '审核状态', dataIndex: 'check_status_text' },
{ title: '未通过理由', dataIndex: 'remarks', labelPosition: 'top', isShow: (item) => item?.check_status == 4 },
{ title: '申请人', dataIndex: 'check.subject.employee.name' },
{ title: '所属门店', dataIndex: 'check.subject.store.title' },
{ title: '日期', dataIndex: 'check.subject.date_format' },
{ title: '开始时间', dataIndex: 'check.subject.start_format' },
{ title: '结束时间', dataIndex: 'check.subject.end_format' },
{ title: '加班事由', dataIndex: 'check.subject.reason', labelPosition: 'top' },
]
},
agreements: {
params: {
include: 'check.subject.employee'
},
data: [
{ title: '审核状态', dataIndex: 'check_status_text' },
{ title: '未通过理由', dataIndex: 'remarks', labelPosition: 'top', isShow: (item) => item?.check_status == 4 },
{ title: '申请人', dataIndex: 'check.subject.employee.name' },
{ title: '合同名称', dataIndex: 'check.subject.name' },
{ title: '合同照片', dataIndex: 'check.subject.images', type: 'album' },
]
}
}

View File

@ -69,12 +69,15 @@ const modelOptions = reactive({
})
const onConfirm = async () => {
if (modelOptions.isValue && !value.value) {
return uni.showToast({title: "请填写拒绝原因", icon: "none"})
}
try {
await http.post(`/workflow/${id.value}/check`, {
status: !modelOptions.isValue,
remarks: modelOptions.isValue ? value.value : '',
})
// uni.$emit('audits:onRefresh')
uni.$emit('audits:onRefresh')
uni.navigateBack()
} catch (error) {}
}

View File

@ -1,36 +0,0 @@
<template>
<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-120rpx text-right mr-20rpx">目的地</view>
<view class="">{{ item.address }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">出差事由</view>
<view class="">{{ item.reason }}</view>
</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:ss") }}</view>
</view>
<view
:style="{
color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color')
}"
class="text-24rpx"
>{{ 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"
const props = defineProps({
item: Object
})
const goPath = () => {
uni.navigateTo({
url: `/pages/business/detail?id=${props.item.id}`
})
}
</script>

View File

@ -8,7 +8,7 @@
<view class="card-shadow px-base">
<uv-form labelPosition="left" :model="form" :rules="rules" ref="formRef" errorType="toast" labelWidth="250rpx">
<uv-form-item required label="目的地" prop="address">
<uv-input placeholder="请选择" @click="openPicker" inputAlign="right" :border="`none`" v-model="form.address">
<uv-input placeholder="请选择" inputAlign="right" :border="`none`" v-model="form.address">
</uv-input>
</uv-form-item>
<uv-line color="#f5f5f5"></uv-line>

View File

@ -1,7 +1,7 @@
<template>
<view class="px-base" v-if="detail">
<CuNavbar title="出差详情">
<template v-if="!isEdit" #right>
<template v-if="columns[0].length > 0" #right>
<uv-icon color="white" @click="open" name="more-dot-fill"></uv-icon>
</template>
</CuNavbar>
@ -43,15 +43,14 @@
<view>出差原因</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.reason }}</view>
</view>
</view>
<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="flex-1">
<uv-button color="#999999" shape="circle" plain block> 拒绝 </uv-button>
</view>
<view class="flex-1">
<uv-button type="primary" shape="circle" block> 通过 </uv-button>
</view>
<uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between">
<view>审核状态</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.workflow_check.check_status_text }}</view>
</view>
<view v-if="detail.workflow_check.check_status == 4" class="py-20rpx">
<view>未通过原因</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.workflow_check.check_remarks }}</view>
</view>
</view>
<uv-picker ref="pickerRef" :columns="columns" @confirm="confirmPicker"></uv-picker>
@ -65,7 +64,7 @@ import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
const modalRef = ref(null)
const columns = [["修改", "删除"]]
const columns = ref([[]])
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
@ -114,6 +113,11 @@ onLoad(options => {
})
.then(res => {
detail.value = res
const options = []
if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
options.push('修改', '删除')
}
columns.value = [options]
})
})
</script>

View File

@ -27,8 +27,21 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<view v-for="item in list" :key="item.id" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="applyDetail(item)">
<view class="text-30rpx">出差报备</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-120rpx text-right mr-20rpx">目的地</view>
<view class="">{{ item.address }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">出差事由</view>
<view class="">{{ item.reason }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx"> 申请时间</view>
<view class="text-24rpx">{{ item.created_format }}</view>
</view>
<view :style="{color: statusFun(item.workflow_check.check_status, 'statusExpense', 'color')}" class="text-24rpx">{{ item.workflow_check.check_status_text }}</view>
</view>
</view>
</template>
@ -44,8 +57,25 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<view v-for="item in list" :key="item.id" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="checkDetail(item)">
<view class="text-30rpx">出差报备</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-120rpx text-right mr-20rpx">申请人</view>
<view class="">{{ item.check.subject.employee.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-120rpx text-right mr-20rpx">目的地</view>
<view class="">{{ item.check.subject.address }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">出差事由</view>
<view class="">{{ item.check.subject.reason }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx"> 申请时间</view>
<view class="text-24rpx">{{ item.check.subject.created_format }}</view>
</view>
<view :style="{color: statusFun(item.check_status, 'statusExpense', 'color')}" class="text-24rpx">{{ item.check_status_text }}</view>
</view>
</view>
</template>
@ -58,17 +88,18 @@ import { ref } from 'vue'
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
import Item from './components/item.vue'
import statusFun from "@/utils/status"
const tabList = ref([
{
name: '我的请假',
name: '出差申请',
apiUrl: '/hr/offical-bussiness',
},
{
name: '请假审核',
name: '出差审核',
apiUrl: '/workflow',
params: {
subject_type: 'holiday_applies',
subject_type: 'offical_business',
include: 'check.subject.employee',
},
},
])
@ -90,4 +121,16 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
const applyDetail = (item) => {
uni.navigateTo({
url: `/pages/business/detail?id=${item.id}`
})
}
const checkDetail = (item) => {
uni.navigateTo({
url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
})
}
</script>

View File

@ -1,43 +0,0 @@
<template>
<view
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
@click.stop="onClick"
>
<view class="flex items-center justify-between">
<view class="text-30rpx">{{ item.name }}</view>
</view>
<uv-scroll-list v-if="item.images" :indicator="false">
<view class="space-x-15rpx flex">
<view v-for="(item, index) in item?.images ?? []" :key="index">
<image
:src="item + ''"
mode="heightFix"
style="height: 160rpx"
></image>
</view>
</view>
</uv-scroll-list>
<view
:style="{
color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color'),
}"
class="text-24rpx"
>{{
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'
const props = defineProps({
item: Object,
})
const onClick = () => {
uni.navigateTo({
url: `/pages/contract/detail?id=${props.item.id}`,
})
}
</script>

View File

@ -62,7 +62,11 @@ onLoad(options => {
})
.then(res => {
form.name = res.name
form.images = res.images
if (res.images && res.images.length > 0) {
res.images.forEach(item => {
form.images.push({url: item})
})
}
})
}
})
@ -95,7 +99,7 @@ const onSubmit = async () => {
icon: "none"
})
formRef.value.resetFields()
uni.$emit("task:submit", resData)
uni.$emit("task:submit")
uni.navigateBack()
} catch (error) {
console.log(error)

View File

@ -1,7 +1,7 @@
<template>
<view class="px-base" v-if="detail">
<CuNavbar title="合同详情">
<template #right>
<template v-if="columns[0].length > 0" #right>
<uv-icon color="white" @click="open" name="more-dot-fill"></uv-icon>
</template>
</CuNavbar>
@ -47,21 +47,17 @@
</view>
</view>
</uv-scroll-list>
</view>
<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="flex-1">
<uv-button color="#999999" shape="circle" plain block>
拒绝
</uv-button>
</view>
<view class="flex-1">
<uv-button type="primary" shape="circle" block> 通过 </uv-button>
</view>
<uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between">
<view>审核状态</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.workflow_check.check_status_text }}</view>
</view>
<view v-if="detail.workflow_check.check_status == 4" class="py-20rpx">
<view>未通过原因</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.workflow_check.check_remarks }}</view>
</view>
</view>
<uv-picker
ref="pickerRef"
:columns="columns"
@ -83,7 +79,7 @@ import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
const modalRef = ref(null)
const columns = [['修改', '删除']]
const columns = ref([[]])
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
@ -132,6 +128,11 @@ onLoad((options) => {
})
.then((res) => {
detail.value = res
const options = []
if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
options.push('修改', '删除')
}
columns.value = [options]
})
})
</script>

View File

@ -30,8 +30,18 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<view v-for="item in list" :key="item.id" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click.stop="applyDetail(item)">
<view class="flex items-center justify-between">
<view class="text-30rpx">{{ item.name }}</view>
</view>
<uv-scroll-list v-if="item.images" :indicator="false">
<view class="space-x-15rpx flex">
<view v-for="(url, index) in item?.images ?? []" :key="index">
<image :src="url + ''" mode="heightFix" style="height: 160rpx"></image>
</view>
</view>
</uv-scroll-list>
<view :style="{color: statusFun(item.workflow_check.check_status, 'statusExpense', 'color')}" class="text-24rpx">{{item.workflow_check.check_status_text}}</view>
</view>
</view>
</template>
@ -48,7 +58,23 @@
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<view v-for="item in list" :key="item.id" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click.stop="checkDetail(item)">
<view class="flex items-center justify-between">
<view class="text-30rpx">{{ item.check.subject.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-120rpx text-right mr-20rpx">申请人</view>
<view class="">{{ item.check.subject.employee.name }}</view>
</view>
<uv-scroll-list v-if="item.check.subject.images" :indicator="false">
<view class="space-x-15rpx flex">
<view v-for="(url, index) in item.check.subject.images" :key="index">
<image :src="url + ''" mode="heightFix" style="height: 160rpx"></image>
</view>
</view>
</uv-scroll-list>
<view :style="{color: statusFun(item.check_status, 'statusExpense', 'color')}" class="text-24rpx">{{item.check_status_text}}</view>
</view>
</view>
</view>
</template>
@ -58,10 +84,10 @@
<script setup>
import CuNavbar from '@/components/cu-navbar/index'
import { computed, reactive, ref } from 'vue'
import Item from './components/item.vue'
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
import statusFun from '@/utils/status'
const mescrollItem0 = ref(null)
const mescrollItem1 = ref(null)
@ -82,6 +108,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'agreements',
include: 'check.subject.employee'
},
},
])
@ -94,4 +121,16 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
const applyDetail = (item) => {
uni.navigateTo({
url: `/pages/contract/detail?id=${item.id}`,
})
}
const checkDetail = (item) => {
uni.navigateTo({
url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
})
}
</script>

View File

@ -6,7 +6,8 @@
</template>
</CuNavbar>
<view class="mt-30rpx card-shadow bg-white rounded-19rpx px-base text-[#333333] text-27rpx">
<view class="py-20rpx flex items-center justify-between">
<BaseData :colums="detailColumns" :data="detail"></BaseData>
<!-- <view class="py-20rpx flex items-center justify-between">
<view>申请人</view>
<view class="text-hex-999999">{{ detail.employee.name }}</view>
</view>
@ -49,7 +50,7 @@
</view>
</template>
<uv-line color="#f5f5f5"></uv-line>
</view>
</view> -->
<!-- <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="flex-1">
@ -58,8 +59,8 @@
<view class="flex-1">
<uv-button type="primary" shape="circle" block> 通过 </uv-button>
</view>
</view>
</view> -->
</view> -->
</view>
<uv-picker ref="pickerRef" :columns="columns" @confirm="confirmPicker"></uv-picker>
<uv-modal ref="modalRef" title="提示" content="确定删除吗?" @confirm="onSubmit" :showCancelButton="true"></uv-modal>
</view>
@ -70,11 +71,53 @@ import { http } from "@/utils/request"
import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
import BaseData from '@/pages/audits/base-data.vue'
const modalRef = ref(null)
const columns = [["修改", "删除"]]
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
const detailColumns = [
{
title: "申请人",
dataIndex: "employee.name"
},
{
title: "所属门店",
dataIndex: "store.title"
},
{
title: "电话号码",
dataIndex: "employee.phone"
},
{
title: "申请时间",
dataIndex: "created_format"
},
{
title: "补卡时间",
dataIndex: "date_format"
},
{
title: "补卡原因",
dataIndex: "reason"
},
{
title: "是否外勤",
dataIndex: "sign_type",
format: (value) => {
return value == 1 ? "否" : "是"
}
},
{
title: "外勤事由",
dataIndex: "outside_remarks",
isShow: (data) => {
return data?.sign_type == 2
}
},
];
const open = () => {
pickerRef.value.open()
}

View File

@ -43,12 +43,29 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item
:item="item"
:type="1"
:subject_type="tabList[1].params.subject_type"
></Item>
<view
v-for="item in list" :key="item.id"
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
@click="checkDetail(item)"
>
<view class="text-30rpx">补卡申请</view>
<view class="text-24rpx text-hex-999999">
<text class="text-24rpx w-140rpx inline-block">申请人: </text>
<text class="">{{ item.check.subject.employee.name }}</text>
</view>
<view class="text-24rpx text-hex-999999">
<text class="text-24rpx w-140rpx inline-block">补卡原因</text>
<text class="">{{ item.check.subject.reason }}</text>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">补卡类别</view>
<view class="">{{ item.check.subject.sign_time == 1 ? '上班打卡' : '下班打卡' }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx"> 补卡时间</view>
<view class="text-24rpx">{{ item.check.subject.date_format }}</view>
</view>
<view :style="{color: statusFun(item.check_status,'statusExpense','color')}" class="text-24rpx">{{ item.check_status_text }}</view>
</view>
</view>
</template>
@ -62,6 +79,7 @@ import { onPageScroll, onReachBottom, onShow, onLoad } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
import Item from './components/item.vue'
import statusFun from '@/utils/status'
const tabList = ref([
{
name: '我的补卡',
@ -72,6 +90,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'employee_sign_repairs',
include: 'check.subject.employee'
},
},
])
@ -100,4 +119,10 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
const checkDetail = (item) => {
uni.navigateTo({
url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`,
})
}
</script>

View File

@ -1,39 +0,0 @@
<template>
<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="">{{ timeFormat(item.date, "yyyy-mm-dd") }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx"> 加班时间</view>
<view class="text-24rpx"
>{{ timeFormat(item.start_at, "yyyy-mm-dd hh:MM").substring(10) }} -
{{ timeFormat(item.end_at, "yyyy-mm-dd hh:MM").substring(10) }}</view
>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">加班事由</view>
<view class="">{{ item.reason }}</view>
</view>
<view
:style="{
color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color')
}"
class="text-24rpx"
>{{ 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"
const props = defineProps({
item: Object
})
const goPath = () => {
uni.navigateTo({
url: `/pages/overtime/detail?id=${props.item.id}`
})
}
</script>

View File

@ -42,7 +42,7 @@
</uv-input>
</uv-form-item>
<uv-line color="#f5f5f5"></uv-line>
<uv-form-item required label="出差事由" prop="reason" labelPosition="top">
<uv-form-item required label="加班事由" prop="reason" labelPosition="top">
<uv-textarea v-model="form.reason" count placeholder="请输入" :border="`none`" :maxlength="200"></uv-textarea>
</uv-form-item>
</uv-form>
@ -119,7 +119,7 @@ const confirmEndDatePicker = e => {
const rules = reactive({
start_at: [{ required: true, message: "请选择时间" }],
end_at: [{ required: true, message: "请选择时间" }],
reason: [{ required: true, message: "请输入加班由" }],
reason: [{ required: true, message: "请输入加班由" }],
date: [{ required: true, message: "请选择日期" }]
})
onLoad(options => {

View File

@ -1,7 +1,7 @@
<template>
<view class="px-base" v-if="detail">
<CuNavbar title="加班审核">
<template v-if="!isEdit" #right>
<template v-if="columns[0].length > 0" #right>
<uv-icon color="white" @click="open" name="more-dot-fill"></uv-icon>
</template>
</CuNavbar>
@ -43,15 +43,14 @@
<view>加班原因</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.reason }}</view>
</view>
</view>
<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="flex-1">
<uv-button color="#999999" shape="circle" plain block> 拒绝 </uv-button>
</view>
<view class="flex-1">
<uv-button type="primary" shape="circle" block> 通过 </uv-button>
</view>
<uv-line></uv-line>
<view class="py-20rpx flex items-center justify-between">
<view>审核状态</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.workflow_check.check_status_text }}</view>
</view>
<view v-if="detail.workflow_check.check_status == 4" class="py-20rpx">
<view>未通过原因</view>
<view class="text-hex-999999 mt-20rpx">{{ detail.workflow_check.check_remarks }}</view>
</view>
</view>
<uv-picker ref="pickerRef" :columns="columns" @confirm="confirmPicker"></uv-picker>
@ -65,7 +64,7 @@ import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
const modalRef = ref(null)
const columns = [["修改", "删除"]]
const columns = ref([[]])
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
@ -114,6 +113,11 @@ onLoad(options => {
})
.then(res => {
detail.value = res
const options = []
if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
options.push('修改', '删除')
}
columns.value = [options]
})
})
</script>

View File

@ -27,8 +27,21 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<view v-for="item in list" :key="item.id" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="applyDetail(item)">
<view class="text-30rpx">加班报备</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">加班日期</view>
<view class="">{{ item.date_format }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx">加班时间</view>
<view class="text-24rpx">{{ item.start_format }} - {{ item.end_format }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">加班事由</view>
<view class="">{{ item.reason }}</view>
</view>
<view :style="{color: statusFun(item.workflow_check.check_status, 'statusExpense', 'color')}" class="text-24rpx">{{ item.workflow_check.check_status_text }}</view>
</view>
</view>
</template>
@ -44,8 +57,25 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item :item="item"></Item>
<view v-for="item in list" :key="item.id" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="checkDetail(item)">
<view class="text-30rpx">加班报备</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">申请人</view>
<view class="">{{ item.check.subject.employee.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">加班日期</view>
<view class="">{{ item.check.subject.date_format }}</view>
</view>
<view class="flex items-center text-hex-999999 flex">
<view class="text-24rpx w-140rpx">加班时间</view>
<view class="text-24rpx">{{ item.check.subject.start_format }} - {{ item.check.subject.end_format }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="text-24rpx w-140rpx">加班事由</view>
<view class="">{{ item.check.subject.reason }}</view>
</view>
<view :style="{color: statusFun(item.check_status, 'statusExpense', 'color')}" class="text-24rpx">{{ item.check_status_text }}</view>
</view>
</view>
</template>
@ -58,7 +88,7 @@ import { ref } from 'vue'
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
import Item from './components/item.vue'
import statusFun from "@/utils/status"
const tabList = ref([
{
name: '我的加班',
@ -69,6 +99,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'overtime_applies',
include: 'check.subject.employee'
},
},
])
@ -90,4 +121,16 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
const applyDetail = (item) => {
uni.navigateTo({
url: `/pages/overtime/detail?id=${item.id}`
})
}
const checkDetail = (item) => {
uni.navigateTo({
url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
})
}
</script>

View File

@ -273,9 +273,6 @@ const onSubmit = async () => {
const resData = await http.request({
url: `/hr/promotion/${props.id}`,
method: 'POST',
header: {
Accept: 'application/json',
},
data: params,
})
uni.showToast({
@ -283,7 +280,7 @@ const onSubmit = async () => {
icon: 'none',
})
formRef.value.resetFields()
uni.$emit('work:submit', resData)
// uni.$emit('work:submit', resData)
uni.navigateBack()
} catch (error) {
console.log(error)

View File

@ -50,12 +50,23 @@
>
<template v-slot="{ list }">
<view class="space-y-15rpx p-base">
<view v-for="(item, i) in list" :key="i">
<Item
:type="2"
:subject_type="tabList[2].params.subject_type"
:item="item"
></Item>
<view v-for="item in list" :key="item.id" @click="checkDetail(item)" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx">
<view class="flex items-center justify-between">
<view class="text-30rpx"> {{ item.check.subject.job.name }}</view>
<view class="text-24rpx" :style="{ color: statusFun(item.check_status, 'statusExpense', 'color')}">{{ item.check_status_text }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="w-140rpx">推荐人</view>
<view class="">{{ item.check.subject.invitor.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="w-140rpx">申请人</view>
<view class="">{{ item.check.subject.employee.name }}</view>
</view>
<view class="text-24rpx text-hex-999999 flex">
<view class="w-140rpx">晋升职位</view>
<view class="">{{ item.check.subject.job.name }}</view>
</view>
</view>
</view>
</template>
@ -70,6 +81,8 @@ import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js
import MescrollItem from '@/components/mescroll-api/more.vue'
import Item from './components/item.vue'
import { onLoad } from '@dcloudio/uni-app'
import statusFun from '@/utils/status'
const tabList = ref([
{
name: '申请列表',
@ -84,7 +97,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'employee_promotions',
include: 'employee,invitor,job',
include: 'check.subject.store,check.subject.invitor,check.subject.employee,check.subject.job',
},
},
])
@ -114,4 +127,10 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
const checkDetail = (item) => {
uni.navigateTo({
url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
})
}
</script>