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

const serverName = upcloud_base_wh_inbound

export const masterRemoteUrl = {
  url: serverName + '/asn/v1.0/getAsnList',
  method: 'get',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
}
export const detailsRemoteUrl = {
  url: serverName + '/asn/v1.0/getAsnDetailsList',
  method: 'get',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
}


//分页依据主单BillId查询ASN明细数据 
export function queryOmsPoBillDNo(parameter) {
  return axios({
    method: 'get',
    url: serverName + '/asn/v1.0/getAsnDetailsList',
    params: parameter,
  })
}

// 新增保存
export const save = data => {
  return axios.post(serverName + '/asn/v1.0/saveAsnBill', data)
}

// 修改
export const update = data => {
  return axios.post(serverName + '/omsPoBill/updateOmsPoBill/v1.0', data)
}

// 作废订单
export const deleteOmsPoBillH = data => {
  return axios.post(serverName + '/omsPoBill/deleteOmsPoBillH/v1.0', data)
}