import request from '@/utils/request'

export function getSplitRuleList(params) {
  return request({
    url: '/tataOrderSplitRule/list',
    method: 'get',
    params
  })
}

export function addSplitRule(data) {
  return request({
    url: '/tataOrderSplitRule/add',
    method: 'put',
    data
  })
}
export function getSplitRule(params) {
  return request({
    url: '/tataOrderSplitRule/detail',
    method: 'get',
    params
  })
}
export function editSplitRule(data) {
  return request({
    url: '/tataOrderSplitRule/edit',
    method: 'post',
    data
  })
}
export function changeStatus(data) {
  return request({
    url: '/tataOrderSplitRule/changeStatus',
    method: 'post',
    data
  })
}
export function deleteRules(data) {
  return request({
    url: '/tataOrderSplitRule/delete',
    method: 'delete',
    data
  })
}
export function getProductList(params) {
  return request({
    url: '/tataOrderProduct/list',
    method: 'get',
    params
  })
}

export function getBatchNo() {
  return request({
    url: '/tataOrderProduct/getBatchNo',
    method: 'get'
  })
}

export function dispatch(data) {
  return request({
    url: '/tataOrderProduct/dispatch',
    method: 'post',
    data
  })
}
export function copy(params) {
  return request({
    url: '/tataOrderSplitRule/copy',
    method: 'post',
    params
  })
}
// export function integration() {
//   return request({
//     url: '/tataOrderProduct/integration',
//     method: 'post'
//   })
// }
export function orderProductDetail(params) {
  return request({
    url: '/ordPartOrder/orderProductDetail',
    method: 'get',
    params
  })
}
export function getCount() {
  return request({
    url: '/tataOrderProduct/getCount',
    method: 'get'
  })
}
