| | |
| | | </el-card> |
| | | |
| | | <!-- 审批追踪 --> |
| | | <el-card class="mt15" shadow="never" v-if="detail.records?.length"> |
| | | <el-card class="mt15" shadow="never"> |
| | | <div class="title">审批追踪</div> |
| | | |
| | | <!-- 标签页 --> |
| | | <el-tabs v-model="activeTab" class="approval-tabs"> |
| | | <!-- <el-tabs v-model="activeTab" class="approval-tabs"> |
| | | <el-tab-pane label="审批记录" name="records"> |
| | | <el-table |
| | | :data="detail.records" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-tabs> --> |
| | | |
| | | <!-- 返回按钮 --> |
| | | <div class="action-buttons"> |
| | | <!-- 外部系统审批轨迹 iframe --> |
| | | <div class="iframe-wrap" v-if="workflowIframeUrl"> |
| | | <iframe :src="workflowIframeUrl" class="workflow-iframe" referrerpolicy="no-referrer"></iframe> |
| | | </div> |
| | | |
| | | </el-card> |
| | | <!-- 返回按钮 --> |
| | | <div class="action-buttons"> |
| | | <el-button @click="goBack">返回</el-button> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | import orderApi from '@/api/orderApi' |
| | | import createAxios from '@/utils/axios' |
| | | import productApi from '@/api/productApi' |
| | | import { useUserInfo } from '@/stores/modules/userInfo' |
| | | |
| | | const hostUrl = import.meta.env.VITE_AXIOS_BASE_URL |
| | | const route = useRoute() |
| | | const router = useRouter() |
| | | const detail = reactive<any>({ items: [], records: [], nodes: [] }) |
| | | const orderTableWrapRef = ref<HTMLElement | null>(null) |
| | | const activeTab = ref('records') |
| | | const userStore = useUserInfo() |
| | | // 外部审批轨迹iframe地址 |
| | | const workflowIframeUrl = computed(() => { |
| | | const pid = (detail.workflowId || route.query.processinstId || '').toString().trim() |
| | | if (!pid) return '' |
| | | return `${hostUrl}/activity/history?processinstId=${encodeURIComponent(pid)}&token=${userStore.getAdminToken}` |
| | | }) |
| | | const labelStyle = { width: '180px', maxWidth: '180px' } |
| | | const contentStyle = { width: 'calc(50% - 180px)' } |
| | | |
| | |
| | | const statusName: string = data.orderStatus || '' |
| | | const uiStatus = statusServerToUi[statusName] || 'INFO' |
| | | |
| | | // 根据产品id获取产品信息,更新头部展示 |
| | | try { |
| | | if (data.productId) { |
| | | const detailRes: any = await productApi.getProductById({ id: data.productId }) |
| | | if (detailRes?.code === 200 && detailRes.data) { |
| | | // 用产品详情补全头信息 |
| | | data.productName = detailRes.data.name || data.productName |
| | | data.providerName = detailRes.data.submissionUnit || data.providerName |
| | | data.industry = detailRes.data.industrialChainName || data.industry |
| | | data.productDesc = detailRes.data.describe || data.productDesc |
| | | data.projectUnit = detailRes.data.importantAreaName || data.productDesc |
| | | data.productType = detailRes.data.typeName || data.productDesc |
| | | } |
| | | } |
| | | } catch (e) { |
| | | // 忽略产品详情失败,不阻塞订单详情 |
| | | } |
| | | |
| | | // 获取用户信息 |
| | | |
| | | // 映射订单详情头部信息 |
| | | const head = { |
| | | orderNo: data.orderId, |
| | |
| | | cashTotal: cashTotalNum.toLocaleString(), |
| | | records: [], |
| | | nodes: [], |
| | | workflowId: data.workflowId || data.processinstId || '' |
| | | }) |
| | | |
| | | // 初始化交易信息备注数据 |
| | |
| | | text-align: left !important; |
| | | } |
| | | |
| | | /* 外部审批轨迹 iframe 样式 */ |
| | | .iframe-wrap { margin-top: 10px; } |
| | | .workflow-iframe { width: 100%; height: 500px; border: none; border-radius: 6px; } |
| | | |
| | | /* 文件操作按钮样式 */ |
| | | .file-actions { |
| | | display: flex; |