优化权限
This commit is contained in:
@@ -5,10 +5,10 @@ ENV = development
|
|||||||
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
|
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
|
||||||
|
|
||||||
# 正式ws
|
# 正式ws
|
||||||
# VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
|
VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
|
||||||
|
|
||||||
# 本地ws
|
# 本地ws
|
||||||
VITE_API_WSS = 'ws://192.168.1.31:2348'
|
# VITE_API_WSS = 'ws://192.168.1.31:2348'
|
||||||
|
|
||||||
# 正式 php
|
# 正式 php
|
||||||
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
||||||
@@ -20,10 +20,10 @@ VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
|
|||||||
VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
|
VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
|
||||||
|
|
||||||
# 本地调试连接
|
# 本地调试连接
|
||||||
VITE_API_URL = 'http://192.168.1.31/'
|
# VITE_API_URL = 'http://192.168.1.31/'
|
||||||
|
|
||||||
# 线上测试
|
# 线上测试
|
||||||
# VITE_API_URL = 'https://tapi.cashier.sxczgkj.cn'
|
# VITE_API_URL = 'https://tapi.cashier.sxczgkj.cn'
|
||||||
|
|
||||||
# 线上正式
|
# 线上正式
|
||||||
# VITE_API_URL = 'https://cashier.sxczgkj.com'
|
VITE_API_URL = 'https://cashier.sxczgkj.com'
|
||||||
16160
dist-electron/main.js
16160
dist-electron/main.js
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vite-electron",
|
"name": "vite-electron",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"main": "dist-electron/main.js",
|
"main": "dist-electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "chcp 65001 && vite",
|
"dev": "chcp 65001 && vite",
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ onMounted(() => {
|
|||||||
if (store.userInfo && store.userInfo.id) {
|
if (store.userInfo && store.userInfo.id) {
|
||||||
goodsStore.initGoods()
|
goodsStore.initGoods()
|
||||||
store.getShopInfo()
|
store.getShopInfo()
|
||||||
|
store.shopPagePermissionMineAjax()
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcRenderer.on('showCloseDialog', (event, arg) => {
|
ipcRenderer.on('showCloseDialog', (event, arg) => {
|
||||||
|
|||||||
@@ -393,3 +393,14 @@ export function shopUserDetail(params) {
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前员工已拥有页面路径
|
||||||
|
*/
|
||||||
|
export function shopPagePermissionMine(params) {
|
||||||
|
return request({
|
||||||
|
method: "get",
|
||||||
|
url: "/account/admin/shopPagePermission/mine",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,32 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="left_menu_wrap">
|
<div class="left_menu_wrap">
|
||||||
<div class="item first" :class="{ online: socketStore.online }" @click="connectWsHandle">
|
<div class="top_item_wra">
|
||||||
<el-icon class="icon">
|
<div class="item first" :class="{ online: socketStore.online }" @click="connectWsHandle">
|
||||||
<Monitor />
|
<el-icon class="icon">
|
||||||
</el-icon>
|
<Monitor />
|
||||||
<el-text :type="socketStore.online ? 'success' : 'danger'">
|
</el-icon>
|
||||||
<template v-if="socketStore.online">
|
<el-text :type="socketStore.online ? 'success' : 'danger'">
|
||||||
在线
|
{{ socketStore.online ? '在线' : '离线' }}
|
||||||
</template>
|
</el-text>
|
||||||
<template v-else>
|
</div>
|
||||||
离线
|
<router-link class="item" :class="{ active: route.path == item.path }" v-for="item in store.menus"
|
||||||
</template>
|
:key="item.path" :to="item.path">
|
||||||
</el-text>
|
<el-icon class="icon">
|
||||||
|
<component :is="item.icon" />
|
||||||
|
</el-icon>
|
||||||
|
<el-text class="text">{{ item.label }}</el-text>
|
||||||
|
</router-link>
|
||||||
|
<div class="item" @click="workRef.show()">
|
||||||
|
<el-icon class="icon">
|
||||||
|
<component is="SwitchButton" />
|
||||||
|
</el-icon>
|
||||||
|
<el-text class="text">交班</el-text>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<router-link class="item" :class="{ active: route.path == item.path }" v-for="item in menus" :key="item.path"
|
<div class="item" @click="moreref.show()">
|
||||||
:to="item.path">
|
|
||||||
<el-icon class="icon">
|
|
||||||
<component :is="item.icon" />
|
|
||||||
</el-icon>
|
|
||||||
<el-text class="text">{{ item.label }}</el-text>
|
|
||||||
</router-link>
|
|
||||||
<div class="item" @click="workRef.show()">
|
|
||||||
<el-icon class="icon">
|
|
||||||
<component is="SwitchButton" />
|
|
||||||
</el-icon>
|
|
||||||
<el-text class="text">交班</el-text>
|
|
||||||
</div>
|
|
||||||
<div class="item more" @click="moreref.show()">
|
|
||||||
<el-icon class="icon">
|
<el-icon class="icon">
|
||||||
<Operation />
|
<Operation />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@@ -42,62 +39,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref, } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { useSocket } from '@/store/socket.js'
|
import { useSocket } from '@/store/socket.js'
|
||||||
|
import { useUser } from '@/store/user.js'
|
||||||
import more from '@/components/more.vue'
|
import more from '@/components/more.vue'
|
||||||
import callNumber from './callNumber.vue'
|
import callNumber from './callNumber.vue'
|
||||||
import work from '@/views/work/index.vue'
|
import work from '@/views/work/index.vue'
|
||||||
|
|
||||||
const socketStore = useSocket()
|
const socketStore = useSocket()
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const moreref = ref(null)
|
const moreref = ref(null)
|
||||||
const callNumberRef = ref(null)
|
const callNumberRef = ref(null)
|
||||||
const workRef = ref(null)
|
const workRef = ref(null)
|
||||||
|
const store = useUser()
|
||||||
const menus = ref([
|
|
||||||
{
|
|
||||||
label: '收银',
|
|
||||||
path: '/',
|
|
||||||
icon: 'ShoppingCartFull'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '台桌',
|
|
||||||
path: '/table',
|
|
||||||
icon: 'Reading'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '团购',
|
|
||||||
path: '/group_buy',
|
|
||||||
icon: 'Handbag'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '订单',
|
|
||||||
path: '/order',
|
|
||||||
icon: 'Tickets'
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '网络',
|
|
||||||
// path: '/internat',
|
|
||||||
// icon: 'Paperclip'
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '会员',
|
|
||||||
path: '/member',
|
|
||||||
icon: 'User'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '排队',
|
|
||||||
path: '/queue',
|
|
||||||
icon: 'Timer'
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '交班',
|
|
||||||
// path: '/work',
|
|
||||||
// icon: 'SwitchButton'
|
|
||||||
// }
|
|
||||||
])
|
|
||||||
|
|
||||||
// 更新叫号记录
|
// 更新叫号记录
|
||||||
function updateCallNumber() {
|
function updateCallNumber() {
|
||||||
@@ -110,7 +65,6 @@ function openCall() {
|
|||||||
|
|
||||||
// 手动重新连接ws
|
// 手动重新连接ws
|
||||||
function connectWsHandle() {
|
function connectWsHandle() {
|
||||||
// if (socketStore.online) return
|
|
||||||
location.reload()
|
location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,9 +157,16 @@ defineExpose({
|
|||||||
background-color: #555;
|
background-color: #555;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.top_item_wra {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
flex: 1;
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -237,10 +198,6 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.more {
|
|
||||||
margin-top: 90px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="showDialog" title="发现新版本" top="30vh" width="500" :close-on-click-modal="false"
|
<el-dialog v-model="showDialog" :title="`发现新版本v${newVersionRef}`" top="30vh" width="500" :close-on-click-modal="false"
|
||||||
:close-on-press-escape="false" :show-close="false">
|
:close-on-press-escape="false" :show-close="false">
|
||||||
<div class="message">
|
<div class="message" v-html="updataInfo.message"></div>
|
||||||
{{ updataInfo.message }}
|
|
||||||
</div>
|
|
||||||
<div class="progress_wrap" style="padding-top: 20px;">
|
<div class="progress_wrap" style="padding-top: 20px;">
|
||||||
<el-progress :percentage="uploadPro" :stroke-width="15" striped :striped-flow="uploadPro < 100" />
|
<el-progress :percentage="uploadPro" :stroke-width="15" striped :striped-flow="uploadPro < 100" />
|
||||||
</div>
|
</div>
|
||||||
@@ -44,6 +42,7 @@ const updataInfo = ref({})
|
|||||||
const isUpload = ref(false)
|
const isUpload = ref(false)
|
||||||
const uploadPro = ref(0)
|
const uploadPro = ref(0)
|
||||||
const uploadSucess = ref(false)
|
const uploadSucess = ref(false)
|
||||||
|
const newVersionRef = ref('')
|
||||||
|
|
||||||
// 关闭更新弹窗,下次登录在提示
|
// 关闭更新弹窗,下次登录在提示
|
||||||
function closeHandle() {
|
function closeHandle() {
|
||||||
@@ -59,17 +58,17 @@ async function findVersionAjax() {
|
|||||||
if (res && res.version) {
|
if (res && res.version) {
|
||||||
const newVersion = res.version;
|
const newVersion = res.version;
|
||||||
const oldVersion = packageData.version;
|
const oldVersion = packageData.version;
|
||||||
|
|
||||||
|
console.log('当前版本:', oldVersion);
|
||||||
|
console.log('获取版本:', newVersion);
|
||||||
|
|
||||||
const result = compareVersions(newVersion, oldVersion);
|
const result = compareVersions(newVersion, oldVersion);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
console.log(`${newVersion} 比 ${oldVersion} 大`);
|
|
||||||
if (!updateFlag) {
|
if (!updateFlag) {
|
||||||
|
newVersionRef.value = newVersion
|
||||||
showDialog.value = true
|
showDialog.value = true
|
||||||
updataInfo.value = res
|
updataInfo.value = res
|
||||||
}
|
}
|
||||||
} else if (result < 0) {
|
|
||||||
console.log(`${newVersion} 比 ${oldVersion} 小`);
|
|
||||||
} else {
|
|
||||||
console.log(`${newVersion} 与 ${oldVersion} 相等`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -77,7 +76,7 @@ async function findVersionAjax() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 比较版本号
|
||||||
function compareVersions(version1, version2) {
|
function compareVersions(version1, version2) {
|
||||||
const v1 = version1.split('.').map(Number);
|
const v1 = version1.split('.').map(Number);
|
||||||
const v2 = version2.split('.').map(Number);
|
const v2 = version2.split('.').map(Number);
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ export const useGoods = defineStore("goods", {
|
|||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
async historyOrderAjax(tableCode = "", orderId = "") {
|
async historyOrderAjax(tableCode = "", orderId = "") {
|
||||||
try {
|
try {
|
||||||
|
const store = useUser();
|
||||||
const res = await historyOrder({
|
const res = await historyOrder({
|
||||||
tableCode: tableCode,
|
tableCode: tableCode,
|
||||||
orderId: orderId,
|
orderId: orderId,
|
||||||
@@ -223,7 +224,7 @@ export const useGoods = defineStore("goods", {
|
|||||||
if (userInfo.id) {
|
if (userInfo.id) {
|
||||||
this.vipUserInfo = userInfo;
|
this.vipUserInfo = userInfo;
|
||||||
|
|
||||||
if (userInfo.isVip) {
|
if (userInfo.isVip && store.shopInfo.isMemberPrice) {
|
||||||
this.showVipPrice = 1;
|
this.showVipPrice = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,15 +5,55 @@ import {
|
|||||||
shopInfo_detail,
|
shopInfo_detail,
|
||||||
logout,
|
logout,
|
||||||
shopExtendDetail,
|
shopExtendDetail,
|
||||||
|
shopPagePermissionMine,
|
||||||
} from "@/api/account.js";
|
} from "@/api/account.js";
|
||||||
import useStorage from "@/utils/useStorage";
|
import useStorage from "@/utils/useStorage";
|
||||||
import { useSocket } from "@/store/socket.js";
|
import { useSocket } from "@/store/socket.js";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
|
||||||
export const useUser = defineStore("user", {
|
export const useUser = defineStore("user", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
userInfo: useStorage.get("userInfo"),
|
userInfo: useStorage.get("userInfo"),
|
||||||
shopInfo: useStorage.get("shopInfo"),
|
shopInfo: useStorage.get("shopInfo"),
|
||||||
token: useStorage.get("token"),
|
token: useStorage.get("token"),
|
||||||
|
loginType: useStorage.get("loginType") || 0,
|
||||||
|
menus: [
|
||||||
|
{
|
||||||
|
label: "收银",
|
||||||
|
path: "/",
|
||||||
|
state: 0,
|
||||||
|
icon: "ShoppingCartFull",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
menuList: [
|
||||||
|
{
|
||||||
|
label: "台桌",
|
||||||
|
path: "/table",
|
||||||
|
icon: "Reading",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "团购",
|
||||||
|
path: "/group_buy",
|
||||||
|
icon: "Handbag",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "订单",
|
||||||
|
path: "/order",
|
||||||
|
icon: "Tickets",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "会员",
|
||||||
|
path: "/member",
|
||||||
|
icon: "User",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "排队",
|
||||||
|
path: "/queue",
|
||||||
|
icon: "Timer",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
route: null,
|
||||||
|
router: null,
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
// 登录
|
// 登录
|
||||||
@@ -28,9 +68,54 @@ export const useUser = defineStore("user", {
|
|||||||
ticketLogo: logo ? logo.value : "",
|
ticketLogo: logo ? logo.value : "",
|
||||||
});
|
});
|
||||||
this.shopInfo = useStorage.get("shopInfo");
|
this.shopInfo = useStorage.get("shopInfo");
|
||||||
|
useStorage.set("loginType", param.loginType);
|
||||||
|
this.shopPagePermissionMineAjax(param.loginType);
|
||||||
return await this.shopStaffInfo();
|
return await this.shopStaffInfo();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 初始化路由信息
|
||||||
|
initRoute() {
|
||||||
|
this.route = useRoute();
|
||||||
|
this.router = useRouter();
|
||||||
|
},
|
||||||
|
// 获取当前员工已拥有页面路径
|
||||||
|
async shopPagePermissionMineAjax(loginType = useStorage.get("loginType")) {
|
||||||
|
try {
|
||||||
|
if (this.route == null) {
|
||||||
|
this.initRoute();
|
||||||
|
}
|
||||||
|
if (loginType == 0) {
|
||||||
|
this.menus[0].state = 1;
|
||||||
|
this.menus.push(...this.menuList);
|
||||||
|
} else {
|
||||||
|
const res = await shopPagePermissionMine();
|
||||||
|
|
||||||
|
let pathFlag = true;
|
||||||
|
res.map((item) => {
|
||||||
|
if (item.path == "/") {
|
||||||
|
this.menus[0].state = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.route.path != item.path) {
|
||||||
|
pathFlag = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.menuList.map((menu) => {
|
||||||
|
if (item.path === menu.path) {
|
||||||
|
this.menus.push(menu);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("当前路由===", this.route);
|
||||||
|
if (!pathFlag) {
|
||||||
|
this.router.push("/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("获取当前员工已拥有页面路径失败===", error);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
async shopStaffInfo() {
|
async shopStaffInfo() {
|
||||||
try {
|
try {
|
||||||
@@ -47,7 +132,10 @@ export const useUser = defineStore("user", {
|
|||||||
const res = await shopInfo_detail();
|
const res = await shopInfo_detail();
|
||||||
// 获取标签小票的logo
|
// 获取标签小票的logo
|
||||||
const logo = await shopExtendDetail({ autoKey: "ticket_logo" });
|
const logo = await shopExtendDetail({ autoKey: "ticket_logo" });
|
||||||
useStorage.set("shopInfo", { ...res, ticketLogo: logo ? logo.value : "" });
|
useStorage.set("shopInfo", {
|
||||||
|
...res,
|
||||||
|
ticketLogo: logo ? logo.value : "",
|
||||||
|
});
|
||||||
this.shopInfo = useStorage.get("shopInfo");
|
this.shopInfo = useStorage.get("shopInfo");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
@@ -57,9 +145,7 @@ export const useUser = defineStore("user", {
|
|||||||
async logout() {
|
async logout() {
|
||||||
try {
|
try {
|
||||||
const socket = useSocket();
|
const socket = useSocket();
|
||||||
|
|
||||||
await logout();
|
await logout();
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|
||||||
useStorage.del("userInfo");
|
useStorage.del("userInfo");
|
||||||
@@ -70,6 +156,14 @@ export const useUser = defineStore("user", {
|
|||||||
this.userInfo = {};
|
this.userInfo = {};
|
||||||
this.shopInfo = {};
|
this.shopInfo = {};
|
||||||
this.token = "";
|
this.token = "";
|
||||||
|
this.menus = [
|
||||||
|
{
|
||||||
|
label: "收银",
|
||||||
|
path: "/",
|
||||||
|
state: 0,
|
||||||
|
icon: "ShoppingCartFull",
|
||||||
|
},
|
||||||
|
];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,11 @@ service.interceptors.response.use(
|
|||||||
if (+response.data.code == 200) {
|
if (+response.data.code == 200) {
|
||||||
return response.data.data;
|
return response.data.data;
|
||||||
} else if (+response.data.code == 501) {
|
} else if (+response.data.code == 501) {
|
||||||
|
useStorage.del("token");
|
||||||
|
useStorage.del("userInfo");
|
||||||
|
useStorage.del("shopInfo");
|
||||||
|
useStorage.del("douyin");
|
||||||
ElMessage.error("登录已过期,请重新登录");
|
ElMessage.error("登录已过期,请重新登录");
|
||||||
useStorage.clear();
|
|
||||||
router.replace("/login");
|
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
return Promise.reject("登录已过期,请重新登录");
|
return Promise.reject("登录已过期,请重新登录");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -66,7 +66,10 @@
|
|||||||
<div class="print_view">
|
<div class="print_view">
|
||||||
<div class="title t1">{{ printData.shop_name }}</div>
|
<div class="title t1">{{ printData.shop_name }}</div>
|
||||||
<div class="title t2">
|
<div class="title t2">
|
||||||
预结算单【{{ printData.orderInfo.masterId }}】
|
预结算单 <span style="margin-left: 6px;">#{{ printData.orderInfo.orderNum }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="title t2" style="margin-bottom: 20px;">
|
||||||
|
桌号:无
|
||||||
</div>
|
</div>
|
||||||
<div class="row">订单号:{{ printData.orderInfo.orderNo }}</div>
|
<div class="row">订单号:{{ printData.orderInfo.orderNo }}</div>
|
||||||
<div class="row">交易时间:{{ printData.createdAt }}</div>
|
<div class="row">交易时间:{{ printData.createdAt }}</div>
|
||||||
@@ -91,16 +94,21 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="row between">
|
<div class="row between">
|
||||||
<span>合计:</span>
|
<span>原价:</span>
|
||||||
<span>{{ printData.amount }}</span>
|
<span>{{ printData.originAmount }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row between">
|
<div class="row between">
|
||||||
<span>余额:</span>
|
<span>折扣:</span>
|
||||||
<span>0.00</span>
|
<span>-0.00</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="row">备注:{{ printData.remark }}</div>
|
<div class="row between" style="font-size: 24px;">
|
||||||
<div class="row">打印时间:{{ printData.printTime }}</div>
|
<span>实付:</span>
|
||||||
|
<span>¥{{ printData.amount }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="line"></div>
|
||||||
|
<div class="row" style="font-weight: bold;">备注:{{ printData.remark }}</div>
|
||||||
|
<div class="row" style="font-size: 14px;">打印时间:{{ printData.printTime }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn_wrap">
|
<div class="btn_wrap">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
@@ -167,28 +175,22 @@ const printData = reactive({
|
|||||||
carts: [
|
carts: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "【测试】娃哈哈矿泉水",
|
name: "【测试勿管】娃哈哈矿泉水",
|
||||||
skuName: "500ml",
|
skuName: "500ml",
|
||||||
salePrice: "1.0",
|
salePrice: "1.0",
|
||||||
number: "10",
|
number: "10",
|
||||||
totalAmount: "10",
|
totalAmount: "10",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: "【测试】柠檬奶茶",
|
|
||||||
skuName: "加冰、加珍珠",
|
|
||||||
salePrice: "10",
|
|
||||||
number: "2",
|
|
||||||
totalAmount: "20",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
amount: "30.00",
|
amount: "30.00",
|
||||||
discountAmount: "30.00",
|
originAmount: '30.00',
|
||||||
|
discountAmount: "0.00",
|
||||||
discount: 0,
|
discount: 0,
|
||||||
remark: "给我多放点辣椒,谢谢老板",
|
remark: "给我多放点辣椒,谢谢老板",
|
||||||
orderInfo: {
|
orderInfo: {
|
||||||
masterId: "#002",
|
masterId: "",
|
||||||
orderNo: "202404021023542223445",
|
orderNo: "202404021023542223445",
|
||||||
|
orderNum: '12'
|
||||||
},
|
},
|
||||||
deviceName: "",
|
deviceName: "",
|
||||||
createdAt: "2024-04-02 10:15",
|
createdAt: "2024-04-02 10:15",
|
||||||
@@ -325,10 +327,6 @@ onMounted(() => {
|
|||||||
&.t1 {
|
&.t1 {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.t2 {
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
|
|||||||
@@ -101,6 +101,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</swiper-slide>
|
</swiper-slide>
|
||||||
|
<swiper-slide v-if="!goodsStore.goodsList.length">
|
||||||
|
<div class="goods_empty" style="padding-top: 15vh;">
|
||||||
|
<el-empty description="暂无商品~" v-if="!goodsStore.goodsList.length" />
|
||||||
|
</div>
|
||||||
|
</swiper-slide>
|
||||||
</swiper>
|
</swiper>
|
||||||
</div>
|
</div>
|
||||||
<div class="empty">
|
<div class="empty">
|
||||||
|
|||||||
@@ -164,6 +164,10 @@
|
|||||||
<goods ref="goodsRef" @loading="cartLoading = true" />
|
<goods ref="goodsRef" @loading="cartLoading = true" />
|
||||||
<!-- ©银收客 v{{ packageData.version }} -->
|
<!-- ©银收客 v{{ packageData.version }} -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 无权限遮罩 -->
|
||||||
|
<div class="no_permission" v-if="!store.menus.length || (store.menus.length && !store.menus[0].state)">
|
||||||
|
无操作权限,请联系管理员(;´д`)ゞ
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 备注 -->
|
<!-- 备注 -->
|
||||||
<remarkModal ref="remarkRef" @success="(e) => (remark = e)" />
|
<remarkModal ref="remarkRef" @success="(e) => (remark = e)" />
|
||||||
@@ -382,6 +386,26 @@ function clearVipUserHandle() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no_permission {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 999;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: rgba(255, 255, 255, 0.8);
|
||||||
|
backdrop-filter: blur(5px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.order_list_wrap {
|
.order_list_wrap {
|
||||||
.order_list_item {
|
.order_list_item {
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
|
|||||||
@@ -198,13 +198,13 @@ async function captchaAjax() {
|
|||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
store.initRoute()
|
||||||
global.updateData(false)
|
global.updateData(false)
|
||||||
|
|
||||||
captchaAjax()
|
captchaAjax()
|
||||||
|
|
||||||
let merchantLoginAccount = useStorage.get('merchantLoginAccount')
|
let merchantLoginAccount = useStorage.get('merchantLoginAccount')
|
||||||
if (merchantLoginAccount) {
|
if (merchantLoginAccount) {
|
||||||
form.username = merchantLoginAccount
|
form.username = merchantLoginAccount
|
||||||
|
form.loginType = useStorage.get('loginType')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -226,14 +226,15 @@ const infoshopInfoqueryDutys = async () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
show
|
||||||
|
})
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
infoshopInfoqueryDutys()
|
infoshopInfoqueryDutys()
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
show
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user