feat:【antd】【crm】优化 backlog 的整体代码

This commit is contained in:
YunaiV
2025-09-30 13:08:46 +08:00
parent f381f934e8
commit 0d1901abdb
11 changed files with 21 additions and 10 deletions

View File

@@ -50,6 +50,7 @@ export namespace CrmContractApi {
creatorName: string; creatorName: string;
updateTime?: Date; updateTime?: Date;
products?: ContractProduct[]; products?: ContractProduct[];
contactName?: string;
} }
} }

View File

@@ -46,6 +46,7 @@ export const CONTRACT_EXPIRY_TYPE = [
{ label: '已过期', value: 2 }, { label: '已过期', value: 2 },
]; ];
/** 左侧菜单 */
export const useLeftSides = ( export const useLeftSides = (
customerTodayContactCount: Ref<number>, customerTodayContactCount: Ref<number>,
clueFollowCount: Ref<number>, clueFollowCount: Ref<number>,

View File

@@ -78,12 +78,12 @@ async function getCount() {
} }
/** 激活时 */ /** 激活时 */
onActivated(async () => { onActivated(() => {
getCount(); getCount();
}); });
/** 初始化 */ /** 初始化 */
onMounted(async () => { onMounted(() => {
getCount(); getCount();
}); });
</script> </script>
@@ -104,9 +104,9 @@ onMounted(async () => {
</List.Item.Meta> </List.Item.Meta>
<template #extra> <template #extra>
<Badge <Badge
v-if="item.count.value > 0"
:color="item.menu === leftMenu ? 'blue' : 'red'" :color="item.menu === leftMenu ? 'blue' : 'red'"
:count="item.count.value" :count="item.count.value"
:show-zero="true"
/> />
</template> </template>
</List.Item> </List.Item>

View File

@@ -53,6 +53,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -53,7 +53,7 @@ const [Grid] = useVbenVxeGrid({
allowClear: true, allowClear: true,
options: AUDIT_STATUS, options: AUDIT_STATUS,
}, },
defaultValue: 10, defaultValue: AUDIT_STATUS[0]!.value,
}, },
], ],
}, },
@@ -75,6 +75,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -27,6 +27,7 @@ function handleProcessDetail(row: CrmContractApi.Contract) {
function handleContractDetail(row: CrmContractApi.Contract) { function handleContractDetail(row: CrmContractApi.Contract) {
push({ name: 'CrmContractDetail', params: { id: row.id } }); push({ name: 'CrmContractDetail', params: { id: row.id } });
} }
/** 打开客户详情 */ /** 打开客户详情 */
function handleCustomerDetail(row: CrmContractApi.Contract) { function handleCustomerDetail(row: CrmContractApi.Contract) {
push({ name: 'CrmCustomerDetail', params: { id: row.id } }); push({ name: 'CrmCustomerDetail', params: { id: row.id } });
@@ -53,7 +54,7 @@ const [Grid] = useVbenVxeGrid({
allowClear: true, allowClear: true,
options: CONTRACT_EXPIRY_TYPE, options: CONTRACT_EXPIRY_TYPE,
}, },
defaultValue: 1, defaultValue: CONTRACT_EXPIRY_TYPE[0]!.value,
}, },
], ],
}, },
@@ -75,6 +76,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -53,6 +53,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -31,7 +31,7 @@ const [Grid] = useVbenVxeGrid({
allowClear: true, allowClear: true,
options: SCENE_TYPES, options: SCENE_TYPES,
}, },
defaultValue: 1, defaultValue: SCENE_TYPES[0]!.value,
}, },
], ],
}, },
@@ -53,6 +53,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -31,7 +31,7 @@ const [Grid] = useVbenVxeGrid({
allowClear: true, allowClear: true,
options: CONTACT_STATUS, options: CONTACT_STATUS,
}, },
defaultValue: 1, defaultValue: CONTACT_STATUS[0]!.value,
}, },
{ {
fieldName: 'sceneType', fieldName: 'sceneType',
@@ -41,7 +41,7 @@ const [Grid] = useVbenVxeGrid({
allowClear: true, allowClear: true,
options: SCENE_TYPES, options: SCENE_TYPES,
}, },
defaultValue: 1, defaultValue: SCENE_TYPES[0]!.value,
}, },
], ],
}, },
@@ -63,6 +63,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -49,7 +49,7 @@ const [Grid] = useVbenVxeGrid({
allowClear: true, allowClear: true,
options: AUDIT_STATUS, options: AUDIT_STATUS,
}, },
defaultValue: 10, defaultValue: AUDIT_STATUS[0]!.value,
}, },
], ],
}, },
@@ -70,6 +70,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,

View File

@@ -49,7 +49,7 @@ const [Grid] = useVbenVxeGrid({
allowClear: true, allowClear: true,
options: RECEIVABLE_REMIND_TYPE, options: RECEIVABLE_REMIND_TYPE,
}, },
defaultValue: 1, defaultValue: RECEIVABLE_REMIND_TYPE[0]!.value,
}, },
], ],
}, },
@@ -70,6 +70,7 @@ const [Grid] = useVbenVxeGrid({
}, },
rowConfig: { rowConfig: {
keyField: 'id', keyField: 'id',
isHover: true,
}, },
toolbarConfig: { toolbarConfig: {
refresh: true, refresh: true,