import request from '@/utils/request'
import {upcloud_base_wh_inbound,} from "@/config/serviceSettings";

export const api = {
  findAll: upcloud_base_wh_inbound + '/wmsInRqcStRule/findAll',
  addMain: upcloud_base_wh_inbound + '/wmsInRqcSt/add',
  detailAdd: upcloud_base_wh_inbound + '/wmsInRqcStRule/add',
  delMain: upcloud_base_wh_inbound + '/wmsInRqcSt/delIds',
  detailDel: upcloud_base_wh_inbound + '/wmsInRqcStRule/delIds',
  editMain: upcloud_base_wh_inbound + '/wmsInRqcSt/edit',	
  editDetail: upcloud_base_wh_inbound + '/wmsInRqcStRule/edit',
  move: upcloud_base_wh_inbound + '/wmsInRqcStRule/move',
};

export function findAll(parameter) {
  return request({
    method: 'post',
    url: api.findAll,
    data: parameter,
  })
}

export function addMain(parameter) {
  return request({
    method: 'post',
    url: api.addMain,
    data: parameter,
  })
}

export function detailAdd(parameter) {
  return request({
    method: 'post',
    url: api.detailAdd,
    data: parameter,
  })
}

// 主表删除
export function delMain(parameter) {
  return request({
    method: 'post',
    url: api.delMain,
    data: parameter,
  })
}

// 明细删除
export function detailDel(parameter) {
  return request({
    method: 'post',
    url: api.detailDel,
    data: parameter,
  })
}



// 编辑主表
export function editMain(parameter) {
  return request({
    method: 'post',
    url: api.editMain,
    data: parameter,
  })
}

// 编辑明细
export function editDetail(parameter) {
  return request({
    method: 'post',
    url: api.editDetail,
    data: parameter,
  })
}

// 上下移
export function move(parameter) {
  return request({
    method: 'get',
    url: api.move,
    params: parameter,
  })
}