verce-vue-test 0.0.63 → 0.0.64
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
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
CircleCheck,
|
|
7
7
|
CirclePlus,
|
|
8
8
|
DataAnalysis,
|
|
9
|
-
Download,
|
|
10
9
|
EditPen,
|
|
11
10
|
Money,
|
|
12
11
|
RefreshLeft,
|
|
@@ -244,7 +243,7 @@ function handleForecastReset() {
|
|
|
244
243
|
ElMessage.info('预报筛选条件已重置')
|
|
245
244
|
}
|
|
246
245
|
|
|
247
|
-
/**
|
|
246
|
+
/** 新增等尚未对接接口的工具栏操作统一使用临时提示。 */
|
|
248
247
|
function handleToolbarAction(action: string) {
|
|
249
248
|
ElMessage.info(`${action}功能待接入`)
|
|
250
249
|
}
|
|
@@ -406,8 +405,12 @@ function handleForecastPaginationChange(_value: { page: number; pageSize: number
|
|
|
406
405
|
>
|
|
407
406
|
<!-- 批量操作依赖 Pinia 的跨表多选状态;核销规则由 store 统一校验。 -->
|
|
408
407
|
<template #toolbar>
|
|
409
|
-
<el-button size="small" :icon="CirclePlus" @click="handleToolbarAction('新增')"
|
|
408
|
+
<el-button type="primary" plain size="small" :icon="CirclePlus" @click="handleToolbarAction('新增')">
|
|
409
|
+
新增
|
|
410
|
+
</el-button>
|
|
410
411
|
<el-button
|
|
412
|
+
type="primary"
|
|
413
|
+
plain
|
|
411
414
|
size="small"
|
|
412
415
|
:icon="DataAnalysis"
|
|
413
416
|
:disabled="!forecastHasSelectedRows"
|
|
@@ -416,6 +419,8 @@ function handleForecastPaginationChange(_value: { page: number; pageSize: number
|
|
|
416
419
|
匡算
|
|
417
420
|
</el-button>
|
|
418
421
|
<el-button
|
|
422
|
+
type="success"
|
|
423
|
+
plain
|
|
419
424
|
size="small"
|
|
420
425
|
:icon="CircleCheck"
|
|
421
426
|
:disabled="!forecastHasSelectedRows"
|
|
@@ -424,6 +429,8 @@ function handleForecastPaginationChange(_value: { page: number; pageSize: number
|
|
|
424
429
|
核销
|
|
425
430
|
</el-button>
|
|
426
431
|
<el-button
|
|
432
|
+
type="danger"
|
|
433
|
+
plain
|
|
427
434
|
size="small"
|
|
428
435
|
:icon="RefreshLeft"
|
|
429
436
|
:disabled="!forecastHasSelectedRows"
|
|
@@ -431,7 +438,6 @@ function handleForecastPaginationChange(_value: { page: number; pageSize: number
|
|
|
431
438
|
>
|
|
432
439
|
撤销核销
|
|
433
440
|
</el-button>
|
|
434
|
-
<el-button size="small" :icon="Download" @click="handleToolbarAction('导出')">导出</el-button>
|
|
435
441
|
</template>
|
|
436
442
|
|
|
437
443
|
<!-- 勾选结果通过 selection-change 写入 Pinia,供匡算与核销跨表复用。 -->
|
|
@@ -374,13 +374,8 @@
|
|
|
374
374
|
white-space: nowrap;
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
-
.forecast-row-actions .el-button + .el-button {
|
|
378
|
-
margin-left: 0;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
377
|
/* ---- 匡算弹窗:展示预报和流水多选数据的共享汇总。 ---- */
|
|
382
|
-
.forecast-calculation-dialog.el-dialog
|
|
383
|
-
.forecast-calculation-dialog .el-dialog {
|
|
378
|
+
.forecast-calculation-dialog.el-dialog {
|
|
384
379
|
max-width: calc(100vw - 32px);
|
|
385
380
|
border-radius: 10px;
|
|
386
381
|
background: rgba(255, 255, 255, .98);
|
|
@@ -535,8 +530,7 @@
|
|
|
535
530
|
}
|
|
536
531
|
|
|
537
532
|
/* ---- 修改弹窗:仅允许调整预报金额,其余字段作为只读业务约束。 ---- */
|
|
538
|
-
.forecast-modify-dialog.el-dialog
|
|
539
|
-
.forecast-modify-dialog .el-dialog {
|
|
533
|
+
.forecast-modify-dialog.el-dialog {
|
|
540
534
|
max-width: calc(100vw - 32px);
|
|
541
535
|
overflow: hidden;
|
|
542
536
|
border-radius: 8px;
|
|
@@ -648,21 +642,6 @@
|
|
|
648
642
|
border-radius: 8px;
|
|
649
643
|
}
|
|
650
644
|
|
|
651
|
-
/* ---- 响应式收敛:优先确保筛选按钮和日期控件在窄屏不换行溢出。 ---- */
|
|
652
|
-
@media (max-width: 1560px) {
|
|
653
|
-
.forecast-filter-panel--horizontal {
|
|
654
|
-
align-items: center;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
.forecast-filter-panel--horizontal .forecast-filter-panel__grid {
|
|
658
|
-
grid-template-columns: minmax(0, 1fr);
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.forecast-filter-panel--horizontal .forecast-filter-panel__actions {
|
|
662
|
-
margin-left: 0;
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
|
|
666
645
|
/* 中等宽度下压缩筛选网格的最小列宽,保留双卡片并排能力。 */
|
|
667
646
|
@media (max-width: 1320px) {
|
|
668
647
|
.forecast-filter-panel {
|
|
@@ -678,13 +657,6 @@
|
|
|
678
657
|
grid-template-columns: minmax(238px, 248px) minmax(220px, 240px);
|
|
679
658
|
}
|
|
680
659
|
|
|
681
|
-
.forecast-filter-panel--horizontal .forecast-filter-panel__grid {
|
|
682
|
-
grid-template-columns: minmax(0, 1fr);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
.forecast-filter-panel__actions {
|
|
686
|
-
justify-content: flex-end;
|
|
687
|
-
}
|
|
688
660
|
}
|
|
689
661
|
|
|
690
662
|
/* 小屏时将左右卡片退化为上下排列,同时缩小弹窗和汇总指标。 */
|
|
@@ -731,8 +703,7 @@
|
|
|
731
703
|
margin-left: 0;
|
|
732
704
|
}
|
|
733
705
|
|
|
734
|
-
.forecast-calculation-dialog.el-dialog
|
|
735
|
-
.forecast-calculation-dialog .el-dialog {
|
|
706
|
+
.forecast-calculation-dialog.el-dialog {
|
|
736
707
|
width: calc(100vw - 24px) !important;
|
|
737
708
|
}
|
|
738
709
|
|
|
@@ -205,6 +205,36 @@ export type ForecastInfoOperationResult = {
|
|
|
205
205
|
message: string
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
/** 核销接口中的单条预报信息入参。 */
|
|
209
|
+
export type VerificationPredItem = {
|
|
210
|
+
/** 预报金额。 */
|
|
211
|
+
predAmt: string
|
|
212
|
+
/** 预报流水号。 */
|
|
213
|
+
predRefNo: string
|
|
214
|
+
/** 核销金额。 */
|
|
215
|
+
verifyAmt: string
|
|
216
|
+
/** 核销状态。 */
|
|
217
|
+
verifyStatus: string
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** 核销接口中的单条流水信息入参。 */
|
|
221
|
+
export type VerificationTranItem = {
|
|
222
|
+
/** 交易金额。 */
|
|
223
|
+
amt: string
|
|
224
|
+
/** 流水号。 */
|
|
225
|
+
refNo: string
|
|
226
|
+
/** 核销状态。 */
|
|
227
|
+
verifyStatus: string
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/** 核销与撤销核销共用的接口请求体。 */
|
|
231
|
+
export type VerificationRequestParams = {
|
|
232
|
+
/** 已选预报信息;核销操作至少包含一条。 */
|
|
233
|
+
predList: VerificationPredItem[]
|
|
234
|
+
/** 已选流水信息;预报可单独核销时允许为空数组。 */
|
|
235
|
+
tranList: VerificationTranItem[]
|
|
236
|
+
}
|
|
237
|
+
|
|
208
238
|
// ---- 模拟接口数据 ----
|
|
209
239
|
|
|
210
240
|
/**
|
|
@@ -691,6 +721,11 @@ function isVerified(row: { verifyStatus?: string }) {
|
|
|
691
721
|
return String(row.verifyStatus ?? '').trim() === '2'
|
|
692
722
|
}
|
|
693
723
|
|
|
724
|
+
/** 将后端可选字段转换为请求体要求的字符串,避免传出 undefined。 */
|
|
725
|
+
function toRequestText(value: unknown) {
|
|
726
|
+
return value === null || value === undefined ? '' : String(value)
|
|
727
|
+
}
|
|
728
|
+
|
|
694
729
|
export const useForecastInfoStore = defineStore('forecastInfo', () => {
|
|
695
730
|
// ---- 页面共享状态 ----
|
|
696
731
|
|
|
@@ -864,6 +899,26 @@ export const useForecastInfoStore = defineStore('forecastInfo', () => {
|
|
|
864
899
|
return { success: true, message: '' }
|
|
865
900
|
}
|
|
866
901
|
|
|
902
|
+
/**
|
|
903
|
+
* 从 Pinia 共享的多选状态构造核销接口入参。
|
|
904
|
+
* 这里不复用完整表格行,避免接口请求携带无关展示字段;真实接口可直接使用返回值。
|
|
905
|
+
*/
|
|
906
|
+
function buildVerificationRequestParams(): VerificationRequestParams {
|
|
907
|
+
return {
|
|
908
|
+
predList: forecastSelectedRows.value.map((row) => ({
|
|
909
|
+
predAmt: toRequestText(row.predAmt),
|
|
910
|
+
predRefNo: toRequestText(row.predRefNo),
|
|
911
|
+
verifyAmt: toRequestText(row.verifyAmt),
|
|
912
|
+
verifyStatus: toRequestText(row.verifyStatus),
|
|
913
|
+
})),
|
|
914
|
+
tranList: flowSelectedRows.value.map((row) => ({
|
|
915
|
+
amt: toRequestText(row.amt),
|
|
916
|
+
refNo: toRequestText(row.refNo),
|
|
917
|
+
verifyStatus: toRequestText(row.verifyStatus),
|
|
918
|
+
})),
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
867
922
|
/**
|
|
868
923
|
* 校验预报信息及其已选流水信息的核销操作。
|
|
869
924
|
* 真实核销接口接入时,在校验通过后调用接口,并在成功后同步两张表的关联数据。
|
|
@@ -904,10 +959,8 @@ export const useForecastInfoStore = defineStore('forecastInfo', () => {
|
|
|
904
959
|
|
|
905
960
|
/** 预报信息核销按钮的统一业务入口。 */
|
|
906
961
|
function handleForecastVerify() {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
flowInfo: flowSelectedRows.value,
|
|
910
|
-
})
|
|
962
|
+
const params = buildVerificationRequestParams()
|
|
963
|
+
console.log('核销入参', params)
|
|
911
964
|
|
|
912
965
|
const result = verifySelectedForecastRows()
|
|
913
966
|
if (result.success) {
|
|
@@ -921,10 +974,8 @@ export const useForecastInfoStore = defineStore('forecastInfo', () => {
|
|
|
921
974
|
|
|
922
975
|
/** 预报信息撤销核销按钮的统一业务入口。 */
|
|
923
976
|
function handleForecastCancelVerify() {
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
flowInfo: flowSelectedRows.value,
|
|
927
|
-
})
|
|
977
|
+
const params = buildVerificationRequestParams()
|
|
978
|
+
console.log('撤销核销入参', params)
|
|
928
979
|
|
|
929
980
|
const result = cancelVerifySelectedForecastRows()
|
|
930
981
|
if (result.success) {
|
|
@@ -1022,6 +1073,7 @@ export const useForecastInfoStore = defineStore('forecastInfo', () => {
|
|
|
1022
1073
|
// ----预报信息-----
|
|
1023
1074
|
handleForecastSelectionChange,
|
|
1024
1075
|
calculateSelectedSummary,
|
|
1076
|
+
buildVerificationRequestParams,
|
|
1025
1077
|
verifySelectedForecastRows,
|
|
1026
1078
|
cancelVerifySelectedForecastRows,
|
|
1027
1079
|
handleCalculationSummary,
|