gm-printer-label 3.1.4 → 3.1.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/util.js":"1","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit_select.js":"2","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit.js":"3","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/component.js":"4","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/qrcode.js":"5","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/printer.js":"6","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/index.js":"7","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/block.js":"8","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/batch_printer.js":"9","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/barcode.js":"10"},{"size":
|
|
1
|
+
[{"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/util.js":"1","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit_select.js":"2","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit.js":"3","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/component.js":"4","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/qrcode.js":"5","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/printer.js":"6","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/index.js":"7","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/block.js":"8","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/batch_printer.js":"9","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/barcode.js":"10","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/store.js":"11","/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit_modify_filed.js":"12"},{"size":1977,"mtime":1667378426022,"results":"13","hashOfConfig":"14"},{"size":5505,"mtime":1635767717933,"results":"15","hashOfConfig":"14"},{"size":2694,"mtime":1635767728834,"results":"16","hashOfConfig":"14"},{"size":11621,"mtime":1635767876018,"results":"17","hashOfConfig":"14"},{"size":394,"mtime":1642488443965},{"size":1594,"mtime":1642499397285},{"size":3064,"mtime":1642499124287},{"size":12450,"mtime":1667445782116,"results":"18","hashOfConfig":"14"},{"size":825,"mtime":1642499158040},{"size":548,"mtime":1643102755561},{"size":7909,"mtime":1667295849763,"results":"19","hashOfConfig":"14"},{"size":4786,"mtime":1667289014102,"results":"20","hashOfConfig":"14"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"18d3ysg",{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit_select.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/component.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/printer/block.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer-label/src/common/editor_compoents/edit_modify_filed.js",[]]
|
package/package.json
CHANGED
|
@@ -86,6 +86,8 @@ class EditModifyFiled extends React.Component {
|
|
|
86
86
|
type === 'package_id_qrcode' ||
|
|
87
87
|
type === 'image' ||
|
|
88
88
|
type === 'rack_barcode' ||
|
|
89
|
+
type === 'production_barcode' ||
|
|
90
|
+
type === 'delivery_qrcode' ||
|
|
89
91
|
type === 'merchandise_trace_qrcode') && (
|
|
90
92
|
<div>
|
|
91
93
|
<Size
|
|
@@ -237,6 +237,20 @@ class EditStore {
|
|
|
237
237
|
}
|
|
238
238
|
})
|
|
239
239
|
break
|
|
240
|
+
case 'delivery_qrcode':
|
|
241
|
+
|
|
242
|
+
this.config.blocks.push({
|
|
243
|
+
type,
|
|
244
|
+
delivery_qrcode: i18next.t('{{配送单二维码}}'),
|
|
245
|
+
style: {
|
|
246
|
+
position: 'absolute',
|
|
247
|
+
left: '0px',
|
|
248
|
+
top: '0px',
|
|
249
|
+
height: '80px',
|
|
250
|
+
width: '80px'
|
|
251
|
+
}
|
|
252
|
+
})
|
|
253
|
+
break
|
|
240
254
|
default:
|
|
241
255
|
window.alert(i18next.t('出错啦,未识别类型,此信息不应该出现'))
|
|
242
256
|
break
|
|
@@ -218,6 +218,20 @@
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
&.gm-printer-label-block-type-delivery_qrcode {
|
|
222
|
+
div[data-deliveryqrcode] {
|
|
223
|
+
outline: 1px solid red;
|
|
224
|
+
|
|
225
|
+
&::before {
|
|
226
|
+
content: attr(data-placeholder);
|
|
227
|
+
position: absolute;
|
|
228
|
+
font-style: italic;
|
|
229
|
+
left: calc(50% - 1.5em);
|
|
230
|
+
top: calc(50% - 0.5em);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
221
235
|
&.gm-printer-label-block-type-package_id_qrcode {
|
|
222
236
|
div[data-packageQrcode] {
|
|
223
237
|
outline: 1px solid red;
|
package/src/printer/block.js
CHANGED
|
@@ -131,9 +131,11 @@ class Block extends React.Component {
|
|
|
131
131
|
fieldKey,
|
|
132
132
|
production_barcode,
|
|
133
133
|
merchandise_trace_qrcode,
|
|
134
|
-
rack_barcode
|
|
134
|
+
rack_barcode,
|
|
135
|
+
delivery_qrcode
|
|
135
136
|
},
|
|
136
137
|
data,
|
|
138
|
+
config,
|
|
137
139
|
className,
|
|
138
140
|
isStation,
|
|
139
141
|
...rest
|
|
@@ -358,6 +360,19 @@ class Block extends React.Component {
|
|
|
358
360
|
data-placeholder='自定义二维码'
|
|
359
361
|
/>
|
|
360
362
|
)
|
|
363
|
+
} else if (type === 'delivery_qrcode') {
|
|
364
|
+
content = isStation ? (
|
|
365
|
+
<QrCode value={template(delivery_qrcode, data)} size={parseInt(style.height)}/>
|
|
366
|
+
) : (
|
|
367
|
+
<div
|
|
368
|
+
data-deliveryqrcode={template(delivery_qrcode, data)}
|
|
369
|
+
data-width={style.width}
|
|
370
|
+
data-height={style.height}
|
|
371
|
+
data-name={index}
|
|
372
|
+
style={{ width: '100%', height: '100%' }}
|
|
373
|
+
data-placeholder='配送单二维码'
|
|
374
|
+
/>
|
|
375
|
+
)
|
|
361
376
|
} else if (type === 'image') {
|
|
362
377
|
content = (
|
|
363
378
|
<img
|
package/src/util.js
CHANGED