
import http from '../../util/http'

// 列表
export const getExitPage = (params) => {
	return http('/my/shipment/exitPage', params, {
		method: 'POST',
	})
}

// 获得装柜详情
export const getCabinetDetail = (params) => {
	return http('/my/shipment/cabinetDetail', params, {
		method: 'GET',
	})
}

// 获得退场详情
export const getCabinetExitDetail = (params) => {
	return http('/my/shipment/cabinetExitDetail', params, {
		method: 'GET',
	})
}

// 获得退场订单列表
export const getCabinetExitList = (params) => {
	return http('/my/shipment/cabinetExitList', params, {
		method: 'GET',
	})
}

// 订单号检索功能
export const orderNoSearch = (params) => {
	return http('/ecw/order/orderNoSearch', params, {
		method: 'GET',
	})
}

// 订单列表
export const getOrderPage = (params) => {
	return http('/ecw/order/page', params, {
		method: 'GET',
	})
}

// 更换货柜号重发
export const changeContainer = (params) => {
	return http('/my/shipment/changeContainer', params, {
		method: 'POST',
	})
}

// 退场订单
export const exitOrder = (params) => {
	return http('/my/shipment/exitOrder', params, {
		method: 'POST',
	})
}

// 确认到仓
export const confirmArrival = (params) => {
	return http('/my/shipment/confirmArrival', params, {
		method: 'POST',
	})
}

// 根据箱号查找订单号码，退场和卸柜使用
export const searchOrderByBoxNo = (params) => {
	return http('/my/shipment/searchOrderByBoxNo', params, {
		method: 'POST',
	})
}

// 获得部分退场拆单列表
export const partRefundSplitList = (data) => {
	return http(`/shipment/box/part-refund/splitList?orderId=${data.orderId}&shipmentId=${data.shipmentId}`, {}, {
		method: 'POST',
	})
}

// 修改退场订单的退场箱数
export function updateExitBoxNum(data) {
	return http('/my/shipment/update/exitOrder/RefundNum', data, {
		method: 'POST',
	})
}

// 获得库区库域列表
export function getWarehouseAreaList(params) {
	return http('/ecw/warehouse-area/list', params, {
		method: 'GET',
	})
}