gm-printer-label 3.0.9 → 3.0.10

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":1934,"mtime":1642494468444,"results":"11","hashOfConfig":"12"},{"size":5505,"mtime":1635767717933,"results":"13","hashOfConfig":"12"},{"size":2694,"mtime":1635767728834,"results":"14","hashOfConfig":"12"},{"size":11621,"mtime":1635767876018,"results":"15","hashOfConfig":"12"},{"size":394,"mtime":1642488443965},{"size":1594,"mtime":1642499397285},{"size":3064,"mtime":1642499124287},{"size":9620,"mtime":1643263820878},{"size":825,"mtime":1642499158040},{"size":548,"mtime":1643102755561},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"18d3ysg",{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","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",[]]
1
+ [{"/Users/xurora/Desktop/gm-printer-label/src/util.js":"1","/Users/xurora/Desktop/gm-printer-label/src/printer/block.js":"2","/Users/xurora/Desktop/gm-printer-label/src/common/editor_compoents/store.js":"3"},{"size":1937,"mtime":1656502524283,"results":"4","hashOfConfig":"5"},{"size":10183,"mtime":1656502805870,"results":"6","hashOfConfig":"5"},{"size":7160,"mtime":1655951736143,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"10llghp",{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/xurora/Desktop/gm-printer-label/src/util.js",[],"/Users/xurora/Desktop/gm-printer-label/src/printer/block.js",[],"/Users/xurora/Desktop/gm-printer-label/src/common/editor_compoents/store.js",[]]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer-label",
3
- "version": "3.0.9",
3
+ "version": "3.0.10",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -106,6 +106,19 @@ class EditStore {
106
106
  }
107
107
  })
108
108
  break
109
+ case 'merchandise_trace_qrcode':
110
+ this.config.blocks.push({
111
+ type,
112
+ merchandise_trace_qrcode: i18next.t('{{商品溯源二维码}}'),
113
+ style: {
114
+ position: 'absolute',
115
+ left: '0px',
116
+ top: '0px',
117
+ width: '100px',
118
+ height: '100px'
119
+ }
120
+ })
121
+ break
109
122
  case 'order_qrcode':
110
123
  this.config.blocks.push({
111
124
  type,
@@ -202,6 +202,8 @@
202
202
  }
203
203
  }
204
204
 
205
+
206
+
205
207
  &.gm-printer-label-block-type-diyqrcode {
206
208
  div[data-diyqrcode] {
207
209
  outline: 1px solid red;
@@ -265,6 +267,18 @@
265
267
  top: calc(50% - 0.5em);
266
268
  }
267
269
  }
270
+
271
+ div[data-traceqrcode] {
272
+ outline: 1px solid red;
273
+
274
+ &::before {
275
+ content: '商品溯源二维码';
276
+ position: absolute;
277
+ font-style: italic;
278
+ left: calc(50% - 1.5em);
279
+ top: calc(50% - 0.5em);
280
+ }
281
+ }
268
282
 
269
283
  div[data-diycode] {
270
284
  outline: 1px solid red;
@@ -100,7 +100,8 @@ class Block extends React.Component {
100
100
  url,
101
101
  fieldType,
102
102
  fieldKey,
103
- production_barcode
103
+ production_barcode,
104
+ merchandise_trace_qrcode
104
105
  },
105
106
  data,
106
107
  className,
@@ -156,6 +157,22 @@ class Block extends React.Component {
156
157
  data-placeholder='订单溯源'
157
158
  />
158
159
  )
160
+ } else if (type === 'merchandise_trace_qrcode') {
161
+ content = isStation ? (
162
+ <QrCode
163
+ value={miniAppLink + template(merchandise_trace_qrcode, data)}
164
+ size={parseInt(style.height)}
165
+ />
166
+ ) : (
167
+ <div
168
+ data-traceqrcode={template(merchandise_trace_qrcode, data)}
169
+ data-width={style.width}
170
+ data-height={style.height}
171
+ data-name={index}
172
+ style={{ width: '100%', height: '100%' }}
173
+ data-placeholder='商品溯源二维码'
174
+ />
175
+ )
159
176
  } else if (type === 'barcode') {
160
177
  content = isStation ? (
161
178
  <>