|
|
@@ -0,0 +1,343 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div v-if="!taskOrder" class="loading-text">无法加载修改内容。</div>
|
|
|
+ <div v-else>
|
|
|
+ <ContentWrap class="mb-4" title="任务单详情">
|
|
|
+ <div class="tip custom-block">单位信息</div>
|
|
|
+ <el-descriptions :column="3" border>
|
|
|
+ <el-descriptions-item label="任务单号">
|
|
|
+ {{ taskOrder.orderNo || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检验类别">
|
|
|
+ {{ PressureBoilerCheckTypeMap[taskOrder.checkType] || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检验设备数量">
|
|
|
+ {{ taskOrder.equipNum || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="申请单位名称">
|
|
|
+ {{ taskOrder.unitName || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="使用单位名称">
|
|
|
+ {{ taskOrder.useUnitName || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检验日期">
|
|
|
+ {{ Array.isArray(taskOrder.checkDate) ? formatArrayDate(taskOrder.checkDate) : taskOrder.checkDate || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="申请单位地址">
|
|
|
+ {{ taskOrder.unitAddress || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="使用单位地址">
|
|
|
+ {{ taskOrder.useUnitAddress || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="收费性质">
|
|
|
+ {{ PressureFeeNatureMap[taskOrder.feeNature] || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="收费形式">
|
|
|
+ {{ PressureFeeTypeMap[taskOrder.feeType] || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="收费金额">
|
|
|
+ {{ taskOrder.payAmount || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="是否已交费">
|
|
|
+ {{ taskOrder.isPay === 1 ? '是' : '否' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="业务受理人">
|
|
|
+ <el-tag v-if="taskOrder.acceptUser" effect="light" :closable="false">
|
|
|
+ {{ formatUserDisplay(taskOrder.acceptUser) }}
|
|
|
+ </el-tag>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="项目负责人">
|
|
|
+ <div v-if="taskOrder.manager">
|
|
|
+ <el-tag type="primary">
|
|
|
+ {{ formatUserDisplay(taskOrder.manager) }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="检验人员">
|
|
|
+ <div v-if="teamItemDisplayList && teamItemDisplayList.length > 0">
|
|
|
+ <div
|
|
|
+ v-for="(team, teamIndex) in teamItemDisplayList"
|
|
|
+ :key="team.groupTeamId || 'team-' + teamIndex"
|
|
|
+ style="margin-bottom: 8px"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-if="teamItemDisplayList.length > 1"
|
|
|
+ style="font-weight: bold; margin-bottom: 4px"
|
|
|
+ >
|
|
|
+ 团队 {{ teamIndex + 1 }}:
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; flex-wrap: wrap; align-items: center; gap: 6px">
|
|
|
+ <template v-if="team.leaderId && resolveUser(team.leaderId)">
|
|
|
+ <el-tag effect="light" :closable="false">
|
|
|
+ <span class="leader-tag">组</span>
|
|
|
+ {{ resolveUser(team.leaderId).nickname }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ <template v-for="(userId, idx) in (team.userIds || [])" :key="idx">
|
|
|
+ <el-tag
|
|
|
+ v-if="resolveUser(userId)"
|
|
|
+ effect="light"
|
|
|
+ :closable="false"
|
|
|
+ >
|
|
|
+ {{ resolveUser(userId).nickname }}({{ resolveUser(userId).employeeNo }})
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ <span
|
|
|
+ v-if="(!team.leaderId || !resolveUser(team.leaderId)) && (!team.userIds || team.userIds.length === 0 || !team.userIds.some(id => resolveUser(id)))"
|
|
|
+ >-</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="计划编制人">
|
|
|
+ <el-tag v-if="taskOrder.scheduleUser" effect="light" :closable="false">
|
|
|
+ {{ formatUserDisplay(taskOrder.scheduleUser) }}
|
|
|
+ </el-tag>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="中止检验">
|
|
|
+ {{ taskOrder.XXX || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="安全检查记录">
|
|
|
+ {{ taskOrder.securityCheckCount || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="备注" :span="2">
|
|
|
+ {{ taskOrder.remark || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+
|
|
|
+ <div class="tip custom-block">联系人信息</div>
|
|
|
+ <el-descriptions :column="3" border>
|
|
|
+ <el-descriptions-item label="约检联系人">
|
|
|
+ {{ taskOrder.unitContact || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="约检联系人电话">
|
|
|
+ {{ taskOrder.unitPhone || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="约检联系人邮箱">
|
|
|
+ {{ taskOrder.unitEmail || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="电子报告接收人">
|
|
|
+ {{ taskOrder.recipient || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="报告接收人电话">
|
|
|
+ {{ taskOrder.recipientPhone || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="接收人邮箱">
|
|
|
+ {{ taskOrder.recipientEmail || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="缴费联系人">
|
|
|
+ {{ taskOrder.payerContactName || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="缴费人电话">
|
|
|
+ {{ taskOrder.payerContact || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="缴费人邮箱">
|
|
|
+ {{ taskOrder.payerMail || '-' }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </ContentWrap>
|
|
|
+
|
|
|
+ <ContentWrap title="设备清单">
|
|
|
+ <el-table
|
|
|
+ :data="taskOrder.orderItems"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ empty-text="暂无设备信息"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ label="区域"
|
|
|
+ align="center"
|
|
|
+ width="120px"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.equipDistrictName || '-' }}</div>
|
|
|
+ <div class="text-gray-400 text-sm">{{ row.equipStreetName || '' }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="检验性质"
|
|
|
+ align="center"
|
|
|
+ width="150px"
|
|
|
+ >
|
|
|
+ <template #default>
|
|
|
+ {{ PressureBoilerCheckTypeMap[taskOrder.checkType] || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="设备注册代码"
|
|
|
+ align="center"
|
|
|
+ width="200px"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag type="primary" size="small">{{ row.equipCode || '-' }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="使用证编号"
|
|
|
+ align="center"
|
|
|
+ prop="useCode"
|
|
|
+ width="150px"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="蒸发量"
|
|
|
+ align="center"
|
|
|
+ prop="maxContinueEvapor"
|
|
|
+ min-width="200px"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="型号"
|
|
|
+ align="center"
|
|
|
+ prop="boilerModel"
|
|
|
+ width="150px"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="下次内部检验"
|
|
|
+ align="center"
|
|
|
+ width="120px"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.nextInCheckDate ? dayjs(row.nextInCheckDate).format('YYYY-MM-DD') : '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="下次外部检验"
|
|
|
+ align="center"
|
|
|
+ width="120px"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.nextOutCheckDate ? dayjs(row.nextOutCheckDate).format('YYYY-MM-DD') : '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="下次耐压检验"
|
|
|
+ align="center"
|
|
|
+ width="120px"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.nextPressureCheckDate ? dayjs(row.nextPressureCheckDate).format('YYYY-MM-DD') : '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="约检联系人"
|
|
|
+ align="center"
|
|
|
+ width="160px"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.contact || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="约检联系人电话"
|
|
|
+ align="center"
|
|
|
+ width="160px"
|
|
|
+ >
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.contactPhone || '-' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </ContentWrap>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { computed, onMounted, ref } from 'vue'
|
|
|
+import { dayjs } from 'element-plus'
|
|
|
+import { formatArrayDate } from '@/utils/formatTime'
|
|
|
+import {
|
|
|
+ PressureFeeNatureMap,
|
|
|
+ PressureFeeTypeMap,
|
|
|
+ PressureBoilerCheckTypeMap
|
|
|
+} from '@/utils/constants'
|
|
|
+import { getSimpleUserList, type UserVO } from '@/api/system/user'
|
|
|
+
|
|
|
+defineOptions({ name: 'BoilerTaskOrderModifyContent' })
|
|
|
+
|
|
|
+const props = defineProps({
|
|
|
+ taskOrder: {
|
|
|
+ type: Object as () => Record<string, any>,
|
|
|
+ required: true
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const userMap = ref<Record<string, UserVO>>({})
|
|
|
+
|
|
|
+const teamItemDisplayList = computed(() => {
|
|
|
+ if (!props.taskOrder?.teamItemList) return []
|
|
|
+ return props.taskOrder.teamItemList
|
|
|
+})
|
|
|
+
|
|
|
+const resolveUser = (userId: string) => {
|
|
|
+ if (!userId) return null
|
|
|
+ return userMap.value[String(userId)] || null
|
|
|
+}
|
|
|
+
|
|
|
+const formatUserDisplay = (user: any) => {
|
|
|
+ if (!user) return '-'
|
|
|
+ if (typeof user === 'string') return user
|
|
|
+ if (user.nickname && user.employeeNo) return `${user.nickname} (${user.employeeNo})`
|
|
|
+ if (user.nickname) return user.nickname
|
|
|
+ return String(user.id || user)
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ try {
|
|
|
+ const userList = await getSimpleUserList()
|
|
|
+ const map: Record<string, UserVO> = {}
|
|
|
+ userList.forEach(user => {
|
|
|
+ map[String(user.id)] = user
|
|
|
+ })
|
|
|
+ userMap.value = map
|
|
|
+ } catch (e) {
|
|
|
+ console.error('获取用户列表失败', e)
|
|
|
+ }
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.loading-text {
|
|
|
+ text-align: center;
|
|
|
+ padding: 20px;
|
|
|
+ color: #909399;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-descriptions__label) {
|
|
|
+ width: 10%;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-descriptions__content) {
|
|
|
+ width: 20%;
|
|
|
+}
|
|
|
+
|
|
|
+.leader-tag {
|
|
|
+ display: inline-block;
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ line-height: 14px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #4475d6;
|
|
|
+ font-size: 12px;
|
|
|
+ margin-right: 4px;
|
|
|
+ color: #4475d6;
|
|
|
+}
|
|
|
+
|
|
|
+.custom-block.tip {
|
|
|
+ padding: 0 6px;
|
|
|
+ background-color: var(--block-warning-bg-color);
|
|
|
+ border-left: 5px solid var(--el-color-primary);
|
|
|
+ margin: 15px 0;
|
|
|
+}
|
|
|
+</style>
|