优化
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<el-form-item label="设备类型">
|
||||
<el-select v-model="form.connectionType">
|
||||
<el-option label="USB" value="USB"></el-option>
|
||||
<el-option label="网络" value="network"></el-option>
|
||||
<!-- <el-option label="网络" value="network"></el-option> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择设备">
|
||||
@@ -205,7 +205,7 @@ function getPrintList() {
|
||||
// 测试打印
|
||||
function printHandle() {
|
||||
if (!form.value.address) {
|
||||
ElMessage.warning("请选择打印设备");
|
||||
ElMessage.error("请选择打印设备");
|
||||
return;
|
||||
}
|
||||
printDataLoading.value = true;
|
||||
@@ -222,8 +222,12 @@ function printHandle() {
|
||||
// 提交打印机
|
||||
async function submitHandle() {
|
||||
try {
|
||||
if (!form.value.name) {
|
||||
ElMessage.error("请输入设备名称");
|
||||
return;
|
||||
}
|
||||
if (!form.value.address) {
|
||||
ElMessage.warning("请选择打印设备");
|
||||
ElMessage.error("请选择打印设备");
|
||||
return;
|
||||
}
|
||||
Loading.value = true;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-form-item label="设备类型">
|
||||
<el-select v-model="form.connectionType">
|
||||
<el-option label="USB" value="USB"></el-option>
|
||||
<el-option label="网络" value="network"></el-option>
|
||||
<!-- <el-option label="网络" value="network"></el-option> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择设备">
|
||||
@@ -67,7 +67,7 @@
|
||||
<div class="print_view">
|
||||
<canvas class="ewm" ref="canvasRef"></canvas>
|
||||
<div class="header">
|
||||
<img class="logo" :src="printData.ticketLogo" />
|
||||
<img class="logo" :src="printData.ticketLogo || logo" />
|
||||
<!-- <span class="title">双屿Pisces</span> -->
|
||||
</div>
|
||||
<div class="number_wrap">
|
||||
@@ -112,6 +112,7 @@ import classify from "@/components/classify/index.vue";
|
||||
import QRCode from 'qrcode'
|
||||
import { usePrint } from "@/store/print.js";
|
||||
import { useGoods } from '@/store/goods.js'
|
||||
import logo from '@/assets/prinnt_label_logo.png';
|
||||
|
||||
const goodsStore = useGoods()
|
||||
const printStore = usePrint();
|
||||
@@ -177,8 +178,16 @@ const printHandle = _.throttle(function () {
|
||||
// 提交打印机
|
||||
async function submitHandle() {
|
||||
try {
|
||||
if (!form.value.name) {
|
||||
ElMessage.error("请输入设备名称");
|
||||
return;
|
||||
}
|
||||
if (!form.value.address) {
|
||||
ElMessage.warning("请选择打印设备");
|
||||
ElMessage.error("请选择打印设备");
|
||||
return;
|
||||
}
|
||||
if (!form.value.categoryList.length) {
|
||||
ElMessage.error("请选择商品分类");
|
||||
return;
|
||||
}
|
||||
Loading.value = true;
|
||||
|
||||
Reference in New Issue
Block a user