@kmkf-fe-packages/kmkf-work-order-service-component 2.0.63 → 2.0.65

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.
@@ -30,7 +30,7 @@ import 'moment/locale/zh-cn';
30
30
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
31
31
  // 重复检验不需要展示在顶部的
32
32
  INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, kmSystemOrderBackValues, bsE3SystemOrderBackValues, wlnSystemOrderBackValues, gySystemOrderBackValues, jstSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, getMappingTargetValue } from "../../../common/utils/tools";
33
- import { replaceCheck, orderDetail, queryLabelByTradeId, queryMemberLevel } from "../../../model/servers/api";
33
+ import { replaceCheck, orderDetail, queryLabelByTradeId, queryMemberLevel, queryTidByOutSid } from "../../../model/servers/api";
34
34
  import { factory } from '@kmkf-fe-packages/services-components';
35
35
  import { getExpression, formatDisplayConfig, isNull, LabelData, setSessionStorage } from '@kmkf-fe-packages/kmkf-utils';
36
36
  import ShopName from "../ShopName";
@@ -704,32 +704,51 @@ var FormRender = function FormRender(props, ref) {
704
704
  }();
705
705
 
706
706
  //订单返填
707
- var changeHandle = function changeHandle(order_no) {
708
- if (!order_no) return;
709
- // console.log('[订单返填 changeHandle order_no ] >', order_no);
707
+ var changeHandle = /*#__PURE__*/function () {
708
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(order_no) {
709
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
710
+ while (1) switch (_context4.prev = _context4.next) {
711
+ case 0:
712
+ if (order_no) {
713
+ _context4.next = 2;
714
+ break;
715
+ }
716
+ return _context4.abrupt("return");
717
+ case 2:
718
+ // console.log('[订单返填 changeHandle order_no ] >', order_no);
710
719
 
711
- sessionStorage.setItem('order_no_test', order_no);
712
- orderBack({
713
- order_no: order_no,
714
- form: form,
715
- shopId: shopId,
716
- shopList: shopList,
717
- templateDetail: templateDetail,
718
- type: workOrderId ? 'edit' : 'add',
719
- callback: orderBackReplace,
720
- fromQNCreateWorkOrderByOrderNo: false,
721
- plat: plat,
722
- callbackShopId: function callbackShopId(id) {
723
- setIsOrderBackShopId(true);
724
- setTimeout(function () {
725
- setShopId(id);
726
- fillByShopId(id);
727
- }, 0);
728
- },
729
- callKey: 3,
730
- setLoading: setLoading
731
- });
732
- };
720
+ sessionStorage.setItem('order_no_test', order_no);
721
+ _context4.next = 5;
722
+ return orderBack({
723
+ order_no: order_no,
724
+ form: form,
725
+ shopId: shopId,
726
+ shopList: shopList,
727
+ templateDetail: templateDetail,
728
+ type: workOrderId ? 'edit' : 'add',
729
+ callback: orderBackReplace,
730
+ fromQNCreateWorkOrderByOrderNo: false,
731
+ plat: plat,
732
+ callbackShopId: function callbackShopId(id) {
733
+ setIsOrderBackShopId(true);
734
+ setTimeout(function () {
735
+ setShopId(id);
736
+ fillByShopId(id);
737
+ }, 0);
738
+ },
739
+ callKey: 3,
740
+ setLoading: setLoading
741
+ });
742
+ case 5:
743
+ case "end":
744
+ return _context4.stop();
745
+ }
746
+ }, _callee4);
747
+ }));
748
+ return function changeHandle(_x8) {
749
+ return _ref5.apply(this, arguments);
750
+ };
751
+ }();
733
752
  // 组件值变化
734
753
  var componentOnValueChange = function componentOnValueChange(uniqueKey, value, workOrderComponentType) {
735
754
  if (mappingConfig.config[uniqueKey]) {
@@ -798,41 +817,115 @@ var FormRender = function FormRender(props, ref) {
798
817
 
799
818
  //组件失焦事件
800
819
  var componentOnBlur = /*#__PURE__*/function () {
801
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(value, type) {
802
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
803
- while (1) switch (_context4.prev = _context4.next) {
820
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(value, type) {
821
+ var hasTradeIdComponent, _res$data4, hasKm, userInfo, _userInfo$companyUser, _companyUserConfig$pl, _companyUserConfig, _companyUserConfig$pl2, _companyUserConfig$pl3, companyUserConfig, oldValue, res, tradeId, blurPromise, promises;
822
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
823
+ while (1) switch (_context5.prev = _context5.next) {
804
824
  case 0:
825
+ hasTradeIdComponent = templateDetail.componentDtoList.some(function (item) {
826
+ return item.workOrderComponentType === 'TRADE_ID_INPUT';
827
+ });
828
+ if (!(type === 'expressLogisticsCode' && hasTradeIdComponent)) {
829
+ _context5.next = 21;
830
+ break;
831
+ }
832
+ hasKm = false;
833
+ try {
834
+ userInfo = JSON.parse(localStorage.getItem('reduxData_userInfo') || '{}');
835
+ if (isNull(userInfo)) {
836
+ hasKm = true;
837
+ } else {
838
+ companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
839
+ if (typeof companyUserConfig === 'string') {
840
+ companyUserConfig = JSON.parse(companyUserConfig);
841
+ }
842
+ hasKm = (_companyUserConfig$pl = (_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl2 = _companyUserConfig.plugins) === null || _companyUserConfig$pl2 === void 0 ? void 0 : (_companyUserConfig$pl3 = _companyUserConfig$pl2.km) === null || _companyUserConfig$pl3 === void 0 ? void 0 : _companyUserConfig$pl3.show) !== null && _companyUserConfig$pl !== void 0 ? _companyUserConfig$pl : false;
843
+ }
844
+ } catch (error) {
845
+ console.error(error);
846
+ }
847
+ console.log('---组件失焦事件--expressLogisticsCode', {
848
+ type: type,
849
+ value: value,
850
+ templateDetail: templateDetail,
851
+ hasTradeIdComponent: hasTradeIdComponent,
852
+ oldValue: form.getFieldsValue(),
853
+ hasKm: hasKm,
854
+ form: form
855
+ });
856
+ if (hasKm) {
857
+ _context5.next = 7;
858
+ break;
859
+ }
860
+ return _context5.abrupt("return");
861
+ case 7:
862
+ oldValue = form.getFieldValue('0eVTfMGEyd');
863
+ _context5.next = 10;
864
+ return queryTidByOutSid({
865
+ outSid: value
866
+ });
867
+ case 10:
868
+ res = _context5.sent;
869
+ tradeId = res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.tid;
870
+ if (tradeId) {
871
+ _context5.next = 14;
872
+ break;
873
+ }
874
+ return _context5.abrupt("return");
875
+ case 14:
876
+ form.setFieldsValue({
877
+ m3ap1EvEyd: tradeId
878
+ });
879
+ // 创建一个异步操作的Promise
880
+ blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
881
+ _context5.next = 18;
882
+ return blurPromise;
883
+ case 18:
884
+ // 所有异步操作完成后执行
885
+ console.log('[组件失焦事件]---set', oldValue);
886
+ form.setFieldsValue({
887
+ '0eVTfMGEyd': oldValue
888
+ });
889
+ return _context5.abrupt("return");
890
+ case 21:
891
+ // 收集所有需要执行的异步操作
892
+ promises = [];
805
893
  if (type === 'tradeId') {
806
- queryLabels(value, form.getFieldValue('shopId'));
807
- queryMemberLevels(value, form.getFieldValue('shopId'));
894
+ promises.push(queryLabels(value, form.getFieldValue('shopId')));
895
+ promises.push(queryMemberLevels(value, form.getFieldValue('shopId')));
808
896
  }
809
897
  // 针对订单号组件进行当前订单查重校验
810
898
  if ((type === 'tradeId' || type === 'enterprisePaymentTid') && typeof handleChangeTradeId === 'function') {
811
- handleChangeTradeId(value);
899
+ promises.push(handleChangeTradeId(value));
812
900
  }
813
901
  if (value) {
814
- _context4.next = 6;
902
+ _context5.next = 28;
815
903
  break;
816
904
  }
817
905
  setReplaceValue(function (prev) {
818
906
  return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, type, 0));
819
907
  });
820
908
  replaceValueRef.current = _objectSpread(_objectSpread({}, replaceValue), {}, _defineProperty({}, type, 0));
821
- return _context4.abrupt("return");
822
- case 6:
823
- queryReplaceCount(_defineProperty({}, type, value), templateDetail);
909
+ return _context5.abrupt("return");
910
+ case 28:
911
+ promises.push(queryReplaceCount(_defineProperty({}, type, value), templateDetail));
824
912
  // TODO: ERP不走订单反弹逻辑
825
913
  if ((type === 'tradeId' || type === 'enterprisePaymentTid') && !isErpUse) {
826
- changeHandle(value);
914
+ promises.push(changeHandle(value));
827
915
  }
828
- case 8:
916
+ // 等待所有异步操作完成
917
+ _context5.next = 32;
918
+ return Promise.all(promises);
919
+ case 32:
920
+ return _context5.abrupt("return", Promise.resolve());
921
+ case 33:
829
922
  case "end":
830
- return _context4.stop();
923
+ return _context5.stop();
831
924
  }
832
- }, _callee4);
925
+ }, _callee5);
833
926
  }));
834
- return function componentOnBlur(_x8, _x9) {
835
- return _ref5.apply(this, arguments);
927
+ return function componentOnBlur(_x9, _x10) {
928
+ return _ref6.apply(this, arguments);
836
929
  };
837
930
  }();
838
931
  // 切换店铺
@@ -1036,9 +1129,9 @@ var FormRender = function FormRender(props, ref) {
1036
1129
  var newComponentConfig = _objectSpread(_objectSpread({}, componentConfig), {}, {
1037
1130
  disabled: disabled
1038
1131
  });
1039
- var _ref6 = (componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.status) || {},
1040
- upgrade = _ref6.upgrade,
1041
- created = _ref6.created;
1132
+ var _ref7 = (componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.status) || {},
1133
+ upgrade = _ref7.upgrade,
1134
+ created = _ref7.created;
1042
1135
  if (['REISSUE_TRADE_ID', 'EXCHANGE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID'].includes(workOrderComponentType)) {
1043
1136
  // 售后单id、补发单id和换货单id默认值是可见不可编辑(2)
1044
1137
  if (typeof upgrade !== 'number') {
@@ -1096,8 +1189,8 @@ var FormRender = function FormRender(props, ref) {
1096
1189
  shouldUpdate: function shouldUpdate() {
1097
1190
  return true; // TODO: 修复重复依赖的问题 https://tb.raycloud.com/task/64e4491e0b8b5c001e1099b9
1098
1191
  }
1099
- }, function (_ref7) {
1100
- var getFieldValue = _ref7.getFieldValue;
1192
+ }, function (_ref8) {
1193
+ var getFieldValue = _ref8.getFieldValue;
1101
1194
  var show = currentIdDependenceOtherFields === null || currentIdDependenceOtherFields === void 0 ? void 0 : currentIdDependenceOtherFields.reduce(function (cur, nxt) {
1102
1195
  // 如果有一项满足展示条件则展示
1103
1196
  if (cur) {
@@ -1,2 +1,2 @@
1
1
  // 切换当前店铺时,以下组件字段需要清空
2
- export var NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE = ['BS_E3_LOGISTICS', 'BS_E3_SEND_GOOD', 'ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS', 'WDT_RETURN_GOODS', 'WDT_SHOP', 'WDT_EXCHANGE_GOODS', 'KM_SYSTEM_ORDER', 'KM_SEND_GOOD', 'KM_LOGISTICS', 'BS_E3_SYSTEM_ORDER', 'JST_SYSTEM_ORDER', 'JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS', 'BS_E3_REISSUE_GOODS', 'GY_SYSTEM_ORDER', 'GY_SEND_GOOD', 'GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS', 'GY_LOGISTICS'];
2
+ export var NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE = ['BS_E3_LOGISTICS', 'BS_E3_SEND_GOOD', 'ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS', 'WDT_RETURN_GOODS', 'WDT_SHOP', 'WDT_EXCHANGE_GOODS', 'KM_SYSTEM_ORDER', 'KM_SEND_GOOD', 'KM_LOGISTICS', 'KM_GOODS', 'BS_E3_SYSTEM_ORDER', 'JST_SYSTEM_ORDER', 'JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS', 'BS_E3_REISSUE_GOODS', 'GY_SYSTEM_ORDER', 'GY_SEND_GOOD', 'GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS', 'GY_LOGISTICS'];
@@ -26,8 +26,8 @@ import zhCN from 'antd/es/locale/zh_CN';
26
26
  import { calcWorkOrderList, deleteCacheOrder, submitParams } from "../common/utils/tools";
27
27
  import { useMemoizedFn } from 'ahooks';
28
28
  import moment from 'moment';
29
- import { fetchPanelInfo, fetchAllFlowOperateRecord } from "./store/reducers";
30
- import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectOrderBackLoading, selectWithDrawOrder, selectNodeAssistantMap, selectFlowTemplateType } from "./store/selector";
29
+ import { fetchPanelInfo, fetchAllFlowOperateRecord, fetchCollectOrder } from "./store/reducers";
30
+ import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectOrderBackLoading, selectWithDrawOrder, selectNodeAssistantMap, selectFlowTemplateType, selectFollow } from "./store/selector";
31
31
  import { NodeType, FlowStatus, FlowType } from "../model/flowTemplateDetail/types";
32
32
  import NodeItem from "./components/Item";
33
33
  import CurrentNode from "./components/CurrentNode";
@@ -97,6 +97,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
97
97
  var withdrawWorkOrderDetail = useSelector(selectWithDrawOrder);
98
98
  var assistantMap = useSelector(selectNodeAssistantMap);
99
99
  var flowTemplateType = useSelector(selectFlowTemplateType);
100
+ var follow = useSelector(selectFollow);
100
101
  var _Form$useForm = Form.useForm(),
101
102
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
102
103
  form = _Form$useForm2[0];
@@ -1204,6 +1205,12 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1204
1205
  }
1205
1206
  }, "v", operateParams === null || operateParams === void 0 ? void 0 : (_operateParams$maxPub2 = operateParams.maxPublishVersionTemplate) === null || _operateParams$maxPub2 === void 0 ? void 0 : _operateParams$maxPub2.version, "\u7248") : "v".concat(operateParams === null || operateParams === void 0 ? void 0 : (_operateParams$maxPub3 = operateParams.maxPublishVersionTemplate) === null || _operateParams$maxPub3 === void 0 ? void 0 : _operateParams$maxPub3.version, "\u7248"));
1206
1207
  };
1208
+ var handleFollow = function handleFollow() {
1209
+ dispatch(fetchCollectOrder({
1210
+ flowWorkOrderId: flowWorkOrderId,
1211
+ follow: !follow
1212
+ }));
1213
+ };
1207
1214
  return /*#__PURE__*/React.createElement(Spin, {
1208
1215
  spinning: loading || orderBackLoading
1209
1216
  }, /*#__PURE__*/React.createElement("div", {
@@ -1213,7 +1220,10 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1213
1220
  styles: {
1214
1221
  marginRight: 5
1215
1222
  }
1216
- }), shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopName, "-"), /*#__PURE__*/React.createElement("span", null, flowWorkOrderId)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1223
+ }), shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopName, "-"), /*#__PURE__*/React.createElement("span", null, flowWorkOrderId), /*#__PURE__*/React.createElement(Button, {
1224
+ type: "link",
1225
+ onClick: handleFollow
1226
+ }, !follow ? '关注' : '已关注')), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1217
1227
  justify: 'space-between',
1218
1228
  className: "header"
1219
1229
  }, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
@@ -6,6 +6,7 @@ declare type PayloadAction<T> = {
6
6
  export declare const fetchPanelInfo: (params: QyFlowPanelInfoRequest, options: any) => (dispatch: any) => Promise<void>;
7
7
  export declare const fetchAllFlowOperateRecord: (params: QueryAllFlowOperateRecordRequest) => (dispatch: any) => Promise<void>;
8
8
  export declare const fetchCurrentTradeIdLinkWorkOrder: (params: any) => (dispatch: any) => Promise<void>;
9
+ export declare const fetchCollectOrder: (params: any) => (dispatch: any) => Promise<void>;
9
10
  export declare const setNodeAssistantInfo: (state: FlowTemplateDetailState, { payload }: PayloadAction<{
10
11
  [nodeId: string]: Assistant[];
11
12
  }>) => void;
@@ -37,6 +38,7 @@ export declare const setLabelList: (state: FlowTemplateDetailState, { payload }:
37
38
  export declare const clearLabelList: (state: FlowTemplateDetailState) => void;
38
39
  export declare const setRejectLoading: (state: FlowTemplateDetailState, { payload }: PayloadAction<boolean>) => void;
39
40
  export declare const setWithDrawLoading: (state: FlowTemplateDetailState, { payload }: PayloadAction<boolean>) => void;
41
+ export declare const setFollow: (state: FlowTemplateDetailState, { payload }: PayloadAction<boolean>) => void;
40
42
  declare const reducers: (state: FlowTemplateDetailState | undefined, action: {
41
43
  type: string;
42
44
  payload: any;
@@ -81,5 +83,6 @@ declare const reducers: (state: FlowTemplateDetailState | undefined, action: {
81
83
  labelList: string[];
82
84
  rejectLoading: boolean;
83
85
  withdrawLoading: boolean;
86
+ follow: boolean;
84
87
  };
85
88
  export default reducers;
@@ -10,7 +10,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
10
10
  import { PlatForm, NodeType } from "../../model/flowTemplateDetail/types";
11
11
  import { last } from 'lodash';
12
12
  import { unstable_batchedUpdates } from 'react-dom';
13
- import { queryPanelInfo, queryAllFlowOperateRecord, currentTradeIdJoinWorkOrder, queryMultiNodeAssistantInfo } from "../../model/flowTemplateDetail/api";
13
+ import { message } from 'antd';
14
+ import { queryPanelInfo, queryAllFlowOperateRecord, currentTradeIdJoinWorkOrder, queryMultiNodeAssistantInfo, followOrUnFollow } from "../../model/flowTemplateDetail/api";
14
15
  export var initState = {
15
16
  loading: false,
16
17
  orderBackLoading: false,
@@ -43,12 +44,13 @@ export var initState = {
43
44
  flowTemplateType: '',
44
45
  labelList: [],
45
46
  rejectLoading: false,
46
- withdrawLoading: false
47
+ withdrawLoading: false,
48
+ follow: false
47
49
  };
48
50
  export var fetchPanelInfo = function fetchPanelInfo(params, options) {
49
51
  return /*#__PURE__*/function () {
50
52
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) {
51
- var res, _res$data, _res$data$flowRecordL, _res$data$flowRecordL2, _res$data2, _res$data2$currentNod, _res$data2$currentNod2, _last, _res$data15, _currentNodeDetail$wo, _currentNodeDetail$no, _res$data16, _currentNodeDetail$no2, recordList, _recordList, currentNodeDetail, handlerList, assistants, _res$data17, _currentNodeDetail$no3, assistantRes, _assistantRes$data;
53
+ var res, _res$data, _res$data$flowRecordL, _res$data$flowRecordL2, _res$data2, _res$data2$currentNod, _res$data2$currentNod2, _last, _res$data16, _currentNodeDetail$wo, _currentNodeDetail$no, _res$data17, _currentNodeDetail$no2, recordList, _recordList, currentNodeDetail, handlerList, assistants, _res$data18, _currentNodeDetail$no3, assistantRes, _assistantRes$data;
52
54
  return _regeneratorRuntime().wrap(function _callee$(_context) {
53
55
  while (1) switch (_context.prev = _context.next) {
54
56
  case 0:
@@ -89,7 +91,7 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
89
91
  recordList = (_recordList = recordList) === null || _recordList === void 0 ? void 0 : _recordList.slice(0, -1);
90
92
  }
91
93
  unstable_batchedUpdates(function () {
92
- var _res$data3, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9, _res$data10, _res$data11, _res$data12, _res$data13, _res$data14;
94
+ var _res$data3, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9, _res$data10, _res$data11, _res$data12, _res$data13, _res$data14, _res$data15;
93
95
  dispatch({
94
96
  type: 'setFlowList',
95
97
  payload: recordList || []
@@ -136,21 +138,25 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
136
138
  allShowHideRules: res === null || res === void 0 ? void 0 : (_res$data14 = res.data) === null || _res$data14 === void 0 ? void 0 : _res$data14.allShowHideRules
137
139
  }
138
140
  });
141
+ dispatch({
142
+ type: 'setFollow',
143
+ payload: (res === null || res === void 0 ? void 0 : (_res$data15 = res.data) === null || _res$data15 === void 0 ? void 0 : _res$data15.follow) || false
144
+ });
139
145
  });
140
146
  // 如果
141
- currentNodeDetail = res === null || res === void 0 ? void 0 : (_res$data15 = res.data) === null || _res$data15 === void 0 ? void 0 : _res$data15.currentNodeDetail;
147
+ currentNodeDetail = res === null || res === void 0 ? void 0 : (_res$data16 = res.data) === null || _res$data16 === void 0 ? void 0 : _res$data16.currentNodeDetail;
142
148
  handlerList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo === void 0 ? void 0 : _currentNodeDetail$wo.handlerList;
143
149
  assistants = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no === void 0 ? void 0 : _currentNodeDetail$no.assistants;
144
150
  if (!(Array.isArray(handlerList) && handlerList.length &&
145
151
  // 有处理人
146
152
  !(assistants !== null && assistants !== void 0 && assistants.isAllStaff) && // 不是所有人都能处理,查询能够处理的人
147
- res !== null && res !== void 0 && (_res$data16 = res.data) !== null && _res$data16 !== void 0 && _res$data16.flowTemplateId && currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$no2 = currentNodeDetail.nodeInfo) !== null && _currentNodeDetail$no2 !== void 0 && _currentNodeDetail$no2.id)) {
153
+ res !== null && res !== void 0 && (_res$data17 = res.data) !== null && _res$data17 !== void 0 && _res$data17.flowTemplateId && currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$no2 = currentNodeDetail.nodeInfo) !== null && _currentNodeDetail$no2 !== void 0 && _currentNodeDetail$no2.id)) {
148
154
  _context.next = 17;
149
155
  break;
150
156
  }
151
157
  _context.next = 15;
152
158
  return queryMultiNodeAssistantInfo([{
153
- flowTemplateId: res === null || res === void 0 ? void 0 : (_res$data17 = res.data) === null || _res$data17 === void 0 ? void 0 : _res$data17.flowTemplateId,
159
+ flowTemplateId: res === null || res === void 0 ? void 0 : (_res$data18 = res.data) === null || _res$data18 === void 0 ? void 0 : _res$data18.flowTemplateId,
154
160
  currentNodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.id
155
161
  }]);
156
162
  case 15:
@@ -189,7 +195,7 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
189
195
  export var fetchAllFlowOperateRecord = function fetchAllFlowOperateRecord(params) {
190
196
  return /*#__PURE__*/function () {
191
197
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch) {
192
- var res, _res$data18, list;
198
+ var res, _res$data19, list;
193
199
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
194
200
  while (1) switch (_context2.prev = _context2.next) {
195
201
  case 0:
@@ -203,7 +209,7 @@ export var fetchAllFlowOperateRecord = function fetchAllFlowOperateRecord(params
203
209
  case 4:
204
210
  res = _context2.sent;
205
211
  if (res.success) {
206
- list = res === null || res === void 0 ? void 0 : (_res$data18 = res.data) === null || _res$data18 === void 0 ? void 0 : _res$data18.map(function (item) {
212
+ list = res === null || res === void 0 ? void 0 : (_res$data19 = res.data) === null || _res$data19 === void 0 ? void 0 : _res$data19.map(function (item) {
207
213
  return _objectSpread(_objectSpread({}, item), {}, {
208
214
  time: (item === null || item === void 0 ? void 0 : item.created) || '',
209
215
  operator: (item === null || item === void 0 ? void 0 : item.operator) || '',
@@ -244,7 +250,7 @@ export var fetchAllFlowOperateRecord = function fetchAllFlowOperateRecord(params
244
250
  export var fetchCurrentTradeIdLinkWorkOrder = function fetchCurrentTradeIdLinkWorkOrder(params) {
245
251
  return /*#__PURE__*/function () {
246
252
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch) {
247
- var res, _res$data19, _res$data20, total, list;
253
+ var res, _res$data20, _res$data21, total, list;
248
254
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
249
255
  while (1) switch (_context3.prev = _context3.next) {
250
256
  case 0:
@@ -258,8 +264,8 @@ export var fetchCurrentTradeIdLinkWorkOrder = function fetchCurrentTradeIdLinkWo
258
264
  case 4:
259
265
  res = _context3.sent;
260
266
  if (res.success) {
261
- total = (res === null || res === void 0 ? void 0 : (_res$data19 = res.data) === null || _res$data19 === void 0 ? void 0 : _res$data19.total) || 0;
262
- list = (res === null || res === void 0 ? void 0 : (_res$data20 = res.data) === null || _res$data20 === void 0 ? void 0 : _res$data20.list) || [];
267
+ total = (res === null || res === void 0 ? void 0 : (_res$data20 = res.data) === null || _res$data20 === void 0 ? void 0 : _res$data20.total) || 0;
268
+ list = (res === null || res === void 0 ? void 0 : (_res$data21 = res.data) === null || _res$data21 === void 0 ? void 0 : _res$data21.list) || [];
263
269
  dispatch({
264
270
  type: 'setCurrentTradeIdWOrkOrderNumber',
265
271
  payload: {
@@ -292,105 +298,156 @@ export var fetchCurrentTradeIdLinkWorkOrder = function fetchCurrentTradeIdLinkWo
292
298
  };
293
299
  }();
294
300
  };
295
- export var setNodeAssistantInfo = function setNodeAssistantInfo(state, _ref4) {
296
- var payload = _ref4.payload;
297
- state.assistantMap = _objectSpread(_objectSpread({}, state.assistantMap), payload);
301
+ export var fetchCollectOrder = function fetchCollectOrder(params) {
302
+ return /*#__PURE__*/function () {
303
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dispatch) {
304
+ var res;
305
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
306
+ while (1) switch (_context4.prev = _context4.next) {
307
+ case 0:
308
+ _context4.prev = 0;
309
+ dispatch({
310
+ type: 'setLoading',
311
+ payload: true
312
+ });
313
+ _context4.next = 4;
314
+ return followOrUnFollow(params);
315
+ case 4:
316
+ res = _context4.sent;
317
+ if (res.success) {
318
+ message.success(params.follow ? '关注成功' : '取消关注成功');
319
+ dispatch({
320
+ type: 'setFollow',
321
+ payload: params.follow
322
+ });
323
+ }
324
+ _context4.next = 11;
325
+ break;
326
+ case 8:
327
+ _context4.prev = 8;
328
+ _context4.t0 = _context4["catch"](0);
329
+ console.error(_context4.t0);
330
+ case 11:
331
+ _context4.prev = 11;
332
+ dispatch({
333
+ type: 'setLoading',
334
+ payload: false
335
+ });
336
+ return _context4.finish(11);
337
+ case 14:
338
+ case "end":
339
+ return _context4.stop();
340
+ }
341
+ }, _callee4, null, [[0, 8, 11, 14]]);
342
+ }));
343
+ return function (_x4) {
344
+ return _ref4.apply(this, arguments);
345
+ };
346
+ }();
298
347
  };
299
- export var setLoading = function setLoading(state, _ref5) {
348
+ export var setNodeAssistantInfo = function setNodeAssistantInfo(state, _ref5) {
300
349
  var payload = _ref5.payload;
301
- state.loading = payload;
350
+ state.assistantMap = _objectSpread(_objectSpread({}, state.assistantMap), payload);
302
351
  };
303
- export var setOrderBackLoading = function setOrderBackLoading(state, _ref6) {
352
+ export var setLoading = function setLoading(state, _ref6) {
304
353
  var payload = _ref6.payload;
305
- state.orderBackLoading = payload;
354
+ state.loading = payload;
306
355
  };
307
- export var setFlowList = function setFlowList(state, _ref7) {
356
+ export var setOrderBackLoading = function setOrderBackLoading(state, _ref7) {
308
357
  var payload = _ref7.payload;
309
- state.flowList = payload;
358
+ state.orderBackLoading = payload;
310
359
  };
311
- export var setTid = function setTid(state, _ref8) {
360
+ export var setFlowList = function setFlowList(state, _ref8) {
312
361
  var payload = _ref8.payload;
313
- state.tid = payload;
362
+ state.flowList = payload;
314
363
  };
315
- export var setShopUniqueKey = function setShopUniqueKey(state, _ref9) {
364
+ export var setTid = function setTid(state, _ref9) {
316
365
  var payload = _ref9.payload;
317
- state.shopUniqueKey = payload;
366
+ state.tid = payload;
318
367
  };
319
- export var setRemarkList = function setRemarkList(state, _ref10) {
368
+ export var setShopUniqueKey = function setShopUniqueKey(state, _ref10) {
320
369
  var payload = _ref10.payload;
321
- state.remarkList = payload;
370
+ state.shopUniqueKey = payload;
322
371
  };
323
- export var setCurrentNode = function setCurrentNode(state, _ref11) {
372
+ export var setRemarkList = function setRemarkList(state, _ref11) {
324
373
  var payload = _ref11.payload;
325
- state.currentNode = payload;
374
+ state.remarkList = payload;
326
375
  };
327
- export var setAction = function setAction(state, _ref12) {
376
+ export var setCurrentNode = function setCurrentNode(state, _ref12) {
328
377
  var payload = _ref12.payload;
329
- state.action = payload;
378
+ state.currentNode = payload;
330
379
  };
331
- export var setVisibleRemarkList = function setVisibleRemarkList(state, _ref13) {
380
+ export var setAction = function setAction(state, _ref13) {
332
381
  var payload = _ref13.payload;
333
- state.visibleRemarkList = payload;
382
+ state.action = payload;
334
383
  };
335
- export var setPlat = function setPlat(state, _ref14) {
384
+ export var setVisibleRemarkList = function setVisibleRemarkList(state, _ref14) {
336
385
  var payload = _ref14.payload;
337
- state.plat = payload;
386
+ state.visibleRemarkList = payload;
338
387
  };
339
- export var setOperateParams = function setOperateParams(state, _ref15) {
388
+ export var setPlat = function setPlat(state, _ref15) {
340
389
  var payload = _ref15.payload;
341
- state.operateParams = payload;
390
+ state.plat = payload;
342
391
  };
343
- export var setAddRemarkVisible = function setAddRemarkVisible(state, _ref16) {
392
+ export var setOperateParams = function setOperateParams(state, _ref16) {
344
393
  var payload = _ref16.payload;
345
- state.addRemarkVisible = payload;
394
+ state.operateParams = payload;
346
395
  };
347
- export var setFlowStatus = function setFlowStatus(state, _ref17) {
396
+ export var setAddRemarkVisible = function setAddRemarkVisible(state, _ref17) {
348
397
  var payload = _ref17.payload;
349
- state.flowStatus = payload;
398
+ state.addRemarkVisible = payload;
350
399
  };
351
- export var setFlowTemplateId = function setFlowTemplateId(state, _ref18) {
400
+ export var setFlowStatus = function setFlowStatus(state, _ref18) {
352
401
  var payload = _ref18.payload;
353
- state.flowTemplateId = payload;
402
+ state.flowStatus = payload;
354
403
  };
355
- export var setCurrentTradeIdWOrkOrderNumber = function setCurrentTradeIdWOrkOrderNumber(state, _ref19) {
404
+ export var setFlowTemplateId = function setFlowTemplateId(state, _ref19) {
356
405
  var payload = _ref19.payload;
357
- state.currentTradeIdLinkWorkOrder = payload;
406
+ state.flowTemplateId = payload;
358
407
  };
359
- export var setCurrentFlowAllShowHideRules = function setCurrentFlowAllShowHideRules(state, _ref20) {
408
+ export var setCurrentTradeIdWOrkOrderNumber = function setCurrentTradeIdWOrkOrderNumber(state, _ref20) {
360
409
  var payload = _ref20.payload;
361
- state.currentFlowAllShowHideRules = payload;
410
+ state.currentTradeIdLinkWorkOrder = payload;
362
411
  };
363
- export var setWithdrawWorkOrderDetail = function setWithdrawWorkOrderDetail(state, _ref21) {
412
+ export var setCurrentFlowAllShowHideRules = function setCurrentFlowAllShowHideRules(state, _ref21) {
364
413
  var payload = _ref21.payload;
414
+ state.currentFlowAllShowHideRules = payload;
415
+ };
416
+ export var setWithdrawWorkOrderDetail = function setWithdrawWorkOrderDetail(state, _ref22) {
417
+ var payload = _ref22.payload;
365
418
  state.withdrawWorkOrderDetail = payload;
366
419
  };
367
- export var setClearStore = function setClearStore(state, _ref22) {
420
+ export var setClearStore = function setClearStore(state, _ref23) {
368
421
  var _Object$keys;
369
- var payload = _ref22.payload;
422
+ var payload = _ref23.payload;
370
423
  (_Object$keys = Object.keys(initState)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (key) {
371
424
  // @ts-ignore
372
425
  state[key] = initState[key];
373
426
  });
374
427
  };
375
- export var setFlowTemplateType = function setFlowTemplateType(state, _ref23) {
376
- var payload = _ref23.payload;
428
+ export var setFlowTemplateType = function setFlowTemplateType(state, _ref24) {
429
+ var payload = _ref24.payload;
377
430
  state.flowTemplateType = payload;
378
431
  };
379
- export var setLabelList = function setLabelList(state, _ref24) {
380
- var payload = _ref24.payload;
432
+ export var setLabelList = function setLabelList(state, _ref25) {
433
+ var payload = _ref25.payload;
381
434
  state.labelList = payload;
382
435
  };
383
436
  export var clearLabelList = function clearLabelList(state) {
384
437
  state.labelList = [];
385
438
  };
386
- export var setRejectLoading = function setRejectLoading(state, _ref25) {
387
- var payload = _ref25.payload;
439
+ export var setRejectLoading = function setRejectLoading(state, _ref26) {
440
+ var payload = _ref26.payload;
388
441
  state.rejectLoading = payload;
389
442
  };
390
- export var setWithDrawLoading = function setWithDrawLoading(state, _ref26) {
391
- var payload = _ref26.payload;
443
+ export var setWithDrawLoading = function setWithDrawLoading(state, _ref27) {
444
+ var payload = _ref27.payload;
392
445
  state.withdrawLoading = payload;
393
446
  };
447
+ export var setFollow = function setFollow(state, _ref28) {
448
+ var payload = _ref28.payload;
449
+ state.follow = payload;
450
+ };
394
451
  var reducerMap = {
395
452
  setNodeAssistantInfo: setNodeAssistantInfo,
396
453
  setLoading: setLoading,
@@ -415,7 +472,8 @@ var reducerMap = {
415
472
  setLabelList: setLabelList,
416
473
  clearLabelList: clearLabelList,
417
474
  setRejectLoading: setRejectLoading,
418
- setWithDrawLoading: setWithDrawLoading
475
+ setWithDrawLoading: setWithDrawLoading,
476
+ setFollow: setFollow
419
477
  };
420
478
  var reducers = function reducers() {
421
479
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initState;
@@ -251,3 +251,4 @@ export declare const selectFlowTemplateType: (state: FlowTemplateDetailState) =>
251
251
  export declare const selectLabelList: (state: FlowTemplateDetailState) => string[];
252
252
  export declare const selectRejectLoading: (state: FlowTemplateDetailState) => boolean;
253
253
  export declare const selectWithDrawLoading: (state: FlowTemplateDetailState) => boolean;
254
+ export declare const selectFollow: (state: FlowTemplateDetailState) => boolean;
@@ -64,4 +64,7 @@ export var selectRejectLoading = function selectRejectLoading(state) {
64
64
  };
65
65
  export var selectWithDrawLoading = function selectWithDrawLoading(state) {
66
66
  return state.withdrawLoading;
67
+ };
68
+ export var selectFollow = function selectFollow(state) {
69
+ return state.follow;
67
70
  };
@@ -242,6 +242,10 @@ export var SUBMIT_COMPONENT_GOODS_MAP = {
242
242
  JST_GOODS: {
243
243
  type: 'jstGoods',
244
244
  shopCode: 'shopCode'
245
+ },
246
+ KM_GOODS: {
247
+ type: 'kmGoods',
248
+ shopCode: 'shopCode'
245
249
  }
246
250
  };
247
251
  export var SUBMIT_COMPONENT_REISSUE_MAP = {
@@ -417,7 +417,7 @@ var handleLogisticsTrajectory = function handleLogisticsTrajectory(_ref32) {
417
417
  var addContent = _ref32.addContent,
418
418
  getNowData = _ref32.getNowData;
419
419
  return function (item) {
420
- ['trajectoryCompany', 'trajectoryCode', 'trajectorySnapshot', 'trajectoryPhone'].map(function (key) {
420
+ ['trajectoryCompany', 'trajectoryCode', 'trajectorySnapshot', 'trajectoryApiStatus', 'trajectoryPhone'].map(function (key) {
421
421
  addContent(key, getNowData("".concat(item.uniqueKey, ".").concat(key), ''));
422
422
  });
423
423
  };
@@ -882,6 +882,7 @@ var processComponent = function processComponent(_ref53) {
882
882
  case 'BS_E3_GOODS':
883
883
  case 'GY_GOODS':
884
884
  case 'JST_GOODS':
885
+ case 'KM_GOODS':
885
886
  wrapFn(handleErpGoods);
886
887
  break;
887
888
  case 'BS_EXCHANGE_GOODS':
@@ -400,6 +400,10 @@ export var orderBack = /*#__PURE__*/function () {
400
400
  sendId: '',
401
401
  sendName: ''
402
402
  }];
403
+ kmInfo.kmGoods = _objectSpread(_objectSpread({}, kmInfo.kmGoods), {}, {
404
+ kmGoods: [],
405
+ orders: []
406
+ });
403
407
  }
404
408
  if (jstOrders !== null && jstOrders !== void 0 && jstOrders.orderList && jstOrders.orderList.length > 1) {
405
409
  jstInfo.jstGoods = _objectSpread(_objectSpread({}, jstInfo.jstGoods), {}, {
@@ -940,6 +944,10 @@ export var reversalFormValues = function reversalFormValues() {
940
944
  case 'WDT_SHOP':
941
945
  prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey];
942
946
  break;
947
+ case 'KM_GOODS':
948
+ prv["".concat(next.uniqueKey, "_kmGoods")] = JSON.stringify(values[next.uniqueKey]['_kmGoods']);
949
+ prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
950
+ break;
943
951
  }
944
952
  return prv;
945
953
  }, {});
@@ -1054,7 +1062,7 @@ export var kmSystemOrderBackValues = function kmSystemOrderBackValues(_ref9) {
1054
1062
  //如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
1055
1063
  if (!(value !== null && value !== void 0 && value.selectedRows)) return;
1056
1064
  var kmGoodsComponent = (_templateList$compone5 = templateList.componentDtoList) === null || _templateList$compone5 === void 0 ? void 0 : _templateList$compone5.filter(function (item) {
1057
- return ['KM_SEND_GOOD', 'KM_LOGISTICS'].includes(item.workOrderComponentType) && !item.notOrderBack;
1065
+ return ['KM_GOODS', 'KM_SEND_GOOD', 'KM_LOGISTICS'].includes(item.workOrderComponentType) && !item.notOrderBack;
1058
1066
  });
1059
1067
  if (!(kmGoodsComponent !== null && kmGoodsComponent !== void 0 && kmGoodsComponent.length)) return;
1060
1068
  var tIdCom = (_templateList$compone6 = templateList.componentDtoList) === null || _templateList$compone6 === void 0 ? void 0 : _templateList$compone6.find(function (item) {
@@ -4,7 +4,7 @@ import { servers } from '@kmkf-fe-packages/kmkf-utils';
4
4
  var orderBackKeyListMap = {
5
5
  hasJst: ['JST_SYSTEM_ORDER', 'JST_GOODS', 'JST_REISSUE_GOODS', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD'],
6
6
  hasBs: ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING', 'BS_SYSTEM_ORDER', 'BS_DELIVERY_NO'],
7
- hasKm: ['KM_SYSTEM_ORDER', 'KM_LOGISTICS'],
7
+ hasKm: ['KM_SYSTEM_ORDER', 'KM_LOGISTICS', 'KM_GOODS'],
8
8
  hasWdt: ['WDT_SYSTEM_ORDER', 'WDT_GOODS', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_REISSUE_GOODS', 'WDT_SHOP'],
9
9
  hasBsE3: ['BS_E3_SYSTEM_ORDER', 'BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_LOGISTICS', 'BS_E3_SEND_GOOD'],
10
10
  hasWln: ['WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'],
@@ -279,9 +279,9 @@ var processLogisticsInterceptionMore = function processLogisticsInterceptionMore
279
279
  };
280
280
  var processLogisticsTrajectory = function processLogisticsTrajectory(getValue) {
281
281
  return function (nex, config) {
282
- var subFields = ['trajectoryCompany', 'trajectoryCode', 'trajectorySnapshot', 'trajectoryPhone'];
282
+ var subFields = ['trajectoryCompany', 'trajectoryCode', 'trajectorySnapshot', 'trajectoryPhone', 'trajectoryApiStatus'];
283
283
  var map = subFields.reduce(function (cur, nxt) {
284
- return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
284
+ return nxt === 'trajectoryApiStatus' ? _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, nxt, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_trajectoryApiStatus")), {}))) : _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, nxt, getValue("".concat(nex.uniqueKey, "_").concat(nxt))));
285
285
  }, {});
286
286
  return _defineProperty({}, nex.uniqueKey, map);
287
287
  };
@@ -598,6 +598,33 @@ var processJstGoods = function processJstGoods(templateColumns) {
598
598
  };
599
599
  };
600
600
  };
601
+ var processKmGoods = function processKmGoods(templateColumns) {
602
+ return function (getValue) {
603
+ return function (nex, config) {
604
+ var _values = {
605
+ kmGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_kmGoods")), []),
606
+ shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
607
+ };
608
+ var selectIds = [];
609
+ var orderNo = '';
610
+ var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
611
+ return col.workOrderComponentType === 'TRADE_ID_INPUT';
612
+ });
613
+ if (tradeId) {
614
+ orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
615
+ }
616
+ var kmSystemOrder = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
617
+ return col.workOrderComponentType === 'KM_SYSTEM_ORDER';
618
+ });
619
+ if (kmSystemOrder) {
620
+ selectIds = jsonParseSecurity(getValue("".concat(kmSystemOrder.uniqueKey, "_").concat(systemOrderMap[kmSystemOrder.workOrderComponentType].ids)), []);
621
+ }
622
+ _values.selectIds = selectIds;
623
+ _values.orderNo = orderNo;
624
+ return _defineProperty({}, nex.uniqueKey, _values);
625
+ };
626
+ };
627
+ };
601
628
  var processGyGoods = function processGyGoods(templateColumns) {
602
629
  return function (getValue) {
603
630
  return function (nex, config) {
@@ -935,14 +962,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
935
962
  };
936
963
  var processLabel = function processLabel(getValue) {
937
964
  return function (nex, config) {
938
- var _ref65;
939
- return _ref65 = {}, _defineProperty(_ref65, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref65, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref65;
965
+ var _ref66;
966
+ return _ref66 = {}, _defineProperty(_ref66, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref66, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref66;
940
967
  };
941
968
  };
942
969
  var processMemberLevel = function processMemberLevel(getValue) {
943
970
  return function (nex, config) {
944
- var _ref66;
945
- return _ref66 = {}, _defineProperty(_ref66, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref66, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref66;
971
+ var _ref67;
972
+ return _ref67 = {}, _defineProperty(_ref67, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref67, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref67;
946
973
  };
947
974
  };
948
975
  var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
@@ -1054,6 +1081,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1054
1081
  WDT_GOODS: processWdtGoods(templateColumns),
1055
1082
  BS_E3_GOODS: processBsE3Goods(templateColumns),
1056
1083
  GY_GOODS: processGyGoods(templateColumns),
1084
+ KM_GOODS: processKmGoods(templateColumns),
1057
1085
  JST_GOODS: processJstGoods(templateColumns),
1058
1086
  BS_REISSUE_GOODS: processBsReissueGoods,
1059
1087
  BS_EXCHANGE_GOODS: processBsExchangeGoods,
@@ -84,3 +84,4 @@ export declare const queryIntersectionPreNodes: (data: any) => Promise<serverPro
84
84
  export declare const restartAutoTask: (data: any) => Promise<serverProps<any>>;
85
85
  export declare const queryFlowReturnResult: (data: any) => Promise<serverProps<any>>;
86
86
  export declare const queryFlowFail: (data: any) => Promise<serverProps<any>>;
87
+ export declare const followOrUnFollow: (data: any) => Promise<serverProps<any>>;
@@ -200,4 +200,13 @@ export var queryFlowFail = function queryFlowFail(data) {
200
200
  method: 'post',
201
201
  data: data
202
202
  });
203
+ };
204
+
205
+ //关注 / 取消关注流程;
206
+ export var followOrUnFollow = function followOrUnFollow(data) {
207
+ return request({
208
+ url: '/qy/flow/operate/followOrUnFollow',
209
+ method: 'post',
210
+ data: data
211
+ });
203
212
  };
@@ -73,6 +73,7 @@ export interface FlowTemplateDetailState {
73
73
  labelList: Array<string>;
74
74
  rejectLoading: boolean;
75
75
  withdrawLoading: boolean;
76
+ follow: boolean;
76
77
  }
77
78
  export interface QyFlowPanelInfoRequest {
78
79
  /**
@@ -90,3 +90,4 @@ export declare const queryMemberLevel: (data: {
90
90
  tid: string;
91
91
  }) => Promise<serverProps<Array<string>>>;
92
92
  export declare const queryShopByTid: (data: any) => Promise<any>;
93
+ export declare const queryTidByOutSid: (data: any) => Promise<any>;
@@ -586,4 +586,12 @@ export var queryShopByTid = function queryShopByTid(data) {
586
586
  method: 'post',
587
587
  data: data
588
588
  });
589
+ };
590
+ //通过物流单号获取订单号
591
+ export var queryTidByOutSid = function queryTidByOutSid(data) {
592
+ return request({
593
+ url: '/qy/gdfw/order/queryTidByOutSid',
594
+ method: 'post',
595
+ data: data
596
+ });
589
597
  };
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.63",
3
+ "version": "2.0.65",
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.63",
36
- "@kmkf-fe-packages/kmkf-utils": "2.0.63",
37
- "@kmkf-fe-packages/services-components": "2.0.63",
35
+ "@kmkf-fe-packages/basic-components": "2.0.65",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.0.65",
37
+ "@kmkf-fe-packages/services-components": "2.0.65",
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": "a6618afd20337b47d38f8705307d746c73e07fdb",
76
+ "gitHead": "15f16ebf734a616f09c15fa589a4124cdc909f95",
77
77
  "gitHooks": {
78
78
  "pre-commit": "lint-staged"
79
79
  }