verce-vue-test 0.0.93 → 0.0.95

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.
@@ -26493,6 +26493,7 @@ Tam120206004In
26493
26493
 
26494
26494
  ```json
26495
26495
  {
26496
+ "approveRjctReason": "string",
26496
26497
  "refNos": "string",
26497
26498
  "type": "string"
26498
26499
  }
@@ -26505,6 +26506,7 @@ Tam120206004In.Body
26505
26506
 
26506
26507
  |名称|类型|必选|约束|中文名|说明|
26507
26508
  |---|---|---|---|---|---|
26509
+ |approveRjctReason|string|false|none||拒绝原因|
26508
26510
  |refNos|string|false|none||调拨单号|
26509
26511
  |type|string|false|none||审批结果|
26510
26512
 
@@ -50480,6 +50482,7 @@ Tam140206001Out.Body
50480
50482
  "alocType": "string",
50481
50483
  "amt": "string",
50482
50484
  "amtUsd": "string",
50485
+ "approveRjctReason": "string",
50483
50486
  "ccy": "string",
50484
50487
  "createDept": "string",
50485
50488
  "createDeptCode": "string",
@@ -50510,6 +50513,7 @@ Tam140206001Out.Body.ResultInfo
50510
50513
  |alocType|string|false|none||调拨类型|
50511
50514
  |amt|string|false|none||调拨金额(元)|
50512
50515
  |amtUsd|string|false|none||调拨金额(等值美元)(元)|
50516
+ |approveRjctReason|string|false|none||拒绝原因|
50513
50517
  |ccy|string|false|none||币种|
50514
50518
  |createDept|string|false|none||发起部门|
50515
50519
  |createDeptCode|string|false|none||发起部门|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verce-vue-test",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -77,11 +77,16 @@ export function deleteForeignCurrencyFundAllocation(
77
77
  export function reviewForeignCurrencyFundAllocation(
78
78
  refNo: string,
79
79
  type: ForeignCurrencyFundAllocationReviewType,
80
+ approveRjctReason = '',
80
81
  options?: HttpRequestOptions,
81
82
  ) {
82
83
  return baseHttpClient.post<TamResponse<Record<string, never>>>(
83
84
  FOREIGN_CURRENCY_FUND_ALLOCATION_REVIEW_PATH,
84
- { refNos: refNo, type },
85
+ {
86
+ refNos: refNo,
87
+ type,
88
+ ...(type === 'N' ? { approveRjctReason } : {}),
89
+ },
85
90
  options,
86
91
  )
87
92
  }
@@ -13,7 +13,6 @@ import {
13
13
  Plus,
14
14
  RefreshLeft,
15
15
  Search,
16
- Tickets,
17
16
  } from '@element-plus/icons-vue'
18
17
  import {
19
18
  createForeignCurrencyFundAllocation,
@@ -408,16 +407,33 @@ async function handleReview(
408
407
 
409
408
  const approved = type === 'Y'
410
409
  const actionText = approved ? '通过' : '拒绝'
410
+ let approveRjctReason = ''
411
411
  try {
412
- await ElMessageBox.confirm(
413
- `确认${actionText}调拨记录 ${row.refNo} 吗?`,
414
- `${actionText}确认`,
415
- {
416
- confirmButtonText: `确认${actionText}`,
417
- cancelButtonText: '取消',
418
- type: approved ? 'success' : 'warning',
419
- },
420
- )
412
+ if (approved) {
413
+ await ElMessageBox.confirm(
414
+ `确认通过调拨记录 ${row.refNo} 吗?`,
415
+ '通过确认',
416
+ {
417
+ confirmButtonText: '确认通过',
418
+ cancelButtonText: '取消',
419
+ type: 'success',
420
+ },
421
+ )
422
+ } else {
423
+ const result = await ElMessageBox.prompt(
424
+ `请填写调拨记录 ${row.refNo} 的拒绝原因`,
425
+ '拒绝确认',
426
+ {
427
+ confirmButtonText: '确认拒绝',
428
+ cancelButtonText: '取消',
429
+ type: 'warning',
430
+ inputType: 'textarea',
431
+ inputPlaceholder: '请输入拒绝原因',
432
+ inputValidator: (value) => String(value ?? '').trim() ? true : '请输入拒绝原因',
433
+ },
434
+ )
435
+ approveRjctReason = result.value.trim()
436
+ }
421
437
  } catch {
422
438
  return
423
439
  }
@@ -425,9 +441,13 @@ async function handleReview(
425
441
  const action: RowAction = approved ? 'approve' : 'reject'
426
442
  activeRowAction.value = { refNo: row.refNo, action }
427
443
  try {
428
- const response = await reviewForeignCurrencyFundAllocation(row.refNo, type)
444
+ const response = await reviewForeignCurrencyFundAllocation(row.refNo, type, approveRjctReason)
429
445
  ElMessage.success(response.head.retMsg || `${actionText}成功`)
430
446
  await loadRows()
447
+ const refreshedRecord = records.value.find((item) => item.refNo === row.refNo)
448
+ if (detailRecord.value?.refNo === row.refNo && refreshedRecord) {
449
+ detailRecord.value = refreshedRecord
450
+ }
431
451
  } catch (error) {
432
452
  ElMessage.error(error instanceof Error ? error.message : `外币资金调拨${actionText}失败`)
433
453
  } finally {
@@ -571,11 +591,6 @@ onBeforeUnmount(() => {
571
591
  @row-dblclick="openDetail"
572
592
  >
573
593
  <template #toolbar>
574
- <div class="table-title">
575
- <el-icon><Tickets /></el-icon>
576
- <span>调拨记录</span>
577
- <small>共 {{ totalCount }} 条</small>
578
- </div>
579
594
  <el-button type="primary" size="small" :icon="Plus" @click="openCreate">
580
595
  新增
581
596
  </el-button>
@@ -628,6 +643,14 @@ onBeforeUnmount(() => {
628
643
  </el-tag>
629
644
  </template>
630
645
  </el-table-column>
646
+ <el-table-column
647
+ prop="approveRjctReason"
648
+ label="拒绝原因"
649
+ width="180"
650
+ show-overflow-tooltip
651
+ >
652
+ <template #default="{ row }">{{ row.approveRjctReason || '—' }}</template>
653
+ </el-table-column>
631
654
  <el-table-column prop="fundOpeCent" label="资金运营中心" width="112" align="center" :visible="false">
632
655
  <template #default="{ row }">{{ yesNoLabel(row.fundOpeCent) }}</template>
633
656
  </el-table-column>
@@ -917,6 +940,9 @@ onBeforeUnmount(() => {
917
940
  <el-descriptions-item label="起息日">{{ formatDate(detailRecord.valueDate) }}</el-descriptions-item>
918
941
  <el-descriptions-item label="资金运营中心">{{ yesNoLabel(detailRecord.fundOpeCent) }}</el-descriptions-item>
919
942
  <el-descriptions-item label="自贸区">{{ yesNoLabel(detailRecord.zmqFlag) }}</el-descriptions-item>
943
+ <el-descriptions-item label="拒绝原因" :span="2">
944
+ {{ detailRecord.approveRjctReason || '—' }}
945
+ </el-descriptions-item>
920
946
  </el-descriptions>
921
947
  </section>
922
948
 
@@ -949,6 +975,30 @@ onBeforeUnmount(() => {
949
975
  </el-descriptions>
950
976
  </section>
951
977
  </template>
978
+
979
+ <template v-if="detailRecord && isPendingStatus(detailRecord.status)" #footer>
980
+ <div class="drawer-review-actions">
981
+ <el-button
982
+ type="primary"
983
+ :icon="CircleCheck"
984
+ :loading="isActionLoading(detailRecord, 'approve')"
985
+ :disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'approve')"
986
+ @click="handleReview(detailRecord, 'Y')"
987
+ >
988
+ 确认
989
+ </el-button>
990
+ <el-button
991
+ type="danger"
992
+ plain
993
+ :icon="CircleClose"
994
+ :loading="isActionLoading(detailRecord, 'reject')"
995
+ :disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'reject')"
996
+ @click="handleReview(detailRecord, 'N')"
997
+ >
998
+ 拒绝
999
+ </el-button>
1000
+ </div>
1001
+ </template>
952
1002
  </el-drawer>
953
1003
  </main>
954
1004
  </template>
@@ -1023,9 +1073,6 @@ onBeforeUnmount(() => {
1023
1073
  padding: 8px 14px;
1024
1074
  border-top: 1px solid #e5eaf1;
1025
1075
  }
1026
- .table-title { display: flex; align-items: center; gap: 7px; color: #27364f; font-size: 13px; font-weight: 700; }
1027
- .table-title .el-icon { color: #174ea6; }
1028
- .table-title small { color: #98a2b3; font-size: 11px; font-weight: 400; }
1029
1076
  .allocation-table :deep(.el-table__header th) { height: 40px; padding: 0; font-size: 12px; font-weight: 700; }
1030
1077
  .allocation-table :deep(.el-table__cell) { padding: 6px 0; font-size: 12px; }
1031
1078
  .allocation-table :deep(.el-table__row) { height: 42px; }
@@ -1056,6 +1103,12 @@ onBeforeUnmount(() => {
1056
1103
  font-weight: 700;
1057
1104
  }
1058
1105
  :deep(.allocation-detail-drawer .el-drawer__body) { padding: 18px 20px 28px; }
1106
+ :deep(.allocation-detail-drawer .el-drawer__footer) {
1107
+ padding: 12px 20px 16px;
1108
+ border-top: 1px solid #e4eaf1;
1109
+ }
1110
+ .drawer-review-actions { display: flex; justify-content: flex-end; gap: 8px; }
1111
+ .drawer-review-actions .el-button { min-width: 88px; }
1059
1112
  .drawer-summary {
1060
1113
  display: flex;
1061
1114
  align-items: center;
@@ -22,6 +22,7 @@ export type ForeignCurrencyFundAllocationRow = {
22
22
  alocDate: string
23
23
  valueDate: string
24
24
  status: string
25
+ approveRjctReason: string
25
26
  zmqFlag: string
26
27
  createUser: string
27
28
  createUserCode: string
@@ -116,6 +117,7 @@ export function normalizeFundAllocationRow(
116
117
  alocDate: String(source.alocDate ?? ''),
117
118
  valueDate: String(source.valueDate ?? ''),
118
119
  status: String(source.status ?? ''),
120
+ approveRjctReason: String(source.approveRjctReason ?? ''),
119
121
  zmqFlag: String(source.zmqFlag ?? ''),
120
122
  createUser: String(source.createUser ?? ''),
121
123
  createUserCode: String(source.createUserCode ?? ''),