Commit 62f24604 by yancanhua

fix: 车辆检测自测问题修改

1 parent 8bcee5b9
...@@ -84,4 +84,7 @@ export class DetectionController { ...@@ -84,4 +84,7 @@ export class DetectionController {
return axios.get('inspect/wo/detail/' + params.id, params); return axios.get('inspect/wo/detail/' + params.id, params);
} }
static inspectOrderAudit(axios: AxiosStatic, params: any): Promise<AxiosResponse> {
return axios.post('inspect/wo/audit', params);
}
} }
...@@ -65,6 +65,28 @@ ...@@ -65,6 +65,28 @@
<span style="padding-left: 8px;">{{ record.status ? '启用' : '禁用' }}</span> <span style="padding-left: 8px;">{{ record.status ? '启用' : '禁用' }}</span>
</template> </template>
<template v-if="column.key === 'dispatchedCount'">
<router-link :to="{ path: '/detection/order', query: { tabKey: 'DISPATCHED' } }">
<a-button type="link" size="small">{{ record.dispatchedCount }}</a-button>
</router-link>
</template>
<template v-if="column.key === 'inProgressCount'">
<router-link :to="{ path: '/detection/order', query: { tabKey: 'IN_PROGRESS' } }">
<a-button type="link" size="small">{{ record.inProgressCount }}</a-button>
</router-link>
</template>
<template v-if="column.key === 'completedCount'">
<router-link :to="{ path: '/detection/order', query: { tabKey: 'COMPLETED' } }">
<a-button type="link" size="small">{{ record.completedCount }}</a-button>
</router-link>
</template>
<template v-if="column.key === 'avgInspectCost'">
{{ convertToHourMinuteSecond(record.avgInspectSec || 0) }}
</template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<router-link <router-link
:to="{ path: '/detection/inspector/view', query: { id: record.id, action: 'VIEW' } }"> :to="{ path: '/detection/inspector/view', query: { id: record.id, action: 'VIEW' } }">
...@@ -137,10 +159,10 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle> ...@@ -137,10 +159,10 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle>
{ title: '姓名', dataIndex: 'name', key: 'name', align: 'center', width: 150, resizable: true, ellipsis: true }, { title: '姓名', dataIndex: 'name', key: 'name', align: 'center', width: 150, resizable: true, ellipsis: true },
{ title: '手机号', dataIndex: 'phone', key: 'phone', align: 'center', width: 160, resizable: true, ellipsis: true }, { title: '手机号', dataIndex: 'phone', key: 'phone', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '所在城市', dataIndex: 'regionName', key: 'regionName', align: 'center', width: 160, resizable: true, ellipsis: true }, { title: '所在城市', dataIndex: 'regionName', key: 'regionName', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '待检测任务', dataIndex: 'updateTime', key: 'vin', align: 'center', width: 160, resizable: true, ellipsis: true }, { title: '待检测任务', dataIndex: 'dispatchedCount', key: 'dispatchedCount', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '检测中任务', dataIndex: 'updateTime', key: 'carTypeName', align: 'center', width: 160, resizable: true, ellipsis: true }, { title: '检测中任务', dataIndex: 'inProgressCount', key: 'inProgressCount', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '已完成任务', dataIndex: 'warehousingTime', key: 'warehousingTime', align: 'center', width: 160, resizable: true, ellipsis: true }, { title: '已完成任务', dataIndex: 'completedCount', key: 'completedCount', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '平均检测耗时', dataIndex: 'createTime', key: 'createTime', align: 'center', width: 160, resizable: true, ellipsis: true }, { title: '平均检测耗时', dataIndex: 'avgInspectCost', key: 'avgInspectCost', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '账号状态', dataIndex: 'status', key: 'status', align: 'center', width: 160, resizable: true, ellipsis: true }, { title: '账号状态', dataIndex: 'status', key: 'status', align: 'center', width: 160, resizable: true, ellipsis: true },
{ title: '操作', key: 'action', width: 170, align: 'center', fixed: 'right' }, { title: '操作', key: 'action', width: 170, align: 'center', fixed: 'right' },
]; ];
...@@ -215,7 +237,7 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle> ...@@ -215,7 +237,7 @@ export default class DetectionInspectorPage extends PaginationComponent<Vehicle>
convertToHourMinuteSecond(seconds: number) { convertToHourMinuteSecond(seconds: number) {
const hours = Math.floor(seconds / 3600); const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60); const minutes = Math.floor((seconds % 3600) / 60);
return `${hours}小时${minutes}分`; return hours || minutes ? `${hours}小时${minutes}分` : '-';
} }
//导出检测师列表 //导出检测师列表
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
<!-- 检测报告 --> <!-- 检测报告 -->
<div v-if="tabKey === 'REPORT'" style="width: 100%;float: left;"> <div v-if="tabKey === 'REPORT'" style="width: 100%;float: left;">
<orderReport :pageData="pageData.inspectionWORespVO || {}" :inspectionReportResp="pageData.inspectionReportRespVO || {}" /> <orderReport :pageData="pageData.inspectionWORespVO || {}"
:inspectionReportResp="pageData.inspectionReportRespVO || {}" />
</div> </div>
<!-- 工单详情 --> <!-- 工单详情 -->
...@@ -18,6 +19,12 @@ ...@@ -18,6 +19,12 @@
:inspectionReportResp="pageData.inspectionReportRespVO || {}" /> :inspectionReportResp="pageData.inspectionReportRespVO || {}" />
</div> </div>
<div v-if="actionStatus == 'AUDIT' && (pageData?.inspectionWORespVO?.status == 3 && pageData?.inspectionWORespVO?.auditStatus == 1)"
class="actionBox">
<a-button type="primary" @click="handleAudit('PASS')">审核通过</a-button>
<a-button @click="handleAudit('REJECT')" style="margin-left: 8px;">审核驳回</a-button>
</div>
<!-- 操作日志 --> <!-- 操作日志 -->
<div style="width: 100%;float: left;margin-top: 16px;"> <div style="width: 100%;float: left;margin-top: 16px;">
<a-descriptions :column="1" size="small" layout="vertical"> <a-descriptions :column="1" size="small" layout="vertical">
...@@ -32,6 +39,9 @@ ...@@ -32,6 +39,9 @@
</a-descriptions> </a-descriptions>
</div> </div>
</a-card> </a-card>
<reviewDialog ref="reviewDialogRef" @handleOk="getDetailData" />
</div> </div>
</div> </div>
</template> </template>
...@@ -48,8 +58,10 @@ import OperationLog from "@/views/detection/order/components/OperationLog.vue"; ...@@ -48,8 +58,10 @@ import OperationLog from "@/views/detection/order/components/OperationLog.vue";
import orderReport from "@/views/detection/order/components/orderReport.vue"; import orderReport from "@/views/detection/order/components/orderReport.vue";
import orderDetails from "@/views/detection/order/components/orderDetails.vue"; import orderDetails from "@/views/detection/order/components/orderDetails.vue";
import reviewDialog from "@/views/detection/order/components/reviewDialog.vue";
@Component({ @Component({
components: { TitleDivider, TitleTipIcon, OperationLog, orderReport, orderDetails } components: { TitleDivider, TitleTipIcon, OperationLog, orderReport, orderDetails, reviewDialog }
}) })
...@@ -57,6 +69,8 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> { ...@@ -57,6 +69,8 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> {
tabKey = "REPORT"; tabKey = "REPORT";
actionStatus = '';
routeData: any = { routeData: any = {
id: '', id: '',
action: '' action: ''
...@@ -78,6 +92,7 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> { ...@@ -78,6 +92,7 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> {
created(): void { created(): void {
this.routeData = this.$route.query; this.routeData = this.$route.query;
this.actionStatus = this.routeData.action || '';
this.getDetailData(); this.getDetailData();
} }
...@@ -87,6 +102,10 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> { ...@@ -87,6 +102,10 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> {
}); });
} }
handleAudit(status: string) {
this.$refs.reviewDialogRef.showVisible({ ...this.pageData, status });
}
handleBack() { handleBack() {
this.$router.back(); this.$router.back();
} }
...@@ -106,4 +125,12 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> { ...@@ -106,4 +125,12 @@ export default class DetectionOrderView extends PaginationComponent<Vehicle> {
background-color: #F2F4F7; background-color: #F2F4F7;
margin-top: 10px; margin-top: 10px;
} }
.actionBox {
width: 100%;
height: 32px;
float: left;
margin-top: 16px;
margin-bottom: 16px;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -19,10 +19,11 @@ ...@@ -19,10 +19,11 @@
<a-button type="link" title="点击删除车辆" @click="deleteVehicle()">删除</a-button> <a-button type="link" title="点击删除车辆" @click="deleteVehicle()">删除</a-button>
</div> </div>
<a-descriptions :column="2" size="small" layout="vertical"> <a-descriptions :column="2" size="small" layout="vertical">
<a-descriptions-item label="车型名称">{{ vehicleData.carName }}</a-descriptions-item> <a-descriptions-item label="车型名称">{{ vehicleData.carName || '-' }}</a-descriptions-item>
<a-descriptions-item label="车源号">{{ vehicleData.sourceNo }}</a-descriptions-item> <a-descriptions-item label="车源号">{{ vehicleData.sourceNo || '-' }}</a-descriptions-item>
<a-descriptions-item label="VIN码">{{ vehicleData.vin }}</a-descriptions-item> <a-descriptions-item label="VIN码">{{ vehicleData.vin || '-' }}</a-descriptions-item>
<a-descriptions-item label="车牌号">{{ vehicleData.licensePlate }}</a-descriptions-item> <a-descriptions-item label="车牌号">{{ vehicleData.licensePlate || '-'
}}</a-descriptions-item>
</a-descriptions> </a-descriptions>
</div> </div>
</a-form-item> </a-form-item>
...@@ -30,12 +31,15 @@ ...@@ -30,12 +31,15 @@
<a-form-item v-if="postData.id" name="vehicleId" style="width: 100%;" label="保管人信息"> <a-form-item v-if="postData.id" name="vehicleId" style="width: 100%;" label="保管人信息">
<div class="vehicleData"> <div class="vehicleData">
<a-descriptions :column="2" size="small" layout="vertical"> <a-descriptions :column="2" size="small" layout="vertical">
<a-descriptions-item label="保管人姓名">{{ inspectorData.custodianName <a-descriptions-item label="保管人姓名">
}}</a-descriptions-item> {{ inspectorData.custodianName || '-' }}
<a-descriptions-item label="保管人电话">{{ inspectorData.custodianPhone </a-descriptions-item>
}}</a-descriptions-item> <a-descriptions-item label="保管人电话">
<a-descriptions-item label="车辆所在地">{{ inspectorData.handoverAddress {{ inspectorData.custodianPhone || '-' }}
}}</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="车辆所在地">
{{ inspectorData.handoverAddress || '-' }}
</a-descriptions-item>
</a-descriptions> </a-descriptions>
</div> </div>
</a-form-item> </a-form-item>
...@@ -154,6 +158,7 @@ export default class OrderAddForm extends EnhanceFormComponent<User> { ...@@ -154,6 +158,7 @@ export default class OrderAddForm extends EnhanceFormComponent<User> {
this.vehicleData.sourceNo = vehicleData?.baseInfo.sourceNo; this.vehicleData.sourceNo = vehicleData?.baseInfo.sourceNo;
this.vehicleData.vin = vehicleData?.baseInfo.vin; this.vehicleData.vin = vehicleData?.baseInfo.vin;
this.vehicleData.licensePlate = vehicleData?.baseInfo.licensePlate; this.vehicleData.licensePlate = vehicleData?.baseInfo.licensePlate;
this.postData.inspectionAddress = vehicleData?.custodianInfo?.handoverAddress || "";
modal.destroy(); modal.destroy();
} }
}, },
...@@ -167,6 +172,7 @@ export default class OrderAddForm extends EnhanceFormComponent<User> { ...@@ -167,6 +172,7 @@ export default class OrderAddForm extends EnhanceFormComponent<User> {
this.vehicleData.sourceNo = ""; this.vehicleData.sourceNo = "";
this.vehicleData.vin = ""; this.vehicleData.vin = "";
this.vehicleData.licensePlate = ""; this.vehicleData.licensePlate = "";
this.postData.inspectionAddress = "";
} }
//检测人员获取 //检测人员获取
......
<template>
<div>
<a-modal v-model:open="dialogVisible" title="提示" @ok="handleOk">
<div v-if="parentStatus == 'PASS'" class="tipBox" style="margin-top: 16px;">
<InfoCircleOutlined style="font-size: 15px; color: #1956FE;" />
<span style="padding-left: 8px;">请确认是否审核通过该工单</span>
</div>
<a-form v-else layout="vertical" :label-col="labelCol" :wrapper-col="wrapperCol" ref="formRef">
<div class="tipBox" style="margin-bottom: 16px;margin-top: 16px;">
<InfoCircleOutlined style="font-size: 15px; color: #FC8B0A;" />
<span style="padding-left: 8px;">请确认是否审核驳回该工单</span>
</div>
<a-form-item name="cancelReason" label="备注说明">
<a-textarea v-model:value="auditOpinion" show-count :maxlength="500" style="width: 456px;" />
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script lang="ts">
import { Component } from 'vue-facing-decorator';
import { EnhanceFormComponent } from "@/core/form/EnhanceFormComponent";
import { User } from "lib/src/entity/security/entity/User";
import { InfoCircleOutlined } from "@ant-design/icons-vue";
import { DetectionController } from "@/api/DetectionController";
import { message } from "ant-design-vue";
@Component({
components: { InfoCircleOutlined }
})
export default class reviewDialog extends EnhanceFormComponent<User> {
dialogVisible = false;
pageData: any = {};
parentStatus = '';
auditOpinion = '';
showVisible(data: any): void {
this.pageData = data;
this.parentStatus = data.status;
this.auditOpinion = '';
this.dialogVisible = true;
}
// 确认操作
handleOk() {
const postData = {
id: this.pageData?.inspectionWORespVO?.id || '',
auditResult: this.parentStatus == 'PASS' ? 1 : 2,
auditOpinion: this.auditOpinion || '',
}
DetectionController.inspectOrderAudit(this.axios, postData).then(response => {
const res = response.data || {};
if (res.code == "200") {
this.$emit('handleOk');
message.success('操作成功');
} else {
message.error(res.message || '操作失败');
}
this.dialogVisible = false;
});
}
}
</script>
<style scoped lang="less">
.tipBox {
width: 100%;
height: 22px;
line-height: 22px;
color: #2f3133;
font-size: 14px;
font-weight: 400;
font-family: "HarmonyOSSansSC";
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -54,10 +54,7 @@ ...@@ -54,10 +54,7 @@
<template v-if="column.key === 'scoreLevel'"> <template v-if="column.key === 'scoreLevel'">
<div> <div>
<span>{{ record.score }} / </span> <span>{{ record.inspectionRecord?.overallScore || '-' }} 分 </span>
<span :class="`color_${record.scoreLevel}`">
{{ record.scoreLevel }}级
</span>
</div> </div>
</template> </template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!