verce-vue-test 0.0.78 → 0.0.80

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.
@@ -0,0 +1,165 @@
1
+ import type { RmbPositionForecastRow } from './types'
2
+
3
+ function pad(value: number) {
4
+ return String(value).padStart(2, '0')
5
+ }
6
+
7
+ /** 返回本地日期的 YYYYMMDD 文本,offsetDays 可生成当天前后的交易日期。 */
8
+ export function getLocalDateString(offsetDays = 0) {
9
+ const date = new Date()
10
+ date.setHours(12, 0, 0, 0)
11
+ date.setDate(date.getDate() + offsetDays)
12
+ return `${date.getFullYear()}${pad(date.getMonth() + 1)}${pad(date.getDate())}`
13
+ }
14
+
15
+ function getLocalDateTimeString(offsetDays: number, time: string) {
16
+ const compactDate = getLocalDateString(offsetDays)
17
+ return `${compactDate.slice(0, 4)}-${compactDate.slice(4, 6)}-${compactDate.slice(6, 8)} ${time}`
18
+ }
19
+
20
+ /**
21
+ * 创建人民币头寸预报演示数据。
22
+ * 日期围绕调用时的本地当天生成,每次返回新数组,页面可安全执行筛选和排序。
23
+ */
24
+ export function createRmbPositionForecastMockRows(): RmbPositionForecastRow[] {
25
+ const dates = [
26
+ getLocalDateString(-4),
27
+ getLocalDateString(-3),
28
+ getLocalDateString(-2),
29
+ getLocalDateString(-1),
30
+ getLocalDateString(0),
31
+ getLocalDateString(1),
32
+ getLocalDateString(2),
33
+ getLocalDateString(3),
34
+ getLocalDateString(4),
35
+ ] as const
36
+
37
+ return [
38
+ {
39
+ predRefNo: `${dates[4]}000001`, predStatus: '1', tradeDate: dates[4], payDirection: '1', payChannel: '1',
40
+ verifyStatus: '1', predAmount: 328_000_000, verifyAmount: 0, groundBranch: '总行营业部',
41
+ groundBranchCode: '100001', clientType: '1', clientName: '华北能源集团有限公司',
42
+ counterpartyName: '国家电网有限公司', standardName: '集团客户大额收款',
43
+ counterpartyAccount: '110010010000100001', businessType: '1', forecastDate: getLocalDateTimeString(0, '09:18:26'),
44
+ },
45
+ {
46
+ predRefNo: `${dates[4]}000002`, predStatus: '2', tradeDate: dates[4], payDirection: '2', payChannel: '1',
47
+ verifyStatus: '3', predAmount: 186_500_000, verifyAmount: 80_000_000, groundBranch: '北京分行营业部',
48
+ groundBranchCode: '110001', clientType: '1', clientName: '京城建设发展有限公司',
49
+ counterpartyName: '中建工程有限公司', standardName: '工程款支付',
50
+ counterpartyAccount: '110010020000200002', businessType: '1', forecastDate: getLocalDateTimeString(0, '08:45:12'),
51
+ },
52
+ {
53
+ predRefNo: `${dates[5]}000003`, predStatus: '7', tradeDate: dates[5], payDirection: '1', payChannel: '2',
54
+ verifyStatus: '1', predAmount: 8_760_000, verifyAmount: 0, groundBranch: '上海分行营业部',
55
+ groundBranchCode: '310001', clientType: '2', clientName: '王海宁', counterpartyName: '东方置业有限公司',
56
+ standardName: '个人客户收款', counterpartyAccount: '310010030000300003', businessType: '1',
57
+ forecastDate: getLocalDateTimeString(0, '10:06:48'),
58
+ },
59
+ {
60
+ predRefNo: `${dates[3]}000004`, predStatus: '1', tradeDate: dates[3], payDirection: '2', payChannel: '3',
61
+ verifyStatus: '2', predAmount: 42_300_000, verifyAmount: 42_300_000, groundBranch: '深圳分行营业部',
62
+ groundBranchCode: '440301', clientType: '1', clientName: '南方贸易股份有限公司',
63
+ counterpartyName: '华润商业保理有限公司', standardName: '本票兑付',
64
+ counterpartyAccount: '440310040000400004', businessType: '2', forecastDate: getLocalDateTimeString(-1, '16:22:09'),
65
+ },
66
+ {
67
+ predRefNo: `${dates[6]}000005`, predStatus: '8', tradeDate: dates[6], payDirection: '1', payChannel: '4',
68
+ verifyStatus: '1', predAmount: 67_800_000, verifyAmount: 0, groundBranch: '广州分行营业部',
69
+ groundBranchCode: '440101', clientType: '1', clientName: '粤港供应链有限公司',
70
+ counterpartyName: '长三角制造有限公司', standardName: '三省一市汇票签发',
71
+ counterpartyAccount: '440110050000500005', businessType: '3', forecastDate: getLocalDateTimeString(0, '11:32:51'),
72
+ },
73
+ {
74
+ predRefNo: `${dates[4]}000006`, predStatus: '2', tradeDate: dates[4], payDirection: '2', payChannel: '1',
75
+ verifyStatus: '1', predAmount: 510_000_000, verifyAmount: 0, groundBranch: '杭州分行营业部',
76
+ groundBranchCode: '330101', clientType: '3', clientName: '', counterpartyName: '总行清算中心',
77
+ standardName: '分行资金调拨', counterpartyAccount: '330110060000600006', businessType: '4',
78
+ forecastDate: getLocalDateTimeString(0, '07:55:36'),
79
+ },
80
+ {
81
+ predRefNo: `${dates[2]}000007`, predStatus: '3', tradeDate: dates[2], payDirection: '1', payChannel: '1',
82
+ verifyStatus: '1', predAmount: 235_000_000, verifyAmount: 0, groundBranch: '成都分行营业部',
83
+ groundBranchCode: '510101', clientType: '5', clientName: '西南城商行', counterpartyName: '总行同业中心',
84
+ standardName: '同业拆借到期', counterpartyAccount: '510110070000700007', businessType: '5',
85
+ forecastDate: getLocalDateTimeString(-2, '14:40:18'),
86
+ },
87
+ {
88
+ predRefNo: `${dates[5]}000008`, predStatus: '1', tradeDate: dates[5], payDirection: '2', payChannel: '1',
89
+ verifyStatus: '3', predAmount: 960_000_000, verifyAmount: 420_000_000, groundBranch: '南京分行营业部',
90
+ groundBranchCode: '320101', clientType: '4', clientName: '', counterpartyName: '中央国债登记结算有限公司',
91
+ standardName: '资金业务付款', counterpartyAccount: '320110080000800008', businessType: '6',
92
+ forecastDate: getLocalDateTimeString(0, '13:12:45'),
93
+ },
94
+ {
95
+ predRefNo: `${dates[7]}000009`, predStatus: '7', tradeDate: dates[7], payDirection: '1', payChannel: '2',
96
+ verifyStatus: '1', predAmount: 128_500_000, verifyAmount: 0, groundBranch: '武汉分行营业部',
97
+ groundBranchCode: '420101', clientType: '1', clientName: '稳健财富管理有限公司',
98
+ counterpartyName: '总行理财中心', standardName: '理财产品到期',
99
+ counterpartyAccount: '420110090000900009', businessType: '7', forecastDate: getLocalDateTimeString(1, '09:30:00'),
100
+ },
101
+ {
102
+ predRefNo: `${dates[3]}000010`, predStatus: '4', tradeDate: dates[3], payDirection: '2', payChannel: '1',
103
+ verifyStatus: '1', predAmount: 75_000_000, verifyAmount: 0, groundBranch: '西安分行营业部',
104
+ groundBranchCode: '610101', clientType: '1', clientName: '长安证券股份有限公司',
105
+ counterpartyName: '华夏债券承销有限公司', standardName: '债券承销划款',
106
+ counterpartyAccount: '610110100001000010', businessType: '8', forecastDate: getLocalDateTimeString(-1, '15:05:33'),
107
+ },
108
+ {
109
+ predRefNo: `${dates[4]}000011`, predStatus: '1', tradeDate: dates[4], payDirection: '1', payChannel: '7',
110
+ verifyStatus: '2', predAmount: 31_260_000, verifyAmount: 31_260_000, groundBranch: '苏州分行营业部',
111
+ groundBranchCode: '320501', clientType: '1', clientName: '江南数字科技有限公司',
112
+ counterpartyName: '企业司库平台', standardName: '司库归集收入',
113
+ counterpartyAccount: '320510110001100011', businessType: '9', forecastDate: getLocalDateTimeString(0, '12:16:08'),
114
+ },
115
+ {
116
+ predRefNo: `${dates[1]}000012`, predStatus: '5', tradeDate: dates[1], payDirection: '2', payChannel: '4',
117
+ verifyStatus: '1', predAmount: 12_800_000, verifyAmount: 0, groundBranch: '天津分行营业部',
118
+ groundBranchCode: '120001', clientType: '3', clientName: '', counterpartyName: '人民银行发行库',
119
+ standardName: '现金出库', counterpartyAccount: '120010120001200012', businessType: '10',
120
+ forecastDate: getLocalDateTimeString(-3, '17:28:41'),
121
+ },
122
+ {
123
+ predRefNo: `${dates[4]}000013`, predStatus: '2', tradeDate: dates[4], payDirection: '1', payChannel: '1',
124
+ verifyStatus: '3', predAmount: 345_000_000, verifyAmount: 120_000_000, groundBranch: '重庆分行营业部',
125
+ groundBranchCode: '500001', clientType: '4', clientName: '', counterpartyName: '中国人民银行重庆市分行',
126
+ standardName: '财政准备金退缴', counterpartyAccount: '500010130001300013', businessType: '11',
127
+ forecastDate: getLocalDateTimeString(0, '10:48:20'),
128
+ },
129
+ {
130
+ predRefNo: `${dates[6]}000014`, predStatus: '1', tradeDate: dates[6], payDirection: '2', payChannel: '1',
131
+ verifyStatus: '1', predAmount: 684_000_000, verifyAmount: 0, groundBranch: '青岛分行营业部',
132
+ groundBranchCode: '370201', clientType: '5', clientName: '环渤海农商行', counterpartyName: '总行清算中心',
133
+ standardName: '同业清算款项支出', counterpartyAccount: '370210140001400014', businessType: '12',
134
+ forecastDate: getLocalDateTimeString(0, '14:08:17'),
135
+ },
136
+ {
137
+ predRefNo: `${dates[8]}000015`, predStatus: '7', tradeDate: dates[8], payDirection: '1', payChannel: '2',
138
+ verifyStatus: '1', predAmount: 26_900_000, verifyAmount: 0, groundBranch: '长沙分行营业部',
139
+ groundBranchCode: '430101', clientType: '3', clientName: '', counterpartyName: '湖南省财政厅',
140
+ standardName: '财政零余额归集', counterpartyAccount: '430110150001500015', businessType: '13',
141
+ forecastDate: getLocalDateTimeString(1, '16:42:05'),
142
+ },
143
+ {
144
+ predRefNo: `${dates[2]}000016`, predStatus: '3', tradeDate: dates[2], payDirection: '2', payChannel: '3',
145
+ verifyStatus: '1', predAmount: 58_600_000, verifyAmount: 0, groundBranch: '郑州分行营业部',
146
+ groundBranchCode: '410101', clientType: '1', clientName: '中原装备制造有限公司',
147
+ counterpartyName: '豫商票据服务有限公司', standardName: '银行承兑汇票兑付',
148
+ counterpartyAccount: '410110160001600016', businessType: '14', forecastDate: getLocalDateTimeString(-2, '11:27:14'),
149
+ },
150
+ {
151
+ predRefNo: `${dates[5]}000017`, predStatus: '1', tradeDate: dates[5], payDirection: '1', payChannel: '1',
152
+ verifyStatus: '2', predAmount: 420_000_000, verifyAmount: 420_000_000, groundBranch: '厦门分行营业部',
153
+ groundBranchCode: '350201', clientType: '1', clientName: '海峡资产管理有限公司',
154
+ counterpartyName: '中央证券托管机构', standardName: '托管资金收入',
155
+ counterpartyAccount: '350210170001700017', businessType: '15', forecastDate: getLocalDateTimeString(0, '09:52:39'),
156
+ },
157
+ {
158
+ predRefNo: `${dates[3]}000018`, predStatus: '2', tradeDate: dates[3], payDirection: '2', payChannel: '3',
159
+ verifyStatus: '3', predAmount: 93_200_000, verifyAmount: 36_000_000, groundBranch: '福州分行营业部',
160
+ groundBranchCode: '350101', clientType: '1', clientName: '闽都供应链股份有限公司',
161
+ counterpartyName: '海峡票据交易中心', standardName: '票据业务付款',
162
+ counterpartyAccount: '350110180001800018', businessType: '16', forecastDate: getLocalDateTimeString(-1, '13:38:57'),
163
+ },
164
+ ]
165
+ }
@@ -0,0 +1,82 @@
1
+ import type {
2
+ RmbPositionBusinessType,
3
+ RmbPositionClientType,
4
+ RmbPositionDeleteStatus,
5
+ RmbPositionForecastStatus,
6
+ RmbPositionPayChannel,
7
+ RmbPositionPayDirection,
8
+ RmbPositionSortRule,
9
+ RmbPositionVerifyStatus,
10
+ } from './types'
11
+
12
+ /** Element Plus Select 可直接使用的通用选项。 */
13
+ export type SelectOption<T extends string = string> = {
14
+ value: T
15
+ label: string
16
+ }
17
+
18
+ export const payDirectionOptions = [
19
+ { value: '1', label: '收入' },
20
+ { value: '2', label: '支出' },
21
+ ] satisfies SelectOption<RmbPositionPayDirection>[]
22
+
23
+ export const payChannelOptions = [
24
+ { value: '1', label: '大额支付' },
25
+ { value: '2', label: '小额支付' },
26
+ { value: '3', label: '票据交换' },
27
+ { value: '4', label: '同城支付' },
28
+ { value: '7', label: '网联支付' },
29
+ ] satisfies SelectOption<RmbPositionPayChannel>[]
30
+
31
+ export const deleteStatusOptions = [
32
+ { value: '1', label: '已删除' },
33
+ { value: '2', label: '未删除' },
34
+ ] satisfies SelectOption<RmbPositionDeleteStatus>[]
35
+
36
+ export const verifyStatusOptions = [
37
+ { value: '1', label: '未核销' },
38
+ { value: '2', label: '已核销' },
39
+ { value: '3', label: '部分核销' },
40
+ ] satisfies SelectOption<RmbPositionVerifyStatus>[]
41
+
42
+ export const sortRuleOptions = [
43
+ { value: '1', label: '预报时间降序' },
44
+ { value: '2', label: '预报金额降序' },
45
+ ] satisfies SelectOption<RmbPositionSortRule>[]
46
+
47
+ export const clientTypeOptions = [
48
+ { value: '1', label: '对公客户' },
49
+ { value: '2', label: '个人客户' },
50
+ { value: '3', label: '' },
51
+ { value: '4', label: '' },
52
+ { value: '5', label: '其他' },
53
+ ] satisfies SelectOption<RmbPositionClientType>[]
54
+
55
+ export const businessTypeOptions = [
56
+ { value: '1', label: '对公/个人客户收付' },
57
+ { value: '2', label: '本票签发/兑付' },
58
+ { value: '3', label: '三省一市汇票签发/兑付' },
59
+ { value: '4', label: '分行资金调拨' },
60
+ { value: '5', label: '同业业务' },
61
+ { value: '6', label: '资金业务' },
62
+ { value: '7', label: '理财业务' },
63
+ { value: '8', label: '债券承销业务' },
64
+ { value: '9', label: '司库业务' },
65
+ { value: '10', label: '现金出入库' },
66
+ { value: '11', label: '财政准备金退缴' },
67
+ { value: '12', label: '同业清算款项收付' },
68
+ { value: '13', label: '财政零余额业务' },
69
+ { value: '14', label: '银行承兑汇票' },
70
+ { value: '15', label: '托管业务' },
71
+ { value: '16', label: '票据业务' },
72
+ ] satisfies SelectOption<RmbPositionBusinessType>[]
73
+
74
+ export const forecastStatusOptions = [
75
+ { value: '1', label: '正常预报' },
76
+ { value: '2', label: '已同步' },
77
+ { value: '3', label: '已删除' },
78
+ { value: '4', label: '修改后删除' },
79
+ { value: '5', label: '复制后删除' },
80
+ { value: '7', label: '待同步' },
81
+ { value: '8', label: '同步失败' },
82
+ ] satisfies SelectOption<RmbPositionForecastStatus>[]
@@ -0,0 +1,110 @@
1
+ /** JSP 头寸预报页使用的收支方向编码。 */
2
+ export type RmbPositionPayDirection = '1' | '2'
3
+
4
+ /** 支付渠道编码:大额、小额、票据交换、同城及网联。 */
5
+ export type RmbPositionPayChannel = '1' | '2' | '3' | '4' | '7'
6
+
7
+ /** JSP `isDelete` 筛选值:1 已删除,2 未删除。 */
8
+ export type RmbPositionDeleteStatus = '1' | '2'
9
+
10
+ /** 核销状态编码。 */
11
+ export type RmbPositionVerifyStatus = '1' | '2' | '3'
12
+
13
+ /** 列表排序规则。 */
14
+ export type RmbPositionSortRule = '1' | '2'
15
+
16
+ /** JSP `VERIFY_FLAG` 字段承载的客户类型编码。 */
17
+ export type RmbPositionClientType = '1' | '2' | '3' | '4' | '5'
18
+
19
+ /** 人民币头寸预报业务类型编码。 */
20
+ export type RmbPositionBusinessType =
21
+ | '1'
22
+ | '2'
23
+ | '3'
24
+ | '4'
25
+ | '5'
26
+ | '6'
27
+ | '7'
28
+ | '8'
29
+ | '9'
30
+ | '10'
31
+ | '11'
32
+ | '12'
33
+ | '13'
34
+ | '14'
35
+ | '15'
36
+ | '16'
37
+
38
+ /**
39
+ * JSP 列表实际使用的预报状态。
40
+ * 状态 1、2 为有效记录,3、4、5 为删除相关状态,7、8 为同步相关状态。
41
+ */
42
+ export type RmbPositionForecastStatus = '1' | '2' | '3' | '4' | '5' | '7' | '8'
43
+
44
+ /** 查询表单状态;金额范围沿用 JSP 的“万元”输入单位。 */
45
+ export type RmbPositionForecastFilter = {
46
+ /** 交易日期,格式 YYYYMMDD。 */
47
+ tradeDate: string
48
+ payDirection: '' | RmbPositionPayDirection
49
+ payChannel: '' | RmbPositionPayChannel
50
+ groundBranch: string
51
+ deleteStatus: '' | RmbPositionDeleteStatus
52
+ verifyStatuses: RmbPositionVerifyStatus[]
53
+ sortRule: '' | RmbPositionSortRule
54
+ clientName: string
55
+ counterpartyName: string
56
+ businessType: '' | RmbPositionBusinessType
57
+ minAmountWan: number | null
58
+ maxAmountWan: number | null
59
+ }
60
+
61
+ /** JSP `predictStore` 对应的人民币头寸预报列表行。 */
62
+ export type RmbPositionForecastRow = {
63
+ predRefNo: string
64
+ predStatus: RmbPositionForecastStatus
65
+ /** 交易日期,格式 YYYYMMDD。 */
66
+ tradeDate: string
67
+ payDirection: RmbPositionPayDirection
68
+ payChannel: RmbPositionPayChannel
69
+ verifyStatus: RmbPositionVerifyStatus
70
+ /** 金额单位为元。 */
71
+ predAmount: number
72
+ /** 金额单位为元。 */
73
+ verifyAmount: number
74
+ groundBranch: string
75
+ groundBranchCode: string
76
+ clientType: RmbPositionClientType
77
+ clientName: string
78
+ counterpartyName: string
79
+ standardName: string
80
+ counterpartyAccount: string
81
+ businessType: RmbPositionBusinessType
82
+ /** 预报日期时间,格式 YYYY-MM-DD HH:mm:ss。 */
83
+ forecastDate: string
84
+ }
85
+
86
+ /** 列表查询的标准分页结果。 */
87
+ export type RmbPositionForecastListResult = {
88
+ result: RmbPositionForecastRow[]
89
+ totalCount: number
90
+ }
91
+
92
+ /** 创建页面默认查询条件。 */
93
+ export function createDefaultRmbPositionForecastFilter(
94
+ tradeDate = '',
95
+ ): RmbPositionForecastFilter {
96
+ return {
97
+ tradeDate,
98
+ payDirection: '',
99
+ payChannel: '',
100
+ groundBranch: '',
101
+ deleteStatus: '',
102
+ verifyStatuses: [],
103
+ sortRule: '1',
104
+ clientName: '',
105
+ counterpartyName: '',
106
+ businessType: '',
107
+ minAmountWan: null,
108
+ maxAmountWan: null,
109
+ }
110
+ }