提车信息列表
parent
2e41579138
commit
412c27fbd7
|
|
@ -6,6 +6,8 @@ enum Api {
|
|||
PickUpAudit = '/api/MiVehiclePickup/PickUpAudit',
|
||||
// 添加
|
||||
Add = '/api/MiVehiclePickup/Add',
|
||||
// 实体
|
||||
Get = '/api/MiVehiclePickup/Get',
|
||||
}
|
||||
export function LoadAllPage(params) {
|
||||
return defHttp.get({
|
||||
|
|
@ -13,6 +15,12 @@ export function LoadAllPage(params) {
|
|||
params,
|
||||
});
|
||||
}
|
||||
export function Get(params) {
|
||||
return defHttp.get({
|
||||
url: Api.Get,
|
||||
params,
|
||||
});
|
||||
}
|
||||
export function PickUpAudit(params) {
|
||||
return defHttp.post({
|
||||
url: Api.PickUpAudit,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
<template>
|
||||
<div class="modal-content" id="reportviolations-show-modal">
|
||||
<a-descriptions title="上报信息" bordered :column="3" style="margin-bottom: 20px;">
|
||||
<a-descriptions-item
|
||||
v-for="item in showInfoColumn"
|
||||
:label="item.label"
|
||||
:span="item.span? item.span: 1"
|
||||
>
|
||||
<template v-if="item.key == 'scenePhotos'">
|
||||
<a-image-preview-group
|
||||
:preview="{
|
||||
getContainer: getContainer,
|
||||
}"
|
||||
>
|
||||
<template v-for="(imageItem, imageIndex) in props.modalData[item.key]" :key="imageIndex">
|
||||
<a-image
|
||||
v-if="imageItem.image"
|
||||
width="100px"
|
||||
height="100px"
|
||||
:src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem.image}`"
|
||||
:preview="{
|
||||
getContainer,
|
||||
}"
|
||||
></a-image>
|
||||
</template>
|
||||
</a-image-preview-group>
|
||||
</template>
|
||||
<template v-else-if="item.key == 'vehicles'">
|
||||
<a-table :dataSource="props.modalData['vehicles']" :columns="vehiclesColumns" :pagination="false">
|
||||
<template #bodyCell="{ column, record, text }">
|
||||
<template v-if="column.key === 'images'">
|
||||
<a-image-preview-group
|
||||
:preview="{
|
||||
getContainer: getContainer,
|
||||
}"
|
||||
>
|
||||
<template v-for="(imageItem, imageIndex) in text" :key="imageIndex">
|
||||
<a-image
|
||||
v-if="imageItem.image"
|
||||
width="100px"
|
||||
height="100px"
|
||||
:src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem.image}`"
|
||||
:preview="{
|
||||
getContainer,
|
||||
}"
|
||||
></a-image>
|
||||
</template>
|
||||
</a-image-preview-group>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</template>
|
||||
<template v-else>{{ props.modalData.violationReport[item.key] }}</template>
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<a-descriptions title="提车信息" bordered :column="3" style="margin-bottom: 20px;">
|
||||
<a-descriptions-item label="发起人">
|
||||
{{ props.modalData.pickupInfo.initiatorName }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="发起时间">
|
||||
{{ props.modalData.pickupInfo.initiateTime }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="备注">
|
||||
{{ props.modalData.pickupInfo.remark }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<div class="button-div">
|
||||
<a-input v-model:value="reviewValue" style="margin-right: 20px;" placeholder="请输入审核意见"/>
|
||||
<div style="display: flex;">
|
||||
<a-button style="margin-right: 20px;" class="save-button" type="error" @click="submit(false)">审核不通过</a-button>
|
||||
<a-button class="save-button" type="success" @click="submit(true)">审核通过</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue"
|
||||
import { PickUpAudit } from '@/api/illegalconstruction/getcar'
|
||||
import { message } from "ant-design-vue";
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
|
||||
const { VITE_GLOB_INFO_IMAGE_URL } = getAppEnvConfig();
|
||||
const props = defineProps(['modalType', 'modalData'])
|
||||
const emits = defineEmits(['closeModal'])
|
||||
const reviewValue = ref('')
|
||||
|
||||
const showInfoColumn = [
|
||||
{ label: '标题', key: 'title' },
|
||||
{ label: '当事人姓名', key: 'partyName' },
|
||||
{ label: '当事人电话', key: 'partyPhone' },
|
||||
{ label: '违法类型', key: 'violationType' },
|
||||
{ label: '问题描述', key: 'problemDescription' },
|
||||
{ label: '上报人', key: 'reporter' },
|
||||
{ label: '上报时间', key: 'reportTime' },
|
||||
{ label: '上报单位', key: 'reportUnitName' },
|
||||
{ label: '状态', key: 'status' },
|
||||
{ label: '处理意见', key: 'handlingOpinion' },
|
||||
{ label: '处理单位', key: 'handlingUnit' },
|
||||
{ label: '处理人', key: 'handler' },
|
||||
{ label: '处理时间', key: 'handlingTime', },
|
||||
{ label: '现场照片', key: 'scenePhotos', span: 2},
|
||||
{ label: '车辆信息', key: 'vehicles', span: 3},
|
||||
]
|
||||
const vehiclesColumns = [
|
||||
{ title: '身份证', dataIndex: 'idCard', key: 'idCard',},
|
||||
{ title: '姓名', dataIndex: 'name', key: 'name',},
|
||||
{ title: '联系方式', dataIndex: 'phone', key: 'phone',},
|
||||
{ title: '类型', dataIndex: 'type', key: 'type',},
|
||||
{ title: '牌照', dataIndex: 'licensePlate', key: 'licensePlate',},
|
||||
{ title: '图片', dataIndex: 'images', key: 'images',},
|
||||
]
|
||||
|
||||
onMounted(() => {
|
||||
})
|
||||
|
||||
const cancel = () => {
|
||||
emits('closeModal')
|
||||
}
|
||||
const getContainer = () => {
|
||||
return document.getElementById('reportviolations-show-modal');
|
||||
};
|
||||
const submit = (isagree) => {
|
||||
let params = {
|
||||
id: props.modalData.pickupInfo.pickupId,
|
||||
isagree,
|
||||
reviewComments: reviewValue.value
|
||||
}
|
||||
PickUpAudit(params).then(res => {
|
||||
message.success('审核成功')
|
||||
emits('closeModal', true)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.modal-content{
|
||||
padding: 20px;
|
||||
.content-form{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.button-div{
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
.cancel-button{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<!-- <PermissionBtn @btnEvent="buttonClick"></PermissionBtn> -->
|
||||
<a-button type="primary" @click="buttonClick('audit')">审核</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, text }">
|
||||
<template v-if="column.key == 'Status'">
|
||||
{{ getLabel('Status', text) }}
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="100%" wrap-class-name="getcar-show-info-modal" v-model:open="showInfoModalOpen" :title="modalType == 'add'? '添加': '编辑'" :maskClosable="false" :footer="null" :destroyOnClose="true" @cancel="modalClose">
|
||||
<ShowInfoModal :modalType="modalType" :modalData="modalData" @closeModal="closeModal"/>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch, createVNode, unref } from 'vue';
|
||||
import { Modal, message } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { BasicTable, useTable } from '@/components/Table';
|
||||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||
import { LoadAllPage, Get } from '@/api/illegalconstruction/getcar'
|
||||
import { columns, searchFormSchema, statusOptions } from './util';
|
||||
import ShowInfoModal from './ShowInfoModal/index.vue'
|
||||
|
||||
const showInfoModalOpen = ref(false)
|
||||
const modalType = ref()
|
||||
const modalData = ref({})
|
||||
|
||||
// 表格
|
||||
const [registerTable, { reload, getSelectRows, getPaginationRef }] = useTable({
|
||||
title: '提车信息列表',
|
||||
api: LoadAllPage,
|
||||
columns: columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
showIndexColumn: false,
|
||||
rowSelection: {
|
||||
type: 'radio',
|
||||
},
|
||||
useSearchForm: true,
|
||||
bordered: true,
|
||||
showTableSetting: true,
|
||||
handleSearchInfoFn(info) {
|
||||
return info;
|
||||
},
|
||||
});
|
||||
const getLabel = (type, value) => {
|
||||
let result: any[] = [];
|
||||
let label = '';
|
||||
switch (type) {
|
||||
case 'Status':
|
||||
result = statusOptions;
|
||||
break;
|
||||
}
|
||||
result.forEach((item) => {
|
||||
if (item.value == value) {
|
||||
label = item.label;
|
||||
}
|
||||
});
|
||||
return label;
|
||||
};
|
||||
// 按键分类
|
||||
const buttonClick = async (type) => {
|
||||
switch (type) {
|
||||
case 'audit':
|
||||
let select = getSelectRows()
|
||||
if (select.length !== 1) {
|
||||
message.warning('请选择一条数据');
|
||||
return;
|
||||
}
|
||||
modalType.value = 'process'
|
||||
Get({id: select[0].Id}).then(res => {
|
||||
modalData.value = res
|
||||
showInfoModalOpen.value = true
|
||||
})
|
||||
break;
|
||||
}
|
||||
};
|
||||
const closeModal = (isReload=false) => {
|
||||
showInfoModalOpen.value = false
|
||||
modalData.value = {}
|
||||
if(isReload){
|
||||
reload()
|
||||
}
|
||||
}
|
||||
const modalClose = () => {
|
||||
modalData.value = {}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.getcar-show-info-modal {
|
||||
.ant-modal {
|
||||
max-width: 100%;
|
||||
top: 0;
|
||||
padding-bottom: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.ant-modal-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh);
|
||||
}
|
||||
.ant-modal-body {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
import { BasicColumn, FormSchema } from '@/components/Table';
|
||||
import { asyncGetOptions } from '@/utils/global'
|
||||
|
||||
export const statusOptions = await asyncGetOptions('JGPickUpStatus');
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '发起时间',
|
||||
dataIndex: 'InitiateTime',
|
||||
},
|
||||
{
|
||||
title: '发起人',
|
||||
dataIndex: 'InitiatorName',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'Status',
|
||||
},
|
||||
{
|
||||
title: '盗采点',
|
||||
dataIndex: 'PointName',
|
||||
},
|
||||
{
|
||||
title: '审核人',
|
||||
dataIndex: 'Reviewer',
|
||||
},
|
||||
{
|
||||
title: '审核时间',
|
||||
dataIndex: 'ReviewTime',
|
||||
},
|
||||
{
|
||||
title: '审核意见',
|
||||
dataIndex: 'ReviewComments',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'Remark',
|
||||
}
|
||||
];
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'key',
|
||||
label: '名称',
|
||||
component: 'Input',
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'pointname',
|
||||
label: '盗采点名称',
|
||||
component: 'Input',
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
label: '提车状态',
|
||||
component: 'Select',
|
||||
colProps: { span: 4 },
|
||||
componentProps: {
|
||||
options: statusOptions,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: '[begindate, enddate]',
|
||||
label: '发起时间',
|
||||
component: 'RangePicker',
|
||||
colProps: { span: 5 },
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
},
|
||||
},
|
||||
];
|
||||
Loading…
Reference in New Issue