gm-printer 10.36.5 → 10.37.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.36.5",
3
+ "version": "10.37.1",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -72,13 +72,15 @@ class EditorTitle extends React.Component {
72
72
  }
73
73
 
74
74
  handleTestPrint = () => {
75
- const { mockData, editStore } = this.props
75
+ // 新增结款单每页合计标识,测试打印时原样透传到打印入口
76
+ const { mockData, editStore, isSomeSubtotalTr } = this.props
76
77
  doPrint(
77
78
  {
78
79
  config: toJS(editStore.config),
79
80
  data: mockData
80
81
  },
81
- true
82
+ true,
83
+ isSomeSubtotalTr
82
84
  )
83
85
  }
84
86
 
@@ -140,10 +142,14 @@ class EditorTitle extends React.Component {
140
142
  EditorTitle.propTypes = {
141
143
  onSave: PropTypes.func.isRequired,
142
144
  isPurchase: PropTypes.bool,
143
- editStore: PropTypes.object
145
+ editStore: PropTypes.object,
146
+ // 标识是否为结款单每页合计场景
147
+ isSomeSubtotalTr: PropTypes.bool
144
148
  }
145
149
  EditorTitle.defaultProps = {
146
- isPurchase: false
150
+ isPurchase: false,
151
+ // 默认按非结款单每页合计场景处理
152
+ isSomeSubtotalTr: false
147
153
  }
148
154
 
149
155
  EditorTitle.wrappedComponent.propTypes = {
@@ -42,7 +42,8 @@ class Editor extends React.Component {
42
42
 
43
43
  {showEditor && (
44
44
  <div className='gm-printer-edit-zone'>
45
- <EditorTitle onSave={onSave} />
45
+ {/* 透传结款单每页合计标识给标题区,用于测试打印时走对应逻辑 */}
46
+ <EditorTitle onSave={onSave} isSomeSubtotalTr={isSomeSubtotalTr} />
46
47
  <Gap height='10px' />
47
48
  <EditorSelect />
48
49
  <Gap height='5px' />