@bit-sun/business-component 4.2.0-alpha.6.17 → 4.2.0-alpha.6.19

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/dist/index.esm.js CHANGED
@@ -19541,10 +19541,22 @@ var BsSulaQueryTable = (function (props) {
19541
19541
  };
19542
19542
  }
19543
19543
  }, (value === null || value === void 0 ? void 0 : value.tableProps) || {});
19544
- // @ts-ignore
19545
19544
  if (tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$initialPa = tableProps.initialPaging) === null || _tableProps$initialPa === void 0 ? void 0 : _tableProps$initialPa.pagination) {
19546
- // @ts-ignore
19547
19545
  tableProps.initialPaging.pagination.showSizeChanger = true;
19546
+ // 分页大小改变时,更新本地存储
19547
+ var onShowSizeChange = function onShowSizeChange(current, size) {
19548
+ var allPaginationData = JSON.parse(localStorage.getItem('paginationData') || "{}");
19549
+ allPaginationData[bsTableCode] = size;
19550
+ localStorage.setItem('paginationData', JSON.stringify(allPaginationData || {}));
19551
+ };
19552
+ tableProps.initialPaging.pagination.onShowSizeChange = onShowSizeChange;
19553
+ // 从本地存储中获取分页大小
19554
+ var pageSize = JSON.parse(localStorage.getItem('paginationData') || "{}")[bsTableCode];
19555
+ if (pageSize) {
19556
+ tableProps.initialPaging.pagination.pageSize = pageSize;
19557
+ tableProps.pageSize = pageSize;
19558
+ tableProps.defaultPageSize = pageSize;
19559
+ }
19548
19560
  }
19549
19561
  return tableProps;
19550
19562
  };
@@ -35995,7 +36007,7 @@ var RuleField = /*#__PURE__*/function (_Component) {
35995
36007
  }
35996
36008
  }
35997
36009
  // 配送方式选择器
35998
- if (dataChoiceBusinessType == 310) {
36010
+ if (dataChoiceBusinessType == 310 || dataChoiceBusinessType == 311) {
35999
36011
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
36000
36012
  return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(BusinessSearchSelect$1, {
36001
36013
  selectBusinessType: "deliveryMode",
@@ -36009,9 +36021,14 @@ var RuleField = /*#__PURE__*/function (_Component) {
36009
36021
  disabled: disabled,
36010
36022
  labelInValue: true,
36011
36023
  value: values[0],
36012
- requestConfig: {
36024
+ requestConfig: _objectSpread2(_objectSpread2({}, dataChoiceBusinessType === 311 ? {
36025
+ otherParams: {
36026
+ // 配送方式只选择标准配送方式
36027
+ 'qp-recordChannnelCode-eq': 80
36028
+ }
36029
+ } : {}), {}, {
36013
36030
  filterInit: 'qp-code-in'
36014
- },
36031
+ }),
36015
36032
  onChange: function onChange(value) {
36016
36033
  if (dataInputBusinessType === 12) {
36017
36034
  values[0] = value.map(function (i) {
@@ -36041,9 +36058,14 @@ var RuleField = /*#__PURE__*/function (_Component) {
36041
36058
  disabled: disabled,
36042
36059
  labelInValue: true,
36043
36060
  value: values[1],
36044
- requestConfig: {
36061
+ requestConfig: _objectSpread2(_objectSpread2({}, dataChoiceBusinessType === 311 ? {
36062
+ otherParams: {
36063
+ // 配送方式只选择标准配送方式
36064
+ 'qp-recordChannnelCode-eq': 80
36065
+ }
36066
+ } : {}), {}, {
36045
36067
  filterInit: 'qp-code-in'
36046
- },
36068
+ }),
36047
36069
  onChange: function onChange(value) {
36048
36070
  if (dataInputBusinessType === 12) {
36049
36071
  values[1] = value.map(function (i) {
@@ -36087,9 +36109,14 @@ var RuleField = /*#__PURE__*/function (_Component) {
36087
36109
  disabled: disabled,
36088
36110
  labelInValue: true,
36089
36111
  value: _currentValue0,
36090
- requestConfig: {
36112
+ requestConfig: _objectSpread2(_objectSpread2({}, dataChoiceBusinessType === 311 ? {
36113
+ otherParams: {
36114
+ // 配送方式只选择标准配送方式
36115
+ 'qp-recordChannnelCode-eq': 80
36116
+ }
36117
+ } : {}), {}, {
36091
36118
  filterInit: 'qp-code-in'
36092
- },
36119
+ }),
36093
36120
  onChange: function onChange(value) {
36094
36121
  if (dataInputBusinessType === 12 || SET_TYPE.indexOf(selectOperation) > -1) {
36095
36122
  values = value.map(function (i) {
@@ -37789,7 +37816,7 @@ function RenderCompItem(props) {
37789
37816
  getPopupContainer: function getPopupContainer() {
37790
37817
  return document.body;
37791
37818
  }
37792
- })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 310 && (/*#__PURE__*/React$1.createElement(BusinessSearchSelect$1, {
37819
+ })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && ((ites === null || ites === void 0 ? void 0 : ites.choiceType) === 310 || (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 311) && (/*#__PURE__*/React$1.createElement(BusinessSearchSelect$1, {
37793
37820
  selectBusinessType: "deliveryMode",
37794
37821
  selectProps: _objectSpread2({
37795
37822
  style: styleCommon,
@@ -37801,9 +37828,14 @@ function RenderCompItem(props) {
37801
37828
  disabled: disabled,
37802
37829
  labelInValue: true,
37803
37830
  value: showValue(ites.code),
37804
- requestConfig: {
37831
+ requestConfig: _objectSpread2(_objectSpread2({}, (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 311 ? {
37832
+ otherParams: {
37833
+ // 配送方式只选择标准配送方式
37834
+ 'qp-recordChannnelCode-eq': 80
37835
+ }
37836
+ } : {}), {}, {
37805
37837
  filterInit: 'qp-code-in'
37806
- },
37838
+ }),
37807
37839
  onChange: function onChange(value) {
37808
37840
  handleEdit(ites.code, value);
37809
37841
  },
package/dist/index.js CHANGED
@@ -19564,10 +19564,22 @@ var BsSulaQueryTable = (function (props) {
19564
19564
  };
19565
19565
  }
19566
19566
  }, (value === null || value === void 0 ? void 0 : value.tableProps) || {});
19567
- // @ts-ignore
19568
19567
  if (tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$initialPa = tableProps.initialPaging) === null || _tableProps$initialPa === void 0 ? void 0 : _tableProps$initialPa.pagination) {
19569
- // @ts-ignore
19570
19568
  tableProps.initialPaging.pagination.showSizeChanger = true;
19569
+ // 分页大小改变时,更新本地存储
19570
+ var onShowSizeChange = function onShowSizeChange(current, size) {
19571
+ var allPaginationData = JSON.parse(localStorage.getItem('paginationData') || "{}");
19572
+ allPaginationData[bsTableCode] = size;
19573
+ localStorage.setItem('paginationData', JSON.stringify(allPaginationData || {}));
19574
+ };
19575
+ tableProps.initialPaging.pagination.onShowSizeChange = onShowSizeChange;
19576
+ // 从本地存储中获取分页大小
19577
+ var pageSize = JSON.parse(localStorage.getItem('paginationData') || "{}")[bsTableCode];
19578
+ if (pageSize) {
19579
+ tableProps.initialPaging.pagination.pageSize = pageSize;
19580
+ tableProps.pageSize = pageSize;
19581
+ tableProps.defaultPageSize = pageSize;
19582
+ }
19571
19583
  }
19572
19584
  return tableProps;
19573
19585
  };
@@ -36018,7 +36030,7 @@ var RuleField = /*#__PURE__*/function (_Component) {
36018
36030
  }
36019
36031
  }
36020
36032
  // 配送方式选择器
36021
- if (dataChoiceBusinessType == 310) {
36033
+ if (dataChoiceBusinessType == 310 || dataChoiceBusinessType == 311) {
36022
36034
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
36023
36035
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(BusinessSearchSelect$1, {
36024
36036
  selectBusinessType: "deliveryMode",
@@ -36032,9 +36044,14 @@ var RuleField = /*#__PURE__*/function (_Component) {
36032
36044
  disabled: disabled,
36033
36045
  labelInValue: true,
36034
36046
  value: values[0],
36035
- requestConfig: {
36047
+ requestConfig: _objectSpread2(_objectSpread2({}, dataChoiceBusinessType === 311 ? {
36048
+ otherParams: {
36049
+ // 配送方式只选择标准配送方式
36050
+ 'qp-recordChannnelCode-eq': 80
36051
+ }
36052
+ } : {}), {}, {
36036
36053
  filterInit: 'qp-code-in'
36037
- },
36054
+ }),
36038
36055
  onChange: function onChange(value) {
36039
36056
  if (dataInputBusinessType === 12) {
36040
36057
  values[0] = value.map(function (i) {
@@ -36064,9 +36081,14 @@ var RuleField = /*#__PURE__*/function (_Component) {
36064
36081
  disabled: disabled,
36065
36082
  labelInValue: true,
36066
36083
  value: values[1],
36067
- requestConfig: {
36084
+ requestConfig: _objectSpread2(_objectSpread2({}, dataChoiceBusinessType === 311 ? {
36085
+ otherParams: {
36086
+ // 配送方式只选择标准配送方式
36087
+ 'qp-recordChannnelCode-eq': 80
36088
+ }
36089
+ } : {}), {}, {
36068
36090
  filterInit: 'qp-code-in'
36069
- },
36091
+ }),
36070
36092
  onChange: function onChange(value) {
36071
36093
  if (dataInputBusinessType === 12) {
36072
36094
  values[1] = value.map(function (i) {
@@ -36110,9 +36132,14 @@ var RuleField = /*#__PURE__*/function (_Component) {
36110
36132
  disabled: disabled,
36111
36133
  labelInValue: true,
36112
36134
  value: _currentValue0,
36113
- requestConfig: {
36135
+ requestConfig: _objectSpread2(_objectSpread2({}, dataChoiceBusinessType === 311 ? {
36136
+ otherParams: {
36137
+ // 配送方式只选择标准配送方式
36138
+ 'qp-recordChannnelCode-eq': 80
36139
+ }
36140
+ } : {}), {}, {
36114
36141
  filterInit: 'qp-code-in'
36115
- },
36142
+ }),
36116
36143
  onChange: function onChange(value) {
36117
36144
  if (dataInputBusinessType === 12 || SET_TYPE.indexOf(selectOperation) > -1) {
36118
36145
  values = value.map(function (i) {
@@ -37812,7 +37839,7 @@ function RenderCompItem(props) {
37812
37839
  getPopupContainer: function getPopupContainer() {
37813
37840
  return document.body;
37814
37841
  }
37815
- })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 310 && (/*#__PURE__*/React__default['default'].createElement(BusinessSearchSelect$1, {
37842
+ })) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && ((ites === null || ites === void 0 ? void 0 : ites.choiceType) === 310 || (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 311) && (/*#__PURE__*/React__default['default'].createElement(BusinessSearchSelect$1, {
37816
37843
  selectBusinessType: "deliveryMode",
37817
37844
  selectProps: _objectSpread2({
37818
37845
  style: styleCommon,
@@ -37824,9 +37851,14 @@ function RenderCompItem(props) {
37824
37851
  disabled: disabled,
37825
37852
  labelInValue: true,
37826
37853
  value: showValue(ites.code),
37827
- requestConfig: {
37854
+ requestConfig: _objectSpread2(_objectSpread2({}, (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 311 ? {
37855
+ otherParams: {
37856
+ // 配送方式只选择标准配送方式
37857
+ 'qp-recordChannnelCode-eq': 80
37858
+ }
37859
+ } : {}), {}, {
37828
37860
  filterInit: 'qp-code-in'
37829
- },
37861
+ }),
37830
37862
  onChange: function onChange(value) {
37831
37863
  handleEdit(ites.code, value);
37832
37864
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.0-alpha.6.17",
3
+ "version": "4.2.0-alpha.6.19",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -607,10 +607,24 @@ export default (props: any) => {
607
607
  ...value?.tableProps || {}
608
608
  };
609
609
 
610
- // @ts-ignore
611
610
  if (tableProps?.initialPaging?.pagination) {
612
- // @ts-ignore
613
611
  tableProps.initialPaging.pagination.showSizeChanger = true;
612
+
613
+ // 分页大小改变时,更新本地存储
614
+ const onShowSizeChange = (current: number, size: number) => {
615
+ let allPaginationData = JSON.parse(localStorage.getItem('paginationData') || "{}");
616
+ allPaginationData[bsTableCode] = size;
617
+ localStorage.setItem('paginationData', JSON.stringify(allPaginationData || {}));
618
+ };
619
+ tableProps.initialPaging.pagination.onShowSizeChange = onShowSizeChange;
620
+
621
+ // 从本地存储中获取分页大小
622
+ const pageSize = JSON.parse(localStorage.getItem('paginationData') || "{}")[bsTableCode];
623
+ if (pageSize) {
624
+ tableProps.initialPaging.pagination.pageSize = pageSize;
625
+ tableProps.pageSize = pageSize;
626
+ tableProps.defaultPageSize = pageSize;
627
+ }
614
628
  }
615
629
  return tableProps;
616
630
  };
@@ -589,7 +589,7 @@ export default function RenderCompItem(props:any){
589
589
  null}
590
590
  {/* 单选/多选 配送方式选择器 */}
591
591
  {((ites?.inputType === 20 || ites?.inputType === 30) &&
592
- ites?.choiceType === 310 && (
592
+ (ites?.choiceType === 310 || ites?.choiceType === 311)&& (
593
593
  <BusinessSearchSelect
594
594
  selectBusinessType="deliveryMode"
595
595
  selectProps={{
@@ -606,6 +606,14 @@ export default function RenderCompItem(props:any){
606
606
  labelInValue={true}
607
607
  value={showValue(ites.code)}
608
608
  requestConfig={{
609
+ ...(ites?.choiceType === 311
610
+ ? {
611
+ otherParams: {
612
+ // 配送方式只选择标准配送方式
613
+ 'qp-recordChannnelCode-eq': 80,
614
+ },
615
+ }
616
+ : {}),
609
617
  filterInit: 'qp-code-in',
610
618
  }}
611
619
  onChange={(value) => {
@@ -1932,7 +1932,7 @@ export default class RuleField extends Component {
1932
1932
  }
1933
1933
  }
1934
1934
  // 配送方式选择器
1935
- if (dataChoiceBusinessType == 310) {
1935
+ if (dataChoiceBusinessType == 310 || dataChoiceBusinessType == 311) {
1936
1936
  if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1937
1937
  return (
1938
1938
  <>
@@ -1952,6 +1952,14 @@ export default class RuleField extends Component {
1952
1952
  labelInValue={true}
1953
1953
  value={values[0]}
1954
1954
  requestConfig={{
1955
+ ...(dataChoiceBusinessType === 311
1956
+ ? {
1957
+ otherParams: {
1958
+ // 配送方式只选择标准配送方式
1959
+ 'qp-recordChannnelCode-eq': 80,
1960
+ },
1961
+ }
1962
+ : {}),
1955
1963
  filterInit: 'qp-code-in',
1956
1964
  }}
1957
1965
  onChange={(value) => {
@@ -1983,6 +1991,14 @@ export default class RuleField extends Component {
1983
1991
  labelInValue={true}
1984
1992
  value={values[1]}
1985
1993
  requestConfig={{
1994
+ ...(dataChoiceBusinessType === 311
1995
+ ? {
1996
+ otherParams: {
1997
+ // 配送方式只选择标准配送方式
1998
+ 'qp-recordChannnelCode-eq': 80,
1999
+ },
2000
+ }
2001
+ : {}),
1986
2002
  filterInit: 'qp-code-in',
1987
2003
  }}
1988
2004
  onChange={(value) => {
@@ -2020,6 +2036,14 @@ export default class RuleField extends Component {
2020
2036
  labelInValue={true}
2021
2037
  value={currentValue}
2022
2038
  requestConfig={{
2039
+ ...(dataChoiceBusinessType === 311
2040
+ ? {
2041
+ otherParams: {
2042
+ // 配送方式只选择标准配送方式
2043
+ 'qp-recordChannnelCode-eq': 80,
2044
+ },
2045
+ }
2046
+ : {}),
2023
2047
  filterInit: 'qp-code-in',
2024
2048
  }}
2025
2049
  onChange={(value) => {