import { BaseService, Service } from '@/cool';

@Service('order')
export class OrderService extends BaseService {
	/**
	 * 发快递配送费计算  姜枫2021.04.19
	 */
	freight(data) {
		return this.request({
			url: '/freight',
			method: 'POST',
			data: data
		});
	}
	/**
	 * 开单生成订单  姜枫2021.04.19
	 */
	orderCreate(data) {
		return this.request({
			url: '/create-order',
			method: 'POST',
			data: data
		});
	}
	/**
	 * 发快递  姜枫2021.05.05
	 */
	sendExpressage(data) {
		return this.request({
			url: '/third-send',
			params: data
		});
	}
	/**
	 * 本店送  姜枫2021.05.05
	 */
	orderDeliver(data) {
		return this.request({
			url: '/self-send',
			params: data
		});
	}
	/**
	 * 确认送达  姜枫2021.05.06
	 */
	orderAffirmDeliver(data) {
		return this.request({
			url: '/reach',
			params: data
		});
	}
	/**
	 * 给客户充值 b
	 */
	orderRelate(data) {
		return this.request({
			url: '/order-relate',
			method: 'POST',
			data: data
		});
	}

	/** *
	 * 发货-填写收花人 b
	 */
	orderSheet(data) {
		return this.request({
			url: '/update-sheet',
			method: 'POST',
			data: data
		});
	}

	/** *
	 * 发货-填写收花人 b
	 */
	freeShipping(data) {
		return this.request({
			url: '/without-send',
			params: data
		});
	}

	//获取配送单详情
	getDeliverDetail(params) {
		return this.request({
			url: '/get-deliver-detail',
			params
		});
	}
}

export default new OrderService();
