优化退款密码
This commit is contained in:
parent
2d2a014bc4
commit
86c8ca6472
|
|
@ -1,115 +1 @@
|
|||
"use strict";
|
||||
const path = require("path");
|
||||
const electron = require("electron");
|
||||
const os = require("os");
|
||||
let win;
|
||||
electron.app.whenReady().then(() => {
|
||||
win = new electron.BrowserWindow({
|
||||
title: "银收客",
|
||||
width: 1024,
|
||||
height: 768,
|
||||
fullscreenable: true,
|
||||
fullscreen: process.env.VITE_DEV_SERVER_URL ? false : true,
|
||||
simpleFullscreen: true,
|
||||
frame: process.env.VITE_DEV_SERVER_URL ? true : false,
|
||||
webPreferences: {
|
||||
// 集成网页和 Node.js,也就是在渲染进程中,可以调用 Node.js 方法
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false
|
||||
}
|
||||
});
|
||||
if (process.env.VITE_DEV_SERVER_URL) {
|
||||
win.loadURL(process.env.VITE_DEV_SERVER_URL);
|
||||
} else {
|
||||
win.loadFile(path.resolve(__dirname, "../dist/index.html"));
|
||||
}
|
||||
electron.app.on("activate", () => {
|
||||
if (electron.BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
electron.ipcMain.on("quitHandler", (_, msg) => {
|
||||
win = null;
|
||||
electron.app.exit();
|
||||
});
|
||||
electron.ipcMain.on("getPrintList", () => {
|
||||
win.webContents.getPrintersAsync().then((res) => {
|
||||
win.webContents.send("printList", res);
|
||||
});
|
||||
});
|
||||
electron.ipcMain.on("getOSmacSync", () => {
|
||||
let mac = "";
|
||||
if (os.networkInterfaces().WLAN) {
|
||||
mac = os.networkInterfaces().WLAN[0].mac;
|
||||
console.log("wlan.mac===", mac);
|
||||
} else {
|
||||
mac = os.networkInterfaces()["以太网"][0].mac;
|
||||
console.log("以太网.mac===", mac);
|
||||
}
|
||||
win.webContents.send("getOSmacRes", mac);
|
||||
});
|
||||
const tagPrintWin = new electron.BrowserWindow({
|
||||
show: false,
|
||||
width: 360,
|
||||
height: 240,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false
|
||||
}
|
||||
});
|
||||
if (process.env.VITE_DEV_SERVER_URL) {
|
||||
tagPrintWin.loadFile(path.join(__dirname, "../public/tag_print.html"));
|
||||
} else {
|
||||
tagPrintWin.loadFile(path.resolve(__dirname, "../dist/tag_print.html"));
|
||||
}
|
||||
electron.ipcMain.on("printerTagSync", (event, arg) => {
|
||||
console.log(arg);
|
||||
tagPrintWin.webContents.send("getParams", arg);
|
||||
});
|
||||
electron.ipcMain.on("printTagStart", (event, arg) => {
|
||||
const _parmas = JSON.parse(arg);
|
||||
let name = _parmas.deviceName;
|
||||
tagPrintWin.webContents.print({
|
||||
silent: true,
|
||||
deviceName: name,
|
||||
pageSize: {
|
||||
width: 45e3,
|
||||
height: 3e4
|
||||
},
|
||||
scaleFactor: 80,
|
||||
landscape: false,
|
||||
margins: {
|
||||
marginType: "none",
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0
|
||||
},
|
||||
dpi: {
|
||||
horizontal: 203,
|
||||
vertical: 203
|
||||
}
|
||||
});
|
||||
});
|
||||
const gotTheLock = electron.app.requestSingleInstanceLock();
|
||||
if (!gotTheLock) {
|
||||
electron.app.quit();
|
||||
} else {
|
||||
electron.app.on("second-instance", (event, commandLine, workingDirectory) => {
|
||||
if (win) {
|
||||
if (win.isMinimized())
|
||||
win.restore();
|
||||
win.focus();
|
||||
win.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
win.on("close", (e) => {
|
||||
e.preventDefault();
|
||||
win.webContents.send("showCloseDialog");
|
||||
});
|
||||
});
|
||||
electron.app.on("window-all-closed", () => {
|
||||
if (process.platform !== "darwin")
|
||||
electron.app.quit();
|
||||
});
|
||||
"use strict";const s=require("path"),e=require("electron"),a=require("os");let n;e.app.whenReady().then(()=>{n=new e.BrowserWindow({title:"银收客",width:1024,height:768,fullscreenable:!0,fullscreen:!process.env.VITE_DEV_SERVER_URL,simpleFullscreen:!0,frame:!!process.env.VITE_DEV_SERVER_URL,webPreferences:{nodeIntegration:!0,contextIsolation:!1}}),process.env.VITE_DEV_SERVER_URL?n.loadURL(process.env.VITE_DEV_SERVER_URL):n.loadFile(s.resolve(__dirname,"../dist/index.html")),e.app.on("activate",()=>{e.BrowserWindow.getAllWindows().length===0&&createWindow()}),e.ipcMain.on("quitHandler",(t,o)=>{n=null,e.app.exit()}),e.ipcMain.on("getPrintList",()=>{n.webContents.getPrintersAsync().then(t=>{n.webContents.send("printList",t)})}),e.ipcMain.on("getOSmacSync",()=>{let t="";a.networkInterfaces().WLAN?(t=a.networkInterfaces().WLAN[0].mac,console.log("wlan.mac===",t)):(t=a.networkInterfaces().以太网[0].mac,console.log("以太网.mac===",t)),n.webContents.send("getOSmacRes",t)});const i=new e.BrowserWindow({show:!1,width:360,height:240,webPreferences:{nodeIntegration:!0,contextIsolation:!1}});process.env.VITE_DEV_SERVER_URL?i.loadFile(s.join(__dirname,"../public/tag_print.html")):i.loadFile(s.resolve(__dirname,"../dist/tag_print.html")),e.ipcMain.on("printerTagSync",(t,o)=>{console.log(o),i.webContents.send("getParams",o)}),e.ipcMain.on("printTagStart",(t,o)=>{let l=JSON.parse(o).deviceName;i.webContents.print({silent:!0,deviceName:l,pageSize:{width:45e3,height:3e4},scaleFactor:80,landscape:!1,margins:{marginType:"none",top:0,bottom:0,left:0,right:0},dpi:{horizontal:203,vertical:203}})}),e.app.requestSingleInstanceLock()?e.app.on("second-instance",(t,o,r)=>{n&&(n.isMinimized()&&n.restore(),n.focus(),n.show())}):e.app.quit(),n.on("close",t=>{t.preventDefault(),n.webContents.send("showCloseDialog")})});e.app.on("window-all-closed",()=>{process.platform!=="darwin"&&e.app.quit()});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "vite-electron",
|
||||
"private": true,
|
||||
"version": "1.4.18",
|
||||
"version": "1.4.20",
|
||||
"main": "dist-electron/main.js",
|
||||
"scripts": {
|
||||
"dev": "chcp 65001 && vite",
|
||||
|
|
|
|||
|
|
@ -6,18 +6,18 @@ import request from "@/utils/request.js";
|
|||
* @returns
|
||||
*/
|
||||
export function queryMembermember(params) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "member/queryMember",
|
||||
params
|
||||
});
|
||||
return request({
|
||||
method: "get",
|
||||
url: "member/queryMember",
|
||||
params,
|
||||
});
|
||||
}
|
||||
export function createMembermember(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "member/createMember",
|
||||
data
|
||||
});
|
||||
return request({
|
||||
method: "post",
|
||||
url: "member/createMember",
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询会员流水
|
||||
|
|
@ -25,11 +25,11 @@ export function createMembermember(data) {
|
|||
* @returns
|
||||
*/
|
||||
export function memberqueryMemberAccount(params) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "member/queryMemberAccount",
|
||||
params
|
||||
});
|
||||
return request({
|
||||
method: "get",
|
||||
url: "member/queryMemberAccount",
|
||||
params,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 会员现金充值
|
||||
|
|
@ -37,11 +37,11 @@ export function memberqueryMemberAccount(params) {
|
|||
* @returns
|
||||
*/
|
||||
export function accountPaymember(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "member/accountPay",
|
||||
data
|
||||
});
|
||||
return request({
|
||||
method: "post",
|
||||
url: "member/accountPay",
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 会员扫码充值
|
||||
|
|
@ -49,9 +49,22 @@ export function accountPaymember(data) {
|
|||
* @returns
|
||||
*/
|
||||
export function membermemberScanPay(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "member/memberScanPay",
|
||||
data
|
||||
});
|
||||
return request({
|
||||
method: "post",
|
||||
url: "member/memberScanPay",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员充值退款
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function returnFlow(params) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "member/returnFlow",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,36 @@
|
|||
import request from "@/utils/request.js";
|
||||
|
||||
export function login(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "login/login",
|
||||
data,
|
||||
});
|
||||
return request({
|
||||
method: "post",
|
||||
url: "login/login",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取版本
|
||||
* @returns
|
||||
*/
|
||||
export function findVersion() {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "login/findVersion",
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否显示密码
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function queryPwdInfo() {
|
||||
let userInfo = JSON.parse(localStorage.getItem("userInfo"));
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/shopInfo/queryPwdInfo",
|
||||
params: {
|
||||
shopId: userInfo.shopId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<scanModal ref="scanModalRef" fast :amount="money" :selecttype="props.type" :orderId="props.userInfo.id"
|
||||
<scanModal ref="scanModalRef" fast :amount="money" :money="money" :selecttype="props.type" :orderId="props.userInfo.id"
|
||||
@success="scanCodeSuccess" />
|
||||
<takeFoodCode ref="takeFoodCodeRef" title="支付密码" :type="2" input-type="password" placeholder="请输入支付密码"
|
||||
@success="passwordSuccess" />
|
||||
|
|
@ -78,6 +78,7 @@ import { useUser } from "@/store/user.js";
|
|||
import { clearNoNum } from "@/utils";
|
||||
import md5 from "js-md5";
|
||||
|
||||
import { queryPwdInfo } from '@/api/user.js'
|
||||
import scanModal from "@/components/payCard/scanModal.vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import takeFoodCode from "@/components/takeFoodCode.vue";
|
||||
|
|
@ -128,14 +129,14 @@ function payTypeChange(index, item) {
|
|||
}
|
||||
|
||||
// 获取支付密码
|
||||
async function passwordSuccess(e) {
|
||||
async function passwordSuccess(e = '') {
|
||||
try {
|
||||
payLoading.value = true;
|
||||
await accountPaymember({
|
||||
shopId: store.userInfo.shopId,
|
||||
memberId: props.userInfo.id,
|
||||
amount: money.value,
|
||||
pwd: md5(e),
|
||||
pwd: e ? md5(e) : '',
|
||||
});
|
||||
payLoading.value = false;
|
||||
ElMessage.success("支付成功");
|
||||
|
|
@ -175,8 +176,15 @@ async function confirmOrder() {
|
|||
emit("paySuccess");
|
||||
} else {
|
||||
// 会员充值
|
||||
takeFoodCodeRef.value.show();
|
||||
// passwordSuccess()
|
||||
|
||||
let res = await queryPwdInfo()
|
||||
if (res.isMemberIn == 1) {
|
||||
takeFoodCodeRef.value.show();
|
||||
} else {
|
||||
passwordSuccess()
|
||||
}
|
||||
// takeFoodCodeRef.value.show();
|
||||
// // passwordSuccess()
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<script setup>
|
||||
import _ from "lodash";
|
||||
import { ref } from "vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import icon from "@/assets/icon_scan.png";
|
||||
import { scanpay, queryOrder, quickPay, queryQuickPayStatus, accountPay, queryScanPay } from "@/api/pay";
|
||||
import { useUser } from "@/store/user.js";
|
||||
|
|
@ -117,8 +117,8 @@ async function submitHandle() {
|
|||
memberId: props.orderId,
|
||||
amount: props.amount,
|
||||
authCode: scanCode.value,
|
||||
payAmount: props.money < props.amount ? props.money : '',
|
||||
discountAmount: props.money < props.amount ? formatDecimal(props.amount - props.money) : ''
|
||||
// payAmount: props.money < props.amount ? props.money : '',
|
||||
// discountAmount: props.money < props.amount ? formatDecimal(props.amount - props.money) : ''
|
||||
});
|
||||
} else {
|
||||
if (props.fast) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button type="primary" style="width: 100%" @click="confirmHandle">确认</el-button>
|
||||
<el-button type="primary" style="width: 100%" :loading="loading" @click="confirmHandle">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
|
@ -69,6 +69,7 @@ function delHandle() {
|
|||
number.value = number.value.substring(0, number.value.length - 1);
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
// 确认
|
||||
function confirmHandle() {
|
||||
if (!number.value) return
|
||||
|
|
@ -77,8 +78,12 @@ function confirmHandle() {
|
|||
ElMessage.error('请输入正确的密码')
|
||||
return
|
||||
} else {
|
||||
loading.value = true
|
||||
emit("success", number.value);
|
||||
dialogVisible.value = false;
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 1000)
|
||||
}
|
||||
} else {
|
||||
emit("success", number.value);
|
||||
|
|
|
|||
|
|
@ -89,24 +89,27 @@
|
|||
<el-text class="t">打包(¥{{ cartInfo.packAmount || 0 }})</el-text>
|
||||
</div>
|
||||
<div class="num-wrap">
|
||||
<el-text>共{{ cartInfo.productNum || 0 }}种商品,{{
|
||||
<!-- 共{{ cartInfo.productNum || 0 }}种商品 -->
|
||||
共<el-text>{{
|
||||
cartInfo.productSum || 0
|
||||
}}件</el-text>
|
||||
}}件</el-text>,¥{{ formatDecimal(cartInfo.totalAmount || 0) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="btm">
|
||||
<el-button icon="Edit" @click="remarkRef.show()"></el-button>
|
||||
<div class="button">
|
||||
<el-button type="primary" style="width: 100%" :disabled="!cartList.length" v-loading="createOrderLoading"
|
||||
@click="createOrderHandle">
|
||||
<template v-if="!createOrderLoading">
|
||||
<template v-if="!global.tableInfo.id">
|
||||
结算
|
||||
</template>
|
||||
<template v-else>下单</template>
|
||||
(¥{{ cartInfo.totalAmount || 0 }})</template>
|
||||
<template v-else>下单中...</template>
|
||||
</el-button>
|
||||
<div class="btn" v-if="global.tableInfo.id">
|
||||
<el-button type="primary" style="width: 100%;" :disabled="!cartList.length"
|
||||
@click="createOrderHandle(0)">仅下单</el-button>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="primary" style="width: 100%;" :disabled="!cartList.length" v-loading="createOrderLoading"
|
||||
@click="createOrderHandle(1)">
|
||||
<template v-if="!createOrderLoading">
|
||||
去结算</template>
|
||||
<template v-else>下单中...</template>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -151,6 +154,7 @@ import settleAccount from "@/views/home/components/settleAccount.vue";
|
|||
import fastCashier from "@/views/home/components/fastCashier.vue";
|
||||
import pendingCartModal from "@/views/home/components/pendingCartModal.vue";
|
||||
import useStorage from '@/utils/useStorage'
|
||||
import { formatDecimal } from '@/utils/index.js'
|
||||
|
||||
import {
|
||||
createCart,
|
||||
|
|
@ -199,7 +203,7 @@ const masterId = ref("");
|
|||
const pendingCartNum = ref(0);
|
||||
|
||||
// 生成订单
|
||||
async function createOrderHandle() {
|
||||
async function createOrderHandle(t = 0) {
|
||||
try {
|
||||
createOrderLoading.value = true;
|
||||
const res = await createOrder({
|
||||
|
|
@ -207,11 +211,12 @@ async function createOrderHandle() {
|
|||
shopId: store.userInfo.shopId,
|
||||
remark: remark.value,
|
||||
vipUserId: global.orderMemberInfo.id || '',
|
||||
tableId: global.tableInfo.qrcode || ''
|
||||
tableId: global.tableInfo.qrcode || '',
|
||||
type: t
|
||||
});
|
||||
createOrderLoading.value = false;
|
||||
|
||||
if (global.tableInfo.id) {
|
||||
if (global.tableInfo.id && t == 0) {
|
||||
ElMessage.success('下单成功')
|
||||
global.setOrderTable({})
|
||||
createCodeAjax(1)
|
||||
|
|
@ -653,6 +658,12 @@ onMounted(() => {
|
|||
|
||||
.button {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
gap: var(--el-font-size-base);
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.js {
|
||||
.t {
|
||||
|
|
|
|||
|
|
@ -1,290 +1,27 @@
|
|||
<template>
|
||||
<!-- <el-button @click="chooseSerial">获取串口列表</el-button> -->
|
||||
<el-button @click="initWebSocket()">连接ws</el-button>
|
||||
<el-button @click="dakai()"></el-button>
|
||||
<!-- 打印二维码 -->
|
||||
<rintermodelindex ref="rintermodelindexref" :form="form" @somethingDone="handleSomethingDone"></rintermodelindex>
|
||||
<el-button>button</el-button>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import _ from 'lodash'
|
||||
import { bySubType } from "@/api/device";
|
||||
import { ElMessage } from "element-plus";
|
||||
import dayjs from 'dayjs'
|
||||
import { ipcRenderer } from 'electron'
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useUser } from "@/store/user.js";
|
||||
import useStorage from '@/utils/useStorage'
|
||||
import rintermodelindex from '@/components/lodop/index.vue'
|
||||
const store = useUser();
|
||||
import { onMounted } from 'vue'
|
||||
import { findVersion } from '@/api/user.js'
|
||||
import packageData from "../../../package.json";
|
||||
|
||||
const rintermodelindexref = ref()//打印机ref
|
||||
// 打印成功回调
|
||||
const handleSomethingDone = () => {
|
||||
console.log('打印成功回调成功')
|
||||
}
|
||||
const form = ref({
|
||||
article: '1',
|
||||
type: '2',
|
||||
|
||||
})
|
||||
const dakai = () => {
|
||||
rintermodelindexref.value.centerDialogVisibleshow() //打开二维码打印
|
||||
rintermodelindexref.value.initialization()
|
||||
}
|
||||
|
||||
// 小票打印机列表
|
||||
const printList = ref([]);
|
||||
// 标签打印机列表
|
||||
const printLabelList = ref([]);
|
||||
const localPrintList = ref([])
|
||||
|
||||
// 获取打印机状态
|
||||
async function bySubTypeAjax() {
|
||||
async function findVersionAjax() {
|
||||
try {
|
||||
const res1 = await bySubType({
|
||||
shopId: store.userInfo.shopId,
|
||||
contentType: "local",
|
||||
subType: "cash",
|
||||
});
|
||||
const res2 = await bySubType({
|
||||
shopId: store.userInfo.shopId,
|
||||
contentType: "local",
|
||||
subType: "label",
|
||||
});
|
||||
printList.value = res1;
|
||||
printLabelList.value = res2;
|
||||
const res = await findVersion()
|
||||
let reg = /\./g;
|
||||
// console.log('res.version', res.version.replace(reg, ''));
|
||||
// console.log('packageData.version', packageData.version.replace(reg, ''));
|
||||
if (res.version.replace(reg, '') > packageData.version.replace(reg, '') && res.url) {
|
||||
console.log('有版本更新');
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取本地打印机列表
|
||||
function getPrintList() {
|
||||
ipcRenderer.send("getPrintList");
|
||||
ipcRenderer.on("printList", (event, arg) => {
|
||||
localPrintList.value = arg;
|
||||
// console.log(localPrintList.value);
|
||||
});
|
||||
}
|
||||
|
||||
// 检查本地打印机是否能正常使用
|
||||
function checkLocalPrint(deviceName) {
|
||||
let print = ''
|
||||
for (let item of localPrintList.value) {
|
||||
if (item.name == deviceName) {
|
||||
print = item
|
||||
}
|
||||
}
|
||||
|
||||
if (!print.name) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// 打印小票
|
||||
function printBill(props) {
|
||||
if (!checkLocalPrint(printLabelList.value[0].config.deviceName)) {
|
||||
ElMessage.error("本地打印机无法使用,请检查打印机是否正确连接");
|
||||
} else {
|
||||
const data = {
|
||||
shop_name: store.userInfo.merchantName,
|
||||
carts: props.carts,
|
||||
amount: props.amount,
|
||||
remark: props.remark,
|
||||
orderInfo: props.orderInfo,
|
||||
deviceName: printList.value[0].config.deviceName,
|
||||
createdAt: dayjs(props.orderInfo.createdAt).format(
|
||||
"YYYY-MM-DD HH:mm:ss"
|
||||
),
|
||||
printTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
||||
};
|
||||
ipcRenderer.send("printerInfoSync", JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
|
||||
// 检测是否打印标签小票
|
||||
function checkLabelPrint(props) {
|
||||
if (!checkLocalPrint(printLabelList.value[0].config.deviceName)) {
|
||||
ElMessage.error("本地打印机无法使用,请检查打印机是否正确连接");
|
||||
} else {
|
||||
let pids = printLabelList.value[0].config.categoryList.map(item => item.id)
|
||||
let labelList = []
|
||||
props.carts.map(item => {
|
||||
if (pids.some(el => el == item.categoryId)) {
|
||||
for (let i = 0; i < item.number; i++) {
|
||||
labelList.push(
|
||||
{
|
||||
outNumber: props.outNumber,
|
||||
name: item.name,
|
||||
skuName: item.skuName,
|
||||
masterId: props.orderInfo.tableName,
|
||||
deviceName: printLabelList.value[0].config.deviceName,
|
||||
createdAt: dayjs(props.createdAt).format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
printLabel(labelList)
|
||||
}
|
||||
}
|
||||
|
||||
// 打印标签
|
||||
let labelCount = ref(0)
|
||||
let labelPrintTimer = ref(null)
|
||||
function printLabel(list) {
|
||||
console.log(list);
|
||||
if (!checkLocalPrint(printLabelList.value[0].config.deviceName)) {
|
||||
ElMessage.error("本地打印机无法使用,请检查打印机是否正确连接");
|
||||
} else {
|
||||
labelPrintTimer.value = setInterval(() => {
|
||||
// console.log('labelCount', labelCount.value);
|
||||
list[labelCount.value].count = `${list.length - labelCount.value}/${list.length}`
|
||||
ipcRenderer.send('printerTagSync', JSON.stringify(list[labelCount.value]))
|
||||
labelCount.value++
|
||||
if (labelCount.value > list.length - 1) {
|
||||
clearInterval(labelPrintTimer.value)
|
||||
labelPrintTimer.value = null
|
||||
labelCount.value = 0
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
let ws = ref(null)
|
||||
let wsIsClose = ref(false)
|
||||
// 初始化websocket
|
||||
function initWebSocket(wsUrl = 'wss://wxcashiertest.sxczgkj.cn/client') {
|
||||
ws.value = new WebSocket(wsUrl);
|
||||
console.log("websocket:", ws.value);
|
||||
|
||||
ws.value.onopen = function () {
|
||||
console.log('wss连接成功');
|
||||
// 清除心跳
|
||||
clearInterval(heartbeatTimer.value)
|
||||
heartbeatTimer.value = null
|
||||
startheartbeat()
|
||||
|
||||
// 清除重连
|
||||
clearInterval(reConnectTimer.value)
|
||||
reConnectTimer.value = null
|
||||
reConnectCount.value = 0
|
||||
|
||||
ws.value.send(JSON.stringify({
|
||||
type: "connect",
|
||||
shopId: store.userInfo.shopId,
|
||||
clientId: useStorage.get('uuid')
|
||||
}))
|
||||
};
|
||||
|
||||
// 接收消息
|
||||
ws.value.onmessage = function (e) {
|
||||
// websocketonmessage(e);
|
||||
let data = JSON.parse(e.data)
|
||||
if (data.type == 'order') {
|
||||
console.log('接收消息', data);
|
||||
// 接收订单消息,打印小票
|
||||
// printBill(data)
|
||||
|
||||
// 检测是否需要打印标签小票
|
||||
checkLabelPrint(data)
|
||||
}
|
||||
};
|
||||
|
||||
// 连接发生错误
|
||||
ws.value.onerror = function () {
|
||||
console.log("WebSocket连接发生错误");
|
||||
|
||||
// 清除心跳
|
||||
clearInterval(heartbeatTimer.value)
|
||||
heartbeatTimer.value = null
|
||||
|
||||
// 手动关闭后不在执行自动连接任务
|
||||
if (!wsIsClose.value) reConnect(wsUrl);
|
||||
};
|
||||
|
||||
// 关闭
|
||||
ws.value.onclose = function (e) {
|
||||
console.log('ws关闭了', e);
|
||||
|
||||
// 清除心跳
|
||||
clearInterval(heartbeatTimer.value)
|
||||
heartbeatTimer.value = null
|
||||
|
||||
// 手动关闭后不在执行自动连接任务
|
||||
if (!wsIsClose.value) reConnect(wsUrl);
|
||||
};
|
||||
}
|
||||
|
||||
// 启动心跳连接
|
||||
let heartbeatTimer = ref(null)
|
||||
function startheartbeat() {
|
||||
heartbeatTimer.value = setInterval(() => {
|
||||
ws.value.send(JSON.stringify({ type: 'heartbeat' }))
|
||||
}, 10000)
|
||||
}
|
||||
|
||||
// 重连最大次数5次
|
||||
let reConnectCount = ref(0)
|
||||
let reConnectTimer = ref(null)
|
||||
function reConnect(wsUrl) {
|
||||
if (reConnectTimer.value != null) return
|
||||
reConnectTimer.value = setInterval(() => {
|
||||
// 自动连接超过5次不在连接,需手动出发
|
||||
console.log('reConnectCount.value===', reConnectCount.value);
|
||||
if (reConnectCount.value >= 5) {
|
||||
console.log('重连超过5次,不在连接');
|
||||
clearInterval(reConnectTimer.value)
|
||||
reConnectTimer.value = null
|
||||
reConnectCount.value = 0
|
||||
wsIsClose.value = true
|
||||
ws.value.close()
|
||||
} else {
|
||||
reConnectCount.value++
|
||||
initWebSocket(wsUrl)
|
||||
}
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 打印标签小票
|
||||
const printTag = () => {
|
||||
ipcRenderer.send('printerTagSync', JSON.stringify({
|
||||
deviceName: 'Xprinter XP-365B123'
|
||||
}))
|
||||
}
|
||||
|
||||
//选择串口设备
|
||||
const chooseSerial = async () => {
|
||||
// let printNum = localStorage.getItem('printNum')
|
||||
// if (!printNum) {
|
||||
// printNum = 1
|
||||
// localStorage.setItem('printNum', printNum)
|
||||
// } else {
|
||||
// printNum++
|
||||
// localStorage.setItem('printNum', printNum)
|
||||
// }
|
||||
// ipcRenderer.send('printStart', printNum)
|
||||
// ipcRenderer.send('getSerialPort')
|
||||
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
ipcRenderer.on('seriaportList', (e, a) => {
|
||||
console.log('seriaportList', a);
|
||||
})
|
||||
|
||||
getPrintList();
|
||||
bySubTypeAjax();
|
||||
initWebSocket()
|
||||
findVersionAjax()
|
||||
})
|
||||
</script>
|
||||
|
|
@ -1,40 +1,187 @@
|
|||
<template>
|
||||
<div class="box">
|
||||
<div class="dialog_footer" v-for="(item, index) in props.flowingwater.list" :key="index">
|
||||
<div class="dialog_footer_left">
|
||||
<span>{{ item.biz_name }}</span>
|
||||
<span>{{ dayjs(item.create_time).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
||||
<el-dialog v-model="visableDialog" title="余额明细" width="500">
|
||||
<div class="box">
|
||||
<div class="box1" v-loading="tableData.loading">
|
||||
<div class="dialog_footer" v-for="(item, index) in tableData.list" :key="index">
|
||||
<div class="dialog_footer_left">
|
||||
<span>{{ item.biz_name }}</span>
|
||||
<span>{{ dayjs(item.create_time).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
||||
</div>
|
||||
<div class="dialog_footer_right">
|
||||
<span :class="{ active: item.type == '+' }">
|
||||
<template v-if="item.type == '+'">+</template>
|
||||
<template v-else>-</template>
|
||||
¥{{ formatDecimal(item.amount) }}
|
||||
</span>
|
||||
<span>余额:¥{{ formatDecimal(item.balance) }}</span>
|
||||
</div>
|
||||
<div class="btm" style="width: 80px;">
|
||||
<el-button type="primary"
|
||||
v-if="item.biz_code == 'scanMemberIn' || item.biz_code == 'cashMemberIn'"
|
||||
@click="showRefundHandle(item)" :disabled="item.is_return == 1">
|
||||
<template v-if="item.is_return == 0">退款</template>
|
||||
<template v-if="item.is_return == 1">已退</template>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty description="暂无数据" v-if="!tableData.list.length" />
|
||||
</div>
|
||||
<div class="dialog_footer_right">
|
||||
<span :class="{ active: item.type == '+' }">
|
||||
<template v-if="item.type == '+'">+</template>
|
||||
<template v-else>-</template>
|
||||
¥{{ formatDecimal(item.amount) }}
|
||||
</span>
|
||||
<span>余额:¥{{ formatDecimal(item.balance) }}</span>
|
||||
<div class="page_wrap">
|
||||
<el-pagination v-model:current-page="tableData.page" background layout="prev, pager, next, total"
|
||||
:total="tableData.total" @current-change="memberqueryMemberAccountAjax" />
|
||||
</div>
|
||||
<el-dialog v-model="showDialog" title="会员充值退款">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100">
|
||||
<el-form-item label="退款金额" prop="amount">
|
||||
<el-input-number v-model="form.amount" :min="1" :max="refundItem.amount"
|
||||
placeholder="请输入退款金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退款说明">
|
||||
<el-input v-model="form.remark" placeholder="请输入退款说明" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div style="padding: 0 20px 20px;">
|
||||
<el-button @click="showDialog = false">取消</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="refundHandle">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<takeFoodCode ref="takeFoodCodeRef" title="退款密码" :type="2" input-type="password" placeholder="请输入退款密码"
|
||||
@success="passwordSuccess" />
|
||||
</div>
|
||||
<el-empty description="暂无数据" v-if="!props.flowingwater.list.length" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { dayjs } from 'element-plus'
|
||||
import md5 from "js-md5";
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { dayjs, ElMessage } from 'element-plus'
|
||||
import { formatDecimal } from '@/utils/index'
|
||||
import { returnFlow, memberqueryMemberAccount } from '@/api/member/index.js'
|
||||
import { queryPwdInfo } from '@/api/user.js'
|
||||
import takeFoodCode from "@/components/takeFoodCode.vue";
|
||||
|
||||
const props = defineProps({
|
||||
flowingwater: {
|
||||
type: Object,
|
||||
default: {}
|
||||
const memberId = ref('')
|
||||
|
||||
const visableDialog = ref(false)
|
||||
|
||||
const tableData = reactive({
|
||||
page: 1,
|
||||
total: 0,
|
||||
loading: false,
|
||||
list: []
|
||||
})
|
||||
|
||||
// 会员流水
|
||||
async function memberqueryMemberAccountAjax() {
|
||||
try {
|
||||
tableData.loading = true
|
||||
let res = await memberqueryMemberAccount({
|
||||
memberId: memberId.value,
|
||||
page: tableData.page,
|
||||
pageSize: 10
|
||||
})
|
||||
tableData.loading = false
|
||||
tableData.total = res.total
|
||||
tableData.list = res.list
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
const emits = defineEmits(['refund'])
|
||||
|
||||
const takeFoodCodeRef = ref(null)
|
||||
const showDialog = ref(false)
|
||||
const form = reactive({
|
||||
amount: 1,
|
||||
remark: ''
|
||||
})
|
||||
const rules = reactive({
|
||||
amount: [
|
||||
{
|
||||
trigger: 'blur',
|
||||
required: true,
|
||||
message: '请输入退款金额'
|
||||
}
|
||||
]
|
||||
})
|
||||
const loading = ref(false)
|
||||
const refundItem = ref({})
|
||||
const formRef = ref(null)
|
||||
|
||||
function showRefundHandle(item) {
|
||||
refundItem.value = item
|
||||
showDialog.value = true
|
||||
}
|
||||
|
||||
// 线上充值退款
|
||||
function refundHandle() {
|
||||
formRef.value.validate(async valid => {
|
||||
try {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
let res = await queryPwdInfo()
|
||||
loading.value = false
|
||||
if (res.isMemberReturn == 1) {
|
||||
takeFoodCodeRef.value.show();
|
||||
} else {
|
||||
passwordSuccess()
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
loading.value = false
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 得到退款密码
|
||||
async function passwordSuccess(e = '') {
|
||||
try {
|
||||
loading.value = true
|
||||
const res = await returnFlow({
|
||||
flowId: refundItem.value.id,
|
||||
remark: form.remark,
|
||||
amount: form.amount,
|
||||
pwd: e ? md5(e) : '',
|
||||
})
|
||||
ElMessage.success('退款成功')
|
||||
form.amount = 1
|
||||
form.remark = ''
|
||||
showDialog.value = false
|
||||
loading.value = false
|
||||
emits('refund')
|
||||
memberqueryMemberAccountAjax()
|
||||
} catch (error) {
|
||||
loading.value = false
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
function show(id) {
|
||||
memberId.value = id
|
||||
visableDialog.value = true
|
||||
memberqueryMemberAccountAjax()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.box {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
|
||||
.box1 {
|
||||
height: 350px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.page_wrap {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.dialog_footer:nth-child(1) {
|
||||
margin-top: 0;
|
||||
|
|
@ -43,12 +190,12 @@ const props = defineProps({
|
|||
.dialog_footer {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #ececec;
|
||||
padding-bottom: 6px;
|
||||
|
||||
.dialog_footer_left {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
|
|
@ -67,9 +214,11 @@ const props = defineProps({
|
|||
}
|
||||
|
||||
.dialog_footer_right {
|
||||
width: 150px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
padding-right: 20px;
|
||||
|
||||
span:nth-child(1) {
|
||||
font-size: 16px;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<div class="orderbox_right_top_item_tow">{{ tableData.list.length != 0 ?
|
||||
tableData.list[datarow].levelConsume : '无' }}</div>
|
||||
</div>
|
||||
<div class="orderbox_right_top_item" @click="stored = true">
|
||||
<div class="orderbox_right_top_item" @click="dialogRef.show(tableData.list[datarow].id)">
|
||||
<div class="orderbox_right_top_item_one">
|
||||
<el-icon :size="24" style="color:#00b58d ;">
|
||||
<Box />
|
||||
|
|
@ -94,10 +94,7 @@
|
|||
<el-button style="width: 60%;" type="primary">确认</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog v-model="stored" title="余额明细" width="500" :before-close="handleClose">
|
||||
<add :flowingwater='flowingwater' />
|
||||
</el-dialog>
|
||||
<add ref="dialogRef" @refund="refundSuccess" @page-change="MemberAccount" />
|
||||
<el-dialog v-model="memberaddshow" title="添加会员" width="600" :before-close="memberaddshowclose"
|
||||
@open="membrform = { ...resetMembrform }">
|
||||
<el-form ref="formRef" :rules="rules" :model="membrform" label-width="70px" hide-required-asterisk>
|
||||
|
|
@ -194,6 +191,9 @@ const stored = ref(false)//储值余额
|
|||
const handleClose = async () => {
|
||||
stored.value = !stored.value
|
||||
}
|
||||
|
||||
const dialogRef = ref(null)
|
||||
|
||||
const emit = defineEmits('paySuccess')
|
||||
|
||||
function paySuccess() {
|
||||
|
|
@ -238,6 +238,12 @@ const payCarddialogVisible = ref(false)
|
|||
|
||||
const orderId = ref('')
|
||||
|
||||
// 退款成功
|
||||
function refundSuccess() {
|
||||
asyncqueryMembermember()
|
||||
MemberAccount()
|
||||
}
|
||||
|
||||
const confirmEvent = async () => {//子组件 确认按钮
|
||||
orderId.value = tableData.list[datarow.value].id
|
||||
payCarddialogVisible.value = true
|
||||
|
|
@ -262,15 +268,15 @@ const confirmEvent = async () => {//子组件 确认按钮
|
|||
// }
|
||||
}
|
||||
|
||||
const MemberAccount = async () => {//获取流水
|
||||
const MemberAccount = async (page = 1) => {//获取流水
|
||||
try {
|
||||
let res = await memberqueryMemberAccount({
|
||||
memberId: tableData.list[datarow.value].id,
|
||||
page: 1,
|
||||
page: page,
|
||||
pageSize: 10
|
||||
})
|
||||
flowingwater.total = res.total
|
||||
flowingwater.list = res.list
|
||||
// flowingwater.list = res.list
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -306,7 +306,8 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<takeFoodCode ref="takeFoodCodeRef" title="支付密码" type="password" placeholder="请输入支付密码" @success="passwordSuccess" />
|
||||
<takeFoodCode ref="takeFoodCodeRef" title="支付密码" type="2" inputType="password" placeholder="请输入支付密码"
|
||||
@success="passwordSuccess" />
|
||||
<invoice ref="invoiceRef" @load-complete="invoiceLoading = false" />
|
||||
</template>
|
||||
|
||||
|
|
@ -323,6 +324,7 @@ import {
|
|||
cloudPrinterprint,
|
||||
sendMessage,
|
||||
} from "@/api/order/index.js";
|
||||
import { queryPwdInfo } from '@/api/user.js'
|
||||
import add from "@/views/order/components/add.vue";
|
||||
import cashTable from "@/views/order/components/cashTable.vue";
|
||||
import { clearNoNum, formatDecimal } from "@/utils";
|
||||
|
|
@ -404,15 +406,15 @@ async function passwordSuccess(pwd) {
|
|||
return item && item;
|
||||
});
|
||||
if (arr.length != 0) {
|
||||
await payreturnOrder(arr, md5(pwd), isOnline.value);
|
||||
// await payreturnOrder(arr, '', isOnline.value);
|
||||
// await payreturnOrder(arr, md5(pwd), isOnline.value);
|
||||
await payreturnOrder(arr, pwd ? md5(pwd) : '', isOnline.value);
|
||||
changechecked.value = false;
|
||||
recharge.value = false;
|
||||
itemboxshow.value = false;
|
||||
refundamount.value = 0;
|
||||
ElMessage.success("退款成功!");
|
||||
buttonloading.value = false;
|
||||
asyncorderfindOrder();
|
||||
await asyncorderfindOrder();
|
||||
} else {
|
||||
buttonloading.value = false;
|
||||
ElMessage.error("没有退款项目!");
|
||||
|
|
@ -432,8 +434,13 @@ const payreturnOrderclick = lodash.debounce(
|
|||
ElMessage.error("退款金额不能为0!");
|
||||
return false;
|
||||
}
|
||||
takeFoodCodeRef.value.show();
|
||||
// passwordSuccess()
|
||||
|
||||
let res = await queryPwdInfo()
|
||||
if (res.isReturn == 1) {
|
||||
takeFoodCodeRef.value.show();
|
||||
} else {
|
||||
passwordSuccess()
|
||||
}
|
||||
},
|
||||
500,
|
||||
{ leading: true, trailing: false }
|
||||
|
|
@ -518,6 +525,7 @@ const print = lodash.throttle(
|
|||
}
|
||||
} else if (e == 'refund') {
|
||||
if (printStore.deviceNoteList.length) {
|
||||
console.log('本地打退票');
|
||||
normalPrintLoading.value = true
|
||||
const data = {
|
||||
shop_name: store.userInfo.shopName,
|
||||
|
|
@ -549,6 +557,8 @@ const print = lodash.throttle(
|
|||
normalPrintLoading.value = false
|
||||
}, 1000)
|
||||
} else {
|
||||
console.log('云打退票');
|
||||
|
||||
// 云打票
|
||||
await cloudPrinterprint({
|
||||
type: 'normal',
|
||||
|
|
|
|||
|
|
@ -22,16 +22,26 @@
|
|||
</div>
|
||||
<div class="overflow_y" v-loading="loading">
|
||||
<div class="tab_list">
|
||||
<div class="item" :class="{ active: tableItemActive == index }"
|
||||
<div class="item"
|
||||
:class="{ active: tableItemActive == index, using: item.status == 'using', closed: item.status == 'closed' }"
|
||||
v-for="(item, index) in tableList" :key="item.id" @click="slectTableHandle(index, item)">
|
||||
<div class="tab_title" :class="`${item.status}`">
|
||||
<span>{{ item.name }}</span>
|
||||
<span>0/{{ item.maxCapacity }}</span>
|
||||
</div>
|
||||
<div class="tab_cont">
|
||||
<el-icon class="icon">
|
||||
<el-icon class="icon" v-if="item.status != 'using'">
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
<div class="using" v-else>
|
||||
<div class="t1">开台中</div>
|
||||
<!-- <div class="t2">
|
||||
<el-icon>
|
||||
<Timer />
|
||||
</el-icon>
|
||||
<span>{{ countTime(item.updatedAt) }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -58,6 +68,7 @@ import tableInfo from '@/views/table/components/tableInfo.vue'
|
|||
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useUser } from "@/store/user.js"
|
||||
import { dayjs } from 'element-plus'
|
||||
const store = useUser()
|
||||
|
||||
|
||||
|
|
@ -99,6 +110,12 @@ function tabChange(item, index) {
|
|||
queryShopTableAjax()
|
||||
}
|
||||
|
||||
// 计算当前的时间差
|
||||
function countTime(t) {
|
||||
let ctime = dayjs().valueOf()
|
||||
return dayjs(ctime - t).format('H小时m分')
|
||||
}
|
||||
|
||||
// 支付成功,刷新状态
|
||||
async function paySuccess() {
|
||||
await queryShopTableAjax()
|
||||
|
|
@ -241,9 +258,28 @@ onMounted(() => {
|
|||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
border: 2px solid #fff;
|
||||
$usingColor: #D2441F;
|
||||
$subColor: #3274D5;
|
||||
$closedColor: #aeb8c9;
|
||||
|
||||
&.active {
|
||||
border-color: var(--primary-color);
|
||||
border-color: $subColor;
|
||||
}
|
||||
|
||||
&.using {
|
||||
&.active {
|
||||
border-color: $usingColor;
|
||||
}
|
||||
}
|
||||
|
||||
&.closed {
|
||||
.tab_title {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
&.active {
|
||||
border-color: $closedColor;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
|
@ -260,19 +296,19 @@ onMounted(() => {
|
|||
background-color: #999;
|
||||
|
||||
&.subscribe {
|
||||
background-color: var(--el-color-success);
|
||||
background-color: $subColor;
|
||||
}
|
||||
|
||||
&.closed {
|
||||
background-color: #999;
|
||||
background-color: $closedColor;
|
||||
}
|
||||
|
||||
&.idle {
|
||||
background-color: var(--primary-color);
|
||||
background-color: $subColor;
|
||||
}
|
||||
|
||||
&.using {
|
||||
background-color: var(--el-color-success);
|
||||
background-color: $usingColor;
|
||||
}
|
||||
|
||||
&.opening {
|
||||
|
|
@ -295,6 +331,27 @@ onMounted(() => {
|
|||
font-size: 30px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.using {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-bottom: 10px;
|
||||
|
||||
.t2 {
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 2px;
|
||||
|
||||
span {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue