import request from '@/utils/request'
import Qs from 'qs'

export function customerOrderlist(query) {
  return request({
    url: '/customerOrder/list',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

export function customerOrderdetail(query) {
  return request({
    url: '/customerOrder/detail',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

/**服务信息编辑 */
export function editServiceInfo(query) {
  return request({
    url: '/customerOrder/editServiceInfo',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

/**编辑休息日 */
export function editServantRestDay(query) {
  return request({
    url: '/customerOrder/editServantRestDay',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

/**订单中心-编辑任务展示 */
export function taskItemList(query) {
  return request({
    url: '/customerOrder/taskItemList',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}
/**订单中心-设置保姆任务 */
export function setTask(data) {
  return request({
    url: '/customerOrder/setTask',
    method: 'post',
    data
  })
}

/**订单中心-保姆服务记录查询列表 */
export function taskClockList(query) {
  return request({
    url: '/customerOrder/taskClockList',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

/**订单中心-保姆服务记录-详情 */
export function taskClockDetail(query) {
  return request({
    url: '/customerOrder/taskClockDetail',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

/**订单中心-管家-修改保姆打卡-查看每日打卡任务详情 */
export function getServantClockInfo(query) {
  return request({
    url: '/customerOrder/getServantClockInfo',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}
 
/**订单中心-管家-修改保姆打卡*/
export function updateServantClockInfo(data) {
  return request({
    url: '/customerOrder/updateServantClockInfo',
    method: 'post',
    data
  })
}
 
/**订单中心-查看历史薪资*/
export function getHistoryIncome(query) {
  return request({
    url: '/customerOrder/getHistoryIncome',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
    }
  })
}

