import request from '@/axios';

export const getList = (page, params) => {
  return request({
    url: '/sf/operationOrder/page',
    method: 'get',
    params: {
      ...params,
      current:page.currentPage,
      size:page.pageSize,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/sf/operationOrder/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const add = (row) => {
  return request({
    url: '/sf/operationOrder/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/sf/operationOrder/update',
    method: 'post',
    data: row
  })
}

export const remove = (params) => {
  return request({
    url: '/sf/operationOrder/remove',
    method: 'post',
    params:params
  })
}

export const dispatch = (params) => {
  return request({
    url: '/sf/operationOrderDispatch/dispatchOrderSite',
    method: 'post',
    params:params
  })
}

//服务商端********************************************************
export const siteDispatch = (params) => {
  return request({
    url: '/sf/operationOrderSiteDispatch/siteDispatchOrder',
    method: 'post',
    params:params
  })
}

export const receiveOrder = (params) => {
  return request({
    url: '/sf/operationOrderDispatch/receiveOrder',
    method: 'post',
    params:params
  })
}

/** 过程反馈 **/
export const listFeedback = (params) => {
  return request({
    url: '/sf/operationOrderFeedback/listFeedback',
    method: 'get',
		params:params
  })
}

/** 回访 **/
export const addOrderCllBack = (params) => {
  return request({
    url: '/sf/operationOrderCallback/addOrderCllBack',
    method: 'post',
    data:params
  })
}

/** 结算 **/
export const settlement = (params) => {
  return request({
    url: '/sf/operationOrderSettle/save',
    method: 'post',
    data:params
  })
}
