init
This commit is contained in:
58
fuintCashier/src/renderer/api/balance.js
Normal file
58
fuintCashier/src/renderer/api/balance.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询余额明细列表
|
||||
export function getBalanceList(query) {
|
||||
return request({
|
||||
url: 'backendApi/balance/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询明细详情
|
||||
export function getBalanceInfo(memberId) {
|
||||
return request({
|
||||
url: 'backendApi/balance/info/' + memberId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新状态
|
||||
export function updateBalanceStatus(id, status) {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: 'backendApi/balance/updateStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取配置信息
|
||||
export function getSettingInfo() {
|
||||
return request({
|
||||
url: 'backendApi/balance/setting',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存配置
|
||||
export function saveSetting(data) {
|
||||
return request({
|
||||
url: 'backendApi/balance/saveSetting',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 确定充值
|
||||
export function doRecharge(data) {
|
||||
return request({
|
||||
url: 'backendApi/balance/doRecharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
124
fuintCashier/src/renderer/api/cashier.js
Normal file
124
fuintCashier/src/renderer/api/cashier.js
Normal file
@@ -0,0 +1,124 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化数据
|
||||
export function init(userId, cateId, page, pageSize) {
|
||||
return request({
|
||||
url: 'backendApi/cashier/init/' + userId,
|
||||
method: 'get',
|
||||
params: { cateId: cateId, page: page, pageSize: pageSize }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品详情
|
||||
export function getGoodsInfo(goodsId) {
|
||||
return request({
|
||||
url: 'backendApi/cashier/getGoodsInfo/' + goodsId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品
|
||||
export function searchGoods(data) {
|
||||
return request({
|
||||
url: 'backendApi/cashier/searchGoods',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会员信息
|
||||
export function getMemberInfo(data) {
|
||||
return request({
|
||||
url: 'backendApi/cashier/getMemberInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会员信息
|
||||
export function getMemberInfoById(userId) {
|
||||
return request({
|
||||
url: 'backendApi/cashier/getMemberInfoById/' + userId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取购物车列表
|
||||
export function getCartList(data) {
|
||||
return request({
|
||||
url: 'clientApi/cart/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存购物车
|
||||
export function saveCart(data) {
|
||||
return request({
|
||||
url: 'clientApi/cart/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除购物车
|
||||
export function removeFromCart(data) {
|
||||
return request({
|
||||
url: 'clientApi/cart/clear',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 提交结算
|
||||
export function submitSettlement(data) {
|
||||
return request({
|
||||
url: 'clientApi/settlement/submit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 发起支付
|
||||
export function doPay(params) {
|
||||
return request({
|
||||
url: 'clientApi/pay/doPay',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取订单列表
|
||||
export function getOrderList(data) {
|
||||
return request({
|
||||
url: 'backendApi/order/latest',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 执行挂单
|
||||
export function doHangUp(data) {
|
||||
return request({
|
||||
url: 'backendApi/cashier/doHangUp',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取挂单
|
||||
export function getHangUpList() {
|
||||
return request({
|
||||
url: 'backendApi/cashier/getHangUpList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除挂单
|
||||
export function removeHangUp(data) {
|
||||
return request({
|
||||
url: 'clientApi/cart/clear',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
75
fuintCashier/src/renderer/api/coupon.js
Normal file
75
fuintCashier/src/renderer/api/coupon.js
Normal file
@@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询卡券列表
|
||||
export function getCouponList(query) {
|
||||
return request({
|
||||
url: 'backendApi/coupon/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询卡券信息
|
||||
export function getCouponInfo(id) {
|
||||
return request({
|
||||
url: 'backendApi/coupon/info/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新状态
|
||||
export function updateCouponStatus(id, status) {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: 'backendApi/coupon/updateStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除卡券
|
||||
export function deleteCoupon(id) {
|
||||
return request({
|
||||
url: 'backendApi/coupon/delete/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存卡券
|
||||
export function saveCoupon(data) {
|
||||
return request({
|
||||
url: 'backendApi/coupon/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询卡券核销信息
|
||||
export function getConfirmInfo(data) {
|
||||
return request({
|
||||
url: 'backendApi/doConfirm/info',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 执行核销
|
||||
export function doConfirm(data) {
|
||||
return request({
|
||||
url: 'backendApi/doConfirm/doConfirm',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 发放卡券
|
||||
export function sendCoupon(params) {
|
||||
return request({
|
||||
url: 'backendApi/coupon/sendCoupon',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
76
fuintCashier/src/renderer/api/goods.js
Normal file
76
fuintCashier/src/renderer/api/goods.js
Normal file
@@ -0,0 +1,76 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询商品列表
|
||||
export function getGoodsList(query) {
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品详情
|
||||
export function getGoodsInfo(goodsId) {
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/info/' + goodsId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新状态
|
||||
export function updateGoodsStatus(id, status) {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/updateStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存分类数据
|
||||
export function saveGoods(data) {
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存商品规格名称
|
||||
export function saveSpecName(data) {
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/saveSpecName',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存商品规格值
|
||||
export function saveSpecValue(data) {
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/saveSpecValue',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除商品规格
|
||||
export function deleteSpec(query) {
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/deleteSpec',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除商品规格值
|
||||
export function deleteSpecValue(query) {
|
||||
return request({
|
||||
url: 'backendApi/goods/goods/deleteSpecValue',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
51
fuintCashier/src/renderer/api/login.js
Normal file
51
fuintCashier/src/renderer/api/login.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, captchaCode, uuid) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
captchaCode,
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
url: 'backendApi/login/doLogin',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: 'backendApi/login/getInfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
url: 'backendApi/login/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
url: 'clientApi/captcha/getCode?v='+Math.random(),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 系统消息
|
||||
export function message () {
|
||||
return request({
|
||||
url: 'clientApi/captcha/message',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
65
fuintCashier/src/renderer/api/member.js
Normal file
65
fuintCashier/src/renderer/api/member.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询会员列表
|
||||
export function getMemberList(query) {
|
||||
return request({
|
||||
url: 'backendApi/member/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会员信息
|
||||
export function getMemberInfo(memberId) {
|
||||
return request({
|
||||
url: 'backendApi/member/info/' + memberId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会员设置
|
||||
export function getMemberSetting() {
|
||||
return request({
|
||||
url: 'backendApi/member/setting',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存会员设置
|
||||
export function saveSetting(data) {
|
||||
return request({
|
||||
url: 'backendApi/member/saveSetting',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新会员状态
|
||||
export function updateMemberStatus(userId, status) {
|
||||
const data = {
|
||||
userId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: 'backendApi/member/updateStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除会员信息
|
||||
export function deleteMember(memberId) {
|
||||
return request({
|
||||
url: 'backendApi/member/delete/' + memberId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
export function saveMember(data) {
|
||||
return request({
|
||||
url: 'backendApi/member/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
83
fuintCashier/src/renderer/api/order.js
Normal file
83
fuintCashier/src/renderer/api/order.js
Normal file
@@ -0,0 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询订单列表
|
||||
export function getOrderList(data) {
|
||||
return request({
|
||||
url: 'backendApi/order/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询订单信息
|
||||
export function getOrderInfo(orderId) {
|
||||
return request({
|
||||
url: 'backendApi/order/info/' + orderId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新订单状态
|
||||
export function updateOrderStatus(orderId, status) {
|
||||
const data = {
|
||||
orderId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: 'backendApi/order/updateStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除订单
|
||||
export function deleteOrder(orderId) {
|
||||
return request({
|
||||
url: 'backendApi/order/delete/' + orderId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存订单数据
|
||||
export function saveOrder(data) {
|
||||
return request({
|
||||
url: 'backendApi/order/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 验证核销订单
|
||||
export function verifyOrder(data) {
|
||||
return request({
|
||||
url: 'backendApi/order/verify',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 提交发货信息
|
||||
export function delivered(data) {
|
||||
return request({
|
||||
url: 'backendApi/order/delivered',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取配置信息
|
||||
export function getSettingInfo() {
|
||||
return request({
|
||||
url: 'backendApi/order/setting',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存配置
|
||||
export function saveSetting(data) {
|
||||
return request({
|
||||
url: 'backendApi/order/saveSetting',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
58
fuintCashier/src/renderer/api/point.js
Normal file
58
fuintCashier/src/renderer/api/point.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询积分明细列表
|
||||
export function getPointList(query) {
|
||||
return request({
|
||||
url: 'backendApi/point/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询明细详情
|
||||
export function getPointInfo(memberId) {
|
||||
return request({
|
||||
url: 'backendApi/point/info/' + memberId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新状态
|
||||
export function updatePointStatus(id, status) {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: 'backendApi/point/updateStatus',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取配置信息
|
||||
export function getSettingInfo() {
|
||||
return request({
|
||||
url: 'backendApi/point/setting',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存配置
|
||||
export function saveSetting(data) {
|
||||
return request({
|
||||
url: 'backendApi/point/saveSetting',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 确定充值
|
||||
export function doRecharge(data) {
|
||||
return request({
|
||||
url: 'backendApi/point/doRecharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
44
fuintCashier/src/renderer/api/refund.js
Normal file
44
fuintCashier/src/renderer/api/refund.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询退款订单列表
|
||||
export function getRefundList(query) {
|
||||
return request({
|
||||
url: 'backendApi/refund/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询订单信息
|
||||
export function getRefundInfo(refundId) {
|
||||
return request({
|
||||
url: 'backendApi/refund/info/' + refundId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 订单退款
|
||||
export function doRefund(data) {
|
||||
return request({
|
||||
url: 'backendApi/refund/doRefund',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除退款订单
|
||||
export function deleteRefund(refundId) {
|
||||
return request({
|
||||
url: 'backendApi/refund/delete/' + refundId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存退款订单
|
||||
export function saveRefund(data) {
|
||||
return request({
|
||||
url: 'backendApi/refund/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
10
fuintCashier/src/renderer/api/staff.js
Normal file
10
fuintCashier/src/renderer/api/staff.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询员工列表
|
||||
export function getStaffList(query) {
|
||||
return request({
|
||||
url: 'backendApi/staff/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user