@kmkf-fe-packages/kmkf-work-order-service-component 0.19.0-alpha.6 → 0.19.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.
@@ -42,8 +42,6 @@ var hasComponent = function hasComponent(componentDtoList, workOrderComponentTyp
42
42
  })) === null || _componentDtoList$fin === void 0 ? void 0 : _componentDtoList$fin.uniqueKey;
43
43
  };
44
44
 
45
- // PS: 放在外面, 要求实时更新
46
- var finallyMappdingHideComponentsMap = {};
47
45
  // 记录显隐触发隐藏的组件。显示后,重新出发一遍映射规则
48
46
  // TODO: 用useState会有bug, 不确定是哪里导致的
49
47
  var hideByXYComponentsMap = {};
@@ -73,6 +71,7 @@ var FormRender = function FormRender(props) {
73
71
  var mappingConfig = useMemo(function () {
74
72
  return getMappingConfigByTemplateDetail(templateDetail);
75
73
  }, [templateDetail]);
74
+ var finallyMappdingHideComponents = useRef(mappingConfig.hideComponents);
76
75
  var _useState = useState(mappingConfig.hideComponents),
77
76
  _useState2 = _slicedToArray(_useState, 2),
78
77
  mappdingHideComponents = _useState2[0],
@@ -392,15 +391,14 @@ var FormRender = function FormRender(props) {
392
391
  var value = form.getFieldValue(key);
393
392
  return _typeof(value) === 'object' ? !value.value : !value;
394
393
  });
395
- var formUniqueKey = templateDetail.uniqueKey;
396
- if (!finallyMappdingHideComponentsMap[formUniqueKey]) {
397
- finallyMappdingHideComponentsMap[formUniqueKey] = mappingConfig.hideComponents;
394
+ if (!finallyMappdingHideComponents.current) {
395
+ finallyMappdingHideComponents.current = mappingConfig.hideComponents;
398
396
  }
399
- var noChange = hideComponents.length === finallyMappdingHideComponentsMap[formUniqueKey].length && hideComponents.every(function (k) {
400
- return finallyMappdingHideComponentsMap[formUniqueKey].includes(k);
397
+ var noChange = hideComponents.length === finallyMappdingHideComponents.current.length && hideComponents.every(function (k) {
398
+ return finallyMappdingHideComponents.current.includes(k);
401
399
  });
402
400
  if (!noChange) {
403
- finallyMappdingHideComponentsMap[formUniqueKey] = _toConsumableArray(hideComponents);
401
+ finallyMappdingHideComponents.current = _toConsumableArray(hideComponents);
404
402
  setMappdingHideComponents(hideComponents);
405
403
  }
406
404
  };
@@ -458,11 +456,6 @@ var FormRender = function FormRender(props) {
458
456
  useEffect(function () {
459
457
  fillByShopId(shopId);
460
458
  }, [shopId]);
461
- useEffect(function () {
462
- if (templateDetail !== null && templateDetail !== void 0 && templateDetail.uniqueKey && finallyMappdingHideComponentsMap[templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.uniqueKey]) {
463
- delete finallyMappdingHideComponentsMap[templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.uniqueKey];
464
- }
465
- }, [templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.uniqueKey]);
466
459
 
467
460
  //订单返填
468
461
  var changeHandle = function changeHandle(order_no) {
@@ -85,8 +85,7 @@ function ModifyModal(props) {
85
85
  var handleOk = function handleOk() {
86
86
  form.validateFields().then( /*#__PURE__*/function () {
87
87
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
88
- var _record$shopList$find;
89
- var shopSource, newValue, api, shopId, shopName, _shopList, other, _yield$api, success;
88
+ var newValue, api, shopId, shopName, _shopList, other, _yield$api, success;
90
89
  return _regeneratorRuntime().wrap(function _callee$(_context) {
91
90
  while (1) switch (_context.prev = _context.next) {
92
91
  case 0:
@@ -102,9 +101,6 @@ function ModifyModal(props) {
102
101
  message.error('支付宝姓名/账号都要填写');
103
102
  return _context.abrupt("return");
104
103
  case 5:
105
- shopSource = (_record$shopList$find = record.shopList.find(function (t) {
106
- return t.shopId === record.shopId;
107
- })) === null || _record$shopList$find === void 0 ? void 0 : _record$shopList$find.shopSource;
108
104
  newValue = {};
109
105
  api = type === 'edit' ? editRemitOrder : addPaymentOrder;
110
106
  if (type === 'edit') {
@@ -116,10 +112,9 @@ function ModifyModal(props) {
116
112
  buyerOpenUid: record.buyerOpenUid
117
113
  });
118
114
  }
119
- newValue.shopSource = shopSource;
120
- _context.next = 12;
115
+ _context.next = 10;
121
116
  return api(newValue);
122
- case 12:
117
+ case 10:
123
118
  _yield$api = _context.sent;
124
119
  success = _yield$api.success;
125
120
  if (success) {
@@ -128,7 +123,7 @@ function ModifyModal(props) {
128
123
  afterSuccessUpdateWorkOrder && afterSuccessUpdateWorkOrder(type); // 重新查询表格
129
124
  handleCancel();
130
125
  }
131
- case 15:
126
+ case 13:
132
127
  case "end":
133
128
  return _context.stop();
134
129
  }
@@ -30,9 +30,7 @@ function Reminder(props) {
30
30
  className: styles.color_F40500
31
31
  }, "\u6388\u6743\u5931\u6548"), "\u6216", /*#__PURE__*/React.createElement("span", {
32
32
  className: styles.color_F40500
33
- }, "\u6CA1\u6709\u5E97\u94FA\u6743\u9650"), "\u6216", /*#__PURE__*/React.createElement("span", {
34
- className: styles.color_F40500
35
- }, "\u5E97\u94FA\u5DF2\u505C\u7528")), /*#__PURE__*/React.createElement("div", {
33
+ }, "\u6CA1\u6709\u5E97\u94FA\u6743\u9650")), /*#__PURE__*/React.createElement("div", {
36
34
  className: styles.title
37
35
  }, "\u672A\u6388\u6743\u6D41\u7A0B"), /*#__PURE__*/React.createElement("div", {
38
36
  className: styles.mb_8
@@ -40,9 +38,7 @@ function Reminder(props) {
40
38
  className: styles.title
41
39
  }, "\u6388\u6743\u5931\u6548\u6D41\u7A0B"), /*#__PURE__*/React.createElement("div", null, "1.\u767B\u5F55\u4F01\u4E1A\u5DE5\u5355", /*#__PURE__*/React.createElement("br", null), "2.\u8FDB\u5165\u7CFB\u7EDF\u8BBE\u7F6E-\u5E97\u94FA\u7BA1\u7406-\u627E\u5230\u5BF9\u5E94\u7684\u5E97\u94FA-\u70B9\u51FB\u3010\u91CD\u65B0\u6388\u6743\u3011"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
42
40
  className: styles.title
43
- }, "\u6CA1\u6709\u5E97\u94FA\u6743\u9650\u6D41\u7A0B"), /*#__PURE__*/React.createElement("div", null, "1.\u767B\u5F55\u4F01\u4E1A\u5DE5\u5355", /*#__PURE__*/React.createElement("br", null), "2.\u8FDB\u5165\u7CFB\u7EDF\u8BBE\u7F6E-\u5458\u5DE5\u6743\u9650-\u3010\u7F16\u8F91\u3011-\u4FEE\u6539\u5E97\u94FA\u6743\u9650"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
44
- className: styles.title
45
- }, "\u5E97\u94FA\u5DF2\u505C\u7528"), /*#__PURE__*/React.createElement("div", null, "1.\u767B\u5F55\u4F01\u4E1A\u5DE5\u5355", /*#__PURE__*/React.createElement("br", null), "2.\u8FDB\u5165\u7CFB\u7EDF\u8BBE\u7F6E-\u5E97\u94FA\u7BA1\u7406-\u627E\u5230\u5BF9\u5E94\u7684\u5E97\u94FA-\u70B9\u51FB\u3010\u5DF2\u505C\u7528\uFF0C\u70B9\u51FB\u6FC0\u6D3B\u3011"), /*#__PURE__*/React.createElement("div", {
41
+ }, "\u6CA1\u6709\u5E97\u94FA\u6743\u9650\u6D41\u7A0B"), /*#__PURE__*/React.createElement("div", null, "1.\u767B\u5F55\u4F01\u4E1A\u5DE5\u5355", /*#__PURE__*/React.createElement("br", null), "2.\u8FDB\u5165\u7CFB\u7EDF\u8BBE\u7F6E-\u5458\u5DE5\u6743\u9650-\u3010\u7F16\u8F91\u3011-\u4FEE\u6539\u5E97\u94FA\u6743\u9650"), /*#__PURE__*/React.createElement("div", {
46
42
  className: styles.reminder_footer
47
43
  }, /*#__PURE__*/React.createElement(Button, {
48
44
  type: "primary",
@@ -13,13 +13,11 @@
13
13
 
14
14
  .reminder_box {
15
15
  width: 320px;
16
- height: 80%;
17
- padding: 12px 24px;
16
+ padding: 24px;
18
17
  color: rgba(86, 89, 96, 0.65);
19
18
  font-size: 14px;
20
19
  background-color: #fff;
21
20
  border-radius: 4px;
22
- overflow-y: auto;
23
21
  }
24
22
 
25
23
  .tip_error {
@@ -118,11 +118,10 @@ var WorkOrder = function WorkOrder(props) {
118
118
  //判断是否店铺是否授权
119
119
  useEffect(function () {
120
120
  if (shopList !== null && shopList !== void 0 && shopList.length) {
121
- var shopItem = (shopList || []).find(function (item) {
121
+ var _find;
122
+ var _isEmpower = !!((_find = (shopList || []).find(function (item) {
122
123
  return item.shopId == shopId;
123
- });
124
- //店铺授权失效或停用
125
- var _isEmpower = !!(shopItem !== null && shopItem !== void 0 && shopItem.auditStatus) && !!(shopItem !== null && shopItem !== void 0 && shopItem.useStatus);
124
+ })) !== null && _find !== void 0 && _find.auditStatus);
126
125
  setIsEmpower(_isEmpower);
127
126
  }
128
127
  }, [shopList]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "0.19.0-alpha.6",
3
+ "version": "0.19.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -32,14 +32,13 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@ant-design/icons": "^4.7.0",
35
- "@kmkf-fe-packages/basic-components": "^0.19.0-alpha.5",
36
- "@kmkf-fe-packages/kmkf-utils": "^0.18.0",
37
- "@kmkf-fe-packages/services-components": "^0.19.0-alpha.5",
35
+ "@kmkf-fe-packages/basic-components": "^0.19.1",
36
+ "@kmkf-fe-packages/kmkf-utils": "^0.19.0",
37
+ "@kmkf-fe-packages/services-components": "^0.19.1",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
41
41
  "js-md5": "^0.7.3",
42
- "kmkf-monitor": "^0.8.4",
43
42
  "react-redux": "^7.2.8",
44
43
  "store2": "^2.14.2",
45
44
  "voca": "^1.4.0"
@@ -66,6 +65,7 @@
66
65
  },
67
66
  "peerDependencies": {
68
67
  "antd": "^4.23.0",
68
+ "kmkf-monitor": "^0.7.0",
69
69
  "lodash": "^4.17.21",
70
70
  "react": "^17.0.2",
71
71
  "react-dom": "^17.0.2"
@@ -73,7 +73,7 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "75c9fe5bb760da12f9944aacb77e29a8334090af",
76
+ "gitHead": "a73b845e83e7e9fb3ab4e3e782a994f3a65908a6",
77
77
  "gitHooks": {
78
78
  "pre-commit": "lint-staged"
79
79
  }