gm-printer 10.27.3-beta.4 → 10.27.4-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 +1 -1
- package/README.md +56 -77
- package/package.json +4 -6
- package/src/common/editor_select.js +2 -26
- package/src/common/editor_store.js +1 -6
- package/src/common/style.lesss +1 -1
- package/src/printer/printer.js +3 -4
- package/src/printer/store.js +30 -13
- package/src/printer/style.lesss +9 -6
- package/.github/workflows/release.yml +0 -49
- package/assets/image-20230509125111428.png +0 -0
- package/assets/image-20230509125629476.png +0 -0
- package/assets/image-20230509125812166.png +0 -0
- package/assets/image-20230509125922115.png +0 -0
- package/assets/image-20230509130332523.png +0 -0
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/Users/joke/work_code/gm-printer/src/printer/table.js":"1","/Users/joke/work_code/gm-printer/src/printer/store.js":"2","/Users/joke/work_code/gm-printer/src/printer/table_subtotal_tr.js":"3","/Users/joke/work_code/gm-printer/src/common/util.js":"4","/Users/joke/work_code/gm-printer/src/common/editor_store.js":"5","/Users/joke/work_code/gm-printer/src/common/editor_edit_field.js":"6"},{"size":10861,"mtime":1722841015622},{"size":18403,"mtime":1709723362583,"results":"7","hashOfConfig":"8"},{"size":6329,"mtime":1722840447954,"results":"9","hashOfConfig":"10"},{"size":648,"mtime":1722840447954,"results":"11","hashOfConfig":"10"},{"size":49196,"mtime":1722840447953,"results":"12","hashOfConfig":"10"},{"size":23532,"mtime":1722840447952,"results":"13","hashOfConfig":"10"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1akqze6",{"filePath":"16","messages":"17","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"12qfxi0",{"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":1,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/joke/work_code/gm-printer/src/printer/store.js",[],"/Users/joke/work_code/gm-printer/src/printer/table_subtotal_tr.js",["24"],"/Users/joke/work_code/gm-printer/src/common/util.js",[],"/Users/joke/work_code/gm-printer/src/common/editor_store.js",[],"/Users/joke/work_code/gm-printer/src/common/editor_edit_field.js",["25","26","27","28","29","30"],{"ruleId":"31","severity":2,"message":"32","line":49,"column":9,"nodeType":"33","endLine":49,"endColumn":16},{"ruleId":"34","severity":1,"message":"35","line":344,"column":13,"nodeType":"36","endLine":344,"endColumn":49},{"ruleId":"34","severity":1,"message":"35","line":362,"column":13,"nodeType":"36","endLine":362,"endColumn":56},{"ruleId":"34","severity":1,"message":"35","line":528,"column":15,"nodeType":"36","endLine":528,"endColumn":53},{"ruleId":"34","severity":1,"message":"35","line":595,"column":11,"nodeType":"36","endLine":595,"endColumn":53},{"ruleId":"34","severity":1,"message":"35","line":645,"column":19,"nodeType":"36","endLine":645,"endColumn":64},{"ruleId":"37","severity":2,"message":"38","line":712,"column":22,"nodeType":"39","messageId":"40","endLine":712,"endColumn":31},"no-unused-vars","'sumData' is assigned a value but never used.","Identifier","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
|
|
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/README.md
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
# gm-printer
|
|
2
|
-
|
|
3
|
-
gm-printer
|
|
1
|
+
# gm-printer
|
|
2
|
+
|
|
3
|
+
gm-printer是一个实现开发者自定义网页打印的人类高质量开源库,你可以根据业务需要自定义打印字段配置(<a href='#template_config'>配置详情</a>),完成高质量网页打印功能。
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
## <div id='development'>开发指南</div>
|
|
6
|
-
|
|
7
7
|
以下操作将帮助你在本地机器上安装和运行该项目,进行开发
|
|
8
|
-
|
|
9
8
|
```bash
|
|
10
9
|
# 先安装依赖
|
|
11
10
|
yarn
|
|
12
11
|
# 项目启动
|
|
13
12
|
yarn start
|
|
14
13
|
# 项目构建(基本不怎么使用)
|
|
15
|
-
yarn build
|
|
14
|
+
yarn build
|
|
16
15
|
```
|
|
17
|
-
|
|
18
16
|
## <div id='usage'>安装使用指南</div>
|
|
19
|
-
|
|
20
17
|
```bash
|
|
21
18
|
# npm
|
|
22
19
|
npm i gm-printer
|
|
@@ -25,10 +22,9 @@ yarn add gm-printer
|
|
|
25
22
|
```
|
|
26
23
|
|
|
27
24
|
## <div id='simple_categroy'>配置目录简述</div>
|
|
28
|
-
|
|
29
25
|
```bash
|
|
30
26
|
├── src
|
|
31
|
-
│ ├── index.js
|
|
27
|
+
│ ├── index.js
|
|
32
28
|
│ ├── add_fields # 右侧对应的字段配置
|
|
33
29
|
│ ├── data_to_key # 原始数据转换成打印数据
|
|
34
30
|
│ ├── mock_data # 模拟数据
|
|
@@ -39,60 +35,55 @@ yarn add gm-printer
|
|
|
39
35
|
```
|
|
40
36
|
|
|
41
37
|
## 版本管理
|
|
38
|
+
所有的版本都有 3 个数字:x.y.z。
|
|
39
|
+
* 第一个数字是主版本。
|
|
40
|
+
* 第二个数字是次版本。
|
|
41
|
+
* 第三个数字是补丁版本。
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- 第三个数字是补丁版本。
|
|
48
|
-
|
|
49
|
-
当发布新的版本时,不仅仅是随心所欲地增加数字,还要遵循以下规则:
|
|
50
|
-
|
|
51
|
-
- 当进行不兼容的 API 更改时,则升级主版本。
|
|
52
|
-
- 当以向后兼容的方式添加功能时,则升级次版本。
|
|
53
|
-
- 当进行向后兼容的缺陷修复时,则升级补丁版本。
|
|
43
|
+
当发布新的版本时,不仅仅是随心所欲地增加数字,还要遵循以下规则:
|
|
44
|
+
* 当进行不兼容的 API 更改时,则升级主版本。
|
|
45
|
+
* 当以向后兼容的方式添加功能时,则升级次版本。
|
|
46
|
+
* 当进行向后兼容的缺陷修复时,则升级补丁版本。
|
|
54
47
|
|
|
55
48
|
该约定在所有编程语言中均被采用,每个 npm 软件包都必须遵守该约定,这一点非常重要,因为整个系统都依赖于此。
|
|
56
49
|
|
|
57
|
-
## 版本发布
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-

|
|
64
|
-
|
|
65
|
-
2. 正式版本的发布
|
|
50
|
+
## 版本发布 [<font size=2.5>参考链接</font>](https://eminoda.github.io/2021/01/29/npm-semver-strategy/)
|
|
51
|
+
一般版本发布分为如下几个版:
|
|
52
|
+
* 内测版本(alpha)
|
|
53
|
+
* 公测版本(beta)
|
|
54
|
+
* 正式版本的候选版本(rc: release candiate)
|
|
55
|
+
* 正式版本
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
2. 切换到 master,之后执行 yarn release 选择正式版本(注意 minor 和 patch 的区别)
|
|
57
|
+
发布操作如下:
|
|
69
58
|
|
|
70
|
-
|
|
59
|
+
前情提要:
|
|
60
|
+
* 发布重大版本或版本改动较大时,先发布alpha、beta、rc等先行版本。
|
|
61
|
+
* 将`pageage.json`中的`version`修改为`X.X.X-beta.0`,或者运行 `npm version X.X.X-beta.0`来更新`package.json`,同时创建一个 git 标签[参考](https://docs.npmjs.com/cli/version)。
|
|
62
|
+
```bash
|
|
63
|
+
npm login # 输入用户名和密码
|
|
71
64
|
|
|
72
|
-
|
|
65
|
+
# 之后发布你要发布的测试版本
|
|
66
|
+
npm publish --tag (alpha | beta)
|
|
73
67
|
|
|
74
|
-
|
|
68
|
+
# 或发布正式版用
|
|
69
|
+
npm publish
|
|
70
|
+
```
|
|
75
71
|
|
|
76
|
-
自此自动发包完成!
|
|
77
72
|
上述操作在自己的分支上进行发布版本即可,发完后,将分支合并到 master 上!!!
|
|
78
73
|
|
|
79
74
|
## <div id='template_config'>模板文件(template_config)</div>
|
|
80
|
-
|
|
81
|
-
config 主要是有下面 6 大部分组成
|
|
82
|
-
|
|
75
|
+
config主要是有下面6大部分组成
|
|
83
76
|
```js
|
|
84
77
|
export default {
|
|
85
|
-
name: '模板名称',
|
|
86
|
-
page: {},
|
|
87
|
-
header: {},
|
|
88
|
-
contents: {},
|
|
89
|
-
sign: {},
|
|
90
|
-
footer: {}
|
|
78
|
+
'name': '模板名称', // 模板名称
|
|
79
|
+
'page': {}, // 模板整体的配置信息
|
|
80
|
+
'header': {}, // 页眉(每页都会渲染)
|
|
81
|
+
'contents': {}, // 主要内容(contents只渲染一次!第一页放不下,会顺延到次页继续渲染,直至全部渲染)
|
|
82
|
+
'sign': {}, // 签名(只在最后一页渲染)
|
|
83
|
+
'footer': {} // 页脚(每页都会渲染)
|
|
91
84
|
}
|
|
92
85
|
```
|
|
93
|
-
|
|
94
86
|
一个简单模板配置如下
|
|
95
|
-
|
|
96
87
|
```js
|
|
97
88
|
export default {
|
|
98
89
|
name: '模板名称',
|
|
@@ -104,22 +95,18 @@ export default {
|
|
|
104
95
|
height: '297mm' // 纸张高度
|
|
105
96
|
},
|
|
106
97
|
printDirection: 'vertical', // 打印布局方向(两种: vertical, horizontal)
|
|
107
|
-
gap: {
|
|
108
|
-
// 纸张内边距
|
|
98
|
+
gap: { // 纸张内边距
|
|
109
99
|
paddingRight: '5mm',
|
|
110
100
|
paddingLeft: '5mm',
|
|
111
101
|
paddingBottom: '5mm',
|
|
112
102
|
paddingTop: '5mm'
|
|
113
103
|
}
|
|
114
104
|
},
|
|
115
|
-
header: {
|
|
116
|
-
//
|
|
117
|
-
blocks: [
|
|
118
|
-
// blocks数组,里面元素
|
|
105
|
+
header: { // 页眉
|
|
106
|
+
blocks: [ // blocks数组,里面元素
|
|
119
107
|
{
|
|
120
108
|
text: '收货人: {{收货人}}', // 文本块
|
|
121
|
-
style: {
|
|
122
|
-
// 文本块样式
|
|
109
|
+
style: { // 文本块样式
|
|
123
110
|
right: '',
|
|
124
111
|
left: '450px',
|
|
125
112
|
position: 'absolute',
|
|
@@ -127,17 +114,15 @@ export default {
|
|
|
127
114
|
}
|
|
128
115
|
}
|
|
129
116
|
],
|
|
130
|
-
style: {
|
|
131
|
-
// header 的样式
|
|
117
|
+
style: { // header 的样式
|
|
132
118
|
height: '97px'
|
|
133
119
|
}
|
|
134
120
|
},
|
|
135
|
-
contents: [
|
|
136
|
-
// contents数组,元素是object.
|
|
121
|
+
contents: [ // contents数组,元素是object.
|
|
137
122
|
{
|
|
138
123
|
blocks: [
|
|
139
124
|
{
|
|
140
|
-
text: '收货人: {{收货人}}',
|
|
125
|
+
text: '收货人: {{收货人}}', // 模板字符串用{{}}表示
|
|
141
126
|
style: {
|
|
142
127
|
right: '',
|
|
143
128
|
left: '450px',
|
|
@@ -151,32 +136,27 @@ export default {
|
|
|
151
136
|
}
|
|
152
137
|
},
|
|
153
138
|
{
|
|
154
|
-
className: '',
|
|
155
|
-
type: 'table',
|
|
156
|
-
dataKey: 'orders_category',
|
|
157
|
-
subtotal: {
|
|
158
|
-
// 是否显示table每页合计
|
|
139
|
+
className: '',
|
|
140
|
+
type: 'table', // type 表明是table
|
|
141
|
+
dataKey: 'orders_category', // table的接受哪些数据. dataKey详细看下文
|
|
142
|
+
subtotal: { // 是否显示table每页合计
|
|
159
143
|
show: false
|
|
160
144
|
},
|
|
161
|
-
columns: [
|
|
162
|
-
// 表单列配置
|
|
145
|
+
columns: [ // 表单列配置
|
|
163
146
|
{
|
|
164
147
|
head: '序号',
|
|
165
|
-
headStyle: {
|
|
166
|
-
// 表头样式
|
|
148
|
+
headStyle: { // 表头样式
|
|
167
149
|
textAlign: 'center'
|
|
168
150
|
},
|
|
169
|
-
style: {
|
|
170
|
-
// 表格样式
|
|
151
|
+
style: { // 表格样式
|
|
171
152
|
textAlign: 'center'
|
|
172
153
|
},
|
|
173
|
-
text: '{{列.序号}}'
|
|
154
|
+
text: '{{列.序号}}' // 表格内容
|
|
174
155
|
}
|
|
175
156
|
]
|
|
176
157
|
}
|
|
177
158
|
],
|
|
178
|
-
sign: {
|
|
179
|
-
// 签名(只在最后一页打印)
|
|
159
|
+
sign: { // 签名(只在最后一页打印)
|
|
180
160
|
blocks: [
|
|
181
161
|
{
|
|
182
162
|
text: '签收人:',
|
|
@@ -191,8 +171,7 @@ export default {
|
|
|
191
171
|
height: '46px'
|
|
192
172
|
}
|
|
193
173
|
},
|
|
194
|
-
footer: {
|
|
195
|
-
// 页脚
|
|
174
|
+
footer: { // 页脚
|
|
196
175
|
blocks: [
|
|
197
176
|
{
|
|
198
177
|
text: '页码: {{当前页码}} / {{页码总数}}',
|
|
@@ -222,7 +201,6 @@ export default {
|
|
|
222
201
|
```
|
|
223
202
|
|
|
224
203
|
## data 数据
|
|
225
|
-
|
|
226
204
|
```json
|
|
227
205
|
{
|
|
228
206
|
common: object, // 非表格数据
|
|
@@ -250,3 +228,4 @@ contents.panel.0.block.0 //区域块的每一个块
|
|
|
250
228
|
contents.table.0 //区域表格
|
|
251
229
|
contents.table.0.column.0 // 区域表格的每一个表格
|
|
252
230
|
```
|
|
231
|
+
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-printer",
|
|
3
|
-
"version": "10.27.
|
|
3
|
+
"version": "10.27.4-beta.1",
|
|
4
4
|
"description": "diy printer",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"precommit": "lint-staged",
|
|
8
8
|
"start": "webpack-dev-server --hot",
|
|
9
9
|
"build": "webpack -p",
|
|
10
|
-
"locale": "i18n-m sync src/"
|
|
11
|
-
"release": "bumpp"
|
|
10
|
+
"locale": "i18n-m sync src/"
|
|
12
11
|
},
|
|
13
12
|
"lint-staged": {
|
|
14
13
|
"./src/**/*.js": [
|
|
@@ -108,10 +107,9 @@
|
|
|
108
107
|
"url-loader": "^1.1.1",
|
|
109
108
|
"webpack": "^4.17.2",
|
|
110
109
|
"webpack-cli": "^3.1.0",
|
|
111
|
-
"webpack-dev-server": "^3.1.7"
|
|
112
|
-
"bumpp": "8.2.0"
|
|
110
|
+
"webpack-dev-server": "^3.1.7"
|
|
113
111
|
},
|
|
114
112
|
"dependencies": {
|
|
115
113
|
"qrcode.react": "^0.9.2"
|
|
116
114
|
}
|
|
117
|
-
}
|
|
115
|
+
}
|
|
@@ -2,10 +2,6 @@ import i18next from '../../locales'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { observer, inject } from 'mobx-react'
|
|
4
4
|
import { Flex, Option, Select } from '../components'
|
|
5
|
-
import {
|
|
6
|
-
RadioGroup,
|
|
7
|
-
Radio,
|
|
8
|
-
} from '@gmfe/react'
|
|
9
5
|
import { InputWithUnit } from '../common/component'
|
|
10
6
|
import { pageTypeMap, printDirectionList } from '../config'
|
|
11
7
|
import _ from 'lodash'
|
|
@@ -19,10 +15,6 @@ class EditorSelector extends React.Component {
|
|
|
19
15
|
this.props.editStore.setConfigName(e.target.value)
|
|
20
16
|
}
|
|
21
17
|
|
|
22
|
-
handleConfigIsFixLastFooter = (_val) => {
|
|
23
|
-
this.props.editStore.setConfigIsFixLastFooter(_val)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
18
|
handlePageType = value => {
|
|
27
19
|
this.props.editStore.setSizePageType(value)
|
|
28
20
|
}
|
|
@@ -45,13 +37,13 @@ class EditorSelector extends React.Component {
|
|
|
45
37
|
|
|
46
38
|
render() {
|
|
47
39
|
const {
|
|
48
|
-
config: { name, page, batchPrintConfig
|
|
40
|
+
config: { name, page, batchPrintConfig },
|
|
49
41
|
computedRegionList,
|
|
50
42
|
computedSelectedRegionTip,
|
|
51
43
|
selectedRegion
|
|
52
44
|
} = this.props.editStore
|
|
53
45
|
const isDIY = page.type === 'DIY'
|
|
54
|
-
|
|
46
|
+
|
|
55
47
|
return (
|
|
56
48
|
<div>
|
|
57
49
|
<Flex alignCenter>
|
|
@@ -157,22 +149,6 @@ class EditorSelector extends React.Component {
|
|
|
157
149
|
</>
|
|
158
150
|
)}
|
|
159
151
|
|
|
160
|
-
{
|
|
161
|
-
showDiyOverAllOrder !== undefined && <Flex alignCenter className='gm-padding-top-5'>
|
|
162
|
-
<label htmlFor={1}>{'是否固定末页签名和页脚区域:'}</label>
|
|
163
|
-
<RadioGroup
|
|
164
|
-
name='isFixFooter'
|
|
165
|
-
value={isFixLastFooter}
|
|
166
|
-
inline
|
|
167
|
-
onChange={this.handleConfigIsFixLastFooter}
|
|
168
|
-
className="gm-flex"
|
|
169
|
-
>
|
|
170
|
-
<Radio value={true} style={{ display: 'flex', marginRight: 10}}><span style={{ marginLeft: 5}}>是</span></Radio>
|
|
171
|
-
<Radio value={false} style={{ display: 'flex'}}><span style={{ marginLeft: 5}}>否</span></Radio>
|
|
172
|
-
</RadioGroup>
|
|
173
|
-
</Flex>
|
|
174
|
-
}
|
|
175
|
-
|
|
176
152
|
<Flex className='gm-padding-top-5 gm-text-red' column>
|
|
177
153
|
{computedSelectedRegionTip}
|
|
178
154
|
</Flex>
|
|
@@ -217,7 +217,7 @@ class EditorStore {
|
|
|
217
217
|
@action
|
|
218
218
|
init(config, data) {
|
|
219
219
|
// batchPrintConfig: 1 不连续打印(一张采购单不出现多供应商)2 连续打印(一张采购单可能出现多个供应商)
|
|
220
|
-
this.config = Object.assign({ batchPrintConfig: 1
|
|
220
|
+
this.config = Object.assign({ batchPrintConfig: 1 }, config)
|
|
221
221
|
this.originConfig = config
|
|
222
222
|
this.selected = null
|
|
223
223
|
this.selectedRegion = null
|
|
@@ -247,11 +247,6 @@ class EditorStore {
|
|
|
247
247
|
this.config.name = name
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
@action
|
|
251
|
-
setConfigIsFixLastFooter(_value) {
|
|
252
|
-
this.config.isFixLastFooter = _value
|
|
253
|
-
}
|
|
254
|
-
|
|
255
250
|
@action.bound
|
|
256
251
|
setPageSize(field, value) {
|
|
257
252
|
this.config.page.size[field] = value
|
package/src/common/style.lesss
CHANGED
package/src/printer/printer.js
CHANGED
|
@@ -20,7 +20,7 @@ const Sign = props => (
|
|
|
20
20
|
{...props}
|
|
21
21
|
style={{
|
|
22
22
|
...props.style,
|
|
23
|
-
position:
|
|
23
|
+
position: 'absolute',
|
|
24
24
|
left: 0,
|
|
25
25
|
right: 0
|
|
26
26
|
}}
|
|
@@ -38,7 +38,7 @@ const Footer = props => (
|
|
|
38
38
|
{...props}
|
|
39
39
|
style={{
|
|
40
40
|
...props.style,
|
|
41
|
-
position:
|
|
41
|
+
position: 'absolute',
|
|
42
42
|
bottom: 0,
|
|
43
43
|
left: 0,
|
|
44
44
|
right: 0
|
|
@@ -223,10 +223,9 @@ class Printer extends React.Component {
|
|
|
223
223
|
config={config.sign}
|
|
224
224
|
pageIndex={i}
|
|
225
225
|
style={{ bottom: config.footer.style.height }}
|
|
226
|
-
flag={isLastPage && config?.isFixLastFooter}
|
|
227
226
|
/>
|
|
228
227
|
)}
|
|
229
|
-
<Footer config={config.footer} pageIndex={i}
|
|
228
|
+
<Footer config={config.footer} pageIndex={i} />
|
|
230
229
|
</Page>
|
|
231
230
|
)
|
|
232
231
|
})}
|
package/src/printer/store.js
CHANGED
|
@@ -187,6 +187,9 @@ class PrinterStore {
|
|
|
187
187
|
this.config = config || {}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
/** 处理采购单的明细
|
|
191
|
+
一行有多个明细, 并且采购明细是换行展示, 明细数据超多的情况则需要分割到不同页面中
|
|
192
|
+
比如: 一行有20行明细,当前页只能放下17行明细 ,剩下的3行明细需要放到下一页进行展示 */
|
|
190
193
|
@action
|
|
191
194
|
computedData(dataKey, table, end, currentRemainTableHeight) {
|
|
192
195
|
/** 当前数据 */
|
|
@@ -195,20 +198,26 @@ class PrinterStore {
|
|
|
195
198
|
let count = 0
|
|
196
199
|
_.forEach(Array(end).fill(1), (val, i) => {
|
|
197
200
|
const details = tableData[i]?.__details || []
|
|
198
|
-
|
|
201
|
+
// 双栏---获取第二列的数据
|
|
202
|
+
const detailsMulti = tableData[i]?.__details_MULTI_SUFFIX || []
|
|
203
|
+
count = details.length + detailsMulti.length + count
|
|
199
204
|
})
|
|
200
205
|
|
|
201
206
|
/** 明细data */
|
|
202
207
|
const detailsData = tableData[end]?.__details
|
|
208
|
+
// 双栏明细data
|
|
209
|
+
const detailsDataMulti = tableData[end]?.__details_MULTI_SUFFIX
|
|
210
|
+
// 采购单如果使用双栏,取明细最多的那个数据
|
|
211
|
+
const data =
|
|
212
|
+
detailsData?.length > detailsDataMulti?.length
|
|
213
|
+
? detailsData
|
|
214
|
+
: detailsDataMulti
|
|
203
215
|
// 如果没有details 和 明细不换行, 就不用计算了
|
|
204
|
-
if (!
|
|
216
|
+
if (!data || dataKey.includes('noLineBreak')) {
|
|
205
217
|
return []
|
|
206
218
|
}
|
|
207
|
-
|
|
208
|
-
const detailsHeights = table.body.children.slice(
|
|
209
|
-
count,
|
|
210
|
-
count + detailsData.length
|
|
211
|
-
)
|
|
219
|
+
// 获取当前行的所有明细的高度集
|
|
220
|
+
const detailsHeights = table.body.children.slice(count, count + data.length)
|
|
212
221
|
|
|
213
222
|
const { ranges, detailsPageHeight } = caclSingleDetailsPageHeight(
|
|
214
223
|
detailsHeights,
|
|
@@ -216,11 +225,19 @@ class PrinterStore {
|
|
|
216
225
|
)
|
|
217
226
|
|
|
218
227
|
// 分局明细拆分后的数据
|
|
219
|
-
const splitTableData = _.map(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
228
|
+
const splitTableData = _.map(
|
|
229
|
+
_.filter(ranges, i => i[0] !== i[1]), // 过滤掉 {[0,3],[3,3]}这周情况
|
|
230
|
+
range => {
|
|
231
|
+
const _tableData = Object.assign({}, tableData[end])
|
|
232
|
+
_tableData.__details = data.slice(...range)
|
|
233
|
+
// 双栏中的数据也要做处理
|
|
234
|
+
if (isMultiTable(dataKey)) {
|
|
235
|
+
_tableData.__details_MULTI_SUFFIX = data.slice(...range)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return _tableData
|
|
239
|
+
}
|
|
240
|
+
)
|
|
224
241
|
|
|
225
242
|
// 插入原table数据中
|
|
226
243
|
tableData.splice(end, 1, ...splitTableData)
|
|
@@ -431,7 +448,7 @@ class PrinterStore {
|
|
|
431
448
|
const pageFixLineNum = this.config.financeSpecialConfig.pageFixLineNum
|
|
432
449
|
while (index < this.config.contents.length) {
|
|
433
450
|
const content = this.config.contents[index]
|
|
434
|
-
|
|
451
|
+
|
|
435
452
|
const table = this.tablesInfo[`contents.table.${index}`]
|
|
436
453
|
// 表格行的索引,用于table.slice(begin, end), 分割到不同页面中
|
|
437
454
|
let begin = 0
|
package/src/printer/style.lesss
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
font-weight: 400;
|
|
8
8
|
-webkit-font-smoothing: antialiased;
|
|
9
9
|
-webkit-overflow-scrolling: touch;
|
|
10
|
-
|
|
10
|
+
// line-height: 2.5;
|
|
11
11
|
|
|
12
12
|
background: white;
|
|
13
13
|
page-break-after: always;
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
td,
|
|
101
101
|
th {
|
|
102
102
|
border: 1px solid black;
|
|
103
|
-
padding: 2px 0;
|
|
103
|
+
// padding: 2px 0;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
td,
|
|
111
111
|
th {
|
|
112
112
|
border: 1px solid #ddd;
|
|
113
|
-
|
|
113
|
+
// padding: 2px 0;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
td,
|
|
121
121
|
th {
|
|
122
122
|
border: 1px solid transparent;
|
|
123
|
-
padding: 2px 0;
|
|
123
|
+
// padding: 2px 0;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
th {
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
td,
|
|
136
136
|
th {
|
|
137
137
|
border: none;
|
|
138
|
-
padding: 2px 0;
|
|
138
|
+
// padding: 2px 0;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
|
|
147
147
|
.gm-printer-special-container-box {
|
|
148
148
|
flex: 1;
|
|
149
|
-
padding: 2px;
|
|
149
|
+
// padding: 2px;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.gm-printer-special-container-box + .gm-printer-special-container-box {
|
|
@@ -178,3 +178,6 @@
|
|
|
178
178
|
.gm-flex-page{
|
|
179
179
|
display:flex
|
|
180
180
|
}
|
|
181
|
+
.b-table-details{
|
|
182
|
+
box-sizing: border-box;
|
|
183
|
+
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
permissions:
|
|
4
|
-
contents: write
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
tags:
|
|
9
|
-
- 'v*'
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
release:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v3
|
|
16
|
-
with:
|
|
17
|
-
fetch-depth: 0
|
|
18
|
-
|
|
19
|
-
- name: Set node
|
|
20
|
-
uses: actions/setup-node@v3
|
|
21
|
-
with:
|
|
22
|
-
node-version: 16.x
|
|
23
|
-
registry-url: 'https://registry.npmjs.org'
|
|
24
|
-
|
|
25
|
-
- name: ChangeLog
|
|
26
|
-
run: npx changelogithub
|
|
27
|
-
env:
|
|
28
|
-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
29
|
-
|
|
30
|
-
- name: Setup
|
|
31
|
-
run: npm i -g @antfu/ni
|
|
32
|
-
|
|
33
|
-
- name: Install
|
|
34
|
-
run: nci
|
|
35
|
-
|
|
36
|
-
- name: Build
|
|
37
|
-
run: npm run build
|
|
38
|
-
|
|
39
|
-
- name: Release
|
|
40
|
-
run: |
|
|
41
|
-
if [[ ${{ github.ref }} == *refs/tags/*-beta* ]]; then
|
|
42
|
-
npm publish --tag beta
|
|
43
|
-
elif [[ ${{ github.ref }} == *refs/tags/*-alpha* ]]; then
|
|
44
|
-
npm publish --tag alpha
|
|
45
|
-
else
|
|
46
|
-
npm publish
|
|
47
|
-
fi
|
|
48
|
-
env:
|
|
49
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|