@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31-beta.15 → 2.2.31-beta.25
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/components/AutoTaskDetail/index.js +40 -2
- package/dist/esm/FlowTemplateDetailV2/components/JumpBuyer/index.d.ts +0 -1
- package/dist/esm/FlowTemplateDetailV2/components/JumpBuyer/index.js +2 -3
- package/dist/esm/FlowTemplateDetailV2/index.js +5 -5
- package/dist/esm/GlobalContext/hook/dist/useGetHasErpData.js +52 -0
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpAddressData.js +180 -0
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +186 -0
- package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js +1 -2
- package/dist/esm/common/utils/constant.js +8 -0
- package/dist/esm/common/utils/dist/submitDataTransOldFormat.js +899 -0
- package/dist/esm/common/utils/dist/tools.js +1326 -0
- package/dist/esm/common/utils/dist/transformWorkOrderData.js +965 -0
- package/dist/esm/common/utils/submitDataTransOldFormat.js +3 -0
- package/dist/esm/common/utils/tools.js +3 -1
- package/dist/esm/common/utils/transformWorkOrderData.js +7 -0
- package/dist/esm/model/customizeWorkOrder/dist/api.js +48 -0
- package/dist/esm/model/customizeWorkOrder/dist/index.js +370 -0
- package/dist/esm/model/customizeWorkOrder/dist/selector.js +63 -0
- package/dist/esm/model/customizeWorkOrder/dist/types.js +3 -0
- package/dist/esm/model/dist/global.js +44 -0
- package/dist/esm/model/dist/hooks.js +15 -0
- package/dist/esm/model/dist/login.js +245 -0
- package/dist/esm/model/dist/store.js +30 -0
- package/dist/esm/model/dist/userData.js +41 -0
- package/dist/esm/model/dist/workOrder.js +329 -0
- package/dist/esm/model/flowTemplateDetail/dist/api.js +192 -0
- package/dist/esm/model/flowTemplateDetail/dist/types.js +48 -0
- package/dist/esm/model/logicFlow/dist/api.js +14 -0
- package/dist/esm/model/logicFlow/dist/index.js +235 -0
- package/dist/esm/model/logicFlow/dist/selector.js +18 -0
- package/dist/esm/model/logicFlow/dist/types.js +3 -0
- package/dist/esm/model/logicFlow/selector.d.ts +0 -3
- package/dist/esm/model/paymentWorkOrder/dist/index.js +77 -0
- package/dist/esm/model/paymentWorkOrder/dist/selector.js +36 -0
- package/dist/esm/model/paymentWorkOrder/dist/types.js +3 -0
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +0 -9
- package/dist/esm/model/servers/dist/api.js +545 -0
- package/dist/esm/model/servers/dist/request.js +63 -0
- package/dist/esm/model/singleShopWorkOrder/dist/index.js +216 -0
- package/dist/esm/model/singleShopWorkOrder/dist/selector.js +24 -0
- package/dist/esm/model/singleShopWorkOrder/dist/types.js +3 -0
- package/dist/esm/model/singleShopWorkOrder/selector.d.ts +0 -5
- package/dist/esm/model/types/dist/login.js +3 -0
- package/dist/esm/model/types/dist/singleWorkOrder.js +3 -0
- package/dist/esm/model/types/dist/workOrder.js +3 -0
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { isNumber } from 'lodash';
|
|
3
|
-
import { Divider } from 'antd';
|
|
3
|
+
import { Divider, Button } from 'antd';
|
|
4
4
|
export var AutoTaskDetail = function AutoTaskDetail(_ref) {
|
|
5
5
|
var flowEventData = _ref.flowEventData;
|
|
6
6
|
var mapping = {
|
|
@@ -13,6 +13,28 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
|
|
|
13
13
|
6: '同时存在成功和失败且已完结',
|
|
14
14
|
7: '等待业务执行'
|
|
15
15
|
};
|
|
16
|
+
var repairOrderMapList = [{
|
|
17
|
+
name: '安装/维修单订单编号',
|
|
18
|
+
value: 'repairOrderSn'
|
|
19
|
+
}, {
|
|
20
|
+
name: '安装/维修单订单id',
|
|
21
|
+
value: 'repairOrderId'
|
|
22
|
+
}, {
|
|
23
|
+
name: '服务类型',
|
|
24
|
+
value: 'serviceType'
|
|
25
|
+
}, {
|
|
26
|
+
name: '服务状态',
|
|
27
|
+
value: 'serviceStatus'
|
|
28
|
+
}, {
|
|
29
|
+
name: '最新服务进度',
|
|
30
|
+
value: 'latestServiceProgress'
|
|
31
|
+
}, {
|
|
32
|
+
name: '最新服务进度时间',
|
|
33
|
+
value: 'latestServiceProgressTime'
|
|
34
|
+
}, {
|
|
35
|
+
name: '下单时间',
|
|
36
|
+
value: 'createTime'
|
|
37
|
+
}];
|
|
16
38
|
var eventStatus = flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventStatus;
|
|
17
39
|
var renderRules = function renderRules() {
|
|
18
40
|
var _flowEventData$eventD, _flowEventData$eventD2;
|
|
@@ -28,8 +50,24 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
|
|
|
28
50
|
}))), /*#__PURE__*/React.createElement("p", null, item.remark));
|
|
29
51
|
}));
|
|
30
52
|
};
|
|
53
|
+
var renderRepairResult = function renderRepairResult() {
|
|
54
|
+
var _flowEventData$eventD6;
|
|
55
|
+
var _ref2 = (flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD6 = flowEventData.eventData) === null || _flowEventData$eventD6 === void 0 ? void 0 : _flowEventData$eventD6.repairResult) || {},
|
|
56
|
+
repairOrderStatus = _ref2.repairOrderStatus;
|
|
57
|
+
var isSuccess = repairOrderStatus === '成功';
|
|
58
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
59
|
+
type: "link"
|
|
60
|
+
}, "\u67E5\u770B\u8BE6\u60C5>>"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u5B89\u88C5/\u7EF4\u4FEE\u5355\u72B6\u6001:", /*#__PURE__*/React.createElement("span", {
|
|
61
|
+
style: {
|
|
62
|
+
color: isSuccess ? '#70B603' : '#D9001B'
|
|
63
|
+
}
|
|
64
|
+
}, repairOrderStatus)), isSuccess && (repairOrderMapList === null || repairOrderMapList === void 0 ? void 0 : repairOrderMapList.map(function (item) {
|
|
65
|
+
var _flowEventData$eventD7, _flowEventData$eventD8;
|
|
66
|
+
return /*#__PURE__*/React.createElement("p", null, item.name, ": ", flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD7 = flowEventData.eventData) === null || _flowEventData$eventD7 === void 0 ? void 0 : (_flowEventData$eventD8 = _flowEventData$eventD7.repairResult) === null || _flowEventData$eventD8 === void 0 ? void 0 : _flowEventData$eventD8[item.value]);
|
|
67
|
+
}))));
|
|
68
|
+
};
|
|
31
69
|
// const renderReason = () => {
|
|
32
70
|
// return <p>{ flowEventData?.eventData?.businessStatus?.map((item: any) => item?.remark)?.join(',') }</p>
|
|
33
71
|
// }
|
|
34
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules());
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", null, (flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventType) === 'LBDJ_ONE_PRICE_ORDER' ? renderRepairResult() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules()));
|
|
35
73
|
};
|
|
@@ -7,15 +7,14 @@ var JumpBuyer = function JumpBuyer(param) {
|
|
|
7
7
|
var platformType = param.platformType,
|
|
8
8
|
buyer = param.buyer,
|
|
9
9
|
shop = param.shop,
|
|
10
|
-
order_number = param.order_number
|
|
11
|
-
flowTemplateKey = param.flowTemplateKey;
|
|
10
|
+
order_number = param.order_number;
|
|
12
11
|
var onClick = function onClick() {
|
|
13
12
|
var _window, _window$xiaozhiSDK;
|
|
14
13
|
var info = {
|
|
15
14
|
event: 'open_buyers',
|
|
16
15
|
param: {
|
|
17
16
|
platformType: Number(platformType),
|
|
18
|
-
buyer: buyer,
|
|
17
|
+
buyer: buyer || "orderNum_".concat(order_number),
|
|
19
18
|
shop: shop,
|
|
20
19
|
order_number: order_number
|
|
21
20
|
}
|
|
@@ -62,7 +62,7 @@ import { PlatForm } from "../WorkOrder/types";
|
|
|
62
62
|
var Text = Typography.Text,
|
|
63
63
|
Link = Typography.Link;
|
|
64
64
|
var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
65
|
-
var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find,
|
|
65
|
+
var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find, _currentNodeDetail$wo31, _JSON$parse, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$wo35, _currentNodeDetail$no27, _currentNodeDetail$no28, _currentNodeDetail$no29, _currentNodeDetail$no30;
|
|
66
66
|
var flowTemplateKey = props.flowTemplateKey,
|
|
67
67
|
_props$shopList = props.shopList,
|
|
68
68
|
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
@@ -1314,11 +1314,11 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1314
1314
|
}, !follow ? '关注' : '已关注'), plat.platform === PlatForm.XIAOZHI && /*#__PURE__*/React.createElement(JumpBuyer, {
|
|
1315
1315
|
order_number: tid,
|
|
1316
1316
|
shop: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.taobaoNick) || '',
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
})), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1317
|
+
buyer: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo31 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.buyerNick,
|
|
1318
|
+
platformType: otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType
|
|
1319
|
+
})), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo32 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : (_currentNodeDetail$wo33 = _currentNodeDetail$wo32.jsonMap) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : _currentNodeDetail$wo33.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
|
|
1320
1320
|
color: "blue"
|
|
1321
|
-
}, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1321
|
+
}, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo34 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo34 === void 0 ? void 0 : (_currentNodeDetail$wo35 = _currentNodeDetail$wo34.jsonMap) === null || _currentNodeDetail$wo35 === void 0 ? void 0 : _currentNodeDetail$wo35.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
1322
1322
|
justify: 'space-between',
|
|
1323
1323
|
className: "header"
|
|
1324
1324
|
}, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var react_redux_1 = require("react-redux");
|
|
6
|
+
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
+
var getTemplate = function getTemplate(companyUserConfig) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
9
|
+
return JSON.stringify({
|
|
10
|
+
hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
|
|
11
|
+
hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
|
|
12
|
+
hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
|
|
13
|
+
hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
|
|
14
|
+
hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
|
|
15
|
+
hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
function useGetHasErpData() {
|
|
19
|
+
var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
|
+
console.log("state--useSelector", state);
|
|
22
|
+
/**
|
|
23
|
+
* pc main
|
|
24
|
+
* 端 workOrder
|
|
25
|
+
* **/
|
|
26
|
+
return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
|
|
27
|
+
}], function (state) {
|
|
28
|
+
var _a;
|
|
29
|
+
var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
|
|
30
|
+
if (typeof companyUserConfig === "string") {
|
|
31
|
+
try {
|
|
32
|
+
companyUserConfig = JSON.parse(companyUserConfig);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.error("companyUserConfig转换异常", companyUserConfig);
|
|
35
|
+
companyUserConfig = {};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return companyUserConfig;
|
|
39
|
+
}));
|
|
40
|
+
var _a = react_1.useState(getTemplate({})),
|
|
41
|
+
hasErpDataJson = _a[0],
|
|
42
|
+
setHasErpDataJson = _a[1];
|
|
43
|
+
react_1.useEffect(function () {
|
|
44
|
+
setHasErpDataJson(getTemplate(companyUserConfig));
|
|
45
|
+
console.log("companyUserConfig---", companyUserConfig);
|
|
46
|
+
}, [companyUserConfig]);
|
|
47
|
+
var hasErpData = react_1.useMemo(function () {
|
|
48
|
+
return JSON.parse(hasErpDataJson);
|
|
49
|
+
}, [hasErpDataJson]);
|
|
50
|
+
return hasErpData;
|
|
51
|
+
}
|
|
52
|
+
exports["default"] = useGetHasErpData;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) {
|
|
5
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6
|
+
resolve(value);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.next(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function rejected(value) {
|
|
18
|
+
try {
|
|
19
|
+
step(generator["throw"](value));
|
|
20
|
+
} catch (e) {
|
|
21
|
+
reject(e);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function step(result) {
|
|
25
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26
|
+
}
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var __generator = this && this.__generator || function (thisArg, body) {
|
|
31
|
+
var _ = {
|
|
32
|
+
label: 0,
|
|
33
|
+
sent: function sent() {
|
|
34
|
+
if (t[0] & 1) throw t[1];
|
|
35
|
+
return t[1];
|
|
36
|
+
},
|
|
37
|
+
trys: [],
|
|
38
|
+
ops: []
|
|
39
|
+
},
|
|
40
|
+
f,
|
|
41
|
+
y,
|
|
42
|
+
t,
|
|
43
|
+
g;
|
|
44
|
+
return g = {
|
|
45
|
+
next: verb(0),
|
|
46
|
+
"throw": verb(1),
|
|
47
|
+
"return": verb(2)
|
|
48
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
49
|
+
return this;
|
|
50
|
+
}), g;
|
|
51
|
+
function verb(n) {
|
|
52
|
+
return function (v) {
|
|
53
|
+
return step([n, v]);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function step(op) {
|
|
57
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
58
|
+
while (_) try {
|
|
59
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
60
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
61
|
+
switch (op[0]) {
|
|
62
|
+
case 0:
|
|
63
|
+
case 1:
|
|
64
|
+
t = op;
|
|
65
|
+
break;
|
|
66
|
+
case 4:
|
|
67
|
+
_.label++;
|
|
68
|
+
return {
|
|
69
|
+
value: op[1],
|
|
70
|
+
done: false
|
|
71
|
+
};
|
|
72
|
+
case 5:
|
|
73
|
+
_.label++;
|
|
74
|
+
y = op[1];
|
|
75
|
+
op = [0];
|
|
76
|
+
continue;
|
|
77
|
+
case 7:
|
|
78
|
+
op = _.ops.pop();
|
|
79
|
+
_.trys.pop();
|
|
80
|
+
continue;
|
|
81
|
+
default:
|
|
82
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
83
|
+
_ = 0;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
87
|
+
_.label = op[1];
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
91
|
+
_.label = t[1];
|
|
92
|
+
t = op;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
if (t && _.label < t[2]) {
|
|
96
|
+
_.label = t[2];
|
|
97
|
+
_.ops.push(op);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
if (t[2]) _.ops.pop();
|
|
101
|
+
_.trys.pop();
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
op = body.call(thisArg, _);
|
|
105
|
+
} catch (e) {
|
|
106
|
+
op = [6, e];
|
|
107
|
+
y = 0;
|
|
108
|
+
} finally {
|
|
109
|
+
f = t = 0;
|
|
110
|
+
}
|
|
111
|
+
if (op[0] & 5) throw op[1];
|
|
112
|
+
return {
|
|
113
|
+
value: op[0] ? op[1] : void 0,
|
|
114
|
+
done: true
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
exports.__esModule = true;
|
|
119
|
+
var react_1 = require("react");
|
|
120
|
+
var useGetHasErpData_1 = require("../hook/useGetHasErpData");
|
|
121
|
+
var ahooks_1 = require("ahooks");
|
|
122
|
+
var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
|
|
123
|
+
function useGetErpAddressData(notJudgedErp) {
|
|
124
|
+
var _this = this;
|
|
125
|
+
var _a = react_1.useState("loading"),
|
|
126
|
+
globalState = _a[0],
|
|
127
|
+
setGlobalState = _a[1];
|
|
128
|
+
var hasErpData = useGetHasErpData_1["default"]();
|
|
129
|
+
ahooks_1.useUpdateEffect(function () {
|
|
130
|
+
asyncQueryData(hasErpData, notJudgedErp);
|
|
131
|
+
}, [hasErpData, notJudgedErp]);
|
|
132
|
+
var asyncQueryData = function asyncQueryData(hasErpData, notJudgedErp) {
|
|
133
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
134
|
+
var hasBs, hasWdt, hasGy, promises, e_1;
|
|
135
|
+
return __generator(this, function (_a) {
|
|
136
|
+
switch (_a.label) {
|
|
137
|
+
case 0:
|
|
138
|
+
hasBs = hasErpData.hasBs, hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
|
|
139
|
+
promises = [];
|
|
140
|
+
if (hasBs || notJudgedErp) promises.push(kmkf_utils_1.servers.queryBsAddressData);
|
|
141
|
+
if (hasWdt || notJudgedErp) promises.push(kmkf_utils_1.servers.queryWdtAddressData);
|
|
142
|
+
if (hasGy || notJudgedErp) promises.push(kmkf_utils_1.servers.queryGyAddressData);
|
|
143
|
+
_a.label = 1;
|
|
144
|
+
case 1:
|
|
145
|
+
_a.trys.push([1, 3,, 4]);
|
|
146
|
+
return [4 /*yield*/, Promise.all(promises.map(function (promise) {
|
|
147
|
+
return promise();
|
|
148
|
+
}))];
|
|
149
|
+
case 2:
|
|
150
|
+
_a.sent();
|
|
151
|
+
setGlobalState("success");
|
|
152
|
+
return [3 /*break*/, 4];
|
|
153
|
+
case 3:
|
|
154
|
+
e_1 = _a.sent();
|
|
155
|
+
setGlobalState("failed");
|
|
156
|
+
return [3 /*break*/, 4];
|
|
157
|
+
case 4:
|
|
158
|
+
return [2 /*return*/];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
var onReload = function onReload() {
|
|
165
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
166
|
+
return __generator(this, function (_a) {
|
|
167
|
+
switch (_a.label) {
|
|
168
|
+
case 0:
|
|
169
|
+
return [4 /*yield*/, asyncQueryData(hasErpData, notJudgedErp)];
|
|
170
|
+
case 1:
|
|
171
|
+
_a.sent();
|
|
172
|
+
return [2 /*return*/];
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
return [globalState, onReload];
|
|
179
|
+
}
|
|
180
|
+
exports["default"] = useGetErpAddressData;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) {
|
|
5
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
6
|
+
resolve(value);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.next(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function rejected(value) {
|
|
18
|
+
try {
|
|
19
|
+
step(generator["throw"](value));
|
|
20
|
+
} catch (e) {
|
|
21
|
+
reject(e);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function step(result) {
|
|
25
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26
|
+
}
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var __generator = this && this.__generator || function (thisArg, body) {
|
|
31
|
+
var _ = {
|
|
32
|
+
label: 0,
|
|
33
|
+
sent: function sent() {
|
|
34
|
+
if (t[0] & 1) throw t[1];
|
|
35
|
+
return t[1];
|
|
36
|
+
},
|
|
37
|
+
trys: [],
|
|
38
|
+
ops: []
|
|
39
|
+
},
|
|
40
|
+
f,
|
|
41
|
+
y,
|
|
42
|
+
t,
|
|
43
|
+
g;
|
|
44
|
+
return g = {
|
|
45
|
+
next: verb(0),
|
|
46
|
+
"throw": verb(1),
|
|
47
|
+
"return": verb(2)
|
|
48
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
49
|
+
return this;
|
|
50
|
+
}), g;
|
|
51
|
+
function verb(n) {
|
|
52
|
+
return function (v) {
|
|
53
|
+
return step([n, v]);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function step(op) {
|
|
57
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
58
|
+
while (_) try {
|
|
59
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
60
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
61
|
+
switch (op[0]) {
|
|
62
|
+
case 0:
|
|
63
|
+
case 1:
|
|
64
|
+
t = op;
|
|
65
|
+
break;
|
|
66
|
+
case 4:
|
|
67
|
+
_.label++;
|
|
68
|
+
return {
|
|
69
|
+
value: op[1],
|
|
70
|
+
done: false
|
|
71
|
+
};
|
|
72
|
+
case 5:
|
|
73
|
+
_.label++;
|
|
74
|
+
y = op[1];
|
|
75
|
+
op = [0];
|
|
76
|
+
continue;
|
|
77
|
+
case 7:
|
|
78
|
+
op = _.ops.pop();
|
|
79
|
+
_.trys.pop();
|
|
80
|
+
continue;
|
|
81
|
+
default:
|
|
82
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
83
|
+
_ = 0;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
87
|
+
_.label = op[1];
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
91
|
+
_.label = t[1];
|
|
92
|
+
t = op;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
if (t && _.label < t[2]) {
|
|
96
|
+
_.label = t[2];
|
|
97
|
+
_.ops.push(op);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
if (t[2]) _.ops.pop();
|
|
101
|
+
_.trys.pop();
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
op = body.call(thisArg, _);
|
|
105
|
+
} catch (e) {
|
|
106
|
+
op = [6, e];
|
|
107
|
+
y = 0;
|
|
108
|
+
} finally {
|
|
109
|
+
f = t = 0;
|
|
110
|
+
}
|
|
111
|
+
if (op[0] & 5) throw op[1];
|
|
112
|
+
return {
|
|
113
|
+
value: op[0] ? op[1] : void 0,
|
|
114
|
+
done: true
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
exports.__esModule = true;
|
|
119
|
+
var react_1 = require("react");
|
|
120
|
+
var useGetHasErpData_1 = require("../hook/useGetHasErpData");
|
|
121
|
+
var ahooks_1 = require("ahooks");
|
|
122
|
+
var api_1 = require("../../../service/api");
|
|
123
|
+
function useGetErpLogisticsCompany(notJudgedErp) {
|
|
124
|
+
var _this = this;
|
|
125
|
+
var _a = react_1.useState("loading"),
|
|
126
|
+
globalState = _a[0],
|
|
127
|
+
setGlobalState = _a[1];
|
|
128
|
+
var hasErpData = useGetHasErpData_1["default"]();
|
|
129
|
+
ahooks_1.useUpdateEffect(function () {
|
|
130
|
+
asyncQueryData(hasErpData, notJudgedErp);
|
|
131
|
+
}, [hasErpData, notJudgedErp]);
|
|
132
|
+
var asyncQueryData = function asyncQueryData(hasErpData, notJudgedErp) {
|
|
133
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
134
|
+
var hasWdt, hasE3, hasJst, hasWln, promises, e_1;
|
|
135
|
+
return __generator(this, function (_a) {
|
|
136
|
+
switch (_a.label) {
|
|
137
|
+
case 0:
|
|
138
|
+
hasWdt = hasErpData.hasWdt, hasE3 = hasErpData.hasE3, hasJst = hasErpData.hasJst, hasWln = hasErpData.hasWln;
|
|
139
|
+
promises = [api_1.queryKMLogisticsCompany];
|
|
140
|
+
if (hasWdt || notJudgedErp) promises.push(api_1.queryWdtLogisticsCompany);
|
|
141
|
+
if (hasE3 || notJudgedErp) promises.push(api_1.queryBsE3LogisticsCompany);
|
|
142
|
+
if (hasJst || notJudgedErp) promises.push(api_1.queryJSTLogisticsCompany);
|
|
143
|
+
if (hasWln || notJudgedErp) promises.push(api_1.queryWLNLogisticsCompany);
|
|
144
|
+
if (!hasWdt && !hasE3 && !hasJst && !hasWln && !notJudgedErp) {
|
|
145
|
+
setGlobalState("success");
|
|
146
|
+
return [2 /*return*/];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
_a.label = 1;
|
|
150
|
+
case 1:
|
|
151
|
+
_a.trys.push([1, 3,, 4]);
|
|
152
|
+
return [4 /*yield*/, Promise.all(promises.map(function (promise) {
|
|
153
|
+
return promise();
|
|
154
|
+
}))];
|
|
155
|
+
case 2:
|
|
156
|
+
_a.sent();
|
|
157
|
+
setGlobalState("success");
|
|
158
|
+
return [3 /*break*/, 4];
|
|
159
|
+
case 3:
|
|
160
|
+
e_1 = _a.sent();
|
|
161
|
+
setGlobalState("failed");
|
|
162
|
+
return [3 /*break*/, 4];
|
|
163
|
+
case 4:
|
|
164
|
+
return [2 /*return*/];
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
var onReload = function onReload() {
|
|
171
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
172
|
+
return __generator(this, function (_a) {
|
|
173
|
+
switch (_a.label) {
|
|
174
|
+
case 0:
|
|
175
|
+
return [4 /*yield*/, asyncQueryData(hasErpData, notJudgedErp)];
|
|
176
|
+
case 1:
|
|
177
|
+
_a.sent();
|
|
178
|
+
return [2 /*return*/];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
return [globalState, onReload];
|
|
185
|
+
}
|
|
186
|
+
exports["default"] = useGetErpLogisticsCompany;
|
package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js
CHANGED
|
@@ -185,8 +185,7 @@ var CustomizeWorkOrderCard = function CustomizeWorkOrderCard(props) {
|
|
|
185
185
|
})))), /*#__PURE__*/React.createElement(Space, null, (platformInfo === null || platformInfo === void 0 ? void 0 : platformInfo.platform) === PlatForm.XIAOZHI && /*#__PURE__*/React.createElement(JumpBuyer, {
|
|
186
186
|
order_number: item === null || item === void 0 ? void 0 : item.tid,
|
|
187
187
|
shop: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn = platformInfo.otherInfo) === null || _platformInfo$otherIn === void 0 ? void 0 : _platformInfo$otherIn.taobaoNick) || '',
|
|
188
|
-
platformType: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn2 = platformInfo.otherInfo) === null || _platformInfo$otherIn2 === void 0 ? void 0 : _platformInfo$otherIn2.xzClientPlatformType) || ''
|
|
189
|
-
flowTemplateKey: item === null || item === void 0 ? void 0 : item.flowTemplateKey
|
|
188
|
+
platformType: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn2 = platformInfo.otherInfo) === null || _platformInfo$otherIn2 === void 0 ? void 0 : _platformInfo$otherIn2.xzClientPlatformType) || ''
|
|
190
189
|
}), /*#__PURE__*/React.createElement("span", {
|
|
191
190
|
className: "order_card_header_detail",
|
|
192
191
|
onClick: function onClick() {
|
|
@@ -26,6 +26,8 @@ export var updateWorkTypeKeys = {
|
|
|
26
26
|
BS_DEPOSIT: 'bsDeposit',
|
|
27
27
|
NEW_PAYMENT_STATUS: 'newPaymentStatus',
|
|
28
28
|
BUSINESS_ORDER_NO: 'businessOrderNo',
|
|
29
|
+
REPAIR_ORDER_SN: 'repairOrderSn',
|
|
30
|
+
REPAIR_ORDER_ID: 'repairOrderId',
|
|
29
31
|
PAYMENT_VOUCHER_CODE: 'paymentVoucherCode',
|
|
30
32
|
ACTUAL_RECEIPT_PAYMENT: 'actualReceiptPayment',
|
|
31
33
|
WDT_SHOP: 'shopCode'
|
|
@@ -114,6 +116,8 @@ export var DEFAULT_STRING_COMPONENT_TYPE_FIELD_MAPPING = {
|
|
|
114
116
|
SYSTEM_ORDER_NO: 'systemOrderNo',
|
|
115
117
|
NEW_PAYMENT_STATUS: 'newPaymentStatus',
|
|
116
118
|
BUSINESS_ORDER_NO: 'businessOrderNo',
|
|
119
|
+
REPAIR_ORDER_SN: 'repairOrderSn',
|
|
120
|
+
REPAIR_ORDER_ID: 'repairOrderId',
|
|
117
121
|
PAYMENT_VOUCHER_CODE: 'paymentVoucherCode',
|
|
118
122
|
BASIC_MULT_SELECT: 'basicMultSelect',
|
|
119
123
|
ORDER_TYPE: 'erpOrderType',
|
|
@@ -179,6 +183,10 @@ export var SUBMIT_COMPONENT_STATUS_MAP = {
|
|
|
179
183
|
RETURN_EXCHANGE_GOODS_REVIEW_STATUS: {
|
|
180
184
|
status: 'returnExchangeGoodsReviewStatusValue',
|
|
181
185
|
reason: 'returnExchangeGoodsReviewStatusReason'
|
|
186
|
+
},
|
|
187
|
+
REPAIR_ORDER_STATUS: {
|
|
188
|
+
status: 'repairOrderStatusValue',
|
|
189
|
+
reason: 'repairOrderStatusReason'
|
|
182
190
|
}
|
|
183
191
|
};
|
|
184
192
|
export var SUBMIT_COMPONENT_GOOD_STATUS_MAP = {
|