@kmkf-fe-packages/services-components 2.10.29 → 2.11.0
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/Hooks/useColumnsConfig.d.ts +1 -1
- package/dist/esm/Hooks/useGoodsSourceFormat.js +9 -5
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +1 -0
- package/dist/esm/commonComponents/GlobalContext/index.js +3 -1
- package/dist/esm/commonComponents/OperationLog/index.js +2 -0
- package/dist/esm/components/BS/BsGoods/index.js +1 -0
- package/dist/esm/components/Common/index.js +1 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/communication.js +2 -0
- package/dist/esm/components/MsgStatus/index.d.ts +1 -1
- package/dist/esm/components/MsgStatus/index.js +19 -12
- package/dist/esm/components/PicturePro/PictureName.js +3 -1
- package/dist/esm/components/PicturePro/index.js +3 -1
- package/dist/esm/components/Public/AsyncSelect/index.js +8 -5
- package/dist/esm/components/Public/Goods/index.js +6 -23
- package/dist/esm/components/ReceiverAddress/index.js +3 -2
- package/dist/esm/components/Select/index.js +1 -0
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/service/api.js +18 -12
- package/dist/esm/service/request.js +4 -1
- package/package.json +4 -4
- package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -49
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -110
- package/dist/esm/components/Common/dist/index.js +0 -1017
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import LogisticsInterception from "../components/LogisticsInterception";
|
|
2
2
|
import LogisticsMoreInterception from "../components/LogisticsMoreInterception";
|
|
3
|
-
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsLogistics").default | import("../components/BS/BsSystemOrder").default | import("../components/CommonMultiStatus").default | import("../components/JST/JstSendGood").default |
|
|
3
|
+
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsLogistics").default | import("../components/BS/BsSystemOrder").default | import("../components/CommonMultiStatus").default | import("../components/JST/JstSendGood").default | import("../components/MsgStatus").default | import("../components/Public/AsyncSelect").default | import("../components/Public/Goods").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Address").default | import("../components/Cascader").default | import("../components/Checkbox").default | import("../components/DataTime").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/PicturePro").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/CommonDataTime").default | import("../components/TradeId").default | import("../components/ShopName").default | import("../components/BuyerNick").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/ReceiverAddress").default | import("../components/TradeDateTime").default | import("../components/Logistics").default | import("../components/ReturnLogistics").default | import("../components/ActualPayment").default | import("../components/Remark").default | import("../components/Alipay").default | import("../components/EItemSelect").default | import("../components/EItemId").default | import("../components/EItemEnCode").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Payment").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSupply").default | import("../components/BS/BsGoods").default | import("../components/BsE3/BsGoods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/Exchange").default | import("../components/BsE3/BsReissueE3").default | import("../components/BS/BsExchange").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | LogisticsInterception | LogisticsMoreInterception | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/CompletedUser").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/Calculation").default | import("../components/CommonSystemOrder").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/BS/BsPosting").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/DXD/DxdShopSelect").default | import("../components/KM/KmVideo").default | import("../components/CommonInput").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/AfterSalesOrderId").default | import("../components/Public/ReturnWarehouse").default | import("../components/GY/GyGoods").default | import("../components/KM/KmExchange").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default | import("../components/FlowOverallStatusSelect").default;
|
|
4
4
|
export declare const useColumnsConfig: ({ queryWorkOrderDetail, flatTemplateList, shopList, sortState, onChangeSort, handleReset, handleSubmit, handleChangeSingleWorkOrderMark, userList, tbAppKey, isShare, openSingleColumnsFilter, openSingleColumnsSort, }: {
|
|
5
5
|
queryWorkOrderDetail?: ((p: any) => void) | undefined;
|
|
6
6
|
flatTemplateList?: any;
|
|
@@ -311,7 +311,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
311
311
|
getShopList().then(function (_ref5) {
|
|
312
312
|
var data = _ref5.data;
|
|
313
313
|
setShopList(data);
|
|
314
|
-
}).catch(
|
|
314
|
+
}).catch(console.warn);
|
|
315
315
|
queryCompanyUserSimpleInfoList().then(function (_ref6) {
|
|
316
316
|
var data = _ref6.data;
|
|
317
317
|
setUserList((data || []).map(function (_ref7) {
|
|
@@ -322,7 +322,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
322
322
|
value: userKey
|
|
323
323
|
};
|
|
324
324
|
}));
|
|
325
|
-
}).catch(
|
|
325
|
+
}).catch(console.warn);
|
|
326
326
|
getGroupList().then(function (_ref8) {
|
|
327
327
|
var data = _ref8.data;
|
|
328
328
|
setGroupList((data || []).map(function (_ref9) {
|
|
@@ -335,7 +335,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
335
335
|
relationUserList: relationUserList
|
|
336
336
|
};
|
|
337
337
|
}));
|
|
338
|
-
}).catch(
|
|
338
|
+
}).catch(console.warn);
|
|
339
339
|
|
|
340
340
|
// return () => {
|
|
341
341
|
// setShopList(void 0);
|
|
@@ -419,9 +419,13 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
419
419
|
// newFilterItems,
|
|
420
420
|
// allTableColumns,
|
|
421
421
|
// });
|
|
422
|
-
}).catch(function (error) {
|
|
422
|
+
}).catch(function (error) {
|
|
423
|
+
console.log("**** 获取表头信息 error", error);
|
|
424
|
+
});
|
|
423
425
|
}
|
|
424
|
-
}).catch(function (error) {
|
|
426
|
+
}).catch(function (error) {
|
|
427
|
+
console.log("**** in 获取流程数据 error", error);
|
|
428
|
+
});
|
|
425
429
|
}
|
|
426
430
|
}, [shopList, userList, groupList]);
|
|
427
431
|
return {
|
|
@@ -62,7 +62,9 @@ var Global = function Global(_ref) {
|
|
|
62
62
|
}
|
|
63
63
|
setUserInfo(_userInfo);
|
|
64
64
|
localStorage.setItem("reduxData_userInfo", JSON.stringify(_userInfo));
|
|
65
|
-
} catch (e) {
|
|
65
|
+
} catch (e) {
|
|
66
|
+
console.error(e);
|
|
67
|
+
}
|
|
66
68
|
}, [JSON.stringify(reduxData)]);
|
|
67
69
|
useEffect(function () {
|
|
68
70
|
initDataSource();
|
|
@@ -29,6 +29,7 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
29
29
|
beforeList = JSON.parse(before);
|
|
30
30
|
afterList = JSON.parse(after);
|
|
31
31
|
} catch (e) {
|
|
32
|
+
console.log(e);
|
|
32
33
|
beforeList = [];
|
|
33
34
|
afterList = [];
|
|
34
35
|
}
|
|
@@ -135,6 +136,7 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
135
136
|
}
|
|
136
137
|
return /*#__PURE__*/React.createElement("div", null, content);
|
|
137
138
|
} catch (e) {
|
|
139
|
+
console.error("日志信息JSON转换异常", e);
|
|
138
140
|
return /*#__PURE__*/React.createElement("div", null, content);
|
|
139
141
|
}
|
|
140
142
|
};
|
|
@@ -153,6 +153,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
153
153
|
required: true,
|
|
154
154
|
validator: function validator(_, value) {
|
|
155
155
|
var _value$bsGoods3;
|
|
156
|
+
console.log("111");
|
|
156
157
|
if (!value || !(value !== null && value !== void 0 && (_value$bsGoods3 = value.bsGoods) !== null && _value$bsGoods3 !== void 0 && _value$bsGoods3.length)) {
|
|
157
158
|
return Promise.reject(new Error("请选择bs商品"));
|
|
158
159
|
}
|
|
@@ -314,6 +314,7 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
|
314
314
|
var logisticsCompany = item.logisticsCompany,
|
|
315
315
|
logisticsCompanyName = item.logisticsCompanyName;
|
|
316
316
|
var company = logisticsCompanyFormType === "input" ? logisticsCompany : ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany, false) || logisticsCompanyName || logisticsCompany;
|
|
317
|
+
console.log("00001--", [platformType, logisticsCompany, ExpressData.getInstance(platformType), ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany, false) || logisticsCompanyName || logisticsCompany]);
|
|
317
318
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
318
319
|
content: content(item, index),
|
|
319
320
|
overlayStyle: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// 查询订单详情
|
|
2
2
|
export var queryOrderDetail = function queryOrderDetail(tid) {
|
|
3
3
|
var _window, _window$parent;
|
|
4
|
+
console.log('请求ERP订单详情', tid);
|
|
4
5
|
(_window = window) === null || _window === void 0 ? void 0 : (_window$parent = _window.parent) === null || _window$parent === void 0 ? void 0 : _window$parent.postMessage({
|
|
5
6
|
method: 'queryOrder',
|
|
6
7
|
data: {
|
|
@@ -12,6 +13,7 @@ export var queryOrderDetail = function queryOrderDetail(tid) {
|
|
|
12
13
|
// 查询抖店openId
|
|
13
14
|
export var queryDouDianOpenId = function queryDouDianOpenId(originTid) {
|
|
14
15
|
var _window2, _window2$parent;
|
|
16
|
+
console.log('查询抖音店铺买家id', originTid);
|
|
15
17
|
(_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$parent = _window2.parent) === null || _window2$parent === void 0 ? void 0 : _window2$parent.postMessage({
|
|
16
18
|
method: 'queryDouDianOpenId',
|
|
17
19
|
data: {
|
|
@@ -21,7 +21,7 @@ declare class MsgStatus implements ComponentInterface {
|
|
|
21
21
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
22
22
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
23
23
|
getComponentValue: (r: Record) => any;
|
|
24
|
-
renderExport: (value: any, record: any) =>
|
|
24
|
+
renderExport: (value: any, record: any) => string;
|
|
25
25
|
editRender: (p: any) => React.JSX.Element;
|
|
26
26
|
filterConfig: (item: ColumnConfig) => {
|
|
27
27
|
searchDefaultConditions: "in";
|
|
@@ -16,6 +16,7 @@ import { MsgStatus as Status } from "@kmkf-fe-packages/basic-components";
|
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
17
|
import { isNull, filterFn as _filterFn, msgTypeCh } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { SYMBOL } from "../../constant";
|
|
19
|
+
import { isString } from "lodash";
|
|
19
20
|
var typeMap = {
|
|
20
21
|
MSG_STATUS: {
|
|
21
22
|
options: [{
|
|
@@ -119,18 +120,24 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
|
|
|
119
120
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key)];
|
|
120
121
|
});
|
|
121
122
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
122
|
-
var _typeMap$_this$type10;
|
|
123
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
var _typeMap$_this$
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
123
|
+
var _record, _typeMap$_this$type10;
|
|
124
|
+
var list = (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)]) !== null && _record !== void 0 ? _record : [];
|
|
125
|
+
if (Array.isArray(list)) {
|
|
126
|
+
return list.map(function (item) {
|
|
127
|
+
var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15;
|
|
128
|
+
var currentOption = (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : (_typeMap$_this$type12 = _typeMap$_this$type11.options) === null || _typeMap$_this$type12 === void 0 ? void 0 : (_typeMap$_this$type13 = _typeMap$_this$type12.find) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.call(_typeMap$_this$type12, function (option) {
|
|
129
|
+
var _typeMap$_this$type14;
|
|
130
|
+
return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
|
|
131
|
+
});
|
|
132
|
+
var key = item.msgType || "ding";
|
|
133
|
+
var statusMsg = "".concat(msgTypeCh[key]).concat(item.ruleName ? "-".concat(item.ruleName) : "", ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "");
|
|
134
|
+
return item.failReason ? "".concat(statusMsg, "\uFF0C\u5931\u8D25\u539F\u56E0\uFF1A").concat(item.failReason) : statusMsg;
|
|
135
|
+
}).join(",");
|
|
136
|
+
}
|
|
137
|
+
if (isString(list)) {
|
|
138
|
+
return list;
|
|
139
|
+
}
|
|
140
|
+
return '';
|
|
134
141
|
});
|
|
135
142
|
_defineProperty(this, "editRender", function (p) {
|
|
136
143
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type16;
|
|
@@ -74,7 +74,9 @@ var PictureName = /*#__PURE__*/_createClass(function PictureName(options) {
|
|
|
74
74
|
document.body.removeChild(a);
|
|
75
75
|
window.URL.revokeObjectURL(url);
|
|
76
76
|
});
|
|
77
|
-
} catch (error) {
|
|
77
|
+
} catch (error) {
|
|
78
|
+
console.error(error);
|
|
79
|
+
}
|
|
78
80
|
};
|
|
79
81
|
return /*#__PURE__*/React.createElement(Space, {
|
|
80
82
|
className: "pictruePc"
|
|
@@ -92,7 +92,9 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
92
92
|
document.body.removeChild(a);
|
|
93
93
|
window.URL.revokeObjectURL(url);
|
|
94
94
|
});
|
|
95
|
-
} catch (error) {
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error(error);
|
|
97
|
+
}
|
|
96
98
|
} else {
|
|
97
99
|
copy("".concat(hostUrl, "/").concat(item.url));
|
|
98
100
|
message.success('图片链接复制成功');
|
|
@@ -45,14 +45,16 @@ var typeMap = {
|
|
|
45
45
|
};
|
|
46
46
|
var getWdtVersion = function getWdtVersion() {
|
|
47
47
|
try {
|
|
48
|
-
var _userInfo$companyUser, _companyUserConfig, _companyUserConfig$pl,
|
|
48
|
+
var _userInfo$companyUser, _companyUserConfig, _companyUserConfig$pl, _companyUserConfig2, _companyUserConfig2$p, _companyUserConfig2$p2;
|
|
49
49
|
var userInfo = JSON.parse(localStorage.getItem("reduxData_userInfo") || "{}");
|
|
50
50
|
var companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
|
|
51
51
|
if (typeof companyUserConfig === "string") {
|
|
52
52
|
companyUserConfig = JSON.parse(companyUserConfig);
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
console.log("wdt---", (_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl = _companyUserConfig.plugins) === null || _companyUserConfig$pl === void 0 ? void 0 : _companyUserConfig$pl.wdt);
|
|
55
|
+
return ((_companyUserConfig2 = companyUserConfig) === null || _companyUserConfig2 === void 0 ? void 0 : (_companyUserConfig2$p = _companyUserConfig2.plugins) === null || _companyUserConfig2$p === void 0 ? void 0 : (_companyUserConfig2$p2 = _companyUserConfig2$p.wdt) === null || _companyUserConfig2$p2 === void 0 ? void 0 : _companyUserConfig2$p2.version) || "flagship";
|
|
55
56
|
} catch (error) {
|
|
57
|
+
console.error(error);
|
|
56
58
|
return "flagship";
|
|
57
59
|
}
|
|
58
60
|
};
|
|
@@ -228,14 +230,15 @@ var AsyncSelect = /*#__PURE__*/function () {
|
|
|
228
230
|
componentConfig: this.componentConfig
|
|
229
231
|
});
|
|
230
232
|
}
|
|
231
|
-
_context.next =
|
|
233
|
+
_context.next = 14;
|
|
232
234
|
break;
|
|
233
235
|
case 11:
|
|
234
236
|
_context.prev = 11;
|
|
235
237
|
_context.t1 = _context["catch"](1);
|
|
236
|
-
|
|
237
|
-
return _context.abrupt("return", options);
|
|
238
|
+
console.debug("api error", _context.t1);
|
|
238
239
|
case 14:
|
|
240
|
+
return _context.abrupt("return", options);
|
|
241
|
+
case 15:
|
|
239
242
|
case "end":
|
|
240
243
|
return _context.stop();
|
|
241
244
|
}
|
|
@@ -14,7 +14,7 @@ import { BsGoodsTable } from "../../Common";
|
|
|
14
14
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
16
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
-
import { CommonGoods as Goods
|
|
17
|
+
import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
18
|
import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
|
|
19
19
|
import { SYMBOL } from "../../../constant";
|
|
20
20
|
var CONFIG_MAP = {
|
|
@@ -41,15 +41,7 @@ var CONFIG_MAP = {
|
|
|
41
41
|
},
|
|
42
42
|
DXD_SUPPLIERS: {
|
|
43
43
|
name: "大希地供应商",
|
|
44
|
-
key: "dxdSuppliers"
|
|
45
|
-
validator: function validator(_rule, value, type, componentConfig) {
|
|
46
|
-
if (!_rule.required) return Promise.resolve();
|
|
47
|
-
var validatorResult = erpFormValidator(_rule, value, type, componentConfig);
|
|
48
|
-
if (validatorResult) {
|
|
49
|
-
return validatorResult;
|
|
50
|
-
}
|
|
51
|
-
return Promise.resolve();
|
|
52
|
-
}
|
|
44
|
+
key: "dxdSuppliers"
|
|
53
45
|
},
|
|
54
46
|
TTX_GOODS: {
|
|
55
47
|
name: "通天晓",
|
|
@@ -171,26 +163,17 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
|
|
|
171
163
|
}));
|
|
172
164
|
this.children = [this.headers];
|
|
173
165
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
required: isRequired,
|
|
166
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
|
|
167
|
+
required: true,
|
|
177
168
|
validator: function validator(_, value) {
|
|
178
169
|
var _value$key;
|
|
179
|
-
if (
|
|
170
|
+
if (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length)) {
|
|
180
171
|
var _CONFIG_MAP$_this$typ6;
|
|
181
172
|
return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat((_CONFIG_MAP$_this$typ6 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ6 === void 0 ? void 0 : _CONFIG_MAP$_this$typ6.name, "\u5546\u54C1")));
|
|
182
173
|
}
|
|
183
174
|
return Promise.resolve();
|
|
184
175
|
}
|
|
185
|
-
}
|
|
186
|
-
required: isRequired,
|
|
187
|
-
validator: function validator(_rule, value) {
|
|
188
|
-
var _CONFIG_MAP$_this$typ7, _CONFIG_MAP$_this$typ8;
|
|
189
|
-
return ((_CONFIG_MAP$_this$typ7 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ7 === void 0 ? void 0 : (_CONFIG_MAP$_this$typ8 = _CONFIG_MAP$_this$typ7.validator) === null || _CONFIG_MAP$_this$typ8 === void 0 ? void 0 : _CONFIG_MAP$_this$typ8.call(_CONFIG_MAP$_this$typ7, _rule, value, _this.type, _this.componentConfig)) || function () {
|
|
190
|
-
return Promise.resolve();
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
}];
|
|
176
|
+
}] : [];
|
|
194
177
|
this.dataType = "object";
|
|
195
178
|
this.sortChildField = this.getSortChildFields();
|
|
196
179
|
this.exampleValue = ((_CONFIG_MAP$this$type2 = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type2 === void 0 ? void 0 : _CONFIG_MAP$this$type2.exampleValue) || "";
|
|
@@ -94,12 +94,13 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
94
94
|
copy("".concat(addressText).concat(detail));
|
|
95
95
|
message.success('复制成功');
|
|
96
96
|
case 14:
|
|
97
|
-
_context.next =
|
|
97
|
+
_context.next = 19;
|
|
98
98
|
break;
|
|
99
99
|
case 16:
|
|
100
100
|
_context.prev = 16;
|
|
101
101
|
_context.t0 = _context["catch"](1);
|
|
102
|
-
|
|
102
|
+
console.log(_context.t0);
|
|
103
|
+
case 19:
|
|
103
104
|
case "end":
|
|
104
105
|
return _context.stop();
|
|
105
106
|
}
|
|
@@ -83,6 +83,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
83
83
|
});
|
|
84
84
|
_defineProperty(this, "renderClient", function (record) {
|
|
85
85
|
var _this$optionsMap;
|
|
86
|
+
console.log("renderClient", record, _this.getIsValue());
|
|
86
87
|
// 特殊自定义组件为平台状态时匹配出label
|
|
87
88
|
var label = _this.getIsValue() ? (_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
|
|
88
89
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, DxdShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect, ReturnWarehouse, KmExchange } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | JstSendGood | AsyncSelect | PublicGoods | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | CommonMultiStatus | JstSendGood | MsgStatus | AsyncSelect | PublicGoods | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | DxdShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -237,7 +237,9 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
instance.statusConditionOptions = tempList;
|
|
240
|
-
}).catch(function (e) {
|
|
240
|
+
}).catch(function (e) {
|
|
241
|
+
console.log(e);
|
|
242
|
+
});
|
|
241
243
|
};
|
|
242
244
|
export var queryLogisticsAddressData = function queryLogisticsAddressData() {
|
|
243
245
|
return request({
|
|
@@ -248,7 +250,9 @@ export var queryLogisticsAddressData = function queryLogisticsAddressData() {
|
|
|
248
250
|
var data = res.data;
|
|
249
251
|
var instance = LogisticsAddressData.getInstance();
|
|
250
252
|
instance.addressData = data;
|
|
251
|
-
}).catch(function (e) {
|
|
253
|
+
}).catch(function (e) {
|
|
254
|
+
console.log(e);
|
|
255
|
+
});
|
|
252
256
|
};
|
|
253
257
|
export var queryAllLogisticsCompany = function queryAllLogisticsCompany() {
|
|
254
258
|
return request({
|
|
@@ -271,61 +275,62 @@ export var queryWdtLogisticsCompany = function queryWdtLogisticsCompany() {
|
|
|
271
275
|
var instance = ExpressData.getInstance("wdt");
|
|
272
276
|
return servers.getWdtSellerLogisticsCompanyRelation().then(function (data) {
|
|
273
277
|
instance.expressData = data;
|
|
274
|
-
}).catch(
|
|
278
|
+
}).catch(console.log);
|
|
275
279
|
};
|
|
276
280
|
export var queryBsE3LogisticsCompany = function queryBsE3LogisticsCompany() {
|
|
277
281
|
var instance = ExpressData.getInstance("bsE3");
|
|
278
282
|
return servers.BSE3.getLogisticsDataAsync().then(function (data) {
|
|
279
283
|
instance.expressData = data;
|
|
280
|
-
}).catch(
|
|
284
|
+
}).catch(console.log);
|
|
281
285
|
};
|
|
282
286
|
export var queryJSTLogisticsCompany = function queryJSTLogisticsCompany() {
|
|
283
287
|
var instance = ExpressData.getInstance("jst");
|
|
284
288
|
return servers.JST.getLogisticsDataAsync().then(function (data) {
|
|
285
289
|
instance.expressData = data;
|
|
286
|
-
}).catch(
|
|
290
|
+
}).catch(console.log);
|
|
287
291
|
};
|
|
288
292
|
export var queryGYLogisticsCompany = function queryGYLogisticsCompany() {
|
|
289
293
|
var instance = ExpressData.getInstance("gy");
|
|
290
294
|
return servers.GY.getLogisticsDataAsync().then(function (data) {
|
|
291
295
|
instance.expressData = data;
|
|
292
|
-
}).catch(
|
|
296
|
+
}).catch(console.log);
|
|
293
297
|
};
|
|
294
298
|
export var queryJYLogisticsCompany = function queryJYLogisticsCompany() {
|
|
295
299
|
var instance = ExpressData.getInstance("jy");
|
|
296
300
|
return servers.JY.getLogisticsDataAsync().then(function (data) {
|
|
297
301
|
instance.expressData = data;
|
|
298
|
-
}).catch(
|
|
302
|
+
}).catch(console.log);
|
|
299
303
|
};
|
|
300
304
|
export var queryJKYLogisticsCompany = function queryJKYLogisticsCompany() {
|
|
301
305
|
var instance = ExpressData.getInstance("jky");
|
|
306
|
+
console.log("queryJKYLogisticsCompany");
|
|
302
307
|
return servers.JKY.getLogisticsDataAsync().then(function (data) {
|
|
303
308
|
instance.expressData = data;
|
|
304
|
-
}).catch(
|
|
309
|
+
}).catch(console.log);
|
|
305
310
|
};
|
|
306
311
|
export var queryWLNLogisticsCompany = function queryWLNLogisticsCompany() {
|
|
307
312
|
var instance = ExpressData.getInstance("wln");
|
|
308
313
|
return servers.WLN.getLogisticsDataAsync().then(function (data) {
|
|
309
314
|
instance.expressData = data;
|
|
310
|
-
}).catch(
|
|
315
|
+
}).catch(console.log);
|
|
311
316
|
};
|
|
312
317
|
export var queryKMLogisticsCompany = function queryKMLogisticsCompany() {
|
|
313
318
|
var instance = ExpressData.getInstance("km");
|
|
314
319
|
return servers.KM.getLogisticsDataAsync().then(function (data) {
|
|
315
320
|
instance.expressData = data;
|
|
316
|
-
}).catch(
|
|
321
|
+
}).catch(console.log);
|
|
317
322
|
};
|
|
318
323
|
export var queryDXDLogisticsCompany = function queryDXDLogisticsCompany() {
|
|
319
324
|
var instance = ExpressData.getInstance("dxd");
|
|
320
325
|
return servers.DXD.getLogisticsDataAsync().then(function (data) {
|
|
321
326
|
instance.expressData = data;
|
|
322
|
-
}).catch(
|
|
327
|
+
}).catch(console.log);
|
|
323
328
|
};
|
|
324
329
|
export var queryTTXLogisticsCompany = function queryTTXLogisticsCompany() {
|
|
325
330
|
var instance = ExpressData.getInstance("ttx");
|
|
326
331
|
return servers.TTX.getLogisticsDataAsync().then(function (data) {
|
|
327
332
|
instance.expressData = data;
|
|
328
|
-
}).catch(
|
|
333
|
+
}).catch(console.log);
|
|
329
334
|
};
|
|
330
335
|
// 获取支付宝电子回单
|
|
331
336
|
export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
|
|
@@ -349,6 +354,7 @@ export var queryLabel = function queryLabel() {
|
|
|
349
354
|
var finalData = JSON.parse(data);
|
|
350
355
|
instance.labelData = finalData;
|
|
351
356
|
} catch (e) {
|
|
357
|
+
console.error("转换标签数据数据异常");
|
|
352
358
|
instance.labelData = [];
|
|
353
359
|
}
|
|
354
360
|
});
|
|
@@ -52,10 +52,13 @@ var requestApi = function requestApi(_ref) {
|
|
|
52
52
|
message.warn(res.message);
|
|
53
53
|
} else if (infoLevel === 'error') {
|
|
54
54
|
message.error(res.message);
|
|
55
|
-
} else {
|
|
55
|
+
} else {
|
|
56
|
+
console.log(res.message);
|
|
57
|
+
}
|
|
56
58
|
reject(res);
|
|
57
59
|
}
|
|
58
60
|
}).catch(function (e) {
|
|
61
|
+
console.error('请求错误', e);
|
|
59
62
|
reject(e);
|
|
60
63
|
});
|
|
61
64
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.10.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.10.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.10.30",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.10.30",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "96d314f6f26249f9c4cfa4321c63252822e4d3ca",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
/**
|
|
22
|
-
* pc main
|
|
23
|
-
* 端 workOrder
|
|
24
|
-
* **/
|
|
25
|
-
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 : {};
|
|
26
|
-
}], function (state) {
|
|
27
|
-
var _a;
|
|
28
|
-
var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
|
|
29
|
-
if (typeof companyUserConfig === "string") {
|
|
30
|
-
try {
|
|
31
|
-
companyUserConfig = JSON.parse(companyUserConfig);
|
|
32
|
-
} catch (e) {
|
|
33
|
-
companyUserConfig = {};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return companyUserConfig;
|
|
37
|
-
}));
|
|
38
|
-
var _a = react_1.useState(getTemplate({})),
|
|
39
|
-
hasErpDataJson = _a[0],
|
|
40
|
-
setHasErpDataJson = _a[1];
|
|
41
|
-
react_1.useEffect(function () {
|
|
42
|
-
setHasErpDataJson(getTemplate(companyUserConfig));
|
|
43
|
-
}, [companyUserConfig]);
|
|
44
|
-
var hasErpData = react_1.useMemo(function () {
|
|
45
|
-
return JSON.parse(hasErpDataJson);
|
|
46
|
-
}, [hasErpDataJson]);
|
|
47
|
-
return hasErpData;
|
|
48
|
-
}
|
|
49
|
-
exports["default"] = useGetHasErpData;
|