crm 报价 商机 合同 三块整改
parent
9dfa2c178a
commit
fc508deac0
|
|
@ -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 报价产品关联列表
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
//票据
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue