import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/submit',
    method: 'post',
    data: row
  })
}


export const getByAgenterAndTime = (row) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/getByAgenterAndTime',
    method: 'post',
 data: row
  })
}


export const getListDetailByAgenterAndTime = (row) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/getListDetailByAgenterAndTime',
    method: 'post',
 data: row
  })
}

export const ordercommissionFinish = (row) => {
  return request({
    url: '/api/cyzh-guosen/ordercommission/ordercommissionFinish',
    method: 'post',
 data: row
  })
}
