gm-printer 10.14.2-alpha.0 → 10.14.2-alpha.3

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"},{"size":7813,"mtime":1648799098282,"results":"46","hashOfConfig":"47"},{"size":291,"mtime":1638935573926,"results":"48","hashOfConfig":"49"},{"size":523,"mtime":1638935549030,"results":"50","hashOfConfig":"49"},{"size":1139,"mtime":1644572548725,"results":"51","hashOfConfig":"52"},{"size":2293,"mtime":1638948548042,"results":"53","hashOfConfig":"49"},{"size":2292,"mtime":1638948522492,"results":"54","hashOfConfig":"49"},{"size":1078,"mtime":1638948543271,"results":"55","hashOfConfig":"49"},{"size":2067,"mtime":1648466228565,"results":"56","hashOfConfig":"47"},{"size":2991,"mtime":1638948535719,"results":"57","hashOfConfig":"49"},{"size":4379,"mtime":1638935458586,"results":"58","hashOfConfig":"49"},{"size":2428,"mtime":1648466380496,"results":"59","hashOfConfig":"47"},{"size":2955,"mtime":1647850650993,"results":"60","hashOfConfig":"52"},{"size":4170,"mtime":1648640206253,"results":"61","hashOfConfig":"47"},{"size":2833,"mtime":1638861837310,"results":"62","hashOfConfig":"49"},{"size":4212,"mtime":1638935746667,"results":"63","hashOfConfig":"49"},{"size":861,"mtime":1638931446915,"results":"64","hashOfConfig":"49"},{"size":178,"mtime":1638931439249,"results":"65","hashOfConfig":"49"},{"size":3272,"mtime":1648713847909,"results":"66","hashOfConfig":"47"},{"size":29040,"mtime":1648805187401,"results":"67","hashOfConfig":"47"},{"size":4898,"mtime":1639992402586,"results":"68","hashOfConfig":"49"},{"size":16177,"mtime":1648785390895,"results":"69","hashOfConfig":"47"},{"size":14787,"mtime":1638948621474,"results":"70","hashOfConfig":"49"},{"size":2165,"mtime":1638949854481,"results":"71","hashOfConfig":"49"},{"size":2165,"mtime":1638949840121,"results":"72","hashOfConfig":"49"},{"size":2223,"mtime":1638949823846,"results":"73","hashOfConfig":"49"},{"size":2226,"mtime":1638949842800,"results":"74","hashOfConfig":"49"},{"size":3367,"mtime":1638949855771,"results":"75","hashOfConfig":"49"},{"size":2305,"mtime":1638949843817,"results":"76","hashOfConfig":"49"},{"size":3294,"mtime":1638949855131,"results":"77","hashOfConfig":"49"},{"size":2850,"mtime":1638949842017,"results":"78","hashOfConfig":"49"},{"size":4157,"mtime":1638949853726,"results":"79","hashOfConfig":"49"},{"size":605,"mtime":1638949882777,"results":"80","hashOfConfig":"49"},{"size":1175,"mtime":1638949720500,"results":"81","hashOfConfig":"49"},{"size":15067,"mtime":1648801216882,"results":"82","hashOfConfig":"47"},{"size":332,"mtime":1644573509040,"results":"83","hashOfConfig":"52"},{"size":4080,"mtime":1648536160221,"results":"84","hashOfConfig":"47"},{"size":8842,"mtime":1646363892377,"results":"85","hashOfConfig":"52"},{"size":4317,"mtime":1646376602197,"results":"86","hashOfConfig":"52"},{"size":9440,"mtime":1644993553716,"results":"87","hashOfConfig":"52"},{"size":724,"mtime":1644808940649,"results":"88","hashOfConfig":"52"},{"size":1717,"mtime":1648466368772,"results":"89","hashOfConfig":"47"},{"size":5251,"mtime":1649211878386,"results":"90","hashOfConfig":"47"},{"size":9717,"mtime":1648628215217,"results":"91","hashOfConfig":"47"},{"size":9001,"mtime":1648713828033,"results":"92","hashOfConfig":"47"},{"size":3152,"mtime":1648713745966},{"filePath":"93","messages":"94","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"95","messages":"96","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"97","messages":"98","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"99","messages":"100","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"103","messages":"104","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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},{"filePath":"133","messages":"134","errorCount":1,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"135","messages":"136","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":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":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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},"/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",["181","182"],"/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",["183","184","185","186"],"/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",["187"],"/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",[],{"ruleId":"188","severity":2,"message":"189","line":10,"column":29,"nodeType":"190","endLine":10,"endColumn":35},{"ruleId":"188","severity":2,"message":"191","line":145,"column":63,"nodeType":"190","endLine":145,"endColumn":71},{"ruleId":"192","severity":1,"message":"193","line":300,"column":13,"nodeType":"194","endLine":300,"endColumn":49},{"ruleId":"192","severity":1,"message":"193","line":318,"column":13,"nodeType":"194","endLine":318,"endColumn":56},{"ruleId":"192","severity":1,"message":"193","line":470,"column":11,"nodeType":"194","endLine":470,"endColumn":53},{"ruleId":"195","severity":2,"message":"196","line":518,"column":22,"nodeType":"197","messageId":"198","endLine":518,"endColumn":31},{"ruleId":"195","severity":2,"message":"196","line":120,"column":14,"nodeType":"197","messageId":"198","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"},{"size":7813,"mtime":1648799098282,"results":"47","hashOfConfig":"48"},{"size":291,"mtime":1638935573926,"results":"49","hashOfConfig":"50"},{"size":523,"mtime":1638935549030,"results":"51","hashOfConfig":"50"},{"size":1139,"mtime":1644572548725,"results":"52","hashOfConfig":"53"},{"size":2293,"mtime":1638948548042,"results":"54","hashOfConfig":"50"},{"size":2292,"mtime":1638948522492,"results":"55","hashOfConfig":"50"},{"size":1078,"mtime":1638948543271,"results":"56","hashOfConfig":"50"},{"size":2067,"mtime":1648466228565,"results":"57","hashOfConfig":"48"},{"size":2991,"mtime":1638948535719,"results":"58","hashOfConfig":"50"},{"size":4379,"mtime":1638935458586,"results":"59","hashOfConfig":"50"},{"size":2428,"mtime":1648466380496,"results":"60","hashOfConfig":"48"},{"size":2955,"mtime":1647850650993,"results":"61","hashOfConfig":"53"},{"size":4170,"mtime":1648640206253,"results":"62","hashOfConfig":"48"},{"size":2833,"mtime":1638861837310,"results":"63","hashOfConfig":"50"},{"size":4212,"mtime":1638935746667,"results":"64","hashOfConfig":"50"},{"size":861,"mtime":1638931446915,"results":"65","hashOfConfig":"50"},{"size":178,"mtime":1638931439249,"results":"66","hashOfConfig":"50"},{"size":3272,"mtime":1648713847909,"results":"67","hashOfConfig":"48"},{"size":35624,"mtime":1650085861287,"results":"68","hashOfConfig":"48"},{"size":4898,"mtime":1639992402586,"results":"69","hashOfConfig":"50"},{"size":17167,"mtime":1650082865251,"results":"70","hashOfConfig":"48"},{"size":14787,"mtime":1638948621474,"results":"71","hashOfConfig":"50"},{"size":2165,"mtime":1638949854481,"results":"72","hashOfConfig":"50"},{"size":2165,"mtime":1638949840121,"results":"73","hashOfConfig":"50"},{"size":2223,"mtime":1638949823846,"results":"74","hashOfConfig":"50"},{"size":2356,"mtime":1650083974574,"results":"75","hashOfConfig":"48"},{"size":3367,"mtime":1638949855771,"results":"76","hashOfConfig":"50"},{"size":2305,"mtime":1638949843817,"results":"77","hashOfConfig":"50"},{"size":3294,"mtime":1638949855131,"results":"78","hashOfConfig":"50"},{"size":2850,"mtime":1638949842017,"results":"79","hashOfConfig":"50"},{"size":4157,"mtime":1638949853726,"results":"80","hashOfConfig":"50"},{"size":605,"mtime":1638949882777,"results":"81","hashOfConfig":"50"},{"size":1175,"mtime":1638949720500,"results":"82","hashOfConfig":"50"},{"size":15067,"mtime":1648801216882,"results":"83","hashOfConfig":"48"},{"size":332,"mtime":1644573509040,"results":"84","hashOfConfig":"53"},{"size":4080,"mtime":1648536160221,"results":"85","hashOfConfig":"48"},{"size":8842,"mtime":1646363892377,"results":"86","hashOfConfig":"53"},{"size":4317,"mtime":1646376602197,"results":"87","hashOfConfig":"53"},{"size":9440,"mtime":1644993553716,"results":"88","hashOfConfig":"53"},{"size":724,"mtime":1644808940649,"results":"89","hashOfConfig":"53"},{"size":1717,"mtime":1648466368772,"results":"90","hashOfConfig":"48"},{"size":5049,"mtime":1650085552191,"results":"91","hashOfConfig":"48"},{"size":9717,"mtime":1648628215217,"results":"92","hashOfConfig":"48"},{"size":9001,"mtime":1648713828033,"results":"93","hashOfConfig":"48"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"94","hashOfConfig":"48"},{"filePath":"95","messages":"96","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"97","messages":"98","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"99","messages":"100","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"103","messages":"104","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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},{"filePath":"133","messages":"134","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"135","messages":"136","errorCount":1,"warningCount":4,"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":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":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"183","messages":"184","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",["185","186"],"/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",["187","188","189","190","191"],"/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",["192"],"/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",[],{"ruleId":"193","severity":2,"message":"194","line":10,"column":29,"nodeType":"195","endLine":10,"endColumn":35},{"ruleId":"193","severity":2,"message":"196","line":145,"column":63,"nodeType":"195","endLine":145,"endColumn":71},{"ruleId":"197","severity":1,"message":"198","line":305,"column":13,"nodeType":"199","endLine":305,"endColumn":49},{"ruleId":"197","severity":1,"message":"198","line":323,"column":13,"nodeType":"199","endLine":323,"endColumn":56},{"ruleId":"197","severity":1,"message":"198","line":446,"column":15,"nodeType":"199","endLine":446,"endColumn":53},{"ruleId":"197","severity":1,"message":"198","line":495,"column":11,"nodeType":"199","endLine":495,"endColumn":53},{"ruleId":"200","severity":2,"message":"201","line":544,"column":22,"nodeType":"202","messageId":"203","endLine":544,"endColumn":31},{"ruleId":"200","severity":2,"message":"201","line":120,"column":14,"nodeType":"202","messageId":"203","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.14.2-alpha.0",
3
+ "version": "10.14.2-alpha.3",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -184,7 +184,7 @@ class EditorField extends React.Component {
184
184
  }
185
185
 
186
186
  renderTable() {
187
- const { tableDataKeyList, editStore } = this.props
187
+ const { tableDataKeyList, editStore, isSomeSubtotalTr } = this.props
188
188
  const { head, headStyle, text, style } = editStore.computedSelectedInfo
189
189
 
190
190
  const {
@@ -219,6 +219,11 @@ class EditorField extends React.Component {
219
219
  // 每页合计样式
220
220
  const overallOrderStyle =
221
221
  (overallOrder && overallOrder?.fields[0].style) || {}
222
+ // 每页合计自定义单元格
223
+ const subtotalUpperCustomCell =
224
+ (editStore.computedTableSpecialConfig?.subtotal &&
225
+ get(subtotal, 'isCustomCells')) ||
226
+ false
222
227
  // 整单合计是否大写
223
228
  const overallOrderNeedUpperCase =
224
229
  (editStore.computedTableSpecialConfig?.overallOrder &&
@@ -411,18 +416,38 @@ class EditorField extends React.Component {
411
416
  subtotalCheckOnChange={editStore.setSubtotalUpperCase}
412
417
  subtotalCheckText='显示大写金额'
413
418
  />
414
- <EditorSubtotalCheck
415
- subtotalCheckDisabled={subtotalNeedUpperCase}
416
- subtotalChecked={subtotalUpperCaseBefore}
417
- subtotalCheckOnChange={editStore.setSubtotalUpperCaseBefore}
418
- subtotalCheckText='大写金额在前'
419
- />
420
- <EditorSubtotalCheck
421
- subtotalCheckDisabled={subtotalNeedUpperCase}
422
- subtotalChecked={subtotalUpperLowerCaseSeparate}
423
- subtotalCheckOnChange={editStore.setSubtotalUpperLowerCaseSeparate}
424
- subtotalCheckText='大、小写金额分左右两边展示'
425
- />
419
+ {/* 结款单不需要这些配置 */}
420
+ {!isSomeSubtotalTr && (
421
+ <>
422
+ <EditorSubtotalCheck
423
+ subtotalCheckDisabled={subtotalNeedUpperCase}
424
+ subtotalChecked={subtotalUpperCaseBefore}
425
+ subtotalCheckOnChange={editStore.setSubtotalUpperCaseBefore}
426
+ subtotalCheckText='大写金额在前'
427
+ />
428
+ <EditorSubtotalCheck
429
+ subtotalCheckDisabled={subtotalNeedUpperCase}
430
+ subtotalChecked={subtotalUpperLowerCaseSeparate}
431
+ subtotalCheckOnChange={
432
+ editStore.setSubtotalUpperLowerCaseSeparate
433
+ }
434
+ subtotalCheckText='大、小写金额分左右两边展示'
435
+ />
436
+ <EditorSubtotalCheck
437
+ subtotalCheckDisabled
438
+ subtotalChecked={subtotalUpperCustomCell}
439
+ subtotalCheckOnChange={editStore.setSubtotalCustomCells}
440
+ subtotalCheckText='开启自定义单元格'
441
+ />
442
+ <Text
443
+ value={
444
+ subtotal && subtotal?.fields?.[1] ? subtotal.fields[1].name : ''
445
+ }
446
+ onChange={editStore.setSubtotalFields}
447
+ style={{ width: '65px', margin: '5px 0 5px 80px' }}
448
+ />
449
+ </>
450
+ )}
426
451
  <Flex>
427
452
  <Flex>{i18next.t('整单合计')}:</Flex>
428
453
  <Fonter
@@ -490,7 +515,8 @@ class EditorField extends React.Component {
490
515
  EditorField.propTypes = {
491
516
  editStore: PropTypes.object,
492
517
  tableDataKeyList: PropTypes.array,
493
- showNewDate: PropTypes.bool
518
+ showNewDate: PropTypes.bool,
519
+ isSomeSubtotalTr: PropTypes.bool
494
520
  }
495
521
  EditorField.defaultProps = {
496
522
  showNewDate: false
@@ -74,7 +74,15 @@ class EditorStore {
74
74
  fontWeight: 'bold'
75
75
  }
76
76
  }
77
-
77
+
78
+ // 每页合计自定义合并单元格
79
+ @observable
80
+ subtotalConfigFields = {
81
+ name: '',
82
+ valueField: '',
83
+ colSpan: 3 // 产品说3个,开启自定义单元格
84
+ }
85
+
78
86
  @computed
79
87
  get computedPrinterKey() {
80
88
  return _.map(this.config, (v, k) => {
@@ -525,11 +533,28 @@ class EditorStore {
525
533
  setSubtotalShow(name) {
526
534
  const arr = name.split('.')
527
535
  const table = this.config.contents[arr[2]]
528
-
536
+ this.overallOrderShow = !this.overallOrderShow
529
537
  // 切换的时候,要把对应table的多余空数据清掉
530
538
  this.clearExtraTableData(table.dataKey)
531
- table.subtotal.show = !table.subtotal.show
539
+
532
540
  this.setAutoFillingConfig(!this.isAutoFilling)
541
+ // 获取td的colSpan
542
+ const colSpanLength = getColSpanLength(table)
543
+ set(table.subtotal, {
544
+ show: !table.subtotal.show
545
+ })
546
+ // 兼容存在后端的模板,subtotal配置没有fields
547
+ if (!table.subtotal?.fields) {
548
+ set(table.subtotal, {
549
+ fields: [
550
+ {
551
+ name: '每页合计:',
552
+ valueField: 'real_item_price',
553
+ colSpan: colSpanLength
554
+ }
555
+ ]
556
+ })
557
+ }
533
558
  }
534
559
 
535
560
  @action
@@ -577,7 +602,7 @@ class EditorStore {
577
602
  @action
578
603
  changeTableDataKey(name, key) {
579
604
  const arr = name.split('.')
580
- const { dataKey, overallOrder } = this.config.contents[arr[2]]
605
+ const { dataKey, overallOrder, subtotal } = this.config.contents[arr[2]]
581
606
  const keyArr = dataKey.split('_')
582
607
  let newDataKey
583
608
  // 当前有这个key则去掉
@@ -601,10 +626,10 @@ class EditorStore {
601
626
  ])
602
627
 
603
628
  this.config.contents[arr[2]].dataKey = newDataKey.join('_')
604
- // 整单合计的单元格要修改
605
- if (overallOrder?.show) {
606
- overallOrder.show = false
607
- }
629
+ // 整单合计不显示
630
+ if (overallOrder?.show) overallOrder.show = false
631
+ // 每页合计不显示
632
+ if (subtotal?.show) subtotal.show = false
608
633
  }
609
634
 
610
635
  @action
@@ -992,6 +1017,7 @@ class EditorStore {
992
1017
  @action.bound
993
1018
  setSubtotalUpperCase() {
994
1019
  if (this.selectedRegion) {
1020
+ this.overallOrderShow = !this.overallOrderShow
995
1021
  const arr = this.selectedRegion.split('.')
996
1022
  const subtotalConfig = this.config.contents[arr[2]].subtotal
997
1023
 
@@ -1011,6 +1037,7 @@ class EditorStore {
1011
1037
  @action.bound
1012
1038
  setSubtotalUpperCaseBefore() {
1013
1039
  if (this.selectedRegion) {
1040
+ this.overallOrderShow = !this.overallOrderShow
1014
1041
  const arr = this.selectedRegion.split('.')
1015
1042
  const subtotalConfig = this.config.contents[arr[2]].subtotal
1016
1043
 
@@ -1023,6 +1050,7 @@ class EditorStore {
1023
1050
  @action.bound
1024
1051
  setSubtotalUpperLowerCaseSeparate() {
1025
1052
  if (this.selectedRegion) {
1053
+ this.overallOrderShow = !this.overallOrderShow
1026
1054
  const arr = this.selectedRegion.split('.')
1027
1055
  const subtotalConfig = this.config.contents[arr[2]].subtotal
1028
1056
 
@@ -1033,6 +1061,72 @@ class EditorStore {
1033
1061
  }
1034
1062
  }
1035
1063
 
1064
+ // 每页合计开启自定义单元格
1065
+ @action.bound
1066
+ setSubtotalCustomCells() {
1067
+ if (this.selectedRegion) {
1068
+ // 作用:触发组件的更新
1069
+ this.overallOrderShow = !this.overallOrderShow
1070
+ const arr = this.selectedRegion.split('.')
1071
+ const table = this.config.contents[arr[2]]
1072
+ const subtotalConfig = table?.subtotal
1073
+ // 没有显示每页合计的时候不可以设置自定义单元格
1074
+ if (!subtotalConfig?.show) return
1075
+ // 多栏表格情况,计算colSpan
1076
+ const colSpanLength = getColSpanLength(table)
1077
+ const oldCustomCells = subtotalConfig?.isCustomCells
1078
+
1079
+ set(subtotalConfig, {
1080
+ isCustomCells: !oldCustomCells
1081
+ })
1082
+ // 兼容已经存在后端的模板,每页合计直接是显示的,导致每页合计配置没有fields,isCustomCells,手动添加上
1083
+ if (oldCustomCells === undefined && !subtotalConfig.fields) {
1084
+ set(subtotalConfig, {
1085
+ fields: [
1086
+ {
1087
+ name: '每页合计:',
1088
+ valueField: 'real_item_price',
1089
+ colSpan: colSpanLength
1090
+ }
1091
+ ]
1092
+ })
1093
+ }
1094
+ // 开启自定义单元格
1095
+ if (subtotalConfig?.isCustomCells) {
1096
+ // fields添加自定义单元格
1097
+ subtotalConfig.fields = [
1098
+ subtotalConfig.fields[0],
1099
+ {
1100
+ ...this.subtotalConfigFields
1101
+ }
1102
+ ]
1103
+ // 重新计算合并单元格的个数
1104
+ subtotalConfig.fields[0].colSpan =
1105
+ colSpanLength - subtotalConfig.fields[1].colSpan
1106
+ } else {
1107
+ // 关闭自定义单元格,fields只有一个
1108
+ subtotalConfig.fields = [subtotalConfig.fields[0]]
1109
+ // 重新计算合并单元格的个数
1110
+ subtotalConfig.fields[0].colSpan = colSpanLength
1111
+ }
1112
+ }
1113
+ }
1114
+
1115
+ // 每页合计自定义单元格文本输入
1116
+ @action.bound
1117
+ setSubtotalFields(value) {
1118
+ if (this.selectedRegion) {
1119
+ const arr = this.selectedRegion.split('.')
1120
+ const table = this.config.contents[arr[2]]
1121
+ const subtotalConfig = table?.subtotal
1122
+
1123
+ if (subtotalConfig.isCustomCells) {
1124
+ const subtotalConfig = table?.subtotal.fields
1125
+ subtotalConfig[1].name = value
1126
+ }
1127
+ }
1128
+ }
1129
+
1036
1130
  // 整单合计设置大写金额
1037
1131
  @action.bound
1038
1132
  setOverallOrderUpperCase() {
@@ -23,7 +23,7 @@ const tableDataKeyList = [
23
23
  @observer
24
24
  class Editor extends React.Component {
25
25
  render() {
26
- const { onSave, showEditor, addFields } = this.props
26
+ const { onSave, showEditor, addFields, isSomeSubtotalTr } = this.props
27
27
 
28
28
  return (
29
29
  <div className='gm-printer-edit'>
@@ -46,7 +46,10 @@ class Editor extends React.Component {
46
46
  <Gap height='10px' />
47
47
  <EditorSelect />
48
48
  <Gap height='5px' />
49
- <EditorField tableDataKeyList={tableDataKeyList} />
49
+ <EditorField
50
+ tableDataKeyList={tableDataKeyList}
51
+ isSomeSubtotalTr={isSomeSubtotalTr}
52
+ />
50
53
  <Gap height='5px' />
51
54
  <EditorAddField addFields={addFields} />
52
55
 
@@ -69,7 +72,8 @@ Editor.propTypes = {
69
72
  onSave: PropTypes.func,
70
73
  showEditor: PropTypes.bool,
71
74
  mockData: PropTypes.object.isRequired,
72
- addFields: PropTypes.object.isRequired
75
+ addFields: PropTypes.object.isRequired,
76
+ isSomeSubtotalTr: PropTypes.bool
73
77
  }
74
78
 
75
79
  Editor.defaultProps = {
@@ -169,3 +169,12 @@
169
169
  .gm-printer-subtotal-isUpperCaseBefore-inter{
170
170
  order:2;
171
171
  }
172
+ .gm-flex-justify-between-page{
173
+ justify-content: space-between;
174
+ }
175
+ .gm-flex-grow-page{
176
+ flex-grow: 1;
177
+ }
178
+ .gm-flex-page{
179
+ display:flex
180
+ }
@@ -4,12 +4,11 @@ import _ from 'lodash'
4
4
  // import Big from 'big.js'
5
5
  import { coverDigit2Uppercase } from '../util'
6
6
  import { observer } from 'mobx-react'
7
- import { Flex } from '../components'
7
+ import classNames from 'classnames'
8
8
 
9
9
  const OverallOrder = props => {
10
10
  const {
11
11
  config: { overallOrder },
12
- // range,
13
12
  printerStore,
14
13
  printerStore: {
15
14
  data: { common }
@@ -23,11 +22,14 @@ const OverallOrder = props => {
23
22
  {_.map(overallOrder.fields, (item, index) => {
24
23
  return (
25
24
  <td colSpan={item.colSpan} key={index}>
26
- <Flex style={{ ...item.style, display: 'flex' }}>
25
+ <div style={{ ...item.style }} className='gm-flex-page'>
27
26
  {item.name}
28
- <Flex
29
- justifyBetween={overallOrder?.isUpperLowerCaseSeparate}
30
- flexGrow={overallOrder?.isUpperLowerCaseSeparate}
27
+ <div
28
+ className={classNames('gm-flex-page', {
29
+ 'gm-flex-justify-between-page':
30
+ overallOrder?.isUpperLowerCaseSeparate,
31
+ 'gm-flex-grow-page': overallOrder?.isUpperLowerCaseSeparate
32
+ })}
31
33
  >
32
34
  <span
33
35
  className={
@@ -45,8 +47,8 @@ const OverallOrder = props => {
45
47
  : ''}
46
48
  </span>
47
49
  )}
48
- </Flex>
49
- </Flex>
50
+ </div>
51
+ </div>
50
52
  </td>
51
53
  )
52
54
  })}
@@ -7,11 +7,18 @@ import Big from 'big.js'
7
7
  import { coverDigit2Uppercase, getDataKey } from '../util'
8
8
  import { observer } from 'mobx-react'
9
9
  import { get } from 'mobx'
10
+ import classNames from 'classnames'
11
+
10
12
  /**
11
13
  * 每页合计组件,分页计算后,根据range来统计每页合计数据
12
14
  * @param props
13
15
  * @returns {*}
14
16
  */
17
+ const flexStyle = {
18
+ left: 'flex-start',
19
+ center: 'center',
20
+ right: 'flex-end'
21
+ }
15
22
  const SubtotalTr = props => {
16
23
  const {
17
24
  config: {
@@ -25,7 +32,7 @@ const SubtotalTr = props => {
25
32
  style,
26
33
  fields = [
27
34
  {
28
- name: i18next.t('出库金额'),
35
+ name: i18next.t('每页合计:'),
29
36
  valueField: 'real_item_price'
30
37
  }
31
38
  ],
@@ -66,18 +73,14 @@ const SubtotalTr = props => {
66
73
  if (show && printerStore.ready) {
67
74
  const list = tableData.slice(range.begin, range.end)
68
75
 
69
- const sum = {}
70
-
71
- _.each(fields, v => {
72
- sum[v.name] = sumData(list, v.valueField)
73
- })
74
-
75
- // 定义每页小记的左右两侧内容
76
- let subtotalLeftContent
77
- let subtotalRightContent
78
- let subtotalStr = ''
79
- // 结款单
76
+ // 针对结款单的
80
77
  if (isSomeSubtotalTr) {
78
+ const sum = {}
79
+
80
+ _.each(fields, v => {
81
+ sum[v.name] = sumData(list, v.valueField)
82
+ })
83
+ let subtotalStr = ''
81
84
  for (const name in sum) {
82
85
  const price = sum[name]
83
86
  const priceUpperCase = get(subtotal, 'needUpperCase') // needUpperCase在初始模板中undefined,所以必须用这个方法
@@ -102,61 +105,49 @@ const SubtotalTr = props => {
102
105
  </tr>
103
106
  )
104
107
  } else {
105
- for (const name in sum) {
106
- const price = sum[name]
107
- const priceUpperCase = get(subtotal, 'needUpperCase') // needUpperCase在初始模板中undefined,所以必须用这个方法
108
- ? '大写:' + coverDigit2Uppercase(price)
109
- : ''
110
- if (displayName) {
111
- // 大写金额是否在前
112
- if (isUpperCaseBefore) {
113
- subtotalLeftContent = `${name}${priceUpperCase}`
114
- subtotalRightContent = `${price}`
115
- } else {
116
- subtotalLeftContent = `${price}`
117
- subtotalRightContent = `${name} ${priceUpperCase}`
118
- }
119
- } else {
120
- if (isUpperCaseBefore) {
121
- subtotalLeftContent = `${priceUpperCase}`
122
- subtotalRightContent = `${price}`
123
- } else {
124
- subtotalLeftContent = `${price}`
125
- subtotalRightContent = `${priceUpperCase}`
126
- }
127
- }
128
- }
129
-
130
108
  return (
131
109
  <tr>
132
- <td
133
- colSpan={99}
134
- style={{ fontWeight: 'bold', ...style }}
135
- // dangerouslySetInnerHTML={{
136
- // __html: `${i18next.t('每页合计')}:${subtotalStr}`
137
- // }}flex-grow: 1
138
- >
139
- {/* 大写金额和小写金额分开在表格的两侧,通过控制类名实现,添加类名后,覆盖原来的居中、靠右靠左 */}
140
- <div
141
- className={
142
- isUpperLowerCaseSeparate
143
- ? 'gm-printer-subtotal-UpperLowerCaseSeparate-outer'
144
- : ''
145
- }
146
- >
147
- {i18next.t('每页合计')}:
148
- <span
149
- className={
150
- isUpperLowerCaseSeparate
151
- ? 'gm-printer-subtotal-UpperLowerCaseSeparate-inter'
152
- : ''
153
- }
154
- >
155
- <span>&nbsp;&nbsp;{subtotalLeftContent}&nbsp;&nbsp;</span>
156
- <span>&nbsp;&nbsp;{subtotalRightContent}&nbsp;&nbsp;</span>
157
- </span>
158
- </div>
159
- </td>
110
+ {_.map(fields, (item, index) => {
111
+ return (
112
+ <td colSpan={item.colSpan ?? 99} key={index}>
113
+ <div
114
+ style={{
115
+ fontWeight: 'bold',
116
+ 'justify-content': flexStyle[subtotal.style?.textAlign], // flex布局中textAlign不生效,改使用justify-content
117
+ ...subtotal.style
118
+ }}
119
+ className='gm-flex-page'
120
+ >
121
+ {item.name}
122
+ <div
123
+ className={classNames('gm-flex-page', {
124
+ 'gm-flex-justify-between-page': isUpperLowerCaseSeparate, // 决定大小写金额是否分开在两端
125
+ 'gm-flex-grow-page': isUpperLowerCaseSeparate
126
+ })}
127
+ >
128
+ <span
129
+ className={
130
+ isUpperCaseBefore // 决定小写金额是否在前
131
+ ? 'gm-printer-subtotal-isUpperCaseBefore-inter'
132
+ : ''
133
+ }
134
+ >
135
+ {/* 这样写是为了支持自定义单元,index = 1时是自定义单元格 */}
136
+ {index === 0 ? sumData(list, item.valueField) : ''}
137
+ </span>
138
+ {subtotal?.needUpperCase && ( // 是否需要大写金额
139
+ <span>
140
+ {index === 0
141
+ ? '大写:' +
142
+ coverDigit2Uppercase(sumData(list, item.valueField))
143
+ : ''}
144
+ </span>
145
+ )}
146
+ </div>
147
+ </div>
148
+ </td>
149
+ )
150
+ })}
160
151
  </tr>
161
152
  )
162
153
  }