verce-vue-test 0.0.85 → 0.0.87

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.
@@ -5,20 +5,6 @@
5
5
  gap: 10px;
6
6
  }
7
7
 
8
- .foreign-currency-settlement-page .foreign-currency-settlement-badge {
9
- display: inline-flex;
10
- height: 21px;
11
- align-items: center;
12
- padding: 0 8px;
13
- border: 1px solid #b8d4ff;
14
- border-radius: 999px;
15
- background: #edf5ff;
16
- color: #1767c0;
17
- font-size: 12px;
18
- font-weight: 600;
19
- line-height: 1;
20
- }
21
-
22
8
  .foreign-currency-settlement-page .foreign-currency-settlement-disabled-action {
23
9
  display: inline-flex;
24
10
  }
@@ -57,46 +43,6 @@
57
43
  justify-content: flex-end;
58
44
  }
59
45
 
60
- .foreign-currency-settlement-page .foreign-currency-settlement-column-actions {
61
- display: flex;
62
- align-items: center;
63
- justify-content: space-between;
64
- gap: 12px;
65
- margin-bottom: 18px;
66
- padding-bottom: 14px;
67
- border-bottom: 1px solid #edf1f7;
68
- color: #52647a;
69
- font-size: 13px;
70
- }
71
-
72
- .foreign-currency-settlement-page .foreign-currency-settlement-column-actions > div {
73
- display: flex;
74
- gap: 8px;
75
- }
76
-
77
- .foreign-currency-settlement-page .foreign-currency-settlement-column-actions .el-button + .el-button {
78
- margin-left: 0;
79
- }
80
-
81
- .foreign-currency-settlement-page .foreign-currency-settlement-column-grid {
82
- display: grid;
83
- grid-template-columns: repeat(2, minmax(0, 1fr));
84
- gap: 6px 16px;
85
- }
86
-
87
- .foreign-currency-settlement-page .foreign-currency-settlement-column-grid .el-checkbox {
88
- min-width: 0;
89
- margin-right: 0;
90
- }
91
-
92
- .foreign-currency-settlement-page .foreign-currency-settlement-column-grid .el-checkbox__label {
93
- overflow: hidden;
94
- color: #334155;
95
- font-size: 13px;
96
- text-overflow: ellipsis;
97
- white-space: nowrap;
98
- }
99
-
100
46
  .foreign-currency-settlement-page .foreign-currency-settlement-empty {
101
47
  display: flex;
102
48
  min-height: 126px;
@@ -133,182 +79,3 @@
133
79
  .foreign-currency-settlement-page .foreign-currency-settlement-table .el-table__empty-block {
134
80
  min-height: 150px;
135
81
  }
136
-
137
- .foreign-currency-settlement-page > .foreign-currency-settlement-page-detail {
138
- grid-column: 1 / -1;
139
- grid-row: 1 / -1;
140
- animation: foreign-settlement-detail-enter .18s ease-out;
141
- }
142
-
143
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-toolbar {
144
- display: flex;
145
- flex: 0 0 auto;
146
- align-items: center;
147
- gap: 12px;
148
- margin-top: 12px;
149
- padding: 10px 12px;
150
- border: 1px solid #dce6f2;
151
- border-radius: 6px;
152
- background: linear-gradient(135deg, #f6f9fd 0%, #eef5fd 100%);
153
- }
154
-
155
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-reference {
156
- display: flex;
157
- min-width: 0;
158
- flex: 1 1 auto;
159
- align-items: baseline;
160
- gap: 8px;
161
- }
162
-
163
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-reference span {
164
- flex: 0 0 auto;
165
- color: #68778b;
166
- font-size: 12px;
167
- }
168
-
169
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-reference strong {
170
- overflow: hidden;
171
- color: #1f3653;
172
- font-size: 14px;
173
- font-weight: 700;
174
- letter-spacing: .01em;
175
- text-overflow: ellipsis;
176
- white-space: nowrap;
177
- }
178
-
179
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-scroll {
180
- min-height: 0;
181
- flex: 1 1 auto;
182
- margin-top: 10px;
183
- padding-right: 4px;
184
- overflow: auto;
185
- scrollbar-color: #c4d2e3 transparent;
186
- scrollbar-width: thin;
187
- }
188
-
189
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-section + .foreign-currency-settlement-detail-section {
190
- margin-top: 10px;
191
- }
192
-
193
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-section {
194
- padding: 12px;
195
- border: 1px solid #e2e9f2;
196
- border-radius: 6px;
197
- background: #f8fafc;
198
- }
199
-
200
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-section h3 {
201
- display: flex;
202
- align-items: center;
203
- gap: 7px;
204
- margin: 0 0 10px;
205
- color: #243b57;
206
- font-size: 13px;
207
- font-weight: 700;
208
- }
209
-
210
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-section h3::before {
211
- width: 3px;
212
- height: 13px;
213
- border-radius: 999px;
214
- background: #2878d0;
215
- content: '';
216
- }
217
-
218
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-grid {
219
- display: grid;
220
- grid-template-columns: repeat(3, minmax(0, 1fr));
221
- gap: 8px;
222
- margin: 0;
223
- }
224
-
225
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field {
226
- min-width: 0;
227
- padding: 8px 10px;
228
- border: 1px solid #e4eaf2;
229
- border-radius: 5px;
230
- background: #fff;
231
- }
232
-
233
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field.is-span-2 {
234
- grid-column: span 2;
235
- }
236
-
237
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field.is-span-3 {
238
- grid-column: 1 / -1;
239
- }
240
-
241
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field dt {
242
- margin-bottom: 4px;
243
- color: #7a8798;
244
- font-size: 11px;
245
- font-weight: 500;
246
- }
247
-
248
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field dd {
249
- min-height: 20px;
250
- margin: 0;
251
- overflow-wrap: anywhere;
252
- color: #27384d;
253
- font-size: 13px;
254
- font-weight: 600;
255
- line-height: 20px;
256
- }
257
-
258
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field.is-amount dd {
259
- color: #164f8f;
260
- font-variant-numeric: tabular-nums;
261
- }
262
-
263
- @keyframes foreign-settlement-detail-enter {
264
- from {
265
- opacity: 0;
266
- transform: translateY(4px);
267
- }
268
-
269
- to {
270
- opacity: 1;
271
- transform: translateY(0);
272
- }
273
- }
274
-
275
- @media (max-width: 1100px) {
276
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-grid {
277
- grid-template-columns: repeat(2, minmax(0, 1fr));
278
- }
279
-
280
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field.is-span-3 {
281
- grid-column: 1 / -1;
282
- }
283
- }
284
-
285
- @media (max-width: 900px) {
286
- .foreign-currency-settlement-page .foreign-currency-settlement-badge {
287
- display: none;
288
- }
289
-
290
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-toolbar {
291
- align-items: flex-start;
292
- flex-wrap: wrap;
293
- }
294
-
295
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-reference {
296
- width: 100%;
297
- order: 3;
298
- }
299
-
300
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-grid {
301
- grid-template-columns: minmax(0, 1fr);
302
- }
303
-
304
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field.is-span-2,
305
- .foreign-currency-settlement-page .foreign-currency-settlement-detail-field.is-span-3 {
306
- grid-column: auto;
307
- }
308
- }
309
-
310
- @media (prefers-reduced-motion: reduce) {
311
- .foreign-currency-settlement-page > .foreign-currency-settlement-page-detail {
312
- animation: none;
313
- }
314
- }
@@ -17,17 +17,14 @@ import {
17
17
  } from 'vue'
18
18
  import { onBeforeRouteLeave, useRoute } from 'vue-router'
19
19
  import { Grid, Menu } from '@element-plus/icons-vue'
20
- import ForeignSettlementDetailView from './components/ForeignSettlementDetailView.vue'
21
20
  import ForeignSettlementFlowPanel from './components/ForeignSettlementFlowPanel.vue'
22
21
  import ForeignSettlementForecastPanel from './components/ForeignSettlementForecastPanel.vue'
23
- import { flowDetailGroups, forecastDetailGroups } from './options'
24
22
  import type {
25
23
  ForeignSettlementCardLayout,
26
- ForeignSettlementFlowRow,
27
- ForeignSettlementForecastRow,
28
24
  ForeignSettlementLayoutOption,
29
25
  } from './types'
30
26
  import { useScopedMessage } from '../ForecastInfo/useScopedMessage'
27
+ import { useForeignSettlementStore } from './store'
31
28
  import '../ForecastInfo/forecast-info.css'
32
29
  import './foreign-currency-settlement.css'
33
30
 
@@ -48,35 +45,17 @@ const pageContainer = ref<HTMLElement | null>(null)
48
45
  const overlayContainer = ref<HTMLElement | null>(null)
49
46
  const isFullscreen = ref(false)
50
47
  const pageMessage = useScopedMessage(() => overlayContainer.value)
48
+ const foreignSettlementStore = useForeignSettlementStore()
51
49
  let isListeningFullscreenChange = false
52
50
  let fullscreenOperationGeneration = 0
53
51
 
54
52
  type TransientOverlayController = {
55
53
  closeTransientOverlays: () => void
56
- closeVisibleOverlays: () => void
57
54
  }
58
55
 
59
56
  const forecastPanel = ref<TransientOverlayController | null>(null)
60
57
  const flowPanel = ref<TransientOverlayController | null>(null)
61
58
 
62
- type ForeignSettlementDetailState =
63
- | { kind: 'forecast'; record: ForeignSettlementForecastRow }
64
- | { kind: 'flow'; record: ForeignSettlementFlowRow }
65
-
66
- const detailState = ref<ForeignSettlementDetailState | null>(null)
67
- const detailTitle = computed(() => (
68
- detailState.value?.kind === 'forecast' ? '预报信息详情' : '流水信息详情'
69
- ))
70
- const detailIdentityLabel = computed(() => (
71
- detailState.value?.kind === 'forecast' ? '预报流水号' : '流水号'
72
- ))
73
- const detailIdentityProp = computed(() => (
74
- detailState.value?.kind === 'forecast' ? 'predRefNo' : 'tranRefNo'
75
- ))
76
- const detailGroups = computed(() => (
77
- detailState.value?.kind === 'forecast' ? forecastDetailGroups : flowDetailGroups
78
- ))
79
-
80
59
  function syncFullscreenState() {
81
60
  isFullscreen.value = document.fullscreenElement === pageContainer.value
82
61
  }
@@ -136,40 +115,11 @@ function setCardLayout(layout: ForeignSettlementCardLayout) {
136
115
  cardLayout.value = layout
137
116
  }
138
117
 
139
- function openForecastDetail(record: ForeignSettlementForecastRow) {
140
- closePanelVisibleOverlays()
141
- detailState.value = { kind: 'forecast', record: { ...record } }
142
- }
143
-
144
- function openFlowDetail(record: ForeignSettlementFlowRow) {
145
- closePanelVisibleOverlays()
146
- detailState.value = { kind: 'flow', record: { ...record } }
147
- }
148
-
149
- function returnToList() {
150
- detailState.value = null
151
- }
152
-
153
- function closePanelVisibleOverlays() {
154
- const cleanupTasks = [
155
- () => pageMessage.closeAll(),
156
- () => forecastPanel.value?.closeVisibleOverlays(),
157
- () => flowPanel.value?.closeVisibleOverlays(),
158
- ]
159
-
160
- cleanupTasks.forEach((cleanup) => {
161
- try {
162
- cleanup()
163
- } catch {
164
- // 详情切换只负责收起可见浮层,单个面板失败不影响详情展示。
165
- }
166
- })
167
- }
168
-
169
118
  function closePageTransientOverlays() {
170
119
  fullscreenOperationGeneration += 1
171
120
  const cleanupTasks = [
172
121
  () => pageMessage.closeAll(),
122
+ () => foreignSettlementStore.resetAllTableSelections(),
173
123
  () => forecastPanel.value?.closeTransientOverlays(),
174
124
  () => flowPanel.value?.closeTransientOverlays(),
175
125
  ]
@@ -233,41 +183,24 @@ onBeforeUnmount(() => {
233
183
  <div ref="overlayContainer" class="forecast-info-overlay-host"></div>
234
184
 
235
185
  <ForeignSettlementForecastPanel
236
- v-show="!detailState"
237
186
  ref="forecastPanel"
238
187
  :layout="cardLayout"
239
188
  :layout-options="layoutOptions"
240
189
  :overlay-container="overlayContainer"
241
190
  :is-fullscreen="isFullscreen"
191
+ :is-active="isCurrentRoute"
242
192
  @change-layout="setCardLayout"
243
193
  @toggle-fullscreen="toggleFullscreen"
244
- @view-detail="openForecastDetail"
245
194
  />
246
195
  <ForeignSettlementFlowPanel
247
- v-show="!detailState"
248
196
  ref="flowPanel"
249
197
  :layout="cardLayout"
250
198
  :layout-options="layoutOptions"
251
199
  :overlay-container="overlayContainer"
252
200
  :is-fullscreen="isFullscreen"
201
+ :is-active="isCurrentRoute"
253
202
  @change-layout="setCardLayout"
254
203
  @toggle-fullscreen="toggleFullscreen"
255
- @view-detail="openFlowDetail"
256
- />
257
-
258
- <ForeignSettlementDetailView
259
- v-if="detailState"
260
- :key="`${detailState.kind}-${detailState.record[detailIdentityProp] ?? ''}`"
261
- :title="detailTitle"
262
- :identity-label="detailIdentityLabel"
263
- :identity-prop="detailIdentityProp"
264
- :record="detailState.record"
265
- :groups="detailGroups"
266
- :layout="cardLayout"
267
- :overlay-container="overlayContainer"
268
- :is-fullscreen="isFullscreen"
269
- @back="returnToList"
270
- @toggle-fullscreen="toggleFullscreen"
271
204
  />
272
205
  </div>
273
206
  </template>
@@ -1,8 +1,4 @@
1
- import type {
2
- ForeignSettlementDetailField,
3
- ForeignSettlementDetailGroup,
4
- ForeignSettlementTableColumn,
5
- } from './types'
1
+ import type { ForeignSettlementTableColumn } from './types'
6
2
 
7
3
  export type SelectOption = {
8
4
  value: string
@@ -147,154 +143,3 @@ export const flowColumns: ForeignSettlementTableColumn[] = [
147
143
  { prop: 'zeroFlag', label: '零余额标志', minWidth: 108, format: 'yesNo' },
148
144
  { prop: 'remark', label: '备注', minWidth: 160 },
149
145
  ]
150
-
151
- export const getDefaultColumnProps = (columns: ForeignSettlementTableColumn[]) => (
152
- columns.filter((column) => column.defaultVisible).map((column) => column.prop)
153
- )
154
-
155
- type DetailFieldSource = string | { prop: string; span: 1 | 2 | 3 }
156
-
157
- function createDetailFields(
158
- columns: ForeignSettlementTableColumn[],
159
- sources: DetailFieldSource[],
160
- ): ForeignSettlementDetailField[] {
161
- return sources.map((source) => {
162
- const prop = typeof source === 'string' ? source : source.prop
163
- const column = columns.find((item) => item.prop === prop)
164
-
165
- return {
166
- prop,
167
- label: column?.label ?? prop,
168
- format: column?.format,
169
- span: typeof source === 'string' ? 1 : source.span,
170
- }
171
- })
172
- }
173
-
174
- export const forecastDetailGroups: ForeignSettlementDetailGroup[] = [
175
- {
176
- title: '核销概览',
177
- fields: createDetailFields(forecastColumns, [
178
- { prop: 'predRefNo', span: 2 },
179
- 'tranDate',
180
- 'payDirec',
181
- 'ccy',
182
- 'predAmt',
183
- 'verifyAmt',
184
- 'unverifyAmt',
185
- 'verifyStatus',
186
- ]),
187
- },
188
- {
189
- title: '预报与机构信息',
190
- fields: createDetailFields(forecastColumns, [
191
- 'tranType',
192
- 'predWay',
193
- 'paymentRoute',
194
- 'bankAcct',
195
- 'groundBranch',
196
- 'predDept',
197
- 'predName',
198
- 'predDate',
199
- ]),
200
- },
201
- {
202
- title: '客户与交易对手',
203
- fields: createDetailFields(forecastColumns, [
204
- { prop: 'clientName', span: 2 },
205
- 'clientType',
206
- { prop: 'clientAcct', span: 2 },
207
- { prop: 'competName', span: 2 },
208
- 'competAcct',
209
- 'competAcctSc',
210
- { prop: 'rcvBank', span: 2 },
211
- 'rcvBankSc',
212
- ]),
213
- },
214
- {
215
- title: '其他信息',
216
- fields: createDetailFields(forecastColumns, [
217
- 'docbusinessno',
218
- 'midBankSc',
219
- 'phoneNo',
220
- ]),
221
- },
222
- ]
223
-
224
- export const flowDetailGroups: ForeignSettlementDetailGroup[] = [
225
- {
226
- title: '交易概览',
227
- fields: createDetailFields(flowColumns, [
228
- { prop: 'tranRefNo', span: 2 },
229
- 'tranDate',
230
- 'valueDate',
231
- 'direction',
232
- 'paymentType',
233
- 'ccy',
234
- 'tranAmt',
235
- 'notVerifyAmt',
236
- 'verifyStatus',
237
- ]),
238
- },
239
- {
240
- title: '账户与客户信息',
241
- fields: createDetailFields(flowColumns, [
242
- 'branchCode',
243
- 'branch',
244
- 'acctBranch',
245
- 'authBranch',
246
- { prop: 'acctNo', span: 2 },
247
- { prop: 'acctName', span: 2 },
248
- 'clientId',
249
- 'bankCode',
250
- 'bankAcct',
251
- 'actAcct',
252
- { prop: 'othAcctNo', span: 2 },
253
- { prop: 'othAcctName', span: 2 },
254
- ]),
255
- },
256
- {
257
- title: '报文与业务信息',
258
- fields: createDetailFields(flowColumns, [
259
- 'msgType',
260
- { prop: 'msgCode', span: 2 },
261
- { prop: 'msgSeqNo', span: 2 },
262
- 'field20',
263
- 'field21',
264
- 'busiType',
265
- 'tranType',
266
- 'tranCate',
267
- 'originTable',
268
- 'billNo',
269
- 'status',
270
- 'consignDate',
271
- 'settleDate',
272
- ]),
273
- },
274
- {
275
- title: '清算行信息',
276
- fields: createDetailFields(flowColumns, [
277
- 'field52aPayBankAcct',
278
- 'field52aPayBankBic',
279
- { prop: 'field52aPayBankInfo', span: 2 },
280
- 'sendBankCode',
281
- 'sendSettleBank',
282
- 'rcvBankCode',
283
- 'rcvSettleBank',
284
- 'sendTimeStamp',
285
- 'insertTime',
286
- ]),
287
- },
288
- {
289
- title: '折算与附加信息',
290
- fields: createDetailFields(flowColumns, [
291
- 'tranAmtUsd',
292
- 'notVerifyAmtUsd',
293
- 'predStartAmtFlag',
294
- 'xchgDate',
295
- 'xchgTimes',
296
- 'zeroFlag',
297
- { prop: 'remark', span: 3 },
298
- ]),
299
- },
300
- ]