gm-printer 10.28.4 → 10.28.6-beta.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.
@@ -19,6 +19,7 @@ import SubtotalTr from './table_subtotal_tr'
19
19
  import PageSummary from './page_summary'
20
20
  import OverallOrder from './table_overallOrder_tr'
21
21
  import DiyOverallOrder from './table_diy_overallOrder_tr'
22
+ import { toJS } from 'mobx'
22
23
 
23
24
  @inject('printerStore')
24
25
  @observer
@@ -40,7 +41,7 @@ class Table extends React.Component {
40
41
  const ths = tHead.querySelectorAll('th') || []
41
42
  const trs = $table.querySelectorAll('tbody tr') || []
42
43
  const detailsDiv = $table.querySelectorAll('tr td .b-table-details')
43
-
44
+ // 问题出现在这里
44
45
  printerStore.setHeight(name, getHeight($table))
45
46
 
46
47
  printerStore.setTable(name, {
@@ -168,11 +169,9 @@ class Table extends React.Component {
168
169
  printerStore,
169
170
  isSomeSubtotalTr
170
171
  } = this.props
171
-
172
172
  // 数据
173
173
  dataKey = getDataKey(dataKey, arrange)
174
174
  const tableData = printerStore.data._table[dataKey] || []
175
-
176
175
  // 列
177
176
  const columns = this.getColumns()
178
177
  // 列宽固定(避免跳页bug)
@@ -225,7 +224,6 @@ class Table extends React.Component {
225
224
  }
226
225
  return tdStyle
227
226
  }
228
-
229
227
  return (
230
228
  <table
231
229
  style={{
@@ -261,6 +259,7 @@ class Table extends React.Component {
261
259
  ))}
262
260
  </tr>
263
261
  </thead>
262
+
264
263
  <tbody>
265
264
  {_.map(_.range(range.begin, range.end), i => {
266
265
  const _special = tableData[i] && tableData[i]._special
@@ -271,11 +270,14 @@ class Table extends React.Component {
271
270
  return <SpecialTr key={i} config={config} data={_special} />
272
271
  // 如果项为空对象展现一个占满一行的td
273
272
  const isItemNone = !_.keys(tableData[i]).length
274
-
275
273
  return (
276
274
  <tr style={{ height: `${customerRowHeight}px` }} key={i}>
277
275
  {isItemNone ? (
278
- <td colSpan='99' />
276
+ !printerStore?.isAutoFilling ? (
277
+ <td colSpan='99' />
278
+ ) : (
279
+ <></>
280
+ )
279
281
  ) : (
280
282
  _.map(columns, (col, j) => {
281
283
  return (