import request from '@/sheep/request';

const DeliveryOrderApi = {
  // 分页获取当前配送员负责的配送单
  getPageByDeliveryManId: (data) => {
    return request({
      url: '/deliveryOrder/getPageByDeliveryManId',
      method: 'POST',
			data
    });
  },
	
	// 获取配送单详情信息
	getDetail: (id) => {
	  return request({
	    url: `/deliveryOrder/getDetail/${id}`,
	    method: 'POST',
	  });
	},
	
	// 当前配送员确认到店
	riderConfirmArrival: (id) => {
	  return request({
	    url: `/deliveryOrder/riderConfirmArrival/${id}`,
	    method: 'POST',
	  });
	},
	
	// 当前配送员确认取餐
	riderConfirmPickup: (id) => {
	  return request({
	    url: `/deliveryOrder/riderConfirmPickup/${id}`,
	    method: 'POST',
	  });
	},
	
	// 当前配送员送达交接点
	riderDeliveryHandover: (id) => {
	  return request({
	    url: `/deliveryOrder/riderDeliveryHandover/${id}`,
	    method: 'POST',
	  });
	},
	
	// 批量送达交接点
	riderDeliveryHandoverBatch: (ids) => {
	  return request({
	    url: `/deliveryOrder/riderDeliveryHandoverBatch?ids=${ids}`,
	    method: 'POST',
	  });
	},
	
	// 当前配送员确认交接
	riderConfirmHandover: (data) => {
	  return request({
	    url: `/deliveryOrder/riderConfirmHandover`,
	    method: 'POST',
			data
	  });
	},

	// 当前配送员确认送达顾客
	riderConfirmDelivery: (data) => {
	  return request({
	    url: `/deliveryOrder/riderConfirmDelivery/${data.deliveryOrderId}`,
	    method: 'POST',
			data
	  });
	},
	
	// 获取配送单交接记录
	getHandoverRecord: (id) => {
	  return request({
	    url: `/deliveryOrder/getHandoverRecord/${id}`,
	    method: 'POST',
	  });
	},
	
	
};

export default DeliveryOrderApi;
