请假信息

This commit is contained in:
yangzhq68909 2025-02-24 15:28:03 +08:00
parent aff8d2168a
commit 43c78904f3
8 changed files with 225 additions and 11 deletions

View File

@ -72,7 +72,7 @@ export function indexChartScdtDataApi(config) { // 首页
data: config
})
}
export function bpmlistApi(config) { // 公文
export function gongwenlistApi(config) { // 公文
return https({
url: '/cxcoagwfb/cxcOaGwfb/bpmlist',
method: 'get',

View File

@ -10,6 +10,7 @@ export function qjAddApi(config) { // 发起请假流程申请
})
}
export function queryZwmcAndExaApi(username) { // 根据username获取职位名称和审批领导列表
return https({
url: '/CxcQxj/cxcQxj/queryZwmcByUsername',
@ -37,3 +38,11 @@ export function queryHisDateApi(username) { // 根据username获取最新请假
}
})
}
export function queryLeaveListApi(params) { // 获取所有请假信息
return https({
url: '/CxcQxj/cxcQxj/list',
method: 'get',
data: params
})
}

View File

@ -110,7 +110,7 @@
} from '@/api/api.js';
import {
qjQueryByIdApi
} from '@/api/pages.js';
} from '@/api/leaveApi.js';
import {
ref,
onBeforeMount,

View File

@ -233,6 +233,14 @@
"navigationBarTitleText": "人员年龄分组统计信息",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/views/renliziyuan/qingjiaxinxi/index",
"style": {
"navigationBarTitleText": "请假信息",
"navigationBarTextStyle": "white"
}
}
],

View File

@ -52,7 +52,7 @@
onLoad
} from '@dcloudio/uni-app';
import {
bpmlistApi,
gongwenlistApi,
faguiApi,
zhiduApi,
gonggaolistApi,
@ -62,7 +62,7 @@
useStore
} from '@/store';
const store = useStore();
import customNav from '../../bpm/customNav.vue';
import customNav from '@/bpm/customNav.vue';
import {
beforeJump,
opendocument
@ -76,7 +76,7 @@
/**公文接口*/
const bpmlist = () => {
loading = true
bpmlistApi({
gongwenlistApi({
pageNo,
pageSize,
fwbt: formatSearchkey()

View File

@ -111,7 +111,7 @@
qjAddApi,
queryZwmcAndExaApi,
queryHisDateApi
} from '@/api/pages.js';
} from '@/api/leaveApi.js';
import {
queryDepByCode,
queryZbDepByLdhth
@ -178,7 +178,6 @@
}
onLoad(() => {
loadData()
// getTomorrowDate()
})
const select = (e) => {
@ -278,10 +277,8 @@
queryHisDateApi(store.userinfo.username).then((res) => { //
if (res) {
console.log('--0', res)
getTomorrowDate(res);
} else {
console.log('--1', res)
getTomorrowDate();
}
})

View File

@ -135,7 +135,7 @@
// onReachBottom
} from '@dcloudio/uni-app';
import {
bpmlistApi,
gongwenlistApi,
gonggaolistApi,
zhibanApi,
faguiApi,
@ -261,7 +261,7 @@
/**公文接口*/
const bpmlist = () => {
loading = true
bpmlistApi({
gongwenlistApi({
pageNo,
pageSize
}).then((res) => {

View File

@ -0,0 +1,200 @@
<template>
<view :class="['content',{'gray':store.isgray==1}]">
<uni-card>
<!-- <view style="maring: 0 30rpx;"> -->
<!-- <uni-row>
<uni-col :span="11">
<uni-title title="姓名" align="left" type="h5"></uni-title>
</uni-col> -->
<!-- <uni-col :span="11" :push="2">
<uni-title title="请假类别" align="left" type="h5"></uni-title>
</uni-col> -->
<!-- </uni-row>
<uni-row>
<uni-col :span="11">
<uni-easyinput v-model="xm" suffixIcon="search" clearable placeholder="姓名模糊查询" @change="Search"
@iconClick="Search" />
</uni-col>
<uni-col :span="11" :push="2"> -->
<!-- <tree-select :dataSource="dataSource" v-model="type" dataValue="name" /> -->
<!-- <uni-easyinput v-model="ldhth" suffixIcon="search" clearable
@change="Search" @iconClick="Search" /> -->
<!-- </uni-col>
</uni-row>
</view> -->
<view style="maring: 0 30rpx;">
<uni-row>
<uni-col :span="24"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
</uni-row>
<uni-row>
<uni-col :span="24">
<trq-depart-select v-model="orgCode" returnCodeOrID="orgCode"
@change="departChange"></trq-depart-select>
</uni-col>
</uni-row>
</view>
</uni-card>
<view class="list">
<view class="item" v-for="item,i in list" :key="i" @click="">
<view class="title">
{{item._sysOrgCode}}{{item._username}}{{item._type}}申请
</view>
<view class="time_box f-row aic">
<view class="time">
{{item._begintime}}{{item._endtime}}
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
import {
onReachBottom,
onPullDownRefresh,
onLoad
} from '@dcloudio/uni-app';
import {
queryLeaveListApi
} from '@/api/leaveApi.js';
import {
getCategoryItemsApi
} from '@/api/api.js';
import {
useStore
} from '@/store';
// import treeSelect from "@/components/treeSelect/treeSelect.vue"
import {
beforeJump,
opendocument
} from '@/utils/index.js';
const orgCode = ref("") //orgCode
const store = useStore();
const list = ref([])
const dataSource = ref([])
const type = ref([])
let pageNo = 1
let pageSize = 15
let loading = false
onLoad(() => {
queryLeaveList()
})
const queryLeaveList = (params = {}) => {
list.value = []
loading = true
queryLeaveListApi({
...params,
pageNo,
pageSize
}).then((res) => {
if (res.success) {
list.value = [...list.value, ...formatObj(res.result.records, 'username_dictText', 'type',
'begintime', 'endtime', 'sysOrgCode_dictText')]
}
loading = false
}).catch((err) => {
console.log('err', err);
})
}
const formatObj = (arr, username, type, begintime, endtime, sysOrgCode) => {
arr.map((item) => {
item['_username'] = item[username]
item['_type'] = item[type]
item['_begintime'] = item[begintime]
item['_endtime'] = item[endtime]
item['_sysOrgCode'] = item[sysOrgCode]
})
return arr
}
function departChange(e) {
let params = {
sysOrgCode: e
}
queryLeaveList(params)
}
const back = () => {
uni.navigateBack()
}
onPullDownRefresh(() => {
pageNo = 1
loading = false
list.value = []
queryLeaveList()
uni.stopPullDownRefresh()
})
onReachBottom(() => {
if (loading) return
pageNo++
queryLeaveList()
})
</script>
<style>
page {
background-color: #f8f8f8;
}
</style>
<style lang="scss" scoped>
.content {
padding-top: v-bind(cusnavbarheight);
padding-bottom: 24rpx;
}
.list {
padding: 0 30rpx;
.item {
background: #FFFFFF;
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
border-radius: 16rpx;
padding: 30rpx;
margin-top: 24rpx;
position: relative;
.dot {
width: 12rpx;
height: 12rpx;
background: #ED361D;
position: absolute;
border-radius: 50%;
left: 9rpx;
top: 44rpx;
}
.title {
margin-bottom: 20rpx;
font-size: 28rpx;
color: #333333;
}
.time_box {
font-size: 24rpx;
color: #888888;
}
image {
width: 28rpx;
height: 22rpx;
margin-left: 62rpx;
margin-right: 8rpx;
}
}
}
.back {
padding: 0 30rpx;
}
</style>