import Request from '@/common/request.js';
let request = new Request().http


export function getMyStoreOrderList(data) {
	return request('/store/app/storeOrder/getMyStoreOrderList', data, 'GET');
}
export function getCompanyStoreOrderList(data) {
	return request('/store/app/storeOrder/getCompanyStoreOrderList', data, 'GET');
}
export function getMyStoreOrderById(data) {
	return request('/store/app/storeOrder/getMyStoreOrderById', data, 'GET');
}


export function getStoreOrderById(data) {
	return request('/store/app/storeOrder/getStoreOrderById', data, 'GET');
}
export function getStoreOrderByCombinationId(data) {
	return request('/store/app/storeOrder/getStoreOrderByCombinationId', data, 'GET');
}
export function otherPaymentByCombinationId(data) {
	return request('/store/app/storeOrder/otherPaymentByCombinationId', data, 'POST', 'application/json;charset=UTF-8');
}
export function confirm(data, type) {
	if (type == 1) {
		return request('/store/app/storeOrder/confirm', data, 'POST', 'application/json;charset=UTF-8');
	} else {
		return request('/store/app/storeOrder/confirmMultiStore', data, 'POST', 'application/json;charset=UTF-8');
	}
}
export function computed(data, type) {
	if (type == 1) {
		return request('/store/app/storeOrder/computed', data, 'POST', 'application/json;charset=UTF-8');
	} else {
		return request('/store/app/storeOrder/computedMultiStore', data, 'POST', 'application/json;charset=UTF-8');
	}
}
export function create(data, type) {
	if (type == 1) {
		return request('/store/app/storeOrder/create', data, 'POST', 'application/json;charset=UTF-8');
	} else {
		return request('/store/app/storeOrder/createMultiStore', data, 'POST', 'application/json;charset=UTF-8');
	}
}
export function pay(data) {
	return request('/store/app/storeOrder/pay', data, 'POST', 'application/json;charset=UTF-8');
}
export function payByCombinationId(data) {
	return request('/store/app/storeOrder/payByCombinationId', data, 'POST', 'application/json;charset=UTF-8');
}
export function editPayType(data) {
	return request('/store/app/storeOrder/editPayType', data, 'POST', 'application/json;charset=UTF-8');
}

export function editPayTypeByCombinationId(data) {
	return request('/store/app/storeOrder/editPayTypeByCombinationId', data, 'POST', 'application/json;charset=UTF-8');
}


export function payRemain(data) {
	return request('/store/app/storeOrder/payRemain', data, 'POST', 'application/json;charset=UTF-8');
}

export function otherPayment(data) {
	return request('/store/app/storeOrder/otherPayment', data, 'POST', 'application/json;charset=UTF-8');
}

export function otherPaymentRemain(data) {
	return request('/store/app/storeOrder/otherPaymentRemain', data, 'POST', 'application/json;charset=UTF-8');
}


export function cancelOrder(data) {
	return request('/store/app/storeOrder/cancelOrder', data, 'POST', 'application/json;charset=UTF-8');
}
export function finishOrder(data) {
	return request('/store/app/storeOrder/finishOrder', data, 'POST', 'application/json;charset=UTF-8');
}
export function getExpress(data) {
	return request('/store/app/storeOrder/getExpress', data, 'POST', 'application/json;charset=UTF-8');
}


export function confirmPackageOrder(data) {
	return request('/store/app/storeOrder/confirmPackageOrder', data, 'POST', 'application/json;charset=UTF-8');
}
export function computedPackageOrder(data) {
	return request('/store/app/storeOrder/computedPackageOrder', data, 'POST', 'application/json;charset=UTF-8');
}

export function createPackageOrder(data) {
	return request('/store/app/storeOrder/createPackageOrder', data, 'POST', 'application/json;charset=UTF-8');
}

export function getOrderCount() {
	return request('/store/app/storeOrder/getOrderCount', null, 'GET');
}

export function addOrderComment(data) {
	return request('/store/app/storeOrder/addOrderComment', data, 'POST', 'application/json;charset=UTF-8');
}

export function selectCommentByUser(data) {
	return request('/store/app/storeOrder/selectFsStoreOrderScrmCommentByUser', data, 'POST',
		'application/json;charset=UTF-8');
}
export function orderPrescription(id) {
	return request('/store/app/storeOrder/orderPrescription/' + id, null, 'GET');
}