crm 报价 商机 合同 三块整改

pull/781/head
quu 2025-05-02 17:35:00 +09:00
parent 9dfa2c178a
commit fc508deac0
3 changed files with 24 additions and 1 deletions

View File

@ -65,6 +65,11 @@ export const QuotationApi = {
return await request.download({ url: `/crm/quotation/export-excel`, params })
},
// 提交审核
submitContract: async (id: number) => {
return await request.put({ url: `/crm/quotation/submit?id=${id}` })
},
// ==================== 子表CRM 报价产品关联) ====================
// 获得CRM 报价产品关联列表

View File

@ -538,6 +538,7 @@ const onCustomerChange = async (customerId: string) => {
formData.value.dishonestRecord = customerRes.dishonestRecord;
formData.value.financingRecord = customerRes.financingRecord;
formData.value.enforcementRecord = customerRes.enforcementRecord;
formData.value.creditAmount = customerRes.creditAmount || 0;
} catch (err) {
console.error('获取客户详情失败:', err);
} finally {
@ -661,7 +662,7 @@ onMounted(async () => {
if (formType.value) open(formType.value)
//
customerList.value = await CustomerApi.getCustomerSimpleList()
customerList.value = await CustomerApi.getSelfCustomerSimpleList()
//
userOptions.value = await UserApi.getSimpleUserList()
//

View File

@ -177,6 +177,12 @@
<el-button type="primary" link><Icon icon="ep:d-arrow-right" /> 更多</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item
command="handleSubmit"
v-if="checkPermi(['crm:contract:update']) && scope.row.auditStatus === 0"
>
提交审核
</el-dropdown-item>
<el-dropdown-item
command="handleProcessDetail"
v-if="checkPermi(['crm:customer-suggestion:query'])"
@ -297,6 +303,9 @@ const openFormDetail = (row: Object) => {
/** 操作分发 */
const handleCommand = (command: string, row: UserApi.UserVO) => {
switch (command) {
case 'handleSubmit':
handleSubmit(row)
break
case 'handleDelete':
handleDelete(row.id)
break
@ -308,6 +317,14 @@ const handleCommand = (command: string, row: UserApi.UserVO) => {
}
}
/** 提交审核 **/
const handleSubmit = async (row: QuotationVO) => {
await message.confirm(`您确定提交【${row.name}】审核吗?`)
await QuotationApi.submitContract(row.id)
message.success('提交审核成功!')
await getList()
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {