import ajax from './ajax'
import { LOCATION_URL } from '@/config/config'

// 1. 定义基础路径
// const BASE_URL = '/huiqicha'
const BASE_URL = LOCATION_URL

//企业列表
export const custBaseInfoList = (params) => ajax(BASE_URL + `/system/custBaseInfo/list`, params, 'POST');
//企业详情
export const getBusinessInfo = (custId) => ajax(BASE_URL + `/system/business/getInfoByCustId?custId=${custId}` , 'GET');
//个人详情
export const getPersonInfo = (custId) => ajax(BASE_URL + `/system/retail/getInfoByCustId?custId=${custId}` , 'GET');
//商户详情
export const getMerchantInfo = (custId) => ajax(BASE_URL + `/system/merchant/getInfoByCustId?custId=${custId}` , 'GET');
//地址
export const visitList = (custId) => ajax(BASE_URL + `/task/visit/list?custId=${custId}` , 'GET');
//获取经营状态
export const getRegStatus = (custId) => ajax(BASE_URL + `/system/business/getRegStatus` , 'GET');
//获取行业
export const getIndustryTree = (custId) => ajax(BASE_URL + `/system/retail/selectIndustryTree` , 'GET');
//走访备注  企业和商户
export const socVisitInfoList = (socialCreditCode) => ajax(BASE_URL + `/system/campaign/visitInfoList?socialCreditCode=${socialCreditCode}` , 'GET');
//走访备注  个人
export const cusVisitInfoList = (custIdc) => ajax(BASE_URL + `/system/campaign/visitInfoList?custIdc=${custIdc}` , 'GET');
//家庭成员
export const listByIdCard = (idCard) => ajax(BASE_URL + `/system/member/listByIdCard?idCard=${idCard}` , 'GET');
//图谱
export const getFamilyTreeByIdCard = (idCard) => ajax(BASE_URL + `/system/member/getFamilyTreeByIdCard?idCard=${idCard}` , 'GET');
//个人编辑
export const retailUpdate = (params) => ajax(BASE_URL + `/system/retail/update` ,params, 'PUT');

//企业编辑
export const businessUpdate = (params) => ajax(BASE_URL + `/system/business` ,params, 'PUT');
//商户编辑
export const merchantUpdate = (params) => ajax(BASE_URL + `/system/merchant` ,params, 'PUT');

//添加添加成员
export const addRelatePerson = (params) => ajax(BASE_URL + `/system/member/addRelatePerson` ,params, 'POST');

//删除成员
export const removePerson = (idCard) => ajax(BASE_URL + `/system/member/removePerson?idCard=${idCard}` , 'GET');

//获取客户信息标签列表
export const getTagList = (custId,custType) => ajax(BASE_URL + `/system/custBaseInfo/tagList?custId=${custId}&custType=${custType}` , 'GET');

//获取客户信息标签列表
export const editCustTag = (params) => ajax(BASE_URL + `/system/custBaseInfo/editCustTag` ,params, 'POST');

//获取自定义客户信息标签列表
export const getTagList1 = (custId,custType) => ajax(BASE_URL + `/system/custBaseInfo/manualTagList?custId=${custId}&custType=${custType}` , 'GET');

//获取客户信息标签列表
export const editCustTag1 = (params) => ajax(BASE_URL + `/system/custBaseInfo/editManualTag` ,params, 'POST');

//获取商户云相关信息
export const getMerchantMessage = (custId) => ajax(BASE_URL + `/system/custBaseInfo/merchantMessage?custId=${custId}` , 'GET');

//保存备注
export const systemRecordEditLable = (params) => ajax(BASE_URL + `/system/record/editLable` ,params, 'POST');

//获取特色商户标签
export const systemCustBaseInfoSpecialTagList = (socialCreditCode) => ajax(BASE_URL + `/system/custBaseInfo/specialTagList?custId=${socialCreditCode}`, 'GET');

// 我的客户绩效网格查询
export const gridCmpmCustBaseInfoList = (params) => ajax(BASE_URL + 
    `/grid/cmpm/custBaseInfo/list`, params, 'post');

// 查询客户分层等级下拉框
export const gridCmpmCustListTag = (gridType) => ajax(BASE_URL + 
    `/grid/cmpm/cust/list/tag?gridType=${gridType}`, 'get');

// 查询特色客户标签
export const getSepTagInfo = (custIdc) => ajax(BASE_URL + `/csv/tag/search?custIdc=${custIdc}` , 'GET');