import request from "@/utils/request";

//获取客户单位用户人员信息
export function crmCustomerUser(data) {
  return request.get({
    url: "/crm/app/appCrmCusUserNewController/crmCustomerUser",
    data,
  },{
    isTransformResponse:false
  });
}

//获取我公司人员信息
export function myUserNameList(data) {
  return request.get({
    url: "/crm/app/appVisistDetail/getCompanyPersonnerlName",
    data,
  },{
    isTransformResponse:false
  });
}

//保存走访报告明细
export function addVisistDetail(data) {
  return request.post({
    url: "/crm/app/appVisistDetail/addVisistDetail",
    data,
  },{
    isTransformResponse:false
  });
}

//删除走访报告中的某一项（日常走访，业务招待）
export function deleVisistDetailItem(data) {
  return request.get({
    url: "/crm/app/appVisistDetail/deleVisistDetailItem",
    data,
  },{
    isTransformResponse:false
  });
}

//走访明细查询
export function getVisistDetailItem(data) {
  return request.get({
    url: "/crm/app/appVisistDetail/queryList",
    data,
  },{
    isTransformResponse:false
  });
}

//删除整体的报告
export function removeVisist(data) {
  return request.get({
    url: "/crm/app/appVisistReport/remove",
    data,
  },{
    isTransformResponse:false
  });
}

//走访报告列表查询
export function getYsVisistList(data) {
  return request.get({
    url: "/crm/app/appVisistReport/list",
    data
  },{
    isTransformResponse:false
  });
}

//更新一个报告的状态
export function updateStatus(data) {
  return request.post({
    url: "/crm/app/appVisistReport/updateStatus",
    data,
  },{
    isTransformResponse:false
  });
}

//获取客户信息列表
export function getYsCustomerList(data) {
  return request.get({
    url: "/crm/app/appCustomerIfno/pageList",
    data,
  },{
    isTransformResponse:false
  });
}

//新增走访报告
export function addVisist(data) {
  return request.post({
    url: "/crm/app/appVisistReport/add",
    data,
  },{
    isTransformResponse:false
  });
}

//走访报告查询
export function getQueryVisistList(data) {
  return request.get({
    url: "/crm/app/appVisistReport/queryList",
    data,
  },{
    isTransformResponse:false
  });
}

//走访报告详细信息
export function getYsVisistInfo(data) {
  return request.get({
    url: "/crm/app/appVisistReport/getDetail",
    data,
  },{
    isTransformResponse:false
  });
}

//一个走访报告下面关联的日常走访，业务招待等具体信息
export function getVisistDetailList(data) {
  return request.get({
    url: "/crm/app/appVisistDetail/list",
    data,
  },{
    isTransformResponse:false
  });
}

//新增点赞
export function insertUserLike(data) {
  return request.post({
    url: "/crm/app/appUserLike/addVisistDetail",
    data,
  },{
    isTransformResponse:false
  });
}

//查询是否已经点过赞
export function getUserLike(data) {
  return request.get({
    url: "/crm/app/appUserLike/queryUserLikeStatus/" + data,
  },{
    isTransformResponse:false
  });
}

//获取当前人的信息
export function getUserInfo(data) {
  return request.get({
    url: "/crm/app/user/getUserInfo",
    data,
  },{
    isTransformResponse:false
  });
}

//查询没有经过信息管理员审批的单子
export function getApprovalList(data) {
  return request.get({
    url: "/crm/app/appVisistReport/approvalList",
    data,
  },{
    isTransformResponse:false
  });
}

//打开详情页设置成为已读
export function getUpdateApprovalForRead(data) {
  return request.post({
    url: "/crm/app/appVisistReport/updateApprovalForRead",
    data,
  },{
    isTransformResponse:false
  });
}

//提交通过活动报告
export function auditActivityReport(data) {
  return request.post({
    url: "/crm/app/activity/auditActivityReport",
    data,
    header: {
    'Content-Type': 'application/x-www-form-urlencoded' // 设置请求头，确保服务器正确解析 FormData
    }
  },{
    isTransformResponse:false
  });
}

//更新驳回原因
export function getRejectReason(data) {
  return request.post({
    url: "/crm/app/appVisistReport/updaterejectReason",
    data,
  },{
    isTransformResponse:false
  });
}

//查询签到打卡信息集合为了报告
export function addMapForReport(data) {
  return request.get({
    url: "/crm/app/appVisistReport/addMapList",
    data,
  },{
    isTransformResponse:false
  });
}


//新增请假申请
export function addLeaveApply(data) {
  return request.post({
    url: "/crm/app/appLeaveApply/add",
    data,
  },{
    isTransformResponse:false
  });
}

//我的表单
export function getLeaveApplyList(data) {
  return request.get({
    url: "/crm/app/appLeaveApply/list",
    data
  },{
    isTransformResponse:false
  });
}

//可销假表单
export function getBackList(data) {
  return request.get({
    url: "/crm/app/appLeaveApply/getBackList",
    data
  },{
    isTransformResponse:false
  });
}

//我的审批
export function getMyReviewList(data) {
  return request.get({
    url: "/crm/app/appLeaveApply/myReview",
    data
  },{
    isTransformResponse:false
  });
}

//可销假表单
export function getBackLeaveList(data) {
  return request.get({
    url: "/crm/app/appLeaveApply/myBackLeave",
    data
  },{
    isTransformResponse:false
  });
}

//提交审批
export function addReviewLeave(data) {
  return request.post({
    url: "/crm/app/appLeaveApply/addReview",
    data,
  },{
    isTransformResponse:false
  });
}

//新增销假申请
export function addBackApply(data) {
  return request.post({
    url: "/crm/app/appLeaveApply/addBackApply",
    data,
  },{
    isTransformResponse:false
  });
}

//可销假表单
export function getDelLeaveApply(data) {
  return request.get({
    url: "/crm/app/appLeaveApply/delLeaveApply",
    data
  },{
    isTransformResponse:false
  });
}
