
/**
 * 手太欠
 * 愿这世界都如故事里一样 美好而动人~
 */

import { request } from '../index'

// 获取综法订单数据数量
const synthesisCount = (data) =>{
	return request({
		url: "synthesis/data/orders_count",
		data: data
	})
}


// 综法咨询-一次免费列表
const synthList = () =>{
	return request({
		url: "synthesis/index"
	})
}

// 综法咨询-一次免费详情
const synthDet = (synthesis_id) =>{
	return request({
		url: "synthesis/index/" + synthesis_id
	})
}


// 综法咨询-一次免费创建单
const synthPost = (synthesis_id, data) =>{
	return request({
		url: "synthesis/index/" + synthesis_id + "/order",
		method: 'POST',
		data: data
	})
}

// 综法咨询-年费服务包列表
const yearSynthList = data =>{
	return request({
		url: "synthesis/services",
		data: data
	})
}

// 综法咨询-年费服务包详情
const yearSynthInfo = (service_id) =>{
	return request({
		url: "synthesis/services/" + service_id
	})
}


// 综法咨询-年费服务包创建单
const yearSynthPost = (service_id, data) =>{
	return request({
		url: "synthesis/services/" + service_id + "/buy",
		method: 'POST',
		data: data
	})
}

// 综法咨询-案件委托列表
const entrustList = () =>{
	return request({
		url: "synthesis/entrusts"
	})
}

// 综法咨询-案件委托子分类
const entrustSon = data =>{
	return request({
		url: "synthesis/entrust/all",
		data: data
	})
}


// 综法咨询-案件委托详情
const entrustInfo = (entrust_id) =>{
	return request({
		url: "synthesis/entrust/" + entrust_id
	})
}


// 综法咨询-案件委托创建单
const entrustPost = (entrust_id, data) =>{
	return request({
		url: "synthesis/entrust/" + entrust_id + "/order",
		method: 'POST',
		data: data
	})
}

// 综法咨询-拓展服务列表
const expandsList = () =>{
	return request({
		url: "synthesis/expands",
	})
}


// 综法咨询-拓展服务详情
const expandsInfo = (expand_id) =>{
	return request({
		url: "synthesis/expand/" + expand_id
	})
}

// 综法咨询-拓展服务创建单
const expandsPost = (expand_id, data) =>{
	return request({
		url: "synthesis/expand/" + expand_id + "/order",
		method: 'POST',
		data: data
	})
}

// 综法咨询-年费服务包微信支付
const yearSynthPay = (service_order_id, data) =>{
	return request({
		url: "pay/service_order/" + service_order_id + "/wechat",
		data: data
	})
}

// 年费订单-列表
const yearOrder = data =>{
	return request({
		url: "synthesis/services/orders",
		data: data
	})
}

// 年费订单-详情
const yearOrderSee = (order_id) =>{
	return request({
		url: "synthesis/services/order/" + order_id
	})
}

// 咨询单-列表
const seekOrder = data =>{
	return request({
		url: "synthesis/orders",
		data: data
	})
}


// 咨询订单-详情
const seekOrderSee = (synthesis_order_id) =>{
	return request({
		url: "synthesis/order/" + synthesis_order_id
	})
}

// 委托单-列表
const entrustOrder = data =>{
	return request({
		url: "synthesis/entrust/orders",
		data: data
	})
}

// 拓展单-列表
const expandOrder = data =>{
	return request({
		url: "synthesis/expand/orders",
		data: data
	})
}

// 年费费--线下打款
const offlineOpen = (data) =>{
	return request({
		url: "pay/offline/pay",
		method: 'POST',
		data: data
	})
}

// 查看打款凭证-查看提交信息
const bankSee = (pay_id, data) =>{
	return request({
		url: "pay/offline/" + pay_id + "/show",
		data: data
	})
}

// 编辑打款凭证
const bankEdit = (pay_id, data) =>{
	return request({
		url: "pay/offline/" + pay_id + "/edit",
		method: 'POST',
		data: data
	})
}


// 获取线下打款银行
const bankInfo = (data) =>{
	return request({
		url: "pay/offline/bank"
	})
}

// 咨询单-补差价列表
const diffPrices = data =>{
	return request({
		url: "synthesis/diff_prices",
		data: data
	})
}


// 咨询单-创建补差价
const entrustPay = data =>{
	return request({
		url: "synthesis/diff_prices/create",
		method: 'POST',
		data: data
	})
}

// 咨询单-取消补差价
const cancelPrices = (diff_price_id) =>{
	return request({
		url: "synthesis/diff_prices/" + diff_price_id,
		method: 'DELETE'
	})
}

// 获取签约地址
const esignUrl = (data) =>{
	return request({
		url: "synthesis/esign/sign_url",
		data: data
	})
}

// 年费费-取消订单
const yearCancel = (order_id) =>{
	return request({
		url: "synthesis/services/order/" + order_id,
		method: 'DELETE'
	})
}


// 委托单-取消订单
const entrustCancel = (expand_id) =>{
	return request({
		url: "synthesis/entrust/order/" + expand_id,
		method: 'DELETE'
	})
}

// 拓展单-取消订单
const expandCancel = (order_id) =>{
	return request({
		url: "synthesis/expand/order/" + order_id,
		method: 'DELETE'
	})
}


export {
	synthesisCount,
	synthList,
	synthDet,
	synthPost,
	yearSynthList,
	yearSynthInfo,
	yearSynthPost,
	entrustList,
	entrustSon,
	entrustInfo,
	entrustPost,
	expandsList,
	expandsInfo,
	expandsPost,
	yearSynthPay,
	yearOrder,
	yearOrderSee,
	seekOrder,
	seekOrderSee,
	entrustOrder,
	expandOrder,
	offlineOpen,
	bankSee,
	bankEdit,
	bankInfo,
	diffPrices,
	entrustPay,
	cancelPrices,
	esignUrl,
	yearCancel,
	entrustCancel,
	expandCancel
}
