gm-printer-label 3.2.1-beta.2 → 3.2.1-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer-label",
3
- "version": "3.2.1-beta.2",
3
+ "version": "3.2.1-beta.4",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -87,7 +87,9 @@ class EditModifyFiled extends React.Component {
87
87
  type === 'image' ||
88
88
  type === 'rack_barcode' ||
89
89
  type === 'delivery_qrcode' ||
90
- type === 'merchandise_trace_qrcode') && (
90
+ type === 'merchandise_trace_qrcode' ||
91
+ type === 'verification_qrcode'
92
+ ) && (
91
93
  <div>
92
94
  <Size
93
95
  style={style}
@@ -119,6 +119,19 @@ class EditStore {
119
119
  }
120
120
  })
121
121
  break
122
+ case 'verification_qrcode':
123
+ this.config.blocks.push({
124
+ type,
125
+ verification_qrcode: i18next.t('{{验收二维码}}'),
126
+ style: {
127
+ position: 'absolute',
128
+ left: '0px',
129
+ top: '0px',
130
+ width: '50px',
131
+ height: '50px'
132
+ }
133
+ })
134
+ break
122
135
  case 'order_qrcode':
123
136
  this.config.blocks.push({
124
137
  type,
@@ -132,6 +132,7 @@ class Block extends React.Component {
132
132
  production_barcode,
133
133
  new_production_barcode,
134
134
  merchandise_trace_qrcode,
135
+ verification_qrcode,
135
136
  rack_barcode,
136
137
  delivery_qrcode
137
138
  },
@@ -215,6 +216,22 @@ class Block extends React.Component {
215
216
  data-placeholder='商品溯源二维码'
216
217
  />
217
218
  )
219
+ } else if (type === 'verification_qrcode') {
220
+ content = isStation ? (
221
+ <QrCode
222
+ value={miniAppLink + template(verification_qrcode, data)}
223
+ size={parseInt(style.height)}
224
+ />
225
+ ) : (
226
+ <div
227
+ data-verificationqrcode={template(verification_qrcode, data)}
228
+ data-width={style.width}
229
+ data-height={style.height}
230
+ data-name={index}
231
+ style={{ width: '100%', height: '100%' }}
232
+ data-placeholder='验收二维码'
233
+ />
234
+ )
218
235
  } else if (type === 'barcode') {
219
236
  content = isStation ? (
220
237
  <>