gm-printer 10.13.17 → 10.13.18-alpha.0

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"},{"size":7451,"mtime":1648697360360,"results":"45","hashOfConfig":"46"},{"size":291,"mtime":1638935573926,"results":"47","hashOfConfig":"48"},{"size":523,"mtime":1638935549030,"results":"49","hashOfConfig":"48"},{"size":1139,"mtime":1644572548725,"results":"50","hashOfConfig":"51"},{"size":2293,"mtime":1638948548042,"results":"52","hashOfConfig":"48"},{"size":2292,"mtime":1638948522492,"results":"53","hashOfConfig":"48"},{"size":1078,"mtime":1638948543271,"results":"54","hashOfConfig":"48"},{"size":2067,"mtime":1648466228565,"results":"55","hashOfConfig":"46"},{"size":2991,"mtime":1638948535719,"results":"56","hashOfConfig":"48"},{"size":4379,"mtime":1638935458586,"results":"57","hashOfConfig":"48"},{"size":2428,"mtime":1648466380496,"results":"58","hashOfConfig":"46"},{"size":2955,"mtime":1647850650993,"results":"59","hashOfConfig":"51"},{"size":4170,"mtime":1648640206253,"results":"60","hashOfConfig":"46"},{"size":2833,"mtime":1638861837310,"results":"61","hashOfConfig":"48"},{"size":4212,"mtime":1638935746667,"results":"62","hashOfConfig":"48"},{"size":861,"mtime":1638931446915,"results":"63","hashOfConfig":"48"},{"size":178,"mtime":1638931439249,"results":"64","hashOfConfig":"48"},{"size":3318,"mtime":1648640833509,"results":"65","hashOfConfig":"46"},{"size":25938,"mtime":1648641321043,"results":"66","hashOfConfig":"46"},{"size":4898,"mtime":1639992402586,"results":"67","hashOfConfig":"48"},{"size":15032,"mtime":1648641509756,"results":"68","hashOfConfig":"46"},{"size":14787,"mtime":1638948621474,"results":"69","hashOfConfig":"48"},{"size":2165,"mtime":1638949854481,"results":"70","hashOfConfig":"48"},{"size":2165,"mtime":1638949840121,"results":"71","hashOfConfig":"48"},{"size":2223,"mtime":1638949823846,"results":"72","hashOfConfig":"48"},{"size":2226,"mtime":1638949842800,"results":"73","hashOfConfig":"48"},{"size":3367,"mtime":1638949855771,"results":"74","hashOfConfig":"48"},{"size":2305,"mtime":1638949843817,"results":"75","hashOfConfig":"48"},{"size":3294,"mtime":1638949855131,"results":"76","hashOfConfig":"48"},{"size":2850,"mtime":1638949842017,"results":"77","hashOfConfig":"48"},{"size":4157,"mtime":1638949853726,"results":"78","hashOfConfig":"48"},{"size":605,"mtime":1638949882777,"results":"79","hashOfConfig":"48"},{"size":1175,"mtime":1638949720500,"results":"80","hashOfConfig":"48"},{"size":14825,"mtime":1648640573288,"results":"81","hashOfConfig":"46"},{"size":332,"mtime":1644573509040,"results":"82","hashOfConfig":"51"},{"size":4080,"mtime":1648536160221,"results":"83","hashOfConfig":"46"},{"size":8842,"mtime":1646363892377,"results":"84","hashOfConfig":"51"},{"size":4317,"mtime":1646376602197,"results":"85","hashOfConfig":"51"},{"size":9440,"mtime":1644993553716,"results":"86","hashOfConfig":"51"},{"size":724,"mtime":1644808940649,"results":"87","hashOfConfig":"51"},{"size":1717,"mtime":1648466368772,"results":"88","hashOfConfig":"46"},{"size":5086,"mtime":1648537823749,"results":"89","hashOfConfig":"46"},{"size":9717,"mtime":1648628215217,"results":"90","hashOfConfig":"46"},{"size":9053,"mtime":1648640178717,"results":"91","hashOfConfig":"46"},{"filePath":"92","messages":"93","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"94","messages":"95","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"96","messages":"97","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"98","messages":"99","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"100","messages":"101","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"102","messages":"103","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"104","messages":"105","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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},{"filePath":"132","messages":"133","errorCount":1,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"134","messages":"135","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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},"/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",["180","181"],"/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",["182","183","184"],"/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",["185"],"/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":"186","severity":2,"message":"187","line":10,"column":29,"nodeType":"188","endLine":10,"endColumn":35},{"ruleId":"186","severity":2,"message":"189","line":145,"column":63,"nodeType":"188","endLine":145,"endColumn":71},{"ruleId":"190","severity":1,"message":"191","line":280,"column":13,"nodeType":"192","endLine":280,"endColumn":49},{"ruleId":"190","severity":1,"message":"191","line":298,"column":13,"nodeType":"192","endLine":298,"endColumn":56},{"ruleId":"193","severity":2,"message":"194","line":483,"column":22,"nodeType":"195","messageId":"196","endLine":483,"endColumn":31},{"ruleId":"193","severity":2,"message":"194","line":120,"column":14,"nodeType":"195","messageId":"196","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/printer/table_overallOrder_tr.js":"45","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/flex/index.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":29040,"mtime":1648805187401,"results":"68","hashOfConfig":"48"},{"size":4898,"mtime":1639992402586,"results":"69","hashOfConfig":"50"},{"size":16177,"mtime":1648785390895,"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":2226,"mtime":1638949842800,"results":"75","hashOfConfig":"50"},{"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":5086,"mtime":1648537823749,"results":"91","hashOfConfig":"48"},{"size":9717,"mtime":1648628215217,"results":"92","hashOfConfig":"48"},{"size":9001,"mtime":1648713828033,"results":"93","hashOfConfig":"48"},{"size":1780,"mtime":1648799966079,"results":"94","hashOfConfig":"48"},{"size":3152,"mtime":1648713745966},{"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":3,"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"],"/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",["191"],"/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":"192","severity":2,"message":"193","line":10,"column":29,"nodeType":"194","endLine":10,"endColumn":35},{"ruleId":"192","severity":2,"message":"195","line":145,"column":63,"nodeType":"194","endLine":145,"endColumn":71},{"ruleId":"196","severity":1,"message":"197","line":300,"column":13,"nodeType":"198","endLine":300,"endColumn":49},{"ruleId":"196","severity":1,"message":"197","line":318,"column":13,"nodeType":"198","endLine":318,"endColumn":56},{"ruleId":"196","severity":1,"message":"197","line":470,"column":11,"nodeType":"198","endLine":470,"endColumn":53},{"ruleId":"199","severity":2,"message":"200","line":518,"column":22,"nodeType":"201","messageId":"202","endLine":518,"endColumn":31},{"ruleId":"199","severity":2,"message":"200","line":120,"column":14,"nodeType":"201","messageId":"202","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.13.17",
3
+ "version": "10.13.18-alpha.0",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -13,7 +13,8 @@ import {
13
13
  ColumnWidth,
14
14
  Textarea,
15
15
  Title,
16
- TipInfo
16
+ TipInfo,
17
+ Text
17
18
  } from '../common/component'
18
19
  import { get } from 'mobx'
19
20
  import PropTypes from 'prop-types'
@@ -73,6 +74,11 @@ class EditorField extends React.Component {
73
74
  editStore.setSubtotalStyle(value)
74
75
  }
75
76
 
77
+ handleOverallOrderStyleChange = value => {
78
+ const { editStore } = this.props
79
+ editStore.setOverallOrderStyle(value)
80
+ }
81
+
76
82
  renderBlocks() {
77
83
  const { editStore, showNewDate } = this.props
78
84
  const { type, text, style, link } = editStore.computedSelectedInfo
@@ -181,7 +187,12 @@ class EditorField extends React.Component {
181
187
  const { tableDataKeyList, editStore } = this.props
182
188
  const { head, headStyle, text, style } = editStore.computedSelectedInfo
183
189
 
184
- const { specialConfig, subtotal } = editStore.computedTableSpecialConfig
190
+ const {
191
+ specialConfig,
192
+ subtotal,
193
+ overallOrder
194
+ } = editStore.computedTableSpecialConfig
195
+
185
196
  // 小计样式,specialConfig可能是undefined
186
197
  const specialStyle =
187
198
  editStore.computedTableSpecialConfig?.specialConfig?.style || {}
@@ -195,16 +206,40 @@ class EditorField extends React.Component {
195
206
  (editStore.computedTableSpecialConfig.subtotal &&
196
207
  get(subtotal, 'needUpperCase')) ||
197
208
  false
198
- // 大写的金额是否在前
209
+ // 每页合计大写的金额是否在前
199
210
  const subtotalUpperCaseBefore =
200
211
  (editStore.computedTableSpecialConfig.subtotal &&
201
212
  get(subtotal, 'isUpperCaseBefore')) ||
202
213
  false
203
- // 大写和小写的金额是否分开
214
+ // 每页合计大写和小写的金额是否分开
204
215
  const subtotalUpperLowerCaseSeparate =
205
216
  (editStore.computedTableSpecialConfig.subtotal &&
206
217
  get(subtotal, 'isUpperLowerCaseSeparate')) ||
207
218
  false
219
+ // 每页合计样式
220
+ const overallOrderStyle =
221
+ (overallOrder && overallOrder?.fields[0].style) || {}
222
+ // 整单合计是否大写
223
+ const overallOrderNeedUpperCase =
224
+ (editStore.computedTableSpecialConfig?.overallOrder &&
225
+ get(overallOrder, 'needUpperCase')) ||
226
+ false
227
+ // 整单合计大写的金额是否在前
228
+ const overallOrderCaseBefore =
229
+ (editStore.computedTableSpecialConfig?.overallOrder &&
230
+ get(overallOrder, 'isUpperCaseBefore')) ||
231
+ false
232
+ // 整单合计大写和小写的金额是否分开
233
+ const overallOrderUpperLowerCaseSeparate =
234
+ (editStore.computedTableSpecialConfig?.overallOrder &&
235
+ get(overallOrder, 'isUpperLowerCaseSeparate')) ||
236
+ false
237
+ // 整单合计自定义单元格
238
+ const overallOrderUpperCustomCell =
239
+ (editStore.computedTableSpecialConfig?.overallOrder &&
240
+ get(overallOrder, 'isCustomCells')) ||
241
+ false
242
+
208
243
  return (
209
244
  <div>
210
245
  <Title title={i18next.t('编辑字段')} />
@@ -388,6 +423,53 @@ class EditorField extends React.Component {
388
423
  subtotalCheckOnChange={editStore.setSubtotalUpperLowerCaseSeparate}
389
424
  subtotalCheckText='大、小写金额分左右两边展示'
390
425
  />
426
+ <Flex>
427
+ <Flex>{i18next.t('整单合计')}:</Flex>
428
+ <Fonter
429
+ style={overallOrderStyle}
430
+ onChange={this.handleOverallOrderStyleChange}
431
+ />
432
+ <Separator />
433
+ <TextAlign
434
+ style={overallOrderStyle}
435
+ onChange={this.handleOverallOrderStyleChange}
436
+ />
437
+ </Flex>
438
+ <EditorSubtotalCheck
439
+ subtotalCheckDisabled
440
+ subtotalChecked={overallOrderNeedUpperCase}
441
+ subtotalCheckOnChange={editStore.setOverallOrderUpperCase}
442
+ subtotalCheckText='显示大写金额'
443
+ />
444
+ <EditorSubtotalCheck
445
+ subtotalCheckDisabled={overallOrderNeedUpperCase}
446
+ subtotalChecked={overallOrderCaseBefore}
447
+ subtotalCheckOnChange={editStore.setOverallOrderUpperCaseBefore}
448
+ subtotalCheckText='大写金额在前'
449
+ />
450
+ <EditorSubtotalCheck
451
+ subtotalCheckDisabled={overallOrderNeedUpperCase}
452
+ subtotalChecked={overallOrderUpperLowerCaseSeparate}
453
+ subtotalCheckOnChange={
454
+ editStore.setOverallOrderUpperLowerCaseSeparate
455
+ }
456
+ subtotalCheckText='大、小写金额分左右两边展示'
457
+ />
458
+ <EditorSubtotalCheck
459
+ subtotalCheckDisabled
460
+ subtotalChecked={overallOrderUpperCustomCell}
461
+ subtotalCheckOnChange={editStore.setOverallOrderCustomCells}
462
+ subtotalCheckText='开启自定义单元格'
463
+ />
464
+ <Text
465
+ value={
466
+ overallOrder && overallOrder?.fields?.[1]
467
+ ? overallOrder.fields[1].name
468
+ : ''
469
+ }
470
+ onChange={editStore.setOverallOrderFields}
471
+ style={{ width: '65px', margin: '5px 0 5px 80px' }}
472
+ />
391
473
  </div>
392
474
  )
393
475
  }
@@ -2,13 +2,27 @@ import i18next from '../../locales'
2
2
  import { action, computed, observable, set, toJS } from 'mobx'
3
3
  import { pageTypeMap } from '../config'
4
4
  import _ from 'lodash'
5
- import { dispatchMsg, getBlockName, exchange } from '../util'
5
+ import { dispatchMsg, getBlockName, exchange, getColSpanLength } from '../util'
6
6
  import React from 'react'
7
7
 
8
8
  class EditorStore {
9
9
  @observable
10
10
  tableCustomStyle = 'default'
11
11
 
12
+ @observable
13
+ overallOrderShow = false
14
+
15
+ // 整单合计自定义合并单元格
16
+ @observable
17
+ overallOrderConfigFields = {
18
+ name: '',
19
+ valueField: '',
20
+ colSpan: 3, // 产品说3个
21
+ style: {
22
+ fontWeight: 'bold'
23
+ }
24
+ }
25
+
12
26
  @action.bound
13
27
  changeTableCustomStyle(v) {
14
28
  if (this.selectedRegion) {
@@ -429,6 +443,39 @@ class EditorStore {
429
443
  table.subtotal.show = !table.subtotal.show
430
444
  }
431
445
 
446
+ @action
447
+ setOverallOrderShow(name) {
448
+ const arr = name.split('.')
449
+ const table = this.config.contents[arr[2]]
450
+ this.overallOrderShow = !this.overallOrderShow
451
+ const colSpanLength = getColSpanLength(table)
452
+ if (table.overallOrder) {
453
+ set(table.overallOrder, {
454
+ show: !table.overallOrder.show
455
+ })
456
+ table.overallOrder.fields[0].colSpan =
457
+ colSpanLength - (table.overallOrder.fields?.[1]?.colSpan ?? 0)
458
+ } else {
459
+ // 兼容已经存在的配送单据,他们的配置存在后端的,没有overallOrder这个配置,给加上
460
+ set(table, {
461
+ overallOrder: {
462
+ show: true,
463
+ fields: [
464
+ {
465
+ name: '整单合计:',
466
+ valueField: '出库金额',
467
+ style: {
468
+ fontWeight: 'bold'
469
+ },
470
+ colSpan: colSpanLength
471
+ }
472
+ ]
473
+ }
474
+ })
475
+ }
476
+ this.config = toJS(this.config)
477
+ }
478
+
432
479
  @action
433
480
  setConfigTable(who, value) {
434
481
  if (!this.computedIsSelectTable) {
@@ -441,7 +488,7 @@ class EditorStore {
441
488
  @action
442
489
  changeTableDataKey(name, key) {
443
490
  const arr = name.split('.')
444
- const { dataKey } = this.config.contents[arr[2]]
491
+ const { dataKey, overallOrder } = this.config.contents[arr[2]]
445
492
  const keyArr = dataKey.split('_')
446
493
  let newDataKey
447
494
  // 当前有这个key则去掉
@@ -465,6 +512,10 @@ class EditorStore {
465
512
  ])
466
513
 
467
514
  this.config.contents[arr[2]].dataKey = newDataKey.join('_')
515
+ // 整单合计的单元格要修改
516
+ if (overallOrder?.show) {
517
+ overallOrder.show = false
518
+ }
468
519
  }
469
520
 
470
521
  @action
@@ -840,7 +891,7 @@ class EditorStore {
840
891
  }
841
892
  }
842
893
 
843
- // 设置大写金额
894
+ // 每页合计设置大写金额
844
895
  @action.bound
845
896
  setSubtotalUpperCase() {
846
897
  if (this.selectedRegion) {
@@ -859,7 +910,7 @@ class EditorStore {
859
910
  }
860
911
  }
861
912
 
862
- // 设置大写金额在前
913
+ // 每页合计设置大写金额在前
863
914
  @action.bound
864
915
  setSubtotalUpperCaseBefore() {
865
916
  if (this.selectedRegion) {
@@ -871,7 +922,7 @@ class EditorStore {
871
922
  }
872
923
  }
873
924
 
874
- // 设置大小写金额分开
925
+ // 每页合计设置大小写金额分开
875
926
  @action.bound
876
927
  setSubtotalUpperLowerCaseSeparate() {
877
928
  if (this.selectedRegion) {
@@ -885,7 +936,144 @@ class EditorStore {
885
936
  }
886
937
  }
887
938
 
888
- // 设置交换位置
939
+ // 整单合计设置大写金额
940
+ @action.bound
941
+ setOverallOrderUpperCase() {
942
+ if (this.selectedRegion) {
943
+ this.overallOrderShow = !this.overallOrderShow
944
+ const arr = this.selectedRegion.split('.')
945
+ const overallOrderConfig = this.config.contents[arr[2]]?.overallOrder
946
+
947
+ const oldNeedUpperCase = overallOrderConfig?.needUpperCase
948
+ this.config.contents[arr[2]]?.overallOrder &&
949
+ set(overallOrderConfig, { needUpperCase: !oldNeedUpperCase })
950
+ // 没有大写金额时,将大写在前和大小写分开的多选框设置为false
951
+ if (
952
+ this.config.contents[arr[2]]?.overallOrder &&
953
+ overallOrderConfig.needUpperCase === false
954
+ ) {
955
+ overallOrderConfig.isUpperCaseBefore &&
956
+ set(overallOrderConfig, { isUpperCaseBefore: false })
957
+ overallOrderConfig.isUpperLowerCaseSeparate &&
958
+ set(overallOrderConfig, { isUpperLowerCaseSeparate: false })
959
+ }
960
+ }
961
+ }
962
+
963
+ // 整单合计设置大写金额在前
964
+ @action.bound
965
+ setOverallOrderUpperCaseBefore() {
966
+ if (this.selectedRegion) {
967
+ this.overallOrderShow = !this.overallOrderShow
968
+ const arr = this.selectedRegion.split('.')
969
+ const overallOrderConfig = this.config.contents[arr[2]]?.overallOrder
970
+
971
+ const oldUpperCaseBefore = overallOrderConfig?.isUpperCaseBefore
972
+ this.config.contents[arr[2]]?.overallOrder &&
973
+ set(overallOrderConfig, { isUpperCaseBefore: !oldUpperCaseBefore })
974
+ }
975
+ }
976
+
977
+ // 整单合计设置大小写金额分开
978
+ @action.bound
979
+ setOverallOrderUpperLowerCaseSeparate() {
980
+ if (this.selectedRegion) {
981
+ this.overallOrderShow = !this.overallOrderShow
982
+ const arr = this.selectedRegion.split('.')
983
+ const overallOrderConfig = this.config.contents[arr[2]]?.overallOrder
984
+
985
+ const oldUpperLowerCaseSeparate =
986
+ overallOrderConfig.isUpperLowerCaseSeparate
987
+ set(overallOrderConfig, {
988
+ isUpperLowerCaseSeparate: !oldUpperLowerCaseSeparate
989
+ })
990
+ }
991
+ }
992
+
993
+ // 整单合计开启自定义单元格
994
+ @action.bound
995
+ setOverallOrderCustomCells() {
996
+ if (this.selectedRegion) {
997
+ // 作用:触发tableoverallordertr组件的更新
998
+ this.overallOrderShow = !this.overallOrderShow
999
+ const arr = this.selectedRegion.split('.')
1000
+ const table = this.config.contents[arr[2]]
1001
+ const overallOrderConfig = table?.overallOrder
1002
+ if (!overallOrderConfig || !overallOrderConfig?.show) return
1003
+ // 多栏表格情况
1004
+ const colSpanLength = getColSpanLength(table)
1005
+ const oldCustomCells = overallOrderConfig?.isCustomCells
1006
+
1007
+ set(overallOrderConfig, {
1008
+ isCustomCells: !oldCustomCells
1009
+ })
1010
+
1011
+ if (overallOrderConfig?.isCustomCells) {
1012
+ // fields添加自定义单元格
1013
+ overallOrderConfig.fields = [
1014
+ overallOrderConfig.fields[0],
1015
+ {
1016
+ ...this.overallOrderConfigFields,
1017
+ // 和之前保持一样的样式
1018
+ style: { ...overallOrderConfig.fields[0].style }
1019
+ }
1020
+ ]
1021
+ // 重新计算合并单元格的个数
1022
+ overallOrderConfig.fields[0].colSpan =
1023
+ colSpanLength - overallOrderConfig.fields[1].colSpan
1024
+ } else {
1025
+ // 关闭自定义单元格
1026
+ overallOrderConfig.fields = [overallOrderConfig.fields[0]]
1027
+ // 重新计算合并单元格的个数
1028
+ overallOrderConfig.fields[0].colSpan = colSpanLength
1029
+ }
1030
+
1031
+ this.config = toJS(this.config)
1032
+ }
1033
+ }
1034
+
1035
+ // 整单合计自定义单元格文本输入
1036
+ @action.bound
1037
+ setOverallOrderFields(value) {
1038
+ if (this.selectedRegion) {
1039
+ const arr = this.selectedRegion.split('.')
1040
+ const table = this.config.contents[arr[2]]
1041
+ const overallOrderConfig = table?.overallOrder
1042
+
1043
+ if (overallOrderConfig.isCustomCells) {
1044
+ const overallOrderConfigFields = table?.overallOrder.fields
1045
+ overallOrderConfigFields[1].name = value
1046
+ }
1047
+ }
1048
+ }
1049
+
1050
+ // 整单合计样式设置
1051
+ @action.bound
1052
+ setOverallOrderStyle(value) {
1053
+ if (this.selectedRegion) {
1054
+ const flexStyle = {
1055
+ left: 'flex-start',
1056
+ center: 'center',
1057
+ right: 'flex-end'
1058
+ }
1059
+ const arr = this.selectedRegion.split('.')
1060
+ const overallOrderConfigFields = this.config.contents[arr[2]]
1061
+ ?.overallOrder.fields
1062
+ _.forEach(overallOrderConfigFields, item => {
1063
+ const oldStyle = item.style || {}
1064
+ set(item, {
1065
+ style: {
1066
+ ...oldStyle,
1067
+ ...value,
1068
+ // 整单合计里使用的flex布局,textAlign不生效
1069
+ 'justify-content': flexStyle[value.textAlign]
1070
+ }
1071
+ })
1072
+ })
1073
+ }
1074
+ }
1075
+
1076
+ // 合计和每页合计设置交换位置
889
1077
  @action.bound
890
1078
  setSubtotalCommutationPlace() {
891
1079
  if (this.selectedRegion) {
@@ -3,63 +3,87 @@ import PropTypes from 'prop-types'
3
3
  import classNames from 'classnames'
4
4
 
5
5
  class Flex extends React.Component {
6
- render () {
6
+ render() {
7
7
  const {
8
8
  flex,
9
9
 
10
- auto, none, width, height,
10
+ auto,
11
+ none,
12
+ width,
13
+ height,
11
14
 
12
- row, column,
15
+ row,
16
+ column,
13
17
 
14
- wrap, nowrap,
18
+ wrap,
19
+ nowrap,
20
+ flexGrow,
15
21
 
16
- justifyStart, justifyEnd, justifyCenter, justifyBetween, justifyAround,
22
+ justifyStart,
23
+ justifyEnd,
24
+ justifyCenter,
25
+ justifyBetween,
26
+ justifyAround,
17
27
 
18
- alignStart, alignEnd, alignCenter, alignBaseline, alignStretch,
28
+ alignStart,
29
+ alignEnd,
30
+ alignCenter,
31
+ alignBaseline,
32
+ alignStretch,
19
33
 
20
- alignContentStart, alignContentEnd, alignContentCenter, alignContentBetween, alignContentAround, alignContentStretch,
34
+ alignContentStart,
35
+ alignContentEnd,
36
+ alignContentCenter,
37
+ alignContentBetween,
38
+ alignContentAround,
39
+ alignContentStretch,
21
40
 
22
- className, style,
41
+ className,
42
+ style,
23
43
 
24
44
  ...rest
25
45
  } = this.props
26
- const cn = classNames({
27
- 'gm-flex': true,
28
-
29
- 'gm-flex-flex': flex,
30
- 'gm-flex-auto': auto,
31
- 'gm-flex-none': none || width || height,
32
-
33
- 'gm-flex-row': row,
34
- 'gm-flex-column': column,
35
-
36
- 'gm-flex-wrap': wrap,
37
- 'gm-flex-nowrap': nowrap,
38
-
39
- 'gm-flex-justify-start': justifyStart,
40
- 'gm-flex-justify-end': justifyEnd,
41
- 'gm-flex-justify-center': justifyCenter,
42
- 'gm-flex-justify-between': justifyBetween,
43
- 'gm-flex-justify-around': justifyAround,
44
-
45
- 'gm-flex-align-start': alignStart,
46
- 'gm-flex-align-end': alignEnd,
47
- 'gm-flex-align-center': alignCenter,
48
- 'gm-flex-align-baseline': alignBaseline,
49
- 'gm-flex-align-stretch': alignStretch,
50
-
51
- 'gm-flex-align-content-start': alignContentStart,
52
- 'gm-flex-align-content-end': alignContentEnd,
53
- 'gm-flex-align-content-center': alignContentCenter,
54
- 'gm-flex-align-content-between': alignContentBetween,
55
- 'gm-flex-align-content-around': alignContentAround,
56
- 'gm-flex-align-content-stretch': alignContentStretch
57
- }, className)
46
+ const cn = classNames(
47
+ {
48
+ 'gm-flex': true,
49
+
50
+ 'gm-flex-grow': flexGrow,
51
+ 'gm-flex-flex': flex,
52
+ 'gm-flex-auto': auto,
53
+ 'gm-flex-none': none || width || height,
54
+
55
+ 'gm-flex-row': row,
56
+ 'gm-flex-column': column,
57
+
58
+ 'gm-flex-wrap': wrap,
59
+ 'gm-flex-nowrap': nowrap,
60
+
61
+ 'gm-flex-justify-start': justifyStart,
62
+ 'gm-flex-justify-end': justifyEnd,
63
+ 'gm-flex-justify-center': justifyCenter,
64
+ 'gm-flex-justify-between': justifyBetween,
65
+ 'gm-flex-justify-around': justifyAround,
66
+
67
+ 'gm-flex-align-start': alignStart,
68
+ 'gm-flex-align-end': alignEnd,
69
+ 'gm-flex-align-center': alignCenter,
70
+ 'gm-flex-align-baseline': alignBaseline,
71
+ 'gm-flex-align-stretch': alignStretch,
72
+
73
+ 'gm-flex-align-content-start': alignContentStart,
74
+ 'gm-flex-align-content-end': alignContentEnd,
75
+ 'gm-flex-align-content-center': alignContentCenter,
76
+ 'gm-flex-align-content-between': alignContentBetween,
77
+ 'gm-flex-align-content-around': alignContentAround,
78
+ 'gm-flex-align-content-stretch': alignContentStretch
79
+ },
80
+ className
81
+ )
58
82
 
59
83
  let s = Object.assign({}, style)
60
84
  if (flex) {
61
- s.flex = (typeof flex === 'boolean') ? 1 : flex
62
- s.WebKitFlex = (typeof flex === 'boolean') ? 1 : flex
85
+ s.flex = typeof flex === 'boolean' ? 1 : flex
86
+ s.WebKitFlex = typeof flex === 'boolean' ? 1 : flex
63
87
  }
64
88
  if (height) {
65
89
  s.height = height
@@ -68,7 +92,11 @@ class Flex extends React.Component {
68
92
  s.width = width
69
93
  }
70
94
 
71
- return <div {...rest} className={cn} style={s}>{this.props.children}</div>
95
+ return (
96
+ <div {...rest} className={cn} style={s}>
97
+ {this.props.children}
98
+ </div>
99
+ )
72
100
  }
73
101
  }
74
102
 
@@ -81,6 +109,7 @@ Flex.propTypes = {
81
109
  row: PropTypes.bool,
82
110
  column: PropTypes.bool,
83
111
  wrap: PropTypes.bool,
112
+ flexGrow: PropTypes.bool,
84
113
  nowrap: PropTypes.bool,
85
114
  justifyStart: PropTypes.bool,
86
115
  justifyEnd: PropTypes.bool,
@@ -19,6 +19,10 @@
19
19
  align-items: stretch;
20
20
  box-sizing: border-box;
21
21
 
22
+ &.gm-flex-grow {
23
+ flex-grow: 1;
24
+ }
25
+
22
26
  &.gm-flex-wrap {
23
27
  flex-wrap: wrap;
24
28
  }
@@ -98,4 +102,4 @@
98
102
  &.gm-flex-align-content-stretch {
99
103
  align-content: stretch;
100
104
  }
101
- }
105
+ }
@@ -48,10 +48,14 @@ class ContextMenu extends React.Component {
48
48
 
49
49
  handleSubtotal = name => {
50
50
  const { editStore } = this.props
51
-
52
51
  editStore.setSubtotalShow(name)
53
52
  }
54
53
 
54
+ handleOverallOrder = name => {
55
+ const { editStore } = this.props
56
+ editStore.setOverallOrderShow(name)
57
+ }
58
+
55
59
  renderOrderActionBtn = name => {
56
60
  if (!this.hasSubtotalBtn(name)) {
57
61
  return null
@@ -65,13 +69,18 @@ class ContextMenu extends React.Component {
65
69
  }
66
70
  } = this.props
67
71
  const arr = name.split('.')
68
- const { dataKey, subtotal } = this.props.editStore.config.contents[arr[2]]
72
+ const {
73
+ dataKey,
74
+ subtotal,
75
+ overallOrder
76
+ } = this.props.editStore.config.contents[arr[2]]
69
77
  const keyArr = dataKey.split('_')
70
78
 
71
79
  const isMultiActive = keyArr.includes('multi')
72
80
  const isThreeActive = keyArr.includes('multi3')
73
81
  const isCategoryActive = keyArr.includes('category')
74
82
  const isSubtotalActive = subtotal.show
83
+ const isOverallOrder = overallOrder?.show
75
84
 
76
85
  return (
77
86
  <>
@@ -102,6 +111,12 @@ class ContextMenu extends React.Component {
102
111
  >
103
112
  {i18next.t('每页合计')}
104
113
  </div>
114
+ <div
115
+ onClick={this.handleOverallOrder.bind(this, name)}
116
+ className={isOverallOrder ? 'active' : ''}
117
+ >
118
+ {i18next.t('整单合计')}
119
+ </div>
105
120
  </>
106
121
  )
107
122
  }
@@ -119,6 +134,7 @@ class ContextMenu extends React.Component {
119
134
  selectedRegion={editStore.selectedRegion}
120
135
  config={editStore.config}
121
136
  data={mockData}
137
+ overallorder={editStore.overallOrderShow}
122
138
  />
123
139
  </CommonContextMenu>
124
140
  )
@@ -73,6 +73,9 @@ class Printer extends React.Component {
73
73
  if (nextProps.selectedRegion !== this.props.selectedRegion) {
74
74
  this.props.printerStore.setSelectedRegion(nextProps.selectedRegion)
75
75
  }
76
+ if (nextProps.overallorder !== this.props.overallorder) {
77
+ this.props.printerStore.setOverallOrder(nextProps.config)
78
+ }
76
79
  }
77
80
 
78
81
  componentDidMount() {
@@ -137,7 +140,6 @@ class Printer extends React.Component {
137
140
  renderPage() {
138
141
  const { printerStore, isSomeSubtotalTr } = this.props
139
142
  const { config } = printerStore
140
-
141
143
  return (
142
144
  <>
143
145
  {_.map(printerStore.pages, (page, i) => {
@@ -288,7 +290,8 @@ Printer.propTypes = {
288
290
  data: PropTypes.object.isRequired,
289
291
  config: PropTypes.object.isRequired,
290
292
  onReady: PropTypes.func,
291
- isSomeSubtotalTr: PropTypes.bool
293
+ isSomeSubtotalTr: PropTypes.bool,
294
+ overallorder: PropTypes.bool
292
295
  }
293
296
 
294
297
  Printer.defaultProps = {
@@ -4,7 +4,8 @@ import {
4
4
  getSumTrHeight,
5
5
  isMultiTable,
6
6
  caclSingleDetailsPageHeight,
7
- getArrayMid
7
+ getArrayMid,
8
+ getOverallOrderTrHeight
8
9
  } from '../util'
9
10
  import _ from 'lodash'
10
11
  import Big from 'big.js'
@@ -78,6 +79,11 @@ class PrinterStore {
78
79
  this.selectedRegion = selected || null
79
80
  }
80
81
 
82
+ @action
83
+ setOverallOrder(config) {
84
+ this.config = config || {}
85
+ }
86
+
81
87
  @action
82
88
  computedData(dataKey, table, end, currentRemainTableHeight) {
83
89
  /** 当前数据 */
@@ -147,9 +153,13 @@ class PrinterStore {
147
153
  tableCount++
148
154
  // 表格原始的高度和宽度信息
149
155
  const table = this.tablesInfo[`contents.table.${index}`]
150
- const { subtotal, dataKey, summaryConfig } = content
156
+ const { subtotal, dataKey, summaryConfig, overallOrder } = content
151
157
  // 如果显示每页合计,那么table高度多预留一行高度
152
158
  const subtotalTrHeight = subtotal.show ? getSumTrHeight(subtotal) : 0
159
+ // 如果显示整单合计,那么table高度多预留一行高度
160
+ const overallOrderTrHeight = overallOrder?.show
161
+ ? getOverallOrderTrHeight(overallOrder)
162
+ : 0
153
163
  // 如果每页合计(新的),那么table高度多预留一行高度
154
164
  const pageSummaryTrHeight =
155
165
  summaryConfig?.pageSummaryShow && !isMultiTable(dataKey) // 双栏table没有每页合计
@@ -157,7 +167,10 @@ class PrinterStore {
157
167
  : 0
158
168
  // 每个表格都具有的高度
159
169
  const allTableHaveThisHeight =
160
- table.head.height + subtotalTrHeight + pageSummaryTrHeight
170
+ table.head.height +
171
+ subtotalTrHeight +
172
+ pageSummaryTrHeight +
173
+ overallOrderTrHeight
161
174
  /** 当前page页面的最小高度 */
162
175
  const currentPageMinimumHeight =
163
176
  allPagesHaveThisHeight + allTableHaveThisHeight
@@ -166,3 +166,6 @@
166
166
  flex-grow: 1;
167
167
  justify-content: space-between;
168
168
  }
169
+ .gm-printer-subtotal-isUpperCaseBefore-inter{
170
+ order:2;
171
+ }
@@ -16,6 +16,7 @@ import { MULTI_SUFFIX } from '../config'
16
16
  import SpecialTr from './table_special_tr'
17
17
  import SubtotalTr from './table_subtotal_tr'
18
18
  import PageSummary from './page_summary'
19
+ import OverallOrder from './table_overallOrder_tr'
19
20
 
20
21
  @inject('printerStore')
21
22
  @observer
@@ -290,6 +291,11 @@ class Table extends React.Component {
290
291
  {this.props.config.subtotal.isCommutationPlace
291
292
  ? PageSummarySubtotalTr()
292
293
  : subtotalTrPageSummary()}
294
+ <OverallOrder
295
+ range={range}
296
+ config={config}
297
+ printerStore={printerStore}
298
+ />
293
299
  </tbody>
294
300
  </table>
295
301
  )
@@ -0,0 +1,63 @@
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import _ from 'lodash'
4
+ // import Big from 'big.js'
5
+ import { coverDigit2Uppercase } from '../util'
6
+ import { observer } from 'mobx-react'
7
+ import { Flex } from '../components'
8
+
9
+ const OverallOrder = props => {
10
+ const {
11
+ config: { overallOrder },
12
+ // range,
13
+ printerStore,
14
+ printerStore: {
15
+ data: { common }
16
+ }
17
+ } = props
18
+
19
+ return (
20
+ overallOrder?.show &&
21
+ printerStore?.ready && (
22
+ <tr>
23
+ {_.map(overallOrder.fields, (item, index) => {
24
+ return (
25
+ <td colSpan={item.colSpan} key={index}>
26
+ <Flex style={{ ...item.style, display: 'flex' }}>
27
+ {item.name}
28
+ <Flex
29
+ justifyBetween={overallOrder?.isUpperLowerCaseSeparate}
30
+ flexGrow={overallOrder?.isUpperLowerCaseSeparate}
31
+ >
32
+ <span
33
+ className={
34
+ overallOrder?.isUpperCaseBefore
35
+ ? 'gm-printer-subtotal-isUpperCaseBefore-inter'
36
+ : ''
37
+ }
38
+ >
39
+ {common?.[item.valueField] ?? ''}
40
+ </span>
41
+ {overallOrder?.needUpperCase && (
42
+ <span>
43
+ {common?.[item.valueField]
44
+ ? coverDigit2Uppercase(common[item.valueField])
45
+ : ''}
46
+ </span>
47
+ )}
48
+ </Flex>
49
+ </Flex>
50
+ </td>
51
+ )
52
+ })}
53
+ </tr>
54
+ )
55
+ )
56
+ }
57
+ OverallOrder.propTypes = {
58
+ config: PropTypes.object.isRequired,
59
+ range: PropTypes.object.isRequired,
60
+ printerStore: PropTypes.object
61
+ }
62
+
63
+ export default observer(OverallOrder)
@@ -36,7 +36,6 @@ const SubtotalTr = props => {
36
36
  printerStore,
37
37
  isSomeSubtotalTr
38
38
  } = props
39
-
40
39
  const tableData = printerStore.data._table[getDataKey(dataKey, arrange)] || []
41
40
  // 计算合计
42
41
  const sumData = (list, field) => {
package/src/util.js CHANGED
@@ -108,6 +108,14 @@ function getSumTrHeight(SumTr) {
108
108
  return (parseInt(fontSize) - 12) * 1.5 + 26
109
109
  }
110
110
 
111
+ function getOverallOrderTrHeight(overallOrder) {
112
+ const { fields = [] } = overallOrder
113
+ const fontSize = fields?.[0]?.style?.fontSize || '12px'
114
+
115
+ // 12px => 26, 14px => 29, 16px => 33, ...
116
+ return (parseInt(fontSize) - 12) * 1.5 + 26
117
+ }
118
+
111
119
  // eslint-disable-next-line
112
120
  const coverDigit2Uppercase = n => {
113
121
  if (_.isNil(n) || _.isNaN(n)) {
@@ -274,6 +282,17 @@ const getArrayMid = arr => {
274
282
  return majority
275
283
  }
276
284
 
285
+ /**
286
+ * 获取整单合计colSpan合并的个数
287
+ * @param {*} table
288
+ * @returns number
289
+ */
290
+ const getColSpanLength = table => {
291
+ return /multi/.test(table.dataKey)
292
+ ? getMultiNumber(table.dataKey) * table.columns.length
293
+ : table.columns.length
294
+ }
295
+
277
296
  export {
278
297
  getHeight,
279
298
  getWidth,
@@ -291,5 +310,7 @@ export {
291
310
  isMultiTable,
292
311
  getMultiNumber,
293
312
  caclSingleDetailsPageHeight,
294
- getArrayMid
313
+ getArrayMid,
314
+ getColSpanLength,
315
+ getOverallOrderTrHeight
295
316
  }