@kmkf-fe-packages/kmkf-work-order-service-component 2.2.44-beta.54 → 2.2.44-beta.55
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/esm/FlowTemplateDetailV2/store/selector.d.ts +1 -0
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +22 -1
- package/dist/esm/WorkOrder/index.js +71 -9
- package/dist/esm/WorkOrder/index.less +15 -0
- package/dist/esm/model/customizeWorkOrder/index.d.ts +2 -1
- package/dist/esm/model/customizeWorkOrder/index.js +88 -44
- package/dist/esm/model/customizeWorkOrder/selector.d.ts +13 -0
- package/dist/esm/model/customizeWorkOrder/selector.js +3 -0
- package/dist/esm/model/customizeWorkOrder/types.d.ts +1 -0
- package/dist/esm/model/logicFlow/index.js +2 -1
- package/dist/esm/model/servers/api.d.ts +1 -0
- package/dist/esm/model/servers/api.js +7 -0
- package/package.json +3 -3
|
@@ -236,6 +236,7 @@ export declare const selectCurrentNodeDetail: (state: FlowTemplateDetailState) =
|
|
|
236
236
|
}[];
|
|
237
237
|
} | undefined;
|
|
238
238
|
} | undefined;
|
|
239
|
+
uniqueKey: string;
|
|
239
240
|
} | undefined;
|
|
240
241
|
} | undefined;
|
|
241
242
|
export declare const selectTid: (state: FlowTemplateDetailState) => string;
|
|
@@ -22,7 +22,7 @@ import { last } from 'lodash';
|
|
|
22
22
|
import moment from 'moment';
|
|
23
23
|
import { useAppSelector, useAppDispatch } from "../../../model/hooks";
|
|
24
24
|
import { fetchCompanyUserList, setFormModalVisible, setCurrentCustomizeRecord, setCurrentBuyerChecked, setLogicFlowId, setFlowWorkOrderId, setWorkOrderProcessStatus } from "../../../model/customizeWorkOrder";
|
|
25
|
-
import { selectorCurrentBuyerChecked, selectorFormModalVisible, selectorCurrentCustomizeRecord, selectorLogicFlowId, selectorCompanyUserList, selectorFlowWorkOrderId } from "../../../model/customizeWorkOrder/selector";
|
|
25
|
+
import { selectorCurrentBuyerChecked, selectorFormModalVisible, selectorCurrentCustomizeRecord, selectorLogicFlowId, selectorCompanyUserList, selectorFlowWorkOrderId, selectFeatureConfig } from "../../../model/customizeWorkOrder/selector";
|
|
26
26
|
import { selectFlowList, selectFlowTemplateGroupWorkOrderTemplateList } from "../../../model/logicFlow/selector";
|
|
27
27
|
import CustomizeWorkOrderCard from "./components/CustomizeWorkOrderCard/index";
|
|
28
28
|
import LogicFlowList from "./components/LogicFlowList";
|
|
@@ -191,6 +191,10 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
191
191
|
var hasSuperAdminRole = useAppSelector(function (state) {
|
|
192
192
|
return state.workOrder.userInfo.hasSuperAdminRole;
|
|
193
193
|
});
|
|
194
|
+
var quotaInfo = useAppSelector(function (state) {
|
|
195
|
+
var _state$workOrder$user;
|
|
196
|
+
return (_state$workOrder$user = state.workOrder.userInfo) === null || _state$workOrder$user === void 0 ? void 0 : _state$workOrder$user.quotaInfo;
|
|
197
|
+
});
|
|
194
198
|
var platformInfo = useAppSelector(function (state) {
|
|
195
199
|
return state.global.platformInfo;
|
|
196
200
|
});
|
|
@@ -200,6 +204,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
200
204
|
var formRenderVisible = useSelector(selectorFormModalVisible);
|
|
201
205
|
var record = useSelector(selectorCurrentCustomizeRecord);
|
|
202
206
|
var useList = useSelector(selectorCompanyUserList);
|
|
207
|
+
var featureConfig = useSelector(selectFeatureConfig);
|
|
203
208
|
var buyerNick = platformInfo.buyerNick,
|
|
204
209
|
buyerId = platformInfo.buyerId,
|
|
205
210
|
platform = platformInfo.platform,
|
|
@@ -566,8 +571,24 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
566
571
|
queryPanelInfoHandle(record);
|
|
567
572
|
};
|
|
568
573
|
var handleCreateWorkOrderByFlowId = function handleCreateWorkOrderByFlowId(_ref7) {
|
|
574
|
+
var _allLogicFlowList$fin;
|
|
569
575
|
var logicFlowId = _ref7.id,
|
|
570
576
|
name = _ref7.name;
|
|
577
|
+
var _ref8 = featureConfig || {},
|
|
578
|
+
generalSingle = _ref8.generalSingle,
|
|
579
|
+
generalMulti = _ref8.generalMulti;
|
|
580
|
+
var templateType = ((_allLogicFlowList$fin = allLogicFlowList.find(function (item) {
|
|
581
|
+
return item.key === logicFlowId;
|
|
582
|
+
})) === null || _allLogicFlowList$fin === void 0 ? void 0 : _allLogicFlowList$fin.type) || '';
|
|
583
|
+
if (templateType === 'SINGLE_PAGE' && !generalSingle) {
|
|
584
|
+
return message.warning('通用工单-单页面未开通,请联系实施人员');
|
|
585
|
+
}
|
|
586
|
+
if (templateType === 'MULTI_NODE' && !generalMulti) {
|
|
587
|
+
return message.warning('通用工单-多节点未开通,请联系实施人员');
|
|
588
|
+
}
|
|
589
|
+
if ((quotaInfo === null || quotaInfo === void 0 ? void 0 : quotaInfo.workOrderTotal) > 0 && (quotaInfo === null || quotaInfo === void 0 ? void 0 : quotaInfo.workOrderRemain) < 1) {
|
|
590
|
+
return message.warning('工单条数已达限,无法新建工单,请联系实施人员');
|
|
591
|
+
}
|
|
571
592
|
setTitle(name);
|
|
572
593
|
dispatch(setLogicFlowId(logicFlowId));
|
|
573
594
|
dispatch(setFlowWorkOrderId(''));
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
6
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -20,7 +24,7 @@ import { Provider } from 'react-redux';
|
|
|
20
24
|
import { useAppSelector, useAppDispatch } from "../model/hooks";
|
|
21
25
|
import { fetchQueryCurrentCompanyUser } from "../model/workOrder";
|
|
22
26
|
import { fetchLogicFlowList } from "../model/logicFlow";
|
|
23
|
-
import { showPayment } from "../model/customizeWorkOrder";
|
|
27
|
+
import { showPayment, fetchFeatureConfigList } from "../model/customizeWorkOrder";
|
|
24
28
|
import store from "../model/store";
|
|
25
29
|
import { fetchLogOut, fetchxzLogOut } from "../model/login";
|
|
26
30
|
import { Global } from '@kmkf-fe-packages/services-components';
|
|
@@ -34,6 +38,7 @@ import CustomerServiceToDoList from "../CustomerServiceToDoList";
|
|
|
34
38
|
import CustomerServiceToDoCard from "./components/CustomerServiceToDoCard";
|
|
35
39
|
import { getHashParams } from "../common/utils/tools";
|
|
36
40
|
import xzSDK from "../common/utils/xzSDK";
|
|
41
|
+
import { platformMap } from "../common/utils/constant";
|
|
37
42
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
38
43
|
import 'moment/locale/zh-cn';
|
|
39
44
|
import { PlatForm } from "./types";
|
|
@@ -74,9 +79,13 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
74
79
|
var _state$customizeWorkO;
|
|
75
80
|
return (_state$customizeWorkO = state.customizeWorkOrder) === null || _state$customizeWorkO === void 0 ? void 0 : _state$customizeWorkO.showPayment;
|
|
76
81
|
});
|
|
77
|
-
var
|
|
82
|
+
var featureConfig = useAppSelector(function (state) {
|
|
78
83
|
var _state$customizeWorkO2;
|
|
79
|
-
return (_state$customizeWorkO2 = state.customizeWorkOrder) === null || _state$customizeWorkO2 === void 0 ? void 0 : _state$customizeWorkO2.
|
|
84
|
+
return (_state$customizeWorkO2 = state.customizeWorkOrder) === null || _state$customizeWorkO2 === void 0 ? void 0 : _state$customizeWorkO2.featureConfig;
|
|
85
|
+
});
|
|
86
|
+
var customerServiceToDoListOpen = useAppSelector(function (state) {
|
|
87
|
+
var _state$customizeWorkO3;
|
|
88
|
+
return (_state$customizeWorkO3 = state.customizeWorkOrder) === null || _state$customizeWorkO3 === void 0 ? void 0 : _state$customizeWorkO3.customerServiceToDoListOpen;
|
|
80
89
|
});
|
|
81
90
|
var companyUserConfig = useAppSelector(function (state) {
|
|
82
91
|
var _state$workOrder$user;
|
|
@@ -151,6 +160,7 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
151
160
|
dispatch(fetchLogicFlowList);
|
|
152
161
|
dispatch(fetchQueryCurrentCompanyUser());
|
|
153
162
|
dispatch(showPayment);
|
|
163
|
+
dispatch(fetchFeatureConfigList);
|
|
154
164
|
//工单通AI智能工单功能,监听消息
|
|
155
165
|
if (platform === PlatForm.XIAOZHI) {
|
|
156
166
|
xzSDK.receiveTabMsg(dispatch);
|
|
@@ -193,7 +203,7 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
193
203
|
})) === null || _find === void 0 ? void 0 : _find.uniqueKey;
|
|
194
204
|
}, [shopList, shopId]);
|
|
195
205
|
var RenderInfo = function RenderInfo() {
|
|
196
|
-
var _userInfo$
|
|
206
|
+
var _userInfo$quotaInfo, _userInfo$quotaInfo2, _userInfo$quotaInfo3, _userInfo$quotaInfo4, _userInfo$quotaInfo5, _userInfo$quotaInfo6, _userInfo$quotaInfo7, _userInfo$quotaInfo8, _userInfo$quotaInfo9, _userInfo$quotaInfo10, _userInfo$quotaInfo11, _userInfo$quotaInfo12, _userInfo$quotaInfo13;
|
|
197
207
|
var loginOutHandle = function loginOutHandle() {
|
|
198
208
|
setVisible(false);
|
|
199
209
|
Modal.confirm({
|
|
@@ -237,17 +247,69 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
237
247
|
className: "infoColor"
|
|
238
248
|
}, userInfo === null || userInfo === void 0 ? void 0 : userInfo.account)), /*#__PURE__*/React.createElement("div", {
|
|
239
249
|
className: "infoBox"
|
|
240
|
-
}, "\
|
|
250
|
+
}, "\u5230\u671F\u65F6\u95F4:", ' ', /*#__PURE__*/React.createElement("span", {
|
|
241
251
|
className: "infoColor"
|
|
242
|
-
}, userInfo === null || userInfo === void 0 ? void 0 :
|
|
252
|
+
}, moment(userInfo === null || userInfo === void 0 ? void 0 : userInfo.subscribeDeadline, 'YYYY-MM-DD').format('YYYY-MM-DD'))), (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo = userInfo.quotaInfo) === null || _userInfo$quotaInfo === void 0 ? void 0 : _userInfo$quotaInfo.workOrderTotal) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
243
253
|
className: "infoBox"
|
|
244
|
-
}, "\
|
|
254
|
+
}, "\u5DE5\u5355\u6761\u6570:", /*#__PURE__*/React.createElement("span", {
|
|
255
|
+
className: "infoColor"
|
|
256
|
+
}, "\u5DF2\u7528\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo2 = userInfo.quotaInfo) === null || _userInfo$quotaInfo2 === void 0 ? void 0 : _userInfo$quotaInfo2.workOrderUsed) || 0, "/").concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo3 = userInfo.quotaInfo) === null || _userInfo$quotaInfo3 === void 0 ? void 0 : _userInfo$quotaInfo3.workOrderTotal) || 0), ' ', "\u5269\u4F59\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo4 = userInfo.quotaInfo) === null || _userInfo$quotaInfo4 === void 0 ? void 0 : _userInfo$quotaInfo4.workOrderRemain) || 0))) : null, /*#__PURE__*/React.createElement("div", {
|
|
257
|
+
className: "infoBox"
|
|
258
|
+
}, "\u5E97\u94FA\u6570:", /*#__PURE__*/React.createElement("span", {
|
|
259
|
+
className: "infoColor"
|
|
260
|
+
}, "\u5DF2\u7528\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo5 = userInfo.quotaInfo) === null || _userInfo$quotaInfo5 === void 0 ? void 0 : _userInfo$quotaInfo5.shopUsed) || 0, "/").concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo6 = userInfo.quotaInfo) === null || _userInfo$quotaInfo6 === void 0 ? void 0 : _userInfo$quotaInfo6.shopTotal) || 0), ", \u5269\u4F59\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo7 = userInfo.quotaInfo) === null || _userInfo$quotaInfo7 === void 0 ? void 0 : _userInfo$quotaInfo7.shopRemain) || 0))), /*#__PURE__*/React.createElement("div", {
|
|
261
|
+
className: "infoBox"
|
|
262
|
+
}, "\u8D26\u53F7\u6570:", /*#__PURE__*/React.createElement("span", {
|
|
245
263
|
className: "infoColor"
|
|
246
|
-
},
|
|
264
|
+
}, "\u5DF2\u7528\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo8 = userInfo.quotaInfo) === null || _userInfo$quotaInfo8 === void 0 ? void 0 : _userInfo$quotaInfo8.userUsed) || 0, "/").concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo9 = userInfo.quotaInfo) === null || _userInfo$quotaInfo9 === void 0 ? void 0 : _userInfo$quotaInfo9.userTotal) || 0), ", \u5269\u4F59\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo10 = userInfo.quotaInfo) === null || _userInfo$quotaInfo10 === void 0 ? void 0 : _userInfo$quotaInfo10.userRemain) || 0))), /*#__PURE__*/React.createElement("div", {
|
|
265
|
+
className: "infoBox"
|
|
266
|
+
}, "RPA\u673A\u5668\u4EBA\u6570:", /*#__PURE__*/React.createElement("span", {
|
|
267
|
+
className: "infoColor"
|
|
268
|
+
}, "\u5DF2\u7528\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo11 = userInfo.quotaInfo) === null || _userInfo$quotaInfo11 === void 0 ? void 0 : _userInfo$quotaInfo11.rpaUsed) || 0, "/").concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo12 = userInfo.quotaInfo) === null || _userInfo$quotaInfo12 === void 0 ? void 0 : _userInfo$quotaInfo12.rpaTotal) || 0), ", \u5269\u4F59\uFF1A", "".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo13 = userInfo.quotaInfo) === null || _userInfo$quotaInfo13 === void 0 ? void 0 : _userInfo$quotaInfo13.rpaRemain) || 0))), /*#__PURE__*/React.createElement("div", {
|
|
247
269
|
className: "loginOut infoBox",
|
|
248
270
|
onClick: loginOutHandle
|
|
249
271
|
}, /*#__PURE__*/React.createElement(LogoutOutlined, null), "\u9000\u51FA\u767B\u5F55"));
|
|
250
272
|
};
|
|
273
|
+
// 是否开通模块
|
|
274
|
+
var isOpenModule = useMemo(function () {
|
|
275
|
+
var _otherPlatformMap;
|
|
276
|
+
// 工单通平台客户端类型映射
|
|
277
|
+
var xiaozhiClientMap = {
|
|
278
|
+
'1': 'qn',
|
|
279
|
+
'2': 'jd',
|
|
280
|
+
'3': 'pdd',
|
|
281
|
+
'4': 'dy',
|
|
282
|
+
'5': 'ks'
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
// 其他平台映射
|
|
286
|
+
var otherPlatformMap = (_otherPlatformMap = {}, _defineProperty(_otherPlatformMap, PlatForm.FXG, 'dy'), _defineProperty(_otherPlatformMap, PlatForm.TB, 'qn'), _defineProperty(_otherPlatformMap, PlatForm.KS, 'ks'), _defineProperty(_otherPlatformMap, PlatForm.JD, 'jd'), _defineProperty(_otherPlatformMap, PlatForm.WEB, 'green'), _otherPlatformMap);
|
|
287
|
+
if (platform === PlatForm.XIAOZHI) {
|
|
288
|
+
var clientType = String(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType);
|
|
289
|
+
var featureKey = xiaozhiClientMap[clientType];
|
|
290
|
+
return !!featureKey && !!(featureConfig !== null && featureConfig !== void 0 && featureConfig[featureKey]);
|
|
291
|
+
} else {
|
|
292
|
+
var _featureKey = otherPlatformMap[platform];
|
|
293
|
+
return !!_featureKey && !!(featureConfig !== null && featureConfig !== void 0 && featureConfig[_featureKey]);
|
|
294
|
+
}
|
|
295
|
+
}, [platform, featureConfig, otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType]);
|
|
296
|
+
//未开通模块
|
|
297
|
+
var NotOpenModule = function NotOpenModule() {
|
|
298
|
+
var xiaozhiClientNameMap = {
|
|
299
|
+
'1': '千牛',
|
|
300
|
+
'2': '咚咚',
|
|
301
|
+
'3': '拼多多',
|
|
302
|
+
'4': '飞鸽',
|
|
303
|
+
'5': '快手'
|
|
304
|
+
};
|
|
305
|
+
var clientName = platform === PlatForm.XIAOZHI ? xiaozhiClientNameMap[String(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType)] : platformMap[platform];
|
|
306
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
307
|
+
className: "shadow-overlay"
|
|
308
|
+
}, /*#__PURE__*/React.createElement(Alert, {
|
|
309
|
+
message: "".concat(clientName, "\u63D2\u4EF6\u529F\u80FD\u672A\u5F00\u901A\uFF0C\u8BF7\u8054\u7CFB\u5B9E\u65BD\u4EBA\u5458"),
|
|
310
|
+
type: "warning"
|
|
311
|
+
}));
|
|
312
|
+
};
|
|
251
313
|
return /*#__PURE__*/React.createElement(Global, {
|
|
252
314
|
notJudgedErp: false,
|
|
253
315
|
reduxData: reduxData
|
|
@@ -297,7 +359,7 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
297
359
|
shopUniqueKey: shopUniqueKey
|
|
298
360
|
}))), !isEmpower && platform !== PlatForm.WEB && Reminder({
|
|
299
361
|
callback: onEmpowerCallback
|
|
300
|
-
}));
|
|
362
|
+
}), !isOpenModule && /*#__PURE__*/React.createElement(NotOpenModule, null));
|
|
301
363
|
};
|
|
302
364
|
var ProviderWrap = function ProviderWrap(props) {
|
|
303
365
|
return /*#__PURE__*/React.createElement(Provider, {
|
|
@@ -154,3 +154,18 @@
|
|
|
154
154
|
cursor: pointer;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
+
|
|
158
|
+
.shadow-overlay {
|
|
159
|
+
position: fixed;
|
|
160
|
+
top: 0;
|
|
161
|
+
left: 0;
|
|
162
|
+
right: 0;
|
|
163
|
+
bottom: 0;
|
|
164
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
z-index: 9999;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
@@ -18,6 +18,7 @@ export declare const fetchFlatWorkOrder: (params: any) => Promise<import("../ser
|
|
|
18
18
|
* 查询所有工单下面的组件信息
|
|
19
19
|
*/
|
|
20
20
|
export declare const showPayment: (dispatch: any) => Promise<void>;
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const fetchFeatureConfigList: (dispatch: any) => Promise<void>;
|
|
22
|
+
export declare const setDeleteCustomizeWorkOrderModalVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setDeleteCustomizeWorkOrderModalVisible">, setDealerModalVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setDealerModalVisible">, setCompanyUserList: import("@reduxjs/toolkit").ActionCreatorWithPayload<CompanyUserListI[], "customizeWorkOrder/setCompanyUserList">, setSelectedUserList: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "customizeWorkOrder/setSelectedUserList">, setStatusSelectModalVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setStatusSelectModalVisible">, setLogModalVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setLogModalVisible">, setFormModalVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setFormModalVisible">, setTemplateId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "customizeWorkOrder/setTemplateId">, setLogicFlowId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "customizeWorkOrder/setLogicFlowId">, setFlowWorkOrderId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "customizeWorkOrder/setFlowWorkOrderId">, setCustomizeFormShopId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "customizeWorkOrder/setCustomizeFormShopId">, setCurrentCustomizeRecord: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "customizeWorkOrder/setCurrentCustomizeRecord">, setCurrentBuyerChecked: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setCurrentBuyerChecked">, setAllTemplateList: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentColumnsT[], "customizeWorkOrder/setAllTemplateList">, setRepeatModalVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setRepeatModalVisible">, setRepeatWorkOrderConditions: import("@reduxjs/toolkit").ActionCreatorWithPayload<ConditionsT, "customizeWorkOrder/setRepeatWorkOrderConditions">, setShowPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setShowPayment">, setCustomerServiceToDoListOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "customizeWorkOrder/setCustomerServiceToDoListOpen">, setWorkOrderProcessStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "customizeWorkOrder/setWorkOrderProcessStatus">, setFeatureConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<Record<string, any>, "customizeWorkOrder/setFeatureConfig">;
|
|
22
23
|
declare const _default: import("redux").Reducer<CustomizeWorkOrderState, import("redux").AnyAction>;
|
|
23
24
|
export default _default;
|
|
@@ -10,7 +10,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
10
10
|
* @LastEditTime: 2022-11-16 20:21:37
|
|
11
11
|
*/
|
|
12
12
|
import { createSlice } from '@reduxjs/toolkit';
|
|
13
|
-
import { queryCompanyUserList } from "../servers/api";
|
|
13
|
+
import { queryCompanyUserList, queryFeatureConfigList } from "../servers/api";
|
|
14
14
|
import { queryAllComponentList, flatWorkOrder, fetchShowPayment } from "./api";
|
|
15
15
|
export var initialState = {
|
|
16
16
|
deleteCustomizeWorkOrderModalVisible: false,
|
|
@@ -41,7 +41,9 @@ export var initialState = {
|
|
|
41
41
|
// 是否展示打款工单入口
|
|
42
42
|
customerServiceToDoListOpen: false,
|
|
43
43
|
// 是否展示客服待办
|
|
44
|
-
workOrderProcessStatus: ''
|
|
44
|
+
workOrderProcessStatus: '',
|
|
45
|
+
// 工单处理状态
|
|
46
|
+
featureConfig: {} // 工单配置信息
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
/**
|
|
@@ -195,80 +197,117 @@ export var showPayment = /*#__PURE__*/function () {
|
|
|
195
197
|
return _ref4.apply(this, arguments);
|
|
196
198
|
};
|
|
197
199
|
}();
|
|
200
|
+
export var fetchFeatureConfigList = /*#__PURE__*/function () {
|
|
201
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(dispatch) {
|
|
202
|
+
var res, _res$data5, configParams;
|
|
203
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
204
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
205
|
+
case 0:
|
|
206
|
+
_context5.prev = 0;
|
|
207
|
+
_context5.next = 3;
|
|
208
|
+
return queryFeatureConfigList({
|
|
209
|
+
moduleCode: ['workorder', 'plugin'],
|
|
210
|
+
featureCodes: ['generalSingle', 'generalMulti', 'qn', 'dy', 'pdd', 'ks', 'jd', 'green']
|
|
211
|
+
});
|
|
212
|
+
case 3:
|
|
213
|
+
res = _context5.sent;
|
|
214
|
+
if (res.success) {
|
|
215
|
+
configParams = (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.reduce(function (cur, nxt) {
|
|
216
|
+
cur[nxt.featureCode] = nxt.valueType === 'BOOL' ? nxt.value === 'true' : nxt.value;
|
|
217
|
+
return cur;
|
|
218
|
+
}, {});
|
|
219
|
+
dispatch(setFeatureConfig(configParams));
|
|
220
|
+
}
|
|
221
|
+
_context5.next = 10;
|
|
222
|
+
break;
|
|
223
|
+
case 7:
|
|
224
|
+
_context5.prev = 7;
|
|
225
|
+
_context5.t0 = _context5["catch"](0);
|
|
226
|
+
console.error(_context5.t0);
|
|
227
|
+
case 10:
|
|
228
|
+
case "end":
|
|
229
|
+
return _context5.stop();
|
|
230
|
+
}
|
|
231
|
+
}, _callee5, null, [[0, 7]]);
|
|
232
|
+
}));
|
|
233
|
+
return function fetchFeatureConfigList(_x5) {
|
|
234
|
+
return _ref5.apply(this, arguments);
|
|
235
|
+
};
|
|
236
|
+
}();
|
|
198
237
|
var slice = createSlice({
|
|
199
238
|
name: 'customizeWorkOrder',
|
|
200
239
|
initialState: initialState,
|
|
201
240
|
reducers: {
|
|
202
|
-
setDeleteCustomizeWorkOrderModalVisible: function setDeleteCustomizeWorkOrderModalVisible(state,
|
|
203
|
-
var payload =
|
|
241
|
+
setDeleteCustomizeWorkOrderModalVisible: function setDeleteCustomizeWorkOrderModalVisible(state, _ref6) {
|
|
242
|
+
var payload = _ref6.payload;
|
|
204
243
|
state.deleteCustomizeWorkOrderModalVisible = payload;
|
|
205
244
|
},
|
|
206
|
-
setCancelInterceptionModalVisible: function setCancelInterceptionModalVisible(state,
|
|
207
|
-
var payload =
|
|
245
|
+
setCancelInterceptionModalVisible: function setCancelInterceptionModalVisible(state, _ref7) {
|
|
246
|
+
var payload = _ref7.payload;
|
|
208
247
|
state.cancelInterceptionModalVisible = payload;
|
|
209
248
|
},
|
|
210
|
-
setDealerModalVisible: function setDealerModalVisible(state,
|
|
211
|
-
var payload =
|
|
249
|
+
setDealerModalVisible: function setDealerModalVisible(state, _ref8) {
|
|
250
|
+
var payload = _ref8.payload;
|
|
212
251
|
state.selectDealerModalVisible = payload;
|
|
213
252
|
},
|
|
214
|
-
setCompanyUserList: function setCompanyUserList(state,
|
|
215
|
-
var payload =
|
|
253
|
+
setCompanyUserList: function setCompanyUserList(state, _ref9) {
|
|
254
|
+
var payload = _ref9.payload;
|
|
216
255
|
state.companyUserList = payload;
|
|
217
256
|
},
|
|
218
|
-
setSelectedUserList: function setSelectedUserList(state,
|
|
219
|
-
var payload =
|
|
257
|
+
setSelectedUserList: function setSelectedUserList(state, _ref10) {
|
|
258
|
+
var payload = _ref10.payload;
|
|
220
259
|
state.selectedUserList = payload;
|
|
221
260
|
},
|
|
222
|
-
setStatusSelectModalVisible: function setStatusSelectModalVisible(state,
|
|
223
|
-
var payload =
|
|
261
|
+
setStatusSelectModalVisible: function setStatusSelectModalVisible(state, _ref11) {
|
|
262
|
+
var payload = _ref11.payload;
|
|
224
263
|
state.statusSelectModalVisible = payload;
|
|
225
264
|
},
|
|
226
|
-
setLogModalVisible: function setLogModalVisible(state,
|
|
227
|
-
var payload =
|
|
265
|
+
setLogModalVisible: function setLogModalVisible(state, _ref12) {
|
|
266
|
+
var payload = _ref12.payload;
|
|
228
267
|
state.logModalVisible = payload;
|
|
229
268
|
},
|
|
230
|
-
setFormModalVisible: function setFormModalVisible(state,
|
|
231
|
-
var payload =
|
|
269
|
+
setFormModalVisible: function setFormModalVisible(state, _ref13) {
|
|
270
|
+
var payload = _ref13.payload;
|
|
232
271
|
state.formModalVisible = payload;
|
|
233
272
|
},
|
|
234
|
-
setTemplateId: function setTemplateId(state,
|
|
235
|
-
var payload =
|
|
273
|
+
setTemplateId: function setTemplateId(state, _ref14) {
|
|
274
|
+
var payload = _ref14.payload;
|
|
236
275
|
state.templateId = payload;
|
|
237
276
|
},
|
|
238
|
-
setLogicFlowId: function setLogicFlowId(state,
|
|
239
|
-
var payload =
|
|
277
|
+
setLogicFlowId: function setLogicFlowId(state, _ref15) {
|
|
278
|
+
var payload = _ref15.payload;
|
|
240
279
|
state.logicFlowId = payload;
|
|
241
280
|
},
|
|
242
|
-
setFlowWorkOrderId: function setFlowWorkOrderId(state,
|
|
243
|
-
var payload =
|
|
281
|
+
setFlowWorkOrderId: function setFlowWorkOrderId(state, _ref16) {
|
|
282
|
+
var payload = _ref16.payload;
|
|
244
283
|
state.flowWorkOrderId = payload;
|
|
245
284
|
},
|
|
246
|
-
setCustomizeFormShopId: function setCustomizeFormShopId(state,
|
|
247
|
-
var payload =
|
|
285
|
+
setCustomizeFormShopId: function setCustomizeFormShopId(state, _ref17) {
|
|
286
|
+
var payload = _ref17.payload;
|
|
248
287
|
state.customizeFormShopId = payload;
|
|
249
288
|
},
|
|
250
|
-
setCurrentCustomizeRecord: function setCurrentCustomizeRecord(state,
|
|
251
|
-
var payload =
|
|
289
|
+
setCurrentCustomizeRecord: function setCurrentCustomizeRecord(state, _ref18) {
|
|
290
|
+
var payload = _ref18.payload;
|
|
252
291
|
state.currentCustomizeRecord = payload;
|
|
253
292
|
},
|
|
254
|
-
setCurrentBuyerChecked: function setCurrentBuyerChecked(state,
|
|
255
|
-
var payload =
|
|
293
|
+
setCurrentBuyerChecked: function setCurrentBuyerChecked(state, _ref19) {
|
|
294
|
+
var payload = _ref19.payload;
|
|
256
295
|
state.currentBuyerChecked = payload;
|
|
257
296
|
},
|
|
258
|
-
setAllTemplateList: function setAllTemplateList(state,
|
|
259
|
-
var payload =
|
|
297
|
+
setAllTemplateList: function setAllTemplateList(state, _ref20) {
|
|
298
|
+
var payload = _ref20.payload;
|
|
260
299
|
state.allTemplateList = payload;
|
|
261
300
|
},
|
|
262
|
-
setRepeatModalVisible: function setRepeatModalVisible(state,
|
|
263
|
-
var payload =
|
|
301
|
+
setRepeatModalVisible: function setRepeatModalVisible(state, _ref21) {
|
|
302
|
+
var payload = _ref21.payload;
|
|
264
303
|
state.repeatWorkOrderVisible = payload;
|
|
265
304
|
},
|
|
266
|
-
setRepeatWorkOrderConditions: function setRepeatWorkOrderConditions(state,
|
|
267
|
-
var payload =
|
|
305
|
+
setRepeatWorkOrderConditions: function setRepeatWorkOrderConditions(state, _ref22) {
|
|
306
|
+
var payload = _ref22.payload;
|
|
268
307
|
state.repeatWorkOrderConditions = payload;
|
|
269
308
|
},
|
|
270
|
-
setShowPayment: function setShowPayment(state,
|
|
271
|
-
var payload =
|
|
309
|
+
setShowPayment: function setShowPayment(state, _ref23) {
|
|
310
|
+
var payload = _ref23.payload;
|
|
272
311
|
state.showPayment = payload;
|
|
273
312
|
},
|
|
274
313
|
closeAllModal: function closeAllModal(state) {
|
|
@@ -280,13 +319,17 @@ var slice = createSlice({
|
|
|
280
319
|
state.currentCustomizeRecord = {};
|
|
281
320
|
state.repeatWorkOrderVisible = false;
|
|
282
321
|
},
|
|
283
|
-
setCustomerServiceToDoListOpen: function setCustomerServiceToDoListOpen(state,
|
|
284
|
-
var payload =
|
|
322
|
+
setCustomerServiceToDoListOpen: function setCustomerServiceToDoListOpen(state, _ref24) {
|
|
323
|
+
var payload = _ref24.payload;
|
|
285
324
|
state.customerServiceToDoListOpen = payload;
|
|
286
325
|
},
|
|
287
|
-
setWorkOrderProcessStatus: function setWorkOrderProcessStatus(state,
|
|
288
|
-
var payload =
|
|
326
|
+
setWorkOrderProcessStatus: function setWorkOrderProcessStatus(state, _ref25) {
|
|
327
|
+
var payload = _ref25.payload;
|
|
289
328
|
state.workOrderProcessStatus = payload;
|
|
329
|
+
},
|
|
330
|
+
setFeatureConfig: function setFeatureConfig(state, _ref26) {
|
|
331
|
+
var payload = _ref26.payload;
|
|
332
|
+
state.featureConfig = payload;
|
|
290
333
|
}
|
|
291
334
|
}
|
|
292
335
|
});
|
|
@@ -309,6 +352,7 @@ var _slice$actions = slice.actions,
|
|
|
309
352
|
setRepeatWorkOrderConditions = _slice$actions.setRepeatWorkOrderConditions,
|
|
310
353
|
setShowPayment = _slice$actions.setShowPayment,
|
|
311
354
|
setCustomerServiceToDoListOpen = _slice$actions.setCustomerServiceToDoListOpen,
|
|
312
|
-
setWorkOrderProcessStatus = _slice$actions.setWorkOrderProcessStatus
|
|
313
|
-
|
|
355
|
+
setWorkOrderProcessStatus = _slice$actions.setWorkOrderProcessStatus,
|
|
356
|
+
setFeatureConfig = _slice$actions.setFeatureConfig;
|
|
357
|
+
export { setDeleteCustomizeWorkOrderModalVisible, setDealerModalVisible, setCompanyUserList, setSelectedUserList, setStatusSelectModalVisible, setLogModalVisible, setFormModalVisible, setTemplateId, setLogicFlowId, setFlowWorkOrderId, setCustomizeFormShopId, setCurrentCustomizeRecord, setCurrentBuyerChecked, setAllTemplateList, setRepeatModalVisible, setRepeatWorkOrderConditions, setShowPayment, setCustomerServiceToDoListOpen, setWorkOrderProcessStatus, setFeatureConfig };
|
|
314
358
|
export default slice.reducer;
|
|
@@ -232,3 +232,16 @@ export declare const selectShowPayment: ((state: {
|
|
|
232
232
|
}> & {
|
|
233
233
|
clearCache: () => void;
|
|
234
234
|
};
|
|
235
|
+
export declare const selectFeatureConfig: ((state: {
|
|
236
|
+
login: import("../login").GlobalState;
|
|
237
|
+
global: import("../global").GlobalState;
|
|
238
|
+
workOrder: import("../workOrder").WorkOrderState;
|
|
239
|
+
customizeWorkOrder: import("./types").CustomizeWorkOrderState;
|
|
240
|
+
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
241
|
+
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
242
|
+
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
243
|
+
}) => Record<string, any>) & import("reselect").OutputSelectorFields<(args_0: import("./types").CustomizeWorkOrderState) => Record<string, any>, {
|
|
244
|
+
clearCache: () => void;
|
|
245
|
+
}> & {
|
|
246
|
+
clearCache: () => void;
|
|
247
|
+
};
|
|
@@ -56,4 +56,7 @@ export var selectCancelInterceptionModalVisible = createSelector([selectSlice],
|
|
|
56
56
|
});
|
|
57
57
|
export var selectShowPayment = createSelector([selectSlice], function (state) {
|
|
58
58
|
return state.showPayment;
|
|
59
|
+
});
|
|
60
|
+
export var selectFeatureConfig = createSelector([selectSlice], function (state) {
|
|
61
|
+
return state.featureConfig;
|
|
59
62
|
});
|
|
@@ -114,3 +114,4 @@ export declare const queryTidByWdtOutSid: (data: any) => Promise<any>;
|
|
|
114
114
|
export declare const skqOrderDetail: (data: any) => Promise<any>;
|
|
115
115
|
export declare const nodeWorkOrderPending: (data: any) => Promise<any>;
|
|
116
116
|
export declare const jyOrderDetail: (data: any) => Promise<any>;
|
|
117
|
+
export declare const queryFeatureConfigList: (data: any) => Promise<any>;
|
|
@@ -680,4 +680,11 @@ export var jyOrderDetail = function jyOrderDetail(data) {
|
|
|
680
680
|
data: (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.tradeOrderDetails) || []
|
|
681
681
|
};
|
|
682
682
|
});
|
|
683
|
+
};
|
|
684
|
+
export var queryFeatureConfigList = function queryFeatureConfigList(data) {
|
|
685
|
+
return request({
|
|
686
|
+
url: '/qy/gdfw/company/queryFeatureConfigList',
|
|
687
|
+
method: 'post',
|
|
688
|
+
data: data
|
|
689
|
+
});
|
|
683
690
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "2.2.44-beta.
|
|
3
|
+
"version": "2.2.44-beta.55",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
35
|
"@kmkf-fe-packages/basic-components": "2.2.44-beta.54",
|
|
36
36
|
"@kmkf-fe-packages/kmkf-utils": "2.2.44-beta.54",
|
|
37
|
-
"@kmkf-fe-packages/services-components": "2.2.44-beta.
|
|
37
|
+
"@kmkf-fe-packages/services-components": "2.2.44-beta.55",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "511e721c05eca0d44f3569a1a21e4a60dd6fe746",
|
|
79
79
|
"gitHooks": {
|
|
80
80
|
"pre-commit": "lint-staged"
|
|
81
81
|
}
|