import http from '../util/http'

/**
 * 集运待签收列表
 */
export const consPage = (params) => {
    return http(`/ecw/cons/page`, params, {
        method: 'GET',
    })
}

/**
 * 获取集运始发仓
 */
export const getConsWarehouseApp = () => {
    return http(`/ecw/warehouse/getConsWarehouseApp`, {
        method: 'GET',
    })
}

/**
 * 获得配送管理分页
 */
export function getExpressApp() {
    return http(`/ecw/express/getExpressApp`, {
        method: 'GET',
    })
}

/**
 * 新增包裹
 */
export const createCons = (params) => {
    return http('/ecw/cons/createPad', params, {
        method: 'post',
    })
}

/**
 * 新增包裹
 */
export const getConsById = (params) => {
    return http('/ecw/cons/getPad', params, {
        method: 'get',
    })
}

/**
 * 签收包裹
 */
export const signedPda = (params) => {
    return http('/ecw/cons/signedPda', params, {
        method: 'put',
    })
}
/**
 * 获得客户联系人下拉框列表
 */
export const selectPda = (params) => {
    return http('/ecw/customer-contacts/selectPda', params, {
        method: 'get',
    })
}

/**
 * 生成快递单号
 */
export function getCourierNumber() {
    return http(`/ecw/cons/courier/number`, {
        method: 'GET',
    })
}

// 订单详情
export const getByWarehouseId = (params) => {
    return http('/ecw/warehouse-area/getByWarehouseId', params, {
        method: 'GET',
    })
}
