verce-vue-test 0.0.107 → 0.0.109
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 +6 -5
- package/src/views/foreign-currency-fund-allocation/api.ts +4 -4
- package/src/views/foreign-currency-fund-allocation/index.vue +84 -101
- package/src/views/foreign-currency-settlement/foreign-currency-settlement-base.css +4 -4
- package/src/views/foreign-currency-settlement/index.vue +374 -51
- package/src/views/fund-cockpit/index.css +18 -11
- package/src/views/fund-cockpit/index.vue +61 -29
- package/src/views/rmb-estimation/index.vue +2 -1
- package/README.md +0 -42
- package/design-qa.md +0 -48
- package/sftp-ftp-uploader-0.1.0.vue +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "verce-vue-test",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.109",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"echarts": "^6.1.0",
|
|
28
|
-
"element-plus": "
|
|
29
|
-
"pinia": "
|
|
30
|
-
"
|
|
31
|
-
"vue
|
|
28
|
+
"element-plus": "2.2.27",
|
|
29
|
+
"pinia": "2.1.7",
|
|
30
|
+
"pinia-plugin-persist": "^1.0.0",
|
|
31
|
+
"vue": "3.4.33",
|
|
32
|
+
"vue-router": "4.4.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -48,11 +48,11 @@ export function updateForeignCurrencyFundAllocation(
|
|
|
48
48
|
|
|
49
49
|
/** 根据调拨单号删除外币资金调拨(120206003)。 */
|
|
50
50
|
export function deleteForeignCurrencyFundAllocation(
|
|
51
|
-
|
|
51
|
+
refNos: string,
|
|
52
52
|
) {
|
|
53
53
|
return baseHttpClient.post<any>(
|
|
54
54
|
'/TAM/0001/120206003',
|
|
55
|
-
{ refNos
|
|
55
|
+
{ refNos },
|
|
56
56
|
)
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -61,14 +61,14 @@ export function deleteForeignCurrencyFundAllocation(
|
|
|
61
61
|
* type 为 Y 时审批通过;为 N 时审批拒绝,并提交拒绝原因。
|
|
62
62
|
*/
|
|
63
63
|
export function reviewForeignCurrencyFundAllocation(
|
|
64
|
-
|
|
64
|
+
refNos: string,
|
|
65
65
|
type: ForeignCurrencyFundAllocationReviewType,
|
|
66
66
|
approveRjctReason = '',
|
|
67
67
|
) {
|
|
68
68
|
return baseHttpClient.post<any>(
|
|
69
69
|
'/TAM/0001/120206004',
|
|
70
70
|
{
|
|
71
|
-
refNos
|
|
71
|
+
refNos,
|
|
72
72
|
type,
|
|
73
73
|
...(type === 'N' ? { approveRjctReason } : {}),
|
|
74
74
|
},
|
|
@@ -129,6 +129,7 @@ const sharedQueryParams = computed<ForeignCurrencyFundAllocationFilter>(() => (
|
|
|
129
129
|
cloneFilter(appliedFilters.value)
|
|
130
130
|
))
|
|
131
131
|
const records = ref<ForeignCurrencyFundAllocationRow[]>([])
|
|
132
|
+
const selectedRows = ref<ForeignCurrencyFundAllocationRow[]>([])
|
|
132
133
|
const totalCount = ref(0)
|
|
133
134
|
const currentPage = ref(1)
|
|
134
135
|
const pageSize = ref(10)
|
|
@@ -176,7 +177,7 @@ const editAmountInput = computed({
|
|
|
176
177
|
editForm.amtEdit = sanitizeAmountInput(value)
|
|
177
178
|
},
|
|
178
179
|
})
|
|
179
|
-
const
|
|
180
|
+
const activeBatchAction = ref<RowAction | null>(null)
|
|
180
181
|
const accountBankOptions = ref<AccountBankOption[]>([])
|
|
181
182
|
const accountBankLoading = ref(false)
|
|
182
183
|
const columnComponentMap: Record<string, string> = {
|
|
@@ -381,9 +382,8 @@ function canDeleteStatus(status: string) {
|
|
|
381
382
|
return ['N', 'C'].includes(statusCode(status))
|
|
382
383
|
}
|
|
383
384
|
|
|
384
|
-
function
|
|
385
|
-
|
|
386
|
-
&& activeRowAction.value.action === action
|
|
385
|
+
function handleSelectionChange(rows: ForeignCurrencyFundAllocationRow[]) {
|
|
386
|
+
selectedRows.value = rows
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
function yesNoLabel(value: string) {
|
|
@@ -636,16 +636,26 @@ async function handleEditSubmit(action: EditAction) {
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
-
async function handleDelete(
|
|
640
|
-
if (
|
|
641
|
-
if (
|
|
642
|
-
|
|
639
|
+
async function handleDelete() {
|
|
640
|
+
if (activeBatchAction.value) return
|
|
641
|
+
if (selectedRows.value.length === 0) {
|
|
642
|
+
await ElMessageBox.alert('请至少选择一条调拨记录', '操作提醒', { type: 'warning' })
|
|
643
643
|
return
|
|
644
644
|
}
|
|
645
|
+
const invalidRows = selectedRows.value.filter((row) => !canDeleteStatus(row.status))
|
|
646
|
+
if (invalidRows.length > 0) {
|
|
647
|
+
await ElMessageBox.alert(
|
|
648
|
+
`调拨单号 ${invalidRows.map((row) => row.refNo).join('、')} 不符合删除条件,只有审批未通过或草稿状态的调拨记录才能删除。`,
|
|
649
|
+
'操作提醒',
|
|
650
|
+
{ type: 'warning' },
|
|
651
|
+
)
|
|
652
|
+
return
|
|
653
|
+
}
|
|
654
|
+
const refNos = selectedRows.value.map((row) => row.refNo).join(',')
|
|
645
655
|
|
|
646
656
|
try {
|
|
647
657
|
await ElMessageBox.confirm(
|
|
648
|
-
|
|
658
|
+
`确认删除已选择的 ${selectedRows.value.length} 条调拨记录吗?删除后无法恢复。`,
|
|
649
659
|
'删除确认',
|
|
650
660
|
{
|
|
651
661
|
confirmButtonText: '确认删除',
|
|
@@ -657,40 +667,50 @@ async function handleDelete(row: ForeignCurrencyFundAllocationRow) {
|
|
|
657
667
|
return
|
|
658
668
|
}
|
|
659
669
|
|
|
660
|
-
|
|
670
|
+
activeBatchAction.value = 'delete'
|
|
661
671
|
try {
|
|
662
|
-
const response = await deleteForeignCurrencyFundAllocation(
|
|
663
|
-
if (detailRecord.value
|
|
672
|
+
const response = await deleteForeignCurrencyFundAllocation(refNos) as any
|
|
673
|
+
if (detailRecord.value && selectedRows.value.some((row) => row.refNo === detailRecord.value?.refNo)) {
|
|
664
674
|
detailVisible.value = false
|
|
665
675
|
detailRecord.value = null
|
|
666
676
|
}
|
|
667
|
-
if (records.value.length ===
|
|
677
|
+
if (records.value.length === selectedRows.value.length && currentPage.value > 1) currentPage.value -= 1
|
|
678
|
+
selectedRows.value = []
|
|
668
679
|
ElMessage.success(response.head.retMsg || '删除成功')
|
|
669
680
|
await loadRows()
|
|
670
681
|
} catch (error) {
|
|
671
682
|
ElMessage.error(error instanceof Error ? error.message : '外币资金调拨删除失败')
|
|
672
683
|
} finally {
|
|
673
|
-
|
|
684
|
+
activeBatchAction.value = null
|
|
674
685
|
}
|
|
675
686
|
}
|
|
676
687
|
|
|
677
688
|
async function handleReview(
|
|
678
|
-
row: ForeignCurrencyFundAllocationRow,
|
|
679
689
|
type: ForeignCurrencyFundAllocationReviewType,
|
|
680
690
|
) {
|
|
681
|
-
if (
|
|
682
|
-
if (
|
|
683
|
-
|
|
691
|
+
if (activeBatchAction.value) return
|
|
692
|
+
if (selectedRows.value.length === 0) {
|
|
693
|
+
await ElMessageBox.alert('请至少选择一条调拨记录', '操作提醒', { type: 'warning' })
|
|
694
|
+
return
|
|
695
|
+
}
|
|
696
|
+
const invalidRows = selectedRows.value.filter((row) => !isPendingStatus(row.status))
|
|
697
|
+
if (invalidRows.length > 0) {
|
|
698
|
+
await ElMessageBox.alert(
|
|
699
|
+
`调拨单号 ${invalidRows.map((row) => row.refNo).join('、')} 不符合审批条件,只有待审核状态的调拨记录才能通过或拒绝。`,
|
|
700
|
+
'操作提醒',
|
|
701
|
+
{ type: 'warning' },
|
|
702
|
+
)
|
|
684
703
|
return
|
|
685
704
|
}
|
|
686
705
|
|
|
687
706
|
const approved = type === 'Y'
|
|
688
707
|
const actionText = approved ? '通过' : '拒绝'
|
|
708
|
+
const refNos = selectedRows.value.map((row) => row.refNo).join(',')
|
|
689
709
|
let approveRjctReason = ''
|
|
690
710
|
try {
|
|
691
711
|
if (approved) {
|
|
692
712
|
await ElMessageBox.confirm(
|
|
693
|
-
|
|
713
|
+
`确认通过已选择的 ${selectedRows.value.length} 条调拨记录吗?`,
|
|
694
714
|
'通过确认',
|
|
695
715
|
{
|
|
696
716
|
confirmButtonText: '确认通过',
|
|
@@ -700,7 +720,7 @@ async function handleReview(
|
|
|
700
720
|
)
|
|
701
721
|
} else {
|
|
702
722
|
const result = await ElMessageBox.prompt(
|
|
703
|
-
|
|
723
|
+
`请填写已选择的 ${selectedRows.value.length} 条调拨记录的拒绝原因`,
|
|
704
724
|
'拒绝确认',
|
|
705
725
|
{
|
|
706
726
|
confirmButtonText: '确认拒绝',
|
|
@@ -718,19 +738,16 @@ async function handleReview(
|
|
|
718
738
|
}
|
|
719
739
|
|
|
720
740
|
const action: RowAction = approved ? 'approve' : 'reject'
|
|
721
|
-
|
|
741
|
+
activeBatchAction.value = action
|
|
722
742
|
try {
|
|
723
|
-
const response = await reviewForeignCurrencyFundAllocation(
|
|
743
|
+
const response = await reviewForeignCurrencyFundAllocation(refNos, type, approveRjctReason) as any
|
|
744
|
+
selectedRows.value = []
|
|
724
745
|
ElMessage.success(response.head.retMsg || `${actionText}成功`)
|
|
725
746
|
await loadRows()
|
|
726
|
-
const refreshedRecord = records.value.find((item) => item.refNo === row.refNo)
|
|
727
|
-
if (detailRecord.value?.refNo === row.refNo && refreshedRecord) {
|
|
728
|
-
detailRecord.value = refreshedRecord
|
|
729
|
-
}
|
|
730
747
|
} catch (error) {
|
|
731
748
|
ElMessage.error(error instanceof Error ? error.message : `外币资金调拨${actionText}失败`)
|
|
732
749
|
} finally {
|
|
733
|
-
|
|
750
|
+
activeBatchAction.value = null
|
|
734
751
|
}
|
|
735
752
|
}
|
|
736
753
|
|
|
@@ -848,11 +865,44 @@ onMounted(() => {
|
|
|
848
865
|
col-btn-size="small"
|
|
849
866
|
@pagination-change="handlePaginationChange"
|
|
850
867
|
@row-dblclick="openDetail"
|
|
868
|
+
@selection-change="handleSelectionChange"
|
|
851
869
|
>
|
|
852
870
|
<template #toolbar>
|
|
853
871
|
<el-button type="primary" size="small" :icon="Plus" @click="openCreate">
|
|
854
872
|
新增
|
|
855
873
|
</el-button>
|
|
874
|
+
<el-button
|
|
875
|
+
type="danger"
|
|
876
|
+
plain
|
|
877
|
+
size="small"
|
|
878
|
+
:icon="Delete"
|
|
879
|
+
:loading="activeBatchAction === 'delete'"
|
|
880
|
+
:disabled="selectedRows.length === 0 || activeBatchAction !== null"
|
|
881
|
+
@click="handleDelete"
|
|
882
|
+
>
|
|
883
|
+
删除
|
|
884
|
+
</el-button>
|
|
885
|
+
<el-button
|
|
886
|
+
type="success"
|
|
887
|
+
size="small"
|
|
888
|
+
:icon="CircleCheck"
|
|
889
|
+
:loading="activeBatchAction === 'approve'"
|
|
890
|
+
:disabled="selectedRows.length === 0 || activeBatchAction !== null"
|
|
891
|
+
@click="handleReview('Y')"
|
|
892
|
+
>
|
|
893
|
+
通过
|
|
894
|
+
</el-button>
|
|
895
|
+
<el-button
|
|
896
|
+
type="warning"
|
|
897
|
+
plain
|
|
898
|
+
size="small"
|
|
899
|
+
:icon="CircleClose"
|
|
900
|
+
:loading="activeBatchAction === 'reject'"
|
|
901
|
+
:disabled="selectedRows.length === 0 || activeBatchAction !== null"
|
|
902
|
+
@click="handleReview('N')"
|
|
903
|
+
>
|
|
904
|
+
拒绝
|
|
905
|
+
</el-button>
|
|
856
906
|
</template>
|
|
857
907
|
<template #toolbar-right>
|
|
858
908
|
<el-button
|
|
@@ -865,6 +915,7 @@ onMounted(() => {
|
|
|
865
915
|
导出
|
|
866
916
|
</el-button>
|
|
867
917
|
</template>
|
|
918
|
+
<el-table-column type="selection" width="48" fixed="left" align="center" disabled />
|
|
868
919
|
<el-table-column
|
|
869
920
|
type="index"
|
|
870
921
|
column-key="sequence"
|
|
@@ -926,7 +977,7 @@ onMounted(() => {
|
|
|
926
977
|
<el-table-column
|
|
927
978
|
column-key="operations"
|
|
928
979
|
label="操作"
|
|
929
|
-
width="
|
|
980
|
+
width="150"
|
|
930
981
|
fixed="right"
|
|
931
982
|
align="center"
|
|
932
983
|
disabled
|
|
@@ -936,7 +987,7 @@ onMounted(() => {
|
|
|
936
987
|
link
|
|
937
988
|
type="primary"
|
|
938
989
|
size="small"
|
|
939
|
-
:disabled="
|
|
990
|
+
:disabled="activeBatchAction !== null"
|
|
940
991
|
@click.stop="openDetail(row)"
|
|
941
992
|
>
|
|
942
993
|
详情<el-icon class="el-icon--right"><ArrowRight /></el-icon>
|
|
@@ -946,48 +997,12 @@ onMounted(() => {
|
|
|
946
997
|
type="primary"
|
|
947
998
|
size="small"
|
|
948
999
|
:icon="EditPen"
|
|
949
|
-
:disabled="!canEditStatus(row.status) ||
|
|
1000
|
+
:disabled="!canEditStatus(row.status) || activeBatchAction !== null"
|
|
950
1001
|
title="仅审批未通过或草稿状态可修改"
|
|
951
1002
|
@click.stop="openEdit(row)"
|
|
952
1003
|
>
|
|
953
1004
|
修改
|
|
954
1005
|
</el-button>
|
|
955
|
-
<el-button
|
|
956
|
-
link
|
|
957
|
-
type="danger"
|
|
958
|
-
size="small"
|
|
959
|
-
:icon="Delete"
|
|
960
|
-
:loading="isActionLoading(row, 'delete')"
|
|
961
|
-
:disabled="!canDeleteStatus(row.status) || (activeRowAction !== null && !isActionLoading(row, 'delete'))"
|
|
962
|
-
title="仅审批未通过或草稿状态可删除"
|
|
963
|
-
@click.stop="handleDelete(row)"
|
|
964
|
-
>
|
|
965
|
-
删除
|
|
966
|
-
</el-button>
|
|
967
|
-
<el-button
|
|
968
|
-
link
|
|
969
|
-
type="success"
|
|
970
|
-
size="small"
|
|
971
|
-
:icon="CircleCheck"
|
|
972
|
-
:loading="isActionLoading(row, 'approve')"
|
|
973
|
-
:disabled="!isPendingStatus(row.status) || (activeRowAction !== null && !isActionLoading(row, 'approve'))"
|
|
974
|
-
title="仅待审核状态可操作"
|
|
975
|
-
@click.stop="handleReview(row, 'Y')"
|
|
976
|
-
>
|
|
977
|
-
通过
|
|
978
|
-
</el-button>
|
|
979
|
-
<el-button
|
|
980
|
-
link
|
|
981
|
-
type="warning"
|
|
982
|
-
size="small"
|
|
983
|
-
:icon="CircleClose"
|
|
984
|
-
:loading="isActionLoading(row, 'reject')"
|
|
985
|
-
:disabled="!isPendingStatus(row.status) || (activeRowAction !== null && !isActionLoading(row, 'reject'))"
|
|
986
|
-
title="仅待审核状态可操作"
|
|
987
|
-
@click.stop="handleReview(row, 'N')"
|
|
988
|
-
>
|
|
989
|
-
拒绝
|
|
990
|
-
</el-button>
|
|
991
1006
|
</template>
|
|
992
1007
|
</el-table-column>
|
|
993
1008
|
</ElTablePro>
|
|
@@ -1131,7 +1146,7 @@ onMounted(() => {
|
|
|
1131
1146
|
v-for="option in accountBankOptions"
|
|
1132
1147
|
:key="`${option.bankAcct}-${option.bankName}`"
|
|
1133
1148
|
:label="option.bankName"
|
|
1134
|
-
:value="option.
|
|
1149
|
+
:value="option.bankName"
|
|
1135
1150
|
>
|
|
1136
1151
|
<span class="account-option__name">{{ option.bankName }}</span>
|
|
1137
1152
|
<small>{{ option.bankAcct }}</small>
|
|
@@ -1158,7 +1173,7 @@ onMounted(() => {
|
|
|
1158
1173
|
v-for="option in accountBankOptions"
|
|
1159
1174
|
:key="`${option.bankAcct}-${option.bankName}`"
|
|
1160
1175
|
:label="option.bankName"
|
|
1161
|
-
:value="option.
|
|
1176
|
+
:value="option.bankName"
|
|
1162
1177
|
>
|
|
1163
1178
|
<span class="account-option__name">{{ option.bankName }}</span>
|
|
1164
1179
|
<small>{{ option.bankAcct }}</small>
|
|
@@ -1531,7 +1546,7 @@ onMounted(() => {
|
|
|
1531
1546
|
</template>
|
|
1532
1547
|
|
|
1533
1548
|
<template
|
|
1534
|
-
v-if="detailRecord &&
|
|
1549
|
+
v-if="detailRecord && canEditStatus(detailRecord.status)"
|
|
1535
1550
|
#footer
|
|
1536
1551
|
>
|
|
1537
1552
|
<div class="drawer-review-actions">
|
|
@@ -1543,38 +1558,6 @@ onMounted(() => {
|
|
|
1543
1558
|
>
|
|
1544
1559
|
修改
|
|
1545
1560
|
</el-button>
|
|
1546
|
-
<el-button
|
|
1547
|
-
v-if="canDeleteStatus(detailRecord.status)"
|
|
1548
|
-
type="danger"
|
|
1549
|
-
plain
|
|
1550
|
-
:icon="Delete"
|
|
1551
|
-
:loading="isActionLoading(detailRecord, 'delete')"
|
|
1552
|
-
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'delete')"
|
|
1553
|
-
@click="handleDelete(detailRecord)"
|
|
1554
|
-
>
|
|
1555
|
-
删除
|
|
1556
|
-
</el-button>
|
|
1557
|
-
<template v-if="isPendingStatus(detailRecord.status)">
|
|
1558
|
-
<el-button
|
|
1559
|
-
type="primary"
|
|
1560
|
-
:icon="CircleCheck"
|
|
1561
|
-
:loading="isActionLoading(detailRecord, 'approve')"
|
|
1562
|
-
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'approve')"
|
|
1563
|
-
@click="handleReview(detailRecord, 'Y')"
|
|
1564
|
-
>
|
|
1565
|
-
确认
|
|
1566
|
-
</el-button>
|
|
1567
|
-
<el-button
|
|
1568
|
-
type="danger"
|
|
1569
|
-
plain
|
|
1570
|
-
:icon="CircleClose"
|
|
1571
|
-
:loading="isActionLoading(detailRecord, 'reject')"
|
|
1572
|
-
:disabled="activeRowAction !== null && !isActionLoading(detailRecord, 'reject')"
|
|
1573
|
-
@click="handleReview(detailRecord, 'N')"
|
|
1574
|
-
>
|
|
1575
|
-
拒绝
|
|
1576
|
-
</el-button>
|
|
1577
|
-
</template>
|
|
1578
1561
|
</div>
|
|
1579
1562
|
</template>
|
|
1580
1563
|
</el-drawer>
|
|
@@ -285,10 +285,10 @@
|
|
|
285
285
|
box-shadow: 0 4px 10px rgba(22, 104, 255, .24);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
/*
|
|
288
|
+
/* 左右卡片状态下保留两个快速筛选项,并与操作按钮保持同一行。 */
|
|
289
289
|
.forecast-info-page[data-page-scope="foreign-currency-settlement"] .forecast-info-filter--horizontal {
|
|
290
290
|
display: grid;
|
|
291
|
-
grid-template-columns: minmax(
|
|
291
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
292
292
|
align-items: center;
|
|
293
293
|
column-gap: 8px;
|
|
294
294
|
justify-content: space-between;
|
|
@@ -297,8 +297,8 @@
|
|
|
297
297
|
|
|
298
298
|
.forecast-info-page[data-page-scope="foreign-currency-settlement"] .forecast-info-filter--horizontal .forecast-info-filter__grid {
|
|
299
299
|
min-width: 0;
|
|
300
|
-
grid-template-columns: minmax(0, 1fr);
|
|
301
|
-
column-gap:
|
|
300
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
301
|
+
column-gap: 8px;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
.forecast-info-page[data-page-scope="foreign-currency-settlement"] .forecast-info-filter--horizontal .forecast-info-filter__item {
|