1.优化商品菜单选中效果 2.优化打印服务加载弹窗展示效果

This commit is contained in:
gyq 2025-04-22 15:25:53 +08:00
parent b5773cf78c
commit 47ccfd0544
8 changed files with 16196 additions and 32 deletions

File diff suppressed because one or more lines are too long

View File

@ -32,6 +32,7 @@ app.whenReady().then(() => {
win.loadFile(path.resolve(__dirname, "../dist/index.html")); // 打包后使用文件路径访问应用
}
// 安装最新版本的exe文件
const installExe = async (exePath) => {
return new Promise((resolve, reject) => {
exec(`${exePath}`, (error, stdout, stderr) => {

View File

@ -7,7 +7,7 @@
<div class="drawerbox_bo_top_left_one" style="font-size: 24px;">
{{ store.shopInfo.shopName }}
</div>
<div class="tips" style="margin-top: 4px; color: var(--el-color-warning);" v-if="!showTips">注意您的账号将于{{
<div class="tips" style="margin-top: 4px; color: var(--el-color-warning);" v-if="showTips">注意您的账号将于{{
store.shopInfo.expireTime }}后过期请尽快续期</div>
<div class="drawerbox_bo_top_left_tow" style="margin-top: 10px">
收银员{{ store.userInfo.name }}
@ -126,6 +126,8 @@ function computeExpired() {
let expired = dayjs(store.userInfo.expireTime).subtract(30, 'day')
// 30
showTips.value = now.isBefore(expired)
console.log("computeExpired===", showTips.value);
}
//

View File

@ -14,10 +14,11 @@
</div>
<div class="footer">
<div class="info">
<div class="price" v-if="goodsInfo.id">
<span class="i"></span>
<span class="n">{{ formatDecimal(+goodsInfo.salePrice) }}</span>
</div>
<span>库存{{ stockNumber }}</span>
<template v-if="goodsInfo.id">
<span class="price">{{ formatDecimal(+goodsInfo.salePrice) }}</span>
</template>
</div>
<div class="btn_wrap">
<div class="btn">
@ -253,6 +254,20 @@ defineExpose({
.price {
color: var(--el-color-danger);
display: flex;
align-items: center;
font-weight: bold;
.i {
font-size: 14px;
position: relative;
top: 2px;
margin-right: 2px;
}
.n {
font-size: 20px;
}
}
}

View File

@ -571,6 +571,7 @@ export const useGoods = defineStore("goods", {
item.packFee = val.packFee;
item.unitName = val.unitName;
item.stockNumber = val.stockNumber;
item.isStock = val.isStock;
}
});

View File

@ -18,7 +18,7 @@
</el-text>
</div>
<div class="item"
:class="{ disabled: goodsStore.cartList.length && (goodsStore.cartList[goodsStore.cartActiveIndex].goods_type == 'package' && goodsStore.cartList[goodsStore.cartActiveIndex].group_type == 1) || (goodsStore.cartList.length && goodsStore.cartList[goodsStore.cartActiveIndex].number >= goodsStore.cartList[goodsStore.cartActiveIndex].stockNumber) }"
:class="{ disabled: goodsStore.cartList.length && (goodsStore.cartList[goodsStore.cartActiveIndex].goods_type == 'package' && goodsStore.cartList[goodsStore.cartActiveIndex].group_type == 1) || (goodsStore.cartList.length && goodsStore.cartList[goodsStore.cartActiveIndex].number >= goodsStore.cartList[goodsStore.cartActiveIndex].stockNumber && goodsStore.cartList[goodsStore.cartActiveIndex].isStock) }"
@click="numberChange('add')">
<el-icon class="icon add">
<CloseBold />

View File

@ -10,6 +10,12 @@
<el-text>
{{ item.name }}
</el-text>
<svg t="1745301209207" class="svg_icon" viewBox="0 0 7281 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="5471" width="256" height="256">
<path
d="M150.839971 441.855385C1232.762051 829.913873 2369.633487 1024 3560.089077 1024c1188.862854 0 2377.043108-193.403527 3563.971927-579.983046A227.533561 227.533561 0 1 0 6983.21773 11.248122C5841.113022 383.265493 4700.373516 568.932879 3560.089077 568.932879 2421.511139 568.932879 1336.744889 383.72056 304.425124 13.40969a227.533561 227.533561 0 0 0-153.585153 428.445695z"
p-id="5472"></path>
</svg>
</div>
</div>
<el-popover trigger="click" :width="600" title="全部分类" :visible="showPopover">
@ -560,8 +566,6 @@ function showSkuHandle(item) {
if (goodsItem && goodsItem.id) {
goodsStore.operateCart({ ...goodsItem, number: +goodsItem.number + 1 }, 'edit')
} else {
console.log(11111111);
goodsStore.addCart({ ...item.skuList[0], lowPrice: item.skuList[0].salePrice, number: item.skuList[0].suitNum })
}
} else if (item.type == 'weight') {
@ -965,24 +969,32 @@ onMounted(() => {
}
}
.svg_icon {
display: none;
fill: var(--primary-color);
width: 24px;
height: 24px;
position: absolute;
bottom: -8px;
left: 50%;
margin-left: -12px;
}
span {
font-size: var(--el-font-size-base);
}
&.active {
&::after {
content: "";
width: 70%;
height: 2px;
border-radius: 4px;
position: absolute;
bottom: 0;
left: 15%;
background-color: var(--primary-color);
.icon {
color: var(--primary-color);
}
.svg_icon {
display: block;
}
span {
color: #333;
color: var(--primary-color);
}
}
}

View File

@ -171,7 +171,8 @@
<!-- 打印插件是否加载好的提示 -->
<div class="print_tip" v-if="!printStore.isPrintService"
v-loading="!printStore.isPrintService && !printStore.showPrintNotService" element-loading-text="打印服务加载中...">
<el-dialog title="注意" v-model="printStore.showPrintNotService" :modal="false" top="30vh">
<el-dialog title="注意" v-model="printStore.showPrintNotService" :modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :show-close="false" top="30vh">
<span class="print_tip_title">打印服务未启动请重新加载程序或者退出后重新打开</span>
<template #footer>
<div class="dialog-footer">