import Request from '../common/request.js';
let request = new Request().http

export function login(data) {
	return request('/store/app/companyUser/login', data, 'POST', 'application/json;charset=UTF-8');
}

export function getUserInfo(data) {
	return request('/store/app/companyUser/getUserInfo', data, 'GET', 'application/json;charset=UTF-8');
}
export function getQrImg(data) {
	return request('/store/app/companyUser/getQrImg', data, 'GET', 'application/json;charset=UTF-8');
}

export function getCompanyUserCard(data) {
	return request('/store/app/companyUser/getCompanyUserCard', data, 'GET', 'application/json;charset=UTF-8');
}

//获取所有投诉类型
export function getCategory(data) {
	return request('/app/complaint/category', data, 'GET', 'application/json;charset=UTF-8');
}
//提交投诉
export function submitComplaint(data) {
	return request('/app/complaint/submitComplaint', data, 'POST', 'application/json;charset=UTF-8');
}
//获取投诉列表
export function getComplaintList(data) {
	return request('/app/complaint/list', data, 'POST', 'application/json;charset=UTF-8');
}
//修改i投诉
export function updateComplaint(id, data) {
	return request('/app/complaint/' + id, data, 'PUT', 'application/json;charset=UTF-8');
}
//投诉详情
export function getComplaintById(data) {
	return request('/app/complaint/' + data, data, 'GET', 'application/json;charset=UTF-8');
}

//管理
export function getAdmin(data) {
	return request('/app/food-record/admin/list', data, 'GET', 'application/json;charset=UTF-8');
}
//某日饮食列表
export function getDayRecords(data) {
	return request('/app/food-record/getDayRecords', data, 'GET', 'application/json;charset=UTF-8');
}
//饮食列表
export function getMyRecordList(data) {
	return request('/app/food-record/getMyRecordList', data, 'POST', 'application/json;charset=UTF-8');
}
//新增饮食
export function addRecord(data) {
	return request('/app/food-record/addRecord', data, 'POST', 'application/json;charset=UTF-8');
}
//修改饮食
export function editRecord(data) {
	return request('/app/food-record/editRecord', data, 'POST', 'application/json;charset=UTF-8');
}
//删除饮食
export function deleteRecord(data) {
	return request('/app/food-record/deleteRecord/' + data, data, 'POST', 'application/json;charset=UTF-8');
}
//饮食详情
export function getRecordInfo(data) {
	return request('/app/food-record/getRecordInfo/' + data, data, 'GET');
}
//待办列表
export function getToDoList(data) {
	return request('/app/todoItems/listPage', data, 'POST', 'application/json;charset=UTF-8');
}
//待办事项详情
export function getFindById(data) {
	return request('/app/todoItems/findById', data, 'POST', 'application/json;charset=UTF-8');
}
//更新详情
export function updateById(data) {
	return request('/app/todoItems/updateById', data, 'POST', 'application/json;charset=UTF-8');
}
//商品列表
export function getServiceList(data) {
	return request('/app/serviceGoods/listPage', data, 'POST', 'application/json;charset=UTF-8');
}
//商品详情
export function getServiceById(data) {
	return request('/app/serviceGoods/findById', data, 'POST', 'application/json;charset=UTF-8');
}
//新增商品
export function saveService(data) {
	return request('/app/serviceGoods/save', data, 'POST', 'application/json;charset=UTF-8');
}
//更新商品信息
export function updateService(data) {
	return request('/app/serviceGoods/updateById', data, 'POST', 'application/json;charset=UTF-8');
}
//删除商品
export function deleteService(data) {
	return request('/app/serviceGoods/deleteById', data, 'POST', 'application/json;charset=UTF-8');
}
//竞品列表
export function getCompetitorList(data) {
	return request('/app/competitorInfo/listPage', data, 'POST', 'application/json;charset=UTF-8');
}
//竞品详情
export function getCompetitorById(data) {
	return request('/app/competitorInfo/findById', data, 'POST', 'application/json;charset=UTF-8');
}
//竞品商品
export function saveCompetitor(data) {
	return request('/app/competitorInfo/save', data, 'POST', 'application/json;charset=UTF-8');
}
//更新竞品信息
export function updateCompetitor(data) {
	return request('/app/competitorInfo/updateById', data, 'POST', 'application/json;charset=UTF-8');
}
//删除竞品
export function deleteCompetitor(data) {
	return request('/app/competitorInfo/deleteById', data, 'POST', 'application/json;charset=UTF-8');
}
//新增体检报告
export function addReport(data) {
	return request('/app/medical/report/add', data, 'POST', 'application/json;charset=UTF-8');
}
//用户ID查询体检报告信息
export function getByUserAndDate(data) {
	return request('/app/medical/report/getByUserAndDate', data, 'GET', 'application/json;charset=UTF-8');
}
//用户查询体检报告列表
export function getUserReportList(data) {
	return request('/app/medical/report/listByUser/' + data, data, 'GET', 'application/json;charset=UTF-8');
}
//查询体检报告列表
export function getReportList(data) {
	return request('/app/medical/report/page', data, 'GET', 'application/json;charset=UTF-8');
}
//查询体检报告详情
export function getReportById(data) {
	return request('/app/medical/report/' + data, data, 'GET', 'application/json;charset=UTF-8');
}
//删除体检报告
export function deleteReport(data) {
	return request('/app/medical/report/' + data, data, 'DELETE', 'application/json;charset=UTF-8');
}
//更新体检报告
export function updateReport(data) {
	return request('/app/medical/report/update', data, 'PUT', 'application/json;charset=UTF-8');
}
//对比报告
export function compareReport(data) {
	return request('/app/medical/report/compareReport', data, 'POST', 'application/json;charset=UTF-8');
}
//获取指定报告的指标分类
export function getAllCateByReportId(data) {
	return request('/app/medical/result/getAllCateByReportId', data, 'GET', 'application/json;charset=UTF-8');
}
//新增指标
export function addIndicator(data) {
	return request('/app/medical/indicator/add', data, 'POST', 'application/json;charset=UTF-8');
}
//根据分类查询指标
export function listByCategory(data) {
	return request('/app/medical/indicator/listByCategory', data, 'GET', 'application/json;charset=UTF-8');
}
//查询所有启用的指标
export function listEnabled(data) {
	return request('/app/medical/indicator/listEnabled', data, 'GET', 'application/json;charset=UTF-8');
}
//过滤所有启用的指标
export function listAllEnabledByReportId(data) {
	return request('/app/medical/indicator/listAllEnabledByReportId', data, 'GET', 'application/json;charset=UTF-8');
}
//分页查询医疗指标列表
export function getPage(data) {
	return request('/app/medical/indicator/page', data, 'GET', 'application/json;charset=UTF-8');
}
//更新指标
export function updateIndicator(data) {
	return request('/app/medical/indicator/update', data, 'PUT', 'application/json;charset=UTF-8');
}
//根据ID查询指标详情
export function getIndicatorById(data) {
	return request('/app/medical/indicator/'+ data, data, 'GET', 'application/json;charset=UTF-8');
}
//删除指标
export function deleteIndicator(data) {
	return request('/app/medical/indicator/' + data, data, 'DELETE', 'application/json;charset=UTF-8');
}

//新增检查结果
export function addResult(data) {
	return request('/app/medical/result/add', data, 'POST', 'application/json;charset=UTF-8');
}
//批量新增检查结果
export function addBatchAdd(data) {
	return request('/app/medical/result/batchAdd', data, 'POST', 'application/json;charset=UTF-8');
}
//批量更新检查结果
export function updateBatch(data) {
	return request('/app/medical/result/updateBatch', data, 'POST', 'application/json;charset=UTF-8');
}
//根据指标ID查询所有结果
export function listByIndicator(data) {
	return request('/app/medical/result/listByIndicator/'+ data, data, 'GET');
}
//根据ID查询所有结果
export function listByReport(data) {
	return request('/app/medical/result/listByReport/'+ data, data, 'GET');
}
//分页查询报告指标检查结果列表
export function getResult(data) {
	return request('/app/medical/result/page', data, 'GET');
}
//更新检查结果
export function updateResult(data) {
	return request('/app/medical/result/update', data, 'PUT', 'application/json;charset=UTF-8');
}
//查询检查结果详情
export function getResultById(data) {
	return request('/app/medical/result/'+ data, data, 'GET');
}
//删除检查结果
export function deleteResult(data) {
	return request('/app/medical/result/'+ data, data, 'DELETE');
}

//查询所有单位
export function getListAll(data) {
	return request('/app/medical/unit/listAll', data, 'GET');
}
//新建附件
export function addAttachment(data) {
	return request('/app/attachment', data, 'POST', 'application/json;charset=UTF-8');
}
//查询附件
export function getAttachment(data) {
	return request('/app/attachment/list', data, 'GET', 'application/json;charset=UTF-8');
}
//新建体检报告
export function addUrl(data) {
	return request('/app/attachment/addList', data, 'POST', 'application/json;charset=UTF-8');
}
//删除附件
export function deleteAttachment(data) {
	return request('/app/attachment/'+data, data, 'DELETE');
}

//工作完成百分比
export function queryCateStatis(data) {
	return request('/app/todoItems/queryCateStatis', data, 'GET');
}
//扫码
export function bindPromoter(data) {
 	 return request('/store/app/bindPromoter',data,'POST','application/json;charset=UTF-8');
 }
 //日程查询
 export function getItinerary(data) {
 	return request('/app/fs/itinerary/list', data, 'GET');
 }
 //日程新增
 export function addItinerary(data) {
 	return request('/app/fs/itinerary/add', data, 'POST','application/json;charset=UTF-8');
 }
 //日程查询详情
 export function getItineraryInfo(data) {
 	return request('/app/fs/itinerary/info', data, 'GET');
 }
 //更新日程
 export function updateItinerary(data) {
 	return request('/app/fs/itinerary/update', data,'POST','application/json;charset=UTF-8');
 }
 //删除日程
 export function deleteItinerary(data) {
 	return request('/app/fs/itinerary/delete', data, 'GET');
 }