gm-printer 10.14.5 → 10.14.7

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 ADDED
@@ -0,0 +1 @@
1
+ [{"/Users/min/Documents/GMFE/gm-util/gm-printer/src/util.js":"1","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/get_css.js":"2","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcode.js":"3","/Users/min/Documents/GMFE/gm-util/gm-printer/src/index.js":"4","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/context_menu.js":"5","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/context_menu.js":"6","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/context_menu.js":"7","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/context_menu.js":"8","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/context_menu.js":"9","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor_special_table.js":"10","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/context_menu.js":"11","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/context_menu.js":"12","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/context_menu.js":"13","/Users/min/Documents/GMFE/gm-util/gm-printer/src/config.js":"14","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_store.js":"15","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_shadow_dom.js":"16","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/get_editor_css.js":"17","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_title.js":"18","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_store.js":"19","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_select.js":"20","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_edit_field.js":"21","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/component.js":"22","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/editor.js":"23","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/editor.js":"24","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/editor.js":"25","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/editor.js":"26","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/editor.js":"27","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor.js":"28","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account_statement/editor.js":"29","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/editor.js":"30","/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/editor.js":"31","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/tooltip/index.js":"32","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_special_field.js":"33","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/store.js":"34","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/index.js":"35","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/do_print.js":"36","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/finance_printer.js":"37","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table_subtotal_tr.js":"38","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js":"39","/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js":"40","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js":"41","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js":"42","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js":"43","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js":"44","/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/flex/index.js":"45","/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js":"46","/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js":"47"},{"size":7813,"mtime":1648799098282,"results":"48","hashOfConfig":"49"},{"size":291,"mtime":1638935573926,"results":"50","hashOfConfig":"51"},{"size":523,"mtime":1638935549030,"results":"52","hashOfConfig":"51"},{"size":1139,"mtime":1644572548725,"results":"53","hashOfConfig":"54"},{"size":2293,"mtime":1638948548042,"results":"55","hashOfConfig":"51"},{"size":2292,"mtime":1638948522492,"results":"56","hashOfConfig":"51"},{"size":1078,"mtime":1638948543271,"results":"57","hashOfConfig":"51"},{"size":2067,"mtime":1648466228565,"results":"58","hashOfConfig":"49"},{"size":2991,"mtime":1638948535719,"results":"59","hashOfConfig":"51"},{"size":4379,"mtime":1638935458586,"results":"60","hashOfConfig":"51"},{"size":2428,"mtime":1648466380496,"results":"61","hashOfConfig":"49"},{"size":2955,"mtime":1647850650993,"results":"62","hashOfConfig":"54"},{"size":4170,"mtime":1648640206253,"results":"63","hashOfConfig":"49"},{"size":2833,"mtime":1638861837310,"results":"64","hashOfConfig":"51"},{"size":4212,"mtime":1638935746667,"results":"65","hashOfConfig":"51"},{"size":861,"mtime":1638931446915,"results":"66","hashOfConfig":"51"},{"size":178,"mtime":1638931439249,"results":"67","hashOfConfig":"51"},{"size":3272,"mtime":1648713847909,"results":"68","hashOfConfig":"49"},{"size":36060,"mtime":1652856289268,"results":"69","hashOfConfig":"49"},{"size":4898,"mtime":1639992402586,"results":"70","hashOfConfig":"51"},{"size":17885,"mtime":1652855800277,"results":"71","hashOfConfig":"49"},{"size":14908,"mtime":1652855804615,"results":"72","hashOfConfig":"49"},{"size":2165,"mtime":1638949854481,"results":"73","hashOfConfig":"51"},{"size":2165,"mtime":1638949840121,"results":"74","hashOfConfig":"51"},{"size":2223,"mtime":1638949823846,"results":"75","hashOfConfig":"51"},{"size":2356,"mtime":1650083974574,"results":"76","hashOfConfig":"49"},{"size":3367,"mtime":1638949855771,"results":"77","hashOfConfig":"51"},{"size":2305,"mtime":1638949843817,"results":"78","hashOfConfig":"51"},{"size":3294,"mtime":1638949855131,"results":"79","hashOfConfig":"51"},{"size":2850,"mtime":1638949842017,"results":"80","hashOfConfig":"51"},{"size":4157,"mtime":1638949853726,"results":"81","hashOfConfig":"51"},{"size":605,"mtime":1638949882777,"results":"82","hashOfConfig":"51"},{"size":1175,"mtime":1638949720500,"results":"83","hashOfConfig":"51"},{"size":15067,"mtime":1648801216882,"results":"84","hashOfConfig":"49"},{"size":332,"mtime":1644573509040,"results":"85","hashOfConfig":"54"},{"size":4080,"mtime":1648536160221,"results":"86","hashOfConfig":"49"},{"size":8842,"mtime":1646363892377,"results":"87","hashOfConfig":"54"},{"size":4317,"mtime":1646376602197,"results":"88","hashOfConfig":"54"},{"size":9440,"mtime":1644993553716,"results":"89","hashOfConfig":"54"},{"size":724,"mtime":1644808940649,"results":"90","hashOfConfig":"54"},{"size":1717,"mtime":1648466368772,"results":"91","hashOfConfig":"49"},{"size":5049,"mtime":1650085552191,"results":"92","hashOfConfig":"49"},{"size":9717,"mtime":1648628215217,"results":"93","hashOfConfig":"49"},{"size":9001,"mtime":1648713828033,"results":"94","hashOfConfig":"49"},{"size":3152,"mtime":1648713745966},{"size":1901,"mtime":1650082399244,"results":"95","hashOfConfig":"49"},{"size":460,"mtime":1652857240696,"results":"96","hashOfConfig":"49"},{"filePath":"97","messages":"98","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h9xfdh",{"filePath":"99","messages":"100","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jpc0be",{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"103","messages":"104","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1qaimc",{"filePath":"105","messages":"106","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"107","messages":"108","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"111","messages":"112","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"113","messages":"114","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"115","messages":"116","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"117","messages":"118","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"119","messages":"120","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"121","messages":"122","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"123","messages":"124","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"125","messages":"126","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"127","messages":"128","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"129","messages":"130","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"131","messages":"132","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"133","messages":"134","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"135","messages":"136","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"137","messages":"138","errorCount":1,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"139","messages":"140","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"141","messages":"142","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"143","messages":"144","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"147","messages":"148","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"149","messages":"150","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"153","messages":"154","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"155","messages":"156","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"157","messages":"158","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"159","messages":"160","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"161","messages":"162","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"163","messages":"164","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"165","messages":"166","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"167","messages":"168","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"169","messages":"170","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"171","messages":"172","errorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"173","messages":"174","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"175","messages":"176","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"177","messages":"178","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"179","messages":"180","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"181","messages":"182","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"183","messages":"184","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"185","messages":"186","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"187","messages":"188","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/min/Documents/GMFE/gm-util/gm-printer/src/util.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/get_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/barcode.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor_special_table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/context_menu.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/config.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_store.js",["189","190"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/hoc_with_shadow_dom.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/get_editor_css.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_title.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_select.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_edit_field.js",["191","192","193","194","195"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/component.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockout/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_stockin/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_settle/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_salemenus/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_purchase/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account_statement/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor_account/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/editor/editor.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/components/tooltip/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/editor_special_field.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/store.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/index.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/do_print.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/finance_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table_subtotal_tr.js",["196"],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/finance_voucher/components/finance_batch_printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/page.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_subtotal_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/printer.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/printer/table_overallOrder_tr.js",[],"/Users/min/Documents/GMFE/gm-util/gm-printer/src/common/util.js",[],{"ruleId":"197","severity":2,"message":"198","line":10,"column":29,"nodeType":"199","endLine":10,"endColumn":35},{"ruleId":"197","severity":2,"message":"200","line":145,"column":63,"nodeType":"199","endLine":145,"endColumn":71},{"ruleId":"201","severity":1,"message":"202","line":307,"column":13,"nodeType":"203","endLine":307,"endColumn":49},{"ruleId":"201","severity":1,"message":"202","line":325,"column":13,"nodeType":"203","endLine":325,"endColumn":56},{"ruleId":"201","severity":1,"message":"202","line":468,"column":15,"nodeType":"203","endLine":468,"endColumn":53},{"ruleId":"201","severity":1,"message":"202","line":517,"column":11,"nodeType":"203","endLine":517,"endColumn":53},{"ruleId":"204","severity":2,"message":"205","line":566,"column":22,"nodeType":"206","messageId":"207","endLine":566,"endColumn":31},{"ruleId":"204","severity":2,"message":"205","line":120,"column":14,"nodeType":"206","messageId":"207","endLine":120,"endColumn":23},"react/prop-types","'config' is missing in props validation","Identifier","'mockData' is missing in props validation","react/jsx-handler-names","Handler function for onChange prop key must begin with 'handle'","JSXAttribute","gmfe/i18n-check","t函数的key只能为字符串常量(Literal),请使用单引号或双引号包裹","MemberExpression","isVariable"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.14.5",
3
+ "version": "10.14.7",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -602,16 +602,16 @@ Title.propTypes = {
602
602
  text: PropTypes.object
603
603
  }
604
604
 
605
- const Radio = ({ id, value, radioChecked, checked }) => (
606
- <div>
605
+ const Radio = ({ id, value, radioChecked, checked, style, inputName }) => (
606
+ <div style={style}>
607
607
  <input
608
608
  type='radio'
609
609
  value={value}
610
610
  id={id}
611
- name='radio'
611
+ name={inputName ?? 'radio'}
612
612
  onChange={radioChecked}
613
613
  checked={checked}
614
- style={{ margin: '5px 10px 0 0' }}
614
+ style={{ margin: '5px 5px 0 0' }}
615
615
  />
616
616
  <label htmlFor={id}>{value}</label>
617
617
  <Gap />
@@ -621,6 +621,8 @@ const Radio = ({ id, value, radioChecked, checked }) => (
621
621
  Radio.propTypes = {
622
622
  id: PropTypes.string,
623
623
  value: PropTypes.string,
624
+ style: PropTypes.string,
625
+ inputName: PropTypes.string,
624
626
  radioChecked: PropTypes.func,
625
627
  checked: PropTypes.bool
626
628
  }
@@ -14,10 +14,12 @@ import {
14
14
  Textarea,
15
15
  Title,
16
16
  TipInfo,
17
- Text
17
+ Text,
18
+ Radio
18
19
  } from '../common/component'
19
20
  import { get, toJS } from 'mobx'
20
21
  import PropTypes from 'prop-types'
22
+ import { subtotalRadioList } from './util'
21
23
 
22
24
  @inject('editStore')
23
25
  @observer
@@ -399,7 +401,7 @@ class EditorField extends React.Component {
399
401
  />
400
402
 
401
403
  <Flex>
402
- <Flex>{i18next.t('合计设置')}:</Flex>
404
+ <Flex>{i18next.t('每页合计设置')}:</Flex>
403
405
  <Fonter
404
406
  style={subtotalStyle}
405
407
  onChange={this.handleSubtotalStyleChange}
@@ -410,6 +412,28 @@ class EditorField extends React.Component {
410
412
  onChange={this.handleSubtotalStyleChange}
411
413
  />
412
414
  </Flex>
415
+ <Gap />
416
+ {!isSomeSubtotalTr && (
417
+ <div>
418
+ <Flex>{i18next.t('合金栏打印金额')}:</Flex>
419
+ <Flex style={{ marginLeft: 57 }}>
420
+ {subtotalRadioList.map(fields => {
421
+ return (
422
+ <Radio
423
+ style={{ marginLeft: 5 }}
424
+ id={fields.id}
425
+ value={fields.value}
426
+ key={fields.id}
427
+ inputName='subtotalRadio'
428
+ checked={subtotal?.fields?.[0].valueField === fields.id}
429
+ radioChecked={() => editStore.subtotalRadioCheck(fields)}
430
+ />
431
+ )
432
+ })}
433
+ </Flex>
434
+ </div>
435
+ )}
436
+
413
437
  <EditorSubtotalCheck
414
438
  subtotalCheckDisabled
415
439
  subtotalChecked={subtotalNeedUpperCase}
@@ -80,7 +80,7 @@ class EditorStore {
80
80
  subtotalConfigFields = {
81
81
  name: '',
82
82
  valueField: '',
83
- colSpan: 3 // 产品说3个,开启自定义单元格
83
+ colSpan: 6 // 产品说3个,开启自定义单元格,客户不满意,改成6个
84
84
  }
85
85
 
86
86
  @computed
@@ -565,6 +565,15 @@ class EditorStore {
565
565
  }
566
566
  }
567
567
 
568
+ @action
569
+ subtotalRadioCheck(fields) {
570
+ if (this.selectedRegion) {
571
+ this.overallOrderShow = !this.overallOrderShow
572
+ const arr = this.selectedRegion.split('.')
573
+ this.config.contents[arr[2]].subtotal.fields[0].valueField = fields.id
574
+ }
575
+ }
576
+
568
577
  @action
569
578
  setOverallOrderShow(name) {
570
579
  const arr = name.split('.')
@@ -0,0 +1,19 @@
1
+ import i18next from '../../locales'
2
+
3
+ /**
4
+ * 每页合计设置单选按钮
5
+ * id的值是用来计算每页的金额总数,不要轻易随便改
6
+ * id值暂时使用_origin的值,可优化改为{{列.xxxx}}的值,改起来有代价,先不改
7
+ */
8
+ const subtotalRadioList = [
9
+ {
10
+ value: i18next.t('下单金额'),
11
+ id: 'total_item_price'
12
+ },
13
+ {
14
+ value: i18next.t('出库金额'),
15
+ id: 'real_item_price'
16
+ }
17
+ ]
18
+
19
+ export { subtotalRadioList }
@@ -59,27 +59,29 @@ class ContextMenu extends React.Component {
59
59
  editStore: { isAutoFilling }
60
60
  } = this.props
61
61
  const arr = name.split('.')
62
- const { subtotal } = this.props.editStore.config.contents[arr[2]]
63
- // const keyArr = dataKey.split('_')
64
62
 
65
- // const isMultiActive = keyArr.includes('multi')
63
+ const { dataKey, subtotal } = this.props.editStore.config.contents[arr[2]]
64
+ const keyArr = dataKey.split('_')
65
+
66
+ const isMultiActive = keyArr.includes('multi')
66
67
  // const isCategoryActive = keyArr.includes('category')
67
68
  const isSubtotalActive = subtotal.show
68
69
 
69
70
  return (
70
71
  <>
71
- {/* <div
72
- onClick={this.handleChangeTableDataKey.bind(this, 'multi', name)}
73
- className={isMultiActive ? 'active' : ''}
74
- >
75
- {i18next.t('双栏商品')}
76
- </div>
72
+ {/*
77
73
  <div
78
74
  onClick={this.handleChangeTableDataKey.bind(this, 'category', name)}
79
75
  className={isCategoryActive ? 'active' : ''}
80
76
  >
81
77
  {i18next.t('商品分类')}
82
78
  </div> */}
79
+ <div
80
+ onClick={this.handleChangeTableDataKey.bind(this, 'multi', name)}
81
+ className={isMultiActive ? 'active' : ''}
82
+ >
83
+ {i18next.t('双栏商品')}
84
+ </div>
83
85
  <div
84
86
  onClick={this.handleSubtotal.bind(this, name)}
85
87
  className={isSubtotalActive ? 'active' : ''}