代码更新
This commit is contained in:
parent
2f1523d4e9
commit
c2135c6119
12
api/cons.js
12
api/cons.js
|
|
@ -64,7 +64,7 @@ export function editCons(data, urlType = 'product') {
|
|||
*/
|
||||
export function getConsGrpupPage(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `${urlType}/admin/product/cons-group/page`,
|
||||
url: `${urlType}/admin/product/consGroup/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
|
|
@ -78,7 +78,7 @@ export function getConsGrpupPage(data, urlType = 'product') {
|
|||
*/
|
||||
export function getConsGrpupList(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `${urlType}/admin/product/cons-group/list`,
|
||||
url: `${urlType}/admin/product/consGroup/list`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
|
|
@ -92,7 +92,7 @@ export function getConsGrpupList(data, urlType = 'product') {
|
|||
*/
|
||||
export function addConsGrpup(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `${urlType}/admin/product/cons-group`,
|
||||
url: `${urlType}/admin/product/consGroup`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
|
|
@ -106,7 +106,7 @@ export function addConsGrpup(data, urlType = 'product') {
|
|||
*/
|
||||
export function editConsGrpup(data, urlType = 'product') {
|
||||
return request({
|
||||
url: `${urlType}/admin/product/cons-group`,
|
||||
url: `${urlType}/admin/product/consGroup`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
...data
|
||||
|
|
@ -120,7 +120,7 @@ export function editConsGrpup(data, urlType = 'product') {
|
|||
*/
|
||||
export function consGrpupEnable(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `${urlType}/admin/product/cons-group/enable/${id}`,
|
||||
url: `${urlType}/admin/product/consGroup/enable/${id}`,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ export function consGrpupEnable(id, urlType = 'product') {
|
|||
*/
|
||||
export function consGrpupDisable(id, urlType = 'product') {
|
||||
return request({
|
||||
url: `${urlType}/admin/product/cons-group/disable/${id}`,
|
||||
url: `${urlType}/admin/product/consGroup/disable/${id}`,
|
||||
method: "POST",
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const request = http.request
|
|||
*/
|
||||
export function getHandoverRecord(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `${urlType}/admin/handover-record/page`,
|
||||
url: `${urlType}/admin/handoverRecord/page`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
|
|
@ -21,7 +21,7 @@ export function getHandoverRecord(data, urlType = 'account') {
|
|||
*/
|
||||
export function getHandoverRecordView(id, urlType = 'account') {
|
||||
return request({
|
||||
url: `${urlType}/admin/handover-record/${id}`,
|
||||
url: `${urlType}/admin/handoverRecord/${id}`,
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ export function getHandoverRecordView(id, urlType = 'account') {
|
|||
*/
|
||||
export function getHandoverRecordExport(id, urlType = 'account') {
|
||||
return request({
|
||||
url: `${urlType}/admin/handover-record/export/${id}`,
|
||||
url: `${urlType}/admin/handoverRecord/export/${id}`,
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ export function getHandoverRecordExport(id, urlType = 'account') {
|
|||
*/
|
||||
export function getHandoverRecordTotal(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `${urlType}/admin/handover-record/total`,
|
||||
url: `${urlType}/admin/handoverRecord/total`,
|
||||
method: "GET",
|
||||
data: {
|
||||
...data
|
||||
|
|
@ -57,7 +57,7 @@ export function getHandoverRecordTotal(data, urlType = 'account') {
|
|||
*/
|
||||
export function getHandoverRecordHandover(data, urlType = 'account') {
|
||||
return request({
|
||||
url: `${urlType}/admin/handover-record/handover`,
|
||||
url: `${urlType}/admin/handoverRecord/handover`,
|
||||
method: "POST",
|
||||
data: {
|
||||
...data
|
||||
|
|
|
|||
|
|
@ -26,17 +26,12 @@ export function canTuiKuan(orderInfo, item) {
|
|||
Object.entries(orderInfo.detailMap).map(([key, value]) => (
|
||||
goodsList = [...goodsList,...value]
|
||||
))
|
||||
console.log("orderInfo===",orderInfo)
|
||||
console.log("goodsList===",goodsList)
|
||||
goodsList.some((v,i)=>{
|
||||
console.log(v)
|
||||
if( (orderInfo.status == 'done' || orderInfo.status == 'part_refund') && v.status != 'return' && v.status != 'refund' && v.status != 'refunding' ){
|
||||
data = true
|
||||
console.log(data)
|
||||
return data
|
||||
}
|
||||
})
|
||||
console.log(data)
|
||||
return data
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,11 @@ class WebsocketUtil {
|
|||
this.initializeWebSocket();
|
||||
}
|
||||
|
||||
// 初始化 WebSocket 连接
|
||||
initializeWebSocket() {
|
||||
// 初始化 WebSocket 连接
|
||||
initializeWebSocket() {
|
||||
if( this.isOpen){
|
||||
return
|
||||
}
|
||||
this.socketTask = uni.connectSocket({
|
||||
url: this.url,
|
||||
success: () => {
|
||||
|
|
@ -35,13 +38,16 @@ class WebsocketUtil {
|
|||
|
||||
this.socketTask.onOpen((res) => {
|
||||
console.log('WebSocket连接正常!==',res);
|
||||
this.send(JSON.stringify({"type": "ping_interval22"}));
|
||||
this.isOpen = true;
|
||||
// 连接成功后启动心跳和消息监听
|
||||
this.startHeartbeat();
|
||||
this.listenForMessages();
|
||||
|
||||
});
|
||||
this.socketTask.onError((res) => {
|
||||
console.log('WebSocket连接失败!==',res);
|
||||
this.reconnect();
|
||||
});
|
||||
// 注意:这里的 onClose 监听器应该放在 uni.connectSocket 调用之后
|
||||
this.socketTask.onClose((result) => {
|
||||
this.isOpen = false;
|
||||
|
|
@ -83,10 +89,11 @@ class WebsocketUtil {
|
|||
// 监听 WebSocket 消息
|
||||
listenForMessages() {
|
||||
if (this.socketTask) {
|
||||
this.socketTask.onMessage((res) => {
|
||||
this.socketTask.onMessage((res) =>{
|
||||
const { data } = res;
|
||||
this.messageCallbacks.forEach(callback => callback(data.toString())); // 假设 data 是字符串或可转换为字符串
|
||||
});
|
||||
this.send("WebSocket连接正常");
|
||||
} else {
|
||||
console.error('WebSocket 连接尚未建立,无法监听消息');
|
||||
}
|
||||
|
|
@ -125,7 +132,7 @@ class WebsocketUtil {
|
|||
|
||||
// 外部注销消息回调函数
|
||||
offMessage(callback) {
|
||||
this.messageCallbacks = this.messageCallbacks.filter(cb => cb !== callback);
|
||||
this.messageCallbacks = []
|
||||
}
|
||||
|
||||
// 销毁 WebSocket 连接,清理资源
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { uploadFile } from '@/api/index.js'
|
||||
import { uploadFile } from '@/http/api/index.js'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { uploadFile } from '@/api/index.js'
|
||||
import { uploadFile } from '@/http/api/index.js'
|
||||
|
||||
import {
|
||||
reactive,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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",
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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",
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -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",
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -18,8 +18,12 @@ import go from '@/commons/utils/go.js';
|
|||
import { reject } from 'lodash';
|
||||
|
||||
// 测试服
|
||||
// #ifdef H5
|
||||
let baseUrl = '/api/'
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
let baseUrl = 'https://tapi.cashier.sxczgkj.cn/'
|
||||
|
||||
// #endif
|
||||
//预发布
|
||||
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||
|
||||
|
|
|
|||
|
|
@ -172,9 +172,9 @@
|
|||
// 需要被代理的后台地址
|
||||
"target" : "https://tapi.cashier.sxczgkj.cn",
|
||||
"changeOrigin" : true,
|
||||
"secure" : false,
|
||||
"secure" : true,
|
||||
"pathRewrite" : {
|
||||
"^/api" : ""
|
||||
"/api" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
import { onShow, } from '@dcloudio/uni-app';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
|
||||
import { getFreeDing, updateFreeDing } from '@/api/freeDing.js'
|
||||
import { getFreeDing, updateFreeDing } from '@/http/api/freeDing.js'
|
||||
const form = reactive({
|
||||
rechargeTimes: '',
|
||||
rechargeThreshold: '',
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
import mySwitch from '@/components/my-components/my-switch'
|
||||
import myUploadFile from '@/components/my-components/my-upload-file'
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app';
|
||||
import { addCategory, putCategory } from '@/api/cateGory.js'
|
||||
import { addCategory, putCategory } from '@/http/api/cateGory.js'
|
||||
|
||||
|
||||
// 构造分类的基础数据
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
import myCategory from './components/category.vue'
|
||||
import infoBox from "@/commons/utils/infoBox.js"
|
||||
import {$productCategory} from '@/http/yskApi/goods.js'
|
||||
import { categoryPage,putCategory,delCategory } from '@/api/cateGory.js'
|
||||
import { categoryPage,putCategory,delCategory } from '@/http/api/cateGory.js'
|
||||
const control=ref(null)
|
||||
const delModel=ref(null)
|
||||
const goodsSortModel=ref(null)
|
||||
|
|
|
|||
|
|
@ -5,42 +5,23 @@
|
|||
<view class="addConsumables">
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
单位
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入单位" v-model="datas.form.conUnit" name="" id="">
|
||||
</view>
|
||||
<view> 单位 </view>
|
||||
<view> <input type="text" placeholder="请输入单位" v-model="datas.form.conUnit" name="" id=""> </view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
耗材名称
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入耗材名称" v-model="datas.form.conName" name="" id="">
|
||||
</view>
|
||||
<view> 耗材名称 </view>
|
||||
<view> <input type="text" placeholder="请输入耗材名称" v-model="datas.form.conName" name="" id=""> </view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
耗材价格
|
||||
</view>
|
||||
<view>
|
||||
<input class="uni-input" placeholder="请输入耗材价格" type="number" v-model="datas.form.price" >
|
||||
<!-- <up-input placeholder="请输入耗材价格" v-model="datas.form.price" type="digit"></up-input> -->
|
||||
</view>
|
||||
<view> 耗材价格 </view>
|
||||
<view> <input class="uni-input" placeholder="请输入耗材价格" type="digit" v-model="datas.form.price" > </view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
预警值
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入预警值" v-model="datas.form.conWarning" name="" id="">
|
||||
</view>
|
||||
<view> 预警值 </view>
|
||||
<view> <input type="number" placeholder="请输入预警值" v-model="datas.form.conWarning" name="" id=""> </view>
|
||||
</view>
|
||||
<view style="justify-content: space-between;">
|
||||
<view>
|
||||
耗材类型
|
||||
</view>
|
||||
<view> 耗材类型 </view>
|
||||
<view style="width: 54%;" @tap="datas.showStatus = !datas.showStatus">
|
||||
{{datas.typelist[datas.nowStatusIndex]}}
|
||||
</view>
|
||||
|
|
@ -77,7 +58,7 @@
|
|||
} from '@/http/yskApi/requestAll.js';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { getConsGrpupList,addCons } from '@/api/cons.js';
|
||||
import { getConsGrpupList,addCons } from '@/http/api/cons.js';
|
||||
|
||||
let datas = reactive({
|
||||
form: {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { getConsGrpupPage,addConsGrpup,editConsGrpup,consGrpupEnable,consGrpupDisable } from '@/api/cons.js';
|
||||
import { getConsGrpupPage,addConsGrpup,editConsGrpup,consGrpupEnable,consGrpupDisable } from '@/http/api/cons.js';
|
||||
|
||||
let datas = reactive({
|
||||
list: [],
|
||||
|
|
@ -88,6 +88,10 @@
|
|||
datas.activeData = d
|
||||
}
|
||||
|
||||
let switchChange = (d) => {
|
||||
datas.status = d
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用/禁用
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance } from 'vue';
|
||||
import { addVendor } from '@/api/vendor.js';
|
||||
import { addVendor } from '@/http/api/vendor.js';
|
||||
|
||||
|
||||
let datas = reactive({
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, watch } from 'vue';
|
||||
import { uploadFile } from '@/api/index.js'
|
||||
import { stockReportDamage } from '@/api/cons.js';
|
||||
import { uploadFile } from '@/http/api/index.js'
|
||||
import { stockReportDamage } from '@/http/api/cons.js';
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive, computed, onMounted } from 'vue';
|
||||
import { editCons } from '@/api/cons.js';
|
||||
import { editCons } from '@/http/api/cons.js';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<script setup>
|
||||
import { ref, reactive, } from 'vue';
|
||||
import { onLoad, } from '@dcloudio/uni-app';
|
||||
import { editVendor } from '@/api/vendor.js';
|
||||
import { editVendor } from '@/http/api/vendor.js';
|
||||
let datas = reactive({
|
||||
form: {},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@
|
|||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view style="background-color: #fff;" @tap="show=true;showData = filtersSproductId(item.product)">
|
||||
<view style="background-color: #fff;" @tap="show=true;showData = filtersSproductId(item.productList)">
|
||||
所属商品:
|
||||
{{ filtersSproductId(item.product).length>7?filtersSproductId(item.product).substring(0,6)+'...':filtersSproductId(item.product)}}
|
||||
{{ filtersSproductId(item.productList).length>7?filtersSproductId(item.productList).substring(0,6)+'...':filtersSproductId(item.productList)}}
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button shape="circle" type="primary" size="mini" color="#999"
|
||||
|
|
@ -56,12 +56,8 @@
|
|||
<view style="font-size: 28rpx;color: #999;">暂无数据</view>
|
||||
</view>
|
||||
<view class="ConsumablesBottom">
|
||||
<view @tap="toUrl('PAGES_ADD_CONSUMABLES')">
|
||||
新增耗材
|
||||
</view>
|
||||
<view @tap="toUrl('PAGES_SUPPLIER')">
|
||||
供应商管理
|
||||
</view>
|
||||
<view @tap="toUrl('PAGES_ADD_CONSUMABLES')"> 新增耗材 </view>
|
||||
<view @tap="toUrl('PAGES_SUPPLIER')"> 供应商管理 </view>
|
||||
</view>
|
||||
<my-action-sheet @itemClick="sheetClick" ref="refMoreSheet" :list="actionSheet.list"></my-action-sheet>
|
||||
<my-reportDamage ref="reportDamage" title="耗材报损" :item="report.data" @affirm="affirm"></my-reportDamage>
|
||||
|
|
@ -88,7 +84,7 @@
|
|||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
import { getConsPage,getConsGrpupList } from '@/api/cons.js';
|
||||
import { getConsPage,getConsGrpupList } from '@/http/api/cons.js';
|
||||
|
||||
let reportDamage = ref(null)
|
||||
let refMoreSheet = ref(null)
|
||||
|
|
@ -138,7 +134,7 @@
|
|||
conName: datas.conName,
|
||||
conTypeId: d,
|
||||
size: 100,
|
||||
page: 0
|
||||
page: 1
|
||||
}).then(res => {
|
||||
datas.list = res.records
|
||||
})
|
||||
|
|
@ -150,7 +146,7 @@
|
|||
let gettbConsTypeList = () => {
|
||||
datas.typeLists = ['全部']
|
||||
getConsGrpupList({
|
||||
page: 0,
|
||||
page: 1,
|
||||
size: 30,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
import {
|
||||
tbConsInfotbConCheck
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import { stockCheck } from '@/api/cons.js';
|
||||
import { stockCheck } from '@/http/api/cons.js';
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@
|
|||
import go from '@/commons/utils/go.js';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { getVendorPage } from '@/api/vendor.js';
|
||||
import { stockOut } from '@/api/cons.js';
|
||||
import { getVendorPage } from '@/http/api/vendor.js';
|
||||
import { stockOut } from '@/http/api/cons.js';
|
||||
|
||||
let showStatus = ref(false)
|
||||
const refs = getCurrentInstance()
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
import { onShow } from '@dcloudio/uni-app';
|
||||
import dayjs from 'dayjs' //时间格式库
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { getVendorPage,delVendor } from '@/api/vendor.js';
|
||||
import { getVendorPage,delVendor } from '@/http/api/vendor.js';
|
||||
|
||||
let datas = reactive({
|
||||
list: []
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@
|
|||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import dayjs from 'dayjs';
|
||||
import { getVendorPage } from '@/api/vendor.js';
|
||||
import { consStockIn } from '@/api/cons.js';
|
||||
import { getVendorPage } from '@/http/api/vendor.js';
|
||||
import { consStockIn } from '@/http/api/cons.js';
|
||||
|
||||
let showStatus = ref(false)
|
||||
let datas = reactive({
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
<script setup>
|
||||
import { reactive,ref,onMounted } from 'vue';
|
||||
import { $tbShopCategory, $tbProductV2 } from "@/http/yskApi/goods.js"
|
||||
import { getProductPage, getCategoryList } from '@/api/product.js'
|
||||
import { getProductPage, getCategoryList } from '@/http/api/product.js'
|
||||
const props=defineProps({
|
||||
show:{
|
||||
type:Boolean,
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
import { reactive, ref } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { addCoupon, updateCoupon } from '@/api/coupon.js'
|
||||
import { addCoupon, updateCoupon } from '@/http/api/coupon.js'
|
||||
const pageData = reactive({
|
||||
value: [
|
||||
{ name: "周一", },
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import selectGoods from './components/select-goods';
|
||||
import { addCoupon, updateCoupon } from '@/api/coupon.js'
|
||||
import { addCoupon, updateCoupon } from '@/http/api/coupon.js'
|
||||
const pageData = reactive({
|
||||
id: null,
|
||||
title: "",
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
import go from '@/commons/utils/go.js'
|
||||
import { getTbShopCoupon , delTbShopCoupon} from '@/http/yskApi/coupon.js'
|
||||
|
||||
import { getCouponList } from '@/api/coupon.js'
|
||||
import { getCouponList } from '@/http/api/coupon.js'
|
||||
|
||||
const pageData = reactive({
|
||||
delShow: false,
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { debounce } from '@/commons/utils/debounce.js'
|
||||
import { addCreditBuyer,editCreditBuyer } from '@/api/buyer.js';
|
||||
import { addCreditBuyer,editCreditBuyer } from '@/http/api/buyer.js';
|
||||
|
||||
const pageData = reactive({
|
||||
id: null,
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
<script setup>
|
||||
import { reactive,ref } from 'vue';
|
||||
import { debounce } from '@/commons/utils/debounce.js'
|
||||
import { getCreditBuyerPage,creditBuyerRepayment,creditBuyerOrderPay } from '@/api/buyer.js';
|
||||
import { getCreditBuyerPage,creditBuyerRepayment,creditBuyerOrderPay } from '@/http/api/buyer.js';
|
||||
|
||||
const props=defineProps({
|
||||
show:{
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
import myRepayment from './components/my-repayment';
|
||||
import datePickerview from './components/my-date-pickerview.vue'
|
||||
import dayjs from 'dayjs' //时间格式库
|
||||
import { creditBuyerOrderList, creditBuyerOrderSummary } from '@/api/buyer.js';
|
||||
import { creditBuyerOrderList, creditBuyerOrderSummary } from '@/http/api/buyer.js';
|
||||
const pageData = reactive({
|
||||
showStatus: false,
|
||||
statusList:[
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
import go from '@/commons/utils/go.js';
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
|
||||
import { getCreditBuyerPage,editCreditBuyer,delCreditBuyer } from '@/api/buyer.js';
|
||||
import { getCreditBuyerPage,editCreditBuyer,delCreditBuyer } from '@/http/api/buyer.js';
|
||||
|
||||
let pageData = reactive({
|
||||
showStatus: false,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
import { reactive, ref } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
|
||||
import { creditRePaymentRecord } from '@/api/buyer.js';
|
||||
import { creditRePaymentRecord } from '@/http/api/buyer.js';
|
||||
const pageData = reactive({
|
||||
query: {
|
||||
page: 1,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, watch, onMounted,reactive } from 'vue';
|
||||
import { categoryPage } from '@/api/cateGory.js'
|
||||
import { categoryPage } from '@/http/api/cateGory.js'
|
||||
const emite=defineEmits(['change','update:isShow','confirm'])
|
||||
const props = defineProps({
|
||||
isShow:{
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@
|
|||
import myCategory from './components/category.vue'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
|
||||
import { categoryPage } from '@/api/cateGory.js'
|
||||
import { getProductPage,getProdGroupDetail,updateProdGroup } from '@/api/product.js'
|
||||
import { categoryPage } from '@/http/api/cateGory.js'
|
||||
import { getProductPage,getProdGroupDetail,updateProdGroup } from '@/http/api/product.js'
|
||||
|
||||
const pageData = reactive({
|
||||
stateCurrent: 0,
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
tbProductGroupPost
|
||||
} from '@/http/yskApi/shop.js'
|
||||
|
||||
import { addProdGroup, updateProdGroup } from '@/api/product.js'
|
||||
import { addProdGroup, updateProdGroup } from '@/http/api/product.js'
|
||||
|
||||
const $productCategory = {
|
||||
add: tbProductGroupPost,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
import editSort from './components/edit-sort.vue';
|
||||
import editName from './components/edit-name.vue';
|
||||
import editTime from './components/edit-time.vue';
|
||||
import { getProdGroupPage, addProdGroup, updateProdGroup, delProdGroup } from '@/api/product.js'
|
||||
import { getProdGroupPage, addProdGroup, updateProdGroup, delProdGroup } from '@/http/api/product.js'
|
||||
|
||||
const pageData = reactive({
|
||||
showGoodsDetail: false,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<script setup>
|
||||
import { onMounted, reactive } from 'vue';
|
||||
|
||||
import { getCallRecord } from '@/api/callTable.js'
|
||||
import { getCallRecord } from '@/http/api/callTable.js'
|
||||
let datas = reactive({
|
||||
list: ""
|
||||
})
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
import { reactive, getCurrentInstance, onMounted } from 'vue';
|
||||
import go from '@/commons/utils/go.js'
|
||||
|
||||
import { getCallTableQueue, getCallTable, callTableTakeNumber, callTableCall, updateCallTableState } from '@/api/callTable.js'
|
||||
import { getCallTableQueue, getCallTable, callTableTakeNumber, callTableCall, updateCallTableState } from '@/http/api/callTable.js'
|
||||
|
||||
let getrefs = getCurrentInstance()
|
||||
let datas = reactive({
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@
|
|||
import myRadioGroup from './components/my-radio-group.vue';
|
||||
|
||||
import { devices, subTypes, brand, receipts,connectionType } from '@/pagePrinter/devices.js'
|
||||
import { getPrinterDetail, addPrinter, updatePrinter } from '@/api/printer.js'
|
||||
import { categoryPage } from '@/api/cateGory.js'
|
||||
import { getPrinterDetail, addPrinter, updatePrinter } from '@/http/api/printer.js'
|
||||
import { categoryPage } from '@/http/api/cateGory.js'
|
||||
|
||||
const pageData = reactive({
|
||||
brandList: brand, // 打印机品牌列表
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
import go from '@/commons/utils/go.js'
|
||||
|
||||
import myModel from '@/components/my-components/my-model.vue'
|
||||
import { updatePrinter, delPrinter } from '@/api/printer.js'
|
||||
import { updatePrinter, delPrinter } from '@/http/api/printer.js'
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { reactive } from 'vue';
|
||||
import printerItem from './components/printer-item.vue';
|
||||
import { getPrinter } from '@/api/printer.js'
|
||||
import { getPrinter } from '@/http/api/printer.js'
|
||||
|
||||
const pageData = reactive({
|
||||
list: [],
|
||||
|
|
|
|||
|
|
@ -468,10 +468,10 @@
|
|||
updateProduct,
|
||||
delProduct,
|
||||
productBindCons
|
||||
} from '@/api/product.js'
|
||||
} from '@/http/api/product.js'
|
||||
import {
|
||||
uploadFile
|
||||
} from '@/api/index.js'
|
||||
} from '@/http/api/index.js'
|
||||
|
||||
const imageStyles = reactive({
|
||||
width: 82,
|
||||
|
|
@ -847,8 +847,9 @@
|
|||
FormData.proGroupVo.push({
|
||||
title: '',
|
||||
count: 1,
|
||||
goods: []
|
||||
goods: [],
|
||||
})
|
||||
console.log(FormData.proGroupVo)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1064,9 +1065,6 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let selectSpecInfo = $goodsData.selectSpecInfo
|
||||
if (FormData.specificationsGroup.specAllList) {
|
||||
selectSpecInfo = {}
|
||||
|
|
@ -1123,7 +1121,7 @@
|
|||
// 可选套餐
|
||||
} else {
|
||||
FormData.proGroupVo[0].count = FormData.proGroupVo[0].goods.length
|
||||
FormData.proGroupVo[0].number = null
|
||||
FormData.proGroupVo[0].number = 1
|
||||
}
|
||||
}
|
||||
if (type == 'weight') {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive, onMounted, ref, watch, computed } from 'vue';
|
||||
import { getProductPage} from '@/api/product.js';
|
||||
import { getProductPage} from '@/http/api/product.js';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@
|
|||
import chooseDanwei from './choose-danwei.vue';
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
|
||||
import { getConsList } from '@/api/cons.js';
|
||||
import { productBindCons } from '@/api/product.js';
|
||||
import { getConsList } from '@/http/api/cons.js';
|
||||
import { productBindCons } from '@/http/api/product.js';
|
||||
|
||||
const emits = defineEmits(['cancel', 'updateGoods'])
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
import { computed, ref } from 'vue';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import color from '@/commons/color.js'
|
||||
import { getProductDetail } from '@/api/product.js'
|
||||
import { getProductDetail } from '@/http/api/product.js'
|
||||
|
||||
|
||||
const cycle = [{
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import { reactive, nextTick, ref, } from 'vue';
|
||||
import { addSpecQuic } from '@/api/product.js'
|
||||
import { addSpecQuic } from '@/http/api/product.js'
|
||||
|
||||
const nameFormRef = ref(null)
|
||||
// 表单样式
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
import { $defaultSku } from '@/commons/goodsData.js'
|
||||
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
import { getSpecList,delSpec } from '@/api/product.js'
|
||||
import { getSpecList,delSpec } from '@/http/api/product.js'
|
||||
|
||||
|
||||
//上个页面传来的参数
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
import { reactive, ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import { updateSpec } from '@/api/product.js'
|
||||
import { updateSpec } from '@/http/api/product.js'
|
||||
|
||||
const option = {
|
||||
type: 'add',
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<script setup>
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { productReportDamage } from '@/api/product.js'
|
||||
import { productReportDamage } from '@/http/api/product.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
|
||||
const props = defineProps({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<script setup>
|
||||
import { ref, watch,onMounted,reactive } from 'vue';
|
||||
import { getCategoryList } from '@/api/product.js'
|
||||
import { getCategoryList } from '@/http/api/product.js'
|
||||
const emite=defineEmits(['change','update:isShow','confirm'])
|
||||
const props = defineProps({
|
||||
showAllText:{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
|
||||
import { productOnOff,productMarkIsSoldOut } from '@/api/product.js'
|
||||
import { productOnOff,productMarkIsSoldOut } from '@/http/api/product.js'
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { updateProduct,productOnOff,productMarkIsSoldOut } from '@/api/product.js'
|
||||
import { updateProduct,productOnOff,productMarkIsSoldOut } from '@/http/api/product.js'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js';
|
||||
import { ColorMain } from '@/commons/color.js'
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
getProductPage,
|
||||
getCategoryList,
|
||||
updateProduct
|
||||
} from '@/api/product.js'
|
||||
} from '@/http/api/product.js'
|
||||
|
||||
import {
|
||||
returnAllCategory
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
import go from '@/commons/utils/go.js';
|
||||
import myButton from '@/components/my-components/my-button.vue'
|
||||
import treeItem from './components/tree-item.vue'
|
||||
import { getSpecList,delSpec } from '@/api/product.js'
|
||||
import { getSpecList,delSpec } from '@/http/api/product.js'
|
||||
|
||||
const pageData = reactive({
|
||||
loading: true,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
import datePickerview from './components/my-date-pickerview.vue'
|
||||
import dayjs from 'dayjs' //时间格式库
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { getTrade, productSaleDate } from '@/api/summary.js'
|
||||
import { getTrade, productSaleDate } from '@/http/api/summary.js'
|
||||
|
||||
const timeList = [{
|
||||
label: '今天',
|
||||
|
|
@ -150,8 +150,8 @@
|
|||
endTime = e + ' 23:59:59'
|
||||
}
|
||||
getTrade({
|
||||
beginTime: startTime,
|
||||
endTime: endTime,
|
||||
beginDate: startTime,
|
||||
endDate: endTime,
|
||||
}).then((res) => {
|
||||
list.value = res
|
||||
})
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { productSaleDate } from '@/api/summary.js'
|
||||
import { productSaleDate } from '@/http/api/summary.js'
|
||||
|
||||
let tableList = ref([])
|
||||
let props = defineProps({
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@
|
|||
import { onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
|
||||
import { shopStaffDetail,getShopStaffPermission,shopStaffAdd,shopStaffPut } from "@/api/staff.js"
|
||||
import { getShopPermission } from "@/api/index.js"
|
||||
import { getRoleList } from "@/api/role.js"
|
||||
import { shopStaffDetail,getShopStaffPermission,shopStaffAdd,shopStaffPut } from "@/http/api/staff.js"
|
||||
import { getShopPermission } from "@/http/api/index.js"
|
||||
import { getRoleList } from "@/http/api/role.js"
|
||||
const currentInstance = getCurrentInstance()
|
||||
const props = defineProps({
|
||||
type: {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
import { reactive, ref, watch, onMounted } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { shopStaffList,shopStaffDel,shopStaffPut } from "@/api/staff.js"
|
||||
import { shopStaffList,shopStaffDel,shopStaffPut } from "@/http/api/staff.js"
|
||||
|
||||
let pageData = reactive({
|
||||
show: false,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<view class="item u-p-20" :class="{sel:pageData.area.sel===item.id}" @tap="changeAreaSel(item)"
|
||||
v-for="(item,index) in pageData.area.list" :key="index">
|
||||
<view class="box">
|
||||
<view>{{item.name}}</view>
|
||||
<view class='up-line-1'>{{item.name}}</view>
|
||||
<view class="u-m-t-10">0/12</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -95,8 +95,8 @@
|
|||
import * as $fun from './util.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import { getShopTable, shopTableBind, shopTableClear } from '@/api/table.js'
|
||||
import { getShopArea } from '@/api/area.js'
|
||||
import { getShopTable, shopTableBind, shopTableClear } from '@/http/api/table.js'
|
||||
import { getShopArea } from '@/http/api/area.js'
|
||||
|
||||
const statusList = objToArrary($status)
|
||||
console.log(statusList)
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
import go from '@/commons/utils/go.js';
|
||||
import mySwitch from '@/components/my-components/my-switch.vue'
|
||||
import myButton from '@/components/my-components/my-button.vue'
|
||||
import { shopUserAdd, shopUserPut } from '@/api/shopUser.js';
|
||||
import { shopUserAdd, shopUserPut } from '@/http/api/shopUser.js';
|
||||
|
||||
// 表单样式
|
||||
const placeholderStyle = ref('font-size:28rpx;')
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@
|
|||
import go from '@/commons/utils/go.js';
|
||||
import myUser from './components/user.vue'
|
||||
|
||||
import { shopUserSummary, shopUserList,shopUserMoney } from '@/api/shopUser.js'
|
||||
import { shopUserSummary, shopUserList,shopUserMoney } from '@/http/api/shopUser.js'
|
||||
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { midfiyAccount } from '@/http/yskApi/requestAll.js';
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
import { timeFormat } from '@/node_modules/uview-plus';
|
||||
import go from '@/commons/utils/go.js'
|
||||
|
||||
import { getHandoverRecord } from '@/api/handover.js'
|
||||
import { getHandoverRecord } from '@/http/api/handover.js'
|
||||
|
||||
const pageData = reactive({
|
||||
time: {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
import dayjs from 'dayjs' //时间格式库
|
||||
import datePickerview from './my-date-pickerview.vue'
|
||||
|
||||
import { getTrade } from '@/api/summary.js'
|
||||
import { getTrade } from '@/http/api/summary.js'
|
||||
|
||||
let selected = ref('today')
|
||||
let showAll = ref(false);
|
||||
|
|
@ -120,8 +120,8 @@
|
|||
endTime = e + ' 23:59:59'
|
||||
}
|
||||
getTrade({
|
||||
beginTime: startTime,
|
||||
endTime: endTime,
|
||||
beginDate: startTime,
|
||||
endDate: endTime,
|
||||
}).then((res) => {
|
||||
$list = res.sale.payCount
|
||||
setList()
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@
|
|||
$phoneCodeLogin,
|
||||
$sendSms
|
||||
} from '@/http/apiManager.js';
|
||||
import { login, authCaptcha } from '@/api/login.js';
|
||||
import { login, authCaptcha } from '@/http/api/login.js';
|
||||
import storageManage from '@/commons/utils/storageManage.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js';
|
||||
import go from '@/commons/utils/go.js'
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@
|
|||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { uploadFile } from '@/api/index.js'
|
||||
import { getShopInfo, editShopInfo, getShopExtend, editShopExtend } from '@/api/shop.js'
|
||||
import { uploadFile } from '@/http/api/index.js'
|
||||
import { getShopInfo, editShopInfo, getShopExtend, editShopExtend } from '@/http/api/shop.js'
|
||||
|
||||
const vdata = reactive({
|
||||
shopInfo: {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@
|
|||
<script setup>
|
||||
import { reactive, onMounted, ref, onBeforeMount } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { getCategoryList, getProdUnitList } from '@/api/product.js'
|
||||
import { getCategoryList, getProdUnitList } from '@/http/api/product.js'
|
||||
import { inject } from 'vue';
|
||||
|
||||
const websocketUtil = inject('websocketUtil'); // 注入 WebSocket 工具类实例
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@
|
|||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { $status } from '@/commons/table-status.js'
|
||||
|
||||
import { getShopTable } from '@/api/table.js'
|
||||
import { getShopArea} from '@/api/area.js'
|
||||
import { getShopTable } from '@/http/api/table.js'
|
||||
import { getShopArea} from '@/http/api/area.js'
|
||||
|
||||
let nouser = ref(false)
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { reactive, onBeforeMount, ref } from 'vue';
|
||||
import { shopUserList } from '@/api/shopUser.js';
|
||||
import { shopUserList } from '@/http/api/shopUser.js';
|
||||
|
||||
let nouser = ref(false)
|
||||
let timer = null
|
||||
|
|
|
|||
|
|
@ -300,10 +300,10 @@
|
|||
import $storageManage from '@/commons/utils/storageManage.js'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import { getNowCart } from '@/pagesCreateOrder/util.js'
|
||||
import { getShopInfo } from '@/api/shop.js'
|
||||
import { getShopTableDetail } from '@/api/table.js'
|
||||
import { getProductPage } from '@/api/product.js'
|
||||
import { createOrder,getHistoryOrder } from '@/api/order.js'
|
||||
import { getShopInfo } from '@/http/api/shop.js'
|
||||
import { getShopTableDetail } from '@/http/api/table.js'
|
||||
import { getProductPage } from '@/http/api/product.js'
|
||||
import { createOrder,getHistoryOrder } from '@/http/api/order.js'
|
||||
import { number } from 'uview-plus/libs/function/test';
|
||||
|
||||
const models = new Map();
|
||||
|
|
@ -414,7 +414,7 @@
|
|||
const $packFee = computed(() => {
|
||||
console.log("打包费===",goods.list)
|
||||
return goods.list.reduce((prve, cur) => {
|
||||
return prve + (cur.packFee*parseFloat(cur.pack_number).toFixed(0))
|
||||
return prve + ((cur.packFee||0)*parseFloat(cur.pack_number).toFixed(0))
|
||||
}, 0).toFixed(2)
|
||||
})
|
||||
|
||||
|
|
@ -486,6 +486,7 @@
|
|||
/**
|
||||
* socket消息监听
|
||||
*/
|
||||
websocketUtil.offMessage()
|
||||
websocketUtil.onMessage(res => {
|
||||
let msg = JSON.parse(res);
|
||||
let cartItem;
|
||||
|
|
@ -505,7 +506,11 @@
|
|||
goods.list = []
|
||||
msg.data.map(item=>{
|
||||
cartItem = getNowCart(item,$goods,pageData.user)
|
||||
cartControls(cartItem,'add')
|
||||
if( cartItem.isGrounding||cartItem.is_temporary == 1 ){
|
||||
cartControls(cartItem,'add')
|
||||
} else {
|
||||
delCart(cartItem.id)
|
||||
}
|
||||
})
|
||||
break;
|
||||
case 'onboc_add':
|
||||
|
|
@ -515,8 +520,7 @@
|
|||
break;
|
||||
case 'onboc_edit':
|
||||
case 'edit':
|
||||
cartItem = getNowCart(msg.data,$goods,pageData.user)
|
||||
cartControls(cartItem,'edit')
|
||||
getCart()
|
||||
break;
|
||||
case 'onboc_del':
|
||||
case 'del':
|
||||
|
|
@ -533,6 +537,23 @@
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 删除购物车菜品
|
||||
*/
|
||||
function delCart (cartItem) {
|
||||
let params = {
|
||||
type:'onboc',
|
||||
account: uni.getStorageSync("iToken").loginId,
|
||||
shop_id: uni.getStorageSync("shopInfo").id,
|
||||
is_gift: 0,
|
||||
id: cartItem.id,
|
||||
operate_type:'del',
|
||||
table_code: cartItem.table_code,
|
||||
}
|
||||
websocketUtil.send(JSON.stringify(params))
|
||||
}
|
||||
|
||||
/**
|
||||
* socket通知购物车商品数量修改处理
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
$table,
|
||||
tableswitch
|
||||
} from '@/http/yskApi/table.js'
|
||||
import { getShopTable } from '@/api/table.js'
|
||||
import { getShopTable } from '@/http/api/table.js'
|
||||
let datas = reactive({
|
||||
current: 0,
|
||||
item: "",
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
<up-image :src="data.coverImg" mode="aspectFill" :width="img.width" :height="img.height"></up-image>
|
||||
<view class="info u-flex u-row-between u-col-top u-flex-col">
|
||||
<view>
|
||||
<view>
|
||||
<text class="u-line-2">{{data.name}}</text>
|
||||
<view >
|
||||
<view >
|
||||
<text class="up-line-1">{{data.name}}</text>
|
||||
</view>
|
||||
<view class="u-font-32 font-bold u-m-t-16">
|
||||
¥{{data.lowPrice}}
|
||||
|
|
|
|||
|
|
@ -138,11 +138,11 @@
|
|||
|
||||
import appConfig from '@/config/appConfig.js';
|
||||
import WebsocketUtil from '@/commons/utils/websocket.js'
|
||||
import { getShopTable,getShopTableDetail } from '@/api/table.js'
|
||||
import { getProductList } from '@/api/product.js'
|
||||
import { categoryPage } from '@/api/cateGory.js'
|
||||
import { getShopTable,getShopTableDetail } from '@/http/api/table.js'
|
||||
import { getProductList } from '@/http/api/product.js'
|
||||
import { categoryPage } from '@/http/api/cateGory.js'
|
||||
import { inject } from 'vue';
|
||||
import { getShopInfo } from '@/api/shop.js'
|
||||
import { getShopInfo } from '@/http/api/shop.js'
|
||||
|
||||
|
||||
const modal = reactive({
|
||||
|
|
@ -204,7 +204,7 @@
|
|||
let option = {
|
||||
type: ''
|
||||
}
|
||||
|
||||
const websocketUtil = inject('websocketUtil'); // 注入 WebSocket 工具类实例
|
||||
onLoad((opt) => {
|
||||
option = opt
|
||||
console.log("opt===",opt)
|
||||
|
|
@ -233,7 +233,10 @@
|
|||
// watchChooseuser()
|
||||
watchChooseTable()
|
||||
watchUpdate()
|
||||
|
||||
data.isGoodsAdd = true;
|
||||
nextTick(()=>{
|
||||
onMessage()
|
||||
})
|
||||
})
|
||||
onReady(() => {
|
||||
getElRect('list-tight-top').then(res => {
|
||||
|
|
@ -297,85 +300,104 @@
|
|||
initCart()
|
||||
}
|
||||
|
||||
const websocketUtil = inject('websocketUtil'); // 注入 WebSocket 工具类实例
|
||||
/**
|
||||
* socket消息监听
|
||||
*/
|
||||
websocketUtil.onMessage(res => {
|
||||
let msg = JSON.parse(res);
|
||||
let cartItem;
|
||||
let cartArr = [];
|
||||
console.log(msg)
|
||||
if( msg.msg_id ){
|
||||
websocketUtil.send(JSON.stringify({
|
||||
type: 'receipt',
|
||||
msg_id: msg.msg_id,
|
||||
}))
|
||||
}
|
||||
if( msg.status == 0 ){
|
||||
infoBox.showToast('添加失败')
|
||||
data.isGoodsAdd = true;
|
||||
return;
|
||||
}
|
||||
if ( msg.data ) {
|
||||
cartArr = data.tabbar.reduce((prve,cur)=>{
|
||||
prve = [...prve,...cur.foods]
|
||||
return prve
|
||||
},[])
|
||||
}
|
||||
|
||||
switch (msg.operate_type) {
|
||||
case 'onboc_init':
|
||||
cars.length = 0
|
||||
function onMessage (){
|
||||
websocketUtil.offMessage()
|
||||
websocketUtil.onMessage(async res => {
|
||||
let msg = JSON.parse(res);
|
||||
let cartItem;
|
||||
let cartArr = [];
|
||||
console.log("onMessage===",msg)
|
||||
if( msg.msg == "收到了"){
|
||||
data.isCars = true;
|
||||
console.log("购物车信息onboc_init===",msg)
|
||||
if( !data.table.tableCode ){
|
||||
data.table.tableCode = msg.table_code
|
||||
uni.setStorageSync("table_code",msg.table_code)
|
||||
}
|
||||
msg.data.map(item=>{
|
||||
cartItem = getNowCart(item,cartArr)
|
||||
cartControls(cartItem,'add')
|
||||
})
|
||||
|
||||
uni.hideLoading()
|
||||
break;
|
||||
case 'onboc_add':
|
||||
case 'add':
|
||||
cartItem = getNowCart(msg.data,cartArr)
|
||||
cartControls(cartItem,'add')
|
||||
infoBox.showToast('操作成功')
|
||||
break;
|
||||
case 'onboc_edit':
|
||||
case 'edit':
|
||||
cartItem = getNowCart(msg.data,cartArr)
|
||||
cartControls(cartItem,'edit')
|
||||
infoBox.showToast('操作成功')
|
||||
break;
|
||||
case 'onboc_del':
|
||||
case 'del':
|
||||
cartItem = getNowCart(msg.data,cartArr)
|
||||
cartControls(cartItem,'del')
|
||||
break;
|
||||
case 'onboc_cleanup':
|
||||
case 'cleanup':
|
||||
cars.length = 0
|
||||
for (let i in data.tabbar) {
|
||||
for (let k in data.tabbar[i].foods) {
|
||||
data.tabbar[i].foods[k].chooseNumber = 0
|
||||
// initCart()
|
||||
}
|
||||
if( msg.msg_id ){
|
||||
websocketUtil.send(JSON.stringify({
|
||||
type: 'receipt',
|
||||
msg_id: msg.msg_id,
|
||||
}))
|
||||
}
|
||||
if( msg.status == 0 ){
|
||||
infoBox.showToast('添加失败')
|
||||
data.isGoodsAdd = true;
|
||||
return;
|
||||
}
|
||||
if ( msg.data ) {
|
||||
cartArr = data.tabbar.reduce((prve,cur)=>{
|
||||
prve = [...prve,...cur.foods]
|
||||
return prve
|
||||
},[])
|
||||
}
|
||||
|
||||
switch (msg.operate_type) {
|
||||
case 'onboc_init':
|
||||
cars.length = 0
|
||||
data.isCars = true;
|
||||
console.log("购物车信息onboc_init===",msg)
|
||||
if( !data.table.tableCode ){
|
||||
data.table.tableCode = msg.table_code
|
||||
uni.setStorageSync("table_code",msg.table_code)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'init':
|
||||
case 'rottable':
|
||||
initCart()
|
||||
break;
|
||||
case 'product_update':
|
||||
init()
|
||||
break;
|
||||
}
|
||||
|
||||
});
|
||||
console.log("cartArr===",cartArr)
|
||||
msg.data.map(item=>{
|
||||
cartItem = getNowCart(item,cartArr)
|
||||
console.log("cartItem===",cartItem)
|
||||
if( cartItem.isGrounding||cartItem.is_temporary == 1 ){
|
||||
cartControls(cartItem,'add')
|
||||
} else {
|
||||
delCart(cartItem.id)
|
||||
}
|
||||
})
|
||||
uni.hideLoading()
|
||||
break;
|
||||
case 'onboc_add':
|
||||
case 'add':
|
||||
cartItem = getNowCart(msg.data,cartArr)
|
||||
cartControls(cartItem,'add')
|
||||
infoBox.showToast('操作成功')
|
||||
break;
|
||||
case 'onboc_edit':
|
||||
case 'edit':
|
||||
cartItem = getNowCart(msg.data,cartArr)
|
||||
cartControls(cartItem,'edit')
|
||||
infoBox.showToast('操作成功')
|
||||
break;
|
||||
case 'onboc_del':
|
||||
case 'del':
|
||||
cartItem = getNowCart(msg.data,cartArr)
|
||||
cartControls(cartItem,'del')
|
||||
break;
|
||||
case 'onboc_cleanup':
|
||||
case 'cleanup':
|
||||
cars.length = 0
|
||||
for (let i in data.tabbar) {
|
||||
for (let k in data.tabbar[i].foods) {
|
||||
data.tabbar[i].foods[k].chooseNumber = 0
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'init':
|
||||
case 'rottable':
|
||||
if( data.table.tableCode == msg.data.new_table_code){
|
||||
initCart()
|
||||
} else {
|
||||
data.table.tableCode = msg.data.new_table_code
|
||||
let resData = await getShopTableDetail({tableCode:msg.data.new_table_code})
|
||||
data.table = resData
|
||||
initCart()
|
||||
}
|
||||
break;
|
||||
case 'product_update':
|
||||
init()
|
||||
break;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -387,6 +409,7 @@
|
|||
operate_type:'init',
|
||||
table_code: data.table.tableCode,
|
||||
}
|
||||
console.log("购物车初始化参数===",params)
|
||||
websocketUtil.send(JSON.stringify(params))
|
||||
|
||||
|
||||
|
|
@ -397,8 +420,6 @@
|
|||
* 购物车添加菜品
|
||||
*/
|
||||
function editCart (par,operate_type) {
|
||||
console.log('购物车添加菜品',par)
|
||||
console.log("data.table==",data.table)
|
||||
if( !data.isGoodsAdd ){ return; }
|
||||
let params = {
|
||||
...data.socketData,
|
||||
|
|
@ -410,6 +431,7 @@
|
|||
is_temporary: 0, //是否是临时菜
|
||||
}
|
||||
Object.assign(params, par)
|
||||
console.log('购物车添加菜品参数===',params)
|
||||
websocketUtil.send(JSON.stringify(params))
|
||||
data.isGoodsAdd = false;
|
||||
}
|
||||
|
|
@ -424,6 +446,7 @@
|
|||
operate_type:'del',
|
||||
table_code: data.table.tableCode,
|
||||
}
|
||||
console.log('购物车删除菜品参数===',params)
|
||||
websocketUtil.send(JSON.stringify(params))
|
||||
}
|
||||
|
||||
|
|
@ -436,6 +459,7 @@
|
|||
operate_type:'cleanup',
|
||||
table_code: data.table.tableCode,
|
||||
}
|
||||
console.log('购物车清空菜品参数===',params)
|
||||
websocketUtil.send(JSON.stringify(params))
|
||||
}
|
||||
|
||||
|
|
@ -550,7 +574,7 @@
|
|||
// })
|
||||
// }
|
||||
if( !data.isCars ){
|
||||
return infoBox.showToast('购物车加载中请稍等...')
|
||||
return infoBox.showToast('购物车加载失败请刷新重试...')
|
||||
}
|
||||
if( !data.isGoodsAdd ){ return; }
|
||||
let $goods = data.tabbar[index].foods[foodsindex]
|
||||
|
|
@ -633,6 +657,7 @@
|
|||
$goods = product_id < 0 ? {} : tabbarItem.foods.find(v => v.id == product_id)
|
||||
}
|
||||
})
|
||||
|
||||
if( type == 'del' ) {
|
||||
cars.splice(cartIndex, 1)
|
||||
if($goods)$goods.chooseNumber = 0;
|
||||
|
|
@ -725,7 +750,7 @@
|
|||
// })
|
||||
// }
|
||||
if( !data.isCars ){
|
||||
return infoBox.showToast('购物车加载中请稍等...')
|
||||
return infoBox.showToast('购物车加载失败请刷新重试...')
|
||||
}
|
||||
const $goods = data.tabbar[index].foods[foodsindex]
|
||||
console.log($goods)
|
||||
|
|
@ -1109,7 +1134,7 @@
|
|||
const refweighitem = ref(null)
|
||||
const tapweigh = (foodsindex, index) => {
|
||||
if( !data.isCars ){
|
||||
return infoBox.showToast('购物车加载中请稍等...')
|
||||
return infoBox.showToast('购物车加载失败请刷新重试...')
|
||||
}
|
||||
const goods = data.tabbar[index].foods[foodsindex]
|
||||
refweighitem.value.open(foodsindex, index, goods)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ export function getNowCart(carItem,goodsList,user) {
|
|||
// const nowCart = records.find(v => v.placeNum == 0)
|
||||
const arr = []
|
||||
if( carItem.is_temporary != 1 ){
|
||||
carItem.isGrounding = false;
|
||||
goodsList.map(goodsItem => {
|
||||
if(carItem.product_id == goodsItem.id){
|
||||
goodsItem.skuList.map(item=>{
|
||||
|
|
@ -24,9 +25,10 @@ export function getNowCart(carItem,goodsList,user) {
|
|||
carItem.name = goodsItem.name
|
||||
carItem.coverImg = goodsItem.coverImg
|
||||
carItem.packFee = goodsItem.packFee
|
||||
carItem.isGrounding = true;
|
||||
}
|
||||
carItem.number = parseFloat(carItem.number)
|
||||
})
|
||||
carItem.number = parseFloat(carItem.number)
|
||||
} else {
|
||||
// 临时菜
|
||||
carItem.number = parseFloat(carItem.number)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { reactive, onBeforeMount, ref } from 'vue';
|
||||
import { getCreditBuyerPage } from '@/api/buyer.js';
|
||||
import { getCreditBuyerPage } from '@/http/api/buyer.js';
|
||||
|
||||
let nouser = ref(false)
|
||||
let timer = null
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
</view>
|
||||
<view class="u-m-r-20 u-font-24 u-flex" v-if="item.returnAmount">
|
||||
<view class="color-666">退款金额:</view>
|
||||
<view class="color-999 u-m-l-6">{{item.returnAmount*item.refundNum}}</view>
|
||||
<view class="color-999 u-m-l-6">{{item.unitPrice*item.refundNum}}</view>
|
||||
</view>
|
||||
<view class="u-m-r-20 u-font-24 u-flex" v-if="item.returnNum">
|
||||
<view class="color-666">退菜数量:</view>
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
</view>
|
||||
<view class="u-text-right u-m-t-28">
|
||||
<template v-if="item.refundNum>0">
|
||||
<view>¥{{(returnTotalMoney(item)-item.refundNum*item.returnAmount).toFixed(2)}}</view>
|
||||
<view>¥{{(returnTotalMoney(item)-item.refundNum*item.unitPrice).toFixed(2)}}</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}</view>
|
||||
</template>
|
||||
<template v-else-if="item.userCouponId">
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
<template v-if="orderInfo.status=='unpaid'">
|
||||
<view>
|
||||
<text>总计¥</text>
|
||||
<text class="font-bold u-font-32">{{orderInfo.orderAmount.toFixed(2)}}</text>
|
||||
<text class="font-bold u-font-32">{{orderInfo.originAmount.toFixed(2)}}</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
|
|
@ -523,7 +523,7 @@
|
|||
return props.orderInfo.productCouponDiscountAmount
|
||||
}
|
||||
const goodsPrice = props.data.reduce((a, b) => {
|
||||
const curTotal = b.info.filter(v => v.gift != true && v.userCouponId).reduce((prve,
|
||||
const curTotal = b.info.filter(v => !v.isGift && v.userCouponId).reduce((prve,
|
||||
cur) => {
|
||||
const isVip = props.user.isVip && cur.isMember
|
||||
const memberPrice = cur.memberPrice ? cur.memberPrice : cur.price
|
||||
|
|
@ -540,6 +540,7 @@
|
|||
* 已优惠金额
|
||||
*/
|
||||
const youhuiAllPrice = computed(() => {
|
||||
console.log(productCoupPrice)
|
||||
const n = props.orderInfo.originAmount - props.orderInfo.orderAmount + vipDiscountPrice.value * 1
|
||||
return (n < 0 ? 0 : n).toFixed(2)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@
|
|||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
|
||||
import OrderDetail from './page.js'
|
||||
import { getHistoryOrder, refundOrder,getOrderById,printOrder } from '@/api/order.js'
|
||||
import { shopStaffDetail } from '@/api/staff.js'
|
||||
import { shopUserDetail } from '@/api/shopUser.js'
|
||||
import { getShopInfo } from '@/api/shop.js'
|
||||
import { getHistoryOrder, refundOrder,getOrderById,printOrder } from '@/http/api/order.js'
|
||||
import { shopStaffDetail } from '@/http/api/staff.js'
|
||||
import { shopUserDetail } from '@/http/api/shopUser.js'
|
||||
import { getShopInfo } from '@/http/api/shop.js'
|
||||
|
||||
const tuicai = reactive({
|
||||
show: false,
|
||||
|
|
@ -100,6 +100,7 @@
|
|||
function getShopInfoData () {
|
||||
getShopInfo({id:uni.getStorageSync('shopInfo').id}).then(res=>{
|
||||
pageData.shopInfo = res;
|
||||
uni.setStorageSync('shopInfo',res)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<order-list @printOrder="onPrintOrder" :list="pageData.list"></order-list>
|
||||
<template v-if="pageData.list.length>0">
|
||||
<my-pagination @change="pageChange" :totalElements="pageData.total"></my-pagination>
|
||||
<my-pagination :page="pageData.query.page" @change="pageChange" :totalElements="pageData.total"></my-pagination>
|
||||
</template>
|
||||
<view style="height: 100rpx;"></view>
|
||||
</view>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
import orderList from './compoents/order-list.vue';
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import {getTodayTimestamps} from '@/commons/utils/dayjs-time.js';
|
||||
import { getOrderList,printOrder } from '@/api/order.js'
|
||||
import { getOrderList,printOrder } from '@/http/api/order.js'
|
||||
|
||||
const search = reactive({
|
||||
placeholder: '搜索单号/商品名称',
|
||||
|
|
|
|||
|
|
@ -252,12 +252,12 @@
|
|||
returnProductCanUseNum
|
||||
} from '../quan_util.js'
|
||||
|
||||
import { getCouponList } from '@/api/coupon.js'
|
||||
import { getHistoryOrder } from '@/api/order.js'
|
||||
import { getPayTypeList } from '@/api/payType.js'
|
||||
import { scanPay,microPay,cashPay,vipPay,creditPay,getOrderPayUrl } from '@/api/pay.js'
|
||||
import { shopUserDetail } from '@/api/shopUser.js'
|
||||
import { calcUsablePoints,calcDeductionAmount,payedDeductPoints,consumeAwardPoints } from '@/api/points.js'
|
||||
import { getCouponList } from '@/http/api/coupon.js'
|
||||
import { getHistoryOrder } from '@/http/api/order.js'
|
||||
import { getPayTypeList } from '@/http/api/payType.js'
|
||||
import { scanPay,microPay,cashPay,vipPay,creditPay,getOrderPayUrl } from '@/http/api/pay.js'
|
||||
import { shopUserDetail } from '@/http/api/shopUser.js'
|
||||
import { calcUsablePoints,calcDeductionAmount,payedDeductPoints,consumeAwardPoints } from '@/http/api/points.js'
|
||||
|
||||
|
||||
const modal = reactive({
|
||||
|
|
@ -405,7 +405,7 @@
|
|||
let goodsPrice = pageData.goodsList.filter(v => v.price != 0 && v.status !== "return").reduce((a, b) => {
|
||||
return a + (b.num * b.price)
|
||||
}, 0)
|
||||
return (goodsPrice + (pageData.seatNum||0) + packAmount.value).toFixed(2)
|
||||
return (goodsPrice + (pageData.seatNum*uni.getStorageSync("shopInfo").tableFee||0) + packAmount.value).toFixed(2)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -626,7 +626,6 @@
|
|||
coup.number)
|
||||
const number = Math.min($goodsPayPriceMap[coup.proId].length, coupUseNum)
|
||||
coup.number = number
|
||||
console.log($goodsPayPriceMap[coup.proId]);
|
||||
const findGoods = order.detailList.find(v => v.productId == coup.proId)
|
||||
const isMember = findGoods.isMember
|
||||
coup.discountAmount = returnProductCoupAllPrice($goodsPayPriceMap[coup.proId],
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue