| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746 |
- import request from '@/utils/request'
-
- /**
- * 新建编辑
- * @param {*} data
- */
- export function crmCustomerSaveAPI(data) {
- const url = data.id && data.name ? 'update' : 'save'
- return request({
- url: 'crm/customer/' + url,
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 列表
- * @param {*} data
- */
- export function crmCustomerIndexAPI(data) {
- return request({
- url: 'crm/customer/index',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 删除
- * @param {*} data
- */
- export function crmCustomerDeleteAPI(data) {
- return request({
- url: 'crm/customer/delete',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 公海列表
- * @param {*} data
- */
- export function crmCustomerPoolListAPI(data) {
- return request({
- url: 'crm/customerPool/index',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 删除
- * @param {*} data
- */
- export function crmCustomerPoolDeleteAPI(data) {
- return request({
- url: 'crm/customerPool/delete',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 设置公海
- * @param {*} data
- */
- export function crmCustomerPoolSetAPI(data) {
- return request({
- url: 'admin/setting/setPool',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 公海设置列表
- * @param {*} data
- */
- export function crmCustomerPoolSetListAPI(data) {
- return request({
- url: 'admin/setting/pool',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 公海设置删除
- */
- export function crmCustomerPoolSetDeleteAPI(data) {
- return request({
- url: 'admin/setting/deletePool',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 公海设置详情
- * @param {*} data
- */
- export function crmCustomerPoolSetDetailAPI(data) {
- return request({
- url: 'admin/setting/readPool',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 公海启停
- * @param {*} data
- */
- export function crmCustomerPoolSetChangeStatusAPI(data) {
- return request({
- url: 'admin/setting/changePool',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 公海客户转移
- * prePoolId 转出公海id
- * postPoolId 转入公海id
- * @param {*} data
- */
- export function crmCustomerPoolSetTransferAPI(data) {
- return request({
- url: 'admin/setting/transferPool',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 转移数据源
- * @param {*} data
- */
- export function crmCustomerPoolSetNameListAPI(data) {
- return request({
- url: 'admin/setting/pool',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 客户管理用到的公海列表
- * @param {*} data
- */
- export function crmCustomerPoolNameListAPI(data) {
- return request({
- url: 'crm/customerPool/pondList',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 获取客户级别选项接口
- * @param {*} data
- */
- export function crmCustomerPoolQueryLevelAPI(data) {
- return request({
- url: 'admin/setting/customerLevel',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 详情
- */
- export function crmCustomerReadAPI(data) {
- return request({
- url: `crm/${data.pool_id ? 'customerPool' : 'customer'}/read`,
- method: 'post',
- data: data
- })
- }
-
- // 操作
- /**
- * 客户锁定,解锁
- * @param {*} data
- */
- export function crmCustomerLockAPI(data) {
- return request({
- url: 'crm/customer/lock',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 客户放入公海
- * @param {*} data
- * customer_id 客户数组
- */
- export function crmCustomerPutInPoolAPI(data) {
- return request({
- url: 'crm/customer/putInPool',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户转移
- * @param {*} data
- */
- export function crmCustomerTransferAPI(data) {
- return request({
- url: 'crm/customer/transfer',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户导出
- * @param {*} data
- * customer_id 客户ID
- */
- export function crmCustomerExcelExportAPI(data) {
- return request({
- url: 'crm/customer/excelExport',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- },
- responseType: 'blob'
- })
- }
-
- /**
- * 全部导出
- * @param {*} data
- */
- export function crmCustomerExcelAllExportAPI(data) {
- return request({
- url: 'crm/customer/excelExport',
- method: 'post',
- data: data,
- responseType: 'blob',
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户导入
- * @param {*} data
- * customer_id 客户ID
- */
- export function crmCustomerExcelImportAPI(data) {
- var param = new FormData()
- Object.keys(data).forEach(key => {
- param.append(key, data[key])
- })
- return request({
- url: 'crm/customer/excelImport',
- method: 'post',
- data: param,
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- })
- }
-
- /**
- * 公海客户导入
- * @param {*} data
- * customer_id 客户ID
- */
- export function crmCustomerPoolExcelImportAPI(data) {
- var param = new FormData()
- Object.keys(data).forEach(key => {
- param.append(key, data[key])
- })
- return request({
- url: 'crm/customerPool/import',
- method: 'post',
- data: param,
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- })
- }
-
- /**
- * 客户导入模板下载
- * @param {*} data
- *
- */
- export const crmCustomerExcelDownloadURL = window.BASE_URL + 'crmCustomer/downloadExcel'
- export function crmCustomerDownloadExcelAPI(data) {
- return request({
- url: 'crm/customer/excelDownload',
- method: 'get',
- data: data,
- responseType: 'blob'
- })
- }
-
- /**
- * 客户公海导入模板下载
- * @param {*} data
- *
- */
-
- export function crmCustomerPoolDownloadExcelAPI(data) {
- return request({
- url: 'crm/customerPool/excelDownload',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- },
- responseType: 'blob'
- })
- }
-
- /**
- * 公海导出
- * @param {*} data
- */
- export function crmCustomerPoolExcelExportAPI(data) {
- return request({
- url: 'crm/customerPool/export',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- },
- responseType: 'blob',
- timeout: 60000
- })
- }
-
- /**
- * 公海全部导出
- * @param {*} data
- */
- export function crmCustomerPoolExcelAllExport(data) {
- return request({
- url: 'crm/customerPool/export',
- method: 'post',
- data: data,
- responseType: 'blob',
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 公海字段查询
- * @param {*} data
- */
- export function crmCustomerPoolQueryPoolFieldAPI(data) {
- return request({
- url: 'admin/setting/poolField',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 获取公海池 操作权限
- * @param {*} data
- */
- export function crmCustomerPoolQueryAuthAPI(data) {
- return request({
- // url: 'crm/customer/poolAuthority',
- url: 'crm/customerPool/authority',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 客户分配
- * @param {*} data
- */
- export function crmCustomerDistributeAPI(data) {
- return request({
- url: 'crm/customerPool/distribute',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户领取
- * @param {*} data
- */
- export function crmCustomerReceiveAPI(data) {
- return request({
- url: 'crm/customerPool/receive',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户下联系人
- * @param {*} data
- */
- export function crmCustomerQueryContactsAPI(data) {
- return request({
- url: 'crm/contacts/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户下回访
- * @param {*} data
- */
- export function crmCustomerQueryVisitAPI(data) {
- return request({
- url: 'crm/visit/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户下商机
- * @param {*} data
- */
- export function crmCustomerQueryBusinessAPI(data) {
- return request({
- url: 'crm/business/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户下合同
- * @param {*} data
- */
- export function crmCustomerQueryContractAPI(data) {
- return request({
- url: 'crm/contract/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户下回款计划
- * @param {*} data
- */
- export function crmCustomerQueryReceivablesPlanAPI(data) {
- return request({
- url: 'crm/receivables_plan/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户下回款
- * @param {*} data
- */
- export function crmCustomerQueryReceivablesAPI(data) {
- return request({
- url: 'crm/receivables/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- // 团队操作
- /**
- * 团队成员创建
- * @param {*} data
- * types crm_leads
- * typesId 分类ID
- */
- export function crmCustomerSettingTeamSaveAPI(data) {
- return request({
- url: 'crm/setting/teamSave',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- export function crmCustomerSettingTeamDeleteAPI(data) {
- return request({
- url: 'crm/setting/teamSave',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- export function crmCustomerTeamMembersAPI(data) {
- return request({
- url: `crm/setting/team`,
- method: 'post',
- data
- })
- }
-
- export function crmCustomerUpdateMembersAPI(data) {
- return request({
- url: 'crm/setting/teamSave',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 退出团队
- * @param {*} data
- */
- export function crmCustomerExitTeamAPI(data) {
- return request({
- url: `crm/setting/quitTeam`,
- method: 'post',
- data
- })
- }
-
- /**
- * 客户标记跟进
- * @param {*} data
- * id 客户IDs
- */
- export function crmCustomerSetFollowAPI(data) {
- return request({
- url: 'crm/message/allDeal',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 客户成交状态修改
- * @param {*} data
- * id 客户IDs
- */
- export function crmCustomerDealStatusAPI(data) {
- return request({
- url: 'crm/customer/deal_status',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 设置首要联系人
- * @param {*} data
- *
- */
- export function crmCustomerSetContactsAPI(data) {
- return request({
- url: 'crm/contacts/setPrimary',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 数据查重
- * @param {*} data
- *
- */
- export function crmCustomerDataCheckAPI(data) {
- return request({
- url: 'crm/index/queryRepeat',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 附件列表
- * @param {*} data
- *
- */
- export function crmCustomerFileListAPI(data) {
- return request({
- url: 'admin/file/index',
- method: 'post',
- data: data
- })
- }
-
- /**
- * tab数量
- * @param {*} data
- *
- */
- export function crmCustomerNumAPI(data) {
- return request({
- url: 'crm/customer/count',
- method: 'post',
- data: data
- })
- }
-
- /**
- * 客户标星
- * @param {*} data
- *
- */
- export function crmCustomerStarAPI(data) {
- return request({
- url: `crm/customer/star`,
- method: 'post',
- data
- })
- }
-
- /**
- * 发票信息
- * @param {*} data
- */
- export function crmCustomerInvoiceAPI(data) {
- return request({
- url: 'crm/invoice/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 发票抬头信息
- * @param {*} data
- */
- export function crmCustomerInvoiceInfoAPI(data) {
- return request({
- url: 'crm/invoiceInfo/index',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 9.0公海设置
- * @param {*} data
- */
- export function crmSettingConfig(data) {
- return request({
- url: 'crm/setting/config',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
-
- /**
- * 9.0公海设置获取
- * @param {*} data
- */
- export function customerSettingData(data) {
- return request({
- url: 'crm/setting/configData',
- method: 'post',
- data: data,
- headers: {
- 'Content-Type': 'application/json;charset=UTF-8'
- }
- })
- }
|