新增动态获取标签小票
This commit is contained in:
parent
8935b9d2f2
commit
8f42ba8189
|
|
@ -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 = '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://pre-cashierclient.sxczgkj.cn/cashier-client'
|
||||||
|
|
||||||
|
# 张松本地
|
||||||
# VITE_API_URL = 'https://36z1017t45.goho.co/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'
|
||||||
|
|
@ -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_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'
|
# 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://36z1017t45.goho.co/cashier-client'
|
||||||
|
|
||||||
# 正式
|
# 正式
|
||||||
VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'
|
# VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client'
|
||||||
|
|
@ -47,6 +47,9 @@ body {
|
||||||
}
|
}
|
||||||
.print_view .header .logo {
|
.print_view .header .logo {
|
||||||
width: 90px;
|
width: 90px;
|
||||||
|
height: 30px;
|
||||||
|
-o-object-fit: cover;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
.print_view .header .title {
|
.print_view .header .title {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@
|
||||||
<div class="print_view">
|
<div class="print_view">
|
||||||
<div class="ewm" id="ewm"></div>
|
<div class="ewm" id="ewm"></div>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img class="logo" src="./logo.png" />
|
<img class="logo" :src="data.ticketLogo || './logo.png'" />
|
||||||
<!-- <span class="title">双屿Pisces</span> -->
|
<!-- <span class="title">{{data.ticket_logo}}</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="number_wrap">
|
<div class="number_wrap">
|
||||||
<div class="num" v-if="data.outNumber">{{data.outNumber}}</div>
|
<div class="num" v-if="data.outNumber">{{data.outNumber}}</div>
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ body {
|
||||||
.logo {
|
.logo {
|
||||||
$size: 90px;
|
$size: 90px;
|
||||||
width: $size;
|
width: $size;
|
||||||
|
height: 30px;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { defineStore } from "pinia";
|
||||||
import { ipcRenderer } from "electron";
|
import { ipcRenderer } from "electron";
|
||||||
import { bySubType } from "@/api/device";
|
import { bySubType } from "@/api/device";
|
||||||
import { useUser } from "@/store/user.js";
|
import { useUser } from "@/store/user.js";
|
||||||
|
import { useShop } from "@/store/shop.js";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import receiptPrint from "@/components/lodop/receiptPrint.js";
|
import receiptPrint from "@/components/lodop/receiptPrint.js";
|
||||||
import lodopPrintWork from "@/components/lodop/lodopPrintWork.js";
|
import lodopPrintWork from "@/components/lodop/lodopPrintWork.js";
|
||||||
|
|
@ -64,6 +65,8 @@ export const usePrint = defineStore({
|
||||||
},
|
},
|
||||||
// 打印标签小票
|
// 打印标签小票
|
||||||
labelPrint(props) {
|
labelPrint(props) {
|
||||||
|
const shopInfo = useShop();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.deviceLableList.length &&
|
this.deviceLableList.length &&
|
||||||
this.checkLocalPrint(this.deviceLableList[0].config.deviceName)
|
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"),
|
createdAt: dayjs(props.createdAt).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
isPrint: false,
|
isPrint: false,
|
||||||
count: `${count}/${sum}`,
|
count: `${count}/${sum}`,
|
||||||
|
ticketLogo: shopInfo.info.ticketLogo,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
<div class="print_view">
|
<div class="print_view">
|
||||||
<canvas class="ewm" ref="canvasRef"></canvas>
|
<canvas class="ewm" ref="canvasRef"></canvas>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img class="logo" src="../../assets/prinnt_label_logo.png" />
|
<img class="logo" :src="shopInfo.info.ticketLogo" />
|
||||||
<!-- <span class="title">双屿Pisces</span> -->
|
<!-- <span class="title">双屿Pisces</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="number_wrap">
|
<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 classify from "@/components/classify/index.vue";
|
||||||
import QRCode from 'qrcode'
|
import QRCode from 'qrcode'
|
||||||
import { usePrint } from "@/store/print.js";
|
import { usePrint } from "@/store/print.js";
|
||||||
|
import { useShop } from "@/store/shop.js";
|
||||||
|
|
||||||
const printStore = usePrint();
|
const printStore = usePrint();
|
||||||
|
|
||||||
|
|
@ -129,6 +130,7 @@ const store = useUser();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const shopInfo = useShop();
|
||||||
|
|
||||||
const classifyRef = ref(null);
|
const classifyRef = ref(null);
|
||||||
const printList = ref([]);
|
const printList = ref([]);
|
||||||
|
|
@ -162,7 +164,8 @@ const printData = ref({
|
||||||
name: '【测试勿管】甜橙马黛茶',
|
name: '【测试勿管】甜橙马黛茶',
|
||||||
skuName: '测试、加珍珠',
|
skuName: '测试、加珍珠',
|
||||||
masterId: '#A9',
|
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 {
|
.logo {
|
||||||
$size: 90px;
|
$size: 90px;
|
||||||
width: $size;
|
width: $size;
|
||||||
|
height: 30px;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue