verce-vue-test 0.0.130 → 0.0.132
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 +3 -0
- package/package.json +1 -1
- package/src/router/index.ts +0 -27
- package/src/views/ForecastInfo/RmbPositionSettlement.vue +110 -30
- package/src/views/ForecastInfo/api.ts +80 -5
- package/src/views/ForecastInfo/useForecastInfoState.ts +26 -3
- package/src/views/rmb-position-forecast/api.ts +16 -20
- package/src/views/rmb-position-forecast/components/RmbPositionForecastEditor.vue +83 -114
- package/src/views/rmb-position-forecast/detail.vue +186 -235
- package/src/views/rmb-position-forecast/form.vue +28 -32
- package/src/views/rmb-position-forecast/index.vue +191 -111
- package/src/views/rmb-position-forecast/model.ts +41 -42
- package/src/views/rmb-position-forecast/runtime.ts +103 -53
package/env.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ declare global {
|
|
|
10
10
|
readonly VITE_TAM_USER_NAME?: string
|
|
11
11
|
readonly VITE_TAM_USER_PHONE?: string
|
|
12
12
|
readonly VITE_TAM_USER_ROLES?: string
|
|
13
|
+
readonly VITE_TAM_PRE_CHECK_AMOUNT?: string
|
|
14
|
+
readonly VITE_TAM_VERIFY_UPDATE_START?: string
|
|
15
|
+
readonly VITE_TAM_VERIFY_UPDATE_END?: string
|
|
13
16
|
readonly VITE_TAM_CLIENT_IP?: string
|
|
14
17
|
}
|
|
15
18
|
|
package/package.json
CHANGED
package/src/router/index.ts
CHANGED
|
@@ -81,33 +81,6 @@ const router = createRouter({
|
|
|
81
81
|
name: 'rmbPositionForecast',
|
|
82
82
|
component: () => import('../views/rmb-position-forecast/index.vue'),
|
|
83
83
|
},
|
|
84
|
-
{
|
|
85
|
-
path: '/rmb-position-forecast/create',
|
|
86
|
-
name: 'rmbPositionForecastCreate',
|
|
87
|
-
meta: { activeMenu: '/rmb-position-forecast' },
|
|
88
|
-
component: () => import('../views/rmb-position-forecast/form.vue'),
|
|
89
|
-
props: { mode: 'add' },
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
path: '/rmb-position-forecast/edit/:predRefNo',
|
|
93
|
-
name: 'rmbPositionForecastEdit',
|
|
94
|
-
meta: { activeMenu: '/rmb-position-forecast' },
|
|
95
|
-
component: () => import('../views/rmb-position-forecast/form.vue'),
|
|
96
|
-
props: { mode: 'edit' },
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
path: '/rmb-position-forecast/copy/:predRefNo',
|
|
100
|
-
name: 'rmbPositionForecastCopy',
|
|
101
|
-
meta: { activeMenu: '/rmb-position-forecast' },
|
|
102
|
-
component: () => import('../views/rmb-position-forecast/form.vue'),
|
|
103
|
-
props: { mode: 'copy' },
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
path: '/rmb-position-forecast/detail/:predRefNo',
|
|
107
|
-
name: 'rmbPositionForecastDetail',
|
|
108
|
-
meta: { activeMenu: '/rmb-position-forecast' },
|
|
109
|
-
component: () => import('../views/rmb-position-forecast/detail.vue'),
|
|
110
|
-
},
|
|
111
84
|
{
|
|
112
85
|
path: '/foreign-currency-position-forecast',
|
|
113
86
|
name: 'foreignCurrencyPositionForecast',
|
|
@@ -235,6 +235,35 @@ function resetFlowForm() {
|
|
|
235
235
|
Object.assign(flowForm, createDefaultFlowForm())
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
function normalizeFilterSelectValue(value: unknown) {
|
|
239
|
+
return toQueryText(value)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** 抽屉销毁后重新挂载时,统一把枚举回填值规范为选项使用的字符串编码。 */
|
|
243
|
+
function normalizeForecastFilterValues() {
|
|
244
|
+
forecastForm.direction = normalizeFilterSelectValue(forecastForm.direction)
|
|
245
|
+
forecastForm.businessType = normalizeFilterSelectValue(forecastForm.businessType)
|
|
246
|
+
forecastForm.channel = normalizeFilterSelectValue(forecastForm.channel)
|
|
247
|
+
forecastForm.verification = normalizeFilterSelectValue(forecastForm.verification)
|
|
248
|
+
forecastForm.organization = normalizeFilterSelectValue(forecastForm.organization)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function normalizeFlowFilterValues() {
|
|
252
|
+
flowForm.payDirec = normalizeFilterSelectValue(flowForm.payDirec)
|
|
253
|
+
flowForm.verifyStatus = normalizeFilterSelectValue(flowForm.verifyStatus)
|
|
254
|
+
flowForm.groundBranch = normalizeFilterSelectValue(flowForm.groundBranch)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function openForecastFilterDrawer() {
|
|
258
|
+
normalizeForecastFilterValues()
|
|
259
|
+
forecastDrawerVisible.value = true
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function openFlowFilterDrawer() {
|
|
263
|
+
normalizeFlowFilterValues()
|
|
264
|
+
flowDrawerVisible.value = true
|
|
265
|
+
}
|
|
266
|
+
|
|
238
267
|
function buildForecastQueryParams(): ForecastInfoQueryParams {
|
|
239
268
|
const [startTransAmt, endTransAmt] = forecastForm.amountRange
|
|
240
269
|
const selectedOrganization = organizationOptions.find(
|
|
@@ -334,6 +363,13 @@ function handleFlowReset() {
|
|
|
334
363
|
pageMessage.info('流水筛选条件已重置')
|
|
335
364
|
}
|
|
336
365
|
|
|
366
|
+
/** 卡片布局改变后,使用新布局的默认分页条数重新查询两张表。 */
|
|
367
|
+
function handleCardLayoutChange(layout: ForecastInfoCardLayout) {
|
|
368
|
+
if (!forecastInfoStore.setCardLayout(layout)) return
|
|
369
|
+
void queryForecastInfo(false)
|
|
370
|
+
void queryFlowInfo(false)
|
|
371
|
+
}
|
|
372
|
+
|
|
337
373
|
/** 已核销且核销金额严格大于预报金额时,才允许修改预报金额。 */
|
|
338
374
|
function canModifyForecast(row: ForecastInfoRow) {
|
|
339
375
|
return (
|
|
@@ -626,7 +662,7 @@ onBeforeUnmount(() => {
|
|
|
626
662
|
role="radio"
|
|
627
663
|
:aria-label="option.label"
|
|
628
664
|
:aria-checked="cardLayout === option.value"
|
|
629
|
-
@click="
|
|
665
|
+
@click="handleCardLayoutChange(option.value)"
|
|
630
666
|
>
|
|
631
667
|
<el-icon>
|
|
632
668
|
<component :is="option.icon" />
|
|
@@ -659,12 +695,16 @@ onBeforeUnmount(() => {
|
|
|
659
695
|
<el-select
|
|
660
696
|
v-model="forecastForm.direction"
|
|
661
697
|
:append-to="overlayContainer || undefined"
|
|
662
|
-
:persistent="false"
|
|
663
698
|
size="small"
|
|
664
699
|
placeholder="请选择"
|
|
665
700
|
clearable
|
|
666
701
|
>
|
|
667
|
-
<el-option
|
|
702
|
+
<el-option
|
|
703
|
+
v-for="option in forecastDirectionOptions"
|
|
704
|
+
:key="option.value"
|
|
705
|
+
:label="option.label"
|
|
706
|
+
:value="option.value"
|
|
707
|
+
/>
|
|
668
708
|
</el-select>
|
|
669
709
|
</label>
|
|
670
710
|
|
|
@@ -673,12 +713,16 @@ onBeforeUnmount(() => {
|
|
|
673
713
|
<el-select
|
|
674
714
|
v-model="forecastForm.businessType"
|
|
675
715
|
:append-to="overlayContainer || undefined"
|
|
676
|
-
:persistent="false"
|
|
677
716
|
size="small"
|
|
678
717
|
placeholder="请选择"
|
|
679
718
|
clearable
|
|
680
719
|
>
|
|
681
|
-
<el-option
|
|
720
|
+
<el-option
|
|
721
|
+
v-for="option in businessTypeOptions"
|
|
722
|
+
:key="option.value"
|
|
723
|
+
:label="option.label"
|
|
724
|
+
:value="option.value"
|
|
725
|
+
/>
|
|
682
726
|
</el-select>
|
|
683
727
|
</label>
|
|
684
728
|
|
|
@@ -687,7 +731,6 @@ onBeforeUnmount(() => {
|
|
|
687
731
|
<el-select
|
|
688
732
|
v-model="forecastForm.verification"
|
|
689
733
|
:append-to="overlayContainer || undefined"
|
|
690
|
-
:persistent="false"
|
|
691
734
|
size="small"
|
|
692
735
|
placeholder="请选择"
|
|
693
736
|
clearable
|
|
@@ -695,7 +738,8 @@ onBeforeUnmount(() => {
|
|
|
695
738
|
<el-option
|
|
696
739
|
v-for="option in forecastVerifyStatusFilterOptions"
|
|
697
740
|
:key="option.value"
|
|
698
|
-
|
|
741
|
+
:label="option.label"
|
|
742
|
+
:value="option.value"
|
|
699
743
|
/>
|
|
700
744
|
</el-select>
|
|
701
745
|
</label>
|
|
@@ -704,7 +748,7 @@ onBeforeUnmount(() => {
|
|
|
704
748
|
<div class="forecast-info-filter__actions">
|
|
705
749
|
<el-button type="primary" size="small" :icon="Search" @click="handleForecastQuery">查询</el-button>
|
|
706
750
|
<el-button size="small" @click="handleForecastReset">重置</el-button>
|
|
707
|
-
<el-button size="small" @click="
|
|
751
|
+
<el-button size="small" @click="openForecastFilterDrawer">更多筛选</el-button>
|
|
708
752
|
</div>
|
|
709
753
|
</div>
|
|
710
754
|
|
|
@@ -1023,12 +1067,16 @@ onBeforeUnmount(() => {
|
|
|
1023
1067
|
<el-select
|
|
1024
1068
|
v-model="forecastForm.direction"
|
|
1025
1069
|
:append-to="overlayContainer || undefined"
|
|
1026
|
-
:persistent="false"
|
|
1027
1070
|
size="small"
|
|
1028
1071
|
placeholder="请选择"
|
|
1029
1072
|
clearable
|
|
1030
1073
|
>
|
|
1031
|
-
<el-option
|
|
1074
|
+
<el-option
|
|
1075
|
+
v-for="option in forecastDirectionOptions"
|
|
1076
|
+
:key="option.value"
|
|
1077
|
+
:label="option.label"
|
|
1078
|
+
:value="option.value"
|
|
1079
|
+
/>
|
|
1032
1080
|
</el-select>
|
|
1033
1081
|
</label>
|
|
1034
1082
|
|
|
@@ -1037,12 +1085,16 @@ onBeforeUnmount(() => {
|
|
|
1037
1085
|
<el-select
|
|
1038
1086
|
v-model="forecastForm.businessType"
|
|
1039
1087
|
:append-to="overlayContainer || undefined"
|
|
1040
|
-
:persistent="false"
|
|
1041
1088
|
size="small"
|
|
1042
1089
|
placeholder="请选择"
|
|
1043
1090
|
clearable
|
|
1044
1091
|
>
|
|
1045
|
-
<el-option
|
|
1092
|
+
<el-option
|
|
1093
|
+
v-for="option in businessTypeOptions"
|
|
1094
|
+
:key="option.value"
|
|
1095
|
+
:label="option.label"
|
|
1096
|
+
:value="option.value"
|
|
1097
|
+
/>
|
|
1046
1098
|
</el-select>
|
|
1047
1099
|
</label>
|
|
1048
1100
|
|
|
@@ -1065,12 +1117,16 @@ onBeforeUnmount(() => {
|
|
|
1065
1117
|
<el-select
|
|
1066
1118
|
v-model="forecastForm.channel"
|
|
1067
1119
|
:append-to="overlayContainer || undefined"
|
|
1068
|
-
:persistent="false"
|
|
1069
1120
|
size="small"
|
|
1070
1121
|
placeholder="请选择"
|
|
1071
1122
|
clearable
|
|
1072
1123
|
>
|
|
1073
|
-
<el-option
|
|
1124
|
+
<el-option
|
|
1125
|
+
v-for="option in channelOptions"
|
|
1126
|
+
:key="option.value"
|
|
1127
|
+
:label="option.label"
|
|
1128
|
+
:value="option.value"
|
|
1129
|
+
/>
|
|
1074
1130
|
</el-select>
|
|
1075
1131
|
</label>
|
|
1076
1132
|
|
|
@@ -1079,7 +1135,6 @@ onBeforeUnmount(() => {
|
|
|
1079
1135
|
<el-select
|
|
1080
1136
|
v-model="forecastForm.verification"
|
|
1081
1137
|
:append-to="overlayContainer || undefined"
|
|
1082
|
-
:persistent="false"
|
|
1083
1138
|
size="small"
|
|
1084
1139
|
placeholder="请选择"
|
|
1085
1140
|
clearable
|
|
@@ -1087,7 +1142,8 @@ onBeforeUnmount(() => {
|
|
|
1087
1142
|
<el-option
|
|
1088
1143
|
v-for="option in forecastVerifyStatusFilterOptions"
|
|
1089
1144
|
:key="option.value"
|
|
1090
|
-
|
|
1145
|
+
:label="option.label"
|
|
1146
|
+
:value="option.value"
|
|
1091
1147
|
/>
|
|
1092
1148
|
</el-select>
|
|
1093
1149
|
</label>
|
|
@@ -1117,12 +1173,16 @@ onBeforeUnmount(() => {
|
|
|
1117
1173
|
<el-select
|
|
1118
1174
|
v-model="forecastForm.organization"
|
|
1119
1175
|
:append-to="overlayContainer || undefined"
|
|
1120
|
-
:persistent="false"
|
|
1121
1176
|
size="small"
|
|
1122
1177
|
placeholder="请选择"
|
|
1123
1178
|
clearable
|
|
1124
1179
|
>
|
|
1125
|
-
<el-option
|
|
1180
|
+
<el-option
|
|
1181
|
+
v-for="option in organizationOptions"
|
|
1182
|
+
:key="option.value"
|
|
1183
|
+
:label="option.label"
|
|
1184
|
+
:value="option.value"
|
|
1185
|
+
/>
|
|
1126
1186
|
</el-select>
|
|
1127
1187
|
</label>
|
|
1128
1188
|
</div>
|
|
@@ -1174,7 +1234,7 @@ onBeforeUnmount(() => {
|
|
|
1174
1234
|
role="radio"
|
|
1175
1235
|
:aria-label="option.label"
|
|
1176
1236
|
:aria-checked="cardLayout === option.value"
|
|
1177
|
-
@click="
|
|
1237
|
+
@click="handleCardLayoutChange(option.value)"
|
|
1178
1238
|
>
|
|
1179
1239
|
<el-icon>
|
|
1180
1240
|
<component :is="option.icon" />
|
|
@@ -1207,12 +1267,16 @@ onBeforeUnmount(() => {
|
|
|
1207
1267
|
<el-select
|
|
1208
1268
|
v-model="flowForm.payDirec"
|
|
1209
1269
|
:append-to="overlayContainer || undefined"
|
|
1210
|
-
:persistent="false"
|
|
1211
1270
|
size="small"
|
|
1212
1271
|
placeholder="请选择"
|
|
1213
1272
|
clearable
|
|
1214
1273
|
>
|
|
1215
|
-
<el-option
|
|
1274
|
+
<el-option
|
|
1275
|
+
v-for="option in flowDirectionOptions"
|
|
1276
|
+
:key="option.value"
|
|
1277
|
+
:label="option.label"
|
|
1278
|
+
:value="option.value"
|
|
1279
|
+
/>
|
|
1216
1280
|
</el-select>
|
|
1217
1281
|
</label>
|
|
1218
1282
|
|
|
@@ -1226,12 +1290,16 @@ onBeforeUnmount(() => {
|
|
|
1226
1290
|
<el-select
|
|
1227
1291
|
v-model="flowForm.verifyStatus"
|
|
1228
1292
|
:append-to="overlayContainer || undefined"
|
|
1229
|
-
:persistent="false"
|
|
1230
1293
|
size="small"
|
|
1231
1294
|
placeholder="请选择"
|
|
1232
1295
|
clearable
|
|
1233
1296
|
>
|
|
1234
|
-
<el-option
|
|
1297
|
+
<el-option
|
|
1298
|
+
v-for="option in flowStatusOptions"
|
|
1299
|
+
:key="option.value"
|
|
1300
|
+
:label="option.label"
|
|
1301
|
+
:value="option.value"
|
|
1302
|
+
/>
|
|
1235
1303
|
</el-select>
|
|
1236
1304
|
</label>
|
|
1237
1305
|
</div>
|
|
@@ -1239,7 +1307,7 @@ onBeforeUnmount(() => {
|
|
|
1239
1307
|
<div class="forecast-info-filter__actions">
|
|
1240
1308
|
<el-button type="primary" size="small" :icon="Search" @click="handleFlowQuery">查询</el-button>
|
|
1241
1309
|
<el-button size="small" @click="handleFlowReset">重置</el-button>
|
|
1242
|
-
<el-button size="small" @click="
|
|
1310
|
+
<el-button size="small" @click="openFlowFilterDrawer">更多筛选</el-button>
|
|
1243
1311
|
</div>
|
|
1244
1312
|
</div>
|
|
1245
1313
|
|
|
@@ -1347,12 +1415,16 @@ onBeforeUnmount(() => {
|
|
|
1347
1415
|
<el-select
|
|
1348
1416
|
v-model="flowForm.payDirec"
|
|
1349
1417
|
:append-to="overlayContainer || undefined"
|
|
1350
|
-
:persistent="false"
|
|
1351
1418
|
size="small"
|
|
1352
1419
|
placeholder="请选择"
|
|
1353
1420
|
clearable
|
|
1354
1421
|
>
|
|
1355
|
-
<el-option
|
|
1422
|
+
<el-option
|
|
1423
|
+
v-for="option in flowDirectionOptions"
|
|
1424
|
+
:key="option.value"
|
|
1425
|
+
:label="option.label"
|
|
1426
|
+
:value="option.value"
|
|
1427
|
+
/>
|
|
1356
1428
|
</el-select>
|
|
1357
1429
|
</label>
|
|
1358
1430
|
|
|
@@ -1380,12 +1452,16 @@ onBeforeUnmount(() => {
|
|
|
1380
1452
|
<el-select
|
|
1381
1453
|
v-model="flowForm.verifyStatus"
|
|
1382
1454
|
:append-to="overlayContainer || undefined"
|
|
1383
|
-
:persistent="false"
|
|
1384
1455
|
size="small"
|
|
1385
1456
|
placeholder="请选择"
|
|
1386
1457
|
clearable
|
|
1387
1458
|
>
|
|
1388
|
-
<el-option
|
|
1459
|
+
<el-option
|
|
1460
|
+
v-for="option in flowStatusOptions"
|
|
1461
|
+
:key="option.value"
|
|
1462
|
+
:label="option.label"
|
|
1463
|
+
:value="option.value"
|
|
1464
|
+
/>
|
|
1389
1465
|
</el-select>
|
|
1390
1466
|
</label>
|
|
1391
1467
|
|
|
@@ -1404,12 +1480,16 @@ onBeforeUnmount(() => {
|
|
|
1404
1480
|
<el-select
|
|
1405
1481
|
v-model="flowForm.groundBranch"
|
|
1406
1482
|
:append-to="overlayContainer || undefined"
|
|
1407
|
-
:persistent="false"
|
|
1408
1483
|
size="small"
|
|
1409
1484
|
placeholder="请选择"
|
|
1410
1485
|
clearable
|
|
1411
1486
|
>
|
|
1412
|
-
<el-option
|
|
1487
|
+
<el-option
|
|
1488
|
+
v-for="option in groundBranchOptions"
|
|
1489
|
+
:key="option.value"
|
|
1490
|
+
:label="option.label"
|
|
1491
|
+
:value="option.value"
|
|
1492
|
+
/>
|
|
1413
1493
|
</el-select>
|
|
1414
1494
|
</label>
|
|
1415
1495
|
</div>
|
|
@@ -1,109 +1,184 @@
|
|
|
1
|
-
import baseHttpClient
|
|
1
|
+
import baseHttpClient from '@/utils/baseHttpClient'
|
|
2
2
|
|
|
3
3
|
// `/forecast-info` 使用的 TAM 请求参数、响应结构和接口方法。
|
|
4
4
|
/** 预报信息查询参数。未选择的字段仍以空字符串传给后端。 */
|
|
5
5
|
export type ForecastInfoQueryParams = {
|
|
6
|
+
/** 业务类型编码。 */
|
|
6
7
|
busiType: string
|
|
8
|
+
/** 客户名称。 */
|
|
7
9
|
clientName: string
|
|
10
|
+
/** 交易对手名称。 */
|
|
8
11
|
competName: string
|
|
12
|
+
/** 交易金额范围上限。 */
|
|
9
13
|
endTransAmt: string
|
|
14
|
+
/** 落地机构编码或标识。 */
|
|
10
15
|
groundBranch: string
|
|
16
|
+
/** 落地机构名称。 */
|
|
11
17
|
groundBranchName: string
|
|
18
|
+
/** 我方账号。 */
|
|
12
19
|
ourAcct: string
|
|
20
|
+
/** 支付渠道编码。 */
|
|
13
21
|
payChannel: string
|
|
22
|
+
/** 收支方向编码:1 表示收入,2 表示支出。 */
|
|
14
23
|
payDirec: string
|
|
24
|
+
/** 交易金额范围下限。 */
|
|
15
25
|
startTransAmt: string
|
|
26
|
+
/** 交易日期。 */
|
|
16
27
|
tranDate: string
|
|
28
|
+
/** 核销状态筛选值:待核销为 1,3,已核销为 2。 */
|
|
17
29
|
verifyStatus: string
|
|
18
30
|
}
|
|
19
31
|
|
|
20
32
|
/** 预报信息表格行,字段名与 TAM 返回保持一致。 */
|
|
21
33
|
export type ForecastInfoRow = {
|
|
34
|
+
/** 出票日期。 */
|
|
22
35
|
billDate?: string
|
|
36
|
+
/** 票据号码。 */
|
|
23
37
|
billNo?: string
|
|
38
|
+
/** 业务类型编码。 */
|
|
24
39
|
busiType?: string
|
|
40
|
+
/** 客户名称。 */
|
|
25
41
|
clientName?: string
|
|
42
|
+
/** 客户类型编码。 */
|
|
26
43
|
clientType?: string
|
|
44
|
+
/** 交易对手账号。 */
|
|
27
45
|
competAcct?: string
|
|
46
|
+
/** 交易对手名称。 */
|
|
28
47
|
competName?: string
|
|
48
|
+
/** 落地机构。 */
|
|
29
49
|
groundBranch?: string
|
|
50
|
+
/** 落地机构代码。 */
|
|
30
51
|
groundBranchCode?: string
|
|
52
|
+
/** 支付渠道编码。 */
|
|
31
53
|
payChannel?: string
|
|
54
|
+
/** 收支方向编码:1 表示收入,2 表示支出。 */
|
|
32
55
|
payDirec?: string
|
|
56
|
+
/** 预报金额。 */
|
|
33
57
|
predAmt?: string
|
|
58
|
+
/** 预报人员编号。 */
|
|
34
59
|
predCode?: string
|
|
60
|
+
/** 预报日期。 */
|
|
35
61
|
predDate?: string
|
|
62
|
+
/** 预报流水号。 */
|
|
36
63
|
predRefNo?: string
|
|
64
|
+
/** 预报状态编码。 */
|
|
37
65
|
predStatus?: string
|
|
66
|
+
/** 释放状态编码。 */
|
|
38
67
|
relsFlag?: string
|
|
68
|
+
/** 标准名称。 */
|
|
39
69
|
standardName?: string
|
|
70
|
+
/** 交易日期。 */
|
|
40
71
|
tranDate?: string
|
|
72
|
+
/** 已核销金额。 */
|
|
41
73
|
verifyAmt?: string
|
|
74
|
+
/** 核销状态编码:1 表示未核销,2 表示已核销,3 表示部分核销。 */
|
|
42
75
|
verifyStatus?: string
|
|
43
76
|
}
|
|
44
77
|
|
|
45
78
|
/** 流水信息查询参数。未选择的字段仍以空字符串传给后端。 */
|
|
46
79
|
export type FlowInfoQueryParams = {
|
|
80
|
+
/** 我方户名。 */
|
|
47
81
|
clientName: string
|
|
82
|
+
/** 对方户名。 */
|
|
48
83
|
competName: string
|
|
84
|
+
/** 交易金额范围上限。 */
|
|
49
85
|
endTransAmt: string
|
|
86
|
+
/** 我方机构编码或标识。 */
|
|
50
87
|
groundBranch: string
|
|
88
|
+
/** 我方机构名称。 */
|
|
51
89
|
groundBranchName: string
|
|
90
|
+
/** 支付渠道编码。 */
|
|
52
91
|
payChannel: string
|
|
92
|
+
/** 收支方向编码:1 表示收入,0 表示支出。 */
|
|
53
93
|
payDirec: string
|
|
94
|
+
/** 交易金额范围下限。 */
|
|
54
95
|
startTransAmt: string
|
|
96
|
+
/** 交易日期。 */
|
|
55
97
|
tranDate: string
|
|
98
|
+
/** 核销状态编码。 */
|
|
56
99
|
verifyStatus: string
|
|
57
100
|
}
|
|
58
101
|
|
|
59
102
|
/** 流水信息表格行,字段名与 TAM 返回保持一致。 */
|
|
60
103
|
export type FlowInfoRow = {
|
|
104
|
+
/** 流水金额。 */
|
|
61
105
|
amt?: string
|
|
106
|
+
/** 出票日期。 */
|
|
62
107
|
billDate?: string
|
|
108
|
+
/** 票据号码。 */
|
|
63
109
|
billNo?: string
|
|
110
|
+
/** 支付系统业务类型编码。 */
|
|
64
111
|
busiType?: string
|
|
112
|
+
/** 我方账号。 */
|
|
65
113
|
clientAcct?: string
|
|
114
|
+
/** 我方户名。 */
|
|
66
115
|
clientName?: string
|
|
116
|
+
/** 对方账号。 */
|
|
67
117
|
competAcct?: string
|
|
118
|
+
/** 对方户名。 */
|
|
68
119
|
competName?: string
|
|
120
|
+
/** 我方机构。 */
|
|
69
121
|
groundBranch?: string
|
|
122
|
+
/** 支付渠道编码。 */
|
|
70
123
|
payChannel?: string
|
|
124
|
+
/** 收支方向编码:1 表示收入,0 表示支出。 */
|
|
71
125
|
payDirec?: string
|
|
126
|
+
/** 流水号。 */
|
|
72
127
|
refNo?: string
|
|
128
|
+
/** 标准名称。 */
|
|
73
129
|
standardName?: string
|
|
130
|
+
/** 交易日期。 */
|
|
74
131
|
tranDate?: string
|
|
132
|
+
/** 清算时间。 */
|
|
75
133
|
tranTimeStamp?: string
|
|
134
|
+
/** 核销状态编码:1 表示未核销,2 表示已核销。 */
|
|
76
135
|
verifyStatus?: string
|
|
77
136
|
}
|
|
78
137
|
|
|
79
138
|
/** 核销与撤销核销接口的业务结果。 */
|
|
80
139
|
export type ForecastInfoOperationResult = {
|
|
140
|
+
/** 操作是否成功。 */
|
|
81
141
|
success: boolean
|
|
142
|
+
/** 操作结果提示信息。 */
|
|
82
143
|
message: string
|
|
83
144
|
}
|
|
84
145
|
|
|
85
146
|
export type VerificationRequestParams = {
|
|
147
|
+
/** 待核销或撤销核销的预报信息快照列表。 */
|
|
86
148
|
predList: Array<{
|
|
149
|
+
/** 预报金额快照。 */
|
|
87
150
|
predAmt: string
|
|
151
|
+
/** 预报流水号。 */
|
|
88
152
|
predRefNo: string
|
|
153
|
+
/** 已核销金额快照。 */
|
|
89
154
|
verifyAmt: string
|
|
155
|
+
/** 当前核销状态快照。 */
|
|
90
156
|
verifyStatus: string
|
|
91
157
|
}>
|
|
158
|
+
/** 待核销或撤销核销的流水信息快照列表。 */
|
|
92
159
|
tranList: Array<{
|
|
160
|
+
/** 流水金额快照。 */
|
|
93
161
|
amt: string
|
|
162
|
+
/** 流水号。 */
|
|
94
163
|
refNo: string
|
|
164
|
+
/** 当前核销状态快照。 */
|
|
95
165
|
verifyStatus: string
|
|
96
166
|
}>
|
|
97
167
|
}
|
|
98
168
|
|
|
99
169
|
type QueryPageParams = {
|
|
170
|
+
/** 当前页码。请求层会映射为 TAM 的 pageIndex。 */
|
|
100
171
|
pageNum: number
|
|
172
|
+
/** 每页条数。请求层会映射为 TAM 的 pageSize。 */
|
|
101
173
|
pageSize: number
|
|
102
174
|
}
|
|
103
175
|
|
|
104
176
|
export type ForecastInfoListResponse<T> = {
|
|
177
|
+
/** 当前页列表数据。 */
|
|
105
178
|
resultList?: T[] | null
|
|
179
|
+
/** 数据总条数。 */
|
|
106
180
|
totalCount?: string | number | null
|
|
181
|
+
/** 数据总页数。 */
|
|
107
182
|
totalPage?: string | number
|
|
108
183
|
}
|
|
109
184
|
|
|
@@ -114,7 +189,7 @@ export type ForecastInfoListResponse<T> = {
|
|
|
114
189
|
const API = {
|
|
115
190
|
/** 分页查询预报信息。 */
|
|
116
191
|
forecastQueryAPI: (params: ForecastInfoQueryParams & QueryPageParams) => {
|
|
117
|
-
return baseHttpClient.post<
|
|
192
|
+
return baseHttpClient.post<any>(
|
|
118
193
|
'/TAM/0001/140102001',
|
|
119
194
|
params,
|
|
120
195
|
)
|
|
@@ -122,7 +197,7 @@ const API = {
|
|
|
122
197
|
|
|
123
198
|
/** 分页查询流水信息。 */
|
|
124
199
|
flowQueryAPI: (params: FlowInfoQueryParams & QueryPageParams) => {
|
|
125
|
-
return baseHttpClient.post<
|
|
200
|
+
return baseHttpClient.post<any>(
|
|
126
201
|
'/TAM/0001/140102002',
|
|
127
202
|
params,
|
|
128
203
|
)
|
|
@@ -130,7 +205,7 @@ const API = {
|
|
|
130
205
|
|
|
131
206
|
/** 核销所选预报信息及关联流水信息。 */
|
|
132
207
|
verifyAPI: (params: VerificationRequestParams) => {
|
|
133
|
-
return baseHttpClient.post<
|
|
208
|
+
return baseHttpClient.post<any>(
|
|
134
209
|
'/TAM/0001/120102001',
|
|
135
210
|
params,
|
|
136
211
|
)
|
|
@@ -138,7 +213,7 @@ const API = {
|
|
|
138
213
|
|
|
139
214
|
/** 撤销所选预报信息及关联流水信息的核销。 */
|
|
140
215
|
cancelVerifyAPI: (params: VerificationRequestParams) => {
|
|
141
|
-
return baseHttpClient.post<
|
|
216
|
+
return baseHttpClient.post<any>(
|
|
142
217
|
'/TAM/0001/120102002',
|
|
143
218
|
params,
|
|
144
219
|
)
|
|
@@ -15,6 +15,10 @@ export type ForecastInfoSelectionKey = 'forecastInfo' | 'flowInfo'
|
|
|
15
15
|
/** 卡片布局仅保存布局类型,不持久化临时弹窗或表格选择。 */
|
|
16
16
|
const CARD_LAYOUT_STORAGE_KEY = 'forecast-info:card-layout'
|
|
17
17
|
const DEFAULT_CARD_LAYOUT: ForecastInfoCardLayout = 'horizontal'
|
|
18
|
+
const CARD_LAYOUT_PAGE_SIZE: Record<ForecastInfoCardLayout, number> = {
|
|
19
|
+
vertical: 10,
|
|
20
|
+
horizontal: 20,
|
|
21
|
+
}
|
|
18
22
|
|
|
19
23
|
export type ForecastCalculationSummary = {
|
|
20
24
|
forecastAmount: string
|
|
@@ -129,19 +133,20 @@ function toRequestText(value: unknown) {
|
|
|
129
133
|
* 只负责列表、选择和核销,不处理页面浮层、消息或路由生命周期。
|
|
130
134
|
*/
|
|
131
135
|
export function useForecastInfoState() {
|
|
132
|
-
const
|
|
136
|
+
const initialCardLayout = restoreCardLayout()
|
|
137
|
+
const cardLayout = ref<ForecastInfoCardLayout>(initialCardLayout)
|
|
133
138
|
|
|
134
139
|
const forecastRows = ref<ForecastInfoRow[]>([])
|
|
135
140
|
const forecastTotal = ref(0)
|
|
136
141
|
const forecastPage = ref(1)
|
|
137
|
-
const forecastPageSize = ref(
|
|
142
|
+
const forecastPageSize = ref(CARD_LAYOUT_PAGE_SIZE[initialCardLayout])
|
|
138
143
|
const forecastLoading = ref(false)
|
|
139
144
|
const forecastQueryParams = ref<ForecastInfoQueryParams>(defaultForecastQueryParams())
|
|
140
145
|
|
|
141
146
|
const flowRows = ref<FlowInfoRow[]>([])
|
|
142
147
|
const flowTotal = ref(0)
|
|
143
148
|
const flowPage = ref(1)
|
|
144
|
-
const flowPageSize = ref(
|
|
149
|
+
const flowPageSize = ref(CARD_LAYOUT_PAGE_SIZE[initialCardLayout])
|
|
145
150
|
const flowLoading = ref(false)
|
|
146
151
|
const flowQueryParams = ref<FlowInfoQueryParams>(defaultFlowQueryParams())
|
|
147
152
|
|
|
@@ -158,13 +163,31 @@ export function useForecastInfoState() {
|
|
|
158
163
|
let forecastRequestGeneration = 0
|
|
159
164
|
let flowRequestGeneration = 0
|
|
160
165
|
|
|
166
|
+
/** 切换布局时同步恢复两张表对应的默认分页状态,并清除旧布局数据。 */
|
|
161
167
|
function setCardLayout(layout: ForecastInfoCardLayout) {
|
|
168
|
+
if (cardLayout.value === layout) return false
|
|
169
|
+
|
|
170
|
+
cancelPendingRequests()
|
|
162
171
|
cardLayout.value = layout
|
|
172
|
+
const pageSize = CARD_LAYOUT_PAGE_SIZE[layout]
|
|
173
|
+
forecastPage.value = 1
|
|
174
|
+
forecastPageSize.value = pageSize
|
|
175
|
+
forecastRows.value = []
|
|
176
|
+
forecastTotal.value = 0
|
|
177
|
+
flowPage.value = 1
|
|
178
|
+
flowPageSize.value = pageSize
|
|
179
|
+
flowRows.value = []
|
|
180
|
+
flowTotal.value = 0
|
|
181
|
+
resetTableSelection('forecastInfo')
|
|
182
|
+
resetTableSelection('flowInfo')
|
|
183
|
+
|
|
163
184
|
try {
|
|
164
185
|
window.localStorage.setItem(CARD_LAYOUT_STORAGE_KEY, layout)
|
|
165
186
|
} catch {
|
|
166
187
|
// 本地存储不可用时仅保留本次页面状态。
|
|
167
188
|
}
|
|
189
|
+
|
|
190
|
+
return true
|
|
168
191
|
}
|
|
169
192
|
|
|
170
193
|
function handleForecastSelectionChange(rows: ForecastInfoRow[]) {
|