gm-printer 10.15.9-beta.0 → 10.16.0-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/ganmeng/Documents/GM-项目/gm-printer/src/printer/store.js":"1","/Users/ganmeng/Documents/GM-项目/gm-printer/src/editor/context_menu.js":"2","/Users/ganmeng/Documents/GM-项目/gm-printer/src/common/editor_store.js":"3","/Users/ganmeng/Documents/GM-项目/gm-printer/src/common/editor_customize_config.js":"4","/Users/ganmeng/Documents/GM-项目/gm-printer2/src/editor/context_menu.js":"5"},{"size":18202,"mtime":1653550658475,"results":"6","hashOfConfig":"7"},{"size":5189,"mtime":1653550658475,"results":"8","hashOfConfig":"7"},{"size":36126,"mtime":1653550658474,"results":"9","hashOfConfig":"7"},{"size":1578,"mtime":1653550658473,"results":"10","hashOfConfig":"7"},{"size":5160,"mtime":1654484017653,"results":"11","hashOfConfig":"12"},{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"cvcgct",{"filePath":"15","messages":"16","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"8681vq","/Users/ganmeng/Documents/GM-项目/gm-printer/src/printer/store.js",[],"/Users/ganmeng/Documents/GM-项目/gm-printer/src/editor/context_menu.js",[],"/Users/ganmeng/Documents/GM-项目/gm-printer/src/common/editor_store.js",[],"/Users/ganmeng/Documents/GM-项目/gm-printer/src/common/editor_customize_config.js",[],"/Users/ganmeng/Documents/GM-项目/gm-printer2/src/editor/context_menu.js",[]]
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":18215,"mtime":1670988134370,"results":"90","hashOfConfig":"78"},{"size":332,"mtime":1644573509040,"results":"91","hashOfConfig":"58"},{"size":4080,"mtime":1648536160221,"results":"92","hashOfConfig":"53"},{"size":8842,"mtime":1646363892377,"results":"93","hashOfConfig":"58"},{"size":4317,"mtime":1646376602197,"results":"94","hashOfConfig":"58"},{"size":9440,"mtime":1644993553716,"results":"95","hashOfConfig":"58"},{"size":724,"mtime":1644808940649,"results":"96","hashOfConfig":"58"},{"size":1717,"mtime":1648466368772,"results":"97","hashOfConfig":"53"},{"size":5563,"mtime":1658392065200,"results":"98","hashOfConfig":"78"},{"size":10376,"mtime":1695025236432,"results":"99","hashOfConfig":"68"},{"size":9001,"mtime":1648713828033,"results":"100","hashOfConfig":"53"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"101","hashOfConfig":"53"},{"size":600,"mtime":1657507507231,"results":"102","hashOfConfig":"78"},{"size":1945,"mtime":1657624830918,"results":"103","hashOfConfig":"78"},{"size":2009,"mtime":1659343100368,"results":"104","hashOfConfig":"78"},{"size":9861,"mtime":1659343100367,"results":"105","hashOfConfig":"78"},{"size":2513,"mtime":1695028123275,"results":"106","hashOfConfig":"68"},{"filePath":"107","messages":"108","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"109","messages":"110","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"111","messages":"112","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"113","messages":"114","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"115","messages":"116","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"117","messages":"118","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"119","messages":"120","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"121","messages":"122","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"123","messages":"124","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"125","messages":"126","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"127","messages":"128","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"129","messages":"130","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"131","messages":"132","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"yfiwrq",{"filePath":"133","messages":"134","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"135","messages":"136","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"137","messages":"138","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"139","messages":"140","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"141","messages":"142","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"143","messages":"144","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"147","messages":"148","errorCount":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"149","messages":"150","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"su5mnm",{"filePath":"151","messages":"152","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"153","messages":"154","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"155","messages":"156","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"157","messages":"158","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"161","messages":"162","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"163","messages":"164","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"165","messages":"166","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"167","messages":"168","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"169","messages":"170","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"171","messages":"172","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"173","messages":"174","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"175","messages":"176","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"179","messages":"180","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"181","messages":"182","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"183","messages":"184","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"185","messages":"186","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"187","messages":"188","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"189","messages":"190","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"191","messages":"192","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"193","messages":"194","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"195","messages":"196","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"197","messages":"198","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"199","messages":"200","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"201","messages":"202","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"203","messages":"204","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"205","messages":"206","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",["207","208"],"/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",["209","210","211","212","213"],"/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",["214"],"/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",["215"],{"ruleId":"216","severity":2,"message":"217","line":10,"column":29,"nodeType":"218","endLine":10,"endColumn":35},{"ruleId":"216","severity":2,"message":"219","line":145,"column":63,"nodeType":"218","endLine":145,"endColumn":71},{"ruleId":"220","severity":1,"message":"221","line":344,"column":13,"nodeType":"222","endLine":344,"endColumn":49},{"ruleId":"220","severity":1,"message":"221","line":362,"column":13,"nodeType":"222","endLine":362,"endColumn":56},{"ruleId":"220","severity":1,"message":"221","line":519,"column":15,"nodeType":"222","endLine":519,"endColumn":53},{"ruleId":"220","severity":1,"message":"221","line":568,"column":11,"nodeType":"222","endLine":568,"endColumn":53},{"ruleId":"223","severity":2,"message":"224","line":669,"column":22,"nodeType":"225","messageId":"226","endLine":669,"endColumn":31},{"ruleId":"223","severity":2,"message":"224","line":120,"column":14,"nodeType":"225","messageId":"226","endLine":120,"endColumn":23},{"ruleId":"227","severity":2,"message":"228","line":13,"column":5,"nodeType":"218","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.15.9-beta.0",
3
+ "version": "10.16.0-beta.1",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -112,4 +112,4 @@
112
112
  "dependencies": {
113
113
  "qrcode.react": "^0.9.2"
114
114
  }
115
- }
115
+ }
@@ -643,16 +643,26 @@ Gap.propTypes = {
643
643
  height: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
644
644
  }
645
645
 
646
- const FieldBtn = ({ name, onClick }) => (
647
- <Flex alignCenter style={{ width: '50%', margin: '3px 0' }}>
648
- <span className='gm-printer-edit-plus-btn' onClick={onClick}>
649
- +
650
- </span>
651
- <span className='gm-padding-left-5'>{name}</span>
652
- </Flex>
646
+ const FieldBtn = ({ name, remark, onClick }) => (
647
+ <>
648
+ <Flex alignCenter={!remark} style={{ width: '50%', margin: '3px 0' }}>
649
+ <span className='gm-printer-edit-plus-btn' onClick={onClick}>
650
+ +
651
+ </span>
652
+ <Flex column>
653
+ <span className='gm-padding-left-5'>{name}</span>
654
+ {remark && (
655
+ <span style={{ transform: 'scale(0.8) translateX(-20px)' }}>
656
+ {remark}
657
+ </span>
658
+ )}
659
+ </Flex>
660
+ </Flex>
661
+ </>
653
662
  )
654
663
  FieldBtn.propTypes = {
655
664
  name: PropTypes.string,
665
+ remark: PropTypes.string,
656
666
  onClick: PropTypes.func
657
667
  }
658
668
 
@@ -22,6 +22,7 @@ class FieldList extends React.Component {
22
22
  <FieldBtn
23
23
  key={o.key}
24
24
  name={o.key}
25
+ remark={o.remark}
25
26
  onClick={handleAddField.bind(this, o)}
26
27
  />
27
28
  ))}
@@ -20,6 +20,7 @@ import {
20
20
  import { get, toJS } from 'mobx'
21
21
  import PropTypes from 'prop-types'
22
22
  import { subtotalRadioList } from './util'
23
+ import _ from 'lodash'
23
24
 
24
25
  @inject('editStore')
25
26
  @observer
@@ -81,6 +82,11 @@ class EditorField extends React.Component {
81
82
  editStore.setOverallOrderStyle(value)
82
83
  }
83
84
 
85
+ handleDiyOverallOrderStyleChange = value => {
86
+ const { editStore } = this.props
87
+ editStore.setDiyOverallOrderStyle(value)
88
+ }
89
+
84
90
  renderBlocks() {
85
91
  const { editStore, showNewDate } = this.props
86
92
  const { type, text, style, link } = editStore.computedSelectedInfo
@@ -192,7 +198,8 @@ class EditorField extends React.Component {
192
198
  const {
193
199
  specialConfig,
194
200
  subtotal,
195
- overallOrder
201
+ overallOrder,
202
+ diyOverallOrder
196
203
  } = editStore.computedTableSpecialConfig
197
204
 
198
205
  // 小计样式,specialConfig可能是undefined
@@ -226,6 +233,13 @@ class EditorField extends React.Component {
226
233
  (editStore.computedTableSpecialConfig?.subtotal &&
227
234
  get(subtotal, 'isCustomCells')) ||
228
235
  false
236
+
237
+ // 打印账户总计金额
238
+ const printAccount =
239
+ (editStore.computedTableSpecialConfig?.subtotal &&
240
+ get(subtotal, 'isPrintAccount')) ||
241
+ false
242
+
229
243
  // 整单合计是否大写
230
244
  const overallOrderNeedUpperCase =
231
245
  (editStore.computedTableSpecialConfig?.overallOrder &&
@@ -246,7 +260,30 @@ class EditorField extends React.Component {
246
260
  (editStore.computedTableSpecialConfig?.overallOrder &&
247
261
  get(overallOrder, 'isCustomCells')) ||
248
262
  false
263
+ // 自定义整单合计样式
264
+ const diyOverallOrderStyle =
265
+ (diyOverallOrder && diyOverallOrder?.fields[0].style) || {}
266
+
267
+ // 自定义整单合计是否大写
268
+ const diyOverallOrderNeedUpperCase =
269
+ (editStore.computedTableSpecialConfig?.diyOverallOrder &&
270
+ get(diyOverallOrder, 'needUpperCase')) ||
271
+ false
272
+ // 自定义整单合计大写的金额是否在前
273
+ const diyOverallOrderCaseBefore =
274
+ (editStore.computedTableSpecialConfig?.diyOverallOrder &&
275
+ get(diyOverallOrder, 'isUpperCaseBefore')) ||
276
+ false
277
+ // 自定义整单合计大写和小写的金额是否分开
278
+ const diyOverallOrderUpperLowerCaseSeparate =
279
+ (editStore.computedTableSpecialConfig?.diyOverallOrder &&
280
+ get(diyOverallOrder, 'isUpperLowerCaseSeparate')) ||
281
+ false
282
+ // 自定义整单合计内容
249
283
 
284
+ const diyOverallOrderValueField =
285
+ editStore.computedTableSpecialConfig?.diyOverallOrder?.fields?.[0]
286
+ .valueField
250
287
  return (
251
288
  <div>
252
289
  <Title title={i18next.t('编辑字段')} />
@@ -433,7 +470,15 @@ class EditorField extends React.Component {
433
470
  </Flex>
434
471
  </div>
435
472
  )}
436
-
473
+ {/* 结款单不需要这个配置 */}
474
+ {!isSomeSubtotalTr && (
475
+ <EditorSubtotalCheck
476
+ subtotalCheckDisabled
477
+ subtotalChecked={printAccount}
478
+ subtotalCheckOnChange={editStore.setPrintAccount}
479
+ subtotalCheckText='打印账户总计金额'
480
+ />
481
+ )}
437
482
  <EditorSubtotalCheck
438
483
  subtotalCheckDisabled
439
484
  subtotalChecked={subtotalNeedUpperCase}
@@ -464,8 +509,12 @@ class EditorField extends React.Component {
464
509
  subtotalCheckText='开启自定义单元格'
465
510
  />
466
511
  <Text
512
+ // 只有自定义单元格的valueField值是空的,以后自每页合计,记得加type,之前没加,都无法区分
467
513
  value={
468
- subtotal && subtotal?.fields?.[1] ? subtotal.fields[1].name : ''
514
+ subtotal && subtotal?.fields?.length > 1
515
+ ? _.find(subtotal?.fields, item => !item.valueField)?.name ??
516
+ ''
517
+ : ''
469
518
  }
470
519
  onChange={editStore.setSubtotalFields}
471
520
  style={{ width: '65px', margin: '5px 0 5px 80px' }}
@@ -519,6 +568,68 @@ class EditorField extends React.Component {
519
568
  onChange={editStore.setOverallOrderFields}
520
569
  style={{ width: '65px', margin: '5px 0 5px 80px' }}
521
570
  />
571
+ {/* 自定义整单合计 */}
572
+ {editStore.config.showDiyOverAllOrder && (
573
+ <Flex>
574
+ <Flex>{i18next.t('自定义整单合计')}:</Flex>
575
+ <div>
576
+ <Fonter
577
+ style={diyOverallOrderStyle}
578
+ onChange={this.handleOverallOrderStyleChange}
579
+ />
580
+ <Separator />
581
+ <TextAlign
582
+ style={overallOrderStyle}
583
+ onChange={this.handleOverallOrderStyleChange}
584
+ />
585
+ <EditorSubtotalCheck
586
+ subtotalCheckDisabled
587
+ subtotalChecked={diyOverallOrderNeedUpperCase}
588
+ subtotalCheckOnChange={editStore.setDiyOverallOrderUpperCase}
589
+ subtotalCheckText='显示大写金额'
590
+ marginLeft
591
+ />
592
+ <EditorSubtotalCheck
593
+ subtotalCheckDisabled={diyOverallOrderNeedUpperCase}
594
+ subtotalChecked={diyOverallOrderCaseBefore}
595
+ subtotalCheckOnChange={
596
+ editStore.setDiyOverallOrderUpperCaseBefore
597
+ }
598
+ subtotalCheckText='大写金额在前'
599
+ marginLeft
600
+ />
601
+ <EditorSubtotalCheck
602
+ subtotalCheckDisabled={diyOverallOrderNeedUpperCase}
603
+ subtotalChecked={diyOverallOrderUpperLowerCaseSeparate}
604
+ subtotalCheckOnChange={
605
+ editStore.setDiyOverallOrderUpperLowerCaseSeparate
606
+ }
607
+ subtotalCheckText='大、小写金额分左右两边展示'
608
+ marginLeft
609
+ />
610
+ <Flex>
611
+ <Flex alignCenter>文案修改:</Flex>
612
+ <Text
613
+ value={
614
+ diyOverallOrder && diyOverallOrder?.fields?.[0]
615
+ ? diyOverallOrder.fields[0].name
616
+ : ''
617
+ }
618
+ onChange={editStore.setDiyOverallOrderFields}
619
+ style={{ width: '100px', margin: '5px 0 5px 0px' }}
620
+ />
621
+ </Flex>
622
+ <Textarea
623
+ value={diyOverallOrderValueField}
624
+ placeholder={i18next.t('请输入要整单合计字段')}
625
+ onChange={value =>
626
+ editStore.setDiyOverallOrderValueField(value)
627
+ }
628
+ />
629
+ <TipInfo text={i18next.t('不支持双栏和三栏模式')} />
630
+ </div>
631
+ </Flex>
632
+ )}
522
633
  </div>
523
634
  )
524
635
  }
@@ -552,11 +663,17 @@ class EditorSubtotalCheck extends React.Component {
552
663
  subtotalCheckDisabled,
553
664
  subtotalChecked,
554
665
  subtotalCheckOnChange,
555
- subtotalCheckText
666
+ subtotalCheckText,
667
+ marginLeft
556
668
  } = this.props
557
669
 
558
670
  return (
559
- <Flex style={{ margin: '5px 0 5px 62px' }}>
671
+ <Flex
672
+ style={{
673
+ margin: '5px 0 5px 62px',
674
+ marginLeft: marginLeft ? '0' : '62px'
675
+ }}
676
+ >
560
677
  <Flex alignCenter>
561
678
  <input
562
679
  type='checkbox'
@@ -575,7 +692,8 @@ EditorSubtotalCheck.propTypes = {
575
692
  subtotalCheckDisabled: PropTypes.bool,
576
693
  subtotalChecked: PropTypes.bool,
577
694
  subtotalCheckOnChange: PropTypes.func,
578
- subtotalCheckText: PropTypes.string
695
+ subtotalCheckText: PropTypes.string,
696
+ marginLeft: PropTypes.string
579
697
  }
580
698
 
581
699
  export default EditorField
@@ -3,6 +3,7 @@ import { action, computed, observable, set, toJS } from 'mobx'
3
3
  import { pageTypeMap } from '../config'
4
4
  import _ from 'lodash'
5
5
  import { dispatchMsg, getBlockName, exchange, getColSpanLength } from '../util'
6
+ import { accountRadioList } from './util'
6
7
  import React from 'react'
7
8
 
8
9
  class EditorStore {
@@ -65,6 +66,15 @@ class EditorStore {
65
66
  this.isAutoFilling = bol
66
67
  }
67
68
 
69
+ @action
70
+ setSubtotalFieldsCol(arr) {
71
+ // this.overallOrderShow = !this.overallOrderShow
72
+ // 重新计算每页合计的单元格
73
+ const table = this.config.contents[arr[2]]
74
+ const subtotalLength = table.subtotal.fields.length
75
+ table.subtotal.fields[subtotalLength - 1].colSpan += 1
76
+ }
77
+
68
78
  @action
69
79
  setMultiDigitDecimal(bool) {
70
80
  this.isMultiDigitDecimal = bool
@@ -97,6 +107,15 @@ class EditorStore {
97
107
  colSpan: 6 // 产品说3个,开启自定义单元格,客户不满意,改成6个
98
108
  }
99
109
 
110
+ // 每页合计打印账户总计金额
111
+ @observable
112
+ subtotalAccountConfigFields = {
113
+ name: '总计金额:',
114
+ valueField: '下单金额',
115
+ colSpan: 3,
116
+ type: 'useSummarize'
117
+ }
118
+
100
119
  @computed
101
120
  get computedPrinterKey() {
102
121
  return _.map(this.config, (v, k) => {
@@ -575,8 +594,11 @@ class EditorStore {
575
594
  ]
576
595
  })
577
596
  } else {
597
+ // 重新计算下单元格的格数
578
598
  table.subtotal.fields[0].colSpan =
579
- colSpanLength - (table.subtotal.fields?.[1]?.colSpan ?? 0)
599
+ colSpanLength -
600
+ (table.subtotal.fields?.[1]?.colSpan ?? 0) -
601
+ (table.subtotal.fields?.[2]?.colSpan ?? 0)
580
602
  }
581
603
  }
582
604
 
@@ -586,6 +608,14 @@ class EditorStore {
586
608
  this.overallOrderShow = !this.overallOrderShow
587
609
  const arr = this.selectedRegion.split('.')
588
610
  this.config.contents[arr[2]].subtotal.fields[0].valueField = fields.id
611
+
612
+ const fieldList = this.config.contents[arr[2]].subtotal.fields
613
+ // 打印账户总计金额的valueField也要修改
614
+ if (_.find(fieldList, item => item.type === 'useSummarize')) {
615
+ // 打印账户总计金额 固定是数组的第二个
616
+ this.config.contents[arr[2]].subtotal.fields[1].valueField =
617
+ accountRadioList[fields.id]
618
+ }
589
619
  }
590
620
  }
591
621
 
@@ -622,6 +652,38 @@ class EditorStore {
622
652
  this.config = toJS(this.config)
623
653
  }
624
654
 
655
+ @action
656
+ setDiyOverallOrderShow(name) {
657
+ const arr = name.split('.')
658
+ const table = this.config.contents[arr[2]]
659
+ this.overallOrderShow = !this.overallOrderShow
660
+ // const colSpanLength = getColSpanLength(table)
661
+ if (table.diyOverallOrder) {
662
+ set(table.diyOverallOrder, {
663
+ show: !table.diyOverallOrder.show
664
+ })
665
+ // table.overallOrder.fields[0].colSpan =
666
+ // colSpanLength - (table.overallOrder.fields?.[1]?.colSpan ?? 0)
667
+ } else {
668
+ // 兼容已经存在的配送单据,他们的配置存在后端的,没有overallOrder这个配置,给加上
669
+ set(table, {
670
+ diyOverallOrder: {
671
+ show: true,
672
+ fields: [
673
+ {
674
+ name: '自定义整单合计:',
675
+ valueField: '{{出库金额}}',
676
+ style: {
677
+ fontWeight: 'bold'
678
+ }
679
+ }
680
+ ]
681
+ }
682
+ })
683
+ }
684
+ this.config = toJS(this.config)
685
+ }
686
+
625
687
  @action
626
688
  setConfigTable(who, value) {
627
689
  if (!this.computedIsSelectTable) {
@@ -634,7 +696,12 @@ class EditorStore {
634
696
  @action
635
697
  changeTableDataKey(name, key) {
636
698
  const arr = name.split('.')
637
- const { dataKey, overallOrder, subtotal } = this.config.contents[arr[2]]
699
+ const {
700
+ dataKey,
701
+ overallOrder,
702
+ subtotal,
703
+ diyOverallOrder
704
+ } = this.config.contents[arr[2]]
638
705
  const keyArr = dataKey.split('_')
639
706
  let newDataKey
640
707
  // 当前有这个key则去掉
@@ -662,6 +729,8 @@ class EditorStore {
662
729
  if (overallOrder?.show) overallOrder.show = false
663
730
  // 每页合计不显示
664
731
  if (subtotal?.show) subtotal.show = false
732
+ // 自定义每页合计不显示
733
+ if (diyOverallOrder?.show) diyOverallOrder.show = false
665
734
  }
666
735
 
667
736
  @action
@@ -778,6 +847,7 @@ class EditorStore {
778
847
 
779
848
  this.clearExtraTableData(dataKey)
780
849
  this.setAutoFillingConfig(false)
850
+ this.setSubtotalFieldsCol(arr)
781
851
  }
782
852
  }
783
853
 
@@ -896,8 +966,8 @@ class EditorStore {
896
966
  const _selectedRegion = this.selectedRegion || _defaultRegion
897
967
  const arr = _selectedRegion.split('.')
898
968
  if (arr.includes('table')) {
899
- const height = this.config.contents[arr[2]].customerRowHeight
900
- resHeight = height === undefined ? 23 : height
969
+ const height = this.config.contents[arr[2]]?.customerRowHeight
970
+ resHeight = [undefined, ''].includes(height) ? 23 : height
901
971
  }
902
972
  }
903
973
  return resHeight
@@ -1097,6 +1167,86 @@ class EditorStore {
1097
1167
  }
1098
1168
  }
1099
1169
 
1170
+ // 每页合计打印账户总计金额
1171
+ // 写的很垃圾,因为每页合计这里改了4、5次,各种兼容,我人麻了
1172
+ // 每页合计这一行单元格,要计算每个要占几列,就很烦
1173
+ @action.bound
1174
+ setPrintAccount() {
1175
+ if (this.selectedRegion) {
1176
+ // 作用:触发组件的更新
1177
+ this.overallOrderShow = !this.overallOrderShow
1178
+ const arr = this.selectedRegion.split('.')
1179
+ const table = this.config.contents[arr[2]]
1180
+ const subtotalConfig = table?.subtotal
1181
+ // 没有显示每页合计的时候不可以设置
1182
+ if (!subtotalConfig?.show) return
1183
+ // 多栏表格情况,计算colSpan总列数
1184
+ const colSpanLength = getColSpanLength(table)
1185
+ const oldPrintAccount = subtotalConfig?.isPrintAccount
1186
+
1187
+ set(subtotalConfig, {
1188
+ isPrintAccount: !oldPrintAccount
1189
+ })
1190
+ // 兼容已经存在后端的模板,每页合计直接是显示的,导致每页合计配置没有fields,isCustomCells,手动添加上
1191
+ if (oldPrintAccount === undefined && !subtotalConfig.fields) {
1192
+ set(subtotalConfig, {
1193
+ fields: [
1194
+ {
1195
+ name: '每页合计:',
1196
+ valueField: 'real_item_price',
1197
+ colSpan: colSpanLength
1198
+ }
1199
+ ]
1200
+ })
1201
+ }
1202
+ // 开启打印账户总计金额
1203
+ if (subtotalConfig?.isPrintAccount) {
1204
+ // 同时还开启了自定义单元格选项
1205
+ if (subtotalConfig?.fields?.length === 2) {
1206
+ // fields添加自定义单元格
1207
+ subtotalConfig.fields = [
1208
+ subtotalConfig.fields[0],
1209
+ this.subtotalAccountConfigFields,
1210
+ subtotalConfig.fields[1]
1211
+ ]
1212
+ // 重新计算合并单元格的个数
1213
+ subtotalConfig.fields[0].colSpan = Math.floor(colSpanLength / 3)
1214
+ subtotalConfig.fields[1].colSpan = Math.floor(colSpanLength / 3)
1215
+ subtotalConfig.fields[2].colSpan =
1216
+ colSpanLength -
1217
+ subtotalConfig.fields[0].colSpan -
1218
+ subtotalConfig.fields[1].colSpan
1219
+ } else {
1220
+ // fields添加自定义单元格
1221
+ subtotalConfig.fields = [
1222
+ subtotalConfig.fields[0],
1223
+ this.subtotalAccountConfigFields
1224
+ ]
1225
+ // 重新计算合并单元格的个数
1226
+ subtotalConfig.fields[0].colSpan =
1227
+ colSpanLength - subtotalConfig.fields[1].colSpan
1228
+ }
1229
+ } else {
1230
+ // 关闭打印账户总计金额
1231
+ // 存在自定义单元格
1232
+ if (subtotalConfig?.fields?.length === 3) {
1233
+ subtotalConfig.fields = [
1234
+ subtotalConfig.fields[0],
1235
+ this.subtotalConfigFields
1236
+ ]
1237
+ // 重新计算合并单元格的个数
1238
+ subtotalConfig.fields[0].colSpan =
1239
+ colSpanLength - subtotalConfig.fields[1].colSpan
1240
+ } else {
1241
+ // 关闭,fields只有一个
1242
+ subtotalConfig.fields = [subtotalConfig.fields[0]]
1243
+ // 重新计算合并单元格的个数
1244
+ subtotalConfig.fields[0].colSpan = colSpanLength
1245
+ }
1246
+ }
1247
+ }
1248
+ }
1249
+
1100
1250
  // 每页合计开启自定义单元格
1101
1251
  @action.bound
1102
1252
  setSubtotalCustomCells() {
@@ -1129,21 +1279,48 @@ class EditorStore {
1129
1279
  }
1130
1280
  // 开启自定义单元格
1131
1281
  if (subtotalConfig?.isCustomCells) {
1132
- // fields添加自定义单元格
1133
- subtotalConfig.fields = [
1134
- subtotalConfig.fields[0],
1135
- {
1136
- ...this.subtotalConfigFields
1137
- }
1138
- ]
1139
- // 重新计算合并单元格的个数
1140
- subtotalConfig.fields[0].colSpan =
1141
- colSpanLength - subtotalConfig.fields[1].colSpan
1282
+ // 同时还开启了自定义单元格选项
1283
+ if (subtotalConfig?.fields?.length === 2) {
1284
+ // fields添加自定义单元格
1285
+ subtotalConfig.fields = [
1286
+ subtotalConfig.fields[0],
1287
+ this.subtotalAccountConfigFields,
1288
+ this.subtotalConfigFields
1289
+ ]
1290
+ // 重新计算合并单元格的个数
1291
+ subtotalConfig.fields[0].colSpan = Math.floor(colSpanLength / 3)
1292
+ subtotalConfig.fields[1].colSpan = Math.floor(colSpanLength / 3)
1293
+ subtotalConfig.fields[2].colSpan =
1294
+ colSpanLength -
1295
+ subtotalConfig.fields[0].colSpan -
1296
+ subtotalConfig.fields[1].colSpan
1297
+ } else {
1298
+ // fields添加自定义单元格
1299
+ subtotalConfig.fields = [
1300
+ subtotalConfig.fields[0],
1301
+ this.subtotalConfigFields
1302
+ ]
1303
+ // 重新计算合并单元格的个数
1304
+ subtotalConfig.fields[0].colSpan =
1305
+ colSpanLength - subtotalConfig.fields[1].colSpan
1306
+ }
1142
1307
  } else {
1143
- // 关闭自定义单元格,fields只有一个
1144
- subtotalConfig.fields = [subtotalConfig.fields[0]]
1145
- // 重新计算合并单元格的个数
1146
- subtotalConfig.fields[0].colSpan = colSpanLength
1308
+ // 关闭自定义单元格
1309
+ // 存在打印账户总计金额
1310
+ if (subtotalConfig?.fields?.length === 3) {
1311
+ subtotalConfig.fields = [
1312
+ subtotalConfig.fields[0],
1313
+ this.subtotalAccountConfigFields
1314
+ ]
1315
+ // 重新计算合并单元格的个数
1316
+ subtotalConfig.fields[0].colSpan =
1317
+ colSpanLength - subtotalConfig.fields[1].colSpan
1318
+ } else {
1319
+ // 关闭,fields只有一个
1320
+ subtotalConfig.fields = [subtotalConfig.fields[0]]
1321
+ // 重新计算合并单元格的个数
1322
+ subtotalConfig.fields[0].colSpan = colSpanLength
1323
+ }
1147
1324
  }
1148
1325
  }
1149
1326
  }
@@ -1158,7 +1335,9 @@ class EditorStore {
1158
1335
 
1159
1336
  if (subtotalConfig.isCustomCells) {
1160
1337
  const subtotalConfig = table?.subtotal.fields
1161
- subtotalConfig[1].name = value
1338
+ subtotalConfig.length === 3
1339
+ ? (subtotalConfig[2].name = value)
1340
+ : (subtotalConfig[1].name = value)
1162
1341
  }
1163
1342
  }
1164
1343
  }
@@ -1300,6 +1479,121 @@ class EditorStore {
1300
1479
  }
1301
1480
  }
1302
1481
 
1482
+ // 自定义整单合计样式设置
1483
+ @action.bound
1484
+ setDiyOverallOrderStyle(value) {
1485
+ if (this.selectedRegion) {
1486
+ const flexStyle = {
1487
+ left: 'flex-start',
1488
+ center: 'center',
1489
+ right: 'flex-end'
1490
+ }
1491
+ const arr = this.selectedRegion.split('.')
1492
+ const diyOverallOrderConfigFields = this.config.contents[arr[2]]
1493
+ ?.diyOverallOrder.fields
1494
+ _.forEach(diyOverallOrderConfigFields, item => {
1495
+ const oldStyle = item.style || {}
1496
+ set(item, {
1497
+ style: {
1498
+ ...oldStyle,
1499
+ ...value,
1500
+ // 整单合计里使用的flex布局,textAlign不生效
1501
+ 'justify-content': flexStyle[value.textAlign]
1502
+ }
1503
+ })
1504
+ })
1505
+ }
1506
+ }
1507
+
1508
+ // 自定义整单合计设置大写金额
1509
+ @action.bound
1510
+ setDiyOverallOrderUpperCase() {
1511
+ if (this.selectedRegion) {
1512
+ this.overallOrderShow = !this.overallOrderShow
1513
+ const arr = this.selectedRegion.split('.')
1514
+ const diyOverallOrderConfig = this.config.contents[arr[2]]
1515
+ ?.diyOverallOrder
1516
+
1517
+ const oldNeedUpperCase = diyOverallOrderConfig?.needUpperCase
1518
+ this.config.contents[arr[2]]?.diyOverallOrder &&
1519
+ set(diyOverallOrderConfig, { needUpperCase: !oldNeedUpperCase })
1520
+ // 没有大写金额时,将大写在前和大小写分开的多选框设置为false
1521
+ if (
1522
+ this.config.contents[arr[2]]?.diyOverallOrder &&
1523
+ diyOverallOrderConfig.needUpperCase === false
1524
+ ) {
1525
+ diyOverallOrderConfig.isUpperCaseBefore &&
1526
+ set(diyOverallOrderConfig, { isUpperCaseBefore: false })
1527
+ diyOverallOrderConfig.isUpperLowerCaseSeparate &&
1528
+ set(diyOverallOrderConfig, { isUpperLowerCaseSeparate: false })
1529
+ }
1530
+ }
1531
+ }
1532
+
1533
+ // 自定义整单合计设置大写金额在前
1534
+ @action.bound
1535
+ setDiyOverallOrderUpperCaseBefore() {
1536
+ if (this.selectedRegion) {
1537
+ this.overallOrderShow = !this.overallOrderShow
1538
+ const arr = this.selectedRegion.split('.')
1539
+ const diyOverallOrderConfig = this.config.contents[arr[2]]
1540
+ ?.diyOverallOrder
1541
+
1542
+ const oldUpperCaseBefore = diyOverallOrderConfig?.isUpperCaseBefore
1543
+ this.config.contents[arr[2]]?.diyOverallOrder &&
1544
+ set(diyOverallOrderConfig, { isUpperCaseBefore: !oldUpperCaseBefore })
1545
+ }
1546
+ }
1547
+
1548
+ // 自定义整单合计设置大小写金额分开
1549
+ @action.bound
1550
+ setDiyOverallOrderUpperLowerCaseSeparate() {
1551
+ if (this.selectedRegion) {
1552
+ this.overallOrderShow = !this.overallOrderShow
1553
+ const arr = this.selectedRegion.split('.')
1554
+ const diyOverallOrderConfig = this.config.contents[arr[2]]
1555
+ ?.diyOverallOrder
1556
+
1557
+ const oldUpperLowerCaseSeparate =
1558
+ diyOverallOrderConfig.isUpperLowerCaseSeparate
1559
+ set(diyOverallOrderConfig, {
1560
+ isUpperLowerCaseSeparate: !oldUpperLowerCaseSeparate
1561
+ })
1562
+ }
1563
+ }
1564
+
1565
+ // 自定义整单合计 字段设置
1566
+ @action.bound
1567
+ setDiyOverallOrderValueField(value) {
1568
+ if (this.selectedRegion) {
1569
+ this.overallOrderShow = !this.overallOrderShow
1570
+ const arr = this.selectedRegion.split('.')
1571
+ const diyOverallOrderConfig = this.config.contents[arr[2]]
1572
+ ?.diyOverallOrder
1573
+
1574
+ const oldValueField = diyOverallOrderConfig.fields?.[0]
1575
+ set(oldValueField, {
1576
+ valueField: value
1577
+ })
1578
+ }
1579
+ }
1580
+
1581
+ // 整单合计自定义单元格文本输入
1582
+ @action.bound
1583
+ setDiyOverallOrderFields(value) {
1584
+ if (this.selectedRegion) {
1585
+ this.overallOrderShow = !this.overallOrderShow
1586
+ const arr = this.selectedRegion.split('.')
1587
+ const table = this.config.contents[arr[2]]
1588
+ const diyOverallOrderConfig = table?.diyOverallOrder
1589
+
1590
+ const oldValueField = diyOverallOrderConfig.fields?.[0]
1591
+ set(oldValueField, {
1592
+ name: value
1593
+ })
1594
+ }
1595
+ }
1596
+
1303
1597
  // 合计和每页合计设置交换位置
1304
1598
  @action.bound
1305
1599
  setSubtotalCommutationPlace() {
@@ -16,4 +16,9 @@ const subtotalRadioList = [
16
16
  }
17
17
  ]
18
18
 
19
- export { subtotalRadioList }
19
+ const accountRadioList = {
20
+ total_item_price: i18next.t('下单金额'),
21
+ real_item_price: i18next.t('出库金额')
22
+ }
23
+
24
+ export { subtotalRadioList, accountRadioList }
@@ -5,6 +5,7 @@ import CommonContextMenu from '../common/common_context_menu'
5
5
  import { inject, observer } from 'mobx-react'
6
6
  import _ from 'lodash'
7
7
  import { Printer } from '../printer'
8
+ import { isMultiTable } from '../util'
8
9
 
9
10
  const blockTypeList = [
10
11
  { value: '', text: i18next.t('插入文本') },
@@ -79,6 +80,11 @@ class ContextMenu extends React.Component {
79
80
  editStore.setOverallOrderShow(name)
80
81
  }
81
82
 
83
+ handleDiyOverallOrder = name => {
84
+ const { editStore } = this.props
85
+ editStore.setDiyOverallOrderShow(name)
86
+ }
87
+
82
88
  renderOrderActionBtn = name => {
83
89
  if (!this.hasSubtotalBtn(name)) {
84
90
  return null
@@ -87,7 +93,8 @@ class ContextMenu extends React.Component {
87
93
  const {
88
94
  editStore: {
89
95
  config: {
90
- page: { type }
96
+ page: { type },
97
+ showDiyOverAllOrder
91
98
  },
92
99
  isAutoFilling
93
100
  }
@@ -96,7 +103,8 @@ class ContextMenu extends React.Component {
96
103
  const {
97
104
  dataKey,
98
105
  subtotal,
99
- overallOrder
106
+ overallOrder,
107
+ diyOverallOrder
100
108
  } = this.props.editStore.config.contents[arr[2]]
101
109
  const keyArr = dataKey.split('_')
102
110
 
@@ -105,6 +113,7 @@ class ContextMenu extends React.Component {
105
113
  const isCategoryActive = keyArr.includes('category')
106
114
  const isSubtotalActive = subtotal.show
107
115
  const isOverallOrder = overallOrder?.show
116
+ const isDiyOverallOrder = diyOverallOrder?.show
108
117
 
109
118
  return (
110
119
  <>
@@ -147,6 +156,14 @@ class ContextMenu extends React.Component {
147
156
  >
148
157
  {i18next.t('整单合计')}
149
158
  </div>
159
+ {!isMultiTable(dataKey) && showDiyOverAllOrder && (
160
+ <div
161
+ onClick={this.handleDiyOverallOrder.bind(this, name)}
162
+ className={isDiyOverallOrder ? 'active' : ''}
163
+ >
164
+ {i18next.t('自定义整单合计')}
165
+ </div>
166
+ )}
150
167
  </>
151
168
  )
152
169
  }
@@ -50,16 +50,16 @@ class Editor extends React.Component {
50
50
  text={
51
51
  <span className='gm-text-desc gm-padding-left-5'>
52
52
  {i18next.t(
53
- '说明:选中内容进行编辑,可拖动字段移动位置,右键使用更多功能,更多详情点击'
53
+ '说明:选中内容进行编辑,可拖动字段移动位置,右键使用更多功能'
54
54
  )}
55
- <a
55
+ {/* <a
56
56
  href='https://v.qq.com/x/page/t08044292dd.html'
57
57
  target='_blank'
58
58
  className='btn-link'
59
59
  rel='noopener noreferrer'
60
60
  >
61
61
  {i18next.t('查看视频教程')}
62
- </a>
62
+ </a> */}
63
63
  </span>
64
64
  }
65
65
  />
@@ -28,16 +28,16 @@ class Editor extends React.Component {
28
28
  text={
29
29
  <span className='gm-text-desc gm-padding-left-5'>
30
30
  {i18next.t(
31
- '说明:选中内容进行编辑,可拖动字段移动位置,右键使用更多功能,更多详情点击'
31
+ '说明:选中内容进行编辑,可拖动字段移动位置,右键使用更多功能'
32
32
  )}
33
- <a
33
+ {/* <a
34
34
  href='https://v.qq.com/x/page/t08044292dd.html'
35
35
  target='_blank'
36
36
  className='btn-link'
37
37
  rel='noopener noreferrer'
38
38
  >
39
39
  {i18next.t('查看视频教程')}
40
- </a>
40
+ </a> */}
41
41
  </span>
42
42
  }
43
43
  />
@@ -50,16 +50,16 @@ class Editor extends React.Component {
50
50
  text={
51
51
  <span className='gm-text-desc gm-padding-left-5'>
52
52
  {i18next.t(
53
- '说明:选中内容进行编辑,可拖动字段移动位置,右键使用更多功能,更多详情点击'
53
+ '说明:选中内容进行编辑,可拖动字段移动位置,右键使用更多功能'
54
54
  )}
55
- <a
55
+ {/* <a
56
56
  href='https://v.qq.com/x/page/t08044292dd.html'
57
57
  target='_blank'
58
58
  className='btn-link'
59
59
  rel='noopener noreferrer'
60
60
  >
61
61
  {i18next.t('查看视频教程')}
62
- </a>
62
+ </a> */}
63
63
  </span>
64
64
  }
65
65
  />
@@ -139,8 +139,8 @@ class PrinterStore {
139
139
  const _selectedRegion = this.selectedRegion || _defaultRegion
140
140
  const arr = _selectedRegion.split('.')
141
141
  if (arr.includes('table')) {
142
- const height = this.config.contents[arr[2]].customerRowHeight
143
- return height === undefined ? 23 : height
142
+ const height = this.config.contents[arr[2]]?.customerRowHeight
143
+ return [undefined, ''].includes(height) ? 23 : height
144
144
  }
145
145
  }
146
146
  return 23
@@ -17,6 +17,7 @@ import SpecialTr from './table_special_tr'
17
17
  import SubtotalTr from './table_subtotal_tr'
18
18
  import PageSummary from './page_summary'
19
19
  import OverallOrder from './table_overallOrder_tr'
20
+ import DiyOverallOrder from './table_diy_overallOrder_tr'
20
21
 
21
22
  @inject('printerStore')
22
23
  @observer
@@ -303,6 +304,12 @@ class Table extends React.Component {
303
304
  config={config}
304
305
  printerStore={printerStore}
305
306
  />
307
+ <DiyOverallOrder
308
+ range={range}
309
+ config={config}
310
+ printerStore={printerStore}
311
+ pageIndex={pageIndex}
312
+ />
306
313
  </tbody>
307
314
  </table>
308
315
  )
@@ -0,0 +1,83 @@
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import _ from 'lodash'
4
+ // import Big from 'big.js'
5
+ import { coverDigit2Uppercase, getDataKey } from '../util'
6
+ import { observer } from 'mobx-react'
7
+ import classNames from 'classnames'
8
+ import Big from 'big.js'
9
+
10
+ const DiyOverallOrder = props => {
11
+ const {
12
+ config: { diyOverallOrder, dataKey },
13
+ printerStore,
14
+ pageIndex
15
+ } = props
16
+ const tableData = printerStore.data._table[getDataKey(dataKey)] || []
17
+
18
+ // 计算合计
19
+ const sumData = field => {
20
+ return _.reduce(
21
+ tableData,
22
+ (a, b, i) => {
23
+ let result = a
24
+ const bRes = printerStore
25
+ .templateTable(field, dataKey, i, pageIndex)
26
+ .replace(/\(\)/g, '')
27
+ result = a.plus(+bRes || 0)
28
+ return result
29
+ },
30
+ Big(0)
31
+ ).toFixed(2)
32
+ }
33
+
34
+ return (
35
+ diyOverallOrder?.show &&
36
+ printerStore?.ready && (
37
+ <tr>
38
+ {_.map(diyOverallOrder.fields, (item, index) => {
39
+ return (
40
+ <td colSpan={item.colSpan ?? 99} key={index}>
41
+ <div style={{ ...item.style }} className='gm-flex-page'>
42
+ {item.name}
43
+ <div
44
+ className={classNames('gm-flex-page', {
45
+ 'gm-flex-justify-between-page':
46
+ diyOverallOrder?.isUpperLowerCaseSeparate,
47
+ 'gm-flex-grow-page':
48
+ diyOverallOrder?.isUpperLowerCaseSeparate
49
+ })}
50
+ >
51
+ <span
52
+ className={
53
+ diyOverallOrder?.isUpperCaseBefore
54
+ ? 'gm-printer-subtotal-isUpperCaseBefore-inter'
55
+ : ''
56
+ }
57
+ >
58
+ {sumData(item.valueField)}
59
+ </span>
60
+ {diyOverallOrder?.needUpperCase && (
61
+ <span>
62
+ {coverDigit2Uppercase(sumData(item.valueField))
63
+ ? coverDigit2Uppercase(sumData(item.valueField))
64
+ : ''}
65
+ </span>
66
+ )}
67
+ </div>
68
+ </div>
69
+ </td>
70
+ )
71
+ })}
72
+ </tr>
73
+ )
74
+ )
75
+ }
76
+ DiyOverallOrder.propTypes = {
77
+ config: PropTypes.object.isRequired,
78
+ range: PropTypes.object.isRequired,
79
+ printerStore: PropTypes.object,
80
+ pageIndex: PropTypes.number
81
+ }
82
+
83
+ export default observer(DiyOverallOrder)
@@ -68,6 +68,10 @@ const SubtotalTr = props => {
68
68
  ).toFixed(2)
69
69
  }
70
70
 
71
+ const getData = field => {
72
+ const data = printerStore.data.common
73
+ return data?.[field] ?? ''
74
+ }
71
75
  // 每页小计
72
76
  // show 是否展示小计,fields<Array> 合计的字段和展现的name,displayName 是否显示名字
73
77
  if (show && printerStore.ready) {
@@ -113,7 +117,7 @@ const SubtotalTr = props => {
113
117
  <div
114
118
  style={{
115
119
  fontWeight: 'bold',
116
- 'justify-content': flexStyle[subtotal.style?.textAlign], // flex布局中textAlign不生效,改使用justify-content
120
+ justifyContent: flexStyle[subtotal.style?.textAlign], // flex布局中textAlign不生效,改使用justify-content
117
121
  ...subtotal.style
118
122
  }}
119
123
  className='gm-flex-page'
@@ -133,11 +137,19 @@ const SubtotalTr = props => {
133
137
  }
134
138
  >
135
139
  {/* 这样写是为了支持自定义单元,index = 1时是自定义单元格 */}
136
- {index === 0 ? sumData(list, item.valueField) : ''}
140
+ {item.type === 'useSummarize'
141
+ ? getData(item.valueField)
142
+ : index === 0
143
+ ? sumData(list, item.valueField)
144
+ : ''}
145
+ {/* {index === 0 ? sumData(list, item.valueField) : ''} */}
137
146
  </span>
138
147
  {subtotal?.needUpperCase && ( // 是否需要大写金额
139
148
  <span>
140
- {index === 0
149
+ {item.type === 'useSummarize'
150
+ ? '大写:' +
151
+ coverDigit2Uppercase(getData(item.valueField))
152
+ : index === 0
141
153
  ? '大写:' +
142
154
  coverDigit2Uppercase(sumData(list, item.valueField))
143
155
  : ''}