hwh
2024-06-01 3779fc2f7a67dc4700aa6a6b7eb7e2ee6e5c1f6c
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
 
//业务方法------------------------Start-------------------------------------
//打印渲染js  configElementTypeProvider方法
//配置字段
var datalist = [
    {
        "type": "text",
        "title": "入库单号",
        "field": "ASNNo",
        "tid": "configModule.ASNNo",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "物料编码",
        "field": "SkuNo",
        "tid": "configModule.SkuNo",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "物料名称",
        "field": "SkuName",
        "tid": "configModule.SkuName",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "规格",
        "field": "Standard",
        "tid": "configModule.Standard",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "批次号",
        "field": "LotNo",
        "tid": "configModule.LotNo",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "批次描述",
        "field": "LotText",
        "tid": "configModule.LotText",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "数量",
        "field": "Qty",
        "tid": "configModule.Qty",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "单价",
        "field": "Price",
        "tid": "configModule.Price",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "总金额",
        "field": "Money",
        "tid": "configModule.Money",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
    {
        "type": "text",
        "title": "供货批次",
        "field": "SupplierLot",
        "tid": "configModule.SupplierLot",
        "editable": true,
        "columndisplayeditable": true,
        "columndisplayindexeditable": true,
        "columntitleeditable": true,
        "columnresizable": true,
        "columnaligneditable": true,
        "columns": null
    },
];
var configElementTypeProvider = (function () {
    return function (options) {
        //内容渲染     
        var addElementTypes = function (context) {
            context.addPrintElementTypes(
                "testModule",
                [
                    new hiprint.PrintElementTypeGroup("打印标签", datalist),
                    new hiprint.PrintElementTypeGroup("辅助", [
                        // {
                        //     tid: 'testModule.tableCustom',
                        //     title: '自定义表格',
                        //     type: 'tableCustom'
                        // },
                        { tid: 'configModule.customText', title: '自定义文本', customText: '自定义文本', custom: true, type: 'text' },
                        { tid: 'configModule.image', title: '图片', data: '../../js/hiprint/hi.png', type: 'image' },
                        {
                            tid: 'configModule.hline',
                            title: '横线',
                            type: 'hline'
                        },
                        {
                            tid: 'configModule.vline',
                            title: '竖线',
                            type: 'vline'
                        },
                        {
                            tid: 'configModule.rect',
                            title: '矩形',
                            type: 'rect'
                        },
                        {
                            tid: 'testModule.oval',
                            title: '椭圆',
                            type: 'oval'
                        }
                    ])
                ]
            );
        };
        return {
            addElementTypes: addElementTypes
        };
    };
})();