import axios from "@/utils/request";

export function getDeviceReceiveOrderList(params) {
    return axios({
        url: "/device/receive/order/filterList",
        method: "get",
        params: params
    });
}

export function addDeviceReceiveOrder(data) {
    return axios({
        url: "/device/receive/order/addOrder",
        method: "post",
        data: data
    });
}

export function updateDeviceReceiveOrder(data) {
    return axios({
        url: "/device/receive/order/update",
        method: "post",
        data: data
    });
}

export function submitAudit(data) {
    return axios({
        url: "/device/receive/order/submitAudit",
        method: "post",
        data: data
    });
}

export function updateDeviceReceiveOrderStatus(data) {
    return axios({
        url: "/device/receive/order/updateStatus",
        method: "post",
        data: data
    });
}

export function deleteDeviceReceiveOrder(data) {
    return axios({
        url: "/device/receive/order/delete",
        method: "post",
        data: data
    });
}

export function getDeviceReceiveOrderDetailList(params) {
    return axios({
        url: "/device/receive/order/detail/filterList",
        method: "get",
        params: params
    });
}

export function checkCode(params) {
    return axios({
        url: "/device/receive/order/detail/checkCode",
        method: "get",
        params: params
    });
}

export function addDeviceReceiveOrderDetail(data) {
    return axios({
        url: "/device/receive/order/detail/addOrderDetail",
        method: "post",
        data: data
    });
}

export function updateDeviceReceiveOrderDetail(data) {
    return axios({
        url: "/device/receive/order/detail/updateOrderDetail",
        method: "post",
        data: data
    })
}

export function deleteDeviceReceiveOrderDetail(data) {
    return axios({
        url: "/device/receive/order/detail/deleteOrderDetail",
        method: "post",
        data: data
    });
}

export function selectByorderIdFk(params) {
  return axios({
    url: "/device/receive/order/detail/selectByorderIdFk",
    method: "get",
    params: params
  });
}

export function getConfig(params) {
    return axios({
        url: "/device/receive/order/getConfig",
        method: "get",
        params: params
    });
}

export function selectProduct(data) {
    return axios({
        url: "/udiwms/udiinfo/selectProduct",
        method: "post",
        data: data
    });
}

export function verifyTemplateFile(data) {
    return axios({
        url: "/device/receive/order/verifyTemplateFile",
        method: "post",
        data: data
    });
}

export function printOrder(data) {
    return axios({
        url: "/device/receive/order/printOrder",
        method: "post",
        data: data,
        headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
        responseType: 'arraybuffer',   //一定要设置响应类型，否则页面会是空白pdf
    });
}



