gm-printer 10.14.1 → 10.14.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/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js":"1","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js":"2","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js":"3","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js":"4","/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js":"5","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js":"6","/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js":"7","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js":"8","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js":"9","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js":"10","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js":"11","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js":"12","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js":"13","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js":"14","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js":"15","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js":"16","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js":"17","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js":"18","/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js":"19","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js":"20","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js":"21","/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js":"22","/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/panel.js":"23"},{"size":9379,"mtime":1643448762149,"results":"24","hashOfConfig":"25"},{"size":15785,"mtime":1647332608072,"results":"26","hashOfConfig":"25"},{"size":4244,"mtime":1635494969691,"results":"27","hashOfConfig":"25"},{"size":4501,"mtime":1646970942704,"results":"28","hashOfConfig":"25"},{"size":616,"mtime":1621235314060,"results":"29","hashOfConfig":"30"},{"size":9693,"mtime":1621242097206,"results":"31","hashOfConfig":"30"},{"size":7258,"mtime":1639037857730,"results":"32","hashOfConfig":"25"},{"size":10283,"mtime":1646979851812,"results":"33","hashOfConfig":"25"},{"size":3119,"mtime":1634191808754,"results":"34","hashOfConfig":"25"},{"size":1113,"mtime":1635407660514,"results":"35","hashOfConfig":"25"},{"size":4349,"mtime":1646815933499,"results":"36","hashOfConfig":"25"},{"size":861,"mtime":1635246075403,"results":"37","hashOfConfig":"25"},{"size":3260,"mtime":1635334661529,"results":"38","hashOfConfig":"25"},{"size":26478,"mtime":1647331538032,"results":"39","hashOfConfig":"25"},{"size":1907,"mtime":1635492860490,"results":"40","hashOfConfig":"25"},{"size":3548,"mtime":1635409410379,"results":"41","hashOfConfig":"25"},{"size":2989,"mtime":1635495718901,"results":"42","hashOfConfig":"25"},{"size":3399,"mtime":1646816404368,"results":"43","hashOfConfig":"25"},{"size":2456,"mtime":1646721857196,"results":"44","hashOfConfig":"25"},{"size":1159,"mtime":1646970893747,"results":"45","hashOfConfig":"25"},{"size":13280,"mtime":1646901618757,"results":"46","hashOfConfig":"25"},{"size":14804,"mtime":1646895235712,"results":"47","hashOfConfig":"25"},{"size":3005,"mtime":1647228414919,"results":"48","hashOfConfig":"25"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1j0d8vf",{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"175njjo",{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"69","messages":"70","errorCount":3,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"71","messages":"72","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"73","messages":"74","errorCount":13,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"87","messages":"88","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"89","messages":"90","errorCount":1,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"91","messages":"92","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"93","messages":"94","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/table.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/components/tooltip/index.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/common_context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/util.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/printer.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/do_print.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_special_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_store.js",["95","96","97"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_title.js",["98","99","100","101","102","103","104","105","106","107","108","109","110"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_store.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_add_field.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_page_summary.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/editor.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_account/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_customize_config.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/editor_edit_field.js",["111","112","113"],"/Users/yancheng/gm/gm-open-source/gm-printer/src/common/component.js",[],"/Users/yancheng/gm/gm-open-source/gm-printer/src/printer/panel.js",[],{"ruleId":"114","severity":2,"message":"115","line":10,"column":29,"nodeType":"116","endLine":10,"endColumn":35},{"ruleId":"114","severity":2,"message":"117","line":10,"column":43,"nodeType":"116","endLine":10,"endColumn":51},{"ruleId":"114","severity":2,"message":"117","line":147,"column":63,"nodeType":"116","endLine":147,"endColumn":71},{"ruleId":"114","severity":2,"message":"118","line":47,"column":13,"nodeType":"119","messageId":"120","endLine":47,"endColumn":22},{"ruleId":"114","severity":2,"message":"121","line":48,"column":30,"nodeType":"116","messageId":"120","endLine":48,"endColumn":36},{"ruleId":"114","severity":2,"message":"122","line":49,"column":31,"nodeType":"116","messageId":"120","endLine":49,"endColumn":47},{"ruleId":"114","severity":2,"message":"122","line":50,"column":21,"nodeType":"116","messageId":"120","endLine":50,"endColumn":37},{"ruleId":"114","severity":2,"message":"118","line":56,"column":13,"nodeType":"119","messageId":"120","endLine":56,"endColumn":22},{"ruleId":"114","severity":2,"message":"123","line":59,"column":20,"nodeType":"116","messageId":"120","endLine":59,"endColumn":32},{"ruleId":"114","severity":2,"message":"121","line":61,"column":23,"nodeType":"116","messageId":"120","endLine":61,"endColumn":29},{"ruleId":"114","severity":2,"message":"124","line":61,"column":30,"nodeType":"116","messageId":"120","endLine":61,"endColumn":34},{"ruleId":"114","severity":2,"message":"125","line":63,"column":15,"nodeType":"116","messageId":"120","endLine":63,"endColumn":19},{"ruleId":"114","severity":2,"message":"118","line":67,"column":23,"nodeType":"119","messageId":"120","endLine":67,"endColumn":32},{"ruleId":"114","severity":2,"message":"121","line":70,"column":32,"nodeType":"116","messageId":"120","endLine":70,"endColumn":38},{"ruleId":"114","severity":2,"message":"118","line":78,"column":13,"nodeType":"119","messageId":"120","endLine":78,"endColumn":22},{"ruleId":"114","severity":2,"message":"121","line":84,"column":42,"nodeType":"116","messageId":"120","endLine":84,"endColumn":48},{"ruleId":"126","severity":1,"message":"127","line":265,"column":13,"nodeType":"128","endLine":265,"endColumn":49},{"ruleId":"126","severity":1,"message":"127","line":283,"column":13,"nodeType":"128","endLine":283,"endColumn":56},{"ruleId":"129","severity":2,"message":"130","line":436,"column":22,"nodeType":"131","messageId":"132","endLine":436,"endColumn":31},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","'editStore' is missing in props validation","Property","missingPropType","'editStore.config' is missing in props validation","'editStore.config.batchPrintConfig' is missing in props validation","'editStore.originConfig' is missing in props validation","'editStore.config.name' is missing in props validation","'editStore.init' 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"},{"size":7813,"mtime":1648799098282,"results":"46","hashOfConfig":"47"},{"size":291,"mtime":1638935573926,"results":"48","hashOfConfig":"49"},{"size":523,"mtime":1638935549030,"results":"50","hashOfConfig":"49"},{"size":1139,"mtime":1644572548725,"results":"51","hashOfConfig":"52"},{"size":2293,"mtime":1638948548042,"results":"53","hashOfConfig":"49"},{"size":2292,"mtime":1638948522492,"results":"54","hashOfConfig":"49"},{"size":1078,"mtime":1638948543271,"results":"55","hashOfConfig":"49"},{"size":2067,"mtime":1648466228565,"results":"56","hashOfConfig":"47"},{"size":2991,"mtime":1638948535719,"results":"57","hashOfConfig":"49"},{"size":4379,"mtime":1638935458586,"results":"58","hashOfConfig":"49"},{"size":2428,"mtime":1648466380496,"results":"59","hashOfConfig":"47"},{"size":2955,"mtime":1647850650993,"results":"60","hashOfConfig":"52"},{"size":4170,"mtime":1648640206253,"results":"61","hashOfConfig":"47"},{"size":2833,"mtime":1638861837310,"results":"62","hashOfConfig":"49"},{"size":4212,"mtime":1638935746667,"results":"63","hashOfConfig":"49"},{"size":861,"mtime":1638931446915,"results":"64","hashOfConfig":"49"},{"size":178,"mtime":1638931439249,"results":"65","hashOfConfig":"49"},{"size":3272,"mtime":1648713847909,"results":"66","hashOfConfig":"47"},{"size":29040,"mtime":1648805187401,"results":"67","hashOfConfig":"47"},{"size":4898,"mtime":1639992402586,"results":"68","hashOfConfig":"49"},{"size":16177,"mtime":1648785390895,"results":"69","hashOfConfig":"47"},{"size":14787,"mtime":1638948621474,"results":"70","hashOfConfig":"49"},{"size":2165,"mtime":1638949854481,"results":"71","hashOfConfig":"49"},{"size":2165,"mtime":1638949840121,"results":"72","hashOfConfig":"49"},{"size":2223,"mtime":1638949823846,"results":"73","hashOfConfig":"49"},{"size":2226,"mtime":1638949842800,"results":"74","hashOfConfig":"49"},{"size":3367,"mtime":1638949855771,"results":"75","hashOfConfig":"49"},{"size":2305,"mtime":1638949843817,"results":"76","hashOfConfig":"49"},{"size":3294,"mtime":1638949855131,"results":"77","hashOfConfig":"49"},{"size":2850,"mtime":1638949842017,"results":"78","hashOfConfig":"49"},{"size":4157,"mtime":1638949853726,"results":"79","hashOfConfig":"49"},{"size":605,"mtime":1638949882777,"results":"80","hashOfConfig":"49"},{"size":1175,"mtime":1638949720500,"results":"81","hashOfConfig":"49"},{"size":15067,"mtime":1648801216882,"results":"82","hashOfConfig":"47"},{"size":332,"mtime":1644573509040,"results":"83","hashOfConfig":"52"},{"size":4080,"mtime":1648536160221,"results":"84","hashOfConfig":"47"},{"size":8842,"mtime":1646363892377,"results":"85","hashOfConfig":"52"},{"size":4317,"mtime":1646376602197,"results":"86","hashOfConfig":"52"},{"size":9440,"mtime":1644993553716,"results":"87","hashOfConfig":"52"},{"size":724,"mtime":1644808940649,"results":"88","hashOfConfig":"52"},{"size":1717,"mtime":1648466368772,"results":"89","hashOfConfig":"47"},{"size":5251,"mtime":1649211878386,"results":"90","hashOfConfig":"47"},{"size":9717,"mtime":1648628215217,"results":"91","hashOfConfig":"47"},{"size":9001,"mtime":1648713828033,"results":"92","hashOfConfig":"47"},{"size":3152,"mtime":1648713745966},{"filePath":"93","messages":"94","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"95","messages":"96","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"97","messages":"98","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"99","messages":"100","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"103","messages":"104","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"105","messages":"106","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"107","messages":"108","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"111","messages":"112","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"113","messages":"114","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"115","messages":"116","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"117","messages":"118","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"119","messages":"120","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"121","messages":"122","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"123","messages":"124","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"125","messages":"126","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"127","messages":"128","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"129","messages":"130","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"131","messages":"132","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"133","messages":"134","errorCount":1,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"135","messages":"136","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"137","messages":"138","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"139","messages":"140","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"141","messages":"142","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"143","messages":"144","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"147","messages":"148","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"149","messages":"150","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"153","messages":"154","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"155","messages":"156","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"157","messages":"158","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"161","messages":"162","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"163","messages":"164","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"165","messages":"166","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"167","messages":"168","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"169","messages":"170","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"171","messages":"172","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"173","messages":"174","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"175","messages":"176","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"179","messages":"180","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/min/Documents/GMFE/gm-util/gm-printer/src/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/get_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcode.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor_special_table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/config.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_store.js",["181","182"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/get_editor_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_title.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_select.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_edit_field.js",["183","184","185","186"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/component.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/tooltip/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_special_field.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/do_print.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/finance_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table_subtotal_tr.js",["187"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js",[],{"ruleId":"188","severity":2,"message":"189","line":10,"column":29,"nodeType":"190","endLine":10,"endColumn":35},{"ruleId":"188","severity":2,"message":"191","line":145,"column":63,"nodeType":"190","endLine":145,"endColumn":71},{"ruleId":"192","severity":1,"message":"193","line":300,"column":13,"nodeType":"194","endLine":300,"endColumn":49},{"ruleId":"192","severity":1,"message":"193","line":318,"column":13,"nodeType":"194","endLine":318,"endColumn":56},{"ruleId":"192","severity":1,"message":"193","line":470,"column":11,"nodeType":"194","endLine":470,"endColumn":53},{"ruleId":"195","severity":2,"message":"196","line":518,"column":22,"nodeType":"197","messageId":"198","endLine":518,"endColumn":31},{"ruleId":"195","severity":2,"message":"196","line":120,"column":14,"nodeType":"197","messageId":"198","endLine":120,"endColumn":23},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.14.1",
3
+ "version": "10.14.2-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, toJS } 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
  toJS(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,7 +2,7 @@ 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 {
@@ -61,6 +61,20 @@ class EditorStore {
61
61
  this.isAutoFilling = bol
62
62
  }
63
63
 
64
+ @observable
65
+ overallOrderShow = false
66
+
67
+ // 整单合计自定义合并单元格
68
+ @observable
69
+ overallOrderConfigFields = {
70
+ name: '',
71
+ valueField: '',
72
+ colSpan: 3, // 产品说3个
73
+ style: {
74
+ fontWeight: 'bold'
75
+ }
76
+ }
77
+
64
78
  @computed
65
79
  get computedPrinterKey() {
66
80
  return _.map(this.config, (v, k) => {
@@ -518,6 +532,39 @@ class EditorStore {
518
532
  this.setAutoFillingConfig(!this.isAutoFilling)
519
533
  }
520
534
 
535
+ @action
536
+ setOverallOrderShow(name) {
537
+ const arr = name.split('.')
538
+ const table = this.config.contents[arr[2]]
539
+ this.overallOrderShow = !this.overallOrderShow
540
+ const colSpanLength = getColSpanLength(table)
541
+ if (table.overallOrder) {
542
+ set(table.overallOrder, {
543
+ show: !table.overallOrder.show
544
+ })
545
+ table.overallOrder.fields[0].colSpan =
546
+ colSpanLength - (table.overallOrder.fields?.[1]?.colSpan ?? 0)
547
+ } else {
548
+ // 兼容已经存在的配送单据,他们的配置存在后端的,没有overallOrder这个配置,给加上
549
+ set(table, {
550
+ overallOrder: {
551
+ show: true,
552
+ fields: [
553
+ {
554
+ name: '整单合计:',
555
+ valueField: '出库金额',
556
+ style: {
557
+ fontWeight: 'bold'
558
+ },
559
+ colSpan: colSpanLength
560
+ }
561
+ ]
562
+ }
563
+ })
564
+ }
565
+ this.config = toJS(this.config)
566
+ }
567
+
521
568
  @action
522
569
  setConfigTable(who, value) {
523
570
  if (!this.computedIsSelectTable) {
@@ -530,7 +577,7 @@ class EditorStore {
530
577
  @action
531
578
  changeTableDataKey(name, key) {
532
579
  const arr = name.split('.')
533
- const { dataKey } = this.config.contents[arr[2]]
580
+ const { dataKey, overallOrder } = this.config.contents[arr[2]]
534
581
  const keyArr = dataKey.split('_')
535
582
  let newDataKey
536
583
  // 当前有这个key则去掉
@@ -554,6 +601,10 @@ class EditorStore {
554
601
  ])
555
602
 
556
603
  this.config.contents[arr[2]].dataKey = newDataKey.join('_')
604
+ // 整单合计的单元格要修改
605
+ if (overallOrder?.show) {
606
+ overallOrder.show = false
607
+ }
557
608
  }
558
609
 
559
610
  @action
@@ -937,7 +988,7 @@ class EditorStore {
937
988
  }
938
989
  }
939
990
 
940
- // 设置大写金额
991
+ // 每页合计设置大写金额
941
992
  @action.bound
942
993
  setSubtotalUpperCase() {
943
994
  if (this.selectedRegion) {
@@ -956,7 +1007,7 @@ class EditorStore {
956
1007
  }
957
1008
  }
958
1009
 
959
- // 设置大写金额在前
1010
+ // 每页合计设置大写金额在前
960
1011
  @action.bound
961
1012
  setSubtotalUpperCaseBefore() {
962
1013
  if (this.selectedRegion) {
@@ -968,7 +1019,7 @@ class EditorStore {
968
1019
  }
969
1020
  }
970
1021
 
971
- // 设置大小写金额分开
1022
+ // 每页合计设置大小写金额分开
972
1023
  @action.bound
973
1024
  setSubtotalUpperLowerCaseSeparate() {
974
1025
  if (this.selectedRegion) {
@@ -982,7 +1033,144 @@ class EditorStore {
982
1033
  }
983
1034
  }
984
1035
 
985
- // 设置交换位置
1036
+ // 整单合计设置大写金额
1037
+ @action.bound
1038
+ setOverallOrderUpperCase() {
1039
+ if (this.selectedRegion) {
1040
+ this.overallOrderShow = !this.overallOrderShow
1041
+ const arr = this.selectedRegion.split('.')
1042
+ const overallOrderConfig = this.config.contents[arr[2]]?.overallOrder
1043
+
1044
+ const oldNeedUpperCase = overallOrderConfig?.needUpperCase
1045
+ this.config.contents[arr[2]]?.overallOrder &&
1046
+ set(overallOrderConfig, { needUpperCase: !oldNeedUpperCase })
1047
+ // 没有大写金额时,将大写在前和大小写分开的多选框设置为false
1048
+ if (
1049
+ this.config.contents[arr[2]]?.overallOrder &&
1050
+ overallOrderConfig.needUpperCase === false
1051
+ ) {
1052
+ overallOrderConfig.isUpperCaseBefore &&
1053
+ set(overallOrderConfig, { isUpperCaseBefore: false })
1054
+ overallOrderConfig.isUpperLowerCaseSeparate &&
1055
+ set(overallOrderConfig, { isUpperLowerCaseSeparate: false })
1056
+ }
1057
+ }
1058
+ }
1059
+
1060
+ // 整单合计设置大写金额在前
1061
+ @action.bound
1062
+ setOverallOrderUpperCaseBefore() {
1063
+ if (this.selectedRegion) {
1064
+ this.overallOrderShow = !this.overallOrderShow
1065
+ const arr = this.selectedRegion.split('.')
1066
+ const overallOrderConfig = this.config.contents[arr[2]]?.overallOrder
1067
+
1068
+ const oldUpperCaseBefore = overallOrderConfig?.isUpperCaseBefore
1069
+ this.config.contents[arr[2]]?.overallOrder &&
1070
+ set(overallOrderConfig, { isUpperCaseBefore: !oldUpperCaseBefore })
1071
+ }
1072
+ }
1073
+
1074
+ // 整单合计设置大小写金额分开
1075
+ @action.bound
1076
+ setOverallOrderUpperLowerCaseSeparate() {
1077
+ if (this.selectedRegion) {
1078
+ this.overallOrderShow = !this.overallOrderShow
1079
+ const arr = this.selectedRegion.split('.')
1080
+ const overallOrderConfig = this.config.contents[arr[2]]?.overallOrder
1081
+
1082
+ const oldUpperLowerCaseSeparate =
1083
+ overallOrderConfig.isUpperLowerCaseSeparate
1084
+ set(overallOrderConfig, {
1085
+ isUpperLowerCaseSeparate: !oldUpperLowerCaseSeparate
1086
+ })
1087
+ }
1088
+ }
1089
+
1090
+ // 整单合计开启自定义单元格
1091
+ @action.bound
1092
+ setOverallOrderCustomCells() {
1093
+ if (this.selectedRegion) {
1094
+ // 作用:触发tableoverallordertr组件的更新
1095
+ this.overallOrderShow = !this.overallOrderShow
1096
+ const arr = this.selectedRegion.split('.')
1097
+ const table = this.config.contents[arr[2]]
1098
+ const overallOrderConfig = table?.overallOrder
1099
+ if (!overallOrderConfig || !overallOrderConfig?.show) return
1100
+ // 多栏表格情况
1101
+ const colSpanLength = getColSpanLength(table)
1102
+ const oldCustomCells = overallOrderConfig?.isCustomCells
1103
+
1104
+ set(overallOrderConfig, {
1105
+ isCustomCells: !oldCustomCells
1106
+ })
1107
+
1108
+ if (overallOrderConfig?.isCustomCells) {
1109
+ // fields添加自定义单元格
1110
+ overallOrderConfig.fields = [
1111
+ overallOrderConfig.fields[0],
1112
+ {
1113
+ ...this.overallOrderConfigFields,
1114
+ // 和之前保持一样的样式
1115
+ style: { ...overallOrderConfig.fields[0].style }
1116
+ }
1117
+ ]
1118
+ // 重新计算合并单元格的个数
1119
+ overallOrderConfig.fields[0].colSpan =
1120
+ colSpanLength - overallOrderConfig.fields[1].colSpan
1121
+ } else {
1122
+ // 关闭自定义单元格
1123
+ overallOrderConfig.fields = [overallOrderConfig.fields[0]]
1124
+ // 重新计算合并单元格的个数
1125
+ overallOrderConfig.fields[0].colSpan = colSpanLength
1126
+ }
1127
+
1128
+ this.config = toJS(this.config)
1129
+ }
1130
+ }
1131
+
1132
+ // 整单合计自定义单元格文本输入
1133
+ @action.bound
1134
+ setOverallOrderFields(value) {
1135
+ if (this.selectedRegion) {
1136
+ const arr = this.selectedRegion.split('.')
1137
+ const table = this.config.contents[arr[2]]
1138
+ const overallOrderConfig = table?.overallOrder
1139
+
1140
+ if (overallOrderConfig.isCustomCells) {
1141
+ const overallOrderConfigFields = table?.overallOrder.fields
1142
+ overallOrderConfigFields[1].name = value
1143
+ }
1144
+ }
1145
+ }
1146
+
1147
+ // 整单合计样式设置
1148
+ @action.bound
1149
+ setOverallOrderStyle(value) {
1150
+ if (this.selectedRegion) {
1151
+ const flexStyle = {
1152
+ left: 'flex-start',
1153
+ center: 'center',
1154
+ right: 'flex-end'
1155
+ }
1156
+ const arr = this.selectedRegion.split('.')
1157
+ const overallOrderConfigFields = this.config.contents[arr[2]]
1158
+ ?.overallOrder.fields
1159
+ _.forEach(overallOrderConfigFields, item => {
1160
+ const oldStyle = item.style || {}
1161
+ set(item, {
1162
+ style: {
1163
+ ...oldStyle,
1164
+ ...value,
1165
+ // 整单合计里使用的flex布局,textAlign不生效
1166
+ 'justify-content': flexStyle[value.textAlign]
1167
+ }
1168
+ })
1169
+ })
1170
+ }
1171
+ }
1172
+
1173
+ // 合计和每页合计设置交换位置
986
1174
  @action.bound
987
1175
  setSubtotalCommutationPlace() {
988
1176
  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,