vue3-element-plus-app-chu 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +3 -2
- package/src/layout/index.vue +21 -36
- package/src/router/index.ts +107 -0
- package/src/router/menus.ts +16 -0
- package/src/utils/request.ts +3 -1
- package/src/view/dcps/README.md +52 -0
- package/src/view/dcps/auth/index.vue +151 -14
- package/src/view/dcps/balance/index.vue +4 -6
- package/src/view/dcps/common.css +7 -0
- package/src/view/dcps/estimation/api.ts +18 -148
- package/src/view/dcps/estimation/index.vue +312 -13
- package/src/view/dcps/forecast/api.ts +21 -218
- package/src/view/dcps/forecast/index.vue +996 -50
- package/src/view/dcps/injection/index.vue +154 -11
- package/src/view/dcps/write-off/api.ts +25 -180
- package/src/view/dcps/write-off/index.vue +776 -39
- package/src/view/dcps/auth/components/.gitkeep +0 -0
- package/src/view/dcps/auth/components/AuthorizationDetailDialog.vue +0 -171
- package/src/view/dcps/estimation/components/EstimationDetailDialog.vue +0 -222
- package/src/view/dcps/forecast/components/ForecastDetailView.vue +0 -145
- package/src/view/dcps/forecast/components/ForecastEditorView.vue +0 -320
- package/src/view/dcps/forecast/components/ForecastListView.vue +0 -322
- package/src/view/dcps/forecast/components/ForecastPageShell.vue +0 -56
- package/src/view/dcps/injection/components/InjectionDetailDialog.vue +0 -171
- package/src/view/dcps/runtime.ts +0 -38
- package/src/view/dcps/write-off/components/FlowWriteOffView.vue +0 -299
- package/src/view/dcps/write-off/components/ForecastWriteOffView.vue +0 -437
|
File without changes
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
|
|
4
|
-
// 父页面传入的弹窗状态、任务数据和操作权限。
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
// 是否显示详情弹窗。
|
|
7
|
-
modelValue: boolean
|
|
8
|
-
// 原始任务数据,用于判断审批状态和传递审批任务。
|
|
9
|
-
task: any
|
|
10
|
-
// 父页面格式化后的金额、状态和时间,仅用于展示。
|
|
11
|
-
displayValues: any
|
|
12
|
-
// 页面正在查询或提交审批时,禁用详情中的审批入口。
|
|
13
|
-
disabled?: boolean
|
|
14
|
-
}>()
|
|
15
|
-
// 向父页面同步显隐状态,或传出待审批的原始任务。
|
|
16
|
-
const emit = defineEmits<{
|
|
17
|
-
// visible 为更新后的弹窗显隐状态。
|
|
18
|
-
'update:modelValue': [visible: boolean]
|
|
19
|
-
// task 为用户选择审批的原始任务。
|
|
20
|
-
approve: [task: any]
|
|
21
|
-
}>()
|
|
22
|
-
|
|
23
|
-
// 详情分组配置;title 为分组标题,fields 每项为 [任务字段名, 展示名称]。
|
|
24
|
-
const detailGroups = [
|
|
25
|
-
{
|
|
26
|
-
title: '任务信息',
|
|
27
|
-
fields: [
|
|
28
|
-
['id', '任务 ID'],
|
|
29
|
-
['bizType', '业务类型'],
|
|
30
|
-
['createTm', '创建时间'],
|
|
31
|
-
['txnTm', '交易发起时间'],
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
title: '交易信息',
|
|
36
|
-
fields: [
|
|
37
|
-
['collePayerName', '付款人名称'],
|
|
38
|
-
['payeeName', '收款人名称'],
|
|
39
|
-
['payWltId', '付款钱包 ID'],
|
|
40
|
-
],
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: '机构信息',
|
|
44
|
-
fields: [
|
|
45
|
-
['authoOrgName', '授权机构名称'],
|
|
46
|
-
['authoOrgNo', '授权机构编号'],
|
|
47
|
-
['paySideAcctBeloOrgName', '付款方账户所属机构名称'],
|
|
48
|
-
['paySideAcctBeloOrgNo', '付款方账户所属机构编号'],
|
|
49
|
-
['collSideAcctBeloOrgName', '收款方账户所属机构名称'],
|
|
50
|
-
['collSideAcctBeloOrgNo', '收款方账户所属机构编号'],
|
|
51
|
-
['subBrchName', '落地支行名称'],
|
|
52
|
-
['subBrchBankNo', '落地支行行号'],
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: '审批信息',
|
|
57
|
-
fields: [
|
|
58
|
-
['apprvrId', '审批人 ID'],
|
|
59
|
-
['apprvrName', '审批人名称'],
|
|
60
|
-
['approveTm', '审批时间'],
|
|
61
|
-
['rmk', '审批备注'],
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
] as const
|
|
65
|
-
|
|
66
|
-
// 仅在页面可操作、任务待审批且流水号有效时允许审批。
|
|
67
|
-
const canApprove = computed(() =>
|
|
68
|
-
!props.disabled
|
|
69
|
-
&& props.task?.taskSts === '01'
|
|
70
|
-
&& !!props.task.platfSeqNo?.trim(),
|
|
71
|
-
)
|
|
72
|
-
/** 读取详情展示值,空值显示占位符;field 为任务字段名。 */
|
|
73
|
-
const displayValue = (field: string) => props.displayValues?.[field]?.trim() || '—'
|
|
74
|
-
|
|
75
|
-
// 通知父页面打开审批弹窗,由父页面统一提交审批。
|
|
76
|
-
const approveTask = () => {
|
|
77
|
-
if (canApprove.value && props.task) emit('approve', props.task)
|
|
78
|
-
}
|
|
79
|
-
</script>
|
|
80
|
-
|
|
81
|
-
<template>
|
|
82
|
-
<el-dialog
|
|
83
|
-
:model-value="modelValue"
|
|
84
|
-
title="数字人民币授权详情"
|
|
85
|
-
style="--el-dialog-padding-primary: 10px; padding: 10px 16px; margin-bottom: 16px"
|
|
86
|
-
width="min(1280px, calc(100vw - 32px))"
|
|
87
|
-
top="16px"
|
|
88
|
-
append-to-body
|
|
89
|
-
destroy-on-close
|
|
90
|
-
@update:model-value="emit('update:modelValue', $event)"
|
|
91
|
-
>
|
|
92
|
-
<el-scrollbar class="detail-scrollbar">
|
|
93
|
-
<div v-if="task" class="detail-content">
|
|
94
|
-
<!-- 交易摘要 -->
|
|
95
|
-
<header class="detail-summary">
|
|
96
|
-
<div>
|
|
97
|
-
<span class="detail-label">交易金额(元)</span>
|
|
98
|
-
<strong class="detail-amount">{{ displayValue('txnAmt') }}</strong>
|
|
99
|
-
</div>
|
|
100
|
-
<div>
|
|
101
|
-
<span class="detail-label">任务状态</span>
|
|
102
|
-
<strong class="detail-status">{{ displayValue('taskSts') }}</strong>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="detail-reference">
|
|
105
|
-
<span class="detail-label">平台流水号</span>
|
|
106
|
-
<strong>{{ displayValue('platfSeqNo') }}</strong>
|
|
107
|
-
</div>
|
|
108
|
-
</header>
|
|
109
|
-
|
|
110
|
-
<!-- group 为当前详情分组,包含标题和字段配置。 -->
|
|
111
|
-
<section v-for="group in detailGroups" :key="group.title" class="detail-group" :aria-label="group.title">
|
|
112
|
-
<h3>{{ group.title }}</h3>
|
|
113
|
-
<dl class="detail-fields">
|
|
114
|
-
<!-- field 为任务字段名,label 为字段的中文展示名称。 -->
|
|
115
|
-
<div
|
|
116
|
-
v-for="[field, label] in group.fields"
|
|
117
|
-
:key="field"
|
|
118
|
-
class="detail-field"
|
|
119
|
-
:class="{ 'detail-field--remark': field === 'rmk' }"
|
|
120
|
-
>
|
|
121
|
-
<dt>{{ label }}</dt>
|
|
122
|
-
<dd>{{ displayValue(field) }}</dd>
|
|
123
|
-
</div>
|
|
124
|
-
</dl>
|
|
125
|
-
</section>
|
|
126
|
-
</div>
|
|
127
|
-
<el-empty v-else description="暂无任务详情" :image-size="64" />
|
|
128
|
-
</el-scrollbar>
|
|
129
|
-
|
|
130
|
-
<template #footer>
|
|
131
|
-
<el-button size="small" @click="emit('update:modelValue', false)">关闭</el-button>
|
|
132
|
-
<el-button size="small" type="primary" :disabled="!canApprove" @click="approveTask">
|
|
133
|
-
审批
|
|
134
|
-
</el-button>
|
|
135
|
-
</template>
|
|
136
|
-
</el-dialog>
|
|
137
|
-
</template>
|
|
138
|
-
|
|
139
|
-
<style scoped>
|
|
140
|
-
/* 为弹窗边距、标题和底部按钮预留空间,其余高度用于完整展示详情。 */
|
|
141
|
-
.detail-scrollbar :deep(.el-scrollbar__wrap) {
|
|
142
|
-
max-height: calc(100vh - 120px);
|
|
143
|
-
max-height: calc(100dvh - 120px);
|
|
144
|
-
}
|
|
145
|
-
.detail-content { display: grid; gap: 8px; font-size: 13px; line-height: 1.4; }
|
|
146
|
-
.detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; border-radius: 8px; background: var(--el-color-primary-light-9); overflow-wrap: anywhere; }
|
|
147
|
-
.detail-label,
|
|
148
|
-
.detail-field dt { color: var(--el-text-color-secondary); font-size: 12px; }
|
|
149
|
-
.detail-amount { display: block; margin-top: 4px; color: var(--el-color-primary-dark-2); font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.3; }
|
|
150
|
-
.detail-status { display: block; margin-top: 6px; color: var(--el-text-color-primary); font-size: 15px; }
|
|
151
|
-
.detail-reference { display: grid; grid-column: span 2; align-content: start; gap: 4px; }
|
|
152
|
-
.detail-group { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: start; gap: 8px; padding: 12px; border: 1px solid var(--el-border-color-lighter); border-radius: 8px; }
|
|
153
|
-
.detail-group h3 { margin: 4px 0 0; padding-left: 8px; border-left: 3px solid var(--el-color-primary); color: var(--el-text-color-primary); font-size: 14px; line-height: 20px; }
|
|
154
|
-
.detail-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
|
|
155
|
-
.detail-field { min-width: 0; padding: 8px 12px; border-radius: 6px; background: var(--el-fill-color-lighter); }
|
|
156
|
-
.detail-field--remark { grid-column: 1 / -1; }
|
|
157
|
-
.detail-field dd { margin: 2px 0 0; color: var(--el-text-color-primary); font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
|
|
158
|
-
|
|
159
|
-
@media (max-width: 1024px) {
|
|
160
|
-
.detail-group { grid-template-columns: minmax(0, 1fr); }
|
|
161
|
-
.detail-group h3 { margin-top: 0; }
|
|
162
|
-
.detail-summary,
|
|
163
|
-
.detail-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@media (max-width: 600px) {
|
|
167
|
-
.detail-summary,
|
|
168
|
-
.detail-fields { grid-template-columns: minmax(0, 1fr); }
|
|
169
|
-
.detail-reference { grid-column: auto; }
|
|
170
|
-
}
|
|
171
|
-
</style>
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onBeforeUnmount, ref } from 'vue'
|
|
3
|
-
import { ElMessage } from 'element-plus'
|
|
4
|
-
import API, { busiTypeLabels, dictLabel, displayText, formatAmount, getErrorMessage, payChannelLabels, payDirecLabels, verifyStatusLabels } from '../api'
|
|
5
|
-
import type { EstimationCell, EstimationPredRow, EstimationTranRow } from '../typs'
|
|
6
|
-
|
|
7
|
-
// 匡算详情弹窗:按 position、tranDate 查询单元格对应的预报与流水明细。
|
|
8
|
-
// 弹窗开启时由父页面挂载(destroy-on-close),挂载后立即请求详情。
|
|
9
|
-
|
|
10
|
-
// 父页面传入的弹窗显隐状态、单击的报表单元格和本次匡算的交易日期。
|
|
11
|
-
const props = defineProps<{
|
|
12
|
-
modelValue: boolean // 弹窗是否显示。
|
|
13
|
-
cell: EstimationCell | null // 单击的单元格,含位置编码、展示名称和金额文本。
|
|
14
|
-
tranDate: string // 详情查询的交易日期,取自最近一次匡算查询。
|
|
15
|
-
}>()
|
|
16
|
-
const emit = defineEmits<{
|
|
17
|
-
'update:modelValue': [visible: boolean] // 向父页面同步弹窗显隐状态。
|
|
18
|
-
}>()
|
|
19
|
-
|
|
20
|
-
// 详情数据与加载状态。
|
|
21
|
-
const predList = ref<EstimationPredRow[]>([]) // 详情返回的预报明细列表。
|
|
22
|
-
const tranList = ref<EstimationTranRow[]>([]) // 详情返回的流水明细列表。
|
|
23
|
-
const totalCount = ref('') // 详情返回的明细总条数。
|
|
24
|
-
const loading = ref(false) // 详情请求是否进行中。
|
|
25
|
-
const hasError = ref(false) // 详情请求是否失败,失败时提示重新打开再试。
|
|
26
|
-
let requestId = 0 // 最新请求的序号,用于忽略过期响应。
|
|
27
|
-
let disposed = false // 弹窗是否已卸载,避免未完成请求继续更新界面。
|
|
28
|
-
|
|
29
|
-
/** 查询单元格明细;cell 或交易日期缺失时不发起请求,直接呈现空态。 */
|
|
30
|
-
const query = async () => {
|
|
31
|
-
const position = props.cell?.position?.trim()
|
|
32
|
-
const date = props.tranDate.trim()
|
|
33
|
-
if (!position || !date) return
|
|
34
|
-
const currentRequestId = ++requestId
|
|
35
|
-
loading.value = true
|
|
36
|
-
try {
|
|
37
|
-
const { head, body } = await API.getDetailApi({ position, tranDate: date }) as any
|
|
38
|
-
if (currentRequestId !== requestId || disposed) return
|
|
39
|
-
if (head?.retCode !== '00000') {
|
|
40
|
-
throw new Error(head?.retMsg || '查询失败')
|
|
41
|
-
}
|
|
42
|
-
predList.value = Array.isArray(body?.predList) ? body.predList : []
|
|
43
|
-
tranList.value = Array.isArray(body?.tranList) ? body.tranList : []
|
|
44
|
-
totalCount.value = String(body?.totalCount ?? '').trim()
|
|
45
|
-
hasError.value = false
|
|
46
|
-
} catch (error) { // error 为详情请求或响应数据校验异常。
|
|
47
|
-
if (currentRequestId !== requestId || disposed) return
|
|
48
|
-
predList.value = []
|
|
49
|
-
tranList.value = []
|
|
50
|
-
totalCount.value = ''
|
|
51
|
-
hasError.value = true
|
|
52
|
-
ElMessage.error(getErrorMessage(error))
|
|
53
|
-
} finally {
|
|
54
|
-
if (currentRequestId === requestId) loading.value = false
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// 弹窗内容配合 destroy-on-close 每次打开重新挂载表格;明细请求由 el-dialog 的 open 事件触发,
|
|
59
|
-
// 组件实例常驻不重复挂载,onMounted 只会执行一次而不能承担每次打开的查询。
|
|
60
|
-
// 弹窗关闭后,未完成的请求不再更新界面或弹出消息。
|
|
61
|
-
onBeforeUnmount(() => {
|
|
62
|
-
disposed = true
|
|
63
|
-
requestId += 1
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
/** 合并预报、流水列表得到明细总条数;接口 totalCount 缺失时按列表长度兜底展示。 */
|
|
67
|
-
const resolveTotal = () => {
|
|
68
|
-
if (/^\d+$/.test(totalCount.value)) return totalCount.value
|
|
69
|
-
return String(predList.value.length + tranList.value.length)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// 预报信息表格的行键:预报流水号可能缺失或重复,固定追加下标保证唯一。
|
|
73
|
-
const predRowKey = (row: EstimationPredRow, index: number) => `${row.predRefNo?.trim() || 'pred'}-${index}`
|
|
74
|
-
// 流水信息表格的行键:交易参考号同理追加下标保证唯一。
|
|
75
|
-
const tranRowKey = (row: EstimationTranRow, index: number) => `${row.refNo?.trim() || 'tran'}-${index}`
|
|
76
|
-
</script>
|
|
77
|
-
|
|
78
|
-
<template>
|
|
79
|
-
<el-dialog
|
|
80
|
-
:model-value="modelValue"
|
|
81
|
-
:title="cell ? `匡算明细 - ${cell.label}` : '匡算明细'"
|
|
82
|
-
width="min(1080px, calc(100vw - 32px))"
|
|
83
|
-
top="16px"
|
|
84
|
-
append-to-body
|
|
85
|
-
destroy-on-close
|
|
86
|
-
@open="query"
|
|
87
|
-
@update:model-value="emit('update:modelValue', $event)"
|
|
88
|
-
>
|
|
89
|
-
<el-scrollbar class="detail-scrollbar">
|
|
90
|
-
<div class="detail-content">
|
|
91
|
-
<!-- 上下文摘要:被点击单元格的位置、金额与详情查询的交易日期。 -->
|
|
92
|
-
<header class="detail-summary">
|
|
93
|
-
<div>
|
|
94
|
-
<span class="detail-label">位置编码</span>
|
|
95
|
-
<strong class="detail-position">{{ cell?.position || '—' }}</strong>
|
|
96
|
-
</div>
|
|
97
|
-
<div>
|
|
98
|
-
<span class="detail-label">单元格金额(元)</span>
|
|
99
|
-
<strong class="detail-amount">{{ formatAmount(cell?.amount) }}</strong>
|
|
100
|
-
</div>
|
|
101
|
-
<div>
|
|
102
|
-
<span class="detail-label">交易日期</span>
|
|
103
|
-
<strong>{{ tranDate }}</strong>
|
|
104
|
-
</div>
|
|
105
|
-
<div class="detail-reference">
|
|
106
|
-
<span class="detail-label">明细总条数</span>
|
|
107
|
-
<strong>{{ resolveTotal() }}</strong>
|
|
108
|
-
</div>
|
|
109
|
-
</header>
|
|
110
|
-
|
|
111
|
-
<div v-loading="loading" class="detail-tables">
|
|
112
|
-
<!-- 预报信息明细;列表为空时展示统一空态。 -->
|
|
113
|
-
<div class="dialog-section-title">预报信息</div>
|
|
114
|
-
<el-table :data="predList" size="small" border max-height="240px" empty-text="暂无预报信息">
|
|
115
|
-
<el-table-column label="预报流水号" min-width="150" show-overflow-tooltip>
|
|
116
|
-
<template #default="{ row }">{{ displayText(row.predRefNo) }}</template>
|
|
117
|
-
</el-table-column>
|
|
118
|
-
<el-table-column label="业务类型" width="90" align="center">
|
|
119
|
-
<template #default="{ row }">{{ dictLabel(busiTypeLabels, row.busiType) }}</template>
|
|
120
|
-
</el-table-column>
|
|
121
|
-
<el-table-column label="客户名称" min-width="140" show-overflow-tooltip>
|
|
122
|
-
<template #default="{ row }">{{ displayText(row.clientName) }}</template>
|
|
123
|
-
</el-table-column>
|
|
124
|
-
<el-table-column label="交易对手名称" min-width="140" show-overflow-tooltip>
|
|
125
|
-
<template #default="{ row }">{{ displayText(row.competName) }}</template>
|
|
126
|
-
</el-table-column>
|
|
127
|
-
<el-table-column label="收支方向" width="80" align="center">
|
|
128
|
-
<template #default="{ row }">{{ dictLabel(payDirecLabels, row.payDirec) }}</template>
|
|
129
|
-
</el-table-column>
|
|
130
|
-
<el-table-column label="支付渠道" width="110" align="center">
|
|
131
|
-
<template #default="{ row }">{{ dictLabel(payChannelLabels, row.payChannel) }}</template>
|
|
132
|
-
</el-table-column>
|
|
133
|
-
<el-table-column label="预报金额(元)" width="140" align="right">
|
|
134
|
-
<template #default="{ row }"><span class="amount-cell">{{ formatAmount(row.predAmt) }}</span></template>
|
|
135
|
-
</el-table-column>
|
|
136
|
-
<el-table-column label="已核销金额(元)" width="140" align="right">
|
|
137
|
-
<template #default="{ row }"><span class="amount-cell">{{ formatAmount(row.verifyAmt) }}</span></template>
|
|
138
|
-
</el-table-column>
|
|
139
|
-
<el-table-column label="核销状态" width="90" align="center">
|
|
140
|
-
<template #default="{ row }">{{ dictLabel(verifyStatusLabels, row.verifyStatus) }}</template>
|
|
141
|
-
</el-table-column>
|
|
142
|
-
<el-table-column label="落地支行" min-width="130" show-overflow-tooltip>
|
|
143
|
-
<template #default="{ row }">{{ displayText(row.groundBranch) }}</template>
|
|
144
|
-
</el-table-column>
|
|
145
|
-
<el-table-column label="上级单位" min-width="130" show-overflow-tooltip>
|
|
146
|
-
<template #default="{ row }">{{ displayText(row.upOrg) }}</template>
|
|
147
|
-
</el-table-column>
|
|
148
|
-
</el-table>
|
|
149
|
-
|
|
150
|
-
<!-- 流水信息明细;失败的详情可重新打开弹窗重试。 -->
|
|
151
|
-
<div class="dialog-section-title">流水信息</div>
|
|
152
|
-
<el-table :data="tranList" size="small" border max-height="240px" empty-text="暂无流水信息">
|
|
153
|
-
<el-table-column label="交易参考号" min-width="150" show-overflow-tooltip>
|
|
154
|
-
<template #default="{ row }">{{ displayText(row.refNo) }}</template>
|
|
155
|
-
</el-table-column>
|
|
156
|
-
<el-table-column label="业务类型" width="90" align="center">
|
|
157
|
-
<template #default="{ row }">{{ dictLabel(busiTypeLabels, row.busiType) }}</template>
|
|
158
|
-
</el-table-column>
|
|
159
|
-
<el-table-column label="付款人名称" min-width="140" show-overflow-tooltip>
|
|
160
|
-
<template #default="{ row }">{{ displayText(row.payerName) }}</template>
|
|
161
|
-
</el-table-column>
|
|
162
|
-
<el-table-column label="收款人名称" min-width="140" show-overflow-tooltip>
|
|
163
|
-
<template #default="{ row }">{{ displayText(row.payeeName) }}</template>
|
|
164
|
-
</el-table-column>
|
|
165
|
-
<el-table-column label="收支方向" width="80" align="center">
|
|
166
|
-
<template #default="{ row }">{{ dictLabel(payDirecLabels, row.payDirec) }}</template>
|
|
167
|
-
</el-table-column>
|
|
168
|
-
<el-table-column label="支付渠道" width="110" align="center">
|
|
169
|
-
<template #default="{ row }">{{ dictLabel(payChannelLabels, row.payChannel) }}</template>
|
|
170
|
-
</el-table-column>
|
|
171
|
-
<el-table-column label="金额(元)" width="140" align="right">
|
|
172
|
-
<template #default="{ row }"><span class="amount-cell">{{ formatAmount(row.amt) }}</span></template>
|
|
173
|
-
</el-table-column>
|
|
174
|
-
<el-table-column label="核销状态" width="90" align="center">
|
|
175
|
-
<template #default="{ row }">{{ dictLabel(verifyStatusLabels, row.verifyStatus) }}</template>
|
|
176
|
-
</el-table-column>
|
|
177
|
-
<el-table-column label="落地支行" min-width="130" show-overflow-tooltip>
|
|
178
|
-
<template #default="{ row }">{{ displayText(row.groundBranch) }}</template>
|
|
179
|
-
</el-table-column>
|
|
180
|
-
<el-table-column label="上级单位" min-width="130" show-overflow-tooltip>
|
|
181
|
-
<template #default="{ row }">{{ displayText(row.upOrg) }}</template>
|
|
182
|
-
</el-table-column>
|
|
183
|
-
</el-table>
|
|
184
|
-
|
|
185
|
-
<div v-if="hasError" class="detail-retry">详情查询失败,关闭弹窗后重新打开可重试。</div>
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
</el-scrollbar>
|
|
189
|
-
<template #footer>
|
|
190
|
-
<el-button @click="emit('update:modelValue', false)">关闭</el-button>
|
|
191
|
-
</template>
|
|
192
|
-
</el-dialog>
|
|
193
|
-
</template>
|
|
194
|
-
|
|
195
|
-
<style scoped>
|
|
196
|
-
.detail-scrollbar { max-height: calc(100vh - 240px); }
|
|
197
|
-
.detail-content { padding: 2px 4px 4px; }
|
|
198
|
-
|
|
199
|
-
/* 摘要区:位置编码、金额、日期放在一行,便于确认明细上下文。 */
|
|
200
|
-
.detail-summary {
|
|
201
|
-
display: flex;
|
|
202
|
-
flex-wrap: wrap;
|
|
203
|
-
align-items: center;
|
|
204
|
-
gap: 12px 36px;
|
|
205
|
-
margin-bottom: 12px;
|
|
206
|
-
padding: 12px 14px;
|
|
207
|
-
border-radius: 10px;
|
|
208
|
-
background: var(--el-fill-color-light);
|
|
209
|
-
}
|
|
210
|
-
.detail-label { display: block; margin-bottom: 5px; color: var(--el-text-color-secondary); font-size: 11px; }
|
|
211
|
-
.detail-summary strong { overflow-wrap: anywhere; font-size: 13px; }
|
|
212
|
-
.detail-amount { color: var(--el-color-primary-dark-2); font-variant-numeric: tabular-nums; }
|
|
213
|
-
.detail-reference { margin-left: auto; }
|
|
214
|
-
.detail-reference strong { font-weight: 600; }
|
|
215
|
-
|
|
216
|
-
.dialog-section-title { margin: 12px 0 6px; color: var(--el-text-color-regular); font-size: 13px; font-weight: 600; }
|
|
217
|
-
.detail-tables .el-table + .el-table { margin-top: 2px; }
|
|
218
|
-
.detail-tables { min-height: 160px; }
|
|
219
|
-
.detail-tables .dialog-section-title:first-child { margin-top: 0; }
|
|
220
|
-
.amount-cell { color: var(--el-text-color-primary); font-variant-numeric: tabular-nums; }
|
|
221
|
-
.detail-retry { margin-top: 10px; color: var(--el-color-danger); font-size: 12px; text-align: center; }
|
|
222
|
-
</style>
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
|
|
3
|
-
import ForecastPageShell from './ForecastPageShell.vue'
|
|
4
|
-
import API, { formatAmount, formatDate, getErrorMessage } from '../api'
|
|
5
|
-
import type { ForecastDetail, ForecastRow } from '../typs'
|
|
6
|
-
|
|
7
|
-
defineOptions({ name: 'ForecastDetailView' })
|
|
8
|
-
|
|
9
|
-
/** 预报详情页;按预报流水号读取,接口未返回的字段由列表记录补充。 */
|
|
10
|
-
const props = defineProps<{ row: ForecastRow }>()
|
|
11
|
-
|
|
12
|
-
const emit = defineEmits<{ back: []; edit: [row: ForecastRow] }>()
|
|
13
|
-
|
|
14
|
-
type DetailField = { key: keyof ForecastDetail; label: string; kind?: 'date' | 'amount' | 'status' }
|
|
15
|
-
|
|
16
|
-
const detailGroups: { title: string; fields: DetailField[] }[] = [
|
|
17
|
-
{
|
|
18
|
-
title: '预报信息',
|
|
19
|
-
fields: [
|
|
20
|
-
{ key: 'predRefNo', label: '预报流水号' },
|
|
21
|
-
{ key: 'predDate', label: '预报日期', kind: 'date' },
|
|
22
|
-
{ key: 'tranDate', label: '交易日期', kind: 'date' },
|
|
23
|
-
{ key: 'predAmt', label: '预报金额(元)', kind: 'amount' },
|
|
24
|
-
{ key: 'predCode', label: '预报人员编号' },
|
|
25
|
-
{ key: 'standardName', label: '标准名称' },
|
|
26
|
-
{ key: 'predStatus', label: '预报状态代码', kind: 'status' },
|
|
27
|
-
{ key: 'verifyStatus', label: '核销状态代码', kind: 'status' },
|
|
28
|
-
{ key: 'verifyAmt', label: '已核销金额(元)', kind: 'amount' },
|
|
29
|
-
{ key: 'edusFlag', label: '释放状态代码', kind: 'status' },
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: '业务与客户',
|
|
34
|
-
fields: [
|
|
35
|
-
{ key: 'busiType', label: '业务类型代码' },
|
|
36
|
-
{ key: 'payDirec', label: '收支方向代码' },
|
|
37
|
-
{ key: 'payChannel', label: '支付渠道代码' },
|
|
38
|
-
{ key: 'clientName', label: '客户名称' },
|
|
39
|
-
{ key: 'clientType', label: '客户类型代码' },
|
|
40
|
-
{ key: 'competName', label: '交易对手名称' },
|
|
41
|
-
{ key: 'competAcct', label: '交易对手账号' },
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
title: '机构与票据',
|
|
46
|
-
fields: [
|
|
47
|
-
{ key: 'groundBranch', label: '落地机构' },
|
|
48
|
-
{ key: 'groundBranchCode', label: '机构代码' },
|
|
49
|
-
{ key: 'groundBranchName', label: '落地机构名称' },
|
|
50
|
-
{ key: 'billNo', label: '票号' },
|
|
51
|
-
{ key: 'billSignDate', label: '出票日期', kind: 'date' },
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
]
|
|
55
|
-
|
|
56
|
-
const detail = ref<ForecastDetail | null>(null)
|
|
57
|
-
const loading = ref(false)
|
|
58
|
-
const error = ref('')
|
|
59
|
-
const predRefNo = computed(() => props.row.predRefNo?.trim() || '')
|
|
60
|
-
const title = computed(() => predRefNo.value ? `预报详情 · ${predRefNo.value}` : '数字人民币头寸预报详情')
|
|
61
|
-
|
|
62
|
-
const displayValue = (field: DetailField) => {
|
|
63
|
-
const value = detail.value?.[field.key]
|
|
64
|
-
if (value === undefined || value === null || value === '') return '—'
|
|
65
|
-
if (field.kind === 'amount') return formatAmount(value)
|
|
66
|
-
if (field.kind === 'date') return formatDate(value)
|
|
67
|
-
return String(value)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
let disposed = false
|
|
71
|
-
const loadDetail = async () => {
|
|
72
|
-
if (loading.value || !predRefNo.value) return
|
|
73
|
-
loading.value = true
|
|
74
|
-
detail.value = null
|
|
75
|
-
error.value = ''
|
|
76
|
-
try {
|
|
77
|
-
const result = await API.fetchDetail(props.row)
|
|
78
|
-
if (!disposed) detail.value = result
|
|
79
|
-
} catch (requestError) {
|
|
80
|
-
if (!disposed) error.value = getErrorMessage(requestError)
|
|
81
|
-
} finally {
|
|
82
|
-
if (!disposed) loading.value = false
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
onMounted(loadDetail)
|
|
87
|
-
onBeforeUnmount(() => { disposed = true })
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<template>
|
|
91
|
-
<ForecastPageShell :title="title" :back-disabled="loading" @back="emit('back')">
|
|
92
|
-
<template #heading-extra>
|
|
93
|
-
<el-button v-if="detail" type="primary" :disabled="loading" @click="emit('edit', row)">修改预报</el-button>
|
|
94
|
-
</template>
|
|
95
|
-
<el-card class="detail-card" shadow="never" :body-style="{ padding: '12px 16px' }">
|
|
96
|
-
<div v-loading="loading" class="detail-scroll">
|
|
97
|
-
<div v-if="error" class="detail-error" role="alert">
|
|
98
|
-
<el-alert :title="error" type="error" :closable="false" show-icon />
|
|
99
|
-
<el-button size="small" :disabled="loading" @click="loadDetail">重新加载</el-button>
|
|
100
|
-
</div>
|
|
101
|
-
<div v-else-if="detail" class="detail-content">
|
|
102
|
-
<!-- group 为当前详情分组,fields 中的每项对应一个字段。 -->
|
|
103
|
-
<section v-for="group in detailGroups" :key="group.title" class="detail-group" :aria-label="group.title">
|
|
104
|
-
<h3>{{ group.title }}</h3>
|
|
105
|
-
<dl class="detail-fields">
|
|
106
|
-
<div v-for="field in group.fields" :key="field.key" class="detail-field">
|
|
107
|
-
<dt>{{ field.label }}</dt>
|
|
108
|
-
<dd :class="{ 'detail-amount': field.kind === 'amount', 'detail-status': field.kind === 'status' }">{{ displayValue(field) }}</dd>
|
|
109
|
-
</div>
|
|
110
|
-
</dl>
|
|
111
|
-
</section>
|
|
112
|
-
</div>
|
|
113
|
-
<el-empty v-else-if="!loading" description="暂无预报详情" :image-size="64" />
|
|
114
|
-
</div>
|
|
115
|
-
</el-card>
|
|
116
|
-
</ForecastPageShell>
|
|
117
|
-
</template>
|
|
118
|
-
|
|
119
|
-
<style scoped>
|
|
120
|
-
.detail-card { flex: 1; min-height: 0; min-width: 0; }
|
|
121
|
-
.detail-scroll { height: 100%; padding-right: 2px; overflow-y: auto; }
|
|
122
|
-
/* 与授权详情一致:分组标题在左,字段按四列排布,窗口变窄后逐级减少列数。 */
|
|
123
|
-
.detail-content { display: grid; gap: 8px; font-size: 13px; line-height: 1.4; }
|
|
124
|
-
.detail-group { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 8px; padding: 12px; border: 1px solid var(--el-border-color-lighter); border-radius: 8px; }
|
|
125
|
-
.detail-group h3 { margin: 4px 0 0; padding-left: 8px; border-left: 3px solid var(--el-color-primary); color: var(--el-text-color-primary); font-size: 14px; line-height: 20px; }
|
|
126
|
-
.detail-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
|
|
127
|
-
.detail-field { min-width: 0; padding: 8px 12px; border-radius: 6px; background: var(--el-fill-color-lighter); }
|
|
128
|
-
.detail-field dt { color: var(--el-text-color-secondary); font-size: 12px; }
|
|
129
|
-
.detail-field dd { margin: 2px 0 0; color: var(--el-text-color-primary); font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
|
|
130
|
-
.detail-amount { font-variant-numeric: tabular-nums; }
|
|
131
|
-
.detail-status { color: #000; }
|
|
132
|
-
.detail-error { display: grid; justify-items: start; gap: 12px; }
|
|
133
|
-
|
|
134
|
-
@media (max-width: 1400px) {
|
|
135
|
-
.detail-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
136
|
-
}
|
|
137
|
-
@media (max-width: 1024px) {
|
|
138
|
-
.detail-group { grid-template-columns: minmax(0, 1fr); }
|
|
139
|
-
.detail-group h3 { margin-top: 0; }
|
|
140
|
-
.detail-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
141
|
-
}
|
|
142
|
-
@media (max-width: 640px) {
|
|
143
|
-
.detail-fields { grid-template-columns: minmax(0, 1fr); }
|
|
144
|
-
}
|
|
145
|
-
</style>
|