gm-printer 10.15.1-beta.1 → 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 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"},{"size":7813,"mtime":1648799098282,"results":"48","hashOfConfig":"49"},{"size":291,"mtime":1638935573926,"results":"50","hashOfConfig":"51"},{"size":523,"mtime":1638935549030,"results":"52","hashOfConfig":"51"},{"size":1139,"mtime":1644572548725,"results":"53","hashOfConfig":"54"},{"size":2293,"mtime":1638948548042,"results":"55","hashOfConfig":"51"},{"size":2292,"mtime":1638948522492,"results":"56","hashOfConfig":"51"},{"size":1078,"mtime":1638948543271,"results":"57","hashOfConfig":"51"},{"size":2067,"mtime":1648466228565,"results":"58","hashOfConfig":"49"},{"size":2991,"mtime":1638948535719,"results":"59","hashOfConfig":"51"},{"size":4379,"mtime":1638935458586,"results":"60","hashOfConfig":"51"},{"size":2428,"mtime":1648466380496,"results":"61","hashOfConfig":"49"},{"size":2955,"mtime":1647850650993,"results":"62","hashOfConfig":"54"},{"size":4170,"mtime":1648640206253,"results":"63","hashOfConfig":"49"},{"size":2833,"mtime":1638861837310,"results":"64","hashOfConfig":"51"},{"size":4212,"mtime":1638935746667,"results":"65","hashOfConfig":"51"},{"size":861,"mtime":1638931446915,"results":"66","hashOfConfig":"51"},{"size":178,"mtime":1638931439249,"results":"67","hashOfConfig":"51"},{"size":3272,"mtime":1648713847909,"results":"68","hashOfConfig":"49"},{"size":36481,"mtime":1654596161837,"results":"69","hashOfConfig":"49"},{"size":4898,"mtime":1639992402586,"results":"70","hashOfConfig":"51"},{"size":17964,"mtime":1653994316941,"results":"71","hashOfConfig":"49"},{"size":14908,"mtime":1652855804615,"results":"72","hashOfConfig":"49"},{"size":2165,"mtime":1638949854481,"results":"73","hashOfConfig":"51"},{"size":2165,"mtime":1638949840121,"results":"74","hashOfConfig":"51"},{"size":2223,"mtime":1638949823846,"results":"75","hashOfConfig":"51"},{"size":2356,"mtime":1650083974574,"results":"76","hashOfConfig":"49"},{"size":3367,"mtime":1638949855771,"results":"77","hashOfConfig":"51"},{"size":2305,"mtime":1638949843817,"results":"78","hashOfConfig":"51"},{"size":3294,"mtime":1638949855131,"results":"79","hashOfConfig":"51"},{"size":2850,"mtime":1638949842017,"results":"80","hashOfConfig":"51"},{"size":4157,"mtime":1638949853726,"results":"81","hashOfConfig":"51"},{"size":605,"mtime":1638949882777,"results":"82","hashOfConfig":"51"},{"size":1175,"mtime":1638949720500,"results":"83","hashOfConfig":"51"},{"size":18012,"mtime":1654600080184,"results":"84","hashOfConfig":"49"},{"size":332,"mtime":1644573509040,"results":"85","hashOfConfig":"54"},{"size":4080,"mtime":1648536160221,"results":"86","hashOfConfig":"49"},{"size":8842,"mtime":1646363892377,"results":"87","hashOfConfig":"54"},{"size":4317,"mtime":1646376602197,"results":"88","hashOfConfig":"54"},{"size":9440,"mtime":1644993553716,"results":"89","hashOfConfig":"54"},{"size":724,"mtime":1644808940649,"results":"90","hashOfConfig":"54"},{"size":1717,"mtime":1648466368772,"results":"91","hashOfConfig":"49"},{"size":5049,"mtime":1650085552191,"results":"92","hashOfConfig":"49"},{"size":10150,"mtime":1653986949852,"results":"93","hashOfConfig":"49"},{"size":9001,"mtime":1648713828033,"results":"94","hashOfConfig":"49"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"95","hashOfConfig":"49"},{"size":460,"mtime":1652857240696,"results":"96","hashOfConfig":"49"},{"filePath":"97","messages":"98","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"99","messages":"100","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"103","messages":"104","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"105","messages":"106","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"107","messages":"108","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"111","messages":"112","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"113","messages":"114","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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},{"filePath":"133","messages":"134","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"135","messages":"136","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"137","messages":"138","errorCount":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"149","messages":"150","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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},"/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",["189","190"],"/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",["191","192","193","194","195"],"/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",["196"],"/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",[],{"ruleId":"197","severity":2,"message":"198","line":10,"column":29,"nodeType":"199","endLine":10,"endColumn":35},{"ruleId":"197","severity":2,"message":"200","line":145,"column":63,"nodeType":"199","endLine":145,"endColumn":71},{"ruleId":"201","severity":1,"message":"202","line":307,"column":13,"nodeType":"203","endLine":307,"endColumn":49},{"ruleId":"201","severity":1,"message":"202","line":325,"column":13,"nodeType":"203","endLine":325,"endColumn":56},{"ruleId":"201","severity":1,"message":"202","line":470,"column":15,"nodeType":"203","endLine":470,"endColumn":53},{"ruleId":"201","severity":1,"message":"202","line":519,"column":11,"nodeType":"203","endLine":519,"endColumn":53},{"ruleId":"204","severity":2,"message":"205","line":568,"column":22,"nodeType":"206","messageId":"207","endLine":568,"endColumn":31},{"ruleId":"204","severity":2,"message":"205","line":120,"column":14,"nodeType":"206","messageId":"207","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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.15.1-beta.1",
3
+ "version": "10.15.2-alpha.2",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -245,6 +245,7 @@ class CommonContextMenu extends React.Component {
245
245
 
246
246
  const isProductLengthActive = _.includes(value, 'len')
247
247
  const isSubtotalActive = _.includes(value, 'subtotal')
248
+ const isRealWeight = _.includes(value, 'realWeight')
248
249
  return (
249
250
  <>
250
251
  <div
@@ -257,7 +258,13 @@ class CommonContextMenu extends React.Component {
257
258
  onClick={this.handleChangeCounterDataKey.bind(this, 'subtotal')}
258
259
  className={isSubtotalActive ? 'active' : ''}
259
260
  >
260
- {i18next.t('小计')}
261
+ {i18next.t('金额小计')}
262
+ </div>
263
+ <div
264
+ onClick={this.handleChangeCounterDataKey.bind(this, 'realWeight')}
265
+ className={isRealWeight ? 'active' : ''}
266
+ >
267
+ {i18next.t('出库数小计')}
261
268
  </div>
262
269
  <Hr />
263
270
  <div onClick={this.handleRemoveContent}>{i18next.t('移除区域')}</div>
@@ -651,6 +651,7 @@ class EditorStore {
651
651
  }
652
652
 
653
653
  newDataKey = _.sortBy(newDataKey, [
654
+ o => o === 'realWeight',
654
655
  o => o === 'multi3',
655
656
  o => o === 'multi',
656
657
  o => o === 'category',
@@ -760,11 +761,10 @@ class EditorStore {
760
761
  * @param value
761
762
  */
762
763
  @action.bound
763
- addFieldToTable({ key, value }) {
764
+ addFieldToTable({ key, value, type }) {
764
765
  if (this.computedRegionIsTable) {
765
766
  const arr = this.selectedRegion.split('.')
766
767
  const { columns, dataKey } = this.config.contents[arr[2]]
767
-
768
768
  columns.push({
769
769
  head: key,
770
770
  headStyle: {
@@ -773,7 +773,8 @@ class EditorStore {
773
773
  text: value,
774
774
  style: {
775
775
  textAlign: 'center'
776
- }
776
+ },
777
+ type
777
778
  })
778
779
 
779
780
  this.clearExtraTableData(dataKey)
@@ -103,6 +103,7 @@ class ContextMenu extends React.Component {
103
103
  const isMultiActive = keyArr.includes('multi')
104
104
  const isThreeActive = keyArr.includes('multi3')
105
105
  const isCategoryActive = keyArr.includes('category')
106
+ const isRealWeight = keyArr.includes('realWeight')
106
107
  const isSubtotalActive = subtotal.show
107
108
  const isOverallOrder = overallOrder?.show
108
109
 
@@ -127,7 +128,13 @@ class ContextMenu extends React.Component {
127
128
  onClick={this.handleChangeTableDataKey.bind(this, 'category', name)}
128
129
  className={isCategoryActive ? 'active' : ''}
129
130
  >
130
- {i18next.t('商品分类')}
131
+ {i18next.t('商品分类(金额小计)')}
132
+ </div>
133
+ <div
134
+ onClick={this.handleChangeTableDataKey.bind(this, 'realWeight', name)}
135
+ className={isRealWeight ? 'active' : ''}
136
+ >
137
+ {i18next.t('商品分类(出库数小计)')}
131
138
  </div>
132
139
  <div
133
140
  onClick={this.handleSubtotal.bind(this, name)}
@@ -0,0 +1,30 @@
1
+ import React from 'react'
2
+ import jsBarcode from 'jsbarcode'
3
+ import PropTypes from 'prop-types'
4
+
5
+ class BarCodeTd extends React.Component {
6
+ barcode = React.createRef()
7
+
8
+ componentDidMount() {
9
+ const { value, ...rest } = this.props
10
+ if (!value) return
11
+ jsBarcode(this.barcode.current, value, {
12
+ ...rest
13
+ })
14
+ }
15
+
16
+ render() {
17
+ const { dataName, value, height } = this.props
18
+ return !value ? null : (
19
+ <svg data-name={dataName} ref={this.barcode} style={{ height }} />
20
+ )
21
+ }
22
+ }
23
+
24
+ BarCodeTd.propTypes = {
25
+ value: PropTypes.string,
26
+ dataName: PropTypes.string,
27
+ height: PropTypes.string
28
+ }
29
+
30
+ export default BarCodeTd
@@ -26,6 +26,15 @@ const configs = [
26
26
  value: item => (
27
27
  <div className='gm-printer-counter-item-1'>{item.quantity}</div>
28
28
  )
29
+ },
30
+ {
31
+ id: 'realWeight',
32
+ name: (
33
+ <div className='gm-printer-counter-item-1'>{i18next.t('出库数小计')}</div>
34
+ ),
35
+ value: item => (
36
+ <div className='gm-printer-counter-item-1'>{item.realWeight}</div>
37
+ )
29
38
  }
30
39
  ]
31
40
 
@@ -17,7 +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
-
20
+ import BarCodeTd from './barcodeTd'
21
21
  @inject('printerStore')
22
22
  @observer
23
23
  class Table extends React.Component {
@@ -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
- // 列宽固定(避免跳页bug)
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,31 +356,11 @@ class Table extends React.Component {
264
356
  <td colSpan='99' />
265
357
  ) : (
266
358
  _.map(columns, (col, j) => {
267
- return (
268
- <td
269
- key={j}
270
- data-name={getTableColumnName(name, col.index)}
271
- style={{
272
- ...getTdStyle(j, col.style),
273
- ...col.style
274
- }}
275
- className={classNames({
276
- active:
277
- getTableColumnName(name, col.index) ===
278
- printerStore.selected
279
- })}
280
- dangerouslySetInnerHTML={{
281
- __html: col.isSpecialColumn
282
- ? printerStore.templateSpecialDetails(
283
- col,
284
- dataKey,
285
- i
286
- )
287
- : printerStore
288
- .templateTable(col.text, dataKey, i, pageIndex)
289
- .replace(/\(\)/g, '')
290
- }}
291
- />
359
+ return this.renderTdMap[col.type ?? 'default']?.call(
360
+ this,
361
+ col,
362
+ j,
363
+ i
292
364
  )
293
365
  })
294
366
  )}