import request from '@/utils/request'

export function createStockAutomaticReduceConfig(params) {
  return request({
    url: '/api/stock/automaticreduce/isopen?is_open=' + params,
    method: 'post'
  })
}

export function getAutomaticReduceConfig() {
  return request({
    url: '/api/automaticreduce/get',
    method: 'get'
  })
}

export function postConfig(params) {
  return request({
    url: '/api/dataupload/config/commit',
    method: 'post',
    params: params
  })
}

export function postModifyConfig(params) {
  return request({
    url: '/api/dataupload/config/modify',
    method: 'post',
    params: params

  })
}

export function getConfig(params) {
  return request({
    url: '/api/dataupload/config/get',
    method: 'get',
    params:params
  })
}

export function getIsDocking(params) {
  return request({
    url: '/api/dataupload/is_docking/get',
    method: 'get',
    params:params

  })
}





export function getAllSystemPrescription() {
  return request({
    url: '/api/systemprescription/all',
    method: 'get',
  })
}


export function getSystemPrescription(params) {
  return request({
    url: '/api/systemprescription/get',
    method: 'get',
    params:params

  })
}


export function postSystemPrescription(params) {
  return request({
    url: '/api/systemprescription/commit',
    method: 'post',
    data: params

  })
}


export function updateSystemPrescription(id,params) {
  return request({
    url: '/api/systemprescription/update?id='+id,
    method: 'post',
    data: params

  })
}


export function getOrgs() {
  return request({
    url: '/api/public/orgs',
    method: 'get',
  })
}



export function changeOrg(params) {
  return request({
    url: '/api/org/change',
    method: 'post',
    params:params,
  })
}






