干租车审批页面

This commit is contained in:
yangzhq68909 2025-06-09 16:04:21 +08:00
parent 32360ce63a
commit a6d16819e1
6 changed files with 74 additions and 134 deletions

10
src/api/bpm/index.ts Normal file
View File

@ -0,0 +1,10 @@
import { http } from '@/utils/http';
/*通过id查询数据*/
export function queryCarRentalByIdApi(id : string) {
return http({
url: '/CarRental/cxcCarRental/queryById',
method: 'GET',
data: { id }
})
}

View File

@ -49,7 +49,7 @@ export function countByOrgApi(params : object) {
})
}
/*通过id查询请假数据*/
/*通过id查询数据*/
export function queryByIdApi(id : string) {
return http({
url: '/CxcQxj/cxcQxj/queryById',

View File

@ -0,0 +1,54 @@
<template>
<wd-cell-group title="申请信息">
<wd-cell title="用车单位" :value="info.usingDepart_dictText" />
<wd-cell title="车型" :value="info.vehicleModel" />
<wd-cell title="车牌号" :value="info.carNumber" />
<wd-cell title="驾驶员姓名" :value="info.driverName" />
<wd-cell title="派车领导" :value="info.carLeader_dictText" />
<wd-cell title="出车工作日" :value="info.workingDay + '天'" />
<wd-cell title="劳动合同号" :value="info.ldhth" />
<wd-cell title="开始时间" :value="info.startTime" />
<wd-cell title="结束时间" :value="info.endTime" />
<wd-cell title="附件" v-if="info.path">
<template v-for="(img, index) in image" :key="index">
<wd-img :width="100" :height="100" :src="img" :enable-preview="true" />
</template>
</wd-cell>
<wd-cell title="交办任务" :value="info.taskAssigned" />
<wd-cell title="备注" :value="info.remarks" />
</wd-cell-group>
</template>
<script setup>
import {
queryCarRentalByIdApi
} from '@/api/bpm'
import {
imgUrl
} from '@/utils/index'
const info = ref({})
const image = ref([])
const props = defineProps({
formData: {
type: Object,
default: () => {},
}
})
//
const qjQueryById = () => {
queryCarRentalByIdApi(props.formData.dataId).then((res) => {
if (res.success) {
info.value = res.result.records[0]
if (info.value.fj) {
image.value = info.value.fj.split(',').map(path => imgUrl(path))
}
}
})
}
onMounted(() => {
qjQueryById()
})
</script>

View File

@ -26,13 +26,6 @@
import {
imgUrl
} from '@/utils/index'
defineOptions({
name: 'index',
options: {
styleIsolation: 'shared',
},
})
const info = ref({})
const image = ref([])
const props = defineProps({
@ -52,7 +45,9 @@
queryByIdApi(props.formData.dataId).then((res) => {
if (res.success) {
info.value = res.result.records[0]
image.value = info.value.path.split(',').map(path => imgUrl(path))
if(info.value.path){
image.value = info.value.path.split(',').map(path => imgUrl(path))
}
}
})
}
@ -60,128 +55,4 @@
onMounted(() => {
qjQueryById()
})
</script>
<style lang="scss" scoped>
.info_box {
padding: 40rpx 30rpx 16rpx 30rpx;
width: 630rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
border-radius: 16rpx;
margin-top: 30rpx;
.title {
font-size: 28rpx;
color: #333333;
background-image: url(../../static/index/line.png);
background-size: 44rpx 12rpx;
background-repeat: no-repeat;
background-position: left bottom;
margin-bottom: 30rpx;
display: flex;
justify-content: space-between;
}
.info {
font-size: 28rpx;
margin-bottom: 24rpx;
view {
color: #666666;
}
text {
color: #333333;
}
}
}
.progress {
background: #FFFFFF;
box-shadow: 0rpx 2rpx 4rpx 0rpx rgba(0, 0, 0, 0.5);
border-radius: 16rpx;
width: 630rpx;
padding: 40rpx 30rpx 16rpx 30rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
.status {
padding: 4rpx 8rpx;
display: inline-block;
color: #FFFFFF;
font-size: 20rpx;
margin-left: 8rpx;
border-radius: 8rpx;
}
.complete {
background-color: #7AC756;
}
.refuse {
background-color: #FE4600;
}
.title {
font-size: 28rpx;
color: #333333;
background-image: url(../../static/index/line.png);
background-size: 44rpx 12rpx;
background-repeat: no-repeat;
background-position: left bottom;
margin-bottom: 40rpx;
}
// .box:not(:first-child) {
// padding-top: 60rpx;
// }
.box:not(:last-child) {
position: relative;
padding-bottom: 60rpx;
&::before {
position: absolute;
content: ' ';
width: 1px;
height: 100%;
background: #efefef;
left: -42rpx;
top: 10rpx;
}
}
.box {
margin-left: 50rpx;
.topic {
position: relative;
font-size: 28rpx;
color: #333333;
&::before {
position: absolute;
content: ' ';
width: 18rpx;
height: 18rpx;
background: #01508B;
border-radius: 14rpx;
left: -50rpx;
top: 50%;
transform: translateY(-50%);
}
}
.name_time {
font-size: 24rpx;
color: #888888;
margin-top: 12rpx;
}
}
}
</style>
</script>

View File

@ -517,6 +517,10 @@
{
"root": "pages-bpm",
"pages": [
{
"path": "carRental/index",
"type": "page"
},
{
"path": "leaveApplication/index",
"type": "page"

View File

@ -56,6 +56,7 @@ interface NavigateToOptions {
"/pages-process/approvalTabbar" |
"/pages-process/myApplyProcess" |
"/pages-process/taskHandle" |
"/pages-bpm/carRental/index" |
"/pages-bpm/leaveApplication/index";
}
interface RedirectToOptions extends NavigateToOptions {}