// 路演管理模块
import http from "@/api/http.js"

const roadshowInterence={
	/**
	 * 路演FICC销售列表
	 */
	getSellerList:params=>{
		return http.get('/custom/seller/roadshow_ficc/list',params)
	},
	/**
	 * 获取路演-研究员列表
	 * @param {*} params 
	 * @returns 
	 */
	getResearcherList:params=>{
		return http.get('/roadshow/researcher/list',params)
	},

	/**
	 * 获取日历列表
	 * @param {PageSize} params 
	 * @param {CurrentIndex} params 
	 * @param {CalendarType} params 1:待处理申请,2:已处理申请,3:内部会议
	 * @returns 
	 */
	getCalendarList:params=>{
		return http.get('/roadshow/calendar/list',params)
	},

	/**
	 * 撤回路演活动
	 * @param {*} params RsCalendarId RsCalendarResearcherId
	 * @returns 
	 */
	revocationRoadshow:params=>{
		return http.post('/roadshow/back',params)
	},

	/**
	 * 接受路演活动
	 * @param {RsCalendarId} params 
	 * @param {RsCalendarResearcherId} params 
	 * @returns 
	 */
	acceptRoadshow:params=>{
		return http.post('/roadshow/accept',params)
	},
	
	/**
	 * 拒绝路演
	 * @param {*} params RsCalendarId RsCalendarResearcherId RefuseReason
	 * @returns 
	 */
	refuseRoadshow:params=>{
		return http.post('/roadshow/refuse',params)
	},

	/**
	 * 删除路演活动
	 * @param {*} params RsCalendarId RsCalendarResearcherId DeleteReason
	 * @returns 
	 */
	deleteRoadshow:params=>{
		return http.post('/roadshow/delete',params)
	},

	/**
	 * 研究员日历
	 * @param {DateType} params 
	 * @param {ResearcherId} params 
	 * @returns 
	 */
	getCalendarDetail:params=>{
		return http.get('/roadshow/researcher/calendar/detail',params)
	},
    /**
	 * 销售员日历
	 * @param {DateType} params 
	 * @param {SellerId} params 
	 * @returns 
	 */
	getSellerCalendarDetail:params=>{
		return http.get('/roadshow/seller/calendar/detail',params)
	},

	/**
	 * 我的日历
	 * @param {DateType} params 
	 * @returns 
	 */
	myCalendarDetail:params=>{
		return http.get('/roadshow/my/calendar/detail',params)
	},



	// 客户搜索 KeyWord
	searchRoadshowCompany:params=>{
		return http.get('/roadshow/company/search',params)
	},

	/**
	 * 客户详情
	 * @param {CompanyId} params 
	 * @returns 
	 */
	componyDetail:params=>{
		return http.get('/roadshow/company/detail',params)
	},

	/**
	 * 新增路演活动
	 * @param {*} params  
	 * "ActivityType": "路演",
			"RoadshowType": "线上",
			"RoadshowPlatform": "腾讯会议",
			"CompanyId": 16,
			"CompanyName": "弘则研究",
			"ResearcherList": [
				{
					"ResearcherId": 4,
					"ResearcherName": "章左昊",
					"StartDate": "2020-01-11",
					"EndDate": "2020-01-11",
					"StartTime": "10:00:00",
					"EndTime": "11:00:00",
					"Week": "周二"
				}
			]
	 * @returns 
	 */
	addRoadshow:params=>{
		return http.post('/roadshow/add',params)
	},

	/**
	 * 活动编辑 
	 * @param {*} params  RsCalendarId RsCalendarResearcherId EditType 1修改 2重提
	 * @returns 
	 */
	editRoadshow: params=>{
		return http.post('/roadshow/edit',params)
	},

	/**
	 * 新增事项
	 * @param {*} params  
	 * "MatterContent": "休假",
		"StartDate": "2020-01-11",
		"EndDate": "2020-01-11",
		"StartTime": "10:00:00",
		"EndTime": "11:00:00",
		"StartWeek": "周二",
		"EndWeek": "周二"
	 * @returns 
	 */
	addRoadshowMatters:params=>{
		return http.post('/roadshow/matters/add',params)
	},

	/**
	 * 修改事项
	 * @param {*} params 
	 * "RsMattersId": 1,
		"MatterContent": "休假了",
		"StartDate": "2020-01-11",
		"EndDate": "2020-01-11",
		"StartTime": "10:00:00",
		"EndTime": "11:00:00",
		"StartWeek": "周二",
		"EndWeek": "周二"
	 * @returns 
	 */
	editMatters:params=>{
		return http.post('/roadshow/matters/update',params)
	},

	/**
	 * 删除事项
	 * @param {RsMattersId} params 
	 * @returns 
	 */
	delMatters:params=>{
		return http.post('/roadshow/matters/delete',params)
	},

	/**
	 * 事项列表
	 * @param {PageSize} params 
	 * @param {CurrentIndex} params 
	 * @returns 
	 */
	mattersList:params=>{
		return http.get('/roadshow/matters/list',params)
	},

	/* ==================  路演统计 ================= */
	/**
	 * 研究员统计
	 * @param {*} params DataType StartDate EndDate
	 * @returns 
	 */
	researcherStatistic: params => {
		return http.get('/roadshow/report/researcher/list',params)
	},

	/**
	 * 销售统计
	 * @param {*} params DataType StartDate EndDate
	 * @returns 
	 */
	sellerStatistic: params => {
		return http.get('/roadshow/report/seller/list',params)
	},

	/**
	 * 统计详情列表
	 * @param {} params DataType StartDate EndDate AdminId AdminType
	 * @returns 
	 */
	statisticDetailList: params => {
		return http.get('/roadshow/report/calendar/list',params)
	},

	/**
	 * 选择的研究员接口
	 * @param {AdminIds} params DataType StartDate EndDate AdminId AdminType
	 * @returns 
	 */
	 roadshowChoiceResearcher: params => {
		return http.post('/roadshow/report/choice/researcher',params)
	},
	
	/**
	 * 公开会议日历详情
	 * @param {} params StartDate EndDate
	 * @returns 
	 */
	meetCalendarDetail: params => {
		return http.get('/roadshow/public_meeting/detail',params)
	},


	/**
	 * 获取选择的研究员列表
	 * @param {} params DataType StartDate EndDate AdminId AdminType
	 * @returns 
	 */
	roadshowAdminList: params => {
		return http.get('/roadshow/report/admin/list',params)
	},

	/**
	 * 专项路演统计接口
	 * @param {} params DataType StartDate EndDate AdminId AdminType
	 * @returns 
	 */
	roadshowSpecialList: params => {
		return http.get('/roadshow/report/special/list',params)
	},

	/**
	 * 路演反馈列表
	 * @param {} params PageSize CurrentIndex FeedbackType 0:不显示(默认),1:显示 ResearcherId 
	 * @returns
	 */
	feedbackList: params => {
		return http.get('/roadshow/feedback/list',params)
	},

	/**
	 * 发送路演反馈
	 * @param {*} params List  [{"RsCalendarResearcherId": 0}
  ]
	 * @returns 
	 */
	sendFeedback: params => {
		return http.post('/roadshow/send/feedback',params)
	},

	/**
	 * 待反馈列表
	 * @param {*} params   [{"RsCalendarResearcherId": 0}
  ]
	 * @returns 
	 */
	toFeedbacklist: params => {
		return http.get('/roadshow/submit/feedback/list',params)
	},

	/**
	 * 填写路演反馈
	 * @param {*} params   RsCalendarResearcherId FeedbackContent
  ]
	 * @returns 
	 */
	writeFeedback: params => {
		return http.post('/roadshow/write/feedback',params)
	},

	/**
	 * 提交反馈
	 * @param {*} params   [{RsCalendarResearcherId}]
  ]
	 * @returns 
	 */
	submitFeedback: params => {
		return http.post('/roadshow/submit/feedback',params)
	},
    /**
     * 报告电话会活动类别
     * @param {*} params 
     */
    getTelList:params=>{
        return http.get('/yb/activity/type/tel_list',params)
    },
	// -------------------------------------出差表模块
	/**
	 * 获取研究员的出差表
	 * @param {*} params.AdminId - 研究员的AdminId
	 * @returns 
	*/
	getResearcherBusinessTrip: params => {
		return http.get('/roadshow/report/researcher/business_trip',params)
	},
}

export {
	roadshowInterence
}