main
ihzero 2024-04-27 09:35:29 +08:00
parent 6c1b67d865
commit 23f3abe031
4 changed files with 107 additions and 35 deletions

View File

@ -1,35 +1,73 @@
import { timeFormat } from '@climblee/uv-ui/libs/function'
export default {
//清洁任务
task_hygienes: [
// {
// title: '申请人',
// dataIndex: 'name',
// },
{
title: '所属门店',
dataIndex: 'taskable.store.title',
// borderBottom: false,
// labelPosition: 'top'
task_hygienes: {
data: [
// {
// title: '申请人',
// dataIndex: 'name',
// },
{
title: '所属门店',
dataIndex: 'taskable.store.title',
// borderBottom: false,
// labelPosition: 'top'
},
{
title: '电话号码',
dataIndex: '',
},
{
title: '申请时间',
dataIndex: 'created_at',
format: timeFormat,
},
{
title: '清洁范围',
dataIndex: 'taskable.description',
labelPosition: 'top',
},
{
title: '清洁结果',
dataIndex: 'taskable.photos',
type: 'album',
},
],
},
reimbursements: {
params: {
include: 'employee,store,type',
},
{
title: '电话号码',
dataIndex: '',
},
{
title: '申请时间',
dataIndex: 'created_at',
format: timeFormat,
},
{
title: '清洁范围',
dataIndex: 'taskable.description',
labelPosition: 'top',
},
{
title: '清洁结果',
dataIndex: 'taskable.photos',
type: 'album',
},
]
data: [
{
title: '审核状态',
dataIndex: 'workflow_check.check_status_text',
},
{
title: '未通过理由',
dataIndex: 'workflow_check.check_remarks',
isShow: (item) => {
return item?.workflow_check?.check_status == 4
},
},
{
title: '报销分类',
dataIndex: 'type.name',
},
{
title: '报销金额',
dataIndex: 'expense',
},
{
title: '报销原因',
dataIndex: 'reason',
labelPosition: 'top',
},
{
title: '报销凭证',
dataIndex: 'photos',
type: 'album',
},
]
}
}

View File

@ -1,8 +1,12 @@
<template>
<view>
<CuNavbar title="任务详情">
<CuNavbar title="审核详情">
<template #right>
<view class="text-sm text-white" @click="goPath(`/pages/audits/log?id=${id}&type=${type}`)"></view>
<view
class="text-sm text-white"
@click="goPath(`/pages/audits/log?id=${id}&type=${type}`)"
>审核流程</view
>
</template>
</CuNavbar>
<view class="px-base mt-30rpx">
@ -52,7 +56,8 @@ import BaseData from './base-data.vue'
import datajson from './data.data'
const value = ref('')
const colums = computed(() => datajson[type.value] ?? [])
const colums = computed(() => datajson[type.value].data ?? [])
const params = computed(() => datajson[type.value].params ?? {})
const id = ref(null)
const type = ref(null)
const data = ref(null)
@ -113,13 +118,13 @@ const getData = async () => {
const resData = await http.get(`/workflow/${id.value}`, {
params: {
subject_type: type.value,
...params.value,
},
})
data.value = resData
console.log(resData)
}
const goPath = (url) => {
uni.navigateTo({ url })
}

View File

@ -83,7 +83,7 @@ const tabList = ref([
{
name: '报销审核',
apiUrl: '/workflow',
params: { subject_type: 'reimbursements' },
params: { subject_type: 'reimbursements', include: 'employee,store,type' },
},
])

View File

@ -11,6 +11,30 @@
</view>
</template>
</CuNavbar>
<view class="px-base mt-30rpx">
<view class="card-shadow bg-white rounded-19rpx p-base">
<view class="flex">
<view class="w-120rpx h-120rpx rounded-full overflow-hidden">
<image class="w-full h-full" :src="userInfo?.avatar"></image>
</view>
<view class="ml-20rpx">
<view class="text-28rpx font-medium flex items-center">
<view>{{ userInfo.name }}</view>
</view>
<view class="text-26rpx">{{ userInfo.phone }}</view>
<view class="flex">
<uv-tags
v-for="(item, i) in userInfo.jobs"
:key="i"
plain
size="mini"
:text="item.name"
></uv-tags>
</view>
</view>
</view>
</view>
</view>
<view class="px-base space-y-15rpx mt-30rpx">
<view class="card" v-for="(item, i) in opList" :key="i">
<TitleComp :title="item.title"></TitleComp>
@ -27,10 +51,15 @@
</view>
</template>
<script setup>
import { computed } from 'vue'
import TitleComp from '@/components/title-comp/index'
import OpItem from './components/op-item.vue'
import CuNavbar from '@/components/cu-navbar/index'
import checkPermission from '@/utils/permission'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
const userInfo = computed(() => userStore.userInfo)
const opList = [
{