新增动态获取标签小票

This commit is contained in:
gyq 2024-11-01 10:47:57 +08:00
parent 8935b9d2f2
commit 8f42ba8189
7 changed files with 23 additions and 8 deletions

View File

@ -29,12 +29,13 @@ VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# VITE_API_URL = 'http://192.168.1.34:10589/cashier-client'
# 测试
# VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client'
VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client'
# 预发布
# VITE_API_URL = 'https://pre-cashierclient.sxczgkj.cn/cashier-client'
# 张松本地
# VITE_API_URL = 'https://36z1017t45.goho.co/cashier-client'
# 正式
VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'
# VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'

View File

@ -17,7 +17,7 @@ VITE_API_PHP_URL = 'https://czgdoumei.sxczgkj.com/index.php/api'
VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# 测试
# VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client'
VITE_API_URL = 'https://cashier-client.sxczgkj.cn/cashier-client'
# 预发布
# VITE_API_URL = 'https://pre-cashierclient.sxczgkj.cn/cashier-client'
@ -26,4 +26,4 @@ VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# VITE_API_URL = 'https://36z1017t45.goho.co/cashier-client'
# 正式
VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'
# VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'

View File

@ -47,6 +47,9 @@ body {
}
.print_view .header .logo {
width: 90px;
height: 30px;
-o-object-fit: cover;
object-fit: cover;
}
.print_view .header .title {
margin-left: 6px;

View File

@ -14,8 +14,8 @@
<div class="print_view">
<div class="ewm" id="ewm"></div>
<div class="header">
<img class="logo" src="./logo.png" />
<!-- <span class="title">双屿Pisces</span> -->
<img class="logo" :src="data.ticketLogo || './logo.png'" />
<!-- <span class="title">{{data.ticket_logo}}</span> -->
</div>
<div class="number_wrap">
<div class="num" v-if="data.outNumber">{{data.outNumber}}</div>

View File

@ -38,6 +38,8 @@ body {
.logo {
$size: 90px;
width: $size;
height: 30px;
object-fit: cover;
}
.title {
margin-left: 6px;

View File

@ -2,6 +2,7 @@ import { defineStore } from "pinia";
import { ipcRenderer } from "electron";
import { bySubType } from "@/api/device";
import { useUser } from "@/store/user.js";
import { useShop } from "@/store/shop.js";
import dayjs from "dayjs";
import receiptPrint from "@/components/lodop/receiptPrint.js";
import lodopPrintWork from "@/components/lodop/lodopPrintWork.js";
@ -64,6 +65,8 @@ export const usePrint = defineStore({
},
// 打印标签小票
labelPrint(props) {
const shopInfo = useShop();
if (
this.deviceLableList.length &&
this.checkLocalPrint(this.deviceLableList[0].config.deviceName)
@ -97,6 +100,7 @@ export const usePrint = defineStore({
createdAt: dayjs(props.createdAt).format("YYYY-MM-DD HH:mm:ss"),
isPrint: false,
count: `${count}/${sum}`,
ticketLogo: shopInfo.info.ticketLogo,
});
}
}

View File

@ -78,7 +78,7 @@
<div class="print_view">
<canvas class="ewm" ref="canvasRef"></canvas>
<div class="header">
<img class="logo" src="../../assets/prinnt_label_logo.png" />
<img class="logo" :src="shopInfo.info.ticketLogo" />
<!-- <span class="title">双屿Pisces</span> -->
</div>
<div class="number_wrap">
@ -122,6 +122,7 @@ import { Loading } from "element-plus/es/components/loading/src/service";
import classify from "@/components/classify/index.vue";
import QRCode from 'qrcode'
import { usePrint } from "@/store/print.js";
import { useShop } from "@/store/shop.js";
const printStore = usePrint();
@ -129,6 +130,7 @@ const store = useUser();
const router = useRouter();
const route = useRoute();
const shopInfo = useShop();
const classifyRef = ref(null);
const printList = ref([]);
@ -162,7 +164,8 @@ const printData = ref({
name: '【测试勿管】甜橙马黛茶',
skuName: '测试、加珍珠',
masterId: '#A9',
createdAt: dayjs().format('YYYY-MM-DD HH:mm:ss')
createdAt: dayjs().format('YYYY-MM-DD HH:mm:ss'),
ticketLogo: shopInfo.info.ticketLogo,
})
//
@ -284,6 +287,8 @@ onMounted(() => {
.logo {
$size: 90px;
width: $size;
height: 30px;
object-fit: cover;
}
.title {