verce-vue-test 0.0.96 → 0.0.97

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/env.d.ts CHANGED
@@ -16,13 +16,15 @@ declare global {
16
16
 
17
17
  declare module 'vue' {
18
18
  export interface GlobalComponents {
19
+ DateRange: typeof import('./src/components/element-rewrite/DateRange.vue')['default']
19
20
  ElButtonPro: typeof import('./src/components/element-rewrite/ElButtonPro.vue')['default']
20
21
  ElFormDialog: typeof import('./src/components/element-rewrite/ElFormDialog.vue')['default']
21
22
  ElInputThousandth: typeof import('./src/components/element-rewrite/ElInputThousandth.vue')['default']
22
23
  ElTablePro: typeof import('./src/components/element-rewrite/ElTablePro.vue')['default']
23
24
  ElUploadButton: typeof import('./src/components/element-rewrite/ElUploadButton.vue')['default']
24
25
  LoginSuccessNotification: typeof import('./src/components/LoginSuccessNotification.vue')['default']
25
- NumberRange: typeof import('./src/components/NumberRange.vue')['default']
26
+ NumberRange: typeof import('./src/components/element-rewrite/NumberRange.vue')['default']
27
+ TokenTag: typeof import('./src/components/business/Public/TokenTag.vue')['default']
26
28
  WebsiteNoticeTitle: typeof import('./src/components/WebsiteNoticeTitle.vue')['default']
27
29
  IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
28
30
  IconDocumentation: typeof import('./src/components/icons/IconDocumentation.vue')['default']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verce-vue-test",
3
- "version": "0.0.96",
3
+ "version": "0.0.97",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -13,12 +13,17 @@
13
13
  </span>
14
14
  </template>
15
15
 
16
- <script setup name="TokenTag">
16
+ <script setup lang="ts" name="TokenTag">
17
17
  import { computed } from "vue"
18
18
 
19
19
  const DEFAULT_COLOR = "#667085"
20
20
 
21
- const currencyMap = {
21
+ type CurrencyDefinition = {
22
+ name: string
23
+ color: string
24
+ }
25
+
26
+ const currencyMap: Record<string, CurrencyDefinition> = {
22
27
  CNY: { name: "人民币", color: "#C7372F" },
23
28
  USD: { name: "美元", color: "#277A53" },
24
29
  HKD: { name: "港元", color: "#9F2147" },
@@ -36,17 +41,16 @@ const currencyMap = {
36
41
  KZT: { name: "哈萨克斯坦坚戈", color: "#0095C8" }
37
42
  }
38
43
 
39
- const props = defineProps({
40
- value: {
41
- type: [String, Number],
42
- required: true
43
- },
44
- // 紧凑模式下只展示币种代码,适合空间有限的表格列。
45
- compact: {
46
- type: Boolean,
47
- default: false
44
+ const props = withDefaults(
45
+ defineProps<{
46
+ value: string | number
47
+ /** 紧凑模式下只展示币种代码,适合空间有限的表格列。 */
48
+ compact?: boolean
49
+ }>(),
50
+ {
51
+ compact: false
48
52
  }
49
- })
53
+ )
50
54
 
51
55
  const currencyCode = computed(() => String(props.value ?? "").trim().toUpperCase())
52
56
  const currency = computed(() => currencyMap[currencyCode.value])
@@ -0,0 +1,368 @@
1
+ <template>
2
+ <div class="date-range" :class="{ 'is-disabled': disabled }">
3
+ <div class="date-range__row">
4
+ <el-date-picker
5
+ v-model="startVal"
6
+ class="date-range__picker"
7
+ :class="{ 'is-error': showError }"
8
+ :type="pickerType"
9
+ :placeholder="startPlaceholder"
10
+ :disabled="disabled"
11
+ :disabled-date="disabledStartDate"
12
+ :value-format="valueFormat"
13
+ :format="displayFormat"
14
+ clearable
15
+ @change="onStartChange"
16
+ @focus="onStartFocus"
17
+ @blur="onStartBlur"
18
+ />
19
+ <span class="date-range__separator">{{ separator }}</span>
20
+ <el-date-picker
21
+ v-model="endVal"
22
+ class="date-range__picker"
23
+ :class="{ 'is-error': showError }"
24
+ :type="pickerType"
25
+ :placeholder="endPlaceholder"
26
+ :disabled="disabled"
27
+ :disabled-date="disabledEndDate"
28
+ :value-format="valueFormat"
29
+ :format="displayFormat"
30
+ clearable
31
+ @change="onEndChange"
32
+ @focus="onEndFocus"
33
+ @blur="onEndBlur"
34
+ />
35
+ </div>
36
+ <span v-if="showError" class="date-range__error">
37
+ {{ activeErrorMessage }}
38
+ </span>
39
+ </div>
40
+ </template>
41
+
42
+ <script setup lang="ts" name="DateRange">
43
+ import { computed, ref, watch } from "vue"
44
+
45
+ export type DateRangeValue = [string | null, string | null]
46
+
47
+ /**
48
+ * 父级 v-model:约定前两格为 [start, end]。
49
+ * 使用 ReadonlyArray 以兼容表单里的 `string[]`、空数组等(避免 `DateRangeValue | []` 与 `string[]` 不兼容)。
50
+ */
51
+ export type DateRangeModelProp = ReadonlyArray<string | null>
52
+
53
+ export type MaxSpanDaysInput = number | [number]
54
+
55
+ function resolveMaxSpanDays(v: MaxSpanDaysInput | undefined): number | null {
56
+ if (v === undefined) return null
57
+ const n = Array.isArray(v) ? v[0] : v
58
+ if (typeof n !== "number" || !Number.isFinite(n) || n <= 0) return null
59
+ return Math.floor(n)
60
+ }
61
+
62
+ function startOfLocalDay(d: Date): Date {
63
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate())
64
+ }
65
+
66
+ /** 按自然日计:end 在 start 当天为 0,隔天为 1 … */
67
+ function calendarDayDiff(start: Date, end: Date): number {
68
+ const s = startOfLocalDay(start).getTime()
69
+ const e = startOfLocalDay(end).getTime()
70
+ return Math.round((e - s) / 86400000)
71
+ }
72
+
73
+ /** 含首尾的自然日个数,如 1 月 1 日~1 月 15 日为 15 */
74
+ function inclusiveDaySpan(start: Date, end: Date): number {
75
+ return calendarDayDiff(start, end) + 1
76
+ }
77
+
78
+ const props = withDefaults(
79
+ defineProps<{
80
+ /** 数组模式绑定值 [start, end];亦可能为空数组 */
81
+ modelValue?: DateRangeModelProp
82
+ /** 双字段模式 - 起始日期 */
83
+ start?: string | null
84
+ /** 双字段模式 - 结束日期 */
85
+ end?: string | null
86
+ startPlaceholder?: string
87
+ endPlaceholder?: string
88
+ separator?: string
89
+ /** date-picker 的 type,如 date / datetime / month / year */
90
+ pickerType?: "date" | "datetime" | "month" | "year"
91
+ /** 传给 el-date-picker 的 value-format */
92
+ valueFormat?: string
93
+ /** 传给 el-date-picker 的 format(显示格式) */
94
+ displayFormat?: string
95
+ disabled?: boolean
96
+ /** 是否限制结束日期不能早于开始日期(禁用不合法的日期) */
97
+ linkage?: boolean
98
+ /**
99
+ * 最长区间(自然日,含起止当天)。可传数字如 15,或单元素数组 [15]。
100
+ * 仅对 pickerType 为 date / datetime 生效。
101
+ */
102
+ maxSpanDays?: MaxSpanDaysInput
103
+ errorMessage?: string
104
+ /** 超出 maxSpanDays 时的提示(默认带天数) */
105
+ maxSpanErrorMessage?: string
106
+ }>(),
107
+ {
108
+ modelValue: undefined,
109
+ start: undefined,
110
+ end: undefined,
111
+ startPlaceholder: "开始日期",
112
+ endPlaceholder: "结束日期",
113
+ separator: "至",
114
+ pickerType: "date",
115
+ valueFormat: "YYYYMMDD",
116
+ displayFormat: "YYYY-MM-DD",
117
+ disabled: false,
118
+ linkage: true,
119
+ maxSpanDays: undefined,
120
+ errorMessage: "结束日期不能早于开始日期",
121
+ maxSpanErrorMessage: undefined
122
+ }
123
+ )
124
+
125
+ /** 使用 call-signature 形式,避免部分 vue-tsc 版本对对象形式 emits 推断成单事件而报 TS2769 */
126
+ const emit = defineEmits<{
127
+ (e: "update:modelValue", value: DateRangeValue): void
128
+ (e: "update:start", value: string | null): void
129
+ (e: "update:end", value: string | null): void
130
+ (e: "validate", valid: boolean): void
131
+ }>()
132
+
133
+ const isArrayMode = computed(() => props.modelValue !== undefined)
134
+
135
+ const startVal = ref<any>(null)
136
+ const endVal = ref<any>(null)
137
+
138
+ const startFocused = ref(false)
139
+ const endFocused = ref(false)
140
+ const hasBlurred = ref(false)
141
+
142
+ /** 解析绑定值:支持 YYYYMMDD(与默认 valueFormat 一致)及 ISO 等可被 Date 解析的字符串 */
143
+ function toDate(val: any): Date | null {
144
+ if (!val) return null
145
+ if (/^\d{8}$/.test(val)) {
146
+ const y = Number(val.slice(0, 4))
147
+ const m = Number(val.slice(4, 6)) - 1
148
+ const day = Number(val.slice(6, 8))
149
+ const d = new Date(y, m, day)
150
+ return Number.isNaN(d.getTime()) ? null : d
151
+ }
152
+ const d = new Date(val)
153
+ return Number.isNaN(d.getTime()) ? null : d
154
+ }
155
+
156
+ const effectiveMaxSpan = computed(() => resolveMaxSpanDays(props.maxSpanDays))
157
+
158
+ const spanConstraintApplies = computed(
159
+ () =>
160
+ effectiveMaxSpan.value !== null &&
161
+ (props.pickerType === "date" || props.pickerType === "datetime")
162
+ )
163
+
164
+ const orderInvalid = computed(() => {
165
+ const s = toDate(startVal.value)
166
+ const e = toDate(endVal.value)
167
+ return s !== null && e !== null && e < s
168
+ })
169
+
170
+ const spanInvalid = computed(() => {
171
+ if (!spanConstraintApplies.value || effectiveMaxSpan.value === null)
172
+ return false
173
+ const s = toDate(startVal.value)
174
+ const e = toDate(endVal.value)
175
+ if (s === null || e === null || e < s) return false
176
+ return inclusiveDaySpan(s, e) > effectiveMaxSpan.value
177
+ })
178
+
179
+ const rangeInvalid = computed(() => orderInvalid.value || spanInvalid.value)
180
+
181
+ const showError = computed(
182
+ () =>
183
+ hasBlurred.value &&
184
+ !startFocused.value &&
185
+ !endFocused.value &&
186
+ rangeInvalid.value
187
+ )
188
+
189
+ const activeErrorMessage = computed(() => {
190
+ if (!showError.value) return ""
191
+ if (orderInvalid.value) return props.errorMessage
192
+ if (spanInvalid.value && effectiveMaxSpan.value !== null) {
193
+ return (
194
+ props.maxSpanErrorMessage ??
195
+ `日期区间最长为 ${effectiveMaxSpan.value} 天(含起止当天)`
196
+ )
197
+ }
198
+ return props.errorMessage
199
+ })
200
+
201
+ const disabledStartDate = (date: Date): boolean => {
202
+ if (props.linkage && endVal.value) {
203
+ const e = toDate(endVal.value)
204
+ if (e !== null && date.getTime() > e.getTime()) return true
205
+ }
206
+ if (
207
+ spanConstraintApplies.value &&
208
+ effectiveMaxSpan.value !== null &&
209
+ endVal.value
210
+ ) {
211
+ const e = toDate(endVal.value)
212
+ if (e !== null) {
213
+ const maxDiff = effectiveMaxSpan.value - 1
214
+ if (calendarDayDiff(date, e) > maxDiff) return true
215
+ }
216
+ }
217
+ return false
218
+ }
219
+
220
+ const disabledEndDate = (date: Date): boolean => {
221
+ if (props.linkage && startVal.value) {
222
+ const s = toDate(startVal.value)
223
+ if (s !== null && date.getTime() < s.getTime()) return true
224
+ }
225
+ if (
226
+ spanConstraintApplies.value &&
227
+ effectiveMaxSpan.value !== null &&
228
+ startVal.value
229
+ ) {
230
+ const s = toDate(startVal.value)
231
+ if (s !== null) {
232
+ const maxDiff = effectiveMaxSpan.value - 1
233
+ if (calendarDayDiff(s, date) > maxDiff) return true
234
+ }
235
+ }
236
+ return false
237
+ }
238
+
239
+ function emitValue() {
240
+ const s = startVal.value || null
241
+ const e = endVal.value || null
242
+ if (isArrayMode.value) {
243
+ emit("update:modelValue", [s, e])
244
+ } else {
245
+ emit("update:start", s)
246
+ emit("update:end", e)
247
+ }
248
+ emit("validate", !rangeInvalid.value)
249
+ }
250
+
251
+ function onStartChange() {
252
+ emitValue()
253
+ }
254
+
255
+ function onEndChange() {
256
+ emitValue()
257
+ }
258
+
259
+ function onStartFocus() {
260
+ startFocused.value = true
261
+ hasBlurred.value = false
262
+ }
263
+
264
+ function onEndFocus() {
265
+ endFocused.value = true
266
+ hasBlurred.value = false
267
+ }
268
+
269
+ function onStartBlur() {
270
+ startFocused.value = false
271
+ emitValue()
272
+ if (!endFocused.value) hasBlurred.value = true
273
+ }
274
+
275
+ function onEndBlur() {
276
+ endFocused.value = false
277
+ emitValue()
278
+ if (!startFocused.value) hasBlurred.value = true
279
+ }
280
+
281
+ function validate(): boolean {
282
+ hasBlurred.value = true
283
+ return !rangeInvalid.value
284
+ }
285
+
286
+ function reset() {
287
+ startVal.value = null
288
+ endVal.value = null
289
+ hasBlurred.value = false
290
+ }
291
+
292
+ defineExpose({ validate, reset })
293
+
294
+ watch(
295
+ () => ({
296
+ isArr: isArrayMode.value,
297
+ s: isArrayMode.value ? props.modelValue?.[0] : props.start,
298
+ e: isArrayMode.value ? props.modelValue?.[1] : props.end
299
+ }),
300
+ ({ s, e }) => {
301
+ const newS = s || null
302
+ const newE = e || null
303
+ if (newS !== startVal.value) startVal.value = newS
304
+ if (newE !== endVal.value) endVal.value = newE
305
+ },
306
+ { immediate: true }
307
+ )
308
+ </script>
309
+
310
+ <style scoped>
311
+ .date-range {
312
+ display: flex;
313
+ flex-direction: column;
314
+ width: 100%;
315
+ min-width: 0;
316
+ box-sizing: border-box;
317
+ }
318
+
319
+ .date-range__row {
320
+ display: flex;
321
+ flex-direction: row;
322
+ flex-wrap: nowrap;
323
+ align-items: center;
324
+ gap: 8px;
325
+ width: 100%;
326
+ min-width: 0;
327
+ }
328
+
329
+ .date-range__picker {
330
+ flex: 1 1 0;
331
+ min-width: 0;
332
+ }
333
+
334
+ /* class 往往挂在 .el-date-editor 根上,用行容器做 :deep 更稳 */
335
+ .date-range__row :deep(.el-date-editor) {
336
+ width: 100%;
337
+ max-width: 100%;
338
+ }
339
+
340
+ .date-range__row :deep(.el-date-editor .el-input__wrapper) {
341
+ width: 100%;
342
+ }
343
+
344
+ .date-range__separator {
345
+ color: var(--el-text-color-primary);
346
+ font-size: 14px;
347
+ flex-shrink: 0;
348
+ white-space: nowrap;
349
+ }
350
+
351
+ .date-range.is-disabled .date-range__separator {
352
+ color: var(--el-text-color-placeholder);
353
+ }
354
+
355
+ .date-range__picker.is-error :deep(.el-input__wrapper) {
356
+ box-shadow: 0 0 0 1px var(--el-color-danger) inset;
357
+ }
358
+
359
+ .date-range__error {
360
+ display: block;
361
+ width: 100%;
362
+ min-width: 0;
363
+ color: var(--el-color-danger);
364
+ font-size: 12px;
365
+ line-height: 1.4;
366
+ padding-top: 4px;
367
+ }
368
+ </style>
@@ -29,10 +29,10 @@ function formatThousandth(val: string | number | undefined): string {
29
29
  const str = String(val)
30
30
  const num = Number(str)
31
31
  if (isNaN(num)) return ''
32
- const parts = str.split('.')
33
- const intPart = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
34
- if (parts.length > 1) {
35
- return intPart + '.' + parts[1]
32
+ const [integerPart = '', decimalPart] = str.split('.')
33
+ const intPart = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
34
+ if (decimalPart !== undefined) {
35
+ return intPart + '.' + decimalPart
36
36
  }
37
37
  return intPart
38
38
  }
@@ -44,9 +44,9 @@ function stripNonNumeric(val: string): string {
44
44
  result = result.slice(0, dotIndex + 1) + result.slice(dotIndex + 1).replace(/\./g, '')
45
45
  }
46
46
  if (dotIndex !== -1) {
47
- const parts = result.split('.')
48
- if (parts[1].length > 2) {
49
- result = parts[0] + '.' + parts[1].slice(0, 2)
47
+ const [integerPart = '', decimalPart = ''] = result.split('.')
48
+ if (decimalPart.length > 2) {
49
+ result = integerPart + '.' + decimalPart.slice(0, 2)
50
50
  }
51
51
  }
52
52
  return result
@@ -1,6 +1,7 @@
1
1
  import type { App, Component } from 'vue'
2
2
 
3
3
  import TokenTag from './business/Public/TokenTag.vue'
4
+ import DateRange from './element-rewrite/DateRange.vue'
4
5
  import ElButtonPro from './element-rewrite/ElButtonPro.vue'
5
6
  import ElFormDialog from './element-rewrite/ElFormDialog.vue'
6
7
  import ElInputThousandth from './element-rewrite/ElInputThousandth.vue'
@@ -33,6 +34,13 @@ const globalComponentDefinitions: GlobalComponentDefinition[] = [
33
34
  description: '增强版按钮,提供权限、防抖、节流和操作确认能力。',
34
35
  filePath: 'src/components/element-rewrite/ElButtonPro.vue',
35
36
  },
37
+ {
38
+ name: 'DateRange',
39
+ component: DateRange,
40
+ category: '表单组件',
41
+ description: '支持数组或双字段绑定、日期联动和最长区间校验的日期范围组件。',
42
+ filePath: 'src/components/element-rewrite/DateRange.vue',
43
+ },
36
44
  {
37
45
  name: 'ElFormDialog',
38
46
  component: ElFormDialog,
@@ -24,7 +24,7 @@ export function formatThousands(value: unknown, fallback = '') {
24
24
 
25
25
  const sign = normalizedValue.startsWith('-') ? '-' : ''
26
26
  const unsignedValue = sign ? normalizedValue.slice(1) : normalizedValue
27
- const [integerPart, decimalPart] = unsignedValue.split('.')
27
+ const [integerPart = '', decimalPart] = unsignedValue.split('.')
28
28
  const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
29
29
 
30
30
  return `${sign}${formattedInteger}${decimalPart === undefined ? '' : `.${decimalPart}`}`
@@ -164,7 +164,7 @@ const handleFormConfirm = (data: Record<string, any>) => {
164
164
  if (data.id) {
165
165
  const index = allData.value.findIndex(item => item.id === data.id)
166
166
  if (index !== -1) {
167
- allData.value[index] = { ...allData.value[index], ...data }
167
+ allData.value[index] = { ...allData.value[index]!, ...data } as Employee
168
168
  }
169
169
  ElMessage.success('编辑成功')
170
170
  } else {
@@ -9,60 +9,50 @@ import type {
9
9
  /** 查询外币资金调拨列表(140206001)。 */
10
10
  export function queryForeignCurrencyFundAllocations(
11
11
  params: ForeignCurrencyFundAllocationFilter,
12
- options?: any,
13
12
  ) {
14
13
  return baseHttpClient.post<any>(
15
14
  '/TAM/0001/140206001',
16
15
  params,
17
- options,
18
16
  )
19
17
  }
20
18
 
21
19
  /** 新增外币资金调拨,可通过 status 区分保存草稿和提交审批(120206001)。 */
22
20
  export function createForeignCurrencyFundAllocation(
23
21
  params: ForeignCurrencyFundAllocationCreateBody,
24
- options?: any,
25
22
  ) {
26
23
  return baseHttpClient.post<any>(
27
24
  '/TAM/0001/120206001',
28
25
  params,
29
- options,
30
26
  )
31
27
  }
32
28
 
33
29
  /** 导出外币资金调拨,查询条件与列表查询保持一致(140206019)。 */
34
30
  export function exportForeignCurrencyFundAllocations(
35
31
  params: ForeignCurrencyFundAllocationFilter,
36
- options?: any,
37
32
  ) {
38
33
  return baseHttpClient.post<any>(
39
34
  '/TAM/0001/140206019',
40
35
  params,
41
- options,
42
36
  )
43
37
  }
44
38
 
45
39
  /** 修改外币资金调拨,可通过 status 区分保存草稿和提交审批(120206002)。 */
46
40
  export function updateForeignCurrencyFundAllocation(
47
41
  params: ForeignCurrencyFundAllocationUpdateBody,
48
- options?: any,
49
42
  ) {
50
43
  return baseHttpClient.post<any>(
51
44
  '/TAM/0001/120206002',
52
45
  params,
53
- options,
54
46
  )
55
47
  }
56
48
 
57
49
  /** 根据调拨单号删除外币资金调拨(120206003)。 */
58
50
  export function deleteForeignCurrencyFundAllocation(
59
51
  refNo: string,
60
- options?: any,
61
52
  ) {
62
53
  return baseHttpClient.post<any>(
63
54
  '/TAM/0001/120206003',
64
55
  { refNos: refNo },
65
- options,
66
56
  )
67
57
  }
68
58
 
@@ -74,7 +64,6 @@ export function reviewForeignCurrencyFundAllocation(
74
64
  refNo: string,
75
65
  type: ForeignCurrencyFundAllocationReviewType,
76
66
  approveRjctReason = '',
77
- options?: any,
78
67
  ) {
79
68
  return baseHttpClient.post<any>(
80
69
  '/TAM/0001/120206004',
@@ -83,6 +72,5 @@ export function reviewForeignCurrencyFundAllocation(
83
72
  type,
84
73
  ...(type === 'N' ? { approveRjctReason } : {}),
85
74
  },
86
- options,
87
75
  )
88
76
  }
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed, nextTick, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
2
+ import { computed, nextTick, onMounted, reactive, ref } from 'vue'
3
3
  import {
4
4
  ElMessage,
5
5
  ElMessageBox,
@@ -32,7 +32,6 @@ import {
32
32
  } from './api'
33
33
  import { allocationStatusOptions, allocationTypeOptions, currencyOptions } from './options'
34
34
  import {
35
- createDefaultFundAllocationFilter,
36
35
  normalizeFundAllocationRow,
37
36
  type ForeignCurrencyFundAllocationCreateBody,
38
37
  type ForeignCurrencyFundAllocationFilter,
@@ -63,9 +62,68 @@ const accountTypeOptions = [
63
62
  { value: '02', label: '分支行账户' },
64
63
  ]
65
64
 
65
+ function localDateText(date = new Date()) {
66
+ const pad = (value: number) => String(value).padStart(2, '0')
67
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`
68
+ }
69
+
70
+ function resolveSystemWorkDate(value: unknown) {
71
+ const match = String(value ?? '').trim().match(/^(\d{4})-?(\d{2})-?(\d{2})$/)
72
+ if (!match) return localDateText()
73
+
74
+ const [, yearText, monthText, dayText] = match
75
+ const year = Number(yearText)
76
+ const month = Number(monthText)
77
+ const day = Number(dayText)
78
+ const date = new Date(year, month - 1, day)
79
+ const isValidDate = date.getFullYear() === year
80
+ && date.getMonth() === month - 1
81
+ && date.getDate() === day
82
+ return isValidDate ? localDateText(date) : localDateText()
83
+ }
84
+
85
+ /** 系统工作日期注入点,页面日期统一使用 YYYY-MM-DD。 */
86
+ const systemWorkDate = ref(resolveSystemWorkDate(import.meta.env.VITE_SYSTEM_WORK_DATE))
87
+
88
+ function disabledBeforeSystemWorkDate(date: Date) {
89
+ return localDateText(date) < systemWorkDate.value
90
+ }
91
+
92
+ function createDefaultFundAllocationFilter(): ForeignCurrencyFundAllocationFilter {
93
+ return {
94
+ ccy: '',
95
+ startAmt: '',
96
+ endAmt: '',
97
+ startValueDate: systemWorkDate.value,
98
+ endValueDate: systemWorkDate.value,
99
+ status: '',
100
+ tranDate: systemWorkDate.value,
101
+ }
102
+ }
103
+
66
104
  const filterForm = reactive<ForeignCurrencyFundAllocationFilter>(
67
105
  createDefaultFundAllocationFilter(),
68
106
  )
107
+ const filterAmountRange = computed<[number | null, number | null]>({
108
+ get: (): [number | null, number | null] => [
109
+ parseFilterAmount(filterForm.startAmt),
110
+ parseFilterAmount(filterForm.endAmt),
111
+ ],
112
+ set: ([startAmt, endAmt]: [number | null, number | null]) => {
113
+ filterForm.startAmt = startAmt === null ? '' : String(startAmt)
114
+ filterForm.endAmt = endAmt === null ? '' : String(endAmt)
115
+ },
116
+ })
117
+ const filterValueDateRange = computed<[string | null, string | null]>({
118
+ get: (): [string | null, string | null] => [
119
+ filterForm.startValueDate || null,
120
+ filterForm.endValueDate || null,
121
+ ],
122
+ set: ([startValueDate, endValueDate]: [string | null, string | null]) => {
123
+ filterForm.startValueDate = startValueDate || ''
124
+ filterForm.endValueDate = endValueDate || ''
125
+ },
126
+ })
69
127
  const appliedFilters = ref<ForeignCurrencyFundAllocationFilter>({ ...filterForm })
70
128
  const sharedQueryParams = computed<ForeignCurrencyFundAllocationFilter>(() => (
71
129
  cloneFilter(appliedFilters.value)
@@ -125,8 +183,14 @@ const columnComponentMap: Record<string, string> = {
125
183
  ccy: 'TokenTag',
126
184
  }
127
185
 
128
- let activeQueryController: AbortController | null = null
129
- let accountBankRequestController: AbortController | null = null
186
+ let activeQueryRequestId = 0
187
+ let accountBankRequestId = 0
188
+
189
+ function parseFilterAmount(value: string) {
190
+ if (!value) return null
191
+ const amount = Number(value.replaceAll(',', ''))
192
+ return Number.isFinite(amount) ? amount : null
193
+ }
130
194
 
131
195
  function sanitizeAmountInput(value: string) {
132
196
  const numericValue = String(value ?? '').replace(/[^\d.]/g, '')
@@ -179,7 +243,7 @@ function validateDifferentAccount(mode: AllocationFormMode) {
179
243
  }
180
244
  }
181
245
 
182
- const createFormRules: FormRules<ForeignCurrencyFundAllocationCreateBody> = {
246
+ const createFormRules: FormRules = {
183
247
  alocDate: [{ required: true, message: '请选择调拨日期', trigger: 'change' }],
184
248
  alocType: [{ required: true, message: '请选择调拨类型', trigger: 'change' }],
185
249
  ccy: [{ required: true, message: '请选择币种', trigger: 'change' }],
@@ -192,7 +256,7 @@ const createFormRules: FormRules<ForeignCurrencyFundAllocationCreateBody> = {
192
256
  ],
193
257
  }
194
258
 
195
- const editFormRules: FormRules<ForeignCurrencyFundAllocationUpdateBody> = {
259
+ const editFormRules: FormRules = {
196
260
  alocTypeEdit: [{ required: true, message: '请选择调拨类型', trigger: 'change' }],
197
261
  ccyEdit: [{ required: true, message: '请选择币种', trigger: 'change' }],
198
262
  amtEdit: [{ validator: validateAmount, trigger: 'blur' }],
@@ -204,16 +268,10 @@ const editFormRules: FormRules<ForeignCurrencyFundAllocationUpdateBody> = {
204
268
  ],
205
269
  }
206
270
 
207
- function localDateText() {
208
- const now = new Date()
209
- const pad = (value: number) => String(value).padStart(2, '0')
210
- return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`
211
- }
212
-
213
271
  function createDefaultAllocationForm(): ForeignCurrencyFundAllocationCreateBody {
214
272
  return {
215
273
  acctType: injectedAccountType.value,
216
- alocDate: localDateText(),
274
+ alocDate: systemWorkDate.value,
217
275
  alocType: injectedAccountType.value,
218
276
  amt: '',
219
277
  ccy: '',
@@ -226,7 +284,7 @@ function createDefaultAllocationForm(): ForeignCurrencyFundAllocationCreateBody
226
284
  outAcctNo: '',
227
285
  remark: '',
228
286
  status: 'C',
229
- valueDate: localDateText(),
287
+ valueDate: systemWorkDate.value,
230
288
  zmqFlag: 'N',
231
289
  }
232
290
  }
@@ -257,10 +315,6 @@ function cloneFilter(source: ForeignCurrencyFundAllocationFilter) {
257
315
  return { ...source }
258
316
  }
259
317
 
260
- function isAbortError(error: unknown) {
261
- return error instanceof Error && error.name === 'AbortError'
262
- }
263
-
264
318
  function formatDate(value: string) {
265
319
  const compact = value.replaceAll('-', '').slice(0, 8)
266
320
  if (!/^\d{8}$/.test(compact)) return value || '—'
@@ -276,7 +330,7 @@ function formatDecimal(value: string) {
276
330
  }
277
331
 
278
332
  function statusCode(status: string) {
279
- return String(status || '').trim().split('-')[0].toUpperCase()
333
+ return String(status || '').trim().split('-')[0]?.toUpperCase() || ''
280
334
  }
281
335
 
282
336
  function statusLabel(status: string) {
@@ -349,23 +403,12 @@ function allocationTypeLabel(value: string) {
349
403
  }
350
404
 
351
405
  async function loadRows() {
352
- activeQueryController?.abort()
353
- const controller = new AbortController()
354
- activeQueryController = controller
406
+ const requestId = ++activeQueryRequestId
355
407
  loading.value = true
356
408
 
357
409
  try {
358
- const response = await queryForeignCurrencyFundAllocations(
359
- sharedQueryParams.value,
360
- {
361
- signal: controller.signal,
362
- tamHead: {
363
- pageIndex: currentPage.value,
364
- pageSize: pageSize.value,
365
- },
366
- },
367
- )
368
- if (controller.signal.aborted || activeQueryController !== controller) return
410
+ const response = await queryForeignCurrencyFundAllocations(sharedQueryParams.value) as any
411
+ if (requestId !== activeQueryRequestId) return
369
412
 
370
413
  const resultInfos = Array.isArray(response.body.resultInfos) ? response.body.resultInfos : []
371
414
  const responseTotal = Number(response.body.totalCount)
@@ -374,13 +417,10 @@ async function loadRows() {
374
417
  ? responseTotal
375
418
  : resultInfos.length
376
419
  } catch (error) {
377
- if (controller.signal.aborted || isAbortError(error)) return
420
+ if (requestId !== activeQueryRequestId) return
378
421
  ElMessage.error(error instanceof Error ? error.message : '外币资金调拨查询失败')
379
422
  } finally {
380
- if (activeQueryController === controller) {
381
- activeQueryController = null
382
- loading.value = false
383
- }
423
+ if (requestId === activeQueryRequestId) loading.value = false
384
424
  }
385
425
  }
386
426
 
@@ -434,29 +474,25 @@ function getAccountQuery(mode: AllocationFormMode) {
434
474
  }
435
475
 
436
476
  async function loadAccountBankOptions(mode: AllocationFormMode) {
477
+ const requestId = ++accountBankRequestId
437
478
  const params = getAccountQuery(mode)
438
479
  if (!params.ccy) {
439
480
  accountBankOptions.value = []
481
+ accountBankLoading.value = false
440
482
  return
441
483
  }
442
484
 
443
- accountBankRequestController?.abort()
444
- const controller = new AbortController()
445
- accountBankRequestController = controller
446
485
  accountBankLoading.value = true
447
486
 
448
487
  try {
449
- const result = await queryAccountBanks(params, { signal: controller.signal })
450
- if (controller.signal.aborted || accountBankRequestController !== controller) return
488
+ const result = await queryAccountBanks(params) as any
489
+ if (requestId !== accountBankRequestId) return
451
490
  accountBankOptions.value = result
452
491
  } catch (error) {
453
- if (controller.signal.aborted || isAbortError(error)) return
492
+ if (requestId !== accountBankRequestId) return
454
493
  ElMessage.error(error instanceof Error ? error.message : '账户行查询失败')
455
494
  } finally {
456
- if (accountBankRequestController === controller) {
457
- accountBankRequestController = null
458
- accountBankLoading.value = false
459
- }
495
+ if (requestId === accountBankRequestId) accountBankLoading.value = false
460
496
  }
461
497
  }
462
498
 
@@ -492,8 +528,9 @@ function openEdit(row: ForeignCurrencyFundAllocationRow) {
492
528
  ElMessage.warning('只有审批未通过或草稿状态的调拨记录才能修改')
493
529
  return
494
530
  }
495
- accountBankRequestController?.abort()
531
+ accountBankRequestId += 1
496
532
  accountBankOptions.value = []
533
+ accountBankLoading.value = false
497
534
  editRejectReason.value = row.approveRjctReason
498
535
  const rowAllocationType = allocationTypeCode(row.alocType)
499
536
  Object.assign(editForm, {
@@ -523,7 +560,7 @@ function openEdit(row: ForeignCurrencyFundAllocationRow) {
523
560
  }
524
561
 
525
562
  function openCreate() {
526
- accountBankRequestController?.abort()
563
+ accountBankRequestId += 1
527
564
  accountBankOptions.value = []
528
565
  accountBankLoading.value = false
529
566
  createSubmittingAction.value = null
@@ -543,7 +580,7 @@ async function handleCreateSubmit(action: CreateAction) {
543
580
  createSubmitting.value = true
544
581
  createSubmittingAction.value = action
545
582
  try {
546
- const response = await createForeignCurrencyFundAllocation(createAllocationRequestBody(status))
583
+ const response = await createForeignCurrencyFundAllocation(createAllocationRequestBody(status)) as any
547
584
  createVisible.value = false
548
585
  ElMessage.success(`${actionText}成功,调拨单号:${response.body.transFerInstruct}`)
549
586
  currentPage.value = 1
@@ -581,7 +618,7 @@ async function handleEditSubmit(action: EditAction) {
581
618
  outAcctNoEdit: editForm.outAcctNoEdit.trim(),
582
619
  remarkEdit: editForm.remarkEdit.trim(),
583
620
  status,
584
- })
621
+ }) as any
585
622
  editVisible.value = false
586
623
  ElMessage.success(response.head.retMsg || `${actionText}成功`)
587
624
  await loadRows()
@@ -616,7 +653,7 @@ async function handleDelete(row: ForeignCurrencyFundAllocationRow) {
616
653
 
617
654
  activeRowAction.value = { refNo: row.refNo, action: 'delete' }
618
655
  try {
619
- const response = await deleteForeignCurrencyFundAllocation(row.refNo)
656
+ const response = await deleteForeignCurrencyFundAllocation(row.refNo) as any
620
657
  if (detailRecord.value?.refNo === row.refNo) {
621
658
  detailVisible.value = false
622
659
  detailRecord.value = null
@@ -677,7 +714,7 @@ async function handleReview(
677
714
  const action: RowAction = approved ? 'approve' : 'reject'
678
715
  activeRowAction.value = { refNo: row.refNo, action }
679
716
  try {
680
- const response = await reviewForeignCurrencyFundAllocation(row.refNo, type, approveRjctReason)
717
+ const response = await reviewForeignCurrencyFundAllocation(row.refNo, type, approveRjctReason) as any
681
718
  ElMessage.success(response.head.retMsg || `${actionText}成功`)
682
719
  await loadRows()
683
720
  const refreshedRecord = records.value.find((item) => item.refNo === row.refNo)
@@ -694,11 +731,6 @@ async function handleReview(
694
731
  onMounted(() => {
695
732
  void loadRows()
696
733
  })
697
-
698
- onBeforeUnmount(() => {
699
- activeQueryController?.abort()
700
- accountBankRequestController?.abort()
701
- })
702
734
  </script>
703
735
 
704
736
  <template>
@@ -758,42 +790,24 @@ onBeforeUnmount(() => {
758
790
  <el-option v-for="option in allocationStatusOptions" :key="option.value" v-bind="option" />
759
791
  </el-select>
760
792
  </el-form-item>
761
- <el-form-item label="起始调拨金额">
762
- <el-input
763
- v-model="filterForm.startAmt"
764
- inputmode="decimal"
765
- maxlength="40"
766
- placeholder="请输入最低金额"
767
- clearable
768
- />
769
- </el-form-item>
770
- <el-form-item label="截止调拨金额">
771
- <el-input
772
- v-model="filterForm.endAmt"
773
- inputmode="decimal"
774
- maxlength="40"
775
- placeholder="请输入最高金额"
776
- clearable
793
+ <el-form-item label="调拨金额(mio)" class="query-range-field">
794
+ <NumberRange
795
+ v-model="filterAmountRange"
796
+ min-placeholder="请输入最低金额"
797
+ max-placeholder="请输入最高金额"
798
+ :precision="2"
799
+ error-message="起始调拨金额不能大于截止调拨金额"
800
+ size="small"
777
801
  />
778
802
  </el-form-item>
779
- <el-form-item label="起始起息日期">
780
- <el-date-picker
781
- v-model="filterForm.startValueDate"
782
- type="date"
783
- format="YYYY-MM-DD"
803
+ <el-form-item label="起息日" class="query-range-field">
804
+ <DateRange
805
+ v-model="filterValueDateRange"
806
+ start-placeholder="请选择开始日期"
807
+ end-placeholder="请选择结束日期"
784
808
  value-format="YYYY-MM-DD"
785
- placeholder="请选择开始日期"
786
- clearable
787
- />
788
- </el-form-item>
789
- <el-form-item label="截止起息日期">
790
- <el-date-picker
791
- v-model="filterForm.endValueDate"
792
- type="date"
793
- format="YYYY-MM-DD"
794
- value-format="YYYY-MM-DD"
795
- placeholder="请选择结束日期"
796
- clearable
809
+ display-format="YYYYMMDD"
810
+ size="small"
797
811
  />
798
812
  </el-form-item>
799
813
  </div>
@@ -864,7 +878,7 @@ onBeforeUnmount(() => {
864
878
  <component :is="columnComponentMap.ccy" :value="row.ccy" />
865
879
  </template>
866
880
  </el-table-column>
867
- <el-table-column prop="amt" label="调拨金额" width="184" align="right">
881
+ <el-table-column prop="amt" label="调拨金额(mio)" width="184" align="right">
868
882
  <template #default="{ row }"><span class="money-cell">{{ formatDecimal(row.amt) }}</span></template>
869
883
  </el-table-column>
870
884
  <el-table-column prop="valueDate" label="起息日" width="112">
@@ -980,7 +994,6 @@ onBeforeUnmount(() => {
980
994
  <div class="dialog-heading">
981
995
  <span class="dialog-heading__icon"><el-icon><Plus /></el-icon></span>
982
996
  <div>
983
- <small>FOREIGN CURRENCY TRANSFER</small>
984
997
  <h2>新增外币资金调拨</h2>
985
998
  </div>
986
999
  </div>
@@ -1008,6 +1021,7 @@ onBeforeUnmount(() => {
1008
1021
  format="YYYY-MM-DD"
1009
1022
  value-format="YYYY-MM-DD"
1010
1023
  placeholder="请选择调拨日期"
1024
+ :disabled-date="disabledBeforeSystemWorkDate"
1011
1025
  />
1012
1026
  </el-form-item>
1013
1027
  <el-form-item label="起息日" prop="valueDate">
@@ -1017,6 +1031,7 @@ onBeforeUnmount(() => {
1017
1031
  format="YYYY-MM-DD"
1018
1032
  value-format="YYYY-MM-DD"
1019
1033
  placeholder="请选择起息日"
1034
+ :disabled-date="disabledBeforeSystemWorkDate"
1020
1035
  />
1021
1036
  </el-form-item>
1022
1037
  <el-form-item label="调拨类型" prop="alocType">
@@ -1041,7 +1056,7 @@ onBeforeUnmount(() => {
1041
1056
  />
1042
1057
  </el-select>
1043
1058
  </el-form-item>
1044
- <el-form-item label="调拨金额(元)" prop="amt">
1059
+ <el-form-item label="调拨金额(mio)" prop="amt">
1045
1060
  <el-input
1046
1061
  v-model="createAmountInput"
1047
1062
  inputmode="decimal"
@@ -1089,7 +1104,7 @@ onBeforeUnmount(() => {
1089
1104
  </div>
1090
1105
  <div class="account-editor-route">
1091
1106
  <div class="account-editor-node account-editor-node--out">
1092
- <span class="account-editor-node__badge">OUT</span>
1107
+ <span class="account-editor-node__badge">调出</span>
1093
1108
  <el-form-item label="调出账户" prop="outAcctNo">
1094
1109
  <el-select
1095
1110
  v-model="createForm.outAcctNo"
@@ -1116,7 +1131,7 @@ onBeforeUnmount(() => {
1116
1131
  </div>
1117
1132
  <span class="account-editor-route__arrow"><el-icon><ArrowRight /></el-icon></span>
1118
1133
  <div class="account-editor-node account-editor-node--in">
1119
- <span class="account-editor-node__badge">IN</span>
1134
+ <span class="account-editor-node__badge">调入</span>
1120
1135
  <el-form-item label="调入账户" prop="inAcctNo">
1121
1136
  <el-select
1122
1137
  v-model="createForm.inAcctNo"
@@ -1216,7 +1231,7 @@ onBeforeUnmount(() => {
1216
1231
  <div class="dialog-heading">
1217
1232
  <span class="dialog-heading__icon"><el-icon><EditPen /></el-icon></span>
1218
1233
  <div>
1219
- <small>TRANSFER · {{ editForm.refNoEdit }}</small>
1234
+ <small>调拨单号:{{ editForm.refNoEdit }}</small>
1220
1235
  <h2>修改外币资金调拨</h2>
1221
1236
  </div>
1222
1237
  <el-tag
@@ -1283,7 +1298,7 @@ onBeforeUnmount(() => {
1283
1298
  placeholder="请选择起息日"
1284
1299
  />
1285
1300
  </el-form-item>
1286
- <el-form-item label="调拨金额(元)" prop="amtEdit">
1301
+ <el-form-item label="调拨金额(mio)" prop="amtEdit">
1287
1302
  <el-input
1288
1303
  v-model="editAmountInput"
1289
1304
  inputmode="decimal"
@@ -1331,7 +1346,7 @@ onBeforeUnmount(() => {
1331
1346
  </div>
1332
1347
  <div class="account-editor-route">
1333
1348
  <div class="account-editor-node account-editor-node--out">
1334
- <span class="account-editor-node__badge">OUT</span>
1349
+ <span class="account-editor-node__badge">调出</span>
1335
1350
  <el-form-item label="调出账号" prop="outAcctNoEdit">
1336
1351
  <el-select
1337
1352
  v-model="editForm.outAcctNoEdit"
@@ -1358,7 +1373,7 @@ onBeforeUnmount(() => {
1358
1373
  </div>
1359
1374
  <span class="account-editor-route__arrow"><el-icon><ArrowRight /></el-icon></span>
1360
1375
  <div class="account-editor-node account-editor-node--in">
1361
- <span class="account-editor-node__badge">IN</span>
1376
+ <span class="account-editor-node__badge">调入</span>
1362
1377
  <el-form-item label="调入账号" prop="inAcctNoEdit">
1363
1378
  <el-select
1364
1379
  v-model="editForm.inAcctNoEdit"
@@ -1468,7 +1483,7 @@ onBeforeUnmount(() => {
1468
1483
  <el-descriptions-item label="币种">
1469
1484
  <component :is="columnComponentMap.ccy" :value="detailRecord.ccy" />
1470
1485
  </el-descriptions-item>
1471
- <el-descriptions-item label="调拨金额">{{ formatDecimal(detailRecord.amt) }}</el-descriptions-item>
1486
+ <el-descriptions-item label="调拨金额(mio)">{{ formatDecimal(detailRecord.amt) }}</el-descriptions-item>
1472
1487
  <el-descriptions-item label="等值美元金额">{{ formatDecimal(detailRecord.amtUsd) }}</el-descriptions-item>
1473
1488
  <el-descriptions-item label="调拨日期">{{ formatDate(detailRecord.alocDate) }}</el-descriptions-item>
1474
1489
  <el-descriptions-item label="起息日">{{ formatDate(detailRecord.valueDate) }}</el-descriptions-item>
@@ -1592,6 +1607,7 @@ onBeforeUnmount(() => {
1592
1607
  .query-form :deep(.el-input),
1593
1608
  .query-form :deep(.el-select),
1594
1609
  .query-form :deep(.el-date-editor) { width: 100%; }
1610
+ .query-range-field { grid-column: span 2; }
1595
1611
  .query-form :deep(.el-input__wrapper),
1596
1612
  .query-form :deep(.el-select__wrapper) { border-radius: 5px; box-shadow: 0 0 0 1px #d6dee9 inset; }
1597
1613
  .query-actions {
@@ -1667,11 +1683,11 @@ onBeforeUnmount(() => {
1667
1683
 
1668
1684
  :deep(.allocation-edit-dialog .el-dialog__header) {
1669
1685
  margin-right: 0;
1670
- padding: 16px 22px;
1686
+ padding: 10px 18px;
1671
1687
  border-bottom: 1px solid #e4eaf1;
1672
1688
  background: linear-gradient(110deg, #f7faff 0%, #fff 58%, #f5f9ff 100%);
1673
1689
  }
1674
- :deep(.allocation-edit-dialog .el-dialog__headerbtn) { top: 17px; right: 18px; }
1690
+ :deep(.allocation-edit-dialog .el-dialog__headerbtn) { top: 4px; right: 12px; }
1675
1691
  :deep(.allocation-edit-dialog .el-dialog__body) {
1676
1692
  max-height: min(68vh, 720px);
1677
1693
  overflow-y: auto;
@@ -1686,22 +1702,22 @@ onBeforeUnmount(() => {
1686
1702
  .dialog-heading {
1687
1703
  display: flex;
1688
1704
  align-items: center;
1689
- gap: 12px;
1705
+ gap: 10px;
1690
1706
  padding-right: 42px;
1691
1707
  }
1692
1708
  .dialog-heading__icon {
1693
1709
  display: grid;
1694
- width: 38px;
1695
- height: 38px;
1696
- flex: 0 0 38px;
1710
+ width: 32px;
1711
+ height: 32px;
1712
+ flex: 0 0 32px;
1697
1713
  place-items: center;
1698
1714
  border: 1px solid #c8dcff;
1699
- border-radius: 10px;
1715
+ border-radius: 8px;
1700
1716
  color: #175cd3;
1701
1717
  background: #eaf2ff;
1702
- box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .65);
1718
+ box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .65);
1703
1719
  }
1704
- .dialog-heading__icon .el-icon { font-size: 18px; }
1720
+ .dialog-heading__icon .el-icon { font-size: 16px; }
1705
1721
  .dialog-heading > div { min-width: 0; }
1706
1722
  .dialog-heading small {
1707
1723
  display: block;
@@ -1710,9 +1726,9 @@ onBeforeUnmount(() => {
1710
1726
  font-size: 9px;
1711
1727
  font-weight: 700;
1712
1728
  letter-spacing: .12em;
1713
- line-height: 14px;
1729
+ line-height: 12px;
1714
1730
  }
1715
- .dialog-heading h2 { margin: 0; color: #172b4d; font-size: 17px; line-height: 24px; }
1731
+ .dialog-heading h2 { margin: 0; color: #172b4d; font-size: 16px; line-height: 22px; }
1716
1732
  .dialog-heading .el-tag { margin-left: auto; margin-right: 2px; }
1717
1733
  .edit-form__content { display: grid; gap: 10px; padding: 14px; }
1718
1734
  .edit-section {
@@ -1889,6 +1905,7 @@ onBeforeUnmount(() => {
1889
1905
 
1890
1906
  @media (max-width: 560px) {
1891
1907
  .query-grid { grid-template-columns: 1fr; }
1908
+ .query-range-field { grid-column: auto; }
1892
1909
  .edit-form__grid { grid-template-columns: 1fr; }
1893
1910
  .edit-form__full { grid-column: auto; }
1894
1911
  .dialog-heading small { display: none; }
@@ -94,19 +94,6 @@ export type ForeignCurrencyFundAllocationUpdateBody = {
94
94
  zmqFlagEdit: string
95
95
  }
96
96
 
97
- /** 创建空白的列表查询条件。 */
98
- export function createDefaultFundAllocationFilter(): ForeignCurrencyFundAllocationFilter {
99
- return {
100
- ccy: '',
101
- startAmt: '',
102
- endAmt: '',
103
- startValueDate: '',
104
- endValueDate: '',
105
- status: '',
106
- tranDate: '',
107
- }
108
- }
109
-
110
97
  /** 将接口返回的可选字段统一转换为页面可直接使用的字符串字段。 */
111
98
  export function normalizeFundAllocationRow(
112
99
  source: Partial<ForeignCurrencyFundAllocationRow>,
@@ -14,7 +14,7 @@ function normalizeListBody(body: any, errorMessage: string): any {
14
14
  }
15
15
 
16
16
  return {
17
- resultList: body.resultInfos.map((row) => ({ ...row })),
17
+ resultList: body.resultInfos.map((row: any) => ({ ...row })),
18
18
  totalCount: normalizeCount(body.totalCount, body.resultInfos.length),
19
19
  totalPage: normalizeCount(body.totalPage, 0),
20
20
  }
@@ -78,7 +78,7 @@ const activeMoreFilterCount = computed(() => [
78
78
  filterForm.bankCode,
79
79
  filterForm.branchCode.trim(),
80
80
  filterForm.branchName.trim(),
81
- filterForm.amountRange.some((amount) => amount !== null) ? 'amountRange' : '',
81
+ filterForm.amountRange.some((amount: number | null) => amount !== null) ? 'amountRange' : '',
82
82
  ].filter(Boolean).length)
83
83
  const columnComponentMap: Record<string, string> = {
84
84
  ccy: 'TokenTag',
@@ -85,7 +85,7 @@ const activeMoreFilterCount = computed(() => [
85
85
  filterForm.bankCode,
86
86
  filterForm.branchCode.trim(),
87
87
  filterForm.branchName.trim(),
88
- filterForm.amountRange.some((amount) => amount !== null) ? 'amountRange' : '',
88
+ filterForm.amountRange.some((amount: number | null) => amount !== null) ? 'amountRange' : '',
89
89
  ].filter(Boolean).length)
90
90
  const columnComponentMap: Record<string, string> = {
91
91
  ccy: 'TokenTag',