huangxw 1 Minggu lalu
induk
melakukan
847b5ac9ac

+ 3 - 3
src/plant/models/batch-info.vue

@@ -2,15 +2,15 @@
     <view v-if="info">
         <view class="f-s-30 pd2-16-0 info-border-bottom">
             <span class="c-#666">品名:</span>
-            <span class="c-#333">{{ info?.proName }}</span>
+            <span class="c-#333">{{ info?.proName || '-' }}</span>
         </view>
         <view class="f-s-30 pd2-16-0 info-border-bottom">
             <span class="c-#666">批号:</span>
-            <span class="c-#333">{{ info?.batchSn }}</span>
+            <span class="c-#333">{{ info?.batchSn || '-' }}</span>
         </view>
         <view class="f-s-30 pd2-16-0 info-border-bottom">
             <span class="c-#666">规格等级:</span>
-            <span class="c-#333">{{ info?.proSpecn }}</span>
+            <span class="c-#333">{{ info?.proSpecn || '-' }}</span>
         </view>
         <view class="f-s-30 pd2-16-0 info-border-bottom">
             <span class="c-#666">产地:</span>

+ 1 - 1
src/plant/packaging/list/index.vue

@@ -85,7 +85,7 @@
                                     >查看批次信息</up-button
                                 >
                                 <template v-if="item.refType == '2'">
-                                    <up-button v-if="+item?.actualCount - item?.printCount" @click="$u.route({ url: '/plant/print/print-self/index', params: { mode: '' } })" class="ml-10" color="#37A954">立即打印</up-button>
+                                    <up-button v-if="+item?.actualCount - item?.printCount" @click="$u.route({ url: '/plant/print/print-self/index', params: { packId: item?.id, autoRelationId: item?.autoRelationId, unit: item?.unit, printedCount: item?.actualCount - item?.printCount } })" class="ml-10" color="#37A954">立即打印</up-button>
                                     <up-button v-if="+item?.printCount" class="ml-10" color="#37A954">查看打印记录</up-button>
                                 </template>
                                 <template v-if="item.refType == '1'">

+ 52 - 0
src/plant/print/models/check-info-pack.vue

@@ -0,0 +1,52 @@
+<template>
+    <view class="pd-24 bg-fff">
+        <batchInfo v-if="form" :info="form"></batchInfo>
+    </view>
+    <view class="pd3-10-24-30">
+        <view class="f-s-22 c-primary mb-30">若信息有误,请前往相应位置修改,核对无误后将进行打印或导出。</view>
+        <up-button @click="nextSteps" type="primary">确认无误,下一步</up-button>
+    </view>
+</template>
+<script setup lang="ts">
+import { useClientRequest } from '@/utils/request';
+ import batchInfo from '@/plant/models/batch-info.vue';
+const props = defineProps({
+    info: {
+        type: Object,
+        default: () => null,
+    },
+    opts: {
+        type: Object,
+        default: '',
+    },
+    nextStepValue: {
+        type: String,
+        default: '',
+    },
+})
+const emit = defineEmits(['next', 'info']);
+const form = ref(null);
+// 获取批次信息接口
+const getBatchInfo = async () => {
+    const res = await useClientRequest.get(`/plt-api/app/packTask/getPackTraceSimpleInfo/${props?.opts?.packId}`);
+    if (!res?.data) return
+    form.value = res?.data;
+    emit('info', res?.data);
+}
+const nextSteps = () => {
+    if (!form.value) {
+        uni.showToast({ icon: 'none', title: '请核对批次信息' });
+        return;
+    }
+    emit('next', {
+        info: {
+            ...props.info,
+            status: 'completed',
+        },
+        nextStepValue: props.nextStepValue || 'print',
+    });
+}
+onMounted(() => {
+    getBatchInfo();
+})
+</script>

+ 1 - 1
src/plant/print/models/connect-printer.vue

@@ -14,7 +14,7 @@
             <up-button v-if="isConnected" @click="handleDisconnect" class="mb-30" type="warning"> 断开连接 </up-button>
             <view class="d-flex a-c j-c">
                 <up-button @click="prevSteps" class="mr-30" plain type="primary">上一步</up-button>
-                <up-button @click="nextSteps" type="primary" plain>下一步</up-button>
+                <up-button @click="nextSteps" type="primary">下一步</up-button>
             </view>
         </view>
 

+ 101 - 0
src/plant/print/models/print-confirm-count.vue

@@ -0,0 +1,101 @@
+<template>
+    <view class="pd-24 bg-fff">
+        <up-form class="p-rtv bg-#fff" labelPosition="top" :model="form" :rules="rules" labelWidth="auto" ref="upFormUpRef">
+            <view class="f-s-24 c-#999">自行打印功能目前仅适配<span class="c-#333">佳博GP-M322打印机</span>,且标签显示字段 会根据不同规格纸张大小调整。如有疑问,请<span class="c-primary">点击此处联系客服</span>。</view>
+            <up-form-item :label="`待打印数量`" borderBottom>
+                <view class="f-s-30 c-#333 f-w-5">{{ opts?.printedCount }}</view>
+            </up-form-item>
+            <up-form-item :label="`打印数量`" prop="printCount" required borderBottom>
+                <up-input v-model="form.printCount" placeholder="请输入打印数量" border="none" clearable></up-input>
+                <template #right>
+                    <span class="f-s-30 f-w-5 c-#333">{{ opts?.unit || form?.unit || 'kg' }}</span>
+                </template>
+            </up-form-item>
+            <up-form-item :label="`打印人`" required borderBottom>
+                <up-input v-model="form.printPerson" placeholder="请输入打印人" readonly border="none" clearable></up-input>
+            </up-form-item>
+        </up-form>
+    </view>
+    <view class="pd3-40-24-30 d-flex">
+        <up-button class="mr-30" type="primary" plain @click="prevSteps">上一步</up-button>
+        <up-button type="primary" @click="submitForm">下一步</up-button>
+    </view>
+</template>
+<script setup lang="ts">
+import { useInfoStore } from '@/store';
+const infoStore = useInfoStore();
+const props = defineProps({
+    info: {
+        type: Object,
+        default: () => null,
+    },
+    nextStepValue: {
+        type: String,
+        default: '',
+    },
+    prevStepValue: {
+        type: String,
+        default: '',
+    },
+    item: {
+        type: Object,
+        default: () => null,
+    },
+    opts: {
+        type: Object,
+        default: () => null,
+    },
+});
+const upFormUpRef = ref();
+const emit = defineEmits(['next', 'prev', 'formdata']);
+const form = ref({
+    printCount: props?.opts?.printedCount || '',
+    printPerson: infoStore.userInfo?.name, // 打印人
+});
+const rules = reactive({
+    printCount: [
+        { required: true, message: '请输入打印数量' },
+        // 只能输入大于0的正整数
+        { pattern: /^[1-9]\d*$/, message: '请输入大于0的正整数' },
+        // 打印数量不能大于剩余可打印数量
+        {
+            asyncValidator: (rule: any, value: any) => {
+                if (value === undefined || value === null || value === '') return Promise.resolve();
+                const num = Number(value);
+                if (Number.isNaN(num)) return Promise.reject('打印数量请输入数字');
+                if (num <= 0) return Promise.reject('打印数量需大于0');
+                // 打印数量不能大于剩余可打印数量
+                if (+props?.opts?.printedCount < +num) {
+                    return Promise.reject(`打印数量不能超过待打印数量`);
+                }
+                return Promise.resolve();
+            },
+        },
+    ],
+});
+const submitForm = async () => {
+    try {
+        await upFormUpRef.value?.validate();
+    } catch (error: any) {
+       
+        return;
+    }
+    emit('formdata', {
+        ...form.value
+    });
+    emit('next', {
+        info: {
+            ...props.info,
+            status: 'completed',
+        },
+        nextStepValue: props.nextStepValue || 'print',
+    });
+};
+const prevSteps = () => {
+   
+    emit('prev', {
+        prevStepValue: props.prevStepValue || 'confirm',
+    });
+};
+onMounted(() => {});
+</script>

+ 19 - 19
src/plant/print/models/print-tem.ts

@@ -1,31 +1,31 @@
 // 30x30
 
-export const tem30x30 = (command: any, info: any[]) => {
+export const tem30x30 = (command: any, info: any[], item: any) => {
     const leftInfo = info[0];
     const rightInfo = info?.[1];
-    command.setText(30, 10, 'TSS16.BF2', 1, 1, '品名:' + leftInfo.pm);
-    command.setText(30, 30, 'TSS16.BF2', 1, 1, '生产日期:' + leftInfo.scrq);
-    command.setQR(55, 75, 'L', 4, 'A', leftInfo.qr);
+    command.setText(30, 10, 'TSS16.BF2', 1, 1, '品名:' + item.proName);
+    command.setText(30, 30, 'TSS16.BF2', 1, 1, '数量(重量):' + item.specn);
+    command.setQR(55, 75, 'L', 4, 'A', leftInfo.url);
     if (rightInfo) {
-        command.setText(280, 10, 'TSS16.BF2', 1, 1, '品名:' + rightInfo.pm);
-        command.setText(280, 30, 'TSS16.BF2', 1, 1, '生产日期:' + rightInfo.scrq);
-        command.setQR(315, 75, 'L', 4, 'A', rightInfo.qr);
+        command.setText(280, 10, 'TSS16.BF2', 1, 1, '品名:' + item.proName);
+        command.setText(280, 30, 'TSS16.BF2', 1, 1, '数量(重量):' + item.specn);
+        command.setQR(315, 75, 'L', 4, 'A', rightInfo.url);
     }
     return command;
 };
-export const tem60x40 = (command: any, info: any) => {
-    command.setQR(320, 150, 'L', 4, 'A', info.qr);
-    command.setText(30, 30, 'TSS16.BF2', 1, 1, '品名:' + info.pm);
-    command.setText(30, 60, 'TSS16.BF2', 1, 1, '生产日期:' + info.scrq);
-    command.setText(30, 90, 'TSS16.BF2', 1, 1, '厂家:' + info.cj);
-    command.setText(30, 120, 'TSS16.BF2', 1, 1, '追溯码:' + info.s);
+export const tem60x40 = (command: any, info: any, item: any) => {
+    command.setQR(320, 150, 'L', 4, 'A', info.traceCode);
+    command.setText(30, 30, 'TSS16.BF2', 1, 1, '品名:' + item.proName);
+    command.setText(30, 60, 'TSS16.BF2', 1, 1, '规格等级:' + item.proSpecn);
+    command.setText(30, 90, 'TSS16.BF2', 1, 1, '产地:' + item.proAdcodeDesc);
+    command.setText(30, 120, 'TSS16.BF2', 1, 1, '供应商:' + item.cpyName);
     return command;
 };
-export const tem60x60 = (command: any, info: any) => {
-    command.setQR(320, 150, 'L', 4, 'A', info.qr);
-    command.setText(30, 30, 'TSS16.BF2', 1, 1, '品名:' + info.pm);
-    command.setText(30, 60, 'TSS16.BF2', 1, 1, '生产日期:' + info.scrq);
-    command.setText(30, 90, 'TSS16.BF2', 1, 1, '厂家:' + info.cj);
-    command.setText(30, 120, 'TSS16.BF2', 1, 1, '追溯码:' + info.s);
+export const tem60x60 = (command: any, info: any, item: any) => {
+    command.setQR(320, 150, 'L', 4, 'A', info.traceCode);
+    command.setText(30, 30, 'TSS16.BF2', 1, 1, '品名:' + item.proName);
+    command.setText(30, 60, 'TSS16.BF2', 1, 1, '规格等级:' + item.proSpecn);
+    command.setText(30, 90, 'TSS16.BF2', 1, 1, '产地:' + item.proAdcodeDesc);
+    command.setText(30, 120, 'TSS16.BF2', 1, 1, '供应商:' + item.cpyName);
     return command;
 };

+ 13 - 4
src/plant/print/models/print-wrapper.vue

@@ -5,17 +5,17 @@
             <up-form-item label="打印规格" prop="printSpec" required>
                 <ut-radio :options="specs" v-model="form.printSpec"></ut-radio>
             </up-form-item>
-            <up-form-item :label="`打印数量:${printNum}`"></up-form-item>
+            <up-form-item :label="`打印数量:${printCount}`"></up-form-item>
         </up-form>
         <view>
-            <up-button :disabled="!form.printSpec" class="mb-24" type="primary">确认打印</up-button>
+            <up-button :disabled="!form.printSpec" @click="printClick" class="mb-24" type="primary">确认打印</up-button>
             <up-button @click="clickPrintTest" :disabled="!form.printSpec" class="mb-24" color="#18BECA">打印测试</up-button>
             <up-button @click="prevSteps" type="primary" plain>上一步</up-button>
         </view>
     </view>
 </template>
 <script lang="ts" setup>
-const emit = defineEmits(['test',  'prev']);
+const emit = defineEmits(['test',  'prev', 'print']);
 const props = defineProps({
     info: {
         type: Object,
@@ -29,7 +29,7 @@ const props = defineProps({
         type: String,
         default: 'connect'
     },
-    printNum: {
+    printCount: {
         type: Number,
         default: 1
     }
@@ -56,8 +56,17 @@ const rules = reactive({
 });
 // 点击打印测试
 const clickPrintTest = () => {
+    if (!form.value.printSpec) {
+        return uni.showToast({ icon: 'none', title: '请选择打印规格' });
+    }
     emit('test', form.value)
 }
+const printClick = () => {
+    if (!form.value.printSpec) {
+        return uni.showToast({ icon: 'none', title: '请选择打印规格' });
+    }
+    emit('print', form.value)
+};
 const prevSteps = () => {
    emit('prev', {
       prevStepValue: props.prevStepValue || 'confirm',

+ 2 - 2
src/plant/print/print-range/index.vue

@@ -22,9 +22,9 @@
 </template>
 
 <script setup lang="ts">
-import ConnectPrinter from './models/connect-printer.vue';
+import ConnectPrinter from '../models/connect-printer.vue';
 import { tem30x30, tem60x40, tem60x60 } from '../models/print-tem';
-import PrintWrapper from './models/print-wrapper.vue';
+import PrintWrapper from '../models/print-wrapper.vue';
 import { writeBLECharacteristicSend } from '@/utils/blue-device-services';
 import jpPrinter from '../models/tspl';
 const stepsObject = reactive<any>({

+ 102 - 37
src/plant/print/print-self/index.vue

@@ -1,49 +1,101 @@
 <template>
-    <z-paging ref="paging" bgColor="#fff" safe-area-inset-bottom scroll-with-animation>
+    <z-paging ref="paging" bgColor="#f7f7f7" safe-area-inset-bottom scroll-with-animation>
         <template #top>
             <ut-navbar :title="stepsObject[currentStep].title" :fixed="false" border :breadcrumb="false"></ut-navbar>
-            <view class="pd-24">
+            <view class="pd-24 bg-fff">
                 <ut-steps-title :stepsObject="stepsObject"></ut-steps-title>
             </view>
-            <view class="pd-5 bg-#f7f7f7"></view>
+            <view class="pd-5"></view>
         </template>
         <view>
-            <view v-show="currentStep === 'connect'">
+            <view v-show="currentStep === 'check'">
+                <!-- 业务组件核对信息 -->
+                <check-info-pack v-if="opts" :opts="opts" :info="stepsObject[currentStep]" @next="nextSteps" nextStepValue="confirm" @info="getInfoDetail"></check-info-pack>
+            </view>
+            <view v-show="currentStep === 'confirm'">
+                <!-- 业务组件确认数量 -->
+                <print-confirm-count v-if="opts" :info="stepsObject[currentStep]" :opts="opts" @formdata="getFormData" :item="info" prevStepValue="check" @prev="prevSteps" @next="nextSteps" nextStepValue="connect"></print-confirm-count>
+            </view>
+            <view v-show="currentStep === 'connect'" class="bg-fff">
                 <!-- 业务组件链接打印机 -->
                 <connect-printer :info="stepsObject[currentStep]" @next="nextSteps" @prev="prevSteps" prevStepValue="confirm" nextStepValue="print"></connect-printer>
             </view>
-            <view v-show="currentStep === 'print'">
+            <view v-show="currentStep === 'print'" class="bg-fff">
                 <!-- 业务组件打印 -->
                 <!-- 打印写入打印机 -->
-                <print-wrapper :info="stepsObject[currentStep]" @test="printTest" @prev="prevSteps" prevStepValue="connect"></print-wrapper>
+                <print-wrapper :info="stepsObject[currentStep]" :printCount="form?.printCount" @test="printTest" @prev="prevSteps" @print="printCodes" prevStepValue="connect"></print-wrapper>
             </view>
         </view>
     </z-paging>
 </template>
 
 <script setup lang="ts">
-import ConnectPrinter from './models/connect-printer.vue';
+import CheckInfoPack from '../models/check-info-pack.vue';
+import ConnectPrinter from '../models/connect-printer.vue';
+import PrintConfirmCount from '../models/print-confirm-count.vue';
 import { tem30x30, tem60x40, tem60x60 } from '../models/print-tem';
-import PrintWrapper from './models/print-wrapper.vue';
+import PrintWrapper from '../models/print-wrapper.vue';
 import { writeBLECharacteristicSend } from '@/utils/blue-device-services';
 import jpPrinter from '../models/tspl';
+import { useClientRequest } from '@/utils/request';
+const printSpec = ref('30x30');
+const printCodes = async (data: any) => {
+    printSpec.value = data.printSpec;
+    // 检查是否正在打印
+    if (isPrinting.value) {
+        uni.showToast({ icon: 'none', title: '当前打印任务未完成,请稍后' });
+        return;
+    }
+    isPrinting.value = true;
+    const res = await useClientRequest
+        .post('/plt-api/app/printLog/printNext', {
+            ...opts.value,
+            printType: '1',
+            printCount: form.value?.printCount || 1,
+        })
+        .catch((err) => {
+            isPrinting.value = false;
+        });
+    if (!res || res.code !== 200) {
+        isPrinting.value = false;
+        return;
+    }
+    getPrintCodeList(res.data);
+};
+
+// 打印列表
+const getPrintCodeList = async (data: any) => {
+    const res = await useClientRequest
+        .get(`/plt-api/app/printLog/getPrintCodeList/${data.id}`, {
+            start: data?.startSn,
+            end: data?.endSn,
+        })
+        .catch((err) => {
+            isPrinting.value = false;
+        });
+    if (!res || res.code !== 200) {
+        isPrinting.value = false;
+        return;
+    }
+    prepareSend(res?.data, printSpec.value)
+};
 const stepsObject = reactive<any>({
     check: {
         title: '核对信息',
         value: 'check',
-        status: 'completed', // 为开始、进行中、已完成 三种状态分别值为 'not-started'、'in-progress'、'completed'
+        status: 'in-progress', // 为开始、进行中、已完成 三种状态分别值为 'not-started'、'in-progress'、'completed'
         sort: 0,
     },
     confirm: {
         title: '确认数量',
         value: 'confirm',
-        status: 'completed', // 为开始、进行中、已完成 三种状态分别值为 'not-started'、'in-progress'、'completed'
+        status: 'not-started', // 为开始、进行中、已完成 三种状态分别值为 'not-started'、'in-progress'、'completed'
         sort: 1,
     },
     connect: {
         title: '连接打印机',
         value: 'connect',
-        status: 'in-progress', // 为开始、进行中、已完成 三种状态分别值为 'not-started'、'in-progress'、'completed'
+        status: 'not-started', // 为开始、进行中、已完成 三种状态分别值为 'not-started'、'in-progress'、'completed'
         sort: 2,
     },
     print: {
@@ -53,13 +105,17 @@ const stepsObject = reactive<any>({
         sort: 3,
     },
 });
-// 打印模式
-const mode = ref('self'); // 自行打印, 区间打印 值分别为 self, range
-const currentStep = ref('connect');
+
+const currentStep = ref('check');
 const paging = ref(null);
 const isPrinting = ref(false);
-onLoad((options: any) => {});
+const opts = ref<any>(null);
+onLoad((options: any) => {
+    opts.value = options;
+});
 const nextSteps = (data: any) => {
+    console.log(data);
+
     if (!data.info || !data?.info?.value) return;
     stepsObject[data?.info?.value] = {
         ...data.info,
@@ -67,42 +123,54 @@ const nextSteps = (data: any) => {
     stepsObject[data?.nextStepValue].status = 'in-progress';
     currentStep.value = data?.nextStepValue;
 };
+const info = ref<any>(null);
+const getInfoDetail = (data: any) => {
+    info.value = data;
+};
+const form = ref<any>(null);
+const getFormData = (data: any) => {
+    console.log('++++');
+    form.value = data;
+};
 const prevSteps = (data: any) => {
     currentStep.value = data?.prevStepValue;
 };
 const testList = reactive([
     {
-        pm: '三七',
-        zl: '20g',
-        scrq: '2012.09.18',
-        zzph: 87391273912,
-        cj: '云南省文山市县中药材有限公司',
-        zsm: 'QX0000005600000318',
-        qr: 'https://t.zycpzs.cn/?c=QCCS412507030000101ND'
+        padSn: '0000002',
+        prefix: 'PCC1W1260311',
+        sn: 2,
+        traceCode: 'PCC1W12603110000002AV',
+        url: 'https://t.yujin.shuziyunyao.com/pt?c=PCC1W12603110000002AV',
     },
 ]);
 const printTest = (data: any) => {
+    const device = stepsObject['connect']?.device;
+    if (!device) {
+        uni.showToast({ icon: 'none', title: '未连接设备' });
+        return;
+    }
     // 检查是否正在打印
     if (isPrinting.value) {
         uni.showToast({ icon: 'none', title: '当前打印任务未完成,请稍后' });
         return;
     }
+    isPrinting.value = true;
     // 测试数据
     prepareSend(testList, data.printSpec);
 };
 // 打印写入
 const prepareSend = (list: any[], spec: string = '30x30') => {
     if (spec == '30x30') {
-        // 判断idx是否是奇数
         writeSend30x30(list);
     }
     if (spec == '60x40') {
         // 40x40
-        writeSendCommand(list, '60x40', 0)
+        writeSendCommand(list, '60x40', 0);
     }
     if (spec == '60x60') {
         // 30x30
-        writeSendCommand(list, '60x60', 0)
+        writeSendCommand(list, '60x60', 0);
     }
 };
 const writeSend30x30 = (list: any[]) => {
@@ -115,14 +183,11 @@ const writeSend30x30 = (list: any[]) => {
         }
         return acc;
     }, []);
-    writeSendCommand(arr, '30x30', 0)
+    writeSendCommand(arr, '30x30', 0);
 };
 // writeSend
 const writeSendCommand = async (list: any[], spec: string = '30x30', idx = 0) => {
     // 首次调用时设置打印状态为进行中
-    if (idx === 0) {
-        isPrinting.value = true;
-    }
     let command = new jpPrinter();
     if (spec == '30x30') {
         // 判断idx是否是奇数
@@ -130,7 +195,7 @@ const writeSendCommand = async (list: any[], spec: string = '30x30', idx = 0) =>
         command.setGap(10);
         command.setCls();
         command.setDirection(1);
-        command = tem30x30(command, list[idx]);
+        command = tem30x30(command, list[idx], info.value);
     }
     if (spec == '60x40') {
         // 判断idx是否是奇数
@@ -138,7 +203,7 @@ const writeSendCommand = async (list: any[], spec: string = '30x30', idx = 0) =>
         command.setGap(10);
         command.setCls();
         command.setDirection(1);
-        command = tem60x40(command, list[idx]);
+        command = tem60x40(command, list[idx], info.value);
     }
     if (spec == '60x60') {
         // 判断idx是否是奇数
@@ -146,16 +211,16 @@ const writeSendCommand = async (list: any[], spec: string = '30x30', idx = 0) =>
         command.setGap(10);
         command.setCls();
         command.setDirection(1);
-        command = tem60x60(command, list[idx]);
+        command = tem60x60(command, list[idx], info.value);
     }
-    command.setPagePrint()
+    command.setPagePrint();
     const device = stepsObject['connect']?.device;
     if (!device) {
         uni.showToast({ icon: 'none', title: '未连接设备' });
         return;
     }
     console.log(command.getData());
-    
+
     await writeBLECharacteristicSend({
         deviceId: device.deviceId,
         serviceId: device.serviceId,
@@ -163,14 +228,14 @@ const writeSendCommand = async (list: any[], spec: string = '30x30', idx = 0) =>
         uint8Array: command.getData(),
     });
     if (list.length - 1 > idx) {
-        writeSendCommand(list, spec, idx + 1)
+        writeSendCommand(list, spec, idx + 1);
     } else {
         // 打印完成,重置状态
         isPrinting.value = false;
         uni.showToast({
             icon: 'none',
-            title: '打印完成'
-        })
+            title: '打印完成',
+        });
     }
 };
 // 如果是 30x30

+ 2 - 2
src/plant/print/print-steps/index.vue

@@ -22,9 +22,9 @@
 </template>
 
 <script setup lang="ts">
-import ConnectPrinter from './models/connect-printer.vue';
+import ConnectPrinter from '../models/connect-printer.vue';
 import { tem30x30, tem60x40, tem60x60 } from '../models/print-tem';
-import PrintWrapper from './models/print-wrapper.vue';
+import PrintWrapper from '../models/print-wrapper.vue';
 import { writeBLECharacteristicSend } from '@/utils/blue-device-services';
 import jpPrinter from '../models/tspl';
 const stepsObject = reactive<any>({

TEMPAT SAMPAH
src/static/images/audit/plant/GAP三无一全获评信息审核应用.png


TEMPAT SAMPAH
src/static/images/audit/plant/中药材种植全链条追溯应用.png


+ 0 - 1
src/utils/blue-device-services.ts

@@ -193,7 +193,6 @@ export const writeBLECharacteristicSend = async (
     }
 ): Promise<boolean> => {
     console.log(uint8Array, '----');
-    
     // 1. 统一数据格式为 Uint8Array
     const u8 = uint8Array instanceof Uint8Array ? uint8Array : new Uint8Array(uint8Array);
     const totalLength = u8.length;