CRM:商机接入合同列表

This commit is contained in:
YunaiV 2024-02-24 16:08:00 +08:00
parent 7164ae5d49
commit 43bdb3cdba
5 changed files with 23 additions and 13 deletions

View File

@ -55,6 +55,11 @@ export const getContractPageByCustomer = async (params: any) => {
return await request.get({ url: `/crm/contract/page-by-customer`, params }) return await request.get({ url: `/crm/contract/page-by-customer`, params })
} }
// 查询 CRM 联系人列表,基于指定商机
export const getContractPageByBusiness = async (params: any) => {
return await request.get({ url: `/crm/contract/page-by-business`, params })
}
// 查询 CRM 合同详情 // 查询 CRM 合同详情
export const getContract = async (id: number) => { export const getContract = async (id: number) => {
return await request.get({ url: `/crm/contract/get?id=` + id }) return await request.get({ url: `/crm/contract/get?id=` + id })

View File

@ -101,7 +101,7 @@
<el-input <el-input
disabled disabled
v-model="formData.totalProductPrice" v-model="formData.totalProductPrice"
:formatter="erpPriceInputFormatter" :formatter="erpPriceTableColumnFormatter"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -123,7 +123,7 @@
disabled disabled
v-model="formData.totalPrice" v-model="formData.totalPrice"
placeholder="请输入商机金额" placeholder="请输入商机金额"
:formatter="erpPriceInputFormatter" :formatter="erpPriceTableColumnFormatter"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -142,7 +142,7 @@ import * as CustomerApi from '@/api/crm/customer'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import BusinessProductForm from './components/BusinessProductForm.vue' import BusinessProductForm from './components/BusinessProductForm.vue'
import { erpPriceInputFormatter, erpPriceMultiply } from '@/utils' import { erpPriceMultiply, erpPriceTableColumnFormatter } from '@/utils'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //

View File

@ -34,8 +34,9 @@
<el-tab-pane label="产品"> <el-tab-pane label="产品">
<BusinessProductList :business="business" /> <BusinessProductList :business="business" />
</el-tab-pane> </el-tab-pane>
<!-- TODO 合同 --> <el-tab-pane label="合同" lazy>
<el-tab-pane label="合同"> 123 </el-tab-pane> <ContractList :biz-id="business.id!" :biz-type="BizTypeEnum.CRM_BUSINESS" />
</el-tab-pane>
<el-tab-pane label="操作日志"> <el-tab-pane label="操作日志">
<OperateLogV2 :log-list="logList" /> <OperateLogV2 :log-list="logList" />
</el-tab-pane> </el-tab-pane>
@ -71,6 +72,7 @@ import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
import FollowUpList from '@/views/crm/followup/index.vue' import FollowUpList from '@/views/crm/followup/index.vue'
import ContactList from '@/views/crm/contact/components/ContactList.vue' import ContactList from '@/views/crm/contact/components/ContactList.vue'
import BusinessUpdateStatusForm from '@/views/crm/business/BusinessUpdateStatusForm.vue' import BusinessUpdateStatusForm from '@/views/crm/business/BusinessUpdateStatusForm.vue'
import ContractList from '@/views/crm/contract/components/ContractList.vue'
defineOptions({ name: 'CrmBusinessDetail' }) defineOptions({ name: 'CrmBusinessDetail' })

View File

@ -159,7 +159,7 @@
<el-input <el-input
disabled disabled
v-model="formData.totalProductPrice" v-model="formData.totalProductPrice"
:formatter="erpPriceInputFormatter" :formatter="erpPriceTableColumnFormatter"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -176,12 +176,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="折扣后金额" prop="price"> <el-form-item label="折扣后金额" prop="totalPrice">
<el-input <el-input
disabled disabled
v-model="formData.totalPrice" v-model="formData.totalPrice"
placeholder="请输入商机金额" placeholder="请输入商机金额"
:formatter="erpPriceInputFormatter" :formatter="erpPriceTableColumnFormattere"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -199,10 +199,9 @@ import * as ContractApi from '@/api/crm/contract'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import * as ContactApi from '@/api/crm/contact' import * as ContactApi from '@/api/crm/contact'
import * as BusinessApi from '@/api/crm/business' import * as BusinessApi from '@/api/crm/business'
import { erpPriceInputFormatter, erpPriceMultiply } from '@/utils' import { erpPriceMultiply, erpPriceTableColumnFormatter } from '@/utils'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import ContractProductForm from '@/views/crm/contract/components/ContractProductForm.vue' import ContractProductForm from '@/views/crm/contract/components/ContractProductForm.vue'
import { bu } from '../../../../dist-prod/assets/index-9eac537b'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //

View File

@ -22,8 +22,8 @@
<el-table-column <el-table-column
label="合同金额(元)" label="合同金额(元)"
align="center" align="center"
prop="price" prop="totalPrice"
:formatter="erpPriceInputFormatter" :formatter="erpPriceTableColumnFormatter"
/> />
<el-table-column <el-table-column
label="开始时间" label="开始时间"
@ -63,7 +63,7 @@ import ContractForm from './../ContractForm.vue'
import { BizTypeEnum } from '@/api/crm/permission' import { BizTypeEnum } from '@/api/crm/permission'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { erpPriceInputFormatter } from '@/utils' import { erpPriceTableColumnFormatter } from '@/utils'
defineOptions({ name: 'CrmContractList' }) defineOptions({ name: 'CrmContractList' })
const props = defineProps<{ const props = defineProps<{
@ -93,6 +93,10 @@ const getList = async () => {
queryParams.customerId = props.bizId queryParams.customerId = props.bizId
data = await ContractApi.getContractPageByCustomer(queryParams) data = await ContractApi.getContractPageByCustomer(queryParams)
break break
case BizTypeEnum.CRM_BUSINESS:
queryParams.businessId = props.bizId
data = await ContractApi.getContractPageByBusiness(queryParams)
break
default: default:
return return
} }