| | |
| | | </div> |
| | | |
| | | </el-card> |
| | | |
| | | <!-- 交易评价(当已评价时显示) --> |
| | | <el-card class="mt15" shadow="never" v-if="showEvaluation"> |
| | | <div class="title">交易评价</div> |
| | | <div class="evaluation-content"> |
| | | <div class="evaluation-form"> |
| | | <div class="rating-section"> |
| | | <div class="rating-items"> |
| | | <div class="rating-row"> |
| | | <div class="rating-item"> |
| | | <label class="required">综合评分:</label> |
| | | <el-rate :model-value="evaluation.overallRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> |
| | | </div> |
| | | <div class="rating-item"> |
| | | <label class="required">服务评分:</label> |
| | | <el-rate :model-value="evaluation.serviceRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> |
| | | </div> |
| | | </div> |
| | | <div class="rating-row"> |
| | | <div class="rating-item"> |
| | | <label class="required">质量评分:</label> |
| | | <el-rate :model-value="evaluation.qualityRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> |
| | | </div> |
| | | <div class="rating-item"> |
| | | <label class="required">速度评分:</label> |
| | | <el-rate :model-value="evaluation.speedRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-item"> |
| | | <label class="required">评价内容:</label> |
| | | <div class="eval-text">{{ evaluation.content || '-' }}</div> |
| | | </div> |
| | | |
| | | <div class="form-item"> |
| | | <label>其他信息:</label> |
| | | <div class="eval-meta"> |
| | | <span>是否匿名:{{ evaluation.isAnonymous ? '是' : '否' }}</span> |
| | | <span class="split">|</span> |
| | | <span>评价时间:{{ evaluation.evaluateTime || '-' }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | <!-- 返回按钮 --> |
| | | <div class="action-buttons"> |
| | | <el-button @click="goBack">返回</el-button> |
| | |
| | | const route = useRoute() |
| | | const router = useRouter() |
| | | const detail = reactive<any>({ items: [], records: [], nodes: [] }) |
| | | const evaluation = reactive<any>({ |
| | | content: '', |
| | | overallRating: 0, |
| | | serviceRating: 0, |
| | | qualityRating: 0, |
| | | speedRating: 0, |
| | | isAnonymous: false, |
| | | evaluateTime: '' |
| | | }) |
| | | const orderTableWrapRef = ref<HTMLElement | null>(null) |
| | | const activeTab = ref('records') |
| | | const userStore = useUserInfo() |
| | |
| | | const statusOrder = ['WAIT_UPLOAD', 'WAIT_AUTHORIZE', 'WAIT_CONFIRM', 'COMPLETED', 'EVALUATED'] |
| | | const currentStatus = statusServerToUi[statusName] |
| | | return currentStatus && statusOrder.indexOf(currentStatus) >= statusOrder.indexOf('WAIT_CONFIRM') |
| | | }) |
| | | |
| | | // 是否显示评价卡片(已评价时显示) |
| | | const showEvaluation = computed(() => { |
| | | return (detail.isEvaluate === '已评价') |
| | | }) |
| | | |
| | | // 计算表格数据,添加汇总行 |
| | |
| | | projectUnit: data.projectUnit || '-', |
| | | productType: data.productType || '-', |
| | | productDesc: data.productDesc || '-', |
| | | isEvaluate: data.isEvaluate || '未评价' |
| | | } |
| | | |
| | | // 明细项映射 |
| | |
| | | workflowId: data.workflowId || data.processinstId || '' |
| | | }) |
| | | |
| | | // 映射交易评价信息(如果存在) |
| | | if (data.evaluation) { |
| | | evaluation.content = data.evaluation.content || '' |
| | | evaluation.overallRating = Number(data.evaluation.rating || data.evaluation.overallRating || 0) |
| | | evaluation.serviceRating = Number(data.evaluation.serviceRating || 0) |
| | | evaluation.qualityRating = Number(data.evaluation.qualityRating || 0) |
| | | // 后端为 deliveryRating,对齐前端 speedRating 命名 |
| | | evaluation.speedRating = Number(data.evaluation.deliveryRating || data.evaluation.speedRating || 0) |
| | | evaluation.isAnonymous = Boolean(data.evaluation.isAnonymous) |
| | | evaluation.evaluateTime = formatDateTime((data.evaluation.replyTime || data.evaluation.createdAt || data.evaluation.createTime) as any) |
| | | } |
| | | |
| | | // 初始化交易信息备注数据 |
| | | remarkItems.value = (detail.items || []).map((item: any, index: number) => { |
| | | // 计算授权结束时间 |