minitest2.0 0.0.9 → 0.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minitest2.0",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {
@@ -7,53 +7,113 @@ import {
7
7
  import { useAppStore } from '@/stores/app'
8
8
 
9
9
  export type ForeignForecastRecord = {
10
- /** 业务类型。 */
10
+ /** 授权标志。 */
11
+ authorization?: string
12
+ /** 账户行。 */
13
+ bankAcct?: string
14
+ /** 旧接口业务类型字段,详情接口暂时兼容使用。 */
11
15
  busiType?: string
12
- /** 币种字段,不同后端版本可能返回不同命名。 */
16
+ /** 币种。 */
13
17
  ccy?: string
14
- currency?: string
15
- currencyCode?: string
16
- currCode?: string
17
- curType?: string
18
- tranCcy?: string
19
- /** 客户类型或客户名称,用于列表副标题兜底。 */
18
+ /** 客户账号。 */
19
+ clientAcct?: string
20
+ /** 客户名称。 */
20
21
  clientName?: string
21
- clientType?: string
22
+ /** 交易对手账号。 */
23
+ competAcct?: string
24
+ /** 交易对手 Swift Code。 */
25
+ competAcctSc?: string
26
+ /** 交易对手。 */
22
27
  competName?: string
23
- /** 交易对手或清算行信息。 */
24
- bankSwift?: string
25
- bicCode?: string
26
- routeCode?: string
27
- swiftCode?: string
28
- /** 落地机构,列表主标题展示字段。 */
28
+ /** 单证业务编号。 */
29
+ docBusinessno?: string
30
+ /** 兼容列表接口可能返回的旧字段名。 */
31
+ docbusinessno?: string
32
+ /** 落地机构。 */
29
33
  groundBranch?: string
34
+ /** 落地机构名称。 */
35
+ groundBranchName?: string
36
+ /** 中间行 Swift Code。 */
37
+ midBankSc?: string
38
+ /** 结汇、购汇或现汇。 */
39
+ originalForeign?: string
40
+ /** 收支方向。 */
41
+ payDirec?: string
42
+ /** 汇款路径。 */
43
+ paymentRoute?: string
44
+ /** 联系电话。 */
45
+ phoneNo?: string
30
46
  /** 预报金额,接口按元级金额返回,页面转换为万元级展示。 */
31
47
  predAmt?: string
48
+ /** 预报人编号。 */
49
+ predCode?: string
50
+ /** 预报时间。 */
51
+ predDate?: string
52
+ /** 预报机构。 */
53
+ predDept?: string
54
+ /** 预报人。 */
55
+ predName?: string
32
56
  /** 预报流水号,后续详情查询主键。 */
33
57
  predRefNo?: string
34
58
  /** 预报状态。 */
35
59
  predStatus?: string
36
- /** 交易日期。 */
60
+ /** 预报类型。 */
61
+ predType?: string
62
+ /** 预报方式。 */
63
+ predWay?: string
64
+ /** 交易对手行名称。 */
65
+ rcvBank?: string
66
+ /** 收款账号。 */
67
+ rcvAcct?: string
68
+ /** 收款人名称。 */
69
+ rcvName?: string
70
+ /** 交易对手行 Swift Code。 */
71
+ rcvBankSc?: string
72
+ /** 备注。 */
73
+ remark?: string
74
+ /** 起息日期。 */
37
75
  tranDate?: string
76
+ /** 业务类型。 */
77
+ tranType?: string
78
+ /** 未核销金额。 */
79
+ unverifyAmt?: string
80
+ /** 审批时间。 */
81
+ updateTime?: string
82
+ /** 核销金额。 */
83
+ verifyAmt?: string
38
84
  /** 核销状态。 */
39
85
  verifyStatus?: string
86
+ /** 兼容旧接口可能返回的币种字段。 */
87
+ currency?: string
88
+ currencyCode?: string
89
+ currCode?: string
90
+ curType?: string
91
+ tranCcy?: string
92
+ /** 兼容旧接口返回字段。 */
93
+ clientType?: string
94
+ bankSwift?: string
95
+ bicCode?: string
96
+ routeCode?: string
97
+ swiftCode?: string
40
98
  }
41
99
 
42
100
  export type ForeignForecastQueryForm = {
43
- /** 交易时间,当前视图必填筛选项。 */
101
+ /** 起息日。 */
44
102
  tranDate: string
45
- /** 落地机构关键字。 */
46
- groundBranch?: string
47
- /** 币种,当前后端交易未明确入参时页面做兼容筛选。 */
48
- currency?: string
103
+ /** 机构名称。 */
104
+ orgName?: string
105
+ /** 币种。 */
106
+ ccy?: string
49
107
  /** 业务类型。 */
50
- busiType?: string
108
+ tranType?: string
51
109
  /** 预报状态。 */
52
110
  predStatus?: string
111
+ /** 筛选 FTU 数据,否为空、是为 1。 */
112
+ filter?: string
53
113
  /** 起始金额,页面单位为万元。 */
54
- startTranAmt?: string
114
+ startAmt?: string
55
115
  /** 截止金额,页面单位为万元。 */
56
- endTranAmt?: string
116
+ endAmt?: string
57
117
  }
58
118
 
59
119
  export type ForeignForecastQueryPayload = {
@@ -79,23 +139,30 @@ export type ForeignForecastDetailResult = {
79
139
  }
80
140
 
81
141
  type ForeignForecastQueryBody = {
82
- busiType: string
142
+ amtOrder: number | ''
143
+ authorization: string
144
+ ccy: string
83
145
  clientName: string
84
- competName: string
85
- endTransAmt: string
86
- groundBranch: string
87
- payChannel: string
146
+ endAmt: string
147
+ filter: string
148
+ opType: string
149
+ orgName: string
150
+ originalForeign: string
88
151
  payDirec: string
152
+ predOrder: number | ''
89
153
  predStatus: string
90
- sortRule: string
91
- startTransAmt: string
154
+ predWay: string
155
+ startAmt: string
156
+ timeOrder: number | ''
92
157
  tranDate: string
158
+ tranType: string
93
159
  verifyStatus: string
94
160
  }
95
161
 
96
162
  type ForeignForecastQueryResultBody = {
97
- resultList: ForeignForecastRecord[]
163
+ resultInfos: ForeignForecastRecord[]
98
164
  totalCount: string
165
+ totalPage: string
99
166
  }
100
167
 
101
168
  type ForeignForecastDetailBody = {
@@ -148,8 +215,8 @@ type QueryOptions = {
148
215
  pageSize: number
149
216
  }
150
217
 
151
- const QUERY_TRAN_CODE = '/TAM/0001/140101001'
152
- const DETAIL_TRAN_CODE = '/TAM/0001/140101002'
218
+ const QUERY_TRAN_CODE = '/TAM/0001/140201001'
219
+ const DETAIL_TRAN_CODE = '/TAM/0001/140201004'
153
220
 
154
221
  export function buildForeignForecastQueryPayload({
155
222
  form,
@@ -163,17 +230,23 @@ export function buildForeignForecastQueryPayload({
163
230
  pageIndex,
164
231
  pageSize,
165
232
  body: {
166
- busiType: form.busiType || '',
233
+ amtOrder: '',
234
+ authorization: '',
235
+ ccy: form.ccy || '',
167
236
  clientName: '',
168
- competName: '',
169
- endTransAmt: toRequestAmount(form.endTranAmt),
170
- groundBranch: form.groundBranch || '',
171
- payChannel: '',
237
+ endAmt: toRequestAmount(form.endAmt),
238
+ filter: form.filter || '',
239
+ opType: '',
240
+ orgName: form.orgName || '',
241
+ originalForeign: '',
172
242
  payDirec: '',
243
+ predOrder: '',
173
244
  predStatus: form.predStatus || '',
174
- sortRule: '',
175
- startTransAmt: toRequestAmount(form.startTranAmt),
245
+ predWay: '',
246
+ startAmt: toRequestAmount(form.startAmt),
247
+ timeOrder: '',
176
248
  tranDate,
249
+ tranType: form.tranType || '',
177
250
  verifyStatus: '',
178
251
  },
179
252
  })
@@ -23,30 +23,59 @@ export const allForeignCurrencyOption: ForeignCurrencyOption = {
23
23
 
24
24
  export const foreignCurrencyOptions: ForeignCurrencyOption[] = [
25
25
  allForeignCurrencyOption,
26
- { label: '美元', shortLabel: '美元', value: 'USD', unit: '万美元' },
27
- { label: '欧元', shortLabel: '欧元', value: 'EUR', unit: '万欧元' },
28
- { label: '港币', shortLabel: '港币', value: 'HKD', unit: '万港币' },
29
- { label: '日元', shortLabel: '日元', value: 'JPY', unit: '万日元' },
30
- { label: '英镑', shortLabel: '英镑', value: 'GBP', unit: '万英镑' },
31
- { label: '加拿大元', shortLabel: '加元', value: 'CAD', unit: '万加元' },
32
- { label: '澳大利亚元', shortLabel: '澳元', value: 'AUD', unit: '万澳元' },
33
- { label: '新加坡元', shortLabel: '新元', value: 'SGD', unit: '万新元' },
34
- { label: '瑞士法郎', shortLabel: '瑞郎', value: 'CHF', unit: '万瑞郎' },
26
+ { label: 'CNY-人民币', shortLabel: '人民币', value: 'CNY', unit: '万元' },
27
+ { label: 'USD-美元', shortLabel: '美元', value: 'USD', unit: '万美元' },
28
+ { label: 'HKD-港元', shortLabel: '港元', value: 'HKD', unit: '万港元' },
29
+ { label: 'EUR-欧元', shortLabel: '欧元', value: 'EUR', unit: '万欧元' },
30
+ { label: 'AUD-澳大利亚元', shortLabel: '澳大利亚元', value: 'AUD', unit: '万澳大利亚元' },
31
+ { label: 'CHF-瑞士法郎', shortLabel: '瑞士法郎', value: 'CHF', unit: '万瑞士法郎' },
32
+ { label: 'GBP-英镑', shortLabel: '英镑', value: 'GBP', unit: '万英镑' },
33
+ { label: 'CAD-加拿大元', shortLabel: '加拿大元', value: 'CAD', unit: '万加拿大元' },
34
+ { label: 'NZD-新西兰元', shortLabel: '新西兰元', value: 'NZD', unit: '万新西兰元' },
35
+ { label: 'SGD-新加坡元', shortLabel: '新加坡元', value: 'SGD', unit: '万新加坡元' },
36
+ { label: 'JPY-日元', shortLabel: '日元', value: 'JPY', unit: '万日元' },
37
+ { label: 'SEK-瑞典克朗', shortLabel: '瑞典克朗', value: 'SEK', unit: '万瑞典克朗' },
38
+ { label: 'NOK-挪威克朗', shortLabel: '挪威克朗', value: 'NOK', unit: '万挪威克朗' },
39
+ { label: 'DKK-丹麦克朗', shortLabel: '丹麦克朗', value: 'DKK', unit: '万丹麦克朗' },
40
+ {
41
+ label: 'KZT-哈萨克斯坦坚戈',
42
+ shortLabel: '哈萨克斯坦坚戈',
43
+ value: 'KZT',
44
+ unit: '万哈萨克斯坦坚戈',
45
+ },
35
46
  ]
36
47
 
37
48
  export const allForeignBusinessOption: ForeignOption = { label: '全部业务类型', value: '' }
38
- export const defaultForeignBusinessOption: ForeignOption = { label: '普通汇款', value: '1' }
49
+ export const defaultForeignBusinessOption: ForeignOption = { label: '普通汇款', value: '10' }
39
50
 
40
51
  export const foreignBusinessOptions: ForeignOption[] = [
41
52
  allForeignBusinessOption,
42
53
  defaultForeignBusinessOption,
43
- { label: '外汇买卖', value: '2' },
44
- { label: '结售汇', value: '3' },
45
- { label: '资金调拨', value: '4' },
46
- { label: '同业业务', value: '5' },
47
- { label: '贸易融资', value: '6' },
54
+ { label: '单证业务', value: '11' },
55
+ { label: '同业/其他业务', value: '12' },
56
+ { label: '资金调拨', value: '13' },
48
57
  ]
49
58
 
59
+ export const foreignPayDirectionMap: Record<string, string> = {
60
+ I: '收入',
61
+ O: '支出',
62
+ }
63
+
64
+ export const foreignPaymentRouteMap: Record<string, string> = {
65
+ '01': '人行境内外币支付',
66
+ }
67
+
68
+ export const foreignClientTypeMap: Record<string, string> = {
69
+ CT01: '对公客户',
70
+ CT02: '个人客户',
71
+ }
72
+
73
+ export const foreignOriginalForeignMap: Record<string, string> = {
74
+ '01': '结汇',
75
+ '02': '购汇',
76
+ '03': '现汇',
77
+ }
78
+
50
79
  export const allForeignStatusOption: ForeignStatusOption = {
51
80
  label: '全部预报状态',
52
81
  value: '',
@@ -91,6 +120,22 @@ export function resolveForeignBusinessType(value?: string) {
91
120
  return foreignBusinessOptions.find((item) => item.value === value)?.label || value
92
121
  }
93
122
 
123
+ export function resolveForeignPayDirection(value?: string) {
124
+ return resolveForeignCode(foreignPayDirectionMap, value)
125
+ }
126
+
127
+ export function resolveForeignPaymentRoute(value?: string) {
128
+ return resolveForeignCode(foreignPaymentRouteMap, value)
129
+ }
130
+
131
+ export function resolveForeignClientType(value?: string) {
132
+ return resolveForeignCode(foreignClientTypeMap, value)
133
+ }
134
+
135
+ export function resolveForeignOriginalForeign(value?: string) {
136
+ return resolveForeignCode(foreignOriginalForeignMap, value)
137
+ }
138
+
94
139
  export function resolveForeignStatus(value?: string) {
95
140
  if (!value?.trim()) {
96
141
  return unknownForeignStatus
@@ -132,3 +177,8 @@ export function formatForeignForecastAmountYuanText(value?: string) {
132
177
  minimumFractionDigits: 2,
133
178
  })} 元`
134
179
  }
180
+
181
+ function resolveForeignCode(map: Record<string, string>, value?: string) {
182
+ const code = value?.trim()
183
+ return code ? map[code] || code : '-'
184
+ }
@@ -30,7 +30,7 @@ const form = reactive({
30
30
  tranDate: getInitialTranDate(),
31
31
  institution: '北京银行总行核算中心',
32
32
  currency: 'USD',
33
- business: '1',
33
+ business: '10',
34
34
  counterparty: '',
35
35
  amount: '',
36
36
  })