vue3-element-plus-app-chu 0.0.31 → 0.0.33

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 CHANGED
@@ -40,7 +40,7 @@ pnpm dev:backend # 只启动 verce-vue-test/backend 后端
40
40
 
41
41
  数字人民币页面的业务类型使用 `201/202/203` 字典,新增预报不提交 `predName`;核销预报方向使用 `1/2`,待核销查询包含状态 `1/3`,展示交易对手账号;流水可按业务类型筛选并读取 `tranStatus`;注资明细支持起止交易日期;授权页展示业务类型中文名称。匡算明细展示部分核销状态。字段及页面接口映射见 [数字人民币接口摘录](docs/digital-rmb-apis.md),当前接口约束以实时文档为准。
42
42
 
43
- 独立页面 `/flow-query` 的普通查询、初次加载、分页和刷新与核销页面的流水信息共用 `/TAM/0001/140502002`,参数保持一致:交易日期 `tranDate` 必填且默认取共用业务日期,可按业务类型、我方机构、付款人、收款人、收支方向、金额范围和核销状态筛选,未填写的可选条件不提交。列表读取 `resultList` 和字符串类型的 `totalCount`,字段沿用核销流水模型。「查询」「实时查询流水」与「重置」按钮并排放在查询条件区末尾。「实时查询流水」单独调用 `/TAM/0001/140504002`,只携带公共分页参数 `pageIndex: 1`、`pageSize: 1`,业务请求体为空;成功或失败通过弹窗提示,不更新列表。
43
+ 独立页面 `/flow-query` 的普通查询、初次加载、分页和刷新与核销页面的流水信息共用 `/TAM/0001/140502002`,参数保持一致:交易日期 `tranDate` 必填且默认取共用业务日期,可按业务类型、我方机构、付款人、收款人、收支方向、金额范围和核销状态筛选,未填写的可选条件不提交。列表读取 `resultList` 和字符串类型的 `totalCount`,字段沿用核销流水模型。「查询」「实时查询流水」与「重置」按钮并排放在查询条件区末尾。「实时查询流水」单独调用 `/TAM/0001/140504002`,只携带公共分页参数 `pageIndex: 1`、`pageSize: 1`,业务请求体为空;成功提示“操作成功”,失败仅记录控制台,不更新列表。
44
44
 
45
45
  ## 城银清头寸参数接口
46
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-element-plus-app-chu",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -26,7 +26,7 @@ export interface TamResponseHead {
26
26
  extra?: Record<string, unknown>
27
27
  retStatus: string // 交易状态,保留服务端原值。
28
28
  retCode: string // 请求成功的判断依据:00000 表示成功。
29
- retMsg: string // 交易结果说明,失败时用于提示用户。
29
+ retMsg: string // 交易结果说明,接口失败时用于控制台记录。
30
30
  [field: string]: unknown
31
31
  }
32
32
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  当前核销预报 API 将页面 `1/2` 方向与后端实现的 `I/O` 双向转换;核销写操作提交公共 `consumerSeqNo`、原状态和原金额快照。后端作为替代前端 mock 的本地测试服务,核销、修改和撤销核销按顺序直接更新数据库,各种 MongoDB 部署模式均不启动事务。`consumerSeqNo` 可选,缺省时后端生成,传入时支持相同请求重试;快照校验和关联撤回逻辑仍保留。注资明细使用服务端分页;发起注资只保存 `PENDING` / `NOT_SENT` 记录,不改变余额。参数接口当前由 `swaggerStub` 返回静态兼容数据,不持久化参数增删改。
26
26
 
27
- 独立流水查询页面 `/flow-query` 的普通查询、初次加载、分页和刷新复用核销页的 `queryFlowApi`(`140502002`)与流水模型,读取 `resultList` 和字符串类型的 `totalCount`。查询参数与核销页流水信息保持一致:`tranDate` 必填,默认取 `dcpsRuntime.date`;可选条件为 `busiType`、`orgName`、`payerName`、`payeeName`、`payDirec`(I/O)、`startTransAmt`、`endTransAmt` 和 `verifyStatus`(1/2),空条件不发送;分页放在公共请求头。「查询」「实时查询流水」与「重置」按钮并排放在查询条件区末尾。「实时查询流水」通过独立的 `queryRealtimeFlowApi` 调用 `140504002`,只传公共分页 `pageIndex: 1`、`pageSize: 1`,业务请求体为空;结果仅弹窗提示,不改变表格和分页。
27
+ 独立流水查询页面 `/flow-query` 的普通查询、初次加载、分页和刷新复用核销页的 `queryFlowApi`(`140502002`)与流水模型,读取 `resultList` 和字符串类型的 `totalCount`。查询参数与核销页流水信息保持一致:`tranDate` 必填,默认取 `dcpsRuntime.date`;可选条件为 `busiType`、`orgName`、`payerName`、`payeeName`、`payDirec`(I/O)、`startTransAmt`、`endTransAmt` 和 `verifyStatus`(1/2),空条件不发送;分页放在公共请求头。「查询」「实时查询流水」与「重置」按钮并排放在查询条件区末尾。「实时查询流水」通过独立的 `queryRealtimeFlowApi` 调用 `140504002`,只传公共分页 `pageIndex: 1`、`pageSize: 1`,业务请求体为空;成功提示“操作成功”,失败仅记录控制台,不改变表格和分页。
28
28
 
29
29
  ## 命名约定
30
30
 
@@ -120,8 +120,6 @@ const pendingDecision = ref<Decision | null>(null) // 正在提交的操作:ap
120
120
  const tableSettings = ref<TableSettings>({ size: 'small', stripe: true, border: true, headerBackground: true })
121
121
  // 分页设置:右对齐,可选每页 10、20、50 条。
122
122
  const paginationOptions: PaginationOptions = { align: 'right', background: false, pageSizes: [10, 20, 50] }
123
- // 提取异常提示;error 为捕获到的请求或处理异常。
124
- const getErrorMessage = (error: unknown) => error instanceof Error ? error.message : '请求失败,请稍后重试'
125
123
  // 判断 task 是否可审批:必须处于待审批状态,且平台流水号有效。
126
124
  const canApprove = (task?: any) => task?.taskSts === '01' && !!task.platfSeqNo?.trim()
127
125
  // 将状态码 status 转为中文名称,未识别的状态保留原值。
@@ -312,7 +310,7 @@ const loadList = async () => {
312
310
  if (currentRequestId !== requestId) return
313
311
  rows.value = []
314
312
  Object.assign(pagination, { current: 1, total: 0 })
315
- ElMessage.error(getErrorMessage(error))
313
+ console.error('[查询数字人民币授权任务]', error)
316
314
  } finally {
317
315
  if (currentRequestId === requestId) loading.value = false
318
316
  }
@@ -389,11 +387,11 @@ const submitDecision = async (decision: Decision) => {
389
387
  if (head?.retCode !== '00000') {
390
388
  throw new Error(head?.retMsg || '授权操作失败')
391
389
  }
392
- ElMessage.success(decision === 'approve' ? '授权已通过' : '已拒绝该授权申请')
390
+ ElMessage.success('操作成功')
393
391
  dialogVisible.value = false
394
392
  await loadList()
395
393
  } catch (error) { // error 为审批请求或业务处理失败信息。
396
- if (!disposed) ElMessage.error(getErrorMessage(error))
394
+ if (!disposed) console.error('[数字人民币授权审批]', error)
397
395
  } finally {
398
396
  pendingDecision.value = null
399
397
  }
@@ -17,7 +17,8 @@ const tableSize = 'small'
17
17
  // 历史预计调拨金额接口(140503004)预填金额,允许手工调整后重新匡算。
18
18
  // 匡算结果(140503001)以合并单元格的头寸匡算表展示,样式与业务原型一致;
19
19
  // 「今日预计调拨金额」行的收入、支付单元格就是查询条件输入框,随历史记录预填;
20
- // 导出按钮暂未接线(下载协议待确认);单击可查看明细的金额单元格按位置编码查询详情(140503003)。
20
+ // 导出与查询共用参数收集及校验,点击导出暂在控制台打印参数;
21
+ // 单击可查看明细的金额单元格按位置编码查询详情(140503003)。
21
22
 
22
23
  // 金额字段编码与图中报表位置的对应关系:
23
24
  // C3 数币账户昨日余额;C6/D6 报备金额;C7/D7 未核销金额;
@@ -40,13 +41,6 @@ const cellLabels: Record<string, string> = {
40
41
 
41
42
  // ---------- 页面内工具函数 ----------
42
43
 
43
- /** 提取可展示的错误信息;无法识别时给出统一提示。 */
44
- const getErrorMessage = (error: unknown): string => {
45
- if (error instanceof Error && error.message.trim()) return error.message
46
- if (typeof error === 'string' && error.trim()) return error
47
- return '操作失败,请稍后重试'
48
- }
49
-
50
44
  /** 判断是否为合法的 YYYYMMDD 日期。 */
51
45
  const isValidDate = (value: string): boolean => {
52
46
  if (!/^\d{8}$/.test(value)) return false
@@ -86,13 +80,9 @@ const formatAmount = (value?: string): string => {
86
80
  return `${negative ? '-' : ''}${grouped}.${fraction.padEnd(2, '0')}`
87
81
  }
88
82
 
89
- /**
90
- * 按各项系数精确计算金额合计;任一金额无法解析时返回空字符串。
91
- * emptyAsZero 为 true 时空文本按 0 参与计算(用于输入框的实时轧差)。
92
- */
93
- const calcTotalAmount = (terms: Array<[string, 1 | -1]>, emptyAsZero = false): string => {
83
+ /** 按各项系数精确计算金额合计;任一金额为空或无法解析时返回空字符串。 */
84
+ const calcTotalAmount = (terms: Array<[string, 1 | -1]>): string => {
94
85
  const parse = (value: string) => {
95
- if (!value?.trim() && emptyAsZero) value = '0'
96
86
  const normalized = normalizeAmount(value)
97
87
  if (!normalized) return null
98
88
  const negative = normalized.startsWith('-')
@@ -119,8 +109,8 @@ const calcTotalAmount = (terms: Array<[string, 1 | -1]>, emptyAsZero = false): s
119
109
  }
120
110
 
121
111
  /** 计算轧差(收入减支出),与报表合计共用精确金额运算。 */
122
- const calcGapAmount = (inAmt: string, outAmt: string, emptyAsZero = false): string =>
123
- calcTotalAmount([[inAmt, 1], [outAmt, -1]], emptyAsZero)
112
+ const calcGapAmount = (inAmt: string, outAmt: string): string =>
113
+ calcTotalAmount([[inAmt, 1], [outAmt, -1]])
124
114
 
125
115
  /** 收支方向字典:I 来账、O 往账。 */
126
116
  const payDirecLabels: Record<string, string> = { I: '来账', O: '往账' }
@@ -201,19 +191,20 @@ const gapText = (inPosition: string, outPosition: string): string => {
201
191
  return calcGapAmount(amountOf(inPosition), amountOf(outPosition))
202
192
  }
203
193
 
204
- /** 今日预计调拨金额行的实时轧差:随输入即时计算,空输入按 0 参与计算。 */
194
+ /** 今日预计调拨金额行的实时轧差:随输入即时计算,任一输入为空时留空。 */
205
195
  const inputGapText = computed(() =>
206
- calcGapAmount(queryForm.predictAllotInAmt, queryForm.predictAllotOutAmt, true))
196
+ calcGapAmount(queryForm.predictAllotInAmt, queryForm.predictAllotOutAmt))
207
197
 
208
198
  /** 数币账户预留金额 C12 = C3 + C6 - D6 + C8 - D8 + (C11 - D11),随调拨输入实时更新。 */
209
199
  const reservedBalanceText = computed(() =>
210
200
  calcTotalAmount([[openingBalanceText.value, 1], [inputGapText.value, 1]]))
211
201
 
212
- /** 校验金额文本:须为不小于 0、最多两位小数的十进制金额;返回错误提示文本。 */
202
+ /** 提交时校验金额:不能为空,允许负数,最多保留两位小数。 */
213
203
  const checkAmount = (value: string): string => {
204
+ if (!value.trim()) return '请输入预计调拨金额'
214
205
  const normalized = normalizeAmount(value)
215
- if (!normalized || normalized.startsWith('-') || (normalized.split('.')[1]?.length || 0) > 2) {
216
- return '须为不小于 0 的金额,最多保留两位小数'
206
+ if (!normalized || (normalized.split('.')[1]?.length || 0) > 2) {
207
+ return '请输入有效金额,允许负数,最多保留两位小数'
217
208
  }
218
209
  return ''
219
210
  }
@@ -253,7 +244,7 @@ const prefillHistory = async () => {
253
244
  formError.predictAllotOutAmt = ''
254
245
  } catch (error) { // error 为历史接口请求或响应数据校验异常。
255
246
  if (currentRequestId !== prefillRequestId || disposed) return
256
- ElMessage.error(getErrorMessage(error))
247
+ console.error('[查询历史预计调拨金额]', error)
257
248
  } finally {
258
249
  if (currentRequestId === prefillRequestId) prefilling.value = false
259
250
  }
@@ -268,7 +259,7 @@ const onDateChange = () => {
268
259
  void prefillHistory()
269
260
  }
270
261
 
271
- /** 匡算查询:成功后展示头寸匡算表,失败时清空结果并提示错误。 */
262
+ /** 匡算查询:成功后展示头寸匡算表,失败时清空结果并记录异常。 */
272
263
  const submitQuery = async () => {
273
264
  if (querying.value) return
274
265
  const params = collectQueryParams()
@@ -287,22 +278,31 @@ const submitQuery = async () => {
287
278
  } catch (error) { // error 为查询请求或响应数据校验异常。
288
279
  amounts.value = null
289
280
  lastQueryParams.value = null
290
- ElMessage.error(getErrorMessage(error))
281
+ console.error('[查询数字人民币头寸匡算]', error)
291
282
  } finally {
292
283
  querying.value = false
293
284
  }
294
285
  }
295
286
 
287
+ /** 导出:复用查询参数及校验,暂在控制台打印待提交的参数。 */
288
+ const submitExport = () => {
289
+ const params = collectQueryParams()
290
+ if (!params) return
291
+ console.log('[导出数字人民币头寸匡算参数]', params)
292
+ }
293
+
296
294
  // ---------- 单元格明细弹窗 ----------
297
295
 
298
296
  // 弹窗状态:cell 为被单击的报表单元格;明细请求在弹窗打开时发起。
299
297
  const detailVisible = ref(false)
300
298
  const detailCell = ref<EstimationCell | null>(null)
299
+ // 报备金额、未核销金额仅展示预报;未核销业务流水仅展示流水。
300
+ const showPredDetail = computed(() => ['C6', 'C7', 'D6', 'D7'].includes(detailCell.value?.position || ''))
301
+ const showTranDetail = computed(() => ['C8', 'D8'].includes(detailCell.value?.position || ''))
301
302
  const detailPredList = ref<EstimationPredRow[]>([])
302
303
  const detailTranList = ref<EstimationTranRow[]>([])
303
304
  const detailTotalCount = ref('')
304
305
  const detailLoading = ref(false)
305
- const detailHasError = ref(false)
306
306
  let detailRequestId = 0
307
307
 
308
308
  /** 查询单元格明细;cell 或交易日期缺失时不发起请求,直接呈现空态。 */
@@ -321,14 +321,12 @@ const loadDetailInfo = async () => {
321
321
  detailPredList.value = Array.isArray(body?.predList) ? body.predList : []
322
322
  detailTranList.value = Array.isArray(body?.tranList) ? body.tranList : []
323
323
  detailTotalCount.value = String(body?.totalCount ?? '').trim()
324
- detailHasError.value = false
325
324
  } catch (error) { // error 为详情请求或响应数据校验异常。
326
325
  if (currentRequestId !== detailRequestId || disposed) return
327
326
  detailPredList.value = []
328
327
  detailTranList.value = []
329
328
  detailTotalCount.value = ''
330
- detailHasError.value = true
331
- ElMessage.error(getErrorMessage(error))
329
+ console.error('[查询数字人民币头寸匡算明细]', error)
332
330
  } finally {
333
331
  if (currentRequestId === detailRequestId) detailLoading.value = false
334
332
  }
@@ -341,7 +339,6 @@ const closeDetail = () => {
341
339
  detailPredList.value = []
342
340
  detailTranList.value = []
343
341
  detailTotalCount.value = ''
344
- detailHasError.value = false
345
342
  detailLoading.value = false
346
343
  }
347
344
 
@@ -352,10 +349,12 @@ const openDetail = (cell?: EstimationCell) => {
352
349
  detailVisible.value = true
353
350
  }
354
351
 
355
- /** 合并预报、流水列表得到明细总条数;接口 totalCount 缺失时按列表长度兜底展示。 */
352
+ /** 明细总条数优先使用接口 totalCount,缺失时仅统计当前展示的列表。 */
356
353
  const resolveTotal = () => {
357
354
  if (/^\d+$/.test(detailTotalCount.value)) return detailTotalCount.value
358
- return String(detailPredList.value.length + detailTranList.value.length)
355
+ if (showPredDetail.value) return String(detailPredList.value.length)
356
+ if (showTranDetail.value) return String(detailTranList.value.length)
357
+ return '0'
359
358
  }
360
359
 
361
360
  // 页面首次显示时按默认日期预填预计调拨收支金额。
@@ -386,7 +385,7 @@ onBeforeUnmount(() => {
386
385
  />
387
386
  </div>
388
387
  <el-button type="primary" :loading="querying" @click="submitQuery">查询</el-button>
389
- <el-button>导出</el-button>
388
+ <el-button @click="submitExport">导出</el-button>
390
389
  </div>
391
390
  </el-card>
392
391
 
@@ -493,7 +492,6 @@ onBeforeUnmount(() => {
493
492
  <el-input
494
493
  v-model="queryForm.predictAllotInAmt"
495
494
  class="report-input"
496
- inputmode="decimal"
497
495
  placeholder="输入调拨收入金额"
498
496
  :maxlength="40"
499
497
  @input="formError.predictAllotInAmt = ''"
@@ -504,7 +502,6 @@ onBeforeUnmount(() => {
504
502
  <el-input
505
503
  v-model="queryForm.predictAllotOutAmt"
506
504
  class="report-input"
507
- inputmode="decimal"
508
505
  placeholder="输入调拨支出金额"
509
506
  :maxlength="40"
510
507
  @input="formError.predictAllotOutAmt = ''"
@@ -546,7 +543,7 @@ onBeforeUnmount(() => {
546
543
  </div>
547
544
  </el-card>
548
545
 
549
- <!-- 单元格明细弹窗:按位置编码查询预报与流水列表。 -->
546
+ <!-- 单元格明细弹窗:按位置编码查询,并仅展示对应的预报或流水列表。 -->
550
547
  <el-dialog
551
548
  v-model="detailVisible"
552
549
  :title="detailCell ? `匡算明细 - ${detailCell.label}` : '匡算明细'"
@@ -580,9 +577,9 @@ onBeforeUnmount(() => {
580
577
  </header>
581
578
 
582
579
  <div v-loading="detailLoading" class="detail-tables">
583
- <!-- 预报信息明细;列表为空时展示统一空态。 -->
584
- <div class="dialog-section-title">预报信息</div>
585
- <el-table :data="detailPredList" :size="tableSize" border max-height="240px" empty-text="暂无预报信息">
580
+ <!-- C6/C7/D6/D7 仅展示预报信息;列表为空时展示统一空态。 -->
581
+ <div v-if="showPredDetail" class="dialog-section-title">预报信息</div>
582
+ <el-table v-if="showPredDetail" :data="detailPredList" :size="tableSize" border max-height="240px" empty-text="暂无预报信息">
586
583
  <el-table-column label="预报流水号" min-width="150" show-overflow-tooltip>
587
584
  <template #default="{ row }">{{ displayText(row.predRefNo) }}</template>
588
585
  </el-table-column>
@@ -618,9 +615,9 @@ onBeforeUnmount(() => {
618
615
  </el-table-column>
619
616
  </el-table>
620
617
 
621
- <!-- 流水信息明细;失败的详情可重新打开弹窗重试。 -->
622
- <div class="dialog-section-title">流水信息</div>
623
- <el-table :data="detailTranList" :size="tableSize" border max-height="240px" empty-text="暂无流水信息">
618
+ <!-- C8/D8 仅展示流水信息;失败的详情可重新打开弹窗重试。 -->
619
+ <div v-if="showTranDetail" class="dialog-section-title">流水信息</div>
620
+ <el-table v-if="showTranDetail" :data="detailTranList" :size="tableSize" border max-height="240px" empty-text="暂无流水信息">
624
621
  <el-table-column label="交易参考号" min-width="150" show-overflow-tooltip>
625
622
  <template #default="{ row }">{{ displayText(row.refNo) }}</template>
626
623
  </el-table-column>
@@ -653,7 +650,6 @@ onBeforeUnmount(() => {
653
650
  </el-table-column>
654
651
  </el-table>
655
652
 
656
- <div v-if="detailHasError" class="detail-retry">详情查询失败,关闭弹窗后重新打开可重试。</div>
657
653
  </div>
658
654
  </div>
659
655
  </el-scrollbar>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { onBeforeUnmount, onMounted, reactive, ref } from 'vue'
3
- import { ElMessage, ElMessageBox } from 'element-plus'
3
+ import { ElMessage } from 'element-plus'
4
4
  import API from './api'
5
5
  import { dcpsRuntime } from '../runtime'
6
6
  import { transactionStatusLabels as tranStatusLabels } from '../dictionaries'
@@ -36,12 +36,6 @@ const readPage = (body: Tam140502002OutBody | null, pageSize: number): FlowPage
36
36
  return { data: body.resultList, total, lastPage: Math.max(1, Math.ceil(total / pageSize)) }
37
37
  }
38
38
 
39
- const getErrorMessage = (error: unknown): string => {
40
- if (error instanceof Error && error.message.trim()) return error.message
41
- if (typeof error === 'string' && error.trim()) return error
42
- return '流水查询失败,请稍后重试'
43
- }
44
-
45
39
  /** 仅用字符串处理金额,不做浮点转换或舍入。 */
46
40
  const formatAmount = (value?: string): string => {
47
41
  const original = value?.trim() || ''
@@ -157,7 +151,6 @@ const flowPagination = reactive({ current: 1, size: 15, total: 0 })
157
151
  const flowPaginationOptions: PaginationOptions = { align: 'right', pageSizes: [15, 30, 50, 100], background: false }
158
152
  const flowTableSettings = ref<TableSettings>({ size: 'small', stripe: true, border: true, headerBackground: true })
159
153
  const flowLoading = ref(false)
160
- const flowQueryError = ref('')
161
154
  let flowRequestId = 0
162
155
 
163
156
  /** 流水字段与核销页面共用接口模型。 */
@@ -204,7 +197,6 @@ const loadFlowList = async () => {
204
197
  const pageSize = flowPagination.size
205
198
  let pageIndex = flowPagination.current
206
199
  flowLoading.value = true
207
- flowQueryError.value = ''
208
200
  try {
209
201
  for (let attempt = 0; attempt < 2; attempt += 1) {
210
202
  const response = await API.queryFlowApi({ ...query, pageIndex, pageSize }) as any
@@ -226,7 +218,7 @@ const loadFlowList = async () => {
226
218
  if (disposed || currentId !== flowRequestId) return
227
219
  flowRows.value = []
228
220
  flowPagination.total = 0
229
- flowQueryError.value = getErrorMessage(error)
221
+ console.error('[数字人民币流水查询]', error)
230
222
  } finally {
231
223
  if (!disposed && currentId === flowRequestId) flowLoading.value = false
232
224
  }
@@ -284,7 +276,7 @@ const changeFlowPage = (current: number, size = flowPagination.size) => {
284
276
 
285
277
  const realtimeChecking = ref(false)
286
278
 
287
- /** 「实时查询流水」仅调用 140504002 确认实时链路;返回成功后弹窗提示,不改动表格与分页。 */
279
+ /** 「实时查询流水」仅调用 140504002 确认实时链路;成功提示操作成功,失败仅记录控制台,不改动表格与分页。 */
288
280
  const checkRealtimeFlow = async () => {
289
281
  if (disposed || realtimeChecking.value) return
290
282
  realtimeChecking.value = true
@@ -294,10 +286,10 @@ const checkRealtimeFlow = async () => {
294
286
  if (response?.head?.retCode !== '00000') {
295
287
  throw new Error(response?.head?.retMsg?.trim() || '实时查询流水失败')
296
288
  }
297
- ElMessageBox.alert('操作成功', '提示', { type: 'success', confirmButtonText: '确定' }).catch(() => {})
289
+ ElMessage.success('操作成功')
298
290
  } catch (error) {
299
291
  if (disposed) return
300
- ElMessageBox.alert(getErrorMessage(error), '提示', { type: 'error', confirmButtonText: '确定' }).catch(() => {})
292
+ console.error('[实时查询数字人民币流水]', error)
301
293
  } finally {
302
294
  if (!disposed) realtimeChecking.value = false
303
295
  }
@@ -359,10 +351,6 @@ onBeforeUnmount(() => {
359
351
  </el-form>
360
352
  </el-card>
361
353
 
362
- <el-alert v-if="flowQueryError" :title="flowQueryError" type="error" show-icon :closable="false">
363
- <el-button link type="primary" :disabled="flowLoading" @click="void loadFlowList()">重新查询</el-button>
364
- </el-alert>
365
-
366
354
  <!-- 流水表格:查询与核销页面共用接口,实时查询按钮单独触发实时链路。 -->
367
355
  <div class="table-region">
368
356
  <ArtDataTable
@@ -377,7 +365,7 @@ onBeforeUnmount(() => {
377
365
  :pagination="flowPagination"
378
366
  :pagination-options="flowPaginationOptions"
379
367
  row-key="refNo"
380
- :empty-text="flowQueryError ? '查询失败,请重新查询' : '暂无符合条件的流水信息'"
368
+ empty-text="暂无符合条件的流水信息"
381
369
  @pagination:current-change="changeFlowPage"
382
370
  @pagination:size-change="(size: number) => changeFlowPage(1, size)"
383
371
  @refresh="void loadFlowList()"
@@ -60,7 +60,7 @@ const ensureSuccess = <T,>(response: any, fallback: string): T | null => {
60
60
  return response.body
61
61
  }
62
62
 
63
- /** 提取可展示的错误信息;无法识别时给出统一提示。 */
63
+ /** 提取内部错误状态,供重试入口和表单保护使用。 */
64
64
  const getErrorMessage = (error: unknown): string => {
65
65
  if (error instanceof Error && error.message.trim()) return error.message
66
66
  if (typeof error === 'string' && error.trim()) return error
@@ -312,6 +312,7 @@ const loadList = async () => {
312
312
  listRows.value = []
313
313
  listPagination.total = 0
314
314
  listQueryError.value = getErrorMessage(error)
315
+ console.error('[查询数字人民币头寸预报]', error)
315
316
  } finally {
316
317
  if (!disposed && currentId === listRequestId) listLoading.value = false
317
318
  }
@@ -388,10 +389,10 @@ async function deleteRecords(records: ForecastRow[]) {
388
389
  if (disposed) return
389
390
  ensureSuccess(await API.deleteApi(references) as any, '删除预报失败')
390
391
  if (disposed) return
391
- ElMessage.success('删除请求已处理')
392
+ ElMessage.success('操作成功')
392
393
  await loadList()
393
394
  } catch (error) {
394
- if (!disposed && error !== 'cancel' && error !== 'close') ElMessage.error(getErrorMessage(error))
395
+ if (!disposed && error !== 'cancel' && error !== 'close') console.error('[删除数字人民币头寸预报]', error)
395
396
  } finally {
396
397
  if (!disposed) listMutation.value = null
397
398
  }
@@ -413,9 +414,9 @@ const exportRecords = async () => {
413
414
  document.body.appendChild(link)
414
415
  link.click()
415
416
  link.remove()
416
- ElMessage.success('预报文件已生成')
417
+ ElMessage.success('操作成功')
417
418
  } catch (error) {
418
- if (!disposed) ElMessage.error(getErrorMessage(error))
419
+ if (!disposed) console.error('[导出数字人民币头寸预报]', error)
419
420
  } finally {
420
421
  if (!disposed) listMutation.value = null
421
422
  }
@@ -489,6 +490,7 @@ const editorLoading = ref(false) // 读取修改前的原始数据。
489
490
  let editorRequestId = 0 // 切换记录或关闭视图后,旧详情请求不再回填表单。
490
491
  const submitting = ref(false) // 提交新增或修改。
491
492
  const loadError = ref('')
493
+ const editorLoadErrorIsLocal = ref(false)
492
494
  const initialValues = ref<Partial<ForecastFormValues>>({})
493
495
  const requiredFields = new Set<FieldKey>(['payDirec', 'busiType', 'tranDate', 'predAmt'])
494
496
  const editorDisabled = computed(() => editorLoading.value || submitting.value)
@@ -550,11 +552,13 @@ const loadEditorDetail = async () => {
550
552
  && editorPredRefNo.value === predRefNo
551
553
  if (!predRefNo) {
552
554
  editorLoading.value = false
555
+ editorLoadErrorIsLocal.value = true
553
556
  loadError.value = '预报流水号缺失,无法修改'
554
557
  return
555
558
  }
556
559
  editorLoading.value = true
557
560
  loadError.value = ''
561
+ editorLoadErrorIsLocal.value = false
558
562
  try {
559
563
  const cachedRow = recallForecastRow(predRefNo)
560
564
  const detailRow: ForecastRow = { ...cachedRow, predRefNo }
@@ -565,7 +569,10 @@ const loadEditorDetail = async () => {
565
569
  initialValues.value = nextValues
566
570
  initializeForm()
567
571
  } catch (error) {
568
- if (isCurrentRequest()) loadError.value = getErrorMessage(error)
572
+ if (isCurrentRequest()) {
573
+ loadError.value = getErrorMessage(error)
574
+ console.error('[加载数字人民币头寸预报编辑信息]', error)
575
+ }
569
576
  } finally {
570
577
  if (isCurrentRequest()) editorLoading.value = false
571
578
  }
@@ -578,6 +585,7 @@ watch([editorDialogVisible, editorDialogPredRefNo, editorDialogMode], ([visible]
578
585
  if (!visible) return
579
586
  initialValues.value = {}
580
587
  loadError.value = ''
588
+ editorLoadErrorIsLocal.value = false
581
589
  initializeForm()
582
590
  if (editorMode.value === 'edit') void loadEditorDetail()
583
591
  }, { flush: 'sync' })
@@ -616,7 +624,10 @@ const submit = async () => {
616
624
  if (body.predAmt) body.predAmt = normalizeAmount(body.predAmt)
617
625
  ensureSuccess(await API.addApi(body) as any, '新增预报失败')
618
626
  } else {
619
- if (!editorPredRefNo.value) throw new Error('预报流水号缺失,无法修改')
627
+ if (!editorPredRefNo.value) {
628
+ formError.value = '预报流水号缺失,无法修改'
629
+ return
630
+ }
620
631
  const body: ForecastEditBody = { predRefSeq: editorPredRefNo.value }
621
632
  for (const key of editableFields) {
622
633
  const value = values[key]?.trim() || ''
@@ -626,14 +637,17 @@ const submit = async () => {
626
637
  const customerReference = values.custInfoSeq.trim()
627
638
  if (customerReference) body.custRefSeq = customerReference
628
639
  if (body.predAmt) body.predAmt = normalizeAmount(body.predAmt)
629
- if (Object.keys(body).length === 1) throw new Error('请先修改预报内容')
640
+ if (Object.keys(body).length === 1) {
641
+ formError.value = '请先修改预报内容'
642
+ return
643
+ }
630
644
  ensureSuccess(await API.editApi(body) as any, '修改预报失败')
631
645
  }
632
646
  if (disposed) return
633
- ElMessage.success(editorMode.value === 'create' ? '新增请求已处理' : '修改请求已处理')
647
+ ElMessage.success('操作成功')
634
648
  backToList()
635
649
  } catch (error) {
636
- if (!disposed) ElMessage.error(getErrorMessage(error))
650
+ if (!disposed) console.error(editorMode.value === 'create' ? '[新增数字人民币头寸预报]' : '[修改数字人民币头寸预报]', error)
637
651
  } finally {
638
652
  if (!disposed) submitting.value = false
639
653
  }
@@ -710,7 +724,10 @@ const loadDetail = async () => {
710
724
  const result = await fetchDetail(detailRow.value)
711
725
  if (!disposed) detail.value = result
712
726
  } catch (requestError) {
713
- if (!disposed) detailError.value = getErrorMessage(requestError)
727
+ if (!disposed) {
728
+ detailError.value = getErrorMessage(requestError)
729
+ console.error('[查询数字人民币头寸预报详情]', requestError)
730
+ }
714
731
  } finally {
715
732
  if (!disposed) detailLoading.value = false
716
733
  }
@@ -740,10 +757,11 @@ watch([detailDialogVisible, detailDialogPredRefNo], ([visible]) => {
740
757
  <el-card class="editor-card" shadow="never" :body-style="{ padding: '12px 16px' }">
741
758
  <div class="editor-body">
742
759
  <div v-loading="editorLoading" class="editor-scroll">
743
- <el-alert v-if="loadError" class="editor-load-error" :title="loadError" type="error" show-icon :closable="false">
760
+ <div v-if="loadError" class="editor-load-error">
761
+ <el-alert v-if="editorLoadErrorIsLocal" :title="loadError" type="error" show-icon :closable="false" />
744
762
  <el-button link type="primary" :disabled="editorDisabled" @click="loadEditorDetail">重新加载</el-button>
745
763
  <el-button link type="primary" :disabled="editorDisabled" @click="backToList">返回列表</el-button>
746
- </el-alert>
764
+ </div>
747
765
  <template v-else>
748
766
  <p class="editor-note">金额单位为元;业务类型按接口提供的选项选择,其他未提供字典的字段按业务代码填写。</p>
749
767
  <el-form :model="form" label-position="top" :disabled="editorDisabled" @submit.prevent="submit">
@@ -840,8 +858,7 @@ watch([detailDialogVisible, detailDialogPredRefNo], ([visible]) => {
840
858
  </el-card>
841
859
  <el-card class="detail-card" shadow="never" :body-style="{ padding: '12px 16px' }">
842
860
  <div v-loading="detailLoading" class="detail-scroll">
843
- <div v-if="detailError" class="detail-error" role="alert">
844
- <el-alert :title="detailError" type="error" :closable="false" show-icon />
861
+ <div v-if="detailError" class="detail-error">
845
862
  <el-button :disabled="detailLoading" @click="loadDetail">重新加载</el-button>
846
863
  </div>
847
864
  <div v-else-if="detail" class="detail-content">
@@ -901,9 +918,9 @@ watch([detailDialogVisible, detailDialogPredRefNo], ([visible]) => {
901
918
  </el-form>
902
919
  </el-card>
903
920
 
904
- <el-alert v-if="listQueryError" :title="listQueryError" type="error" show-icon :closable="false">
921
+ <div v-if="listQueryError">
905
922
  <el-button link type="primary" :disabled="listBusy" @click="loadList">重新查询</el-button>
906
- </el-alert>
923
+ </div>
907
924
 
908
925
  <div class="forecast-table-region">
909
926
  <ArtDataTable
@@ -920,7 +937,7 @@ watch([detailDialogVisible, detailDialogPredRefNo], ([visible]) => {
920
937
  :pagination="listPagination"
921
938
  :pagination-options="listPaginationOptions"
922
939
  row-key="predRefNo"
923
- :empty-text="listQueryError ? '查询失败,请重新查询' : '暂无符合条件的预报记录'"
940
+ empty-text="暂无符合条件的预报记录"
924
941
  @selection-change="(selection: ForecastRow[]) => listSelectedRows = selection"
925
942
  @pagination:current-change="changeListPage"
926
943
  @pagination:size-change="(size: number) => changeListPage(1, size)"
@@ -13,8 +13,6 @@ const lastQueryTime = ref('')
13
13
  let requestId = 0 // 只处理最新一次查询的响应。
14
14
  let disposed = false
15
15
 
16
- const getErrorMessage = (error: unknown) => error instanceof Error ? error.message : '请求失败,请稍后重试'
17
-
18
16
  // 时间转为本地显示,无效时间保留原文。
19
17
  const formatDateTime = (value?: string) => {
20
18
  if (!value?.trim()) return '—'
@@ -78,11 +76,11 @@ const submitCreate = async () => {
78
76
  if (head?.retCode !== '00000') {
79
77
  throw new Error(head?.retMsg || '提交失败')
80
78
  }
81
- ElMessage.success(head.retMsg || '注资/预注资发起已提交')
79
+ ElMessage.success('操作成功')
82
80
  dialogVisible.value = false
83
81
  void query()
84
82
  } catch (error) {
85
- if (!disposed) ElMessage.error(getErrorMessage(error))
83
+ if (!disposed) console.error('[发起数字人民币注资/预注资]', error)
86
84
  } finally {
87
85
  if (!disposed) pendingCreate.value = false
88
86
  }
@@ -186,7 +184,7 @@ const query = async () => {
186
184
  if (currentRequestId !== requestId) return
187
185
  balance.value = null
188
186
  lastQueryTime.value = ''
189
- ElMessage.error(getErrorMessage(error))
187
+ console.error('[查询数字人民币账户余额]', error)
190
188
  } finally {
191
189
  if (currentRequestId === requestId) loading.value = false
192
190
  }
@@ -91,8 +91,6 @@ const detailValue = (field: string) => detailValues.value?.[field]?.trim() || '
91
91
  const tableSettings = ref<TableSettings>({ size: 'small', stripe: true, border: true, headerBackground: true })
92
92
  // 分页设置:右对齐,可选每页 10、20、50 条。
93
93
  const paginationOptions: PaginationOptions = { align: 'right', background: false, pageSizes: [10, 20, 50] }
94
- // 提取异常提示;error 为捕获到的请求或处理异常。
95
- const getErrorMessage = (error: unknown) => error instanceof Error ? error.message : '请求失败,请稍后重试'
96
94
  // 将接口时间 value 转为浏览器本地时间,空值显示横线,无效时间保留原文。
97
95
  const formatDateTime = (value?: string) => {
98
96
  if (!value?.trim()) return '—'
@@ -297,7 +295,7 @@ const loadList = async () => {
297
295
  if (currentRequestId !== requestId) return
298
296
  pageRows.value = []
299
297
  Object.assign(pagination, { current: 1, total: 0 })
300
- ElMessage.error(getErrorMessage(error))
298
+ console.error('[查询数字人民币注资明细]', error)
301
299
  } finally {
302
300
  if (currentRequestId === requestId) loading.value = false
303
301
  }
@@ -33,9 +33,6 @@ const createFormValues = (parameter: DigitalRmbParameter = {}): ParameterFormVal
33
33
  remark: parameter.remark ?? '',
34
34
  })
35
35
 
36
- const errorMessage = (error: unknown): string =>
37
- error instanceof Error && error.message.trim() ? error.message : '请求失败,请稍后重试'
38
-
39
36
  const ensureSuccess = (response: any, fallback: string): any => {
40
37
  if (response?.head?.retCode !== '00000') {
41
38
  throw new Error(response?.head?.retMsg?.trim() || fallback)
@@ -72,7 +69,6 @@ const tableSettings = ref<TableSettings>({ size: 'small', stripe: true, border:
72
69
  const tableRef = ref<InstanceType<typeof ArtDataTable> | null>(null)
73
70
  const showSearchBar = ref(true)
74
71
  const listLoading = ref(false)
75
- const listError = ref('')
76
72
  const pendingMutation = ref<Mutation>(null)
77
73
  const writing = computed(() => pendingMutation.value !== null)
78
74
  const listBusy = computed(() => listLoading.value || writing.value)
@@ -107,7 +103,6 @@ const loadList = async () => {
107
103
  const requestId = ++listRequestId
108
104
  const params = { keywords: appliedKeywords || undefined, pageIndex: pagination.current, pageSize: pagination.size }
109
105
  listLoading.value = true
110
- listError.value = ''
111
106
  clearSelection()
112
107
  try {
113
108
  for (let attempt = 0; attempt < 2; attempt += 1) {
@@ -135,8 +130,7 @@ const loadList = async () => {
135
130
  if (disposed || requestId !== listRequestId) return
136
131
  rows.value = []
137
132
  Object.assign(pagination, { current: 1, total: 0 })
138
- listError.value = errorMessage(error)
139
- ElMessage.error(listError.value)
133
+ console.error('[查询数字人民币参数]', error)
140
134
  } finally {
141
135
  if (!disposed && requestId === listRequestId) listLoading.value = false
142
136
  }
@@ -168,7 +162,6 @@ const changePage = (current: number, size = pagination.size) => {
168
162
  // 新增、修改和详情共用弹窗;详情直接使用表格行数据,不再单独请求。
169
163
  const dialogVisible = ref(false)
170
164
  const dialogMode = ref<DialogMode>('create')
171
- const dialogError = ref('')
172
165
  const dialogSource = ref<DigitalRmbParameter | null>(null)
173
166
  const form = ref(createFormValues())
174
167
  const formNameError = ref('')
@@ -180,7 +173,6 @@ const openCreateDialog = () => {
180
173
  dialogSource.value = null
181
174
  form.value = createFormValues()
182
175
  formNameError.value = ''
183
- dialogError.value = ''
184
176
  dialogVisible.value = true
185
177
  }
186
178
 
@@ -190,7 +182,6 @@ const openParameterDialog = (parameter: DigitalRmbParameter, mode: 'edit' | 'det
190
182
  dialogSource.value = { ...parameter }
191
183
  form.value = createFormValues(parameter)
192
184
  formNameError.value = ''
193
- dialogError.value = ''
194
185
  dialogVisible.value = true
195
186
  }
196
187
 
@@ -203,7 +194,6 @@ const submitParameter = async () => {
203
194
  return
204
195
  }
205
196
  formNameError.value = ''
206
- dialogError.value = ''
207
197
  pendingMutation.value = mode
208
198
  try {
209
199
  const response = mode === 'create'
@@ -217,12 +207,12 @@ const submitParameter = async () => {
217
207
  }) as any
218
208
  if (disposed) return
219
209
  ensureSuccess(response, mode === 'create' ? '新增参数失败' : '修改参数失败')
220
- ElMessage.success(response.head.retMsg?.trim() || (mode === 'create' ? '新增请求成功' : '修改请求成功'))
210
+ ElMessage.success('操作成功')
221
211
  dialogVisible.value = false
222
212
  // 写接口不返回记录;重新查询服务端,不在前端伪造保存后的列表。
223
213
  await loadList()
224
214
  } catch (error) {
225
- if (!disposed) dialogError.value = errorMessage(error)
215
+ if (!disposed) console.error(mode === 'create' ? '[新增数字人民币参数]' : '[修改数字人民币参数]', error)
226
216
  } finally {
227
217
  if (!disposed) pendingMutation.value = null
228
218
  }
@@ -231,29 +221,26 @@ const submitParameter = async () => {
231
221
  // 删除名单取操作时的快照,确认后提交参数名称数组,支持单条和批量删除。
232
222
  const deleteDialogVisible = ref(false)
233
223
  const deleteNames = ref<string[]>([])
234
- const deleteError = ref('')
235
224
  const openDeleteDialog = (parameters: DigitalRmbParameter[]) => {
236
225
  if (listBusy.value) return
237
226
  const names = parameters.filter(hasName).map((parameter) => parameter.paraName!)
238
227
  if (!names.length) return
239
228
  deleteNames.value = [...new Set(names)]
240
- deleteError.value = ''
241
229
  deleteDialogVisible.value = true
242
230
  }
243
231
 
244
232
  const submitDelete = async () => {
245
233
  if (writing.value || !deleteDialogVisible.value || !deleteNames.value.length) return
246
234
  pendingMutation.value = 'delete'
247
- deleteError.value = ''
248
235
  try {
249
236
  const response = await API.deleteApi(deleteNames.value) as any
250
237
  if (disposed) return
251
238
  ensureSuccess(response, '删除参数失败')
252
- ElMessage.success(response.head.retMsg?.trim() || '删除请求成功')
239
+ ElMessage.success('操作成功')
253
240
  deleteDialogVisible.value = false
254
241
  await loadList()
255
242
  } catch (error) {
256
- if (!disposed) deleteError.value = errorMessage(error)
243
+ if (!disposed) console.error('[删除数字人民币参数]', error)
257
244
  } finally {
258
245
  if (!disposed) pendingMutation.value = null
259
246
  }
@@ -288,8 +275,6 @@ onBeforeUnmount(() => {
288
275
  </el-form>
289
276
  </el-card>
290
277
 
291
- <el-alert v-if="listError" :title="listError" type="error" show-icon :closable="false" />
292
-
293
278
  <div class="parameter-table-region">
294
279
  <ArtDataTable
295
280
  ref="tableRef"
@@ -303,7 +288,7 @@ onBeforeUnmount(() => {
303
288
  :loading="listBusy"
304
289
  :pagination="pagination"
305
290
  :pagination-options="paginationOptions"
306
- :empty-text="listError ? '查询失败,请重新查询' : '暂无符合条件的参数'"
291
+ empty-text="暂无符合条件的参数"
307
292
  @refresh="refreshList"
308
293
  @pagination:current-change="changePage"
309
294
  @pagination:size-change="(size: number) => changePage(1, size)"
@@ -348,7 +333,6 @@ onBeforeUnmount(() => {
348
333
  :close-on-click-modal="false"
349
334
  :close-on-press-escape="!writing"
350
335
  >
351
- <el-alert v-if="dialogError" class="dialog-error" :title="dialogError" type="error" show-icon :closable="false" />
352
336
  <el-scrollbar :class="{ 'detail-scrollbar': dialogMode === 'detail' }" :max-height="dialogMode === 'detail' ? undefined : 'min(62vh, 620px)'">
353
337
  <div v-if="dialogMode === 'detail'" class="detail-content">
354
338
  <header class="detail-summary">
@@ -431,7 +415,6 @@ onBeforeUnmount(() => {
431
415
  <el-scrollbar max-height="240px">
432
416
  <ul class="delete-list"><li v-for="name in deleteNames" :key="name">{{ name }}</li></ul>
433
417
  </el-scrollbar>
434
- <el-alert v-if="deleteError" class="dialog-error" :title="deleteError" type="error" show-icon :closable="false" />
435
418
  <template #footer>
436
419
  <el-button :disabled="writing" @click="deleteDialogVisible = false">取消</el-button>
437
420
  <el-button type="danger" :loading="pendingMutation === 'delete'" :disabled="writing" @click="submitDelete">确认删除</el-button>
@@ -47,13 +47,6 @@ const readPage = <R extends { resultList?: unknown[]; totalCount?: unknown }>(
47
47
  return { data: body.resultList, total }
48
48
  }
49
49
 
50
- /** 提取可展示的错误信息;无法识别时给出统一提示。 */
51
- const getErrorMessage = (error: unknown): string => {
52
- if (error instanceof Error && error.message.trim()) return error.message
53
- if (typeof error === 'string' && error.trim()) return error
54
- return '操作失败,请稍后重试'
55
- }
56
-
57
50
  /** 判断是否为合法的 YYYYMMDD 日期。 */
58
51
  const isValidDate = (value: string): boolean => {
59
52
  if (!/^\d{8}$/.test(value)) return false
@@ -278,11 +271,11 @@ const submitWriteOff = async () => {
278
271
  mutation.value = 'writeOff'
279
272
  try {
280
273
  ensureSuccess(await API.writeOffApi(tranList.length ? { predList, tranList } : { predList }) as any, '核销提交失败')
281
- ElMessage.success('核销请求已提交')
274
+ ElMessage.success('操作成功')
282
275
  writeOffVisible.value = false
283
276
  await refreshBoth()
284
277
  } catch (error) {
285
- ElMessage.error(getErrorMessage(error))
278
+ console.error('[数字人民币核销]', error)
286
279
  } finally {
287
280
  mutation.value = null
288
281
  }
@@ -343,10 +336,10 @@ const cancelWriteOff = async () => {
343
336
  ? { predList, tranList }
344
337
  : predList.length ? { predList } : { tranList }
345
338
  ensureSuccess(await API.cancelWriteOffApi(payload) as any, '撤销核销提交失败')
346
- ElMessage.success('撤销核销请求已提交')
339
+ ElMessage.success('操作成功')
347
340
  await refreshBoth()
348
341
  } catch (error) {
349
- ElMessage.error(getErrorMessage(error))
342
+ console.error('[撤销数字人民币核销]', error)
350
343
  } finally {
351
344
  mutation.value = null
352
345
  }
@@ -429,7 +422,6 @@ const forecastPaginationOptions: PaginationOptions = { align: 'right', pageSizes
429
422
  const forecastTableSettings = ref<TableSettings>({ size: 'small', stripe: true, border: true, headerBackground: true })
430
423
  const forecastShowSearchBar = ref(true)
431
424
  const forecastLoading = ref(false)
432
- const forecastQueryError = ref('')
433
425
  const forecastTableRef = ref<InstanceType<typeof ArtDataTable> | null>(null)
434
426
  let forecastRequestId = 0
435
427
 
@@ -482,7 +474,6 @@ const loadForecastList = async () => {
482
474
  const pageSize = forecastPagination.size
483
475
  let pageIndex = forecastPagination.current
484
476
  forecastLoading.value = true
485
- forecastQueryError.value = ''
486
477
  predSelection.value = []
487
478
  forecastTableRef.value?.getElTable()?.clearSelection()
488
479
  try {
@@ -504,7 +495,7 @@ const loadForecastList = async () => {
504
495
  if (disposed || currentId !== forecastRequestId) return
505
496
  forecastRows.value = []
506
497
  forecastPagination.total = 0
507
- forecastQueryError.value = getErrorMessage(error)
498
+ console.error('[核销预报查询]', error)
508
499
  } finally {
509
500
  if (!disposed && currentId === forecastRequestId) forecastLoading.value = false
510
501
  }
@@ -597,11 +588,11 @@ const submitEdit = async () => {
597
588
  verifyAmt: amount,
598
589
  }) as any, '修改提交失败')
599
590
  if (disposed) return
600
- ElMessage.success('修改请求已提交')
591
+ ElMessage.success('操作成功')
601
592
  editVisible.value = false
602
593
  await refreshBoth()
603
594
  } catch (error) {
604
- if (!disposed) ElMessage.error(getErrorMessage(error))
595
+ if (!disposed) console.error('[修改数字人民币核销金额]', error)
605
596
  } finally {
606
597
  if (!disposed) editRequesting.value = false
607
598
  }
@@ -658,7 +649,6 @@ const flowPaginationOptions: PaginationOptions = { align: 'right', pageSizes: [1
658
649
  const flowTableSettings = ref<TableSettings>({ size: 'small', stripe: true, border: true, headerBackground: true })
659
650
  const flowShowSearchBar = ref(true)
660
651
  const flowLoading = ref(false)
661
- const flowQueryError = ref('')
662
652
  const flowTableRef = ref<InstanceType<typeof ArtDataTable> | null>(null)
663
653
  let flowRequestId = 0
664
654
 
@@ -709,7 +699,6 @@ const loadFlowList = async () => {
709
699
  const pageSize = flowPagination.size
710
700
  let pageIndex = flowPagination.current
711
701
  flowLoading.value = true
712
- flowQueryError.value = ''
713
702
  flowSelection.value = []
714
703
  flowTableRef.value?.getElTable()?.clearSelection()
715
704
  try {
@@ -731,7 +720,7 @@ const loadFlowList = async () => {
731
720
  if (disposed || currentId !== flowRequestId) return
732
721
  flowRows.value = []
733
722
  flowPagination.total = 0
734
- flowQueryError.value = getErrorMessage(error)
723
+ console.error('[核销流水查询]', error)
735
724
  } finally {
736
725
  if (!disposed && currentId === flowRequestId) flowLoading.value = false
737
726
  }
@@ -857,10 +846,6 @@ onBeforeUnmount(() => {
857
846
  </dl>
858
847
  </el-card>
859
848
 
860
- <el-alert v-if="forecastQueryError" :title="forecastQueryError" type="error" show-icon :closable="false">
861
- <el-button link type="primary" :disabled="busy" @click="loadForecastList">重新查询</el-button>
862
- </el-alert>
863
-
864
849
  <!-- 预报信息表格:勾选行与流水勾选合并提交;行内仅保留修改。 -->
865
850
  <div class="table-region">
866
851
  <ArtDataTable
@@ -877,7 +862,7 @@ onBeforeUnmount(() => {
877
862
  :pagination="forecastPagination"
878
863
  :pagination-options="forecastPaginationOptions"
879
864
  row-key="predRefNo"
880
- :empty-text="forecastQueryError ? '查询失败,请重新查询' : '暂无符合条件的预报信息'"
865
+ empty-text="暂无符合条件的预报信息"
881
866
  @selection-change="predSelection = $event as ForecastRow[]"
882
867
  @pagination:current-change="changeForecastPage"
883
868
  @pagination:size-change="(size: number) => changeForecastPage(1, size)"
@@ -991,10 +976,6 @@ onBeforeUnmount(() => {
991
976
  </el-form>
992
977
  </el-card>
993
978
 
994
- <el-alert v-if="flowQueryError" :title="flowQueryError" type="error" show-icon :closable="false">
995
- <el-button link type="primary" @click="loadFlowList">重新查询</el-button>
996
- </el-alert>
997
-
998
979
  <!-- 流水信息表格:勾选行与预报勾选合并提交核销或撤销核销。 -->
999
980
  <div class="table-region">
1000
981
  <ArtDataTable
@@ -1011,7 +992,7 @@ onBeforeUnmount(() => {
1011
992
  :pagination="flowPagination"
1012
993
  :pagination-options="flowPaginationOptions"
1013
994
  row-key="refNo"
1014
- :empty-text="flowQueryError ? '查询失败,请重新查询' : '暂无符合条件的流水信息'"
995
+ empty-text="暂无符合条件的流水信息"
1015
996
  @selection-change="flowSelection = $event as FlowRow[]"
1016
997
  @pagination:current-change="changeFlowPage"
1017
998
  @pagination:size-change="(size: number) => changeFlowPage(1, size)"