Blame view

泰额版/Food Labeling Management App UniApp/src/utils/print/templates/previewSystemTemplate.ts 1.89 KB
59e51671   “wangming”   1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  import type { SystemLabelTemplate } from '../types/printer'
  
  export const PREVIEW_SYSTEM_TEMPLATE: SystemLabelTemplate = {
    id: 'template-preview-json-print',
    name: 'Preview JSON Template',
    labelType: 'PRICE',
    unit: 'inch',
    width: 4,
    height: 2,
    appliedLocation: 'ALL',
    showRuler: true,
    showGrid: true,
    elements: [
      {
        id: 'el-title',
        type: 'TEXT_STATIC',
        x: 104,
        y: 16,
        width: 160,
        height: 24,
        rotation: 'horizontal',
        border: 'none',
        config: {
          text: 'FOOD LABEL',
          fontFamily: 'Arial',
          fontSize: 14,
          fontWeight: 'bold',
          textAlign: 'center',
        },
      },
      {
        id: 'el-product-name',
        type: 'TEXT_PRODUCT',
        x: 96,
        y: 128,
        width: 120,
        height: 24,
        rotation: 'horizontal',
        border: 'none',
        config: {
          text: 'Product',
          fontFamily: 'Arial',
          fontSize: 14,
          fontWeight: 'normal',
          textAlign: 'left',
        },
      },
      {
        id: 'el-category',
        type: 'TEXT_STATIC',
        x: 88,
        y: 152,
        width: 140,
        height: 24,
        rotation: 'horizontal',
        border: 'none',
        config: {
          text: '{{category}}',
          fontFamily: 'Arial',
          fontSize: 14,
          fontWeight: 'normal',
          textAlign: 'left',
        },
      },
      {
        id: 'el-qrcode',
        type: 'QRCODE',
        x: 128,
        y: 40,
        width: 80,
        height: 80,
        rotation: 'horizontal',
        border: 'none',
        config: {
          data: '{{qrCode}}',
          errorLevel: 'M',
        },
      },
      {
        id: 'el-barcode',
        type: 'BARCODE',
        x: 208,
        y: 128,
        width: 160,
        height: 48,
        rotation: 'horizontal',
        border: 'none',
        config: {
          barcodeType: 'CODE128',
          data: '{{barcode}}',
          showText: true,
          orientation: 'horizontal',
        },
      },
    ],
  }