gm-printer 10.42.4-beta.0 → 10.42.4-beta.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.42.4-beta.0",
3
+ "version": "10.42.4-beta.1",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -7,12 +7,12 @@ import { Flex, Select, Option } from '../components'
7
7
  import { Title, Gap, Radio } from './component'
8
8
 
9
9
  // 排序方式常量,与宿主 sort_setting_util / 后端 parse_sort_setting 对齐
10
- // product_row_sort.field:'' 不排序 / tax_rate 税率 / box_num 箱号 / custom 行号(自定义字段)
10
+ // product_row_sort.field:'' 不排序 / tax_rate 税率 / box_num 箱号 / sort_num 行号
11
11
  const SORT_FIELD_LIST = [
12
12
  { value: '', text: i18next.t('不排序') },
13
13
  { value: 'tax_rate', text: i18next.t('税率') },
14
14
  { value: 'box_num', text: i18next.t('箱号') },
15
- { value: 'custom', text: i18next.t('行号') }
15
+ { value: 'sort_num', text: i18next.t('行号') }
16
16
  ]
17
17
 
18
18
  const SORT_DIRECTION_LIST = [
@@ -49,15 +49,6 @@ class SortSettingField extends React.Component {
49
49
 
50
50
  handleFieldChange = field => {
51
51
  const productRowSort = { ...this.getProductRowSort(), field }
52
- if (field !== 'custom') {
53
- // 切离行号排序时清掉脏数据
54
- delete productRowSort.custom_field_key
55
- } else if (!productRowSort.custom_field_key) {
56
- // 选中「行号」默认取第一个自定义字段(行号 1)
57
- const customFields =
58
- (this.props.addFields && this.props.addFields.sortCustomFields) || []
59
- productRowSort.custom_field_key = customFields[0] && customFields[0].id
60
- }
61
52
  this.setSortSetting({
62
53
  ...this.props.editStore.config.sort_setting,
63
54
  product_row_sort: {
@@ -141,7 +132,6 @@ class SortSettingField extends React.Component {
141
132
  }
142
133
 
143
134
  SortSettingField.propTypes = {
144
- addFields: PropTypes.object.isRequired,
145
135
  showOrderSort: PropTypes.bool,
146
136
  editStore: PropTypes.object
147
137
  }
@@ -90,7 +90,7 @@ class Editor extends React.Component {
90
90
  <SpecialField addFields={addFields} mockData={mockData} />
91
91
  <SpecialOtherField addFields={addFields} mockData={mockData} />
92
92
  <Gap height='5px' />
93
- <SortSettingField addFields={addFields} showOrderSort />
93
+ <SortSettingField showOrderSort />
94
94
  <EditorCutomizedConfig />
95
95
  <Gap height='5px' />
96
96
  <EditorField
@@ -56,7 +56,7 @@ class Editor extends React.Component {
56
56
  <Gap height='10px' />
57
57
  <EditorSelect />
58
58
  <Gap height='5px' />
59
- <SortSettingField addFields={addFields} />
59
+ <SortSettingField />
60
60
  <EditorCutomizedConfig />
61
61
  <Gap height='5px' />
62
62
  <EditorField showNewDate={showNewDate} />