Browse Source

财务人员的财务审批界面

apply
Min5203 4 years ago
parent
commit
9a3097ba22
  1. 26
      components/FinanceExamine.vue
  2. 22
      components/FinanceManage.vue
  3. 1
      layouts/default.vue
  4. 11
      pages/Initiate-application.vue
  5. 15
      pages/applicant.vue
  6. 15
      pages/application-details.vue
  7. 186
      pages/financial-approval-details.vue
  8. 75
      pages/financial-approval.vue
  9. 25
      pages/index.vue
  10. 2
      plugins/vant.js

26
components/FinanceExamine.vue

@ -1,19 +1,19 @@
<template> <template>
<div> <div>
<div class="w-full overflow-x-scroll"> <div class="w-full overflow-x-scroll">
<table class="text-gray-500 mt-4 text-ms"> <table class="text-gray-500 mt-4 text-xs">
<tr class="bg-gray-100"> <tr class="bg-gray-100">
<td width="15%">申请人</td> <td width="15%">申请人</td>
<td width="16%">金额()</td> <td width="16%">金额()</td>
<td width="30%">时间</td> <td width="20%">时间</td>
<td width="20%">操作</td> <td width="10%">操作</td>
</tr> </tr>
<tr v-for="item in arrayData"> <tr v-for="item in arrayData" @click="viewDetails">
<td>{{item.submitName}}</td> <td>{{item.submitName}}</td>
<td>{{item.money}}</td> <td>{{item.money}}</td>
<td>{{dayjs(item.submitTime - 0).format('YYYY-MM-DD hh:mm')}}</td> <td>{{dayjs(item.submitTime - 0).format('YYYY-MM-DD')}}</td>
<td> <td>
<div v-if="item.applyType === 0" class="flex flex-row justify-between"> <div v-if="item.applyType === 0" class="flex flex-row justify-around">
<van-button type="success" size="mini" class="rounded">通过</van-button> <van-button type="success" size="mini" class="rounded">通过</van-button>
<van-button type="danger" size="mini" class="rounded">驳回</van-button> <van-button type="danger" size="mini" class="rounded">驳回</van-button>
</div> </div>
@ -30,8 +30,8 @@
<script setup> <script setup>
import dayjs from "dayjs"; import dayjs from "dayjs";
import {ref, reactive} from'vue'; import {ref} from'vue';
const props = defineProps({ routeUrl : { type: Object, default: () => {} } });
const arrayData = ref([ const arrayData = ref([
{ {
applyId: '001', applyId: '001',
@ -90,12 +90,11 @@ const arrayData = ref([
applyType: 0, applyType: 0,
} }
]); ]);
const sumBudget = arrayData.value.reduce((sum, e) => sum + e.budget, 0);
const sumBonus = arrayData.value.reduce((sum, e) => sum + e.bonus, 0);
const currentPage = ref(1); const currentPage = ref(1);
const data = reactive({
}) function viewDetails(){
console.log(props.routeUrl)
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@ -103,10 +102,9 @@ table{
width: 120%; width: 120%;
td{ td{
border: 0.5px solid #ccc; border: 0.5px solid #ccc;
padding: 0.85rem; padding: 0.5rem;
} }
} }
.input-box{ .input-box{
padding: 0!important; padding: 0!important;
border-bottom: 1px solid #ccc border-bottom: 1px solid #ccc

22
components/FinanceManage.vue

@ -1,12 +1,12 @@
<template> <template>
<div> <div>
<table class="w-full text-gray-500 mt-4 text-ms"> <table class="w-full text-gray-500 mt-4 text-xs">
<tr class="bg-gray-100"> <tr class="bg-gray-100">
<td class="">任务名称</td> <td class="40">任务名称</td>
<td class="">预算()</td> <td class="25">预算()</td>
<td class="">奖金()</td> <td class="25">奖金()</td>
</tr> </tr>
<tr v-for="item in arrayData"> <tr v-for="item in arrayData" @click="dataDetails">
<td>{{item.name}}</td> <td>{{item.name}}</td>
<td> <td>
<div v-if="!item.showBudgetEdit" @click="item.showBudgetEdit = true">{{item.budget}}</div> <div v-if="!item.showBudgetEdit" @click="item.showBudgetEdit = true">{{item.budget}}</div>
@ -30,7 +30,7 @@
</template> </template>
<script setup> <script setup>
import {ref, reactive} from'vue' import {ref} from'vue'
const arrayData = ref([ const arrayData = ref([
{ {
name:'财务条插件界面设计', name:'财务条插件界面设计',
@ -92,18 +92,16 @@ const arrayData = ref([
const sumBudget = arrayData.value.reduce((sum, e) => sum + e.budget, 0); const sumBudget = arrayData.value.reduce((sum, e) => sum + e.budget, 0);
const sumBonus = arrayData.value.reduce((sum, e) => sum + e.bonus, 0); const sumBonus = arrayData.value.reduce((sum, e) => sum + e.bonus, 0);
const currentPage = ref(1); const currentPage = ref(1);
const data = reactive({
})
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
td{ td{
border: 0.5px solid #ccc; border: 0.5px solid #ccc;
padding: 0.85rem; padding: 0.7rem;
} }
.input-box{ .input-box{
padding: 0!important; width:45px;
border-bottom: 1px solid #ccc padding: 0!important;
border-bottom: 1px solid #ccc
} }
</style> </style>

1
layouts/default.vue

@ -9,5 +9,6 @@
background:#eee; background:#eee;
height:100%; height:100%;
width:100%; width:100%;
overflow:hidden;
} }
</style> </style>

11
pages/Initiate-application.vue

@ -1,12 +1,11 @@
<template> <template>
<div> <div>
<!-- 导航返回上一页 --> <!-- 导航返回上一页 -->
<NuxtLink to="/applicant">
<van-nav-bar <van-nav-bar
title="发起申请" title="发起申请"
left-arrow left-arrow
@click-left="onClickLeft"
/> />
</NuxtLink>
<!-- 申请发票需要输入的数据 --> <!-- 申请发票需要输入的数据 -->
<div class="bg-white pb-3"> <div class="bg-white pb-3">
<div class="text-gray-500 px-4 py-3 font-semibold">发票信息</div> <div class="text-gray-500 px-4 py-3 font-semibold">发票信息</div>
@ -233,7 +232,7 @@
<div class="text-gray-500 font-semibold">历史申请</div> <div class="text-gray-500 font-semibold">历史申请</div>
<div v-if="showHistory"> <div v-if="showHistory">
<Search /> <Search />
<FinanceManage /> <FinanceExamine />
</div> </div>
<div v-if="!showHistory" class="no-data"> <div v-if="!showHistory" class="no-data">
暂无历史记录 暂无历史记录
@ -242,7 +241,7 @@
<!-- 底部立即提交按钮 --> <!-- 底部立即提交按钮 -->
<NuxtLink to="/application-details"> <NuxtLink to="/application-details">
<div class="mx-6 mt-10"> <div class="mx-6 mt-10">
<van-button type="primary" block>立即提交</van-button> <van-button type="primary" size="small" block>立即提交</van-button>
</div> </div>
</NuxtLink> </NuxtLink>
@ -465,6 +464,10 @@ function uploadBill(){
},1000) },1000)
} }
function onClickLeft(){
console.log(1)
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

15
pages/applicant.vue

@ -1,11 +1,6 @@
<template> <template>
<div> <div>
<!-- 头部选项卡部分 -->
<van-nav-bar
title="财务条"
left-arrow
@click-left="onClickLeft"
/>
<!-- 搜索框与表格部分 --> <!-- 搜索框与表格部分 -->
<van-tabs v-model:active="active" shrink line-width="60px" color="#59B4FF" title-active-color="#59B4FF"> <van-tabs v-model:active="active" shrink line-width="60px" color="#59B4FF" title-active-color="#59B4FF">
<van-tab title="我的申请"> <van-tab title="我的申请">
@ -23,12 +18,11 @@
<div v-if="!isShow" class="no-data"> <div v-if="!isShow" class="no-data">
暂无历史记录 暂无历史记录
</div> </div>
</div> --> </div> -->
<!-- 底部提交按钮部分 --> <!-- 底部提交按钮部分 -->
<div class="mt-20"> <div class="mt-20 px-10">
<NuxtLink to="/Initiate-application"> <NuxtLink to="/Initiate-application">
<van-button type="primary" block>发起申请</van-button> <van-button type="primary" size="small" block>发起申请</van-button>
</NuxtLink> </NuxtLink>
</div> </div>
</van-tab> </van-tab>
@ -50,9 +44,8 @@
500 500
</div> </div>
<div class="px-8"> <div class="px-8">
<van-button type="primary" block :disabled="!isBonus" >立即领取</van-button> <van-button type="primary" size="small" block :disabled="!isBonus" >立即领取</van-button>
</div> </div>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>

15
pages/application-details.vue

@ -1,15 +1,18 @@
<template> <template>
<div> <div>
<!-- 导航栏 --> <!-- 导航栏 -->
<van-nav-bar <NuxtLink to="Initiate-application">
<van-nav-bar
title="申请详情" title="申请详情"
left-arrow left-arrow
@click-left="onClickLeft" @click-left="onClickLeft"
/> />
</NuxtLink>
<!-- 审核结果 --> <!-- 审核结果 -->
<div class="bg-white px-3"> <div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3">审核结果</div> <div class="text-gray-500 font-semibold px-1 py-3">审核结果</div>
<div v-for="item in checkerList" class="flex p-3 text-gray-400 text-base justify-between"> <div v-for="item in checkerList" class="flex py-3 px-4 text-gray-400 text-base justify-between">
<div> <div>
<div>{{item.name}}</div> <div>{{item.name}}</div>
<div class="text-sm pt-1">{{item.advice}}</div> <div class="text-sm pt-1">{{item.advice}}</div>
@ -36,7 +39,7 @@
<!-- 发票信息 --> <!-- 发票信息 -->
<div class="bg-white px-3"> <div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">发票信息</div> <div class="text-gray-500 font-semibold px-1 py-3 mt-5">发票信息</div>
<div v-for="item in billList" class="flex p-2 text-gray-400 text-base justify-between"> <div v-for="item in billList" class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>{{item.name}}</div> <div>{{item.name}}</div>
<div>{{item.value}}</div> <div>{{item.value}}</div>
</div> </div>
@ -44,7 +47,7 @@
<!-- 其他信息 --> <!-- 其他信息 -->
<div class="bg-white px-3"> <div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">其他信息</div> <div class="text-gray-500 font-semibold px-1 py-3 mt-5">其他信息</div>
<div v-for="item in otherData" class="flex p-2 text-gray-400 text-base justify-between"> <div v-for="item in otherData" class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>{{item.name}}</div> <div>{{item.name}}</div>
<div>{{item.value}}</div> <div>{{item.value}}</div>
</div> </div>
@ -52,7 +55,7 @@
<!-- 提交人信息 --> <!-- 提交人信息 -->
<div class="bg-white px-3"> <div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">提交人信息</div> <div class="text-gray-500 font-semibold px-1 py-3 mt-5">提交人信息</div>
<div v-for="item in submitter" class="flex p-2 text-gray-400 text-base justify-between"> <div v-for="item in submitter" class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>{{item.name}}</div> <div>{{item.name}}</div>
<div>{{item.value}}</div> <div>{{item.value}}</div>
</div> </div>

186
pages/financial-approval-details.vue

@ -1,5 +1,189 @@
<template> <template>
<div> <div>
财务审批详情 <van-nav-bar
title="财务审批详情"
left-arrow
@click-left="onClickLeft"
/>
<!-- 发票信息 -->
<div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">发票信息</div>
<div v-for="item in billList" class="flex p-2 text-gray-400 text-base justify-between">
<div>{{item.name}}</div>
<div>{{item.value}}</div>
</div>
</div>
<!-- 其他信息 -->
<div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">其他信息</div>
<div v-for="item in otherData" class="flex p-2 text-gray-400 text-base justify-between">
<div>{{item.name}}</div>
<div>{{item.value}}</div>
</div>
</div>
<!-- 提交人信息 -->
<div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">提交人信息</div>
<div v-for="item in submitter" class="flex p-2 text-gray-400 text-base justify-between">
<div>{{item.name}}</div>
<div>{{item.value}}</div>
</div>
</div>
<!-- 审核人信息 -->
<div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">审核结果</div>
<div v-for="item in checkerList" class="flex p-3 text-gray-400 text-base justify-between">
<!-- 遍历的审核人的姓名建议和时间 -->
<div>
<div>{{item.name}}</div>
<div class="text-sm pt-1">{{item.advice}}</div>
<div class="text-sm pt-1">{{item.checkedTime}}</div>
</div>
<!--其他审核人 -->
<div class="text-center" v-show="!item.isMine">
<div :class="item.status === '1' ? 'text-green-500' : item.status === '2' ? 'text-red-500' : ''">
{{item.status === '1' ? '已通过' : item.status === '2' ? '已驳回' : '待审批'}}
</div>
<div v-if="item.score>0" class="mt-1 text-yellow-500">
<van-circle
v-model:current-rate="item.score"
:rate="item.score"
:speed="100"
:text="item.score"
color="#ff6700"
:stroke-width="100"
/>
</div>
</div>
<!-- 当前审核人已审核完毕 -->
<div class="text-center" v-show="item.isMine && item.status !== '0'">
<div :class="item.status === '1' ? 'text-green-500' : item.status === '2' ? 'text-red-500' : ''">
{{item.status === '1' ? '已通过' : item.status === '2' ? '已驳回' : '待审批'}}
</div>
<div v-if="item.score>0" class="mt-1 text-yellow-500">
<van-circle
v-model:current-rate="item.score"
:rate="item.score"
:speed="100"
:text="item.score"
color="#ff6700"
:stroke-width="100"
/>
</div>
</div>
<!-- 当前审核人未审批状态 -->
<div class="text-center" v-show="item.isMine && item.status === '0'">
<van-button type="success" round size="mini" class="button ml-5">通过</van-button>
<van-button type="danger" round size="mini" class="button">驳回</van-button>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script setup>
import {ref} from 'vue'
//
const billList = ref([
{
name: "发票代码",
value: "4154153125646",
},
{
name: "发票号码",
value: "545648789",
},
{
name: "合计金额(元)",
value: "40",
},
{
name: "税额(元)",
value: "2",
},
{
name: "开票日期",
value: "2022年1月2日",
},
{
name: "备注",
value: "业务支出",
},
])
//
const otherData = ref([
{
name: "申请类型",
value: "项目申请"
},
{
name: "所属项目",
value: "PT项目"
},
{
name: "所属任务",
value: "财务条界面设计"
},
{
name: "类目",
value: "报销"
},
{
name: "名目",
value: "业务招待费"
},
])
//
const submitter = ref([
{
name:'姓名',
value:'黛西'
},
{
name:'部门',
value:'软件部'
},
{
name:'提交时间',
value:'2021/12/29 13:22'
},
]);
//
const checkerList = ref([
{
name: "冯教授",
advice: "",
checkedTime: "",
status: "0",
isMine: "1",
},
{
name: "薇薇安",
advice: "很棒!",
checkedTime: "12/18 14:55",
status: "0",
score:''
},
{
name: "小明",
advice: "很棒!",
checkedTime: "12/18 14:55",
status: "1",
score:'80'
}
]);
function onClickLeft(){
console.log('返回')
}
</script>
<style lang="less" scoped>
.van-circle{
width: 2.5rem !important;
height: 2.5rem !important;
}
.button{
padding: 0 0.75rem;
}
</style>

75
pages/financial-approval.vue

@ -0,0 +1,75 @@
<template>
<div class="mb-60">
<!-- 财务审批页面 -->
<div class="bg-white p-4 flex text-gray-500 flex-col d_jump">
<div>
<span class="font-semibold">财务审批</span> <span class="ml-2 text-xs">对员工提交的申请进行审批</span>
</div>
<Search />
<FinanceExamine />
</div>
<!-- 财务统计页面 -->
<div class="bg-white p-4 mt-5 flex text-gray-500 flex-col d_jump">
<div>
<span class="font-semibold">财务统计</span> <span class="ml-2 text-xs">财务明细统计查看</span>
</div>
<img src="public/statistics.png" class="w-full">
</div>
<ul class="menu">
<li @click="jump(0)">财务审批</li>
<li @click="jump(1)">财务统计</li>
</ul>
</div>
</template>
<script>
export default {
layout: 'default',
};
</script>
<script setup>
import {ref} from 'vue'
const active = ref(0);
function onClickLeft(){
console.log('返回上一页')
}
function jump(index) {
let jump = document.querySelectorAll('.d_jump')
//
let total = jump[index].offsetTop
// Chrome
document.body.scrollTop = total
// Firefox
document.documentElement.scrollTop = total
// Safari
window.pageYOffset = total
}
</script>
<style lang="less">
.van-nav-bar__content{
background-color:#eee
}
.van-icon-arrow-left:before{
color: #000;
}
.menu{
position: fixed;
right: 0;
bottom: 15px;
z-index: 99
}
.menu li{
width: 72px;
color: #fff;
background: rgba(25, 137, 250, 0.6);
padding: 8px 20px;
border-radius: 30px 0 0 30px;
margin-bottom: 15px;
}
</style>

25
pages/index.vue

@ -1,10 +1,5 @@
<template> <template>
<div class="mb-60"> <div class="mb-60">
<van-nav-bar
title="资源管理"
left-arrow
@click-left="onClickLeft"
/>
<van-tabs v-model:active="active" shrink line-width="60px" color="#59B4FF" title-active-color="#59B4FF"> <van-tabs v-model:active="active" shrink line-width="60px" color="#59B4FF" title-active-color="#59B4FF">
<van-tab title="财务管理"> <van-tab title="财务管理">
<!-- 财务管理页面 --> <!-- 财务管理页面 -->
@ -21,7 +16,7 @@
<span class="font-semibold">财务审批</span> <span class="ml-2">对员工提交的申请进行审批</span> <span class="font-semibold">财务审批</span> <span class="ml-2">对员工提交的申请进行审批</span>
</div> </div>
<Search /> <Search />
<FinanceExamine /> <FinanceExamine :routeUrl="'financial-approval-details'" />
</div> </div>
<!-- 财务统计页面 --> <!-- 财务统计页面 -->
<div class="bg-white p-4 mt-5 flex text-gray-500 flex-col d_jump"> <div class="bg-white p-4 mt-5 flex text-gray-500 flex-col d_jump">
@ -54,8 +49,6 @@ export default {
<script setup> <script setup>
import {ref} from 'vue' import {ref} from 'vue'
const active = ref(0); const active = ref(0);
function onClickLeft(){ function onClickLeft(){
console.log('返回上一页') console.log('返回上一页')
} }
@ -71,6 +64,7 @@ function jump(index) {
// Safari // Safari
window.pageYOffset = total window.pageYOffset = total
} }
</script> </script>
<style lang="less"> <style lang="less">
@ -80,21 +74,6 @@ function jump(index) {
.van-icon-arrow-left:before{ .van-icon-arrow-left:before{
color: #000; color: #000;
} }
.financial-management{
// background-color:#ffffff;
// padding: 1rem;
// margin-top: 1rem;
// color: #555252;
// .title{
// font-weight: 600;
// }
// .title-describe{
// font-size: 12px;
// margin-left: 0.5rem;
// color: #A0A0A0;
// }
}
.menu{ .menu{
position: fixed; position: fixed;
right: 0; right: 0;

2
plugins/vant.js

@ -20,6 +20,7 @@ import {
Popup, Popup,
Cascader, Cascader,
Circle, Circle,
Sticky,
} from 'vant'; } from 'vant';
import { defineNuxtPlugin } from '#app'; import { defineNuxtPlugin } from '#app';
@ -43,5 +44,6 @@ export default defineNuxtPlugin(nuxtApp => {
.use(Cascader) .use(Cascader)
.use(Popup) .use(Popup)
.use(Circle) .use(Circle)
.use(Sticky)
.use(Tabs); .use(Tabs);
}); });

Loading…
Cancel
Save