import https from "@/plugins/luch-request_0.0.7/request";

/** *
 * 采购订单详情
 */
export const getPurchaseDetailApi = async orderSn => {
	return https.get("/purchase-order/detail", { orderSn });
};

/** *
 * 采购列表
 */
export const getPurchaseListApi = async data => {
	return https.get("/purchase-order/list", data);
};

/** *
 * 采购确认
 */
export const createPurchaseOrderApi = async data => {
	return https.post("/purchase-order/create-order", data);
};

/** *
 * 供货商列表
 */
 export const ghsList = async data => {
	return https.get("/ghs/list", data);
};

/** *
 * 采购记录
 */
 export const purchaseList = async data => {
	return https.get("/purchase/list", data);
};

/** *
 * 待结款明细
 */
 export const purchaseDebtList = async data => {
	return https.get("/purchase/debt-list", data);
};

/** *
 * 供货商详情  
 */
 export const ghsDetail = async data => {
	return https.get("/ghs/detail", data);
};

/** *
 * 待结款 - 结款
 */
 export const purchaseClearCreateOrder = async data => {
	return https.post("/purchase-clear/create-order", data);
};

/** *
 * 待结款 - 微信支付
 */
 export const purchaseClearWxPay = async data => {
	return https.post("/purchase-clear/wx-pay", data);
};

/** *
 * 余额支付
 */
 export const purchaseBalancePay = async data => {
	return https.get("/purchase/balance-pay", data);
};

/** *
 * 延期支付
 */
 export const purchaseDebtPay = async data => {
	return https.get("/purchase/debt-pay", data);
};

/** *
 * 采购详情   /purchase/wx-pay
 */
 export const purchaseDetail = async data => {
	return https.get("/purchase/detail", data);
};

/** *
 * 采购详情
 */
 export const purchaseWxPay = async data => {
	return https.post("/purchase/wx-pay", data);
};
/** *
	* 发快递配送费计算  姜枫 2021.04.12
	*/
export const freight = async data => {
	return https.post("/purchase/freight", data);
};
/** *
	* 采购-下单  姜枫 2021.04.12
	*/
export const createOrder = async data => {
	return https.post("/purchase/create-order", data);
};
