gm-printer 10.15.2-alpha.0 → 10.15.2-alpha.2
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/package.json +1 -1
- package/src/printer/table.js +121 -78
package/.eslintcache
CHANGED
|
@@ -1 +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/printer/barcodeTd.js":"50","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.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":5462,"mtime":1659343100368,"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":36859,"mtime":1659343100367,"results":"74","hashOfConfig":"68"},{"size":4898,"mtime":1639992402586,"results":"75","hashOfConfig":"55"},{"size":18730,"mtime":1657507507231,"results":"76","hashOfConfig":"68"},{"size":15155,"mtime":1657626470824,"results":"77","hashOfConfig":"68"},{"size":2165,"mtime":1638949854481,"results":"78","hashOfConfig":"55"},{"size":2165,"mtime":1638949840121,"results":"79","hashOfConfig":"55"},{"size":2223,"mtime":1638949823846,"results":"80","hashOfConfig":"55"},{"size":2356,"mtime":1650083974574,"results":"81","hashOfConfig":"53"},{"size":3367,"mtime":1638949855771,"results":"82","hashOfConfig":"55"},{"size":2305,"mtime":1638949843817,"results":"83","hashOfConfig":"55"},{"size":3294,"mtime":1638949855131,"results":"84","hashOfConfig":"55"},{"size":2850,"mtime":1638949842017,"results":"85","hashOfConfig":"55"},{"size":4157,"mtime":1638949853726,"results":"86","hashOfConfig":"55"},{"size":605,"mtime":1638949882777,"results":"87","hashOfConfig":"55"},{"size":1175,"mtime":1638949720500,"results":"88","hashOfConfig":"55"},{"size":18012,"mtime":1654600080184,"results":"89","hashOfConfig":"53"},{"size":332,"mtime":1644573509040,"results":"90","hashOfConfig":"58"},{"size":4080,"mtime":1648536160221,"results":"91","hashOfConfig":"53"},{"size":8842,"mtime":1646363892377,"results":"92","hashOfConfig":"58"},{"size":4317,"mtime":1646376602197,"results":"93","hashOfConfig":"58"},{"size":9440,"mtime":1644993553716,"results":"94","hashOfConfig":"58"},{"size":724,"mtime":1644808940649,"results":"95","hashOfConfig":"58"},{"size":1717,"mtime":1648466368772,"results":"96","hashOfConfig":"53"},{"size":5563,"mtime":1658392065200,"results":"97","hashOfConfig":"68"},{"size":11552,"mtime":1659407260591,"results":"98","hashOfConfig":"68"},{"size":9001,"mtime":1648713828033,"results":"99","hashOfConfig":"53"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"100","hashOfConfig":"53"},{"size":600,"mtime":1657507507231,"results":"101","hashOfConfig":"68"},{"size":1945,"mtime":1657624830918,"results":"102","hashOfConfig":"68"},{"size":2009,"mtime":1659343100368,"results":"103","hashOfConfig":"68"},{"size":644,"mtime":1659407263574,"results":"104","hashOfConfig":"68"},{"size":9861,"mtime":1659343100367,"results":"105","hashOfConfig":"68"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"su5mnm",{"filePath":"132","messages":"133","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"136","messages":"137","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"148","messages":"149","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},{"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":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"182","messages":"183","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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",["206","207"],"/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",["208","209","210","211","212"],"/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",["213"],"/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/printer/barcodeTd.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.js",[],{"ruleId":"214","severity":2,"message":"215","line":10,"column":29,"nodeType":"216","endLine":10,"endColumn":35},{"ruleId":"214","severity":2,"message":"217","line":145,"column":63,"nodeType":"216","endLine":145,"endColumn":71},{"ruleId":"218","severity":1,"message":"219","line":315,"column":13,"nodeType":"220","endLine":315,"endColumn":49},{"ruleId":"218","severity":1,"message":"219","line":333,"column":13,"nodeType":"220","endLine":333,"endColumn":56},{"ruleId":"218","severity":1,"message":"219","line":490,"column":15,"nodeType":"220","endLine":490,"endColumn":53},{"ruleId":"218","severity":1,"message":"219","line":539,"column":11,"nodeType":"220","endLine":539,"endColumn":53},{"ruleId":"221","severity":2,"message":"222","line":588,"column":22,"nodeType":"223","messageId":"224","endLine":588,"endColumn":31},{"ruleId":"221","severity":2,"message":"222","line":120,"column":14,"nodeType":"223","messageId":"224","endLine":120,"endColumn":23},"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"]
|
|
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/printer/barcodeTd.js":"50","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.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":5462,"mtime":1659343100368,"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":36859,"mtime":1659343100367,"results":"74","hashOfConfig":"68"},{"size":4898,"mtime":1639992402586,"results":"75","hashOfConfig":"55"},{"size":18730,"mtime":1657507507231,"results":"76","hashOfConfig":"68"},{"size":15155,"mtime":1657626470824,"results":"77","hashOfConfig":"68"},{"size":2165,"mtime":1638949854481,"results":"78","hashOfConfig":"55"},{"size":2165,"mtime":1638949840121,"results":"79","hashOfConfig":"55"},{"size":2223,"mtime":1638949823846,"results":"80","hashOfConfig":"55"},{"size":2356,"mtime":1650083974574,"results":"81","hashOfConfig":"53"},{"size":3367,"mtime":1638949855771,"results":"82","hashOfConfig":"55"},{"size":2305,"mtime":1638949843817,"results":"83","hashOfConfig":"55"},{"size":3294,"mtime":1638949855131,"results":"84","hashOfConfig":"55"},{"size":2850,"mtime":1638949842017,"results":"85","hashOfConfig":"55"},{"size":4157,"mtime":1638949853726,"results":"86","hashOfConfig":"55"},{"size":605,"mtime":1638949882777,"results":"87","hashOfConfig":"55"},{"size":1175,"mtime":1638949720500,"results":"88","hashOfConfig":"55"},{"size":18012,"mtime":1654600080184,"results":"89","hashOfConfig":"53"},{"size":332,"mtime":1644573509040,"results":"90","hashOfConfig":"58"},{"size":4080,"mtime":1648536160221,"results":"91","hashOfConfig":"53"},{"size":8842,"mtime":1646363892377,"results":"92","hashOfConfig":"58"},{"size":4317,"mtime":1646376602197,"results":"93","hashOfConfig":"58"},{"size":9440,"mtime":1644993553716,"results":"94","hashOfConfig":"58"},{"size":724,"mtime":1644808940649,"results":"95","hashOfConfig":"58"},{"size":1717,"mtime":1648466368772,"results":"96","hashOfConfig":"53"},{"size":5563,"mtime":1658392065200,"results":"97","hashOfConfig":"68"},{"size":11556,"mtime":1659499018321,"results":"98","hashOfConfig":"68"},{"size":9001,"mtime":1648713828033,"results":"99","hashOfConfig":"53"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"100","hashOfConfig":"53"},{"size":600,"mtime":1657507507231,"results":"101","hashOfConfig":"68"},{"size":1945,"mtime":1657624830918,"results":"102","hashOfConfig":"68"},{"size":2009,"mtime":1659343100368,"results":"103","hashOfConfig":"68"},{"size":644,"mtime":1659407263574,"results":"104","hashOfConfig":"68"},{"size":9861,"mtime":1659343100367,"results":"105","hashOfConfig":"68"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"su5mnm",{"filePath":"132","messages":"133","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"136","messages":"137","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"148","messages":"149","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},{"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":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"182","messages":"183","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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",["206","207"],"/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",["208","209","210","211","212"],"/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",["213"],"/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/printer/barcodeTd.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.js",[],{"ruleId":"214","severity":2,"message":"215","line":10,"column":29,"nodeType":"216","endLine":10,"endColumn":35},{"ruleId":"214","severity":2,"message":"217","line":145,"column":63,"nodeType":"216","endLine":145,"endColumn":71},{"ruleId":"218","severity":1,"message":"219","line":315,"column":13,"nodeType":"220","endLine":315,"endColumn":49},{"ruleId":"218","severity":1,"message":"219","line":333,"column":13,"nodeType":"220","endLine":333,"endColumn":56},{"ruleId":"218","severity":1,"message":"219","line":490,"column":15,"nodeType":"220","endLine":490,"endColumn":53},{"ruleId":"218","severity":1,"message":"219","line":539,"column":11,"nodeType":"220","endLine":539,"endColumn":53},{"ruleId":"221","severity":2,"message":"222","line":588,"column":22,"nodeType":"223","messageId":"224","endLine":588,"endColumn":31},{"ruleId":"221","severity":2,"message":"222","line":120,"column":14,"nodeType":"223","messageId":"224","endLine":120,"endColumn":23},"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"]
|
package/package.json
CHANGED
package/src/printer/table.js
CHANGED
|
@@ -29,6 +29,120 @@ class Table extends React.Component {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
// 渲染不同的td
|
|
33
|
+
renderTdMap = {
|
|
34
|
+
barcode: this.renderBarCodeTd,
|
|
35
|
+
default: this.renderTd
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 获取单元格的样式
|
|
40
|
+
* @param {*} index columns的index
|
|
41
|
+
* @param {*} style col.style
|
|
42
|
+
* @returns 处理后的样式
|
|
43
|
+
*/
|
|
44
|
+
getTdStyle = (index, style = {}) => {
|
|
45
|
+
const { name, printerStore } = this.props
|
|
46
|
+
// 列宽固定(避免跳页bug)
|
|
47
|
+
const thWidths = printerStore.tablesInfo[name]?.head.widths || []
|
|
48
|
+
const width = thWidths[index]
|
|
49
|
+
const { fontSize } = style
|
|
50
|
+
let tdStyle = {}
|
|
51
|
+
let minWidth = 24
|
|
52
|
+
|
|
53
|
+
if (!width) return tdStyle
|
|
54
|
+
if (fontSize) minWidth = _.parseInt(fontSize) * 2
|
|
55
|
+
if (width >= 150) {
|
|
56
|
+
tdStyle = {
|
|
57
|
+
minWidth: width
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
tdStyle = {
|
|
61
|
+
minWidth,
|
|
62
|
+
width
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return tdStyle
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 渲染带有条形码的单元格
|
|
70
|
+
* @param {*} col 单个columns
|
|
71
|
+
* @param {*} j columns的index
|
|
72
|
+
* @param {*} i 数据的index
|
|
73
|
+
* @returns <td>
|
|
74
|
+
*/
|
|
75
|
+
renderBarCodeTd(col, j, i) {
|
|
76
|
+
const {
|
|
77
|
+
config: { dataKey, customerRowHeight = 23 },
|
|
78
|
+
name,
|
|
79
|
+
pageIndex,
|
|
80
|
+
printerStore
|
|
81
|
+
} = this.props
|
|
82
|
+
return (
|
|
83
|
+
<td
|
|
84
|
+
key={j}
|
|
85
|
+
data-name={getTableColumnName(name, col.index)}
|
|
86
|
+
style={{
|
|
87
|
+
...this.getTdStyle(j, col.style),
|
|
88
|
+
...col.style
|
|
89
|
+
}}
|
|
90
|
+
className={classNames({
|
|
91
|
+
active: getTableColumnName(name, col.index) === printerStore.selected
|
|
92
|
+
})}
|
|
93
|
+
>
|
|
94
|
+
<BarCodeTd
|
|
95
|
+
value={
|
|
96
|
+
printerStore
|
|
97
|
+
.templateTable(col.text, dataKey, i, pageIndex)
|
|
98
|
+
.replace(/\(\)/g, '') ?? ''
|
|
99
|
+
}
|
|
100
|
+
height={`${(customerRowHeight || 40) - 18}px`} // 高度
|
|
101
|
+
fontSize={12} // 设置文本的字体
|
|
102
|
+
margin={1} // 设置条形码周围的空白边距
|
|
103
|
+
textMargin={0} // 设置条形码和文本之间的间距
|
|
104
|
+
width={1}
|
|
105
|
+
/>
|
|
106
|
+
</td>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 渲染普通单元格
|
|
112
|
+
* @param {*} col 单个columns
|
|
113
|
+
* @param {*} j columns的index
|
|
114
|
+
* @param {*} i 数据的index
|
|
115
|
+
* @returns <td>
|
|
116
|
+
*/
|
|
117
|
+
renderTd(col, j, i) {
|
|
118
|
+
const {
|
|
119
|
+
config: { dataKey },
|
|
120
|
+
name,
|
|
121
|
+
pageIndex,
|
|
122
|
+
printerStore
|
|
123
|
+
} = this.props
|
|
124
|
+
return (
|
|
125
|
+
<td
|
|
126
|
+
key={j}
|
|
127
|
+
data-name={getTableColumnName(name, col.index)}
|
|
128
|
+
style={{
|
|
129
|
+
...this.getTdStyle(j, col.style),
|
|
130
|
+
...col.style
|
|
131
|
+
}}
|
|
132
|
+
className={classNames({
|
|
133
|
+
active: getTableColumnName(name, col.index) === printerStore.selected
|
|
134
|
+
})}
|
|
135
|
+
dangerouslySetInnerHTML={{
|
|
136
|
+
__html: col.isSpecialColumn
|
|
137
|
+
? printerStore.templateSpecialDetails(col, dataKey, i)
|
|
138
|
+
: printerStore
|
|
139
|
+
.templateTable(col.text, dataKey, i, pageIndex)
|
|
140
|
+
.replace(/\(\)/g, '')
|
|
141
|
+
}}
|
|
142
|
+
/>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
32
146
|
componentDidMount() {
|
|
33
147
|
const { name, printerStore } = this.props
|
|
34
148
|
|
|
@@ -153,7 +267,6 @@ class Table extends React.Component {
|
|
|
153
267
|
config: { dataKey, arrange, customerRowHeight = 23 },
|
|
154
268
|
name,
|
|
155
269
|
range,
|
|
156
|
-
pageIndex,
|
|
157
270
|
printerStore,
|
|
158
271
|
isSomeSubtotalTr
|
|
159
272
|
} = this.props
|
|
@@ -164,8 +277,7 @@ class Table extends React.Component {
|
|
|
164
277
|
|
|
165
278
|
// 列
|
|
166
279
|
const columns = this.getColumns()
|
|
167
|
-
|
|
168
|
-
const thWidths = printerStore.tablesInfo[name]?.head.widths || []
|
|
280
|
+
|
|
169
281
|
// 每页合计在前
|
|
170
282
|
const subtotalTrPageSummary = () => {
|
|
171
283
|
return (
|
|
@@ -194,26 +306,6 @@ class Table extends React.Component {
|
|
|
194
306
|
</>
|
|
195
307
|
)
|
|
196
308
|
}
|
|
197
|
-
const getTdStyle = (index, style = {}) => {
|
|
198
|
-
const width = thWidths[index]
|
|
199
|
-
const { fontSize } = style
|
|
200
|
-
let tdStyle = {}
|
|
201
|
-
let minWidth = 24
|
|
202
|
-
|
|
203
|
-
if (!width) return tdStyle
|
|
204
|
-
if (fontSize) minWidth = _.parseInt(fontSize) * 2
|
|
205
|
-
if (width >= 150) {
|
|
206
|
-
tdStyle = {
|
|
207
|
-
minWidth: width
|
|
208
|
-
}
|
|
209
|
-
} else {
|
|
210
|
-
tdStyle = {
|
|
211
|
-
minWidth,
|
|
212
|
-
width
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
return tdStyle
|
|
216
|
-
}
|
|
217
309
|
|
|
218
310
|
return (
|
|
219
311
|
<table
|
|
@@ -232,7 +324,7 @@ class Table extends React.Component {
|
|
|
232
324
|
data-name={getTableColumnName(name, col.index)}
|
|
233
325
|
draggable
|
|
234
326
|
style={{
|
|
235
|
-
...getTdStyle(i, col.headStyle),
|
|
327
|
+
...this.getTdStyle(i, col.headStyle),
|
|
236
328
|
...col.headStyle
|
|
237
329
|
}}
|
|
238
330
|
className={classNames({
|
|
@@ -264,60 +356,11 @@ class Table extends React.Component {
|
|
|
264
356
|
<td colSpan='99' />
|
|
265
357
|
) : (
|
|
266
358
|
_.map(columns, (col, j) => {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
style={{
|
|
273
|
-
...getTdStyle(j, col.style),
|
|
274
|
-
...col.style
|
|
275
|
-
}}
|
|
276
|
-
className={classNames({
|
|
277
|
-
active:
|
|
278
|
-
getTableColumnName(name, col.index) ===
|
|
279
|
-
printerStore.selected
|
|
280
|
-
})}
|
|
281
|
-
>
|
|
282
|
-
<BarCodeTd
|
|
283
|
-
value={
|
|
284
|
-
printerStore
|
|
285
|
-
.templateTable(col.text, dataKey, i, pageIndex)
|
|
286
|
-
.replace(/\(\)/g, '') ?? ''
|
|
287
|
-
}
|
|
288
|
-
// value={12345676543212345}
|
|
289
|
-
height={`${(customerRowHeight || 40) - 18}px`} // 高度
|
|
290
|
-
fontSize={12} // 设置文本的字体
|
|
291
|
-
margin={1} // 设置条形码周围的空白边距
|
|
292
|
-
textMargin={0} // 设置条形码和文本之间的间距
|
|
293
|
-
width={1}
|
|
294
|
-
/>
|
|
295
|
-
</td>
|
|
296
|
-
) : (
|
|
297
|
-
<td
|
|
298
|
-
key={j}
|
|
299
|
-
data-name={getTableColumnName(name, col.index)}
|
|
300
|
-
style={{
|
|
301
|
-
...getTdStyle(j, col.style),
|
|
302
|
-
...col.style
|
|
303
|
-
}}
|
|
304
|
-
className={classNames({
|
|
305
|
-
active:
|
|
306
|
-
getTableColumnName(name, col.index) ===
|
|
307
|
-
printerStore.selected
|
|
308
|
-
})}
|
|
309
|
-
dangerouslySetInnerHTML={{
|
|
310
|
-
__html: col.isSpecialColumn
|
|
311
|
-
? printerStore.templateSpecialDetails(
|
|
312
|
-
col,
|
|
313
|
-
dataKey,
|
|
314
|
-
i
|
|
315
|
-
)
|
|
316
|
-
: printerStore
|
|
317
|
-
.templateTable(col.text, dataKey, i, pageIndex)
|
|
318
|
-
.replace(/\(\)/g, '')
|
|
319
|
-
}}
|
|
320
|
-
/>
|
|
359
|
+
return this.renderTdMap[col.type ?? 'default']?.call(
|
|
360
|
+
this,
|
|
361
|
+
col,
|
|
362
|
+
j,
|
|
363
|
+
i
|
|
321
364
|
)
|
|
322
365
|
})
|
|
323
366
|
)}
|