import request from '@/utils/request'
import qs from 'qs'
import {upcloud_base_inventory, upcloud_base_strategy, upcloud_base_common} from "@/config/serviceSettings";


export function getOptions(params) {
  // 库存状态查询
  return request({
    url: upcloud_base_inventory + '/stock/v1/status',
    method: 'get',
    params: params
  })
}
export function getCodes(params) { 
  // 字典查询
  return request({
    url: upcloud_base_common + '/dict/listbytype/?dicttypeCodes='+params.type,
    method: 'post',
    // params: params
  })
}

export function ruleMoveAdd(params) {
  // 添加规则
  return request({
    url: upcloud_base_strategy + '/rule/move/v1/add',
    method: 'post',
    data: params,
  })
}
export function ruleMoveDel(params) {
  // 删除规则
  return request({
    url: upcloud_base_strategy + '/rule/move/v1/del',
    method: 'post',
    data: params,
  })
}
export function ruleMoveEedit(params) {
  // 修改规则
  return request({
    url: upcloud_base_strategy + '/rule/move/v1/edit',
    method: 'post',
    data: params,
  })
}
export function ruleMoveList(params) {
  // debugger
  // 查询规则
  return request({
    url: upcloud_base_strategy + '/rule/move/v1/list',
    method: 'get',
    params: params,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}




