@kmkf-fe-packages/services-components 2.0.54-beta.29 → 2.0.54-beta.30

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.
@@ -50,6 +50,15 @@ var Global = function Global(_ref) {
50
50
  }
51
51
  return reduxData;
52
52
  }, [JSON.stringify(reduxData)]);
53
+ useEffect(function () {
54
+ try {
55
+ var _reduxData$main2, _reduxData$workOrder2, _reduxData$global2;
56
+ var userInfo = (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main2 = reduxData.main) === null || _reduxData$main2 === void 0 ? void 0 : _reduxData$main2.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder2 = reduxData.workOrder) === null || _reduxData$workOrder2 === void 0 ? void 0 : _reduxData$workOrder2.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global2 = reduxData.global) === null || _reduxData$global2 === void 0 ? void 0 : _reduxData$global2.userInfo) || {};
57
+ localStorage.setItem("reduxData_userInfo", JSON.stringify(userInfo));
58
+ } catch (e) {
59
+ console.error(e);
60
+ }
61
+ }, [JSON.stringify(reduxData)]);
53
62
  useEffect(function () {
54
63
  initDataSource();
55
64
  }, []);
@@ -18,6 +18,7 @@ declare class Logistics implements ComponentInterface {
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
20
  dataType: ComponentInterface["dataType"];
21
+ isChange: boolean;
21
22
  constructor(options: PickOption);
22
23
  editRender: (p: any) => React.JSX.Element;
23
24
  renderClient: (record: Record) => React.JSX.Element;
@@ -32,8 +32,23 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
32
32
  _defineProperty(this, "canSort", void 0);
33
33
  _defineProperty(this, "children", void 0);
34
34
  _defineProperty(this, "dataType", void 0);
35
+ _defineProperty(this, "isChange", void 0);
35
36
  _defineProperty(this, "editRender", function (p) {
36
37
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
38
+ var onExpressLogisticsCodeBlur = function onExpressLogisticsCodeBlur(val) {
39
+ if (_this.isChange) {
40
+ var _p$onBlur;
41
+ p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, val, "expressLogisticsCode");
42
+ _this.isChange = false;
43
+ }
44
+ };
45
+ var onExpressLogisticsCodeChange = function onExpressLogisticsCodeChange() {
46
+ _this.isChange = true;
47
+ for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
48
+ e[_key] = arguments[_key];
49
+ }
50
+ p === null || p === void 0 ? void 0 : p.onChange.apply(p, e);
51
+ };
37
52
  return /*#__PURE__*/React.createElement(GetFormItem, {
38
53
  title: _this.name,
39
54
  name: _this.id,
@@ -41,11 +56,11 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
41
56
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
42
57
  display: p === null || p === void 0 ? void 0 : p.display,
43
58
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
44
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
59
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
45
60
  component: /*#__PURE__*/React.createElement(ExpressLogistics, _extends({}, _this.componentConfig, {
46
61
  options: _this.expressDateInstance.getExpressData(),
47
- onBlur: p === null || p === void 0 ? void 0 : p.onBlur,
48
- onChange: p === null || p === void 0 ? void 0 : p.onChange
62
+ onBlur: onExpressLogisticsCodeBlur,
63
+ onChange: onExpressLogisticsCodeChange
49
64
  }))
50
65
  });
51
66
  });
@@ -114,5 +129,6 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
114
129
  return Promise.resolve();
115
130
  }
116
131
  }] : [];
132
+ this.isChange = false;
117
133
  });
118
134
  export default Logistics;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.0.54-beta.29",
3
+ "version": "2.0.54-beta.30",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "81be13e1b9ce71436bcfb8d4ac57c12cf1719079",
44
+ "gitHead": "c37b3d20becbebec7b397be235411421af23ef00",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }