import res from '@/utils/system/request.js'

// 获取全部分类接口
export const getCattleClassify = (params) => res('get', 'apiCow', '/manager/cattleClassify/listTree')
// 新增牛只分类信息
export const addCowClassify = (params) => res('post', 'apiCow', '/manager/cattleClassify/add',params)
// 删除牛只分类信息
export const deleteCowClassify = (params) => res('delete', 'apiCow', '/manager/cattleClassify/delete',{params:params})
// 编辑牛只分类信息
export const updateCowClassify = (params) => res('post', 'apiCow', '/manager/cattleClassify/update',params)
// 新增牛只接口
export const saveCattleItem = (params) => res('post', 'apiCow', '/manager/cattleItem/saveCattleItem',params)
// 获取牛只重量范围列表
export const getCattleWeightScopes = (params) => res('get', 'apiCow', '/manager/cattleItem/getCattleWeightScopes',{params:params})

// 牛只商品分页查询
export const getCattleItemPage = (params) => res('get', 'apiCow', '/manager/cattleItem/getCattleItemPage',{params:params})
// 牛只商品下架 
export const setOffSale = (params) => res('put', 'apiCow', '/manager/cattleItem/sku/offSale',params);
// 牛只商品上架
export const setToSale = (params) => res('put', 'apiCow', '/manager/cattleItem/sku/toSale',params);
// 获取牛只详情 
export const getCattleSpu = (params) => res('get', 'apiCow', '/manager/cattleItem/getCattleSpu',{params:params})
// 编辑牛只商品 
export const updateCattleSpu = (params) => res('post', 'apiCow', '/manager/cattleItem/updateCattleSpu',params)
// 删除牛只商品 
export const updateCattleSku = (params) => res('post', 'apiCow', '/manager/cattleItem/updateCattleSku',params)

// 订单
// 查询全部订单
export const getCattleOrderPage = (params) => res('get', 'apiCow', '/manager/cattle/order/getCattleOrderPage',{params:params})

//意向用户列表 
export const potentialUserListPage = (params) => res('get','apiCow', '/cattle/potential/potentialUserListPage', {params:params})
// 修改意向客户联系状态
export const updatePotentialStatus = (params) => res('post', 'apiCow', '/cattle/potential/update', params);

//查询订单详情 
export const getCattleOrderInfo = (params) => res('get','apiCow', '/manager/cattle/order/getCattleOrderInfo', {params:params})
// 发起改价 
export const UpdatePrice = (params) => res('post', 'apiCow', '/manager/cattle/order/cattleOrderUpdatePrice', params);
// 确认已看牛 
export const confirmAppointCattle = (params) => res('post', 'apiCow', '/manager/cattle/order/confirmAppointCattle', params,{form:true});
// 确认支付尾款 
export const confirmLastPay = (params) => res('post', 'apiCow', '/manager/cattle/order/confirmLastPay', params,{form:true});

// 采购需求
export const getBuyDemandPage = (params) => res('get','apiCow', '/manager/buyDemand/getBuyDemandPage', {params:params})
// 新增采购需求 
export const saveCattleBuyDemand = (params) => res('post', 'apiCow', '/manager/buyDemand/saveCattleBuyDemand', params);
// 展示发布和下架 
export const offOnSale = (params) => res('put', 'apiCow', '/manager/buyDemand/offOnSale', params);
// 获取采购需求详情
export const getCattleBuyDemandById = (params) => res('get','apiCow', '/manager/buyDemand/getCattleBuyDemandById', {params:params})
// 编辑采购需求 POST 
export const updateCattleBuyDemand = (params) => res('post', 'apiCow', '/manager/buyDemand/updateCattleBuyDemand', params);

// 获取发布列表 
export const getCattleDealPage = (params) => res('get','apiCow', '/manager/cattleDeal/getCattleDealPage', {params:params})
// 发布审核 
export const cattleDealAudit = (params) => res('post', 'apiCow', '/manager/cattleDeal/cattleDealAudit', params,{form:true});
// 强制下架 
export const cattleDealoffSale = (params) => res('post', 'apiCow', '/manager/cattleDeal/offSale', params,{form:true});
// 查询详情 
export const getCattleDealInfo = (params) => res('get','apiCow', '/manager/cattleDeal/getCattleDealInfo', {params:params})

// 增加协议
export const addProtocol = (params)=> res('post','apiCow','/agreementinfoConfig/saveOrUpdate',params) 
// 查询协议
export const getProtocol = (params)=> res('post','apiCow','/agreementinfoConfig/query',params)
// 服务费新增修改
export const updateServiceFee = (params)=> res('post','apiCow','/cattleFeeConfig/saveOrUpdate',params)
// 服务费查询
export const getServiceFee = (params)=> res('post','apiCow','/cattleFeeConfig/query',params)

// 后台查询  报价 、意向、订单
export const getCattleDealPageByAdminAndType = (params) => res('get','apiCow','/manager/cattleDeal/getCattleDealPageByAdminAndType', {params});
// 查询报价记录
export const quoteList = params => res('post','apiCow','/manager/cattleDeal/quoteList',params)

// 查询卖牛报价待审列表
export const querySaleQuoteWaitAuditList = params => res('post','apiCow','/manager/cattleDeal/querySaleQuoteWaitAuditList',params)
// 卖牛报价审核
export const saleQuoteAudit = params => res('post','apiCow','/manager/cattleDeal/saleQuoteAudit',params,{form:true})
// 查询意向单量列表
export const intendList = params => res('post','apiCow','/manager/cattleDeal/intendList',params)
// 查询订单列表
export const orderList = params => res('post','apiCow','/manager/cattleDeal/orderList',params)
// 查询子订单列表
export const splitOrderList = params => res('post','apiCow','/manager/cattleDeal/splitOrderList',params)
// 查询服务费列表
export const shopFeeList = params => res('post','apiCow','/cattle/fee/shopFeeList',params)
