1.新增全部本地打印标签
2.优化订单重但标签小票
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
<template>
|
||||
<div class="device_container">
|
||||
<div class="header" @click="router.back()">
|
||||
<el-icon
|
||||
style="position: relative; top: 2px; margin-right: 4px"
|
||||
size="22"
|
||||
>
|
||||
<el-icon style="position: relative; top: 2px; margin-right: 4px" size="22">
|
||||
<ArrowLeft />
|
||||
</el-icon>
|
||||
<el-text>{{ form.id ? "编辑便签打印机" : "添加便签打印机" }}</el-text>
|
||||
@@ -26,28 +23,15 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="选择设备">
|
||||
<el-select v-model="form.config.deviceName">
|
||||
<el-option
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
v-for="item in printList"
|
||||
:key="item.name"
|
||||
></el-option>
|
||||
<el-option :label="item.name" :value="item.name" v-for="item in printList" :key="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入设备名称"
|
||||
></el-input>
|
||||
<el-input v-model="form.name" placeholder="请输入设备名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="打印份数">
|
||||
<el-select v-model="form.config.printerNum">
|
||||
<el-option
|
||||
:label="item"
|
||||
:value="item"
|
||||
v-for="item in 4"
|
||||
:key="item"
|
||||
></el-option>
|
||||
<el-option :label="item" :value="item" v-for="item in 4" :key="item"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品模式">
|
||||
@@ -58,16 +42,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类">
|
||||
<div style="cursor: pointer" @click="classifyRef.show()">
|
||||
<span
|
||||
style="color: #409eff"
|
||||
v-for="item in form.config.categoryList"
|
||||
>
|
||||
<span style="color: #409eff" v-for="item in form.config.categoryList">
|
||||
{{ item.name }},
|
||||
</span>
|
||||
<span
|
||||
style="color: #e65d6e"
|
||||
v-if="!form.config.categoryList.length"
|
||||
>
|
||||
<span style="color: #e65d6e" v-if="!form.config.categoryList.length">
|
||||
请选择分类
|
||||
</span>
|
||||
</div>
|
||||
@@ -115,12 +93,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 100%"
|
||||
:loading="loading"
|
||||
@click="submitHandle"
|
||||
>
|
||||
<el-button type="primary" style="width: 100%" :loading="loading" @click="submitHandle">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -129,17 +102,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<classify
|
||||
ref="classifyRef"
|
||||
@success="(e) => (form.config.categoryList = e)"
|
||||
/>
|
||||
<classify ref="classifyRef" @success="(e) => (form.config.categoryList = e)" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ipcRenderer } from "electron";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ElMessage, dayjs } from "element-plus";
|
||||
import { tbPrintMachinePost, tbPrintMachineDetail } from "@/api/device";
|
||||
import { useUser } from "@/store/user.js";
|
||||
import { Loading } from "element-plus/es/components/loading/src/service";
|
||||
@@ -190,8 +160,15 @@ function printHandle() {
|
||||
return;
|
||||
}
|
||||
ipcRenderer.send(
|
||||
"printStart",
|
||||
JSON.stringify({ deviceName: form.value.config.deviceName })
|
||||
"printerTagSync",
|
||||
JSON.stringify({
|
||||
deviceName: form.value.config.deviceName,
|
||||
outNumber: '123',
|
||||
name: '甜橙马黛茶',
|
||||
skuName: '加奶、加珍珠',
|
||||
masterId: '#A9',
|
||||
createdAt: dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -268,9 +245,11 @@ onMounted(() => {
|
||||
|
||||
.print_view {
|
||||
padding: 20px 0;
|
||||
|
||||
.blod {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user