调整收付款问题
This commit is contained in:
@@ -71,10 +71,9 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="column.link && canClaim(row)" type="primary" @click="openClaim(row)">
|
||||
<el-link v-if="column.link" type="primary" @click="openDetail(row)">
|
||||
{{ displayValue(row[column.prop]) }}
|
||||
</el-link>
|
||||
<span v-else-if="column.link">{{ displayValue(row[column.prop]) }}</span>
|
||||
<el-tag
|
||||
v-else-if="column.status"
|
||||
:type="statusType(row.claimStatus)"
|
||||
@@ -105,6 +104,74 @@
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-dialog
|
||||
v-model="detailDialog.visible"
|
||||
title="收款流水详情"
|
||||
width="960px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<div v-loading="detailDialog.loading">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="认领通知单">
|
||||
{{ displayValue(detailDialog.data.receiptNoticeNo) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款人">
|
||||
{{ displayValue(detailDialog.data.payerName) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款金额">
|
||||
{{ formatMoney(detailDialog.data.receiptAmount) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="交易时间">
|
||||
{{ displayValue(detailDialog.data.transactionTime) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="对方户名">
|
||||
{{ displayValue(detailDialog.data.counterpartyName) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="对方开户行">
|
||||
{{ displayValue(detailDialog.data.counterpartyBank) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="对方账号">
|
||||
{{ displayValue(detailDialog.data.counterpartyAccount) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="明细流水号">
|
||||
{{ displayValue(detailDialog.data.detailSerialNo) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="认领状态">
|
||||
<el-tag :type="statusType(detailDialog.data.claimStatus)">
|
||||
{{ displayValue(detailDialog.data.claimStatusName) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="已认领金额">
|
||||
{{ formatMoney(detailDialog.data.claimedAmount) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="剩余可认领金额">
|
||||
{{ formatMoney(detailDialog.data.remainingAmount) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="摘要">
|
||||
{{ displayValue(detailDialog.data.summary) }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<div class="dialog-section-title receipt-flow-page__detail-title">认领记录</div>
|
||||
<el-table :data="detailDialog.claimRecords" border empty-text="暂无认领记录">
|
||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||
<el-table-column prop="createTime" label="认领时间" min-width="170" align="center" />
|
||||
<el-table-column label="认领金额" min-width="130" align="right">
|
||||
<template #default="{ row }">{{ formatMoney(row.operationAmount) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operatorName" label="认领人" min-width="120" align="center" />
|
||||
<el-table-column label="状态变化" min-width="170" align="center">
|
||||
<template #default="{ row }">{{ claimStatusChange(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="content" label="认领说明" min-width="220" />
|
||||
</el-table>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailDialog.visible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
@@ -150,8 +217,10 @@ const formatMockDateTime = date => {
|
||||
)}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
|
||||
};
|
||||
|
||||
const createReceiptFlowMockRows = () =>
|
||||
receiptFlowMockTemplates.map((template, index) => {
|
||||
const createReceiptFlowMockRows = () => {
|
||||
const count = 20 + Math.floor(Math.random() * 31);
|
||||
return Array.from({ length: count }, (_, index) => {
|
||||
const template = receiptFlowMockTemplates[index % receiptFlowMockTemplates.length];
|
||||
const transactionDate = new Date();
|
||||
transactionDate.setDate(transactionDate.getDate() - Math.floor(Math.random() * 7));
|
||||
transactionDate.setHours(8 + Math.floor(Math.random() * 10), Math.floor(Math.random() * 60), 0);
|
||||
@@ -167,6 +236,7 @@ const createReceiptFlowMockRows = () =>
|
||||
sourceUpdatedTime: transactionTime,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const emptyQuery = () => ({
|
||||
receiptNoticeNo: '',
|
||||
@@ -190,6 +260,7 @@ export default {
|
||||
syncing: false,
|
||||
searchExpanded: false,
|
||||
page: { current: 1, size: 10, total: 0 },
|
||||
detailDialog: { visible: false, loading: false, data: {}, claimRecords: [] },
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -250,6 +321,21 @@ export default {
|
||||
this.syncing = false;
|
||||
}
|
||||
},
|
||||
async openDetail(row) {
|
||||
this.detailDialog = {
|
||||
visible: true,
|
||||
loading: true,
|
||||
data: { ...row },
|
||||
claimRecords: [],
|
||||
};
|
||||
try {
|
||||
const data = this.unwrapData(await api.getDetail(row.id));
|
||||
this.detailDialog.data = data || {};
|
||||
this.detailDialog.claimRecords = data?.claimRecords || [];
|
||||
} finally {
|
||||
this.detailDialog.loading = false;
|
||||
}
|
||||
},
|
||||
openClaim(row) {
|
||||
this.$router.push({
|
||||
path: '/payment/receipt-flow/form',
|
||||
@@ -265,6 +351,11 @@ export default {
|
||||
statusType(status) {
|
||||
return { claimed: 'success', partial: 'warning', unclaimed: 'info' }[status] || '';
|
||||
},
|
||||
claimStatusChange(row) {
|
||||
const label = status =>
|
||||
({ claimed: '认领完成', partial: '部分认领', unclaimed: '未认领' }[status] || '-');
|
||||
return `${label(row.fromStatus)} → ${label(row.toStatus)}`;
|
||||
},
|
||||
displayValue(value) {
|
||||
return value === null || value === undefined || value === '' ? '-' : value;
|
||||
},
|
||||
@@ -314,6 +405,9 @@ export default {
|
||||
justify-content: flex-end;
|
||||
padding: 16px 0;
|
||||
}
|
||||
.receipt-flow-page__detail-title {
|
||||
margin: 20px 0 12px;
|
||||
}
|
||||
.receipt-flow-page :deep(.el-table) {
|
||||
--el-table-border-color: #eff1f7;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user