verce-vue-test 0.0.152 → 0.0.154

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.
@@ -82,7 +82,6 @@
82
82
  "src/views/foreign-currency-position-forecast/components": "外币头寸预报页面组件目录",
83
83
  "src/views/foreign-currency-position-forecast/components/ForeignPositionForecastEditor.vue": "外币头寸预报编辑器组件",
84
84
  "src/views/foreign-currency-position-forecast/currency.ts": "外币头寸预报币种配置与格式化工具",
85
- "src/views/foreign-currency-position-forecast/editor.ts": "外币头寸预报编辑状态与表单辅助逻辑",
86
85
  "src/views/foreign-currency-position-forecast/index.vue": "外币头寸预报列表页面",
87
86
  "src/views/foreign-currency-position-forecast/model.ts": "外币头寸预报数据模型与表格类型",
88
87
  "src/views/foreign-currency-position-forecast/options.ts": "外币头寸预报选项、状态与列配置",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verce-vue-test",
3
- "version": "0.0.152",
3
+ "version": "0.0.154",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -140,6 +140,22 @@ const flowVerifyStatusMap: Record<string, string> = {
140
140
  '1': '未核销',
141
141
  '2': '已核销',
142
142
  }
143
+ const flowPayChannelMap: Record<string, string> = {
144
+ '1': '大额支付',
145
+ '2': '小额支付',
146
+ '3': '票据交换',
147
+ '4': '同城支付',
148
+ '7': '网联支付',
149
+ BEPS: '小额支付',
150
+ HVPS: '大额支付',
151
+ }
152
+ const flowDirectionMap: Record<string, string> = {
153
+ '0': '支出',
154
+ '1': '收入',
155
+ '2': '支出',
156
+ I: '收入',
157
+ O: '支出',
158
+ }
143
159
  const forecastVerifyStatusMap: Record<string, string> = {
144
160
  '1': '未核销',
145
161
  '2': '已核销',
@@ -348,6 +364,18 @@ function formatClientType(value: unknown) {
348
364
  return clientTypeMap[code] ?? (code || '-')
349
365
  }
350
366
 
367
+ /** 将流水表格中的支付渠道编码转换为中文;未知值保留原始内容。 */
368
+ function formatFlowPayChannel(value: unknown) {
369
+ const code = String(value ?? '').trim()
370
+ return flowPayChannelMap[code.toUpperCase()] ?? (code || '-')
371
+ }
372
+
373
+ /** 将流水表格中的收支方向编码转换为中文;未知值保留原始内容。 */
374
+ function formatFlowDirection(value: unknown) {
375
+ const code = String(value ?? '').trim()
376
+ return flowDirectionMap[code.toUpperCase()] ?? (code || '-')
377
+ }
378
+
351
379
  /**
352
380
  * 页面专属的浮层挂载点。
353
381
  * 抽屉和弹窗不再直接挂到 body,避免 Layout 路由切换或 KeepAlive 缓存时遮罩残留在其他页面上。
@@ -862,6 +890,20 @@ function canModifyForecast(row: ForecastInfoRow) {
862
890
  )
863
891
  }
864
892
 
893
+ const selectedForecastRow = computed(() => (
894
+ forecastSelectedRows.value.length === 1 ? forecastSelectedRows.value[0] : null
895
+ ))
896
+ const canModifySelectedForecast = computed(() => (
897
+ Boolean(selectedForecastRow.value && canModifyForecast(selectedForecastRow.value))
898
+ ))
899
+ const modifySelectionTip = computed(() => {
900
+ const selectionCount = forecastSelectedRows.value.length
901
+ if (selectionCount === 0) return '请先选择一条预报信息'
902
+ if (selectionCount > 1) return '修改操作只能选择一条预报信息'
903
+ if (!canModifySelectedForecast.value) return '仅已核销且已核销金额大于预报金额的记录可修改'
904
+ return ''
905
+ })
906
+
865
907
  function handleForecastModify(row: ForecastInfoRow) {
866
908
  editingForecastRow.value = row
867
909
  modifyForm.tranDate = toQueryText(row.tranDate)
@@ -870,6 +912,11 @@ function handleForecastModify(row: ForecastInfoRow) {
870
912
  modifyDialogVisible.value = true
871
913
  }
872
914
 
915
+ function handleSelectedForecastModify() {
916
+ const row = selectedForecastRow.value
917
+ if (row && canModifyForecast(row)) handleForecastModify(row)
918
+ }
919
+
873
920
  function showModifyWarning(message: string) {
874
921
  modifyWarningMessage.value = message
875
922
  modifyWarningVisible.value = true
@@ -1158,7 +1205,7 @@ onBeforeUnmount(() => {
1158
1205
  </div>
1159
1206
  </header>
1160
1207
 
1161
- <!-- 左右布局显示四个常用筛选条件;上下布局追加四个条件。 -->
1208
+ <!-- 左右布局显示三个常用筛选条件;上下布局追加四个条件。 -->
1162
1209
  <div class="forecast-info-filter" :class="{ 'forecast-info-filter--horizontal': cardLayout === 'horizontal' }">
1163
1210
  <div class="forecast-info-filter__grid">
1164
1211
  <label class="forecast-info-filter__item">
@@ -1211,7 +1258,7 @@ onBeforeUnmount(() => {
1211
1258
  </el-select>
1212
1259
  </label>
1213
1260
 
1214
- <label class="forecast-info-filter__item">
1261
+ <label v-if="cardLayout === 'vertical'" class="forecast-info-filter__item">
1215
1262
  <span>核销状态</span>
1216
1263
  <el-select
1217
1264
  v-model="forecastForm.verification"
@@ -1265,11 +1312,6 @@ onBeforeUnmount(() => {
1265
1312
  <span>客户名</span>
1266
1313
  <el-input v-model="forecastForm.clientName" size="small" placeholder="请输入" clearable />
1267
1314
  </label>
1268
-
1269
- <label v-if="cardLayout === 'vertical'" class="forecast-info-filter__item">
1270
- <span>对手名</span>
1271
- <el-input v-model="forecastForm.counterpartyName" size="small" placeholder="请输入" clearable />
1272
- </label>
1273
1315
  </div>
1274
1316
 
1275
1317
  <div class="forecast-info-filter__actions">
@@ -1343,6 +1385,27 @@ onBeforeUnmount(() => {
1343
1385
  >
1344
1386
  匡算
1345
1387
  </el-button>
1388
+ <el-tooltip
1389
+ :content="modifySelectionTip"
1390
+ popper-class="forecast-info-modify-tooltip"
1391
+ placement="top"
1392
+ :show-after="200"
1393
+ :append-to="overlayContainer || undefined"
1394
+ :disabled="canModifySelectedForecast"
1395
+ >
1396
+ <span>
1397
+ <el-button
1398
+ type="primary"
1399
+ plain
1400
+ size="small"
1401
+ :icon="EditPen"
1402
+ :disabled="!canModifySelectedForecast"
1403
+ @click="handleSelectedForecastModify"
1404
+ >
1405
+ 修改
1406
+ </el-button>
1407
+ </span>
1408
+ </el-tooltip>
1346
1409
  <el-button
1347
1410
  type="primary"
1348
1411
  plain
@@ -1406,30 +1469,6 @@ onBeforeUnmount(() => {
1406
1469
  {{ formatClientType(row.clientType) }}
1407
1470
  </template>
1408
1471
  </el-table-column>
1409
- <!-- 已核销且核销金额大于预报金额时才展示修改入口。 -->
1410
- <el-table-column
1411
- prop="operation"
1412
- column-key="operation"
1413
- label="操作"
1414
- :min-width="72"
1415
- align="center"
1416
- fixed="right"
1417
- >
1418
- <template #default="{ row }">
1419
- <div class="forecast-info-row-actions">
1420
- <el-button
1421
- v-if="canModifyForecast(row)"
1422
- type="primary"
1423
- link
1424
- size="small"
1425
- :icon="EditPen"
1426
- @click="handleForecastModify(row)"
1427
- >
1428
- 修改
1429
- </el-button>
1430
- </div>
1431
- </template>
1432
- </el-table-column>
1433
1472
  <template #empty>
1434
1473
  <el-empty description="暂无数据" :image-size="54" />
1435
1474
  </template>
@@ -1776,7 +1815,7 @@ onBeforeUnmount(() => {
1776
1815
  </div>
1777
1816
  </header>
1778
1817
 
1779
- <!-- 左右布局显示四个常用筛选条件;上下布局追加四个条件。 -->
1818
+ <!-- 左右布局显示三个常用筛选条件;上下布局追加四个条件。 -->
1780
1819
  <div class="forecast-info-filter" :class="{ 'forecast-info-filter--horizontal': cardLayout === 'horizontal' }">
1781
1820
  <div class="forecast-info-filter__grid">
1782
1821
  <label class="forecast-info-filter__item">
@@ -1816,7 +1855,7 @@ onBeforeUnmount(() => {
1816
1855
  <el-input v-model="flowForm.payChannel" size="small" placeholder="请输入" clearable />
1817
1856
  </label>
1818
1857
 
1819
- <label class="forecast-info-filter__item">
1858
+ <label v-if="cardLayout === 'vertical'" class="forecast-info-filter__item">
1820
1859
  <span>核销状态</span>
1821
1860
  <el-select
1822
1861
  v-model="flowForm.verifyStatus"
@@ -1857,24 +1896,6 @@ onBeforeUnmount(() => {
1857
1896
  <span>对方户名</span>
1858
1897
  <el-input v-model="flowForm.competName" size="small" placeholder="请输入" clearable />
1859
1898
  </label>
1860
-
1861
- <label v-if="cardLayout === 'vertical'" class="forecast-info-filter__item">
1862
- <span>我方机构</span>
1863
- <el-select
1864
- v-model="flowForm.groundBranch"
1865
- :append-to="overlayContainer || undefined"
1866
- size="small"
1867
- placeholder="请选择"
1868
- clearable
1869
- >
1870
- <el-option
1871
- v-for="option in groundBranchOptions"
1872
- :key="option.value"
1873
- :label="option.label"
1874
- :value="option.value"
1875
- />
1876
- </el-select>
1877
- </label>
1878
1899
  </div>
1879
1900
 
1880
1901
  <div class="forecast-info-filter__actions">
@@ -1951,6 +1972,12 @@ onBeforeUnmount(() => {
1951
1972
  <template v-else-if="column.prop === 'verifyStatus'" #default="{ row }">
1952
1973
  {{ flowVerifyStatusMap[String(row.verifyStatus)] ?? row.verifyStatus ?? '-' }}
1953
1974
  </template>
1975
+ <template v-else-if="column.prop === 'payChannel'" #default="{ row }">
1976
+ {{ formatFlowPayChannel(row.payChannel) }}
1977
+ </template>
1978
+ <template v-else-if="column.prop === 'payDirec'" #default="{ row }">
1979
+ {{ formatFlowDirection(row.payDirec) }}
1980
+ </template>
1954
1981
  </el-table-column>
1955
1982
  <template #empty>
1956
1983
  <el-empty description="暂无数据" :image-size="54" />
@@ -185,7 +185,7 @@
185
185
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter__grid {
186
186
  display: grid;
187
187
  flex: 1 1 auto;
188
- grid-template-columns: repeat(4, minmax(0, 1fr));
188
+ grid-template-columns: repeat(3, minmax(0, 1fr));
189
189
  align-items: center;
190
190
  min-width: 0;
191
191
  column-gap: 10px;
@@ -195,7 +195,7 @@
195
195
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter:not(.forecast-info-filter--horizontal) .forecast-info-filter__grid {
196
196
  flex: 1 1 auto;
197
197
  max-width: none;
198
- grid-template-columns: repeat(8, minmax(0, 1fr));
198
+ grid-template-columns: repeat(7, minmax(0, 1fr));
199
199
  column-gap: 6px;
200
200
  }
201
201
 
@@ -304,7 +304,7 @@
304
304
  font-weight: 600;
305
305
  }
306
306
 
307
- /* 左右卡片状态下保留四个快速筛选项,并与操作按钮保持同一行。 */
307
+ /* 左右卡片状态下保留三个快速筛选项,并与操作按钮保持同一行。 */
308
308
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter--horizontal {
309
309
  display: grid;
310
310
  grid-template-columns: minmax(0, 1fr) auto;
@@ -316,7 +316,7 @@
316
316
 
317
317
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter--horizontal .forecast-info-filter__grid {
318
318
  min-width: 0;
319
- grid-template-columns: repeat(4, minmax(0, 1fr));
319
+ grid-template-columns: repeat(3, minmax(0, 1fr));
320
320
  column-gap: 8px;
321
321
  row-gap: 8px;
322
322
  }
@@ -476,6 +476,12 @@
476
476
  gap: 10px;
477
477
  }
478
478
 
479
+ /* 修改按钮的禁用原因保持单行展示,避免中文提示被折叠成竖向文字。 */
480
+ .forecast-info-modify-tooltip.el-popper {
481
+ max-width: none;
482
+ white-space: nowrap;
483
+ }
484
+
479
485
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-table {
480
486
  border-radius: 4px;
481
487
  overflow: hidden;
@@ -530,15 +536,6 @@
530
536
  margin-top: 10px;
531
537
  }
532
538
 
533
- /* 操作列使用内联布局,预留后续扩展多个行级按钮的空间。 */
534
- .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-row-actions {
535
- display: inline-flex;
536
- align-items: center;
537
- justify-content: center;
538
- gap: 8px;
539
- white-space: nowrap;
540
- }
541
-
542
539
  /* ---- 匡算弹窗:展示预报和流水多选数据的共享汇总。 ---- */
543
540
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-calculation-dialog.el-dialog {
544
541
  max-width: calc(100vw - 32px);
@@ -823,12 +820,12 @@
823
820
  }
824
821
 
825
822
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter__grid {
826
- grid-template-columns: repeat(4, minmax(0, 1fr));
823
+ grid-template-columns: repeat(3, minmax(0, 1fr));
827
824
  column-gap: 8px;
828
825
  }
829
826
 
830
827
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter:not(.forecast-info-filter--horizontal) .forecast-info-filter__grid {
831
- grid-template-columns: repeat(8, minmax(0, 1fr));
828
+ grid-template-columns: repeat(7, minmax(0, 1fr));
832
829
  column-gap: 8px;
833
830
  max-width: none;
834
831
  }
@@ -858,11 +855,11 @@
858
855
 
859
856
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter__grid {
860
857
  flex-basis: 100%;
861
- grid-template-columns: repeat(4, minmax(0, 1fr));
858
+ grid-template-columns: repeat(3, minmax(0, 1fr));
862
859
  }
863
860
 
864
861
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter:not(.forecast-info-filter--horizontal) .forecast-info-filter__grid {
865
- grid-template-columns: repeat(8, minmax(0, 1fr));
862
+ grid-template-columns: repeat(7, minmax(0, 1fr));
866
863
  }
867
864
 
868
865
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter__item {
@@ -883,7 +880,7 @@
883
880
  }
884
881
 
885
882
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter--horizontal .forecast-info-filter__grid {
886
- grid-template-columns: repeat(4, minmax(0, 1fr));
883
+ grid-template-columns: repeat(3, minmax(0, 1fr));
887
884
  }
888
885
 
889
886
  .forecast-info-page[data-page-scope="rmb-position-settlement-forecast-info"] .forecast-info-filter--horizontal .forecast-info-filter__actions {
@@ -112,11 +112,6 @@ export function toFrontendRow(row: any): ForeignPositionForecast {
112
112
  }
113
113
  }
114
114
 
115
- /** 获取 TAM 返回消息,不存在时使用默认文案。 */
116
- function getResponseMessage(payload: any, fallback: string) {
117
- return payload.head?.retMsg || fallback
118
- }
119
-
120
115
  /** 查询指定编号的外币头寸预报详情。 */
121
116
  export async function getForeignPositionForecast(predRefNo: string) {
122
117
  const normalizedPredRefNo = predRefNo.trim()
@@ -136,11 +131,6 @@ export function queryForeignPositionOrganizationTree() {
136
131
  return baseHttpClient.get<any>('/uaa/org/tree')
137
132
  }
138
133
 
139
- export type ForeignPositionAccountBankOption = {
140
- bankAcct: string
141
- bankName: string
142
- }
143
-
144
134
  /** 根据币种、汇款路径和业务类型查询外币预报可用的我方账户行。 */
145
135
  export async function queryForeignPositionAccountBanks(
146
136
  params: any,
@@ -254,7 +244,7 @@ export function approveForeignPositionForecasts(predRefNos: string[], approved:
254
244
  /** 更新指定外币头寸预报的授权状态。 */
255
245
  export async function updateForeignPositionForecastAuthorization(
256
246
  predRefNo: string,
257
- authorization: ForeignPositionForecast['authirization'],
247
+ authorization: any,
258
248
  pageIndex: number,
259
249
  pageSize: number,
260
250
  ) {
@@ -263,11 +253,12 @@ export async function updateForeignPositionForecastAuthorization(
263
253
  {
264
254
  authorization,
265
255
  predRefNos: predRefNo,
266
- pageIndex, pageSize
267
- }
256
+ pageIndex,
257
+ pageSize,
258
+ },
268
259
  )
269
260
 
270
- return getResponseMessage(payload, authorization === '1' ? '授权成功' : '取消授权成功')
261
+ return payload.head?.retMsg || (authorization === '1' ? '授权成功' : '取消授权成功')
271
262
  }
272
263
 
273
264
  /** 按传入参数原样查询外币头寸预报。 */