From bef3d94968fc70667f3123cb23ee69550e08a5ca Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 15 十月 2026 14:03:17 +0800
Subject: [PATCH] feat(crm): 优化合同管理及待办功能
---
src/views/crm/backlog/modules/receivable-audit-list.vue | 41 ++++++++++++++++++++++++++++-------------
1 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/src/views/crm/backlog/modules/receivable-audit-list.vue b/src/views/crm/backlog/modules/receivable-audit-list.vue
index a2a80be..de37fe4 100644
--- a/src/views/crm/backlog/modules/receivable-audit-list.vue
+++ b/src/views/crm/backlog/modules/receivable-audit-list.vue
@@ -7,13 +7,14 @@
import { Button, message } from 'ant-design-vue';
-import { useVbenVxeGrid } from '#/adapter/vxe-table';
+import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getReceivablePage, updateReceivableStatus } from '#/api/crm/receivable';
import { useGridColumns } from '#/views/crm/receivable/data';
import { AUDIT_STATUS } from '../data';
const { push } = useRouter();
+const emit = defineEmits<{ refresh: [] }>();
/** 瀹℃牳 */
async function handleAudit(row: CrmReceivableApi.Receivable) {
@@ -24,7 +25,8 @@
try {
await updateReceivableStatus(row.id!, 20);
message.success('瀹℃牳鎴愬姛');
- gridApi.query();
+ await gridApi.query();
+ emit('refresh');
} finally {
hideLoading();
}
@@ -42,7 +44,11 @@
/** 鎵撳紑鍚堝悓璇︽儏 */
function handleContractDetail(row: CrmReceivableApi.Receivable) {
- push({ name: 'CrmContractDetail', params: { id: row.contractId } });
+ if (row.contractId) push({ name: 'CrmContractDetail', params: { id: row.contractId } });
+}
+
+function handleInvoiceDetail(row: CrmReceivableApi.Receivable) {
+ if (row.invoiceId) push({ name: 'CrmInvoiceDetail', params: { id: row.invoiceId } });
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -50,7 +56,7 @@
schema: [
{
fieldName: 'auditStatus',
- label: '鍚堝悓鐘舵��',
+ label: '瀹℃牳鐘舵��',
component: 'Select',
componentProps: {
allowClear: true,
@@ -70,6 +76,7 @@
return await getReceivablePage({
pageNo: page.currentPage,
pageSize: page.pageSize,
+ sceneType: 1,
...formValues,
});
},
@@ -100,18 +107,26 @@
</Button>
</template>
<template #contractNo="{ row }">
- <Button type="link" @click="handleContractDetail(row)">
- {{ row.contractNo }}
+ <Button v-if="row.contractId" type="link" @click="handleContractDetail(row)">
+ {{ row.contract?.no ?? row.contractNo ?? '鈥�' }}
</Button>
+ <span v-else>鈥�</span>
+ </template>
+ <template #invoiceNo="{ row }">
+ <template v-if="row.invoice">
+ <Button type="link" @click="handleInvoiceDetail(row)">{{ row.invoice.no }}</Button>
+ <span> / {{ row.invoice.invoiceNo ?? '鈥�' }} / 楼{{ row.invoice.price ?? 0 }}</span>
+ </template>
+ <span v-else>鈥�</span>
</template>
<template #actions="{ row }">
- <Button
- v-if="row.auditStatus === 10"
- type="link"
- @click="handleAudit(row)"
- >
- 瀹℃牳
- </Button>
+ <TableAction :actions="[{
+ label: '瀹℃牳',
+ type: 'link',
+ auth: ['crm:receivable:update'],
+ ifShow: row.auditStatus === 10,
+ onClick: handleAudit.bind(null, row),
+ }]" />
</template>
</Grid>
</template>
--
Gitblit v1.9.3