gm-printer 10.28.8-beta.1 → 10.28.9

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 ADDED
@@ -0,0 +1 @@
1
+ [{"/Users/min/Documents/GMFE/gm-util/gm-printer/src/util.js":"1","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/get_css.js":"2","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcode.js":"3","/Users/min/Documents/GMFE/gm-util/gm-printer/src/index.js":"4","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/context_menu.js":"5","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/context_menu.js":"6","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/context_menu.js":"7","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/context_menu.js":"8","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/context_menu.js":"9","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor_special_table.js":"10","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/context_menu.js":"11","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/context_menu.js":"12","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/context_menu.js":"13","/Users/min/Documents/GMFE/gm-util/gm-printer/src/config.js":"14","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_store.js":"15","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_shadow_dom.js":"16","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/get_editor_css.js":"17","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_title.js":"18","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_store.js":"19","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_select.js":"20","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_edit_field.js":"21","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/component.js":"22","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/editor.js":"23","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/editor.js":"24","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/editor.js":"25","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/editor.js":"26","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/editor.js":"27","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor.js":"28","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account_statement/editor.js":"29","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/editor.js":"30","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/editor.js":"31","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/tooltip/index.js":"32","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_special_field.js":"33","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/store.js":"34","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/index.js":"35","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/do_print.js":"36","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/finance_printer.js":"37","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table_subtotal_tr.js":"38","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js":"39","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js":"40","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js":"41","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js":"42","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js":"43","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js":"44","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/flex/index.js":"45","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js":"46","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js":"47","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_add_field.js":"48","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/counter.js":"49","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.js":"50","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_diy_overallOrder_tr.js":"51"},{"size":7813,"mtime":1648799098282,"results":"52","hashOfConfig":"53"},{"size":291,"mtime":1638935573926,"results":"54","hashOfConfig":"55"},{"size":523,"mtime":1638935549030,"results":"56","hashOfConfig":"55"},{"size":1139,"mtime":1644572548725,"results":"57","hashOfConfig":"58"},{"size":2293,"mtime":1638948548042,"results":"59","hashOfConfig":"55"},{"size":2292,"mtime":1638948522492,"results":"60","hashOfConfig":"55"},{"size":1078,"mtime":1638948543271,"results":"61","hashOfConfig":"55"},{"size":2067,"mtime":1648466228565,"results":"62","hashOfConfig":"53"},{"size":2991,"mtime":1638948535719,"results":"63","hashOfConfig":"55"},{"size":4379,"mtime":1638935458586,"results":"64","hashOfConfig":"55"},{"size":2428,"mtime":1648466380496,"results":"65","hashOfConfig":"53"},{"size":2955,"mtime":1647850650993,"results":"66","hashOfConfig":"58"},{"size":5660,"mtime":1695026529575,"results":"67","hashOfConfig":"68"},{"size":2833,"mtime":1638861837310,"results":"69","hashOfConfig":"55"},{"size":4212,"mtime":1638935746667,"results":"70","hashOfConfig":"55"},{"size":861,"mtime":1638931446915,"results":"71","hashOfConfig":"55"},{"size":178,"mtime":1638931439249,"results":"72","hashOfConfig":"55"},{"size":3272,"mtime":1648713847909,"results":"73","hashOfConfig":"53"},{"size":46636,"mtime":1695028084459,"results":"74","hashOfConfig":"68"},{"size":4898,"mtime":1639992402586,"results":"75","hashOfConfig":"55"},{"size":21854,"mtime":1695028069713,"results":"76","hashOfConfig":"68"},{"size":15155,"mtime":1657626470824,"results":"77","hashOfConfig":"78"},{"size":2165,"mtime":1638949854481,"results":"79","hashOfConfig":"55"},{"size":2165,"mtime":1638949840121,"results":"80","hashOfConfig":"55"},{"size":2223,"mtime":1638949823846,"results":"81","hashOfConfig":"55"},{"size":2356,"mtime":1650083974574,"results":"82","hashOfConfig":"53"},{"size":3367,"mtime":1638949855771,"results":"83","hashOfConfig":"55"},{"size":2305,"mtime":1638949843817,"results":"84","hashOfConfig":"55"},{"size":3294,"mtime":1638949855131,"results":"85","hashOfConfig":"55"},{"size":2850,"mtime":1638949842017,"results":"86","hashOfConfig":"55"},{"size":4157,"mtime":1638949853726,"results":"87","hashOfConfig":"55"},{"size":605,"mtime":1638949882777,"results":"88","hashOfConfig":"55"},{"size":1175,"mtime":1638949720500,"results":"89","hashOfConfig":"55"},{"size":19364,"mtime":1728010871551,"results":"90","hashOfConfig":"91"},{"size":332,"mtime":1644573509040,"results":"92","hashOfConfig":"58"},{"size":4080,"mtime":1648536160221,"results":"93","hashOfConfig":"53"},{"size":8842,"mtime":1646363892377,"results":"94","hashOfConfig":"58"},{"size":4317,"mtime":1646376602197,"results":"95","hashOfConfig":"58"},{"size":9440,"mtime":1644993553716,"results":"96","hashOfConfig":"58"},{"size":724,"mtime":1644808940649,"results":"97","hashOfConfig":"58"},{"size":1717,"mtime":1648466368772,"results":"98","hashOfConfig":"53"},{"size":5563,"mtime":1658392065200,"results":"99","hashOfConfig":"78"},{"size":10376,"mtime":1695025236432,"results":"100","hashOfConfig":"68"},{"size":9001,"mtime":1648713828033,"results":"101","hashOfConfig":"53"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"102","hashOfConfig":"53"},{"size":600,"mtime":1657507507231,"results":"103","hashOfConfig":"78"},{"size":1945,"mtime":1657624830918,"results":"104","hashOfConfig":"78"},{"size":2009,"mtime":1659343100368,"results":"105","hashOfConfig":"78"},{"size":9861,"mtime":1659343100367,"results":"106","hashOfConfig":"78"},{"size":2513,"mtime":1695028123275,"results":"107","hashOfConfig":"68"},{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"116","messages":"117","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"128","messages":"129","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"yfiwrq",{"filePath":"134","messages":"135","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"138","messages":"139","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"146","messages":"147","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","errorCount":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"150","messages":"151","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"su5mnm",{"filePath":"152","messages":"153","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"158","messages":"159","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"164","messages":"165","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"2f4922",{"filePath":"176","messages":"177","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"182","messages":"183","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"184","messages":"185","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"194","messages":"195","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"200","messages":"201","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"206","messages":"207","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/min/Documents/GMFE/gm-util/gm-printer/src/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/get_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcode.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor_special_table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/config.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_store.js",["208","209"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/get_editor_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_title.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_select.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_edit_field.js",["210","211","212","213","214"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/component.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/tooltip/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_special_field.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/do_print.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/finance_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table_subtotal_tr.js",["215"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_add_field.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/counter.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_diy_overallOrder_tr.js",["216"],{"ruleId":"217","severity":2,"message":"218","line":10,"column":29,"nodeType":"219","endLine":10,"endColumn":35},{"ruleId":"217","severity":2,"message":"220","line":145,"column":63,"nodeType":"219","endLine":145,"endColumn":71},{"ruleId":"221","severity":1,"message":"222","line":344,"column":13,"nodeType":"223","endLine":344,"endColumn":49},{"ruleId":"221","severity":1,"message":"222","line":362,"column":13,"nodeType":"223","endLine":362,"endColumn":56},{"ruleId":"221","severity":1,"message":"222","line":519,"column":15,"nodeType":"223","endLine":519,"endColumn":53},{"ruleId":"221","severity":1,"message":"222","line":568,"column":11,"nodeType":"223","endLine":568,"endColumn":53},{"ruleId":"224","severity":2,"message":"225","line":669,"column":22,"nodeType":"226","messageId":"227","endLine":669,"endColumn":31},{"ruleId":"224","severity":2,"message":"225","line":120,"column":14,"nodeType":"226","messageId":"227","endLine":120,"endColumn":23},{"ruleId":"228","severity":2,"message":"229","line":13,"column":5,"nodeType":"219","endLine":13,"endColumn":11},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable","no-unused-vars","'config' is assigned a value but never used."]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.28.8-beta.1",
3
+ "version": "10.28.9",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -383,6 +383,7 @@ class CommonContextMenu extends React.Component {
383
383
  {arr.length === 6 &&
384
384
  arr[5] === 'counter' &&
385
385
  this.renderCounterMenu()}
386
+ {arr.length === 6 && arr[5] === 'tag' && this.renderCounterMenu()}
386
387
  </div>
387
388
  </Menu>
388
389
  )}
@@ -503,7 +503,7 @@ class EditorStore {
503
503
  } else {
504
504
  return
505
505
  }
506
- console.log('type')
506
+
507
507
  switch (type) {
508
508
  case '':
509
509
  case 'text':
@@ -554,6 +554,15 @@ class EditorStore {
554
554
  }
555
555
  })
556
556
  break
557
+ case 'tag':
558
+ blocks.push({
559
+ type: 'tag',
560
+ style: {
561
+ left: '0px',
562
+ top: '0px'
563
+ }
564
+ })
565
+ break
557
566
  case 'barcode':
558
567
  blocks.push({
559
568
  type: 'barcode',
@@ -589,18 +598,6 @@ class EditorStore {
589
598
  text: `{{uniform_social_credit_code}}`
590
599
  })
591
600
  break
592
- case 'qrcode_order_id':
593
- blocks.push({
594
- type: 'qrcode',
595
- style: {
596
- left: '0px',
597
- top: '5px',
598
- width: '75px',
599
- height: '75px'
600
- },
601
- text: `{{qrcode_order_id}}`
602
- })
603
- break
604
601
  default:
605
602
  window.alert(i18next.t('出错啦,未识别类型,此信息不应该出现'))
606
603
  }
@@ -805,8 +802,21 @@ class EditorStore {
805
802
  } else if (newDataKey.includes('multi3') && key === 'multi') {
806
803
  newDataKey = _.without(newDataKey, 'multi3')
807
804
  }
805
+ // 标签小计和分类小计互斥
806
+ if (newDataKey.includes('category') && key === 'tag') {
807
+ newDataKey = _.without(newDataKey, 'category')
808
+ } else if (newDataKey.includes('tag') && key === 'category') {
809
+ newDataKey = _.without(newDataKey, 'tag')
810
+ }
811
+ // 标签小计和商品分类互斥
812
+ if (newDataKey.includes('newCategory') && key === 'tag') {
813
+ newDataKey = _.without(newDataKey, 'newCategory')
814
+ } else if (newDataKey.includes('tag') && key === 'newCategory') {
815
+ newDataKey = _.without(newDataKey, 'tag')
816
+ }
808
817
 
809
818
  newDataKey = _.sortBy(newDataKey, [
819
+ o => o === 'tag',
810
820
  o => o === 'multi3',
811
821
  o => o === 'multi',
812
822
  o => o === 'newCategory',
@@ -7,7 +7,8 @@ import {
7
7
  DropDown,
8
8
  DropDownItem,
9
9
  DropDownItems,
10
- Dialog
10
+ Dialog,
11
+ Tip
11
12
  } from '../components'
12
13
  import { doPrint } from '../printer'
13
14
  import { toJS } from 'mobx'
@@ -46,6 +47,13 @@ class EditorTitle extends React.Component {
46
47
  handleSave = () => {
47
48
  const { editStore, isPurchase } = this.props
48
49
  const result = editStore.config
50
+ console.log(result, 'result')
51
+ if (result.isSave) {
52
+ Tip.warning(
53
+ i18next.t('检测到当前页面高度不足,无法完整渲染,请重新设置页面高度!')
54
+ )
55
+ return
56
+ }
49
57
  if (!isPurchase && result.batchPrintConfig) {
50
58
  delete result.batchPrintConfig
51
59
  }
@@ -76,7 +84,12 @@ class EditorTitle extends React.Component {
76
84
 
77
85
  handleSaveAs = () => {
78
86
  const { editStore } = this.props
79
-
87
+ if (editStore.config.isSave) {
88
+ Tip.warning(
89
+ i18next.t('检测到当前页面高度不足,无法完整渲染,请重新设置页面高度!')
90
+ )
91
+ return
92
+ }
80
93
  Dialog.render({
81
94
  title: i18next.t('另存为'),
82
95
  children: <DialogChildren editStore={editStore} />,
@@ -13,15 +13,12 @@ const blockTypeList = [
13
13
  { value: 'line', text: i18next.t('插入线条') },
14
14
  { value: 'image', text: i18next.t('插入图片') },
15
15
  { value: 'counter', text: i18next.t('插入分类汇总') },
16
+ { value: 'tag', text: i18next.t('插入标签汇总') },
16
17
  { value: 'barcode', text: i18next.t('插入订单条形码') },
17
18
  { value: 'qrcode', text: i18next.t('插入订单溯源二维码') },
18
19
  {
19
20
  value: 'uniform_social_credit_code',
20
21
  text: i18next.t('插入苏州安全监管平台二维码')
21
- },
22
- {
23
- value: 'qrcode_order_id',
24
- text: i18next.t('插入订单二维码')
25
22
  }
26
23
  ]
27
24
 
@@ -123,6 +120,7 @@ class ContextMenu extends React.Component {
123
120
  const isMultiActive = keyArr.includes('multi')
124
121
  const isThreeActive = keyArr.includes('multi3')
125
122
  const isCategoryActive = keyArr.includes('category')
123
+ const isTagActive = keyArr.includes('tag')
126
124
  const isNewCategoryActive = keyArr.includes('newCategory')
127
125
  const isSubtotalActive = subtotal.show
128
126
  const isOverallOrder = overallOrder?.show
@@ -155,6 +153,12 @@ class ContextMenu extends React.Component {
155
153
  >
156
154
  {i18next.t('分类小计')}
157
155
  </div>
156
+ <div
157
+ onClick={this.handleChangeTableDataKey.bind(this, 'tag', name)}
158
+ className={isTagActive ? 'active' : ''}
159
+ >
160
+ {i18next.t('标签小计')}
161
+ </div>
158
162
  <div
159
163
  onClick={this.handleCategoryConfig.bind(this, 'newCategory', name)}
160
164
  className={isNewCategoryActive ? 'active' : ''}
@@ -6,6 +6,7 @@ import { inject, observer } from 'mobx-react'
6
6
  import { dispatchMsg, getStyleWithDiff } from '../util'
7
7
  import BarCode from './barcode'
8
8
  import QrCode from './qrcode'
9
+ import Tag from './tag'
9
10
 
10
11
  @inject('printerStore')
11
12
  @observer
@@ -146,6 +147,11 @@ class Block extends React.Component {
146
147
  specialStyle = { zIndex: 9 }
147
148
  content = <Counter value={value} />
148
149
  name = `${name}.counter`
150
+ } else if (type === 'tag') {
151
+ // 🌡特殊处理: counter层级(9) 比 普通block层级(10)低. 为了让普通block被选中
152
+ specialStyle = { zIndex: 9 }
153
+ content = <Tag value={value} />
154
+ name = `${name}.tag`
149
155
  } else if (type === 'split_order_title') {
150
156
  // ⛑‍分单打印时,特殊的标题(由station的order_print的splitOrder函数修改config)
151
157
  content = (
@@ -78,6 +78,10 @@ class Printer extends React.Component {
78
78
  nextProps.isAutoFilling !== this.props.isAutoFilling ||
79
79
  nextProps.fillIndex !== this.props.printerStore.fillIndex
80
80
  ) {
81
+ // 连续打印计算导致死循环 所以这里做了判断 五年前的提交记录是这样写的 我跟着写 在componentDidMount里写了
82
+ if (nextProps.config.batchPrintConfig == 2) {
83
+ return
84
+ }
81
85
  await this.props.printerStore.setAutofillConfig(nextProps.isAutoFilling)
82
86
  await this.props.printerStore.setFillIndex(nextProps.fillIndex)
83
87
  await this.props.printerStore.setData(nextProps.data)
@@ -235,6 +239,9 @@ class Printer extends React.Component {
235
239
  <>
236
240
  {_.map(printerStore.pages, (page, i) => {
237
241
  const isLastPage = i === printerStore.pages.length - 1
242
+ if (page.length === 0) {
243
+ return null
244
+ }
238
245
  return (
239
246
  <Page key={i}>
240
247
  <Header config={config.header} pageIndex={i} />
@@ -9,6 +9,7 @@ import {
9
9
  } from '../util'
10
10
  import _ from 'lodash'
11
11
  import Big from 'big.js'
12
+ import { Tip } from '../components'
12
13
 
13
14
  export const TR_BASE_HEIGHT = 23
14
15
  const price = (n, f = 2) => {
@@ -33,6 +34,7 @@ class PrinterStore {
33
34
 
34
35
  /** 当前页剩余空白高度 */
35
36
  @observable remainPageHeight = 0
37
+ @observable isSave = false
36
38
 
37
39
  data = {}
38
40
 
@@ -61,6 +63,12 @@ class PrinterStore {
61
63
  this.isMultiDigitDecimal = bool
62
64
  }
63
65
 
66
+ @action
67
+ setIsSave(bool) {
68
+ this.isSave = bool
69
+ this.config.isSave = bool
70
+ }
71
+
64
72
  @action
65
73
  init(config, data) {
66
74
  this.ready = false
@@ -254,12 +262,17 @@ class PrinterStore {
254
262
 
255
263
  @action
256
264
  computedPages() {
265
+ this.setIsSave(false)
257
266
  // 每次先初始化置空
258
267
  this.pages = []
259
268
  // 每页必有 页眉header, 页脚footer , 签名
260
269
  const allPagesHaveThisHeight = this.height.header + this.height.footer
261
270
  // 退出计算! 因为页眉 + 页脚 > currentPageHeight,页面装不下其他东西
262
271
  if (allPagesHaveThisHeight > this.pageHeight) {
272
+ Tip.warning(
273
+ i18next.t('检测到当前页面高度不足,无法完整渲染,请重新设置页面高度!')
274
+ )
275
+ this.setIsSave(true)
263
276
  return
264
277
  }
265
278
 
@@ -364,6 +377,18 @@ class PrinterStore {
364
377
  end++
365
378
  }
366
379
  }
380
+ // 第一页一点表格都放不下时,什么都不展示
381
+ if (begin === 0 && end === 0 && index === 0) {
382
+ index++
383
+ this.pages = []
384
+ this.setIsSave(true)
385
+ Tip.warning(
386
+ i18next.t(
387
+ '检测到当前页面高度不足,无法完整渲染,请重新设置页面高度!'
388
+ )
389
+ )
390
+ break
391
+ }
367
392
  // 第一条极端会有问题
368
393
  if (end !== 0) {
369
394
  page.push({
@@ -0,0 +1,68 @@
1
+ import React from 'react'
2
+ import { inject, observer } from 'mobx-react'
3
+ import i18next from '../../locales'
4
+ import PropTypes from 'prop-types'
5
+
6
+ const configs = [
7
+ {
8
+ id: 'len',
9
+ name: (
10
+ <div className='gm-printer-counter-item-1'>{i18next.t('商品数')}</div>
11
+ ),
12
+ value: item => <div className='gm-printer-counter-item-1'>{item.len}</div>
13
+ },
14
+ {
15
+ id: 'subtotal',
16
+ name: <div className='gm-printer-counter-item-1'>{i18next.t('小计')}</div>,
17
+ value: item => (
18
+ <div className='gm-printer-counter-item-1'>{item.subtotal}</div>
19
+ )
20
+ },
21
+ {
22
+ id: 'quantity',
23
+ name: (
24
+ <div className='gm-printer-counter-item-1'>{i18next.t('下单数')}</div>
25
+ ),
26
+ value: item => (
27
+ <div className='gm-printer-counter-item-1'>{item.quantity}</div>
28
+ )
29
+ }
30
+ ]
31
+
32
+ @inject('printerStore')
33
+ @observer
34
+ class Tag extends React.Component {
35
+ render() {
36
+ // value, _tag 需要 初始值,兼容之前版本
37
+ const { printerStore, value = ['len'] } = this.props
38
+ const { _tag = [] } = printerStore.data
39
+
40
+ const rows = configs.filter(o => value.includes(o.id))
41
+
42
+ return (
43
+ <div className='gm-printer-counter'>
44
+ <div className='gm-printer-counter-item'>
45
+ <div>{i18next.t('标签')}</div>
46
+ {rows.map((row, i) => (
47
+ <span key={i}>{row.name}</span>
48
+ ))}
49
+ </div>
50
+ {_tag.map(item => (
51
+ <div key={item.text} className='gm-printer-counter-item'>
52
+ <div>{item.text}</div>
53
+ {rows.map((row, i) => (
54
+ <span key={i}>{row.value(item)}</span>
55
+ ))}
56
+ </div>
57
+ ))}
58
+ </div>
59
+ )
60
+ }
61
+ }
62
+
63
+ Tag.propTypes = {
64
+ printerStore: PropTypes.object,
65
+ value: PropTypes.array
66
+ }
67
+
68
+ export default Tag
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 16.17