Commit 241c0d86 by ningjihai

请假修改

parent ffd44599
...@@ -99,4 +99,19 @@ export function getLeaveRequrstBack(leaveRequestBackId) { ...@@ -99,4 +99,19 @@ export function getLeaveRequrstBack(leaveRequestBackId) {
url: `/attendance/attMobile/getLeaveRequrstBack/${leaveRequestBackId}`, url: `/attendance/attMobile/getLeaveRequrstBack/${leaveRequestBackId}`,
method: 'get' method: 'get'
}) })
}
// 预计算请假天数(后端精确计算,按班次与节假日排除非工作日)
export function precomputeLeaveDays(params) {
return request({
url: '/attendance/leaveRequest/precompute',
method: 'post',
data: params
})
}
export function getRestTime() {
return request({
url: '/attendance/leaveRequest/getRestTime',
method: 'get'
})
} }
\ No newline at end of file
<script setup lang="ts" name="LeaveDetailFlow"> <script setup lang="ts" name="LeaveDetailFlow">
/* 请假详情 */ /* 请假详情 */
import { ref, reactive, computed, onMounted } from 'vue' import { ref, reactive, computed, onMounted } from 'vue'
// import { useRouter } from 'vue-router' import { parseTime } from '/common/utils/ruoyi'
// import { showImagePreview } from 'vant'
import { getFlowChart } from '@/api/flowEngine/flowInterface' import { getFlowChart } from '@/api/flowEngine/flowInterface'
import { getLeaveRequestDetail } from '@/api/attendance/leave' import { getLeaveRequestDetail } from '@/api/attendance/leave'
import { selectDictLabel } from '@/common/utils/ruoyi' import { selectDictLabel } from '@/common/utils/ruoyi'
...@@ -79,14 +78,16 @@ function onDetailClose(item) { ...@@ -79,14 +78,16 @@ function onDetailClose(item) {
:options="breast_feed_type" :options="breast_feed_type"
:value="detail.breastFeedType" /> :value="detail.breastFeedType" />
</van-cell> </van-cell>
<van-cell title="开始时间" :value="detail.leaveType === '17' ? detail.beginTime.slice(0, 10) : detail.beginTime" /> <van-cell title="开始日期" :value="parseTime(detail.beginTime, '{y}-{m}-{d}')" />
<van-cell title="结束时间" :value="detail.leaveType === '17' ? detail.endTime.slice(0, 10) : detail.endTime" /> <van-cell title="开始上午/下午" :value="detail.startHalf === 'AM' ? '上午' : '下午'" />
<van-cell title="结束日期" :value="parseTime(detail.endTime, '{y}-{m}-{d}')" />
<van-cell title="结束上午/下午" :value="detail.startHalf === 'PM' ? '上午' : '下午'" />
<van-cell title="请假时长"> <van-cell title="请假时长">
{{ detail.duringTime }}小时 {{ detail.duringTime }}
</van-cell> </van-cell>
<van-cell title="代理人" :value="detail.agentName" /> <!-- <van-cell title="代理人" :value="detail.agentName" /> -->
<van-cell title="请假事由" :value="detail.reason" /> <van-cell title="请假事由" :value="detail.reason" />
<van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> <!-- <van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> -->
<van-grid <van-grid
v-if="detail.fileList?.length" v-if="detail.fileList?.length"
:border="false" :border="false"
......
<script setup lang="ts" name="LeaveDetailFlowClose"> <script setup lang="ts" name="LeaveDetailFlowClose">
/* 销假详情 */ /* 销假详情 */
// import { ref } from 'vue' import { parseTime } from '/common/utils/ruoyi'
// import { showImagePreview } from 'vant'
import { getLeaveRequrstBack } from '@/api/attendance/leave' import { getLeaveRequrstBack } from '@/api/attendance/leave'
import { getFlowChart } from '@/api/flowEngine/flowInterface' import { getFlowChart } from '@/api/flowEngine/flowInterface'
import { useDict } from '@/common/utils/dict' import { useDict } from '@/common/utils/dict'
...@@ -53,14 +52,16 @@ function onPreview(index) { ...@@ -53,14 +52,16 @@ function onPreview(index) {
:options="request_leave_type" :options="request_leave_type"
:value="detail?.leaveType" /> :value="detail?.leaveType" />
</van-cell> </van-cell>
<van-cell title="开始时间" :value="detail?.beginTime" /> <van-cell title="开始日期" :value="parseTime(detail.beginTime, '{y}-{m}-{d}')" />
<van-cell title="结束时间" :value="detail?.businessTripStatus === '2' ? detail?.realBackTime : detail?.endTime" /> <van-cell title="开始上午/下午" :value="detail.startHalf === 'AM' ? '上午' : '下午'" />
<van-cell title="请假时长"> <van-cell title="结束日期" :value="parseTime(detail.endTime, '{y}-{m}-{d}')" />
{{ detail?.duringTime }}小时 <van-cell title="结束上午/下午" :value="detail.startHalf === 'PM' ? '上午' : '下午'" />
</van-cell> <van-cell title="请假时长">
<van-cell title="代理人" :value="detail?.agentName" /> {{ detail.duringTime }}
</van-cell>
<!-- <van-cell title="代理人" :value="detail?.agentName" /> -->
<van-cell title="请假事由" :value="detail?.reason" /> <van-cell title="请假事由" :value="detail?.reason" />
<van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> <!-- <van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> -->
<van-grid <van-grid
v-if="detail?.fileList?.length" v-if="detail?.fileList?.length"
:border="false" :border="false"
......
<script setup lang="ts" name="LeaveDetailFlow"> <script setup lang="ts" name="LeaveDetailFlow">
/* 请假详情 */ /* 请假详情 */
import { ref, reactive, computed, onMounted } from 'vue' import { ref, reactive, computed, onMounted } from 'vue'
// import { useRouter } from 'vue-router' import { parseTime } from '/common/utils/ruoyi'
// import { showImagePreview } from 'vant'
import { getFlowChart } from '@/api/flowEngine/flowInterface' import { getFlowChart } from '@/api/flowEngine/flowInterface'
import { getLeaveRequestDetail } from '@/api/attendance/leave' import { getLeaveRequestDetail } from '@/api/attendance/leave'
import { selectDictLabel } from '@/common/utils/ruoyi' import { selectDictLabel } from '@/common/utils/ruoyi'
...@@ -79,14 +78,16 @@ function onDetailClose(item) { ...@@ -79,14 +78,16 @@ function onDetailClose(item) {
:options="breast_feed_type" :options="breast_feed_type"
:value="detail.breastFeedType" /> :value="detail.breastFeedType" />
</van-cell> </van-cell>
<van-cell title="开始时间" :value="detail.leaveType === '17' ? detail.beginTime.slice(0, 10) : detail.beginTime" /> <van-cell title="开始日期" :value="parseTime(detail.beginTime, '{y}-{m}-{d}')" />
<van-cell title="结束时间" :value="detail.leaveType === '17' ? detail.endTime.slice(0, 10) : detail.endTime" /> <van-cell title="开始上午/下午" :value="detail.startHalf === 'AM' ? '上午' : '下午'" />
<van-cell title="结束日期" :value="parseTime(detail.endTime, '{y}-{m}-{d}')" />
<van-cell title="结束上午/下午" :value="detail.startHalf === 'PM' ? '上午' : '下午'" />
<van-cell title="请假时长"> <van-cell title="请假时长">
{{ detail.duringTime }}小时 {{ detail.duringTime }}
</van-cell> </van-cell>
<van-cell title="代理人" :value="detail.agentName" /> <!-- <van-cell title="代理人" :value="detail.agentName" /> -->
<van-cell title="请假事由" :value="detail.reason" /> <van-cell title="请假事由" :value="detail.reason" />
<van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> <!-- <van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> -->
<van-grid <van-grid
v-if="detail.fileList?.length" v-if="detail.fileList?.length"
:border="false" :border="false"
......
<script setup lang="ts" name="LeaveDetailFlowClose"> <script setup lang="ts" name="LeaveDetailFlowClose">
/* 销假详情 */ import { parseTime } from '/common/utils/ruoyi'
// import { ref } from 'vue'
// import { showImagePreview } from 'vant'
import { getLeaveRequrstBack } from '@/api/attendance/leave' import { getLeaveRequrstBack } from '@/api/attendance/leave'
import { getFlowChart } from '@/api/flowEngine/flowInterface' import { getFlowChart } from '@/api/flowEngine/flowInterface'
import { useDict } from '../../../common/utils/dict' import { useDict } from '../../../common/utils/dict'
...@@ -54,14 +52,16 @@ function onPreview(index) { ...@@ -54,14 +52,16 @@ function onPreview(index) {
:options="request_leave_type" :options="request_leave_type"
:value="detail?.leaveType" /> :value="detail?.leaveType" />
</van-cell> </van-cell>
<van-cell title="开始时间" :value="detail?.beginTime" /> <van-cell title="开始日期" :value="parseTime(detail.beginTime, '{y}-{m}-{d}')" />
<van-cell title="结束时间" :value="detail?.businessTripStatus === '2' ? detail?.realBackTime : detail?.endTime" /> <van-cell title="开始上午/下午" :value="detail.startHalf === 'AM' ? '上午' : '下午'" />
<van-cell title="结束日期" :value="parseTime(detail.endTime, '{y}-{m}-{d}')" />
<van-cell title="结束上午/下午" :value="detail.startHalf === 'PM' ? '上午' : '下午'" />
<van-cell title="请假时长"> <van-cell title="请假时长">
{{ detail?.duringTime }}小时 {{ detail?.duringTime }}
</van-cell> </van-cell>
<van-cell title="代理人" :value="detail?.agentName" /> <!-- <van-cell title="代理人" :value="detail?.agentName" /> -->
<van-cell title="请假事由" :value="detail?.reason" /> <van-cell title="请假事由" :value="detail?.reason" />
<van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> <!-- <van-cell title="岗位紧急处理事务" :value="detail.urgentHandingOfAffairs || '无'" /> -->
<van-grid <van-grid
v-if="detail?.fileList?.length" v-if="detail?.fileList?.length"
:border="false" :border="false"
......
...@@ -41,10 +41,10 @@ function onRevoke() { ...@@ -41,10 +41,10 @@ function onRevoke() {
<div class="list-item__address"> <div class="list-item__address">
请假类型:<DictTag :tag="false" :options="request_leave_type" :value="props.item.leaveType ?? ''" /> 请假类型:<DictTag :tag="false" :options="request_leave_type" :value="props.item.leaveType ?? ''" />
</div> </div>
<div class="list-item__date">开始时间:{{ props.item.leaveType === '17' ? props.item.beginTime.slice(0, 10) : props.item.beginTime }}</div> <div class="list-item__date">开始日期:{{ parseTime(props.item.beginTime, '{y}-{m}-{d}') }}</div>
<!-- <div class="list-item__date">结束时间:{{ props.item.businessTripStatus === '2' ? props.item.realEndTime : props.item.endTime }}</div> --> <!-- <div class="list-item__date">结束时间:{{ props.item.businessTripStatus === '2' ? props.item.realEndTime : props.item.endTime }}</div> -->
<div class="list-item__date">结束时间:{{ props.item.leaveType === '17' ? props.item.endTime.slice(0, 10) : props.item.endTime }}</div> <div class="list-item__date">结束日期:{{ parseTime(props.item.endTime, '{y}-{m}-{d}') }}</div>
<div class="list-item__days">请假时长:{{ props.item.duringTime }}小时</div> <div class="list-item__days">请假时长:{{ props.item.duringTime }}</div>
<div class="list-item__detail"> <div class="list-item__detail">
<div>请假事由:</div> <div>请假事由:</div>
<div class="list-item__detail-content">{{ props.item.reason }}</div> <div class="list-item__detail-content">{{ props.item.reason }}</div>
......
...@@ -94,49 +94,57 @@ provide('process_group', process_group) ...@@ -94,49 +94,57 @@ provide('process_group', process_group)
provide('states', states) provide('states', states)
provide('onDetail', (approveCardData: any, type: string) => { provide('onDetail', (approveCardData: any, type: string) => {
console.log(approveCardData, type) console.log(approveCardData, type)
if (!processCode[approveCardData.processCode]) { const matchedKey = Object.keys(processCode).find(key =>
uni.showToast({ approveCardData.processCode.includes(key)
title:'请前往电脑端处理操作' )
}) if(matchedKey){
return console.log(matchedKey)
}
const page = { const page = {
'trip': '/attendance/trip/detail', 'trip': '/attendance/trip/detail',
'leave': '/attendance/leave/detail', 'leave': '/attendance/leave/detail',
'tripClose': '/attendance/trip/close-detail', 'tripClose': '/attendance/trip/close-detail',
'leaveClose': '/attendance/leave/close-detail', 'leaveClose': '/attendance/leave/close-detail',
'overTimeForLeave': '/attendance/overTimeForLeave/detail', 'overTimeForLeave': '/attendance/overTimeForLeave/detail',
'cardSign': '/attendance/cardSign/detail', 'cardSign': '/attendance/cardSign/detail',
'outside': '/attendance/outside/detail', 'outside': '/attendance/outside/detail',
'dayOff': '/attendance/dayOff/detail', 'dayOff': '/attendance/dayOff/detail',
'overtimeWork': '/attendance/overtimeWork/detail', 'overtimeWork': '/attendance/overtimeWork/detail',
'abnormalOvertime': '/attendance/abnormalOvertime/detail', 'abnormalOvertime': '/attendance/abnormalOvertime/detail',
'resignation': '/personnel/resignation/detail', 'resignation': '/personnel/resignation/detail',
'employeesChanges': '/personnel/employeesChanges/detail', 'employeesChanges': '/personnel/employeesChanges/detail',
'employmentApplication': '/personnel/employmentApplication/detail', 'employmentApplication': '/personnel/employmentApplication/detail',
'recruitmentNeeds': '/personnel/recruitmentNeeds/detail', 'recruitmentNeeds': '/personnel/recruitmentNeeds/detail',
'employeesDisciplinary': '/personnel/employeesDisciplinary/detail', 'employeesDisciplinary': '/personnel/employeesDisciplinary/detail',
'useCarApply': '/carUse/apply/detail' 'useCarApply': '/carUse/apply/detail'
}
// 待办
if (type === '1') {
uni.navigateTo({
url:'/approve/detail?type=' + processCode[approveCardData.processCode] + '&id=' + approveCardData.businessId + '&instanceId=' + approveCardData.instanceId + '&taskId=' + approveCardData.taskId + '&userId=' + approveCardData.userId + '&userName=' + approveCardData.userName + '&beginTime=' + approveCardData.beginTime + '&endTime=' + approveCardData.endTime
})
} else {
let instanceId = approveCardData.instanceId
// 已发
if (type === '3') {
instanceId = approveCardData.id
} }
// 抄送 // 待办
if (type === '4') { if (type === '1') {
instanceId = approveCardData.ruId uni.navigateTo({
url:'/approve/detail?type=' + processCode[matchedKey] + '&id=' + approveCardData.businessId + '&instanceId=' + approveCardData.instanceId + '&taskId=' + approveCardData.taskId + '&userId=' + approveCardData.userId + '&userName=' + approveCardData.userName + '&beginTime=' + approveCardData.beginTime + '&endTime=' + approveCardData.endTime
})
} else {
let instanceId = approveCardData.instanceId
// 已发
if (type === '3') {
instanceId = approveCardData.id
}
// 抄送
if (type === '4') {
instanceId = approveCardData.ruId
}
uni.navigateTo({
url: page[processCode[matchedKey]] + '?id=' + approveCardData.businessId + '&instanceId=' + instanceId + '&beginTime=' + approveCardData.beginTime + '&endTime=' + approveCardData.endTime
})
} }
uni.navigateTo({ }else{
url: page[processCode[approveCardData.processCode]] + '?id=' + approveCardData.businessId + '&instanceId=' + instanceId + '&beginTime=' + approveCardData.beginTime + '&endTime=' + approveCardData.endTime uni.showToast({
}) title:'请前往电脑端处理操作'
})
return
} }
}) })
function changeTotal(total, index) { function changeTotal(total, index) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论