
/**
 * Web唐明明
 * 匆匆数载恍如梦，岁月迢迢华发增。
 * 碌碌无为枉半生，一朝惊醒万事空。
 * moduleName: 综法订单
 */

import { request } from '../index'

// 年费订单
const servicesOrder = (data) =>{
	return request({
		url		: "app/synthesis/services/orders",
		data
	})
}

// 咨询订单
const synthesisOrder = (data) =>{
	return request({
		url		: "app/synthesis/orders",
		data
	})
}

// 委托订单
const entrustOrder = (data) =>{
	return request({
		url		: "app/synthesis/entrusts/orders",
		data
	})
}

// 拓展订单
const expandOrder = (data) =>{
	return request({
		url		: "app/synthesis/expands/orders",
		data
	})
}

// 年费订单 - 详情
const servicesInfo = service_id => {
	return request({
		url		: 'app/synthesis/service/order/' + service_id
	})
}

// 咨询订单 - 详情
const synthesisInfo = service_id => {
	return request({
		url		: 'app/synthesis/order/' + service_id
	})
}

// 委托订单 - 详情
const entrustInfo = service_id => {
	return request({
		url		: 'app/synthesis/entrust/order/' + service_id
	})
}

// 拓展订单 - 详情
const expandInfo = service_id => {
	return request({
		url		: 'app/synthesis/expand/order/' + service_id
	})
}

// 订单详情
const oderinfo = (order_id, order_type) => {
	return request({
		url		: 'pay/cashier_desk/info',
		data	: {
			order_id,
			order_type
		},
		method	: 'POST'
	})
}

// 创建补差价订单
const orderDiff = (order_type, order_id, price) => {
	return request({
		url		: 'synthesis/diff_prices/create',
		data	: {
			order_type,
			order_id,
			price
		},
		method	: 'POST'
	})
}

// 补差价列表
const orderDiffList = (order_id, order_type) => {
	return request({
		url		: 'synthesis/diff_prices',
		data	: {
			order_type,
			order_id,
		}
	})
}

// 取消补差价
const orderDiffCancel = (diff_price_id) => {
	return request({
		url		: 'synthesis/diff_prices/' + diff_price_id,
		method	: 'DELETE'
	})
}

// 补差价详情
const orderDiffInfo = (diff_price_id) => {
	return request({
		url		: 'synthesis/diff_prices/' + diff_price_id,
	})
}

export {
	servicesOrder,
	synthesisOrder,
	entrustOrder,
	expandOrder,
	servicesInfo,
	synthesisInfo,
	entrustInfo,
	expandInfo,
	oderinfo,
	orderDiff,
	orderDiffList,
	orderDiffCancel,
	orderDiffInfo
}
