import http from './http.js'
const request = http.request
// 销售总会list
export function summaryTrade(data) {
	return request({
		url: '/api/summary/trade',
		method: 'post',
		data: {
			...data
		}
	})
}
export function tbConsInfoFlowcount(data) {
	return request({
		url: '/api/tbConsInfoFlow/count',
		method: 'post',
		data
	})
}
// 供应商列表
export function tbShopPurveyorTransact(params) {
	return request({
		url: '/api/tbShopPurveyorTransact',
		method: 'get',
		params
	})
}
// 添加供应商
export function tbShopPurveyorpost(data) {
	return request({
		url: `/api/tbShopPurveyor`,
		method: "post",
		data
	});
}
// 编辑供应商
export function tbShopPurveyorput(data) {
	return request({
		url: `/api/tbShopPurveyor`,
		method: "put",
		data
	});
}
// 结款记录列表
export function tbShopPurveyorTransactinfo(data) {
	return request({
		url: '/api/tbShopPurveyorTransact/info',
		method: "post",
		data
	})
}
// 付款
export function tbShopPurveyorpayTransact(data) {
	return request({
		url: '/api/tbShopPurveyorTransact/payTransact',
		method: "post",
		data
	})
}
// 账单付款记录
export function tbShopPurveyorTransacttransactPayInfos(params) {
	return request({
		url: '/api/tbShopPurveyorTransact/transactPayInfos',
		method: 'get',
		params
	})
}
// 删除供应商列表
export function tbShopPurveyordelete(data) {
	return request({
		url: `/api/tbShopPurveyor`,
		method: "delete",
		data
	});
}
// 耗材报损
export function tbConsInfoFlowfrmLoss(data) {
	return request({
		url: '/api/tbConsInfoFlow/frmLoss',
		method: 'post',
		data
	})
}
// 销售排行榜
export function dateProduct(params) {
	return request({
		url: '/api/summary/productSaleDate',
		method: 'get',
		params
	})
}
// 是否开启
export function updateStatus(data) {
	return request({
		url: `/api/tbPlussShopStaff/updateStatus`,
		method: "put",
		data
	});
}
// 编辑
export function tbPlussShopStaffDetail(id) {
	return request({
		url: `/api/tbPlussShopStaff/${id}`,
		method: "get"
	});
}
// 新增耗材类型
export function tbConsType(data) {
	return request({
		url: '/api/tbConsType ',
		method: 'post',
		data
	})
}
// 编辑耗材类型
export function tbConsTypeput(data) {
	return request({
		url: '/api/tbConsInfo ',
		method: "put",
		data
	});
}

// 获取耗材类型列表
export function tbConsTypeList(params) {
	return request({
		url: '/api/tbConsType',
		method: 'get',
		params
	})
}
// 修改耗材类型
export function edittbConsTypeput(data) {
	return request({
		url: '/api/tbConsType ',
		method: "put",
		data
	});
}
// 添加耗材列表
export function tbConsInfoAddlist(data) {
	return request({
		url: '/api/tbConsInfo ',
		method: 'post',
		data
	})
}
// 操作耗材入库
export function tbConsInfostockInOut(data) {
	return request({
		url: '/api/tbConsInfo/stockInOut ',
		method: 'post',
		data
	})
}
// 获取耗材列表
export function tbConsInfoList(params) {
	return request({
		url: '/api/tbConsInfo',
		method: 'get',
		params
	})
}
// 耗材盘点
export function tbConsInfotbConCheck(data) {
	return request({
		url: '/api/tbConCheck ',
		method: 'post',
		data
	})
}
// 获取供应商列表
export function tbShopPurveyor(params) {
	return request({
		url: '/api/tbShopPurveyor',
		method: 'get',
		params
	})
}
// 桌型列表
export function callTable(params) {
	return request({
		url: '/callTable',
		method: 'get',
		params
	})
}
// 排队列表
export function callTablequeue(params) {
	return request({
		url: '/callTable/queue',
		method: 'get',
		params
	})
}
// 取号
export function callTabletakeNumber(data) {
	return request({
		url: '/callTable/takeNumber',
		method: 'post',
		data: {
			...data
		}
	})
}
// 增减余额
export function midfiyAccount(data) {
	return request({
		url: '/api/tbShopUser/midfiyAccount',
		method: 'post',
		data: {
			...data
		}
	})
}
// 新增会员
export function member(data) {
	return request({
		url: '/api/member',
		method: 'post',
		data: {
			...data
		}
	})
}
// 修改会员
export function tbShopUser(data) {
	return request({
		url: `/api/tbShopUser`,
		method: "put",
		data
	});
}
export function callTablecallRecord(params) {
	return request({
		url: '/callTable/callRecord',
		method: 'get',
		params
	})
}
export function callTableput(data) {
	return request({
		url: `/callTable/updateState`,
		method: "put",
		data
	});
}
// 叫号
export function callTablecall(data) {
	return request({
		url: `/callTable/call`,
		method: 'post',
		data
	});
}
// 获取员工列表
export function rolesGet(params) {
	return request({
		url: `/api/tbPlussShopStaff`,
		method: "get",
		params
	});
}
// 删除员工
export function shopStaffDelete(data) {
	return request({
		url: `/api/tbPlussShopStaff`,
		method: "delete",
		data
	});
}
// 新增员工获取权限
export function tbShopPermissionList() {
	return request({
		url: `/api/tbShopPermission/list`,
		method: "get"
	});
}

// 获取角色权限
export function getroles() {
	return request({
		url: `/api/roles`,
		method: "get"
	});
}
export function tbConsTypes() {
	return request({
		url: `/api/tbConsType`,
		method: "get"
	});
}
export function tbPlussShopStaff(data) {
	return request({
		url: `/api/tbPlussShopStaff`,
		method: data.id ? "put" : "post",
		data
	});
}
// 耗材列表
export function viewConInfoFlowget(data) {
	return request({
		url: `/api/tbConsInfo/allAndPro`,
		method: 'post',
		data
	});
}
// 耗材记录
export function tbConsInfoFlowstock(data) {
	return request({
		url: `/api/tbConsInfoFlow/stock`,
		method: 'post',
		data
	});
}