Commit 7483ee1a by chenwq1

feat: 工单详情新增状态

1 parent 02241e01
Pipeline #159 for 7483ee1a failed in 0 seconds
......@@ -15,6 +15,7 @@ type AuditStatus = 1 | 2 | 3 | 4;
const props = defineProps<{
auditStatus?: AuditStatus;
onlyAudit?: boolean;
status: WorkOrderStatus;
}>();
......@@ -56,7 +57,8 @@ const auditTag = computed(() => {
<template>
<div class="wo-tags">
<van-tag class="wo-tag"
<van-tag v-if="!props.onlyAudit"
class="wo-tag"
:style="{ background: checkTag.bg, color: checkTag.color }">
{{ checkTag.text }}
</van-tag>
......
......@@ -14,6 +14,7 @@ import { useRoute, useRouter } from "vue-router";
import { getWorkOrderDetail } from "@/api/modules/work-order";
import PageTitle from "@/components/PageTitle.vue";
import WorkOrderStatusTags from "@/components/WorkOrderStatusTags.vue";
const title = ref("工单详情");
const route = useRoute();
......@@ -24,6 +25,10 @@ const nodes = ref<NodeVO[]>([]);
const orderNo = computed(() => detail.value?.woId ?? "");
const status = computed<WorkOrderStatus>(() => (detail.value?.status ?? 1) as WorkOrderStatus);
const auditStatus = computed<1 | 2 | 3 | 4 | undefined>(() => {
const v = (detail.value as null | Record<string, unknown>)?.auditStatus;
return typeof v === "number" ? (v as 1 | 2 | 3 | 4) : undefined;
});
const vehicle = computed<WorkOrderVehicle>(() => (detail.value?.vehicle ?? {}) as WorkOrderVehicle);
......@@ -116,9 +121,12 @@ onMounted(() => {
<van-tag class="head-tag" :style="{ background: pageStatusTag.bg, color: pageStatusTag.color }">
{{ pageStatusTag.text }}
</van-tag>
工单号 <span class="head-order">{{ orderNo }}</span>
</div>
<div class="head-right">
工单号 <span class="head-order">{{ orderNo }}</span>
<WorkOrderStatusTags :audit-status="auditStatus"
only-audit
:status="status" />
</div>
</div>
......@@ -294,7 +302,9 @@ onMounted(() => {
.page-head {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
margin-left: 12px;
background: #f0f2f5;
}
......@@ -317,8 +327,13 @@ onMounted(() => {
}
.head-right {
display: flex;
gap: 6px;
align-items: center;
flex-wrap: wrap;
font-size: 12px;
color: #999;
margin-right:12px;
}
.head-order {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!