Commit 22cbf657 by yancanhua

fix: 车辆检测页面开发

1 parent e8b1d3f8
......@@ -181,6 +181,57 @@
]
},
{
"code": "detection",
"name": "检测管理",
"enabled": true,
"type": "MENU",
"icon": "detection",
"children": [{
"code": "order",
"name": "检测工单管理",
"type": "MENU",
"enabled": true,
"value": "/detection/order",
"children": [
{
"code": "view",
"name": "查看",
"type": "BUTTON",
"enabled": true
}
]
},{
"code": "report",
"name": "检测报告管理",
"type": "MENU",
"enabled": true,
"value": "/detection/report",
"children": [
{
"code": "view",
"name": "查看",
"type": "BUTTON",
"enabled": true
}
]
},{
"code": "inspector",
"name": "检测师管理",
"type": "MENU",
"enabled": true,
"value": "/detection/inspector",
"children": [
{
"code": "view",
"name": "查看",
"type": "BUTTON",
"enabled": true
}
]
}]
},
{
"code": "venue",
"name": "车辆场地管理",
"enabled": true,
......
import { RouteRecordRaw } from "vue-router";
export const DetectionRouter: Array<RouteRecordRaw> = [
{
path: '/detection/detectionOrder',
component: () => import('@/views/detection/order/DetectionOrderPage.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测订单管理' }]
}
},
{
path: '/detection/detectionOrderView',
component: () => import('@/views/detection/order/DetectionOrderView.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测订单管理', path: '/detection/detectionOrder' }, { name: '检测订单详情' }]
}
},
{
path: '/detection/detectionReport',
component: () => import('@/views/detection/report/DetectionReportPage.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测报告管理' }]
}
},
{
path: '/detection/detectionReportView',
component: () => import('@/views/detection/report/DetectionReportView.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测报告管理', path: '/detection/detectionReport' }, { name: '检测报告详情' }]
}
},
{
path: '/detection/detectionInspector',
component: () => import('@/views/detection/inspector/DetectionInspectorPage.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测师管理' }]
}
},
{
path: '/detection/detectionInspectorView',
component: () => import('@/views/detection/inspector/DetectionInspectorView.vue'),
meta: {
breadcrumbs: [{ name: '检测管理' }, { name: '检测师管理', path: '/detection/detectionInspector' }, { name: '检测师详情' }]
}
},
];
......@@ -4,6 +4,7 @@ import {analysisRouter} from "@/router/AnalysisRouter";
import {systemRouter} from "@/router/SytemRouter";
import {financeRouter} from "@/router/FinanceRouter";
import {vehicleRouter} from "@/router/VehicleRouter";
import {DetectionRouter} from "@/router/DetectionRouter";
import {venueRouter} from "@/router/VenueRouter";
import {auctionRouter} from "@/router/AuctionRouter";
import {businessRouter} from "@/router/BusinessRouter";
......@@ -22,6 +23,7 @@ const routes: Array<RouteRecordRaw> = [
},
...securityRouter,
...vehicleRouter,
...DetectionRouter,
...venueRouter,
...auctionRouter,
...businessRouter,
......
<template>
<a-card class="tabs-card" :bordered="false">
<!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="pageReload"
@onReset="pageReset" :simpleFieldNum="4" />
<!--查询栏end-->
<!--库存车辆列表start-->
<div class="table-operations" style="margin-bottom: 16px;width: 100%;float: left;">
<div class="flex justify-end" style="float: left;">
已选 3 项
<a-button>批量绑定</a-button>
<a-button>批量解绑</a-button>
</div>
<div class="flex justify-end" style="float: right;">
<a-button type="primary" @click="downloadExcel" :disabled="exporting">导出</a-button>
</div>
</div>
<a-table :columns="columns" :data-source="pagination.content" :loading="loading" :bordered="false"
@change="pageRefresh" @resizeColumn="this.$filters.tableResizeColumn" size="small" :pagination="pageState"
:row-key="record => record.vehicleId" :scroll="{ y: 'calc(100vh - 350px)' }">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'vehicleState'">
111
</template>
</template>
</a-table>
</a-card>
</template>
<script lang="ts">
import { Component } from 'vue-facing-decorator';
import { message, TableColumnsType } from "ant-design-vue";
import { VehicleController } from "@/api/VehicleController";
import { Operator, Order } from "lib/src/core/page/Pagination";
import VehicleStateTag from "@/views/vehicle/inventory/VehicleStateTag.vue";
import { PaginationComponent } from "@/components/PaginationComponent";
import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
import { Security } from "@/store";
import { ExportUtil } from "@/common/ExportUtil";
@Component({
components: { VehicleStateTag }
})
export default class AppraiseVehiclePricePage extends PaginationComponent<Vehicle> {
vehicleStateIndex = "0";
exporting = false;
vehicleCount: any = {};
@Security.Getter hasPrivilege;
detectingStatusList = [
{ label: '待检测', value: 'TO_BE_DETECTED' },
{ label: '检测中', value: 'DETECTING' },
{ label: '已检测', value: 'DETECTED' },
];
reviewStatusList = [
{ label: '待审核', value: 'TO_BE_AUDITED' },
{ label: '审核中', value: 'AUDITING' },
{ label: '已审核', value: 'AUDITED' },
];
tabKey = "TO_BE_PRICED";
/**
* 表格列配置
*/
columns: TableColumnsType = [
{ title: '姓名', dataIndex: ['baseInfo', "sourceNo"], key: 'sourceNo', align: 'center', width: 150, resizable: true, ellipsis: true },
{ title: '手机号', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '所在城市', dataIndex: ['baseInfo', "sourceNo"], key: 'sourceNo', align: 'center', width: 150, resizable: true, ellipsis: true },
{ title: '待检测任务', dataIndex: ['baseInfo', "vin"], key: 'vin', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '检测中任务', dataIndex: ['baseInfo', "carTypeName"], key: 'carTypeName', align: 'center', width: 240, resizable: true, ellipsis: true },
{ title: '已完成任命', dataIndex: 'warehousingTime', key: 'warehousingTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '平均检测耗时', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '账号状态', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '操作', key: 'action', width: 170, align: 'center', fixed: 'right' },
];
/**
* 初始化配置
*/
created(): void {
this.init(this.axios, VehicleController.PAGE_PRICE_VEHICLE);
this.buildQueryForm({
sourceNo: [null, { label: '关键字', field: 'key', placeholder: '搜索姓名、手机号', operator: Operator.like }],
status: [null, {
label: '所在城市', field: 'status', type: 'select', allowClear: true, optionItems: this.detectingStatusList, operator: Operator.eq
}],
vehicleState: [null, {
label: '账号状态', field: 'vehicleState', type: 'select', allowClear: true, optionItems: this.reviewStatusList, operator: Operator.eq
}],
});
this.pagination.setDefaultSort('createTime', Order.desc);
}
downloadExcel(): void {
// this.exporting = true;
// VehicleController.exportPriceVehicles(this.axios, this.pagination.requestParams, { responseType: 'blob' }).then(response => {
// message.success('导出任务已创建,请稍后在浏览器下载列表中查看');
// ExportUtil.downloadExcelFile(response.data, '评估定价车辆列表');
// }).catch(error => {
// console.error('Error downloading Word file:', error);
// }).finally(() => {
// this.exporting = false;
// });
}
}
</script>
<style scoped lang="less"></style>
<template>
<div>
<a-modal v-model:open="open" title="Basic Modal" @ok="handleOk">
<a-spin :spinning="submitted">
<a-form :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol" ref="formRef">
<a-form-item name="realName" label="姓名"
:rules="[{ required: true, message: '请输入姓名' }, { pattern: /^(?:[\u4e00-\u9fa5]{1,10}|[a-zA-Z]{2,20})$/, message: '请输入1-10个中文字符或2-20个英文字符' }]">
<a-input v-model:value="postData.realName" placeholder="请输入姓名" :maxlength="20" />
</a-form-item>
<a-form-item name="mobile" label="手机号码"
:rules="[{ required: true, message: '请输入手机号码' }, { pattern: /^1(3|4|5|6|7|8|9)\d{9}$/, message: '请输入正确的11位手机号码' }]">
<a-input v-model:value="postData.mobile" placeholder="请输入手机号码" :maxlength="11" />
</a-form-item>
<a-form-item label="所在城市" name="registrationCity"
:rules="[{ required: true, message: '请选择所在城市!' }]">
<a-cascader style="width: 100%;" v-model:value="postData.registrationCity" :options="areaData"
placeholder="请选择所在城市" />
</a-form-item>
<a-form-item name="enabled" label="账号状态" :rules="[{ required: true, message: '请选择账号状态' }]">
<a-switch v-model:checked="postData.enabled" />
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</div>
</template>
<script lang="ts">
import { Component } from 'vue-facing-decorator';
import { reactive } from "vue";
import { EnhanceFormComponent } from "@/core/form/EnhanceFormComponent";
import { SecurityController } from "@/api/SecurityController";
import { message } from "ant-design-vue";
import { User } from "lib/src/entity/security/entity/User";
import { Role } from "lib/src/entity/security/entity/Role";
import { RuleObject } from "ant-design-vue/es/form/interface";
import { DefaultOptionType } from "ant-design-vue/es/vc-cascader/Cascader";
import { convertToTree } from "@/common/chinaarea";
@Component({
components: {}
})
export default class InspectorAddForm extends EnhanceFormComponent<User> {
postData={
realName: "",
mobile: "",
registrationCity: "",
enabled: true,
}
formState = {
realName: "",
mobile: "",
}
areaData: DefaultOptionType[] = [];
created(): void {
this.areaData = convertToTree(false);
}
handleOk() {
this.$refs.formRef.validate().then((valid) => {
if (valid) {
this.submitted = true;
// SecurityController.addUser(this.formState).then((response) => {
// this.submitted = false;
// this.open = false;
// message.success("添加成功");
// this.$emit("ok");
// }).catch((error) => {
// this.submitted = false;
// message.error(error.message);
// });
}
});
}
}
</script>
\ No newline at end of file
<template>
<a-card class="tabs-card" :bordered="false" :tab-list="tabs" :active-tab-key="tabKey"
@tabChange="key => changeTab(key)">
<!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="pageReload"
@onReset="pageReset" :simpleFieldNum="4" />
<!--查询栏end-->
<!--库存车辆列表start-->
<div class="table-operations" style="margin-bottom: 16px;width: 100%;float: left;">
<div class="flex justify-end" style="float: left;">
已选 3 项
<a-button @click="downloadExcel" :disabled="exporting">批量导出</a-button>
</div>
<div class="flex justify-end" style="float: right;">
<a-button type="primary">创建工单</a-button>
<a-button @click="downloadExcel" :disabled="exporting">导出</a-button>
</div>
</div>
<a-table :columns="columns" :data-source="pagination.content" :loading="loading" :bordered="false"
@change="pageRefresh" @resizeColumn="this.$filters.tableResizeColumn" size="small" :pagination="pageState"
:row-key="record => record.vehicleId" :scroll="{ y: 'calc(100vh - 350px)' }">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'vehicleState'">
111
</template>
</template>
</a-table>
</a-card>
</template>
<script lang="ts">
import { Component } from 'vue-facing-decorator';
import { message, TableColumnsType } from "ant-design-vue";
import { VehicleController } from "@/api/VehicleController";
import { Operator, Order } from "lib/src/core/page/Pagination";
import VehicleStateTag from "@/views/vehicle/inventory/VehicleStateTag.vue";
import { PaginationComponent } from "@/components/PaginationComponent";
import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
import { Security } from "@/store";
import { ExportUtil } from "@/common/ExportUtil";
@Component({
components: { VehicleStateTag }
})
export default class AppraiseVehiclePricePage extends PaginationComponent<Vehicle> {
vehicleStateIndex = "0";
exporting = false;
vehicleCount: any = {};
@Security.Getter hasPrivilege;
detectingStatusList = [
{ label: '待检测', value: 'TO_BE_DETECTED' },
{ label: '检测中', value: 'DETECTING' },
{ label: '已检测', value: 'DETECTED' },
];
reviewStatusList = [
{ label: '待审核', value: 'TO_BE_AUDITED' },
{ label: '审核中', value: 'AUDITING' },
{ label: '已审核', value: 'AUDITED' },
];
tabKey = "TO_BE_PRICED";
/**
* 表格列配置
*/
columns: TableColumnsType = [
{ title: '工单单号', dataIndex: ['baseInfo', "sourceNo"], key: 'sourceNo', align: 'center', width: 150, resizable: true, ellipsis: true },
{ title: '车源号', dataIndex: ['baseInfo', "vin"], key: 'vin', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '车型名称', dataIndex: ['baseInfo', "carTypeName"], key: 'carTypeName', align: 'center', width: 240, resizable: true, ellipsis: true },
{ title: '车牌号', dataIndex: ['baseInfo', "licensePlate"], key: 'licensePlate', align: 'center', width: 110, resizable: true, ellipsis: true },
{ title: '所属门店', dataIndex: ['venue', 'venueName'], key: 'venueName', align: 'center', width: 130, resizable: true, ellipsis: true },
{ title: '车辆所在地址', dataIndex: ['custodianInfo', "handoverAddress"], key: 'address', width: 180, resizable: true, ellipsis: true },
{ title: '车辆保管人', dataIndex: ['custodianInfo', "custodianName"], key: 'custodianName', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '车辆状态', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '检测师', dataIndex: 'warehousingTime', key: 'warehousingTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '检测地址', dataIndex: 'transferredTime', key: 'transferredTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '检测单状态', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '审核状态', dataIndex: 'vehicleState', key: 'vehicleState', width: 100, align: 'center', resizable: true, ellipsis: true },
{ title: '创建时间', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true },
{ title: '完成检测时间', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true },
{ title: '操作', key: 'action', width: 170, align: 'center', fixed: 'right' },
];
/**
* 初始化配置
*/
created(): void {
this.init(this.axios, VehicleController.PAGE_PRICE_VEHICLE);
this.buildQueryForm({
sourceNo: [null, { label: '关键字', field: 'key', placeholder: '搜索工单单号、车源号、VIN码、车牌', operator: Operator.like }],
status: [null, {
label: '检测单状态', field: 'status', type: 'select', allowClear: true, optionItems: this.detectingStatusList, operator: Operator.eq
}],
vehicleState: [null, {
label: '审核状态', field: 'vehicleState', type: 'select', allowClear: true, optionItems: this.reviewStatusList, operator: Operator.eq
}],
updateTime: [null, { label: '派单时间', field: 'updateTime', operator: Operator.dateBetween, type: 'date-range' }],
});
this.pagination.addFilter('vehicleState', ['TO_BE_PRICED', 'PRICED'], Operator.in);
this.pagination.setDefaultSort('createTime', Order.desc);
this.changeTab(this.tabKey);
}
get tabs() {
const tabs = [{ key: "", tab: '全部' }, { key: "1", tab: '待检测 (3)' }, { key: "2", tab: '检测中 (2)' }, { key: "3", tab: '已完成 (21)' }, { key: "4", tab: '已取消 (4)' }];
return tabs;
}
changeTab(orderState: string): void {
this.tabKey = orderState;
switch (this.tabKey) {
case "":
this.pagination.addDefaultFilter('vehicleState', ['TO_BE_PRICED', 'PRICED'], Operator.in);
break;
case "TO_BE_PRICED":
this.pagination.addDefaultFilter('vehicleState', ['TO_BE_PRICED'], Operator.in);
this.pagination.putData('auditState', "empty");
break;
case "UNAUDITED":
this.pagination.addDefaultFilter('vehicleState', ['TO_BE_PRICED'], Operator.in);
this.pagination.putData("auditState", "UNAUDITED");
break;
case "REJECTED":
this.pagination.addDefaultFilter('vehicleState', ['TO_BE_PRICED'], Operator.in);
this.pagination.putData("auditState", "REJECTED");
break;
case "AUDITED":
this.pagination.addDefaultFilter('vehicleState', ['PRICED'], Operator.in);
this.pagination.removeData('auditState');
break;
}
this.loading = true;
this.pagination.reload().then(res => { }).finally(() => this.loading = false);
}
downloadExcel(): void {
// this.exporting = true;
// VehicleController.exportPriceVehicles(this.axios, this.pagination.requestParams, { responseType: 'blob' }).then(response => {
// message.success('导出任务已创建,请稍后在浏览器下载列表中查看');
// ExportUtil.downloadExcelFile(response.data, '评估定价车辆列表');
// }).catch(error => {
// console.error('Error downloading Word file:', error);
// }).finally(() => {
// this.exporting = false;
// });
}
}
</script>
<style scoped lang="less"></style>
<template>
<a-card class="tabs-card" :bordered="false">
<!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="pageReload"
@onReset="pageReset" :simpleFieldNum="4" />
<!--查询栏end-->
<!--库存车辆列表start-->
<div class="table-operations" style="margin-bottom: 16px;width: 100%;float: left;">
<div class="flex justify-end" style="float: left;">
已选 3 项
<a-button>批量绑定</a-button>
<a-button>批量解绑</a-button>
</div>
<div class="flex justify-end" style="float: right;">
<a-button type="primary" @click="downloadExcel" :disabled="exporting">导出</a-button>
</div>
</div>
<a-table :columns="columns" :data-source="pagination.content" :loading="loading" :bordered="false"
@change="pageRefresh" @resizeColumn="this.$filters.tableResizeColumn" size="small" :pagination="pageState"
:row-key="record => record.vehicleId" :scroll="{ y: 'calc(100vh - 350px)' }">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'vehicleState'">
111
</template>
</template>
</a-table>
</a-card>
</template>
<script lang="ts">
import { Component } from 'vue-facing-decorator';
import { message, TableColumnsType } from "ant-design-vue";
import { VehicleController } from "@/api/VehicleController";
import { Operator, Order } from "lib/src/core/page/Pagination";
import VehicleStateTag from "@/views/vehicle/inventory/VehicleStateTag.vue";
import { PaginationComponent } from "@/components/PaginationComponent";
import { Vehicle } from "lib/src/entity/vehicle/entity/Vehicle";
import { Security } from "@/store";
import { ExportUtil } from "@/common/ExportUtil";
@Component({
components: { VehicleStateTag }
})
export default class AppraiseVehiclePricePage extends PaginationComponent<Vehicle> {
vehicleStateIndex = "0";
exporting = false;
vehicleCount: any = {};
@Security.Getter hasPrivilege;
detectingStatusList = [
{ label: '待检测', value: 'TO_BE_DETECTED' },
{ label: '检测中', value: 'DETECTING' },
{ label: '已检测', value: 'DETECTED' },
];
reviewStatusList = [
{ label: '待审核', value: 'TO_BE_AUDITED' },
{ label: '审核中', value: 'AUDITING' },
{ label: '已审核', value: 'AUDITED' },
];
tabKey = "TO_BE_PRICED";
/**
* 表格列配置
*/
columns: TableColumnsType = [
{ title: '报告编号', dataIndex: ['baseInfo', "sourceNo"], key: 'sourceNo', align: 'center', width: 150, resizable: true, ellipsis: true },
{ title: '生成时间', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true },
{ title: '工单单号', dataIndex: ['baseInfo', "sourceNo"], key: 'sourceNo', align: 'center', width: 150, resizable: true, ellipsis: true },
{ title: '车源号', dataIndex: ['baseInfo', "vin"], key: 'vin', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '车型名称', dataIndex: ['baseInfo', "carTypeName"], key: 'carTypeName', align: 'center', width: 240, resizable: true, ellipsis: true },
{ title: '车牌号', dataIndex: 'warehousingTime', key: 'warehousingTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '车辆状态', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '评分', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true },
{ title: '绑定状态', dataIndex: 'warehousingTime', key: 'warehousingTime', align: 'center', width: 170, resizable: true, ellipsis: true },
{ title: '更新时间', dataIndex: 'updateTime', key: 'updateTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true },
{ title: '操作', key: 'action', width: 170, align: 'center', fixed: 'right' },
];
/**
* 初始化配置
*/
created(): void {
this.init(this.axios, VehicleController.PAGE_PRICE_VEHICLE);
this.buildQueryForm({
sourceNo: [null, { label: '关键字', field: 'key', placeholder: '搜索报告编号、工单号、车源号、VIN码、车牌', operator: Operator.like }],
status: [null, {
label: '绑定状态', field: 'status', type: 'select', allowClear: true, optionItems: this.detectingStatusList, operator: Operator.eq
}],
vehicleState: [null, {
label: '车辆状态', field: 'vehicleState', type: 'select', allowClear: true, optionItems: this.reviewStatusList, operator: Operator.eq
}],
updateTime: [null, { label: '生成时间', field: 'updateTime', operator: Operator.dateBetween, type: 'date-range' }],
});
this.pagination.setDefaultSort('createTime', Order.desc);
}
downloadExcel(): void {
// this.exporting = true;
// VehicleController.exportPriceVehicles(this.axios, this.pagination.requestParams, { responseType: 'blob' }).then(response => {
// message.success('导出任务已创建,请稍后在浏览器下载列表中查看');
// ExportUtil.downloadExcelFile(response.data, '评估定价车辆列表');
// }).catch(error => {
// console.error('Error downloading Word file:', error);
// }).finally(() => {
// this.exporting = false;
// });
}
}
</script>
<style scoped lang="less"></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!