代码更新

This commit is contained in:
GaoHao
2025-03-12 14:13:29 +08:00
parent 2f1523d4e9
commit c2135c6119
105 changed files with 2026 additions and 278 deletions

16
http/api/area.js Normal file
View File

@@ -0,0 +1,16 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取区域列表
* @returns
*/
export function getShopArea(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopArea`,
method: "GET",
data: {
...data
}
})
}

136
http/api/buyer.js Normal file
View File

@@ -0,0 +1,136 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取挂账人分页
* @returns
*/
export function getCreditBuyerPage(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyer/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取挂账人详情
* @returns
*/
export function getCreditBuyerDetail(id, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyer/${id}`,
method: "GET",
})
}
/**
* 添加挂账人
* @returns
*/
export function addCreditBuyer(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyer`,
method: "POST",
data: {
...data
}
})
}
/**
* 编辑挂账人
* @returns
*/
export function editCreditBuyer(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyer`,
method: "PUT",
data: {
...data
}
})
}
/**
* 删除挂账人
* @returns
*/
export function delCreditBuyer(id, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyer/${id}`,
method: "DELETE",
})
}
/**
* 还款
* @returns
*/
export function creditBuyerRepayment(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyer/repayment`,
method: "POST",
data: {
...data
}
})
}
/**
* 付款
* @returns
*/
export function creditBuyerOrderPay(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyerOrder/pay`,
method: "POST",
data: {
...data
}
})
}
/**
* 还款记录
* @returns
*/
export function creditRePaymentRecord(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/paymentRecord/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 明细分页
* @returns
*/
export function creditBuyerOrderList(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyerOrder/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 明细统计
* @returns
*/
export function creditBuyerOrderSummary(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/credit/buyerOrder/summary`,
method: "GET",
data: {
...data
}
})
}

86
http/api/callTable.js Normal file
View File

@@ -0,0 +1,86 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取叫号队列
* @returns
*/
export function getCallTableQueue(data, urlType = 'account') {
return request({
url: `${urlType}/admin/callTable/queue`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取叫号记录列表
* @returns
*/
export function getCallRecord(data, urlType = 'account') {
return request({
url: `${urlType}/admin/callTable/callRecord`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取叫号桌型
* @returns
*/
export function getCallTable(data, urlType = 'account') {
return request({
url: `${urlType}/admin/callTable`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取叫号号码
* @returns
*/
export function callTableTakeNumber(data, urlType = 'account') {
return request({
url: `${urlType}/admin/callTable/takeNumber`,
method: "POST",
data: {
...data
}
})
}
/**
* 执行叫号
* @returns
*/
export function callTableCall(data, urlType = 'account') {
return request({
url: `${urlType}/admin/callTable/call`,
method: "POST",
data: {
...data
}
})
}
/**
* 修改叫号状态
* @returns
*/
export function updateCallTableState(data, urlType = 'account') {
return request({
url: `${urlType}/admin/callTable/updateState`,
method: "PUT",
data: {
...data
}
})
}

55
http/api/cateGory.js Normal file
View File

@@ -0,0 +1,55 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取分类分页
* @returns
*/
export function categoryPage(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/category/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 分类添加
* @returns
*/
export function addCategory(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/category`,
method: "POST",
data: {
...data
}
})
}
/**
* 分类修改
* @returns
*/
export function putCategory(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/category`,
method: "PUT",
data: {
...data
}
})
}
/**
* 分类删除
* @returns
*/
export function delCategory(id, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/category/${id}`,
method: "DELETE",
})
}

194
http/api/cons.js Normal file
View File

@@ -0,0 +1,194 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取耗材分页
* @returns
*/
export function getConsPage(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/cons/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取耗材列表
* @returns
*/
export function getConsList(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/cons/list`,
method: "GET",
data: {
...data
}
})
}
/**
* 耗材添加
* @returns
*/
export function addCons(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/cons`,
method: "POST",
data: {
...data
}
})
}
/**
* 耗材修改
* @returns
*/
export function editCons(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/cons`,
method: "PUT",
data: {
...data
}
})
}
/**
* 获取耗材类别
* @returns
*/
export function getConsGrpupPage(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/consGroup/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取耗材类别
* @returns
*/
export function getConsGrpupList(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/consGroup/list`,
method: "GET",
data: {
...data
}
})
}
/**
* 新增耗材类别
* @returns
*/
export function addConsGrpup(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/consGroup`,
method: "POST",
data: {
...data
}
})
}
/**
* 修改耗材类别
* @returns
*/
export function editConsGrpup(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/consGroup`,
method: "PUT",
data: {
...data
}
})
}
/**
* 启用耗材类别
* @returns
*/
export function consGrpupEnable(id, urlType = 'product') {
return request({
url: `${urlType}/admin/product/consGroup/enable/${id}`,
method: "POST",
})
}
/**
* 禁用耗材类别
* @returns
*/
export function consGrpupDisable(id, urlType = 'product') {
return request({
url: `${urlType}/admin/product/consGroup/disable/${id}`,
method: "POST",
})
}
/**
* 耗材入库
* @returns
*/
export function consStockIn(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/stock/in`,
method: "POST",
data: {
...data
}
})
}
/**
* 耗材出库
* @returns
*/
export function stockOut(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/stock/out`,
method: "POST",
data: {
...data
}
})
}
/**
* 库存盘点
* @returns
*/
export function stockCheck(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/stock/check`,
method: "POST",
data: {
...data
}
})
}
/**
* 耗材报损
* @returns
*/
export function stockReportDamage(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/stock/reportDamage`,
method: "POST",
data: {
...data
}
})
}

58
http/api/coupon.js Normal file
View File

@@ -0,0 +1,58 @@
import http from '@/http/http.js'
const request = http.request
/**
* 店铺优惠券列表
* @returns
*/
export function getCouponList(data, urlType = 'account') {
return request({
url: `${urlType}/admin/coupon`,
method: "GET",
data: {
...data
}
})
}
/**
* 生成订单后使用
* @returns
*/
export function getFindCoupon(data, urlType = 'account') {
return request({
url: `${urlType}/admin/coupon/findCoupon`,
method: "GET",
data: {
...data
}
})
}
/**
* 店铺优惠券新增
* @returns
*/
export function addCoupon(data, urlType = 'account') {
return request({
url: `${urlType}/admin/coupon`,
method: "POST",
data: {
...data
}
})
}
/**
* 店铺优惠券修改
* @returns
*/
export function updateCoupon(data, urlType = 'account') {
return request({
url: `${urlType}/admin/coupon`,
method: "PUT",
data: {
...data
}
})
}

30
http/api/freeDing.js Normal file
View File

@@ -0,0 +1,30 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取当前店铺霸王餐配置信息列表
* @returns
*/
export function getFreeDing(data, urlType = 'account') {
return request({
url: `${urlType}/admin/freeDing`,
method: "GET",
data: {
...data
}
})
}
/**
* 修改霸王餐配置信息
* @returns
*/
export function updateFreeDing(data, urlType = 'account') {
return request({
url: `${urlType}/admin/freeDing`,
method: "PUT",
data: {
...data
}
})
}

66
http/api/handover.js Normal file
View File

@@ -0,0 +1,66 @@
import http from '@/http/http.js'
const request = http.request
/**
* 交班记录-分页
* @returns
*/
export function getHandoverRecord(data, urlType = 'account') {
return request({
url: `${urlType}/admin/handoverRecord/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 交班记录-查看
* @returns
*/
export function getHandoverRecordView(id, urlType = 'account') {
return request({
url: `${urlType}/admin/handoverRecord/${id}`,
method: "GET",
})
}
/**
* 交班记录-导出
* @returns
*/
export function getHandoverRecordExport(id, urlType = 'account') {
return request({
url: `${urlType}/admin/handoverRecord/export/${id}`,
method: "GET",
})
}
/**
* 收银机-交班数据统计
* @returns
*/
export function getHandoverRecordTotal(data, urlType = 'account') {
return request({
url: `${urlType}/admin/handoverRecord/total`,
method: "GET",
data: {
...data
}
})
}
/**
* 收银机-交班/关班
* @returns
*/
export function getHandoverRecordHandover(data, urlType = 'account') {
return request({
url: `${urlType}/admin/handoverRecord/handover`,
method: "POST",
data: {
...data
}
})
}

24
http/api/index.js Normal file
View File

@@ -0,0 +1,24 @@
import http from '@/http/http.js'
const request = http.request
/**
* 文件上传
* @returns
*/
export function uploadFile(file, data, urlType = 'account') {
return http.upload(`${urlType}/admin/common/upload`,data,file)
}
/**
* 获取店铺权限列表
* @returns
*/
export function getShopPermission(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopPermission`,
method: "GET",
data: {
...data
}
})
}

30
http/api/login.js Normal file
View File

@@ -0,0 +1,30 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取验证码
* @returns
*/
export function authCaptcha(data, urlType = 'account') {
return request({
url: `${urlType}/admin/auth/captcha`,
method: "GET",
data: {
...data
}
})
}
/**
* 登录
* @returns
*/
export function login(data, urlType = 'account') {
return request({
url: `${urlType}/admin/auth/login`,
method: "POST",
data: {
...data
}
})
}

89
http/api/order.js Normal file
View File

@@ -0,0 +1,89 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取订单列表
* @returns
*/
export function getOrderList(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order`,
method: "GET",
data: {
...data
}
})
}
/**
* 订单详情
* @returns
*/
export function getOrderById(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/getOrderById`,
method: "GET",
data: {
...data
}
})
}
/**
* 历史订单(多次下单使用)
* @returns
*/
export function getHistoryOrder(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/historyOrder`,
method: "GET",
data: {
...data
}
})
}
/**
* 生成订单
* @returns
*/
export function createOrder(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/createOrder`,
method: "POST",
data: {
...data
}
})
}
/**
* 订单退款 只传订单id
* @returns
*/
export function refundOrder(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/refundOrder`,
method: "POST",
data: {
...data
}
})
}
/**
* 订单打印
* @returns
*/
export function printOrder(data, urlType = 'order') {
return request({
url: `${urlType}/admin/order/print`,
method: "POST",
data: {
...data
}
})
}

86
http/api/pay.js Normal file
View File

@@ -0,0 +1,86 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取店铺订单支付URL
* @returns
*/
export function getOrderPayUrl(data, urlType = 'order') {
return request({
url: `${urlType}/pay/shopPayApi/orderPayUrl`,
method: "GET",
data: {
...data
}
})
}
/**
* 扫码支付
* @returns
*/
export function scanPay(data, urlType = 'order') {
return request({
url: `${urlType}/pay/scanPay`,
method: "POST",
data: {
...data
}
})
}
/**
* 现金支付
* @returns
*/
export function cashPay(data, urlType = 'order') {
return request({
url: `${urlType}/pay/cashPay`,
method: "POST",
data: {
...data
}
})
}
/**
* 扫码/储值支付
* @returns
*/
export function microPay(data, urlType = 'order') {
return request({
url: `${urlType}/pay/microPay`,
method: "POST",
data: {
...data
}
})
}
/**
* 挂账支付
* @returns
*/
export function creditPay(data, urlType = 'order') {
return request({
url: `${urlType}/pay/creditPay`,
method: "POST",
data: {
...data
}
})
}
/**
* 会员支付
* @returns
*/
export function vipPay(data, urlType = 'order') {
return request({
url: `${urlType}/pay/vipPay`,
method: "POST",
data: {
...data
}
})
}

16
http/api/payType.js Normal file
View File

@@ -0,0 +1,16 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取支付方式列表
* @returns
*/
export function getPayTypeList(data, urlType = 'account') {
return request({
url: `${urlType}/admin/payType`,
method: "GET",
data: {
...data
}
})
}

59
http/api/points.js Normal file
View File

@@ -0,0 +1,59 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取订单可用积分及抵扣金额(支付页面使用)
* @returns
*/
export function calcUsablePoints(data, urlType = 'account') {
return request({
url: `${urlType}/admin/points/memberPoints/calcUsablePoints`,
method: "GET",
data: {
...data
}
})
}
/**
* 根据积分计算可抵扣金额
* @returns
*/
export function calcDeductionAmount(data, urlType = 'account') {
return request({
url: `${urlType}/admin/points/memberPoints/calcDeductionAmount`,
method: "GET",
data: {
...data
}
})
}
/**
* 支付完成扣减积分
* @returns
*/
export function payedDeductPoints(data, urlType = 'account') {
return request({
url: `${urlType}/admin/points/memberPoints/payedDeductPoints`,
method: "POST",
data: {
...data
}
})
}
/**
* 消费赠送积分
* @returns
*/
export function consumeAwardPoints(data, urlType = 'account') {
return request({
url: `${urlType}/admin/points/memberPoints/consumeAwardPoints`,
method: "POST",
data: {
...data
}
})
}

72
http/api/printer.js Normal file
View File

@@ -0,0 +1,72 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取打印机列表
* @returns
*/
export function getPrinter(data, urlType = 'account') {
return request({
url: `${urlType}/admin/printer`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取打印机详情
* @returns
*/
export function getPrinterDetail(data, urlType = 'account') {
return request({
url: `${urlType}/admin/printer/detail`,
method: "GET",
data: {
...data
}
})
}
/**
* 添加打印机
* @returns
*/
export function addPrinter(data, urlType = 'account') {
return request({
url: `${urlType}/admin/printer`,
method: "POST",
data: {
...data
}
})
}
/**
* 修改打印机
* @returns
*/
export function updatePrinter(data, urlType = 'account') {
return request({
url: `${urlType}/admin/printer`,
method: "PUT",
data: {
...data
}
})
}
/**
* 删除打印机
* @returns
*/
export function delPrinter(data, urlType = 'account') {
return request({
url: `${urlType}/admin/printer`,
method: "DELETE",
data: {
...data
}
})
}

305
http/api/product.js Normal file
View File

@@ -0,0 +1,305 @@
import http from '@/http/http.js'
const request = http.request
// 商品----------------------------------------------------------------------------------------------------
/**
* 获取商品分页
* @returns
*/
export function getProductPage(data, urlType = 'product' ,showLoading) {
return request({
url: `${urlType}/admin/product/page`,
method: "GET",
data: {
...data
},
showLoading
})
}
/**
* 获取商品列表
* @returns
*/
export function getProductList(data, urlType = 'product' ,showLoading) {
return request({
url: `${urlType}/admin/product/list`,
method: "GET",
data: {
...data
},
showLoading
})
}
/**
* 获取商品详情
* @returns
*/
export function getProductDetail (id, urlType = 'product') {
return request({
url: `${urlType}/admin/product/${id}`,
method: "GET",
})
}
/**
* 添加商品
* @returns
*/
export function addProduct(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product`,
method: "POST",
data: {
...data
}
})
}
/**
* 删除商品
* @returns
*/
export function delProduct(id, urlType = 'product') {
return request({
url: `${urlType}/admin/product/${id}`,
method: "DELETE",
})
}
/**
* 商品上下架
* @returns
*/
export function productOnOff (data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/onOff`,
method: "POST",
data: {
...data
}
})
}
/**
* 商品售罄
* @returns
*/
export function productMarkIsSoldOut (data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/markIsSoldOut`,
method: "POST",
data: {
...data
}
})
}
/**
* 修改商品
* @returns
*/
export function updateProduct(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product`,
method: "PUT",
data: {
...data
}
})
}
/**
* 绑定耗材
* @returns
*/
export function productBindCons(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/bind`,
method: "POST",
data: {
...data
}
})
}
/**
* 商品报损
* @returns
*/
export function productReportDamage(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/reportDamage`,
method: "POST",
data: {
...data
}
})
}
// 商品分类----------------------------------------------------------------------------------------------------
/**
* 获取商品分类列表
* @returns
*/
export function getCategoryList(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/category/list`,
method: "GET",
data: {
...data
}
})
}
// 商品单位----------------------------------------------------------------------------------------------------
/**
* 获取商品单位列表
* @returns
*/
export function getProdUnitList(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/unit/list`,
method: "GET",
data: {
...data
}
})
}
// 商品规格----------------------------------------------------------------------------------------------------
/**
* 获取商品规格列表
* @returns
*/
export function getSpecList(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/spec/list`,
method: "GET",
data: {
...data
}
})
}
/**
* 添加商品规格
* @returns
*/
export function addSpec(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/spec`,
method: "POST",
data: {
...data
}
})
}
/**
* 修改商品规格
* @returns
*/
export function updateSpec(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/spec`,
method: "PUT",
data: {
...data
}
})
}
/**
* 快捷添加商品规格
* @returns
*/
export function addSpecQuic(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/spec/quickAdd`,
method: "POST",
data: {
...data
}
})
}
/**
* 删除商品规格
* @returns
*/
export function delSpec(id, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/spec/${id}`,
method: "DELETE",
})
}
// 商品分组----------------------------------------------------------------------------------------------------
/**
* 获取商品分组列表
* @returns
*/
export function getProdGroupPage(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/group/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取商品分组详情
* @returns
*/
export function getProdGroupDetail(id, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/group/${id}`,
method: "GET",
})
}
/**
* 商品分组添加
* @returns
*/
export function addProdGroup(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/group`,
method: "POST",
data: {
...data
}
})
}
/**
* 商品分组修改
* @returns
*/
export function updateProdGroup(data, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/group`,
method: "PUT",
data: {
...data
}
})
}
/**
* 商品分组删除
* @returns
*/
export function delProdGroup(id, urlType = 'product') {
return request({
url: `${urlType}/admin/prod/group/${id}`,
method: "DELETE",
})
}

16
http/api/role.js Normal file
View File

@@ -0,0 +1,16 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取角色列表
* @returns
*/
export function getRoleList(data, urlType = 'account') {
return request({
url: `${urlType}/admin/role/list`,
method: "GET",
data: {
...data
}
})
}

58
http/api/shop.js Normal file
View File

@@ -0,0 +1,58 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取店铺详情
* @returns
*/
export function getShopInfo(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopInfo/detail`,
method: "GET",
data: {
...data
}
})
}
/**
* 修改店铺详情
* @returns
*/
export function editShopInfo(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopInfo`,
method: "PUT",
data: {
...data
}
})
}
/**
* 获取当前店铺拓展参数
* @returns
*/
export function getShopExtend(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopExtend`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取当前店铺拓展参数
* @returns
*/
export function editShopExtend(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopExtend`,
method: "PUT",
data: {
...data
}
})
}

86
http/api/shopUser.js Normal file
View File

@@ -0,0 +1,86 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取店铺用户概述信息
* @returns
*/
export function shopUserSummary(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopUser/summary`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取店铺用户列表
* @returns
*/
export function shopUserList(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopUser`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取店铺用户详情
* @returns
*/
export function shopUserDetail(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopUser/detail`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取店铺用户新增
* @returns
*/
export function shopUserAdd(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopUser`,
method: "POST",
data: {
...data
}
})
}
/**
* 店铺用户修改
* @returns
*/
export function shopUserPut(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopUser`,
method: "PUT",
data: {
...data
}
})
}
/**
* 店铺用户余额修改
* @returns
*/
export function shopUserMoney(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopUser/money`,
method: "PUT",
data: {
...data
}
})
}

86
http/api/staff.js Normal file
View File

@@ -0,0 +1,86 @@
import http from '@/http/http.js'
const request = http.request
/**
* 员工列表
* @returns
*/
export function shopStaffList(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopStaff`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取员工对应的权限idid
* @returns
*/
export function getShopStaffPermission(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopStaff/permission`,
method: "GET",
data: {
...data
}
})
}
/**
* 员工详情
* @returns
*/
export function shopStaffDetail(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopStaff/detail`,
method: "GET",
data: {
...data
}
})
}
/**
* 员工添加
* @returns
*/
export function shopStaffAdd(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopStaff`,
method: "POST",
data: {
...data
}
})
}
/**
* 员工修改
* @returns
*/
export function shopStaffPut(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopStaff`,
method: "PUT",
data: {
...data
}
})
}
/**
* 员工删除
* @returns
*/
export function shopStaffDel(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopStaff`,
method: "DELETE",
data: {
...data
}
})
}

30
http/api/summary.js Normal file
View File

@@ -0,0 +1,30 @@
import http from '@/http/http.js'
const request = http.request
/**
* 营业板块
* @returns
*/
export function getTrade(data, urlType = 'order') {
return request({
url: `${urlType}/admin/data/summary/trade`,
method: "GET",
data: {
...data
}
})
}
/**
* 商品销售汇总
* @returns
*/
export function productSaleDate(data, urlType = 'order') {
return request({
url: `${urlType}/admin/data/summary/productSaleDate`,
method: "GET",
data: {
...data
}
})
}

58
http/api/table.js Normal file
View File

@@ -0,0 +1,58 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取台桌列表
* @returns
*/
export function getShopTable(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopTable`,
method: "GET",
data: {
...data
}
})
}
/**
* 获取台桌详情
* @returns
*/
export function getShopTableDetail(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopTable/detail`,
method: "GET",
data: {
...data
}
})
}
/**
* 台桌清台
* @returns
*/
export function shopTableClear(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopTable/clear`,
method: "PUT",
data: {
...data
}
})
}
/**
* 台桌绑定
* @returns
*/
export function shopTableBind(data, urlType = 'account') {
return request({
url: `${urlType}/admin/shopTable/bind`,
method: "POST",
data: {
...data
}
})
}

56
http/api/vendor.js Normal file
View File

@@ -0,0 +1,56 @@
import http from '@/http/http.js'
const request = http.request
/**
* 获取供应商列表
* @returns
*/
export function getVendorPage(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/vendor/page`,
method: "GET",
data: {
...data
}
})
}
/**
* 添加供应商
* @returns
*/
export function addVendor(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/vendor`,
method: "POST",
data: {
...data
}
})
}
/**
* 编辑供应商
* @returns
*/
export function editVendor(data, urlType = 'product') {
return request({
url: `${urlType}/admin/product/vendor`,
method: "PUT",
data: {
...data
}
})
}
/**
* 删除供应商
* @returns
*/
export function delVendor(id, urlType = 'product') {
return request({
url: `${urlType}/admin/product/vendor/${id}`,
method: "DELETE",
})
}