import request from '@/utils/request'

// 预订单表列表
export function apiBeforehandOrderLists(params: any) {
    return request.get({ url: '/beforehand_order/beforehandorder/lists', params })
}
export function apiBeforehandOrderStatisticsCount(params: any) {
    return request.get({ url: '/beforehand_order/beforehandorder/statistics_count', params })
}

// 添加预订单表
export function apiBeforehandOrderAdd(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/add', params })
}

// 编辑预订单表
export function apiBeforehandOrderEdit(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/edit', params })
}
// 一键出库
export function apiBeforehandOrderCreateOutboundOrder(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/createOutboundOrder', params })
}

// 一键复制预订单
export function apiBeforehandOrderCopy(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/copy', params })
}

// 删除预订单表
export function apiBeforehandOrderDelete(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/delete', params })
}

//结算预订单
export function apiBeforehandOrderSettle(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/settle', params })
}

//确认预订单
export function apiBeforehandOrderConfirm(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/confirm', params })
}


// 预订单表详情
export function apiBeforehandOrderDetail(params: any) {
    return request.get({ url: '/beforehand_order/beforehandorder/detail', params })
}

// 入库列表
export function apiBeforehandOrderWarehousingLists(params: any) {
    return request.get({ url: '/beforehand_order/beforehandorder/warehousing_lists', params })
}
// 出库列表
export function apiBeforehandOrderOutboundLists(params: any) {
    return request.get({ url: '/beforehand_order/beforehandorder/outbound_lists', params })
}
// 订单转预订单
export function apiPurchaseOrderTransferAdvanceOrder(params: any) {
    return request.post({
        url: '/beforehand_order/beforehandorder/orderTransferAdvanceOrder',
        params
    })
}

// 打印出库标签
export function apiPurchaseOrderExport(params: any) {
    return request.post({
        url: '/beforehand_order/beforehandorder/export',
        params
    })
}
/**
 * 生成支付订单
 */
export function apiPurchaseOrderGenerateOrder(params: any) {
    return request.post({
        url: '/beforehand_order/beforehandorder/generateOrder',
        params
    })
}

//导出清单
export function apiPurchaseOrderExportOrderList(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/export_order_list', params })
}
//导出分单
export function apiPurchaseOrderOrderAllocation(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/order_allocation', params })
}
//采购信息
export function apiPurchaseOrderOrderInfo(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/order_info', params })
}
//导出出库
export function apiPurchaseOrderOrderOutbound(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/order_outbound', params })
}
//导出出库
export function apiPurchaseOrderOrderOutbound3(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/order_outbound3', params })
}
//导出退库
export function apiPurchaseOrderStockReturn(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/stock_return', params })
}
//导出退供应商
export function apiPurchaseOrderReturnSupplier(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/return_supplier', params })
}

// 预订单日志列表
export function apiBeforehandOrderLogLists(params: any) {
    return request.get({ url: '/beforehand_order/beforehandorder/logList', params })
}

//保存预订单日志
export function apiBeforehandOrderLogSave(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/saveLog', params })
}

//确认预订单日志
export function apiBeforehandOrderLogConfirm(params: any) {
    return request.post({ url: '/beforehand_order/beforehandorder/confirmLog', params })
}
