| | |
| | | return ({ pending: 'warning', approved: 'success', paid: 'success', rejected: 'danger', failed: 'danger', processing: 'primary' } as Record<string, 'warning' | 'success' | 'danger' | 'primary'>)[value] || 'primary' |
| | | } |
| | | |
| | | /** 斗拱结算流水的交易状态:S 成功、F 失败、P 处理中。 */ |
| | | function settleStatusLabel(value: unknown) { |
| | | /** |
| | | * 商家名称那一格的悬停内容:几家共用同一个汇付商户号时,把共用的商家都列出来。 |
| | | * 格子里只能写「共用收款主体(N 家)」——一条流水是这几家一起的,名字全塞进去放不下(7 家就有 50 多个字符)。 |
| | | */ |
| | | function settlementMerchantTip(row: Record<string, any>) { |
| | | const names: string[] = Array.isArray(row.merchantNames) ? row.merchantNames : [] |
| | | return names.length > 1 ? names.join('、') : String(row.merchantName || '') |
| | | } |
| | | |
| | | /** 斗拱结算流水的交易状态:S 成功、F 失败、P 处理中。 */function settleStatusLabel(value: unknown) { |
| | | return ({ S: '已结算', F: '结算失败', P: '处理中' } as Record<string, string>)[String(value || '')] || String(value || '-') |
| | | } |
| | | |
| | |
| | | <el-table v-loading="loading" :data="rows" border class="settlement-table" empty-text="暂无数据"> |
| | | <template v-if="kind === 'settlements'"> |
| | | <el-table-column prop="providerTransactionNo" label="结算流水号" min-width="190" show-overflow-tooltip /> |
| | | <el-table-column prop="merchantName" label="商家名称" min-width="180" show-overflow-tooltip /> |
| | | <!-- 几家商家共用一个收款主体时,格子写成「共用收款主体(N 家)」——一条流水是几家一起的, |
| | | 把名字全塞进这一格放不下(7 家就 50 多个字符),所以名单放到悬停提示里。 --> |
| | | <el-table-column label="商家名称" min-width="180"> |
| | | <template #default="{ row }"> |
| | | <el-tooltip placement="top" :content="settlementMerchantTip(row)"> |
| | | <span class="cell-ellipsis">{{ row.merchantName }}</span> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="结算日期" min-width="118"><template #default="{ row }">{{ formatSettleDate(row.settleDate) }}</template></el-table-column> |
| | | <el-table-column label="结算金额" min-width="110" align="right"><template #default="{ row }">{{ formatAmount(row.settleAmountCents) }}</template></el-table-column> |
| | | <el-table-column label="手续费" min-width="96" align="right"><template #default="{ row }">{{ formatAmount(row.feeAmountCents) }}</template></el-table-column> |
| | |
| | | .adopt-alert { margin-bottom: 12px; } |
| | | .table-panel { margin-top: 16px; padding: 0 20px 12px; } |
| | | .settlement-table { width: 100%; } |
| | | /* 自绘 tooltip 的那一格自己截断:不再用列的 show-overflow-tooltip(否则会和自绘的提示打架)。 */ |
| | | .cell-ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } |
| | | .settlement-table :deep(th.el-table__cell) { color: #303133; font-weight: 600; background: #f7f8fa; } |
| | | .settlement-table :deep(.el-table__cell) { padding: 10px 0; } |
| | | .pagination-bar { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding-top: 14px; color: #606266; font-size: 13px; } |