From 6caa94ec472826f62d4f318de4fd957eb7feef69 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 24 Feb 2024 17:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20CRM=EF=BC=9A=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E4=BA=8B=E9=A1=B9=EF=BC=88=E6=8E=A5=E5=85=A5=E5=90=88=E5=90=8C?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/backlog/index.ts | 5 - src/api/crm/contract/index.ts | 10 ++ .../ContractAuditList.vue} | 92 +++++++++++++++---- .../ContractRemindList.vue} | 92 +++++++++++++++---- .../backlog/components/CustomerFollowList.vue | 11 ++- src/views/crm/backlog/components/common.ts | 5 +- src/views/crm/backlog/index.vue | 29 +++--- src/views/crm/contract/index.vue | 2 +- 8 files changed, 183 insertions(+), 63 deletions(-) rename src/views/crm/backlog/{tables/CheckContract.vue => components/ContractAuditList.vue} (67%) rename src/views/crm/backlog/{tables/EndContract.vue => components/ContractRemindList.vue} (68%) diff --git a/src/api/crm/backlog/index.ts b/src/api/crm/backlog/index.ts index 614b0ef2..7ea01990 100644 --- a/src/api/crm/backlog/index.ts +++ b/src/api/crm/backlog/index.ts @@ -1,11 +1,6 @@ import request from '@/config/axios' // TODO 芋艿:融合下 -// 3. 获得分配给我的客户数量 -export const getFollowCustomerCount = async () => { - return await request.get({ url: '/crm/customer/follow-customer-count' }) -} - // 5. 获得待审核合同数量 export const getCheckContractCount = async () => { return await request.get({ url: '/crm/contract/check-contract-count' }) diff --git a/src/api/crm/contract/index.ts b/src/api/crm/contract/index.ts index 1115e950..86ad9632 100644 --- a/src/api/crm/contract/index.ts +++ b/src/api/crm/contract/index.ts @@ -94,3 +94,13 @@ export const submitContract = async (id: number) => { export const transferContract = async (data: TransferReqVO) => { return await request.put({ url: '/crm/contract/transfer', data }) } + +// 获得待审核合同数量 +export const getAuditContractCount = async () => { + return await request.get({ url: '/crm/contract/audit-count' }) +} + +// 获得即将到期(提醒)的合同数量 +export const getRemindContractCount = async () => { + return await request.get({ url: '/crm/contract/remind-count' }) +} diff --git a/src/views/crm/backlog/tables/CheckContract.vue b/src/views/crm/backlog/components/ContractAuditList.vue similarity index 67% rename from src/views/crm/backlog/tables/CheckContract.vue rename to src/views/crm/backlog/components/ContractAuditList.vue index ad4782e0..62a80b4d 100644 --- a/src/views/crm/backlog/tables/CheckContract.vue +++ b/src/views/crm/backlog/components/ContractAuditList.vue @@ -30,8 +30,14 @@ - - + + + + - - + + + + - - {{ scope.row.contactName }} + {{ scope.row.signContactName }} - + + - + + + + + import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' import * as ContractApi from '@/api/crm/contract' -import { fenToYuanFormat } from '@/utils/formatter' import { DICT_TYPE } from '@/utils/dict' import { AUDIT_STATUS } from './common' +import { erpPriceTableColumnFormatter } from '@/utils' const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 @@ -132,7 +167,8 @@ const list = ref([]) // 列表的数据 const queryParams = reactive({ pageNo: 1, pageSize: 10, - auditStatus: 20 + sceneType: 1, // 我负责的 + auditStatus: 10 }) const queryFormRef = ref() // 搜索的表单 @@ -154,8 +190,18 @@ const handleQuery = () => { getList() } +/** 查看审批 */ +const handleProcessDetail = (row: ContractApi.ContractVO) => { + push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } }) +} + +/** 打开合同详情 */ +const { push } = useRouter() +const openDetail = (id: number) => { + push({ name: 'CrmContractDetail', params: { id } }) +} + /** 打开客户详情 */ -const { push } = useRouter() // 路由 const openCustomerDetail = (id: number) => { push({ name: 'CrmCustomerDetail', params: { id } }) } @@ -165,6 +211,16 @@ const openContactDetail = (id: number) => { push({ name: 'CrmContactDetail', params: { id } }) } +/** 打开商机详情 */ +const openBusinessDetail = (id: number) => { + push({ name: 'CrmBusinessDetail', params: { id } }) +} + +/** 激活时 */ +onActivated(async () => { + await getList() +}) + /** 初始化 **/ onMounted(() => { getList() diff --git a/src/views/crm/backlog/tables/EndContract.vue b/src/views/crm/backlog/components/ContractRemindList.vue similarity index 68% rename from src/views/crm/backlog/tables/EndContract.vue rename to src/views/crm/backlog/components/ContractRemindList.vue index f31bb524..2f87f44c 100644 --- a/src/views/crm/backlog/tables/EndContract.vue +++ b/src/views/crm/backlog/components/ContractRemindList.vue @@ -30,8 +30,14 @@ - - + + + + - - + + + + - - {{ scope.row.contactName }} + {{ scope.row.signContactName }} - + + - + + + + + { getList() } +/** 查看审批 */ +const handleProcessDetail = (row: ContractApi.ContractVO) => { + push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } }) +} + +/** 打开合同详情 */ +const { push } = useRouter() +const openDetail = (id: number) => { + push({ name: 'CrmContractDetail', params: { id } }) +} + /** 打开客户详情 */ const openCustomerDetail = (id: number) => { push({ name: 'CrmCustomerDetail', params: { id } }) @@ -166,10 +212,18 @@ const openContactDetail = (id: number) => { push({ name: 'CrmContactDetail', params: { id } }) } +/** 打开商机详情 */ +const openBusinessDetail = (id: number) => { + push({ name: 'CrmBusinessDetail', params: { id } }) +} + +/** 激活时 */ +onActivated(async () => { + await getList() +}) + /** 初始化 **/ onMounted(() => { getList() }) - - diff --git a/src/views/crm/backlog/components/CustomerFollowList.vue b/src/views/crm/backlog/components/CustomerFollowList.vue index 8e1017a3..0f367a3f 100644 --- a/src/views/crm/backlog/components/CustomerFollowList.vue +++ b/src/views/crm/backlog/components/CustomerFollowList.vue @@ -130,8 +130,8 @@ const list = ref([]) // 列表的数据 const queryParams = ref({ pageNo: 1, pageSize: 10, - followUpStatus: false, - sceneType: 1 + sceneType: 1, + followUpStatus: false }) const queryFormRef = ref() // 搜索的表单 @@ -158,10 +158,13 @@ const openDetail = (id: number) => { push({ name: 'CrmCustomerDetail', params: { id } }) } +/** 激活时 */ +onActivated(async () => { + await getList() +}) + /** 初始化 **/ onMounted(() => { getList() }) - - diff --git a/src/views/crm/backlog/components/common.ts b/src/views/crm/backlog/components/common.ts index d18763aa..9ff6bfc3 100644 --- a/src/views/crm/backlog/components/common.ts +++ b/src/views/crm/backlog/components/common.ts @@ -20,8 +20,9 @@ export const CONTACT_STATUS = [ /** 审批状态 */ export const AUDIT_STATUS = [ - { label: '已审批', value: 20 }, - { label: '待审批', value: 10 } + { label: '待审批', value: 10 }, + { label: '审核通过', value: 20 }, + { label: '审核不通过', value: 30 } ] /** 回款提醒类型 */ diff --git a/src/views/crm/backlog/index.vue b/src/views/crm/backlog/index.vue index b1351a2d..b5c3a9a4 100644 --- a/src/views/crm/backlog/index.vue +++ b/src/views/crm/backlog/index.vue @@ -17,9 +17,9 @@ - + - + @@ -33,25 +33,26 @@ import CustomerFollowList from './components/CustomerFollowList.vue' import CustomerTodayContactList from './components/CustomerTodayContactList.vue' import CustomerPutPoolRemindList from './components/CustomerPutPoolRemindList.vue' import ClueFollowList from './components/ClueFollowList.vue' -import CheckContract from './tables/CheckContract.vue' -import CheckReceivables from './tables/CheckReceivables.vue' -import EndContract from './tables/EndContract.vue' +import ContractAuditList from './components/ContractAuditList.vue' +import ContractRemindList from './components/ContractRemindList.vue' import RemindReceivables from './tables/RemindReceivables.vue' +import CheckReceivables from './tables/CheckReceivables.vue' import * as CustomerApi from '@/api/crm/customer' import * as ClueApi from '@/api/crm/clue' +import * as ContractApi from '@/api/crm/contract' defineOptions({ name: 'CrmBacklog' }) const leftMenu = ref('customerTodayContact') -const customerTodayContactCount = ref(0) const clueFollowCount = ref(0) const customerFollowCount = ref(0) const customerPutPoolRemindCount = ref(0) -const checkContractCount = ref(0) +const customerTodayContactCount = ref(0) +const contractAuditCount = ref(0) +const contractRemindCount = ref(0) const checkReceivablesCount = ref(0) const remindReceivablesCount = ref(0) -const endContractCount = ref(0) const leftSides = ref([ { @@ -76,8 +77,8 @@ const leftSides = ref([ }, { name: '待审核合同', - menu: 'checkContract', - count: checkContractCount + menu: 'contractAudit', + count: contractAuditCount }, { name: '待审核回款', @@ -91,8 +92,8 @@ const leftSides = ref([ }, { name: '即将到期的合同', - menu: 'endContract', - count: endContractCount + menu: 'contractRemind', + count: contractRemindCount } ]) @@ -110,10 +111,10 @@ const getCount = () => { ) CustomerApi.getFollowCustomerCount().then((count) => (customerFollowCount.value = count)) ClueApi.getFollowClueCount().then((count) => (clueFollowCount.value = count)) - BacklogApi.getCheckContractCount().then((count) => (checkContractCount.value = count)) + ContractApi.getAuditContractCount().then((count) => (contractAuditCount.value = count)) + ContractApi.getRemindContractCount().then((count) => (contractRemindCount.value = count)) BacklogApi.getCheckReceivablesCount().then((count) => (checkReceivablesCount.value = count)) BacklogApi.getRemindReceivablePlanCount().then((count) => (remindReceivablesCount.value = count)) - BacklogApi.getEndContractCount().then((count) => (endContractCount.value = count)) } /** 激活时 */ diff --git a/src/views/crm/contract/index.vue b/src/views/crm/contract/index.vue index 9064e161..ed266057 100644 --- a/src/views/crm/contract/index.vue +++ b/src/views/crm/contract/index.vue @@ -79,7 +79,7 @@ - +