gm-printer 10.15.1-alpha.3 → 10.15.2-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","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/flex/index.js":"45","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js":"46","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js":"47","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_add_field.js":"48"},{"size":7813,"mtime":1648799098282,"results":"49","hashOfConfig":"50"},{"size":291,"mtime":1638935573926,"results":"51","hashOfConfig":"52"},{"size":523,"mtime":1638935549030,"results":"53","hashOfConfig":"52"},{"size":1139,"mtime":1644572548725,"results":"54","hashOfConfig":"55"},{"size":2293,"mtime":1638948548042,"results":"56","hashOfConfig":"52"},{"size":2292,"mtime":1638948522492,"results":"57","hashOfConfig":"52"},{"size":1078,"mtime":1638948543271,"results":"58","hashOfConfig":"52"},{"size":2067,"mtime":1648466228565,"results":"59","hashOfConfig":"50"},{"size":2991,"mtime":1638948535719,"results":"60","hashOfConfig":"52"},{"size":4379,"mtime":1638935458586,"results":"61","hashOfConfig":"52"},{"size":2428,"mtime":1648466380496,"results":"62","hashOfConfig":"50"},{"size":2955,"mtime":1647850650993,"results":"63","hashOfConfig":"55"},{"size":4170,"mtime":1648640206253,"results":"64","hashOfConfig":"50"},{"size":2833,"mtime":1638861837310,"results":"65","hashOfConfig":"52"},{"size":4212,"mtime":1638935746667,"results":"66","hashOfConfig":"52"},{"size":861,"mtime":1638931446915,"results":"67","hashOfConfig":"52"},{"size":178,"mtime":1638931439249,"results":"68","hashOfConfig":"52"},{"size":3272,"mtime":1648713847909,"results":"69","hashOfConfig":"50"},{"size":42205,"mtime":1658215209764,"results":"70","hashOfConfig":"71"},{"size":4898,"mtime":1639992402586,"results":"72","hashOfConfig":"52"},{"size":18730,"mtime":1657507507231,"results":"73","hashOfConfig":"71"},{"size":15155,"mtime":1657626470824,"results":"74","hashOfConfig":"71"},{"size":2165,"mtime":1638949854481,"results":"75","hashOfConfig":"52"},{"size":2165,"mtime":1638949840121,"results":"76","hashOfConfig":"52"},{"size":2223,"mtime":1638949823846,"results":"77","hashOfConfig":"52"},{"size":2356,"mtime":1650083974574,"results":"78","hashOfConfig":"50"},{"size":3367,"mtime":1638949855771,"results":"79","hashOfConfig":"52"},{"size":2305,"mtime":1638949843817,"results":"80","hashOfConfig":"52"},{"size":3294,"mtime":1638949855131,"results":"81","hashOfConfig":"52"},{"size":2850,"mtime":1638949842017,"results":"82","hashOfConfig":"52"},{"size":4157,"mtime":1638949853726,"results":"83","hashOfConfig":"52"},{"size":605,"mtime":1638949882777,"results":"84","hashOfConfig":"52"},{"size":1175,"mtime":1638949720500,"results":"85","hashOfConfig":"52"},{"size":18012,"mtime":1654600080184,"results":"86","hashOfConfig":"50"},{"size":332,"mtime":1644573509040,"results":"87","hashOfConfig":"55"},{"size":4080,"mtime":1648536160221,"results":"88","hashOfConfig":"50"},{"size":8842,"mtime":1646363892377,"results":"89","hashOfConfig":"55"},{"size":4317,"mtime":1646376602197,"results":"90","hashOfConfig":"55"},{"size":9440,"mtime":1644993553716,"results":"91","hashOfConfig":"55"},{"size":724,"mtime":1644808940649,"results":"92","hashOfConfig":"55"},{"size":1717,"mtime":1648466368772,"results":"93","hashOfConfig":"50"},{"size":5563,"mtime":1658392065200,"results":"94","hashOfConfig":"71"},{"size":10150,"mtime":1653986949852,"results":"95","hashOfConfig":"50"},{"size":9001,"mtime":1648713828033,"results":"96","hashOfConfig":"50"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"97","hashOfConfig":"50"},{"size":600,"mtime":1657507507231,"results":"98","hashOfConfig":"71"},{"size":1945,"mtime":1657624830918,"results":"99","hashOfConfig":"71"},{"filePath":"100","messages":"101","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"102","messages":"103","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"104","messages":"105","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"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":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"128","messages":"129","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"130","messages":"131","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"su5mnm",{"filePath":"138","messages":"139","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","errorCount":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"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":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"176","messages":"177","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"182","messages":"183","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/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",["194","195"],"/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",["196","197","198","199","200"],"/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",["201"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_add_field.js",[],{"ruleId":"202","severity":2,"message":"203","line":10,"column":29,"nodeType":"204","endLine":10,"endColumn":35},{"ruleId":"202","severity":2,"message":"205","line":145,"column":63,"nodeType":"204","endLine":145,"endColumn":71},{"ruleId":"206","severity":1,"message":"207","line":315,"column":13,"nodeType":"208","endLine":315,"endColumn":49},{"ruleId":"206","severity":1,"message":"207","line":333,"column":13,"nodeType":"208","endLine":333,"endColumn":56},{"ruleId":"206","severity":1,"message":"207","line":490,"column":15,"nodeType":"208","endLine":490,"endColumn":53},{"ruleId":"206","severity":1,"message":"207","line":539,"column":11,"nodeType":"208","endLine":539,"endColumn":53},{"ruleId":"209","severity":2,"message":"210","line":588,"column":22,"nodeType":"211","messageId":"212","endLine":588,"endColumn":31},{"ruleId":"209","severity":2,"message":"210","line":120,"column":14,"nodeType":"211","messageId":"212","endLine":120,"endColumn":23},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
1
+ [{"/Users/min/Documents/GMFE/gm-util/gm-printer/src/util.js":"1","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/get_css.js":"2","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcode.js":"3","/Users/min/Documents/GMFE/gm-util/gm-printer/src/index.js":"4","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/context_menu.js":"5","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/context_menu.js":"6","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/context_menu.js":"7","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/context_menu.js":"8","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/context_menu.js":"9","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor_special_table.js":"10","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/context_menu.js":"11","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/context_menu.js":"12","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/context_menu.js":"13","/Users/min/Documents/GMFE/gm-util/gm-printer/src/config.js":"14","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_store.js":"15","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_shadow_dom.js":"16","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/get_editor_css.js":"17","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_title.js":"18","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_store.js":"19","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_select.js":"20","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_edit_field.js":"21","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/component.js":"22","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/editor.js":"23","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/editor.js":"24","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/editor.js":"25","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/editor.js":"26","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/editor.js":"27","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor.js":"28","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account_statement/editor.js":"29","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/editor.js":"30","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/editor.js":"31","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/tooltip/index.js":"32","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_special_field.js":"33","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/store.js":"34","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/index.js":"35","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/do_print.js":"36","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/finance_printer.js":"37","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table_subtotal_tr.js":"38","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js":"39","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js":"40","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js":"41","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js":"42","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js":"43","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js":"44","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/flex/index.js":"45","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js":"46","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js":"47","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_add_field.js":"48","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/counter.js":"49","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcodeTd.js":"50","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.js":"51"},{"size":7813,"mtime":1648799098282,"results":"52","hashOfConfig":"53"},{"size":291,"mtime":1638935573926,"results":"54","hashOfConfig":"55"},{"size":523,"mtime":1638935549030,"results":"56","hashOfConfig":"55"},{"size":1139,"mtime":1644572548725,"results":"57","hashOfConfig":"58"},{"size":2293,"mtime":1638948548042,"results":"59","hashOfConfig":"55"},{"size":2292,"mtime":1638948522492,"results":"60","hashOfConfig":"55"},{"size":1078,"mtime":1638948543271,"results":"61","hashOfConfig":"55"},{"size":2067,"mtime":1648466228565,"results":"62","hashOfConfig":"53"},{"size":2991,"mtime":1638948535719,"results":"63","hashOfConfig":"55"},{"size":4379,"mtime":1638935458586,"results":"64","hashOfConfig":"55"},{"size":2428,"mtime":1648466380496,"results":"65","hashOfConfig":"53"},{"size":2955,"mtime":1647850650993,"results":"66","hashOfConfig":"58"},{"size":5462,"mtime":1659343100368,"results":"67","hashOfConfig":"68"},{"size":2833,"mtime":1638861837310,"results":"69","hashOfConfig":"55"},{"size":4212,"mtime":1638935746667,"results":"70","hashOfConfig":"55"},{"size":861,"mtime":1638931446915,"results":"71","hashOfConfig":"55"},{"size":178,"mtime":1638931439249,"results":"72","hashOfConfig":"55"},{"size":3272,"mtime":1648713847909,"results":"73","hashOfConfig":"53"},{"size":36859,"mtime":1659343100367,"results":"74","hashOfConfig":"68"},{"size":4898,"mtime":1639992402586,"results":"75","hashOfConfig":"55"},{"size":18730,"mtime":1657507507231,"results":"76","hashOfConfig":"68"},{"size":15155,"mtime":1657626470824,"results":"77","hashOfConfig":"68"},{"size":2165,"mtime":1638949854481,"results":"78","hashOfConfig":"55"},{"size":2165,"mtime":1638949840121,"results":"79","hashOfConfig":"55"},{"size":2223,"mtime":1638949823846,"results":"80","hashOfConfig":"55"},{"size":2356,"mtime":1650083974574,"results":"81","hashOfConfig":"53"},{"size":3367,"mtime":1638949855771,"results":"82","hashOfConfig":"55"},{"size":2305,"mtime":1638949843817,"results":"83","hashOfConfig":"55"},{"size":3294,"mtime":1638949855131,"results":"84","hashOfConfig":"55"},{"size":2850,"mtime":1638949842017,"results":"85","hashOfConfig":"55"},{"size":4157,"mtime":1638949853726,"results":"86","hashOfConfig":"55"},{"size":605,"mtime":1638949882777,"results":"87","hashOfConfig":"55"},{"size":1175,"mtime":1638949720500,"results":"88","hashOfConfig":"55"},{"size":18012,"mtime":1654600080184,"results":"89","hashOfConfig":"53"},{"size":332,"mtime":1644573509040,"results":"90","hashOfConfig":"58"},{"size":4080,"mtime":1648536160221,"results":"91","hashOfConfig":"53"},{"size":8842,"mtime":1646363892377,"results":"92","hashOfConfig":"58"},{"size":4317,"mtime":1646376602197,"results":"93","hashOfConfig":"58"},{"size":9440,"mtime":1644993553716,"results":"94","hashOfConfig":"58"},{"size":724,"mtime":1644808940649,"results":"95","hashOfConfig":"58"},{"size":1717,"mtime":1648466368772,"results":"96","hashOfConfig":"53"},{"size":5563,"mtime":1658392065200,"results":"97","hashOfConfig":"68"},{"size":11552,"mtime":1659407260591,"results":"98","hashOfConfig":"68"},{"size":9001,"mtime":1648713828033,"results":"99","hashOfConfig":"53"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"100","hashOfConfig":"53"},{"size":600,"mtime":1657507507231,"results":"101","hashOfConfig":"68"},{"size":1945,"mtime":1657624830918,"results":"102","hashOfConfig":"68"},{"size":2009,"mtime":1659343100368,"results":"103","hashOfConfig":"68"},{"size":644,"mtime":1659407263574,"results":"104","hashOfConfig":"68"},{"size":9861,"mtime":1659343100367,"results":"105","hashOfConfig":"68"},{"filePath":"106","messages":"107","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"108","messages":"109","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"110","messages":"111","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"114","messages":"115","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"116","messages":"117","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"122","messages":"123","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"128","messages":"129","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"su5mnm",{"filePath":"132","messages":"133","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"134","messages":"135","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"136","messages":"137","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"140","messages":"141","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"146","messages":"147","errorCount":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"148","messages":"149","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"150","messages":"151","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"152","messages":"153","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"156","messages":"157","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"158","messages":"159","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"162","messages":"163","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"164","messages":"165","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"168","messages":"169","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"174","messages":"175","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"176","messages":"177","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"180","messages":"181","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"182","messages":"183","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"186","messages":"187","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"192","messages":"193","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"194","messages":"195","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"198","messages":"199","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"200","messages":"201","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"204","messages":"205","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/min/Documents/GMFE/gm-util/gm-printer/src/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/get_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcode.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor_special_table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/config.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_store.js",["206","207"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/get_editor_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_title.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_select.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_edit_field.js",["208","209","210","211","212"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/component.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/tooltip/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_special_field.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/do_print.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/finance_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table_subtotal_tr.js",["213"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_add_field.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/counter.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcodeTd.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/common_context_menu.js",[],{"ruleId":"214","severity":2,"message":"215","line":10,"column":29,"nodeType":"216","endLine":10,"endColumn":35},{"ruleId":"214","severity":2,"message":"217","line":145,"column":63,"nodeType":"216","endLine":145,"endColumn":71},{"ruleId":"218","severity":1,"message":"219","line":315,"column":13,"nodeType":"220","endLine":315,"endColumn":49},{"ruleId":"218","severity":1,"message":"219","line":333,"column":13,"nodeType":"220","endLine":333,"endColumn":56},{"ruleId":"218","severity":1,"message":"219","line":490,"column":15,"nodeType":"220","endLine":490,"endColumn":53},{"ruleId":"218","severity":1,"message":"219","line":539,"column":11,"nodeType":"220","endLine":539,"endColumn":53},{"ruleId":"221","severity":2,"message":"222","line":588,"column":22,"nodeType":"223","messageId":"224","endLine":588,"endColumn":31},{"ruleId":"221","severity":2,"message":"222","line":120,"column":14,"nodeType":"223","messageId":"224","endLine":120,"endColumn":23},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.15.1-alpha.3",
3
+ "version": "10.15.2-alpha.0",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -245,6 +245,7 @@ class CommonContextMenu extends React.Component {
245
245
 
246
246
  const isProductLengthActive = _.includes(value, 'len')
247
247
  const isSubtotalActive = _.includes(value, 'subtotal')
248
+ const isRealWeight = _.includes(value, 'realWeight')
248
249
  return (
249
250
  <>
250
251
  <div
@@ -257,7 +258,13 @@ class CommonContextMenu extends React.Component {
257
258
  onClick={this.handleChangeCounterDataKey.bind(this, 'subtotal')}
258
259
  className={isSubtotalActive ? 'active' : ''}
259
260
  >
260
- {i18next.t('小计')}
261
+ {i18next.t('金额小计')}
262
+ </div>
263
+ <div
264
+ onClick={this.handleChangeCounterDataKey.bind(this, 'realWeight')}
265
+ className={isRealWeight ? 'active' : ''}
266
+ >
267
+ {i18next.t('出库数小计')}
261
268
  </div>
262
269
  <Hr />
263
270
  <div onClick={this.handleRemoveContent}>{i18next.t('移除区域')}</div>
@@ -643,26 +643,16 @@ Gap.propTypes = {
643
643
  height: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
644
644
  }
645
645
 
646
- const FieldBtn = ({ name, remark, onClick }) => (
647
- <>
648
- <Flex alignCenter={!remark} style={{ width: '50%', margin: '3px 0' }}>
649
- <span className='gm-printer-edit-plus-btn' onClick={onClick}>
650
- +
651
- </span>
652
- <Flex column>
653
- <span className='gm-padding-left-5'>{name}</span>
654
- {remark && (
655
- <span style={{ transform: 'scale(0.8) translateX(-20px)' }}>
656
- {remark}
657
- </span>
658
- )}
659
- </Flex>
660
- </Flex>
661
- </>
646
+ const FieldBtn = ({ name, onClick }) => (
647
+ <Flex alignCenter style={{ width: '50%', margin: '3px 0' }}>
648
+ <span className='gm-printer-edit-plus-btn' onClick={onClick}>
649
+ +
650
+ </span>
651
+ <span className='gm-padding-left-5'>{name}</span>
652
+ </Flex>
662
653
  )
663
654
  FieldBtn.propTypes = {
664
655
  name: PropTypes.string,
665
- remark: PropTypes.string,
666
656
  onClick: PropTypes.func
667
657
  }
668
658
 
@@ -22,7 +22,6 @@ class FieldList extends React.Component {
22
22
  <FieldBtn
23
23
  key={o.key}
24
24
  name={o.key}
25
- remark={o.remark}
26
25
  onClick={handleAddField.bind(this, o)}
27
26
  />
28
27
  ))}
@@ -20,7 +20,6 @@ import {
20
20
  import { get, toJS } from 'mobx'
21
21
  import PropTypes from 'prop-types'
22
22
  import { subtotalRadioList } from './util'
23
- import _ from 'lodash'
24
23
 
25
24
  @inject('editStore')
26
25
  @observer
@@ -227,13 +226,6 @@ class EditorField extends React.Component {
227
226
  (editStore.computedTableSpecialConfig?.subtotal &&
228
227
  get(subtotal, 'isCustomCells')) ||
229
228
  false
230
-
231
- // 打印账户总计金额
232
- const printAccount =
233
- (editStore.computedTableSpecialConfig?.subtotal &&
234
- get(subtotal, 'isPrintAccount')) ||
235
- false
236
-
237
229
  // 整单合计是否大写
238
230
  const overallOrderNeedUpperCase =
239
231
  (editStore.computedTableSpecialConfig?.overallOrder &&
@@ -441,15 +433,7 @@ class EditorField extends React.Component {
441
433
  </Flex>
442
434
  </div>
443
435
  )}
444
- {/* 结款单不需要这个配置 */}
445
- {!isSomeSubtotalTr && (
446
- <EditorSubtotalCheck
447
- subtotalCheckDisabled
448
- subtotalChecked={printAccount}
449
- subtotalCheckOnChange={editStore.setPrintAccount}
450
- subtotalCheckText='打印账户总计金额'
451
- />
452
- )}
436
+
453
437
  <EditorSubtotalCheck
454
438
  subtotalCheckDisabled
455
439
  subtotalChecked={subtotalNeedUpperCase}
@@ -480,12 +464,8 @@ class EditorField extends React.Component {
480
464
  subtotalCheckText='开启自定义单元格'
481
465
  />
482
466
  <Text
483
- // 只有自定义单元格的valueField值是空的,以后自每页合计,记得加type,之前没加,都无法区分
484
467
  value={
485
- subtotal && subtotal?.fields?.length > 1
486
- ? _.find(subtotal?.fields, item => !item.valueField)?.name ??
487
- ''
488
- : ''
468
+ subtotal && subtotal?.fields?.[1] ? subtotal.fields[1].name : ''
489
469
  }
490
470
  onChange={editStore.setSubtotalFields}
491
471
  style={{ width: '65px', margin: '5px 0 5px 80px' }}
@@ -3,7 +3,6 @@ import { action, computed, observable, set, toJS } from 'mobx'
3
3
  import { pageTypeMap } from '../config'
4
4
  import _ from 'lodash'
5
5
  import { dispatchMsg, getBlockName, exchange, getColSpanLength } from '../util'
6
- import { accountRadioList } from './util'
7
6
  import React from 'react'
8
7
 
9
8
  class EditorStore {
@@ -66,15 +65,6 @@ class EditorStore {
66
65
  this.isAutoFilling = bol
67
66
  }
68
67
 
69
- @action
70
- setSubtotalFieldsCol(arr) {
71
- // this.overallOrderShow = !this.overallOrderShow
72
- // 重新计算每页合计的单元格
73
- const table = this.config.contents[arr[2]]
74
- const subtotalLength = table.subtotal.fields.length
75
- table.subtotal.fields[subtotalLength - 1].colSpan += 1
76
- }
77
-
78
68
  @action
79
69
  setMultiDigitDecimal(bool) {
80
70
  this.isMultiDigitDecimal = bool
@@ -107,15 +97,6 @@ class EditorStore {
107
97
  colSpan: 6 // 产品说3个,开启自定义单元格,客户不满意,改成6个
108
98
  }
109
99
 
110
- // 每页合计打印账户总计金额
111
- @observable
112
- subtotalAccountConfigFields = {
113
- name: '总计金额:',
114
- valueField: '下单金额',
115
- colSpan: 3,
116
- type: 'useSummarize'
117
- }
118
-
119
100
  @computed
120
101
  get computedPrinterKey() {
121
102
  return _.map(this.config, (v, k) => {
@@ -594,11 +575,8 @@ class EditorStore {
594
575
  ]
595
576
  })
596
577
  } else {
597
- // 重新计算下单元格的格数
598
578
  table.subtotal.fields[0].colSpan =
599
- colSpanLength -
600
- (table.subtotal.fields?.[1]?.colSpan ?? 0) -
601
- (table.subtotal.fields?.[2]?.colSpan ?? 0)
579
+ colSpanLength - (table.subtotal.fields?.[1]?.colSpan ?? 0)
602
580
  }
603
581
  }
604
582
 
@@ -608,14 +586,6 @@ class EditorStore {
608
586
  this.overallOrderShow = !this.overallOrderShow
609
587
  const arr = this.selectedRegion.split('.')
610
588
  this.config.contents[arr[2]].subtotal.fields[0].valueField = fields.id
611
-
612
- const fieldList = this.config.contents[arr[2]].subtotal.fields
613
- // 打印账户总计金额的valueField也要修改
614
- if (_.find(fieldList, item => item.type === 'useSummarize')) {
615
- // 打印账户总计金额 固定是数组的第二个
616
- this.config.contents[arr[2]].subtotal.fields[1].valueField =
617
- accountRadioList[fields.id]
618
- }
619
589
  }
620
590
  }
621
591
 
@@ -681,6 +651,7 @@ class EditorStore {
681
651
  }
682
652
 
683
653
  newDataKey = _.sortBy(newDataKey, [
654
+ o => o === 'realWeight',
684
655
  o => o === 'multi3',
685
656
  o => o === 'multi',
686
657
  o => o === 'category',
@@ -790,11 +761,10 @@ class EditorStore {
790
761
  * @param value
791
762
  */
792
763
  @action.bound
793
- addFieldToTable({ key, value }) {
764
+ addFieldToTable({ key, value, type }) {
794
765
  if (this.computedRegionIsTable) {
795
766
  const arr = this.selectedRegion.split('.')
796
767
  const { columns, dataKey } = this.config.contents[arr[2]]
797
-
798
768
  columns.push({
799
769
  head: key,
800
770
  headStyle: {
@@ -803,12 +773,12 @@ class EditorStore {
803
773
  text: value,
804
774
  style: {
805
775
  textAlign: 'center'
806
- }
776
+ },
777
+ type
807
778
  })
808
779
 
809
780
  this.clearExtraTableData(dataKey)
810
781
  this.setAutoFillingConfig(false)
811
- this.setSubtotalFieldsCol(arr)
812
782
  }
813
783
  }
814
784
 
@@ -1128,86 +1098,6 @@ class EditorStore {
1128
1098
  }
1129
1099
  }
1130
1100
 
1131
- // 每页合计打印账户总计金额
1132
- // 写的很垃圾,因为每页合计这里改了4、5次,各种兼容,我人麻了
1133
- // 每页合计这一行单元格,要计算每个要占几列,就很烦
1134
- @action.bound
1135
- setPrintAccount() {
1136
- if (this.selectedRegion) {
1137
- // 作用:触发组件的更新
1138
- this.overallOrderShow = !this.overallOrderShow
1139
- const arr = this.selectedRegion.split('.')
1140
- const table = this.config.contents[arr[2]]
1141
- const subtotalConfig = table?.subtotal
1142
- // 没有显示每页合计的时候不可以设置
1143
- if (!subtotalConfig?.show) return
1144
- // 多栏表格情况,计算colSpan总列数
1145
- const colSpanLength = getColSpanLength(table)
1146
- const oldPrintAccount = subtotalConfig?.isPrintAccount
1147
-
1148
- set(subtotalConfig, {
1149
- isPrintAccount: !oldPrintAccount
1150
- })
1151
- // 兼容已经存在后端的模板,每页合计直接是显示的,导致每页合计配置没有fields,isCustomCells,手动添加上
1152
- if (oldPrintAccount === undefined && !subtotalConfig.fields) {
1153
- set(subtotalConfig, {
1154
- fields: [
1155
- {
1156
- name: '每页合计:',
1157
- valueField: 'real_item_price',
1158
- colSpan: colSpanLength
1159
- }
1160
- ]
1161
- })
1162
- }
1163
- // 开启打印账户总计金额
1164
- if (subtotalConfig?.isPrintAccount) {
1165
- // 同时还开启了自定义单元格选项
1166
- if (subtotalConfig?.fields?.length === 2) {
1167
- // fields添加自定义单元格
1168
- subtotalConfig.fields = [
1169
- subtotalConfig.fields[0],
1170
- this.subtotalAccountConfigFields,
1171
- subtotalConfig.fields[1]
1172
- ]
1173
- // 重新计算合并单元格的个数
1174
- subtotalConfig.fields[0].colSpan = Math.floor(colSpanLength / 3)
1175
- subtotalConfig.fields[1].colSpan = Math.floor(colSpanLength / 3)
1176
- subtotalConfig.fields[2].colSpan =
1177
- colSpanLength -
1178
- subtotalConfig.fields[0].colSpan -
1179
- subtotalConfig.fields[1].colSpan
1180
- } else {
1181
- // fields添加自定义单元格
1182
- subtotalConfig.fields = [
1183
- subtotalConfig.fields[0],
1184
- this.subtotalAccountConfigFields
1185
- ]
1186
- // 重新计算合并单元格的个数
1187
- subtotalConfig.fields[0].colSpan =
1188
- colSpanLength - subtotalConfig.fields[1].colSpan
1189
- }
1190
- } else {
1191
- // 关闭打印账户总计金额
1192
- // 存在自定义单元格
1193
- if (subtotalConfig?.fields?.length === 3) {
1194
- subtotalConfig.fields = [
1195
- subtotalConfig.fields[0],
1196
- this.subtotalConfigFields
1197
- ]
1198
- // 重新计算合并单元格的个数
1199
- subtotalConfig.fields[0].colSpan =
1200
- colSpanLength - subtotalConfig.fields[1].colSpan
1201
- } else {
1202
- // 关闭,fields只有一个
1203
- subtotalConfig.fields = [subtotalConfig.fields[0]]
1204
- // 重新计算合并单元格的个数
1205
- subtotalConfig.fields[0].colSpan = colSpanLength
1206
- }
1207
- }
1208
- }
1209
- }
1210
-
1211
1101
  // 每页合计开启自定义单元格
1212
1102
  @action.bound
1213
1103
  setSubtotalCustomCells() {
@@ -1240,48 +1130,21 @@ class EditorStore {
1240
1130
  }
1241
1131
  // 开启自定义单元格
1242
1132
  if (subtotalConfig?.isCustomCells) {
1243
- // 同时还开启了自定义单元格选项
1244
- if (subtotalConfig?.fields?.length === 2) {
1245
- // fields添加自定义单元格
1246
- subtotalConfig.fields = [
1247
- subtotalConfig.fields[0],
1248
- this.subtotalAccountConfigFields,
1249
- this.subtotalConfigFields
1250
- ]
1251
- // 重新计算合并单元格的个数
1252
- subtotalConfig.fields[0].colSpan = Math.floor(colSpanLength / 3)
1253
- subtotalConfig.fields[1].colSpan = Math.floor(colSpanLength / 3)
1254
- subtotalConfig.fields[2].colSpan =
1255
- colSpanLength -
1256
- subtotalConfig.fields[0].colSpan -
1257
- subtotalConfig.fields[1].colSpan
1258
- } else {
1259
- // fields添加自定义单元格
1260
- subtotalConfig.fields = [
1261
- subtotalConfig.fields[0],
1262
- this.subtotalConfigFields
1263
- ]
1264
- // 重新计算合并单元格的个数
1265
- subtotalConfig.fields[0].colSpan =
1266
- colSpanLength - subtotalConfig.fields[1].colSpan
1267
- }
1133
+ // fields添加自定义单元格
1134
+ subtotalConfig.fields = [
1135
+ subtotalConfig.fields[0],
1136
+ {
1137
+ ...this.subtotalConfigFields
1138
+ }
1139
+ ]
1140
+ // 重新计算合并单元格的个数
1141
+ subtotalConfig.fields[0].colSpan =
1142
+ colSpanLength - subtotalConfig.fields[1].colSpan
1268
1143
  } else {
1269
- // 关闭自定义单元格
1270
- // 存在打印账户总计金额
1271
- if (subtotalConfig?.fields?.length === 3) {
1272
- subtotalConfig.fields = [
1273
- subtotalConfig.fields[0],
1274
- this.subtotalAccountConfigFields
1275
- ]
1276
- // 重新计算合并单元格的个数
1277
- subtotalConfig.fields[0].colSpan =
1278
- colSpanLength - subtotalConfig.fields[1].colSpan
1279
- } else {
1280
- // 关闭,fields只有一个
1281
- subtotalConfig.fields = [subtotalConfig.fields[0]]
1282
- // 重新计算合并单元格的个数
1283
- subtotalConfig.fields[0].colSpan = colSpanLength
1284
- }
1144
+ // 关闭自定义单元格,fields只有一个
1145
+ subtotalConfig.fields = [subtotalConfig.fields[0]]
1146
+ // 重新计算合并单元格的个数
1147
+ subtotalConfig.fields[0].colSpan = colSpanLength
1285
1148
  }
1286
1149
  }
1287
1150
  }
@@ -1296,9 +1159,7 @@ class EditorStore {
1296
1159
 
1297
1160
  if (subtotalConfig.isCustomCells) {
1298
1161
  const subtotalConfig = table?.subtotal.fields
1299
- subtotalConfig.length === 3
1300
- ? (subtotalConfig[2].name = value)
1301
- : (subtotalConfig[1].name = value)
1162
+ subtotalConfig[1].name = value
1302
1163
  }
1303
1164
  }
1304
1165
  }
@@ -16,9 +16,4 @@ const subtotalRadioList = [
16
16
  }
17
17
  ]
18
18
 
19
- const accountRadioList = {
20
- total_item_price: i18next.t('下单金额'),
21
- real_item_price: i18next.t('出库金额')
22
- }
23
-
24
- export { subtotalRadioList, accountRadioList }
19
+ export { subtotalRadioList }
@@ -103,6 +103,7 @@ class ContextMenu extends React.Component {
103
103
  const isMultiActive = keyArr.includes('multi')
104
104
  const isThreeActive = keyArr.includes('multi3')
105
105
  const isCategoryActive = keyArr.includes('category')
106
+ const isRealWeight = keyArr.includes('realWeight')
106
107
  const isSubtotalActive = subtotal.show
107
108
  const isOverallOrder = overallOrder?.show
108
109
 
@@ -127,7 +128,13 @@ class ContextMenu extends React.Component {
127
128
  onClick={this.handleChangeTableDataKey.bind(this, 'category', name)}
128
129
  className={isCategoryActive ? 'active' : ''}
129
130
  >
130
- {i18next.t('商品分类')}
131
+ {i18next.t('商品分类(金额小计)')}
132
+ </div>
133
+ <div
134
+ onClick={this.handleChangeTableDataKey.bind(this, 'realWeight', name)}
135
+ className={isRealWeight ? 'active' : ''}
136
+ >
137
+ {i18next.t('商品分类(出库数小计)')}
131
138
  </div>
132
139
  <div
133
140
  onClick={this.handleSubtotal.bind(this, name)}
@@ -0,0 +1,30 @@
1
+ import React from 'react'
2
+ import jsBarcode from 'jsbarcode'
3
+ import PropTypes from 'prop-types'
4
+
5
+ class BarCodeTd extends React.Component {
6
+ barcode = React.createRef()
7
+
8
+ componentDidMount() {
9
+ const { value, ...rest } = this.props
10
+ if (!value) return
11
+ jsBarcode(this.barcode.current, value, {
12
+ ...rest
13
+ })
14
+ }
15
+
16
+ render() {
17
+ const { dataName, value, height } = this.props
18
+ return !value ? null : (
19
+ <svg data-name={dataName} ref={this.barcode} style={{ height }} />
20
+ )
21
+ }
22
+ }
23
+
24
+ BarCodeTd.propTypes = {
25
+ value: PropTypes.string,
26
+ dataName: PropTypes.string,
27
+ height: PropTypes.string
28
+ }
29
+
30
+ export default BarCodeTd
@@ -26,6 +26,15 @@ const configs = [
26
26
  value: item => (
27
27
  <div className='gm-printer-counter-item-1'>{item.quantity}</div>
28
28
  )
29
+ },
30
+ {
31
+ id: 'realWeight',
32
+ name: (
33
+ <div className='gm-printer-counter-item-1'>{i18next.t('出库数小计')}</div>
34
+ ),
35
+ value: item => (
36
+ <div className='gm-printer-counter-item-1'>{item.realWeight}</div>
37
+ )
29
38
  }
30
39
  ]
31
40
 
@@ -17,7 +17,7 @@ import SpecialTr from './table_special_tr'
17
17
  import SubtotalTr from './table_subtotal_tr'
18
18
  import PageSummary from './page_summary'
19
19
  import OverallOrder from './table_overallOrder_tr'
20
-
20
+ import BarCodeTd from './barcodeTd'
21
21
  @inject('printerStore')
22
22
  @observer
23
23
  class Table extends React.Component {
@@ -264,7 +264,36 @@ class Table extends React.Component {
264
264
  <td colSpan='99' />
265
265
  ) : (
266
266
  _.map(columns, (col, j) => {
267
- return (
267
+ // 单元格里增加条形码
268
+ return col.type === 'barcode' ? (
269
+ <td
270
+ key={j}
271
+ data-name={getTableColumnName(name, col.index)}
272
+ style={{
273
+ ...getTdStyle(j, col.style),
274
+ ...col.style
275
+ }}
276
+ className={classNames({
277
+ active:
278
+ getTableColumnName(name, col.index) ===
279
+ printerStore.selected
280
+ })}
281
+ >
282
+ <BarCodeTd
283
+ value={
284
+ printerStore
285
+ .templateTable(col.text, dataKey, i, pageIndex)
286
+ .replace(/\(\)/g, '') ?? ''
287
+ }
288
+ // value={12345676543212345}
289
+ height={`${(customerRowHeight || 40) - 18}px`} // 高度
290
+ fontSize={12} // 设置文本的字体
291
+ margin={1} // 设置条形码周围的空白边距
292
+ textMargin={0} // 设置条形码和文本之间的间距
293
+ width={1}
294
+ />
295
+ </td>
296
+ ) : (
268
297
  <td
269
298
  key={j}
270
299
  data-name={getTableColumnName(name, col.index)}
@@ -68,10 +68,6 @@ const SubtotalTr = props => {
68
68
  ).toFixed(2)
69
69
  }
70
70
 
71
- const getData = field => {
72
- const data = printerStore.data.common
73
- return data?.[field] ?? ''
74
- }
75
71
  // 每页小计
76
72
  // show 是否展示小计,fields<Array> 合计的字段和展现的name,displayName 是否显示名字
77
73
  if (show && printerStore.ready) {
@@ -117,7 +113,7 @@ const SubtotalTr = props => {
117
113
  <div
118
114
  style={{
119
115
  fontWeight: 'bold',
120
- justifyContent: flexStyle[subtotal.style?.textAlign], // flex布局中textAlign不生效,改使用justify-content
116
+ 'justify-content': flexStyle[subtotal.style?.textAlign], // flex布局中textAlign不生效,改使用justify-content
121
117
  ...subtotal.style
122
118
  }}
123
119
  className='gm-flex-page'
@@ -137,19 +133,11 @@ const SubtotalTr = props => {
137
133
  }
138
134
  >
139
135
  {/* 这样写是为了支持自定义单元,index = 1时是自定义单元格 */}
140
- {item.type === 'useSummarize'
141
- ? getData(item.valueField)
142
- : index === 0
143
- ? sumData(list, item.valueField)
144
- : ''}
145
- {/* {index === 0 ? sumData(list, item.valueField) : ''} */}
136
+ {index === 0 ? sumData(list, item.valueField) : ''}
146
137
  </span>
147
138
  {subtotal?.needUpperCase && ( // 是否需要大写金额
148
139
  <span>
149
- {item.type === 'useSummarize'
150
- ? '大写:' +
151
- coverDigit2Uppercase(getData(item.valueField))
152
- : index === 0
140
+ {index === 0
153
141
  ? '大写:' +
154
142
  coverDigit2Uppercase(sumData(list, item.valueField))
155
143
  : ''}