seatonwan9
2025-08-14 a0fc5b1e703769a8936fd8671ec9cdd9adfda20a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
<template>
  <div class="default-main">
    <!-- 订单信息 + 申请人信息 + 交易内容(合并为同一卡片) -->
    <el-card shadow="never">
      <el-descriptions
        :column="2"
        border
        class="mt10 order-desc fixed-label"
        label-width="180px"
        :label-style="labelStyle"
        :content-style="contentStyle"
      >
        <el-descriptions-item :span="2" class="section-header">
          <template #label>
            <el-icon class="section-icon"><Document /></el-icon>
            <span>订单信息</span>
          </template>
          <template #default></template>
        </el-descriptions-item>
        <el-descriptions-item label="订单编号">{{ detail.orderNo }}</el-descriptions-item>
        <el-descriptions-item label="交易资源类型">{{ detail.resourceTypeName }}</el-descriptions-item>
        <el-descriptions-item label="申请时间">{{ detail.applyTime }}</el-descriptions-item>
        <el-descriptions-item label="交易状态">
          <el-tag :type="getStatusType(detail.status)" size="small">{{ detail.statusName }}</el-tag>
        </el-descriptions-item>
      </el-descriptions>
      
      <!-- 申请人信息(与订单信息同卡片,复用分隔标题样式) -->
      <el-descriptions
        :column="2"
        border
        class="mt15 order-desc fixed-label"
        label-width="180px"
        :label-style="labelStyle"
        :content-style="contentStyle"
      >
        <el-descriptions-item :span="2" class="section-header">
          <template #label>
            <el-icon class="section-icon"><User /></el-icon>
            <span>申请人信息</span>
          </template>
          <template #default></template>
        </el-descriptions-item>
        <el-descriptions-item label="姓名">{{ detail.userName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="单位">{{ detail.unitName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="部门">{{ detail.userDept || '-' }}</el-descriptions-item>
        <el-descriptions-item label="用户名">{{ detail.userAccount || '-' }}</el-descriptions-item>
      </el-descriptions>
 
      <!-- 交易内容(紧随申请人信息,同卡片,复用分隔标题样式) -->
      <el-descriptions
        :column="2"
        border
        class="mt15 order-desc fixed-label"
        label-width="180px"
        :label-style="labelStyle"
        :content-style="contentStyle"
      >
        <el-descriptions-item :span="2" class="section-header">
          <template #label>
            <el-icon class="section-icon"><Goods /></el-icon>
            <span>交易内容</span>
          </template>
          <template #default></template>
        </el-descriptions-item>
        <el-descriptions-item label="产品名称">
          <el-link type="primary" :underline="false">{{ detail.productName }}</el-link>
        </el-descriptions-item>
        <el-descriptions-item label="提供者">{{ detail.supplier }}</el-descriptions-item>
        <el-descriptions-item label="行业领域">{{ detail.industry }}</el-descriptions-item>
        <el-descriptions-item label="单位工程">{{ detail.projectUnit }}</el-descriptions-item>
        <el-descriptions-item label="产品类型">{{ detail.productType || '-' }}</el-descriptions-item>
        <el-descriptions-item label="产品简介">
          <div class="desc-wrap">{{ detail.productDesc }}</div>
        </el-descriptions-item>
      </el-descriptions>
      
      <!-- 订单详情(移动到交易内容下面,同一卡片内) -->
      <div ref="orderTableWrapRef">
        <el-table
          :data="tableData"
          border
          class="mt10 order-table"
          :header-cell-style="headerCenterStyle"
          :cell-style="bodyCellStyle"
          :row-class-name="getRowClassName"
          :span-method="arraySpanMethod"
        >
        <el-table-column>
          <template #header>
            <el-icon class="header-icon"><List /></el-icon>
            <span>详情</span>
          </template>
          <el-table-column label="" :width="colWidths.detail1">
            <template #default="{ row }">
              <div v-if="!row.isSummary">{{ row.name }}</div>
              <div v-else class="summary-merged">
                <div class="summary-left">
                  共 <span class="count">{{ detail.items.length }}</span> 件
                </div>
                <div class="summary-right">
                  总计:<span class="price">{{ detail.pointTotal }}</span> 积分
                  <span class="ml20 price">{{ detail.cashTotal }}</span> 元
                </div>
              </div>
            </template>
          </el-table-column>
          <el-table-column label="" :width="colWidths.detail2">
            <template #default="{ row }">
              <div v-if="!row.isSummary" class="gray">销售形式:{{ row.saleType || '-' }}</div>
              <div v-if="!row.isSummary" class="gray">账户数量:{{ row.accountCount ?? '-' }}</div>
            </template>
          </el-table-column>
          <el-table-column label="" :width="colWidths.detail3">
            <template #default="{ row }">
              <div v-if="!row.isSummary" class="gray">客户对象:{{ row.customerTarget || '-' }}</div>
              <div v-if="!row.isSummary" class="gray">并发节点数量:{{ row.concurrentNodes ?? '-' }}</div>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="单价">
          <el-table-column label="" :width="colWidths.price">
            <template #default="{ row }">
              <div v-if="!row.isSummary">{{ formatPrice(row) }}</div>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="数量">
          <el-table-column label="" :width="colWidths.quantity">
            <template #default="{ row }">
              <div v-if="!row.isSummary">{{ row.quantity }}</div>
            </template>
          </el-table-column>
        </el-table-column>
        <el-table-column label="期限(年)">
          <el-table-column label="" :width="colWidths.period">
            <template #default="{ row }">
              <div v-if="!row.isSummary">{{ formatPeriod(row) }}</div>
            </template>
          </el-table-column>
        </el-table-column>
        </el-table>
      </div>
 
       <!-- 交易文件(移动到订单详情下面,同一卡片内) -->
       <div class="file-section" v-if="fileList.length > 0">
         <el-table
           :data="fileList"
           border
           class="file-table"
           :header-cell-style="fileTableHeaderStyle"
           :cell-style="fileTableCellStyle"
         >
           <el-table-column min-width="200">
             <template #header>
               <el-icon class="header-icon"><Document /></el-icon>
               <span>交易文件</span>
             </template>
             <template #default="{ row }">
               <div class="file-name">
                 <el-icon class="file-icon"><Document /></el-icon>
                 <span>{{ row.name }}</span>
               </div>
             </template>
           </el-table-column>
           <el-table-column label="文件大小" prop="size" width="120">
             <template #default="{ row }">
               {{ formatFileSize(row.size) }}
             </template>
           </el-table-column>
           <el-table-column label="操作" width="100">
             <template #default="{ row }">
               <el-button
                 type="text"
                 size="small"
                 class="preview-btn"
                 @click="handlePreview(row)"
               >
                 预览
               </el-button>
             </template>
           </el-table-column>
         </el-table>
       </div>
 
       <!-- 交易信息备注(移动到交易文件下面,同一卡片内) -->
       <div class="remark-section" v-if="remarkItems.length > 0">
         <el-table
           :data="remarkItems"
           border
           class="remark-table"
           :header-cell-style="remarkTableHeaderStyle"
           :cell-style="remarkTableCellStyle"
         >
           <el-table-column min-width="200">
             <template #header>
               <el-icon class="header-icon"><Document /></el-icon>
               <span>交易信息备注</span>
             </template>
             <template #default="{ row }">
               <div class="remark-name">
                 <span>{{ row.name }}</span>
               </div>
             </template>
           </el-table-column>
           <el-table-column label="授权开始时间" width="200">
             <template #default="{ row }">
               <div class="remark-date">{{ row.start }}</div>
             </template>
           </el-table-column>
           <el-table-column label="授权结束时间" width="200">
             <template #default="{ row }">
               <div class="remark-date">
                 {{ row.forever ? '永久' : row.end }}
               </div>
             </template>
           </el-table-column>
           <el-table-column label="备注" min-width="300">
             <template #default="{ row }">
               <div class="remark-content">{{ row.remark }}</div>
             </template>
           </el-table-column>
         </el-table>
       </div>
     </el-card>
 
     <!-- 交易评价 -->
    <el-card class="mt15" shadow="never">
      <div class="title">交易评价</div>
      <el-form :model="form" label-width="120px" class="mt10" :rules="rules" ref="formRef">
        <el-form-item label="综合评分" prop="score">
          <el-rate v-model="form.score" />
        </el-form-item>
        <el-form-item label="评价内容" prop="content">
          <el-input v-model="form.content" type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入评价内容" />
        </el-form-item>
      </el-form>
      <div class="action-buttons">
        <el-button @click="goBack">返回</el-button>
        <el-button type="primary" @click="submit">提交评价</el-button>
      </div>
    </el-card>
  </div>
</template>
 
<script setup lang="ts">
import { onMounted, reactive, ref, computed, type CSSProperties } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { Document, User, Goods, List } from '@element-plus/icons-vue'
import { fetchOrderDetail, submitEvaluate } from '@/api/tradeManage'
import { ElMessage, FormInstance } from 'element-plus'
 
const route = useRoute()
const router = useRouter()
const detail = reactive<any>({ items: [] })
const formRef = ref<FormInstance>()
const form = reactive({ score: 0, content: '' })
const fileList = ref<any[]>([])
const remarkItems = ref<any[]>([])
const orderTableWrapRef = ref<HTMLElement | null>(null)
const labelStyle = { width: '180px', maxWidth: '180px' }
const contentStyle = { width: 'calc(50% - 180px)' }
 
const rules = {
  score: [{ required: true, message: '请评分', trigger: 'change' }],
  content: [{ required: true, message: '请输入评价内容', trigger: 'blur' }],
}
 
// 计算表格数据,添加汇总行
const tableData = computed(() => {
  const summaryRow = {
    id: 'summary',
    isSummary: true,
    name: '',
    saleType: '',
    accountCount: 0,
    customerTarget: '',
    concurrentNodes: 0,
    pricePoint: 0,
    priceCash: 0,
    quantity: 0,
    period: 0,
  }
  return [...detail.items, summaryRow]
})
 
onMounted(async () => {
  // 使用前端模拟数据以便开发 UI(不改动后端服务)
  const mockDetail = {
    orderNo: '4348442557619205545',
    resourceTypeName: '软件产品',
    status: 'FINISH',
    statusName: '已完成',
    applyTime: '2025-05-21 10:00:00',
    unitName: '中交方远建设有限公司',
    userName: '张静',
    userAccount: 'L20159922',
    userDept: '信息中心',
    userPhone: '13800000000',
    productName: '中交方远智能实测实量管理系统',
    supplier: '中交方远科技有限公司',
    industry: '建筑工程',
    projectUnit: '土建工程',
    productType: '软件库',
    productDesc:
      '面向工程项目的质量实测实量数字化管理系统,支持标准化采集、自动统计与过程管控。',
    items: [
      {
        id: '1',
        name: '企业私有SaaS版许可',
        saleType: '买断',
        accountCount: 50,
        customerTarget: '企业',
        concurrentNodes: 50,
        pricePoint: 50000,
        priceCash: 0,
        quantity: 1,
        period: 0,
      },
      {
        id: '2',
        name: '企业私有SaaS版OTA升级服务',
        saleType: 'OTA服务',
        accountCount: 50,
        customerTarget: '企业',
        concurrentNodes: 50,
        pricePoint: 0,
        priceCash: 7500,
        quantity: 1,
        period: 1,
      },
      {
        id: '3',
        name: '企业私有SaaS版用户增量包',
        saleType: '私有增量包',
        accountCount: 100,
        customerTarget: '企业',
        concurrentNodes: 100,
        pricePoint: 0,
        priceCash: 0,
        priceProtocol: true,
        quantity: 1,
        period: 1,
      },
      {
        id: '4',
        name: '个人公有SaaS版许可',
        saleType: '私有增量包',
        accountCount: 50,
        customerTarget: '个人',
        concurrentNodes: 50,
        pricePoint: 0,
        priceCash: 0,
        quantity: 1,
        period: 0,
      },
    ],
    pointTotal: '50,000',
    cashTotal: '7,500',
  }
 
  Object.assign(detail, mockDetail)
  
  // 添加模拟文件数据用于展示
  fileList.value = [
    {
      name: '签字盖章文件.pdf',
      size: 2621440, // 2.5MB
      uid: '1',
      status: 'success'
    },
    {
      name: 'API Keys.txt',
      size: 354, // 354 Bytes
      uid: '2',
      status: 'success'
    }
  ]
 
  // 添加模拟交易信息备注数据
  remarkItems.value = (detail.items || []).map((item: any, index: number) => ({ 
    name: item.name,
    start: '2025-06-01', 
    end: index === 0 || index === 3 ? '' : '2025-06-01', 
    forever: index === 0 || index === 3, 
    remark: index === 3 ? '开通管理员账号1个,账号admin' : '开通管理员账号1个,账号admin,登录管理员账号可管理普通用户' 
  }))
  
  // 注释掉原有的API调用,使用模拟数据
  // const { data } = (await fetchOrderDetail({ id: route.params.id })) as any
  // Object.assign(detail, data || {})
})
 
const goBack = () => router.back()
const submit = async () => {
  await formRef.value?.validate()
  
  // 模拟提交成功响应
  const mockResponse = { code: 200 }
  
  // 注释掉原有的API调用,使用模拟数据
  // const { code } = (await submitEvaluate({ id: route.params.id, ...form })) as any
  
  if (mockResponse.code === 200) {
    ElMessage.success('提交成功')
    router.back()
  }
}
 
// 与列表页保持一致的状态类型映射(UI展示用)
const getStatusType = (status: string) => {
  const statusMap: Record<string, 'warning' | 'danger' | 'success' | 'info'> = {
    WAIT_APPROVAL: 'warning',
    WAIT_UPLOAD: 'warning',
    WAIT_CHECK: 'warning',
    WAIT_CONFIRM: 'warning',
    REJECTED: 'danger',
    FINISH: 'success',
  }
  return statusMap[status] || 'info'
}
 
// 订单详情中"单价"显示:优先显示积分,其次显示货币;格式示例:
// "积分:50,000/套" 或 "货币:7,500/套/年" 或 "免费:/年"
const formatPrice = (row: any) => {
  const point = Number(row.pricePoint || 0)
  const cash = Number(row.priceCash || 0)
  const protocol = Boolean(row.priceProtocol)
 
  // 免费
  if (!point && !cash) {
    return protocol ? '协议:/年' : '免费:/年'
  }
  if (point) {
    return `积分:${point.toLocaleString()}/套`
  }
  // 仅现金
  return `货币:${cash.toLocaleString()}/套/年`
}
 
// 期限展示:0 表示"永久",其他显示数字
const formatPeriod = (row: any) => {
  const p = Number(row.period || 0)
  return p === 0 ? '永久' : `${p}`
}
 
// 表头文字居中,但第一行的"详情"文字靠左对齐
const headerCenterStyle: CSSProperties = { 
  textAlign: 'center',
  fontSize: '14px',
  background: '#f3f6fb'
}
 
// 表体文字大小
const bodyCellStyle: CSSProperties = { fontSize: '12px' }
 
// 为汇总行添加特殊样式类名
const getRowClassName = ({ row }: { row: any }) => {
  return row.isSummary ? 'summary-row' : ''
}
 
// 单元格合并方法
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }: any) => {
  if (row.isSummary) {
    // 汇总行:第一列显示合并内容,其他列隐藏
    if (columnIndex === 0) {
      return [1, 6] // 合并1行6列
    } else {
      return [0, 0] // 隐藏其他列
    }
  }
  return [1, 1] // 普通行正常显示
}
 
// 文件列表表格表头文字居中,但第一列的"交易文件"文字靠左对齐
const fileTableHeaderStyle: CSSProperties = { 
  textAlign: 'center',
  fontSize: '14px',
  background: '#f3f6fb'
}
// 文件列表表格表体文字大小
const fileTableCellStyle: CSSProperties = { fontSize: '12px' }
 
// 交易信息备注表格表头文字居中,但第一列的"交易信息备注"文字靠左对齐
const remarkTableHeaderStyle: CSSProperties = { 
  textAlign: 'center',
  fontSize: '14px',
  background: '#f3f6fb'
}
// 交易信息备注表格表体文字大小
const remarkTableCellStyle: CSSProperties = { fontSize: '12px' }
 
// 文件大小格式化
const formatFileSize = (size: number) => {
  if (!size || size === 0) return '0 Bytes';
  const k = 1024;
  const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
  const i = Math.floor(Math.log(size) / Math.log(k));
  return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
};
 
// 文件预览处理
const handlePreview = (file: any) => {
  ElMessage.info(`预览文件:${file.name}`)
}
 
// 症结与修复说明:
// 1) Element Plus 的 el-table 子列 width 百分比是相对于表格容器的像素宽度计算,但只有在表格容器有明确宽度时才生效。
// 2) 在父列/多级表头下,子列 width 为百分比时,更稳定的做法是将其计算为像素值绑定给子列。
// 3) 因此我们读取表格外层容器宽度,按比例计算像素宽度,避免出现百分比与 table-layout 导致的错位与拉伸。
const colWidths = computed(() => {
  const containerWidth = orderTableWrapRef.value?.clientWidth || 0
  // 百分比分别为:详情 20% x 3,单价 15%,数量 10%,期限 15% => 合计 100%
  return {
    detail1: Math.floor(containerWidth * 0.2),
    detail2: Math.floor(containerWidth * 0.2),
    detail3: Math.floor(containerWidth * 0.2),
    price: Math.floor(containerWidth * 0.15),
    quantity: Math.floor(containerWidth * 0.1),
    period: Math.floor(containerWidth * 0.15),
  }
})
</script>
 
<style scoped lang="scss">
.title { font-weight: 600; }
.sub-title { font-weight: 600; margin: 10px 0; }
.mt10 { margin-top: 10px; }
.mt15 { margin-top: 15px; }
.gray { color: #909399; font-size: 12px; }
.total { text-align: right; margin-top: 10px; }
.price { color: #f56c6c; font-weight: 600; }
.ml20 { margin-left: 20px; }
.item-block { padding: 10px; border: 1px solid #ebeef5; border-radius: 4px; margin-bottom: 10px; }
 
/* 统一表格内容文字大小 */
.order-table :deep(.el-table__body),
.order-table :deep(.el-table__header) {
  font-size: 12px;
}
/* 表头第一行背景色(与交易内容标题行保持一致) */
.order-table :deep(.el-table__header-wrapper thead tr:first-child > th) {
  background: #f3f6fb !important;
  font-size: 14px !important;
}
/* 表头第二行高度与内边距 */
.order-table :deep(.el-table__header-wrapper thead tr:nth-child(2) > th) {
  height: 5px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* 强制表格列固定布局,避免内容影响列宽 */
.order-table :deep(table) {
  table-layout: fixed;
  width: 100% !important;
}
 
/* 汇总行样式 */
.summary-row {
  font-weight: 600;
  color: #f56c6c;
}
.summary-total {
  text-align: right;
  font-weight: 600;
}
.summary-merged {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.summary-left {
  text-align: left;
}
.summary-left .count {
  color: #f56c6c;
  font-weight: 600;
}
.summary-right {
  text-align: right;
}
.order-table :deep(.summary-row) {
  background-color: #fafafa;
}
.order-table :deep(.summary-row td) {
  border-top: 2px solid #e4e7ed;
}
 
/* 表头第一行"详情"文字靠左对齐 */
.order-table :deep(.el-table__header-wrapper thead tr:first-child th:first-child) {
  text-align: left !important;
}
 
/* 表头图标样式 */
.header-icon {
  margin-right: 6px;
  color: #409eff;
  vertical-align: middle;
}
 
/* 分隔标题风格 */
.section-header {
  background: #f3f6fb;
  font-weight: 600;
  --el-border-color: #e4e7ed;
}
.section-header :deep(.el-descriptions__label) {
  background: #f3f6fb;
  border-right: none !important;
  width: 100%;
}
.section-header :deep(.el-descriptions__cell) {
  background: #f3f6fb;
}
.section-header :deep(.el-descriptions__content) {
  display: none !important;
  padding: 0 !important;
  border: 0 !important;
}
.section-icon {
  margin-right: 6px;
  color: #409eff;
}
 
/* 调整描述组件边框以便标题行颜色覆盖中间分隔线 */
:deep(.el-descriptions--border .el-descriptions__body .el-descriptions__table .el-descriptions__cell) {
  border-right: 1px solid var(--el-border-color);
}
.section-header :deep(.el-descriptions__cell) {
  border-right-color: transparent !important;
}
 
/* 强制 Element Plus 描述项的 label 宽度遵循 label-width(避免内容撑开) */
/* 兜底:即使内联样式被覆盖,也用 important 强制固定 */
.fixed-label :deep(.el-descriptions__label) {
  width: 180px !important;
  max-width: 180px !important;
}
.fixed-label :deep(.el-descriptions__content) {
  width: calc(50% - 180px) !important;
}
 
/* 强化第一行分隔标题的背景与边框覆盖 */
.order-desc :deep(.el-descriptions__table tr:first-child .el-descriptions__cell),
.order-desc :deep(.el-descriptions__table tr:first-child .el-descriptions__label),
.order-desc :deep(.el-descriptions__table tr:first-child .el-descriptions__content) {
  background: #eef3fb !important;
  border-top-color: transparent !important;
  border-bottom-color: #dcdfe6 !important;
}
.order-desc :deep(.el-descriptions__table tr:first-child .el-descriptions__label) {
  border-right-color: transparent !important;
}
 
/* 统一两个描述表格的列对齐(标签列固定宽度,内容列等分剩余宽度) */
.order-desc :deep(.el-descriptions__table) {
  table-layout: fixed;
  width: 100%;
}
/* 使用类选择器而非 nth-child,提升稳定性,确保每行两列严格对齐 */
.order-desc :deep(.el-descriptions__table tr:not(:first-child) .el-descriptions__label) {
  width: 180px !important;
  max-width: 180px !important;
  box-sizing: border-box;
}
.order-desc :deep(.el-descriptions__table tr:not(:first-child) .el-descriptions__content) {
  width: calc(50% - 180px) !important;
}
 
.desc-wrap {
  white-space: pre-wrap;
  line-height: 22px;
}
 
/* 文件列表表格样式 */
.file-section {
  margin-top: 15px;
  .file-title {
    font-weight: 600;
    margin-bottom: 10px;
  }
  .file-table {
    width: 100%;
    .file-name {
      display: flex;
      align-items: center;
      .file-icon {
        margin-right: 8px;
        color: #409eff;
      }
    }
    .preview-btn {
      color: #409eff;
      &:hover {
        text-decoration: underline;
      }
    }
  }
}
 
/* 文件表格表头第一列"交易文件"文字靠左对齐 */
.file-table :deep(.el-table__header-wrapper thead tr th:first-child) {
  text-align: left !important;
}
 
/* 交易信息备注表格样式 */
.remark-section {
  margin-top: 15px;
  .remark-table {
    width: 100%;
    .remark-name {
      font-weight: 500;
    }
    .remark-date {
      color: #606266;
    }
    .remark-content {
      color: #606266;
      line-height: 1.4;
    }
  }
}
 
/* 交易信息备注表格表头第一列"交易信息备注"文字靠左对齐 */
.remark-table :deep(.el-table__header-wrapper thead tr th:first-child) {
  text-align: left !important;
}
 
/* 操作按钮样式 */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
  .el-button {
    margin-left: 10px;
  }
}
</style>