@kmkf-fe-packages/kmkf-work-order-service-component 2.0.46 → 2.0.48

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.
@@ -162,7 +162,7 @@ var FormRender = function FormRender(props, ref) {
162
162
  });
163
163
  var transData = calcWorkOrderList([record], preNodeComponentDtoList);
164
164
  preNodeForm.setFieldsValue(_objectSpread({}, get(transData, '0', {})));
165
- fillByShopId(get(transData, '0', {}).shopId);
165
+ record.preCreateAndNotModified && fillByShopId(get(transData, '0', {}).shopId);
166
166
  }
167
167
  }, [record]);
168
168
  // 过滤打款组件订单与支付宝账号重复校验结果
@@ -396,6 +396,7 @@ var FormRender = function FormRender(props, ref) {
396
396
  var transData = calcWorkOrderList([newRecord], [].concat(_toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList) || []), _toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || [])), newRecord.preCreateAndNotModified ? 'init' : 'edit' // TODO: 修复非首节点录入时丢失初始值问题
397
397
  );
398
398
  // console.log(newRecord.jsonMap, newFormValues, transData);
399
+
399
400
  form.setFieldsValue(_objectSpread(_objectSpread({}, get(transData, '0', {})), {}, {
400
401
  shopId: shopId,
401
402
  shopName: newRecord.shopName,
@@ -427,6 +428,7 @@ var FormRender = function FormRender(props, ref) {
427
428
  fetchRemark(shopId, currentNodeTid);
428
429
  }
429
430
  } else {
431
+ fillByShopId(shopId);
430
432
  var initFormValues = null;
431
433
  if (plat !== null && plat !== void 0 && plat.subOrderNo) {
432
434
  var _getCacheInfo = JSON.parse(sessionStorage.getItem('cacheOmsOrderInfo') || '{}');
@@ -530,6 +532,7 @@ var FormRender = function FormRender(props, ref) {
530
532
  // 商品组件映射
531
533
  var fillByShopId = function fillByShopId(shopId) {
532
534
  // PS: 增加setTimeout 为了让后续的items渲染,然后触发对应的映射
535
+ console.log('fillByShopId', shopId);
533
536
  setTimeout(function () {
534
537
  var shopUniqueKey = shopId ? shopIdToUniqueKeyMap[shopId] : '';
535
538
  shopUniqueKey && fillByMapping('SHOP_SELECT_MAPPING', shopUniqueKey);
@@ -586,9 +589,11 @@ var FormRender = function FormRender(props, ref) {
586
589
  }
587
590
  }
588
591
  };
589
- useEffect(function () {
590
- fillByShopId(shopId);
591
- }, [shopId]);
592
+
593
+ // useEffect(() => {
594
+ // console.log('店铺变化');
595
+ // fillByShopId(shopId);
596
+ // }, [shopId]);
592
597
 
593
598
  // 查询标签
594
599
  var queryLabels = /*#__PURE__*/function () {
@@ -705,6 +710,7 @@ var FormRender = function FormRender(props, ref) {
705
710
  setIsOrderBackShopId(true);
706
711
  setTimeout(function () {
707
712
  setShopId(id);
713
+ fillByShopId(id);
708
714
  }, 0);
709
715
  }
710
716
  });
@@ -817,6 +823,7 @@ var FormRender = function FormRender(props, ref) {
817
823
  // 切换店铺
818
824
  var handleChangeShopId = function handleChangeShopId(val) {
819
825
  setShopId(val);
826
+ fillByShopId(val || '');
820
827
  setIsOrderBackShopId(true);
821
828
  // 清空表单字段
822
829
  var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
@@ -916,6 +923,7 @@ var FormRender = function FormRender(props, ref) {
916
923
  setIsOrderBackShopId(true);
917
924
  setTimeout(function () {
918
925
  setShopId(id);
926
+ fillByShopId(id);
919
927
  }, 0);
920
928
  }
921
929
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "2.0.46",
3
+ "version": "2.0.48",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@ant-design/icons": "^4.7.0",
35
- "@kmkf-fe-packages/basic-components": "2.0.46",
36
- "@kmkf-fe-packages/kmkf-utils": "2.0.46",
37
- "@kmkf-fe-packages/services-components": "2.0.46",
35
+ "@kmkf-fe-packages/basic-components": "2.0.48",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.0.48",
37
+ "@kmkf-fe-packages/services-components": "2.0.48",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -73,7 +73,7 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "5d0f5367848cbd3220631cb3590baa34ff497297",
76
+ "gitHead": "c73160ce1d8542bbff5b17946e75bc0a269ce846",
77
77
  "gitHooks": {
78
78
  "pre-commit": "lint-staged"
79
79
  }