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


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/invAdjust/v1/add',
    method: 'post',
    data: params,
  })
}
export function ruleMoveDel(params) {
  // 删除规则
  return request({
    url: upcloud_base_strategy + '/rule/invAdjust/v1/del',
    method: 'post',
    data: params,
  })
}
export function ruleMoveEedit(params) {
  // 修改规则
  return request({
    url: upcloud_base_strategy + '/rule/invAdjust/v1/edit',
    method: 'post',
    data: params,
  })
}
export function ruleMoveList(params) {
  // debugger
  // 查询规则
  return request({
    url: upcloud_base_strategy + '/rule/invAdjust/v1/list',
    method: 'get',
    params: params,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function ruleQuery(params) {
  // 修改规则
  return request({
    url: SERVICE_DATA_API_BASE + '/search/page',
    method: 'post',
    data: params,
  })
}




