gm-printer-label 3.1.6 → 3.1.7-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","/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",[]]
1
+ [{"/Volumes/gm-project/gm-printer-label/src/index.js":"1","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/edit_modify_filed.js":"2","/Volumes/gm-project/gm-printer-label/src/common/config.js":"3","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/store.js":"4","/Volumes/gm-project/gm-printer-label/src/util.js":"5","/Volumes/gm-project/gm-printer-label/src/printer/printer.js":"6","/Volumes/gm-project/gm-printer-label/src/printer/page.js":"7","/Volumes/gm-project/gm-printer-label/src/printer/block.js":"8","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/edit.js":"9","/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/edit_select.js":"10","/Volumes/gm-project/gm-printer-label/src/printer/batch_printer.js":"11"},{"size":180,"mtime":1658462117054,"results":"12","hashOfConfig":"13"},{"size":4956,"mtime":1670828102437},{"size":1699,"mtime":1658461960259},{"size":7294,"mtime":1661759246118,"results":"14","hashOfConfig":"13"},{"size":1937,"mtime":1661225223156,"results":"15","hashOfConfig":"13"},{"size":1832,"mtime":1670827635163,"results":"16","hashOfConfig":"13"},{"size":411,"mtime":1660567552793},{"size":12566,"mtime":1670827660171},{"size":2928,"mtime":1661759246116},{"size":6103,"mtime":1661767254469},{"size":825,"mtime":1670827635162},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"17s6x9q",{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Volumes/gm-project/gm-printer-label/src/index.js",[],"/Volumes/gm-project/gm-printer-label/src/common/editor_compoents/store.js",[],"/Volumes/gm-project/gm-printer-label/src/util.js",[],"/Volumes/gm-project/gm-printer-label/src/printer/printer.js",[]]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer-label",
3
- "version": "3.1.6",
3
+ "version": "3.1.7-beta.1",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -86,7 +86,6 @@ 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
89
  type === 'delivery_qrcode' ||
91
90
  type === 'merchandise_trace_qrcode') && (
92
91
  <div>
@@ -96,6 +95,13 @@ class EditModifyFiled extends React.Component {
96
95
  />
97
96
  </div>
98
97
  )}
98
+ {type === 'production_barcode' && (
99
+ <Size
100
+ withoutWidth
101
+ style={style}
102
+ onChange={this.handleChangeBlock.bind(this, 'style')}
103
+ />
104
+ )}
99
105
  {type === 'diyqrcode' && (
100
106
  <div>
101
107
  <Size
@@ -138,6 +138,7 @@ class Block extends React.Component {
138
138
  config,
139
139
  className,
140
140
  isStation,
141
+ doublePage,
141
142
  ...rest
142
143
  } = this.props
143
144
  const { isEdit } = this.state
@@ -278,7 +279,7 @@ class Block extends React.Component {
278
279
  value={template(production_barcode, data)}
279
280
  textMargin={0}
280
281
  margin={0}
281
- height={parseInt(style.height) - 14}
282
+ height={style.height}
282
283
  width={2}
283
284
  displayValue={false}
284
285
  dataName={production_barcode}
@@ -294,6 +295,7 @@ class Block extends React.Component {
294
295
  style={{ height: '100%', width: '100%' }}
295
296
  data-productionbarcode={template(production_barcode, data)}
296
297
  // 需要减去14才能打印出正确高度
298
+ data-doublepage={doublePage}
297
299
  data-height={parseInt(style.height) - 14}
298
300
  data-name={index}
299
301
  id={`production${template(production_barcode, data)}`}
@@ -362,7 +364,10 @@ class Block extends React.Component {
362
364
  )
363
365
  } else if (type === 'delivery_qrcode') {
364
366
  content = isStation ? (
365
- <QrCode value={template(delivery_qrcode, data)} size={parseInt(style.height)}/>
367
+ <QrCode
368
+ value={template(delivery_qrcode, data)}
369
+ size={parseInt(style.height)}
370
+ />
366
371
  ) : (
367
372
  <div
368
373
  data-deliveryqrcode={template(delivery_qrcode, data)}
@@ -445,7 +450,8 @@ Block.propTypes = {
445
450
  config: PropTypes.object.isRequired,
446
451
  data: PropTypes.object.isRequired,
447
452
  selected: PropTypes.number,
448
- isStation: PropTypes.bool
453
+ isStation: PropTypes.bool,
454
+ doublePage: PropTypes.bool
449
455
  }
450
456
 
451
457
  export default Block
@@ -32,6 +32,7 @@ class Printer extends React.Component {
32
32
  : +pageTypeMap[type].height.split('mm')[0]) *
33
33
  ratio +
34
34
  'mm'
35
+
35
36
  return (
36
37
  <div
37
38
  className='gm-printer-label'
@@ -50,6 +51,7 @@ class Printer extends React.Component {
50
51
  config={block}
51
52
  data={data}
52
53
  isStation={isStation}
54
+ doublePage={doublePage}
53
55
  />
54
56
  ))}
55
57
  </Page>