@kmkf-fe-packages/services-components 0.28.2-rc.1 → 0.28.2-rc.12
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/commonComponents/ErpContext/index.d.ts +16 -0
- package/dist/esm/commonComponents/ErpContext/index.js +68 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/communication.d.ts +2 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/communication.js +23 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/index.d.ts +3 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/index.js +169 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/index.module.scss +30 -0
- package/dist/esm/components/ErpTradeId/components/OrderNum/noImage.png +0 -0
- package/dist/esm/components/ErpTradeId/index.MD +1 -0
- package/dist/esm/components/ErpTradeId/index.d.ts +2 -29
- package/dist/esm/components/ErpTradeId/index.js +41 -104
- package/dist/esm/components/LogisticsInterception/InterceptState.d.ts +37 -0
- package/dist/esm/components/LogisticsInterception/InterceptState.js +89 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +4 -16
- package/dist/esm/components/LogisticsInterception/index.js +11 -6
- package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +3 -0
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +33 -6
- package/dist/esm/components/LogisticsTrajectory/index.js +2 -1
- package/dist/esm/components/LogisticsTrajectory/trajectoryStatus.d.ts +8 -3
- package/dist/esm/components/LogisticsTrajectory/trajectoryStatus.js +30 -8
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +5 -1
- package/package.json +4 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { SetStateAction } from 'react';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
declare const ErpContext: React.Context<{
|
|
4
|
+
orderList: Record<string, any>;
|
|
5
|
+
setOrderList: Dispatch<SetStateAction<Record<string, any>>>;
|
|
6
|
+
currentOrderDetail: Record<string, any>;
|
|
7
|
+
setCurrentOrderDetail: Dispatch<SetStateAction<Record<string, any>>>;
|
|
8
|
+
buyerId: string;
|
|
9
|
+
setBuyerId: Dispatch<SetStateAction<string>>;
|
|
10
|
+
subOrderListVisible: boolean;
|
|
11
|
+
setSubOrderListVisible: Dispatch<SetStateAction<boolean>>;
|
|
12
|
+
globalLoading: boolean;
|
|
13
|
+
setGlobalLoading: Dispatch<SetStateAction<boolean>>;
|
|
14
|
+
}>;
|
|
15
|
+
declare const ErpProvider: ({ children }: React.PropsWithChildren) => React.JSX.Element;
|
|
16
|
+
export { ErpContext, ErpProvider };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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
|
+
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { createContext, useState } from 'react';
|
|
8
|
+
// 配合着ErpTradeId 组件使用
|
|
9
|
+
var ErpContext = /*#__PURE__*/createContext({
|
|
10
|
+
orderList: {},
|
|
11
|
+
setOrderList: function setOrderList() {
|
|
12
|
+
return void 0;
|
|
13
|
+
},
|
|
14
|
+
currentOrderDetail: {},
|
|
15
|
+
setCurrentOrderDetail: function setCurrentOrderDetail() {
|
|
16
|
+
return void 0;
|
|
17
|
+
},
|
|
18
|
+
buyerId: '',
|
|
19
|
+
setBuyerId: function setBuyerId() {
|
|
20
|
+
return '';
|
|
21
|
+
},
|
|
22
|
+
subOrderListVisible: false,
|
|
23
|
+
setSubOrderListVisible: function setSubOrderListVisible() {
|
|
24
|
+
return false;
|
|
25
|
+
},
|
|
26
|
+
globalLoading: false,
|
|
27
|
+
setGlobalLoading: function setGlobalLoading() {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var ErpProvider = function ErpProvider(_ref) {
|
|
32
|
+
var children = _ref.children;
|
|
33
|
+
var _useState = useState({}),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
orderList = _useState2[0],
|
|
36
|
+
setOrderList = _useState2[1];
|
|
37
|
+
var _useState3 = useState({}),
|
|
38
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
39
|
+
currentOrderDetail = _useState4[0],
|
|
40
|
+
setCurrentOrderDetail = _useState4[1];
|
|
41
|
+
var _useState5 = useState(''),
|
|
42
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
43
|
+
buyerId = _useState6[0],
|
|
44
|
+
setBuyerId = _useState6[1];
|
|
45
|
+
var _useState7 = useState(false),
|
|
46
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
47
|
+
subOrderListVisible = _useState8[0],
|
|
48
|
+
setSubOrderListVisible = _useState8[1];
|
|
49
|
+
var _useState9 = useState(false),
|
|
50
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
51
|
+
globalLoading = _useState10[0],
|
|
52
|
+
setGlobalLoading = _useState10[1];
|
|
53
|
+
return /*#__PURE__*/React.createElement(ErpContext.Provider, {
|
|
54
|
+
value: {
|
|
55
|
+
orderList: orderList,
|
|
56
|
+
setOrderList: setOrderList,
|
|
57
|
+
currentOrderDetail: currentOrderDetail,
|
|
58
|
+
setCurrentOrderDetail: setCurrentOrderDetail,
|
|
59
|
+
buyerId: buyerId,
|
|
60
|
+
setBuyerId: setBuyerId,
|
|
61
|
+
subOrderListVisible: subOrderListVisible,
|
|
62
|
+
setSubOrderListVisible: setSubOrderListVisible,
|
|
63
|
+
globalLoading: globalLoading,
|
|
64
|
+
setGlobalLoading: setGlobalLoading
|
|
65
|
+
}
|
|
66
|
+
}, children);
|
|
67
|
+
};
|
|
68
|
+
export { ErpContext, ErpProvider };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// 查询订单详情
|
|
2
|
+
export var queryOrderDetail = function queryOrderDetail(tid) {
|
|
3
|
+
var _window, _window$parent;
|
|
4
|
+
console.log('请求ERP订单详情', tid);
|
|
5
|
+
(_window = window) === null || _window === void 0 ? void 0 : (_window$parent = _window.parent) === null || _window$parent === void 0 ? void 0 : _window$parent.postMessage({
|
|
6
|
+
method: 'queryOrder',
|
|
7
|
+
data: {
|
|
8
|
+
tid: tid
|
|
9
|
+
}
|
|
10
|
+
}, '*');
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// 查询抖店openId
|
|
14
|
+
export var queryDouDianOpenId = function queryDouDianOpenId(originTid) {
|
|
15
|
+
var _window2, _window2$parent;
|
|
16
|
+
console.log('查询抖音店铺买家id', originTid);
|
|
17
|
+
(_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$parent = _window2.parent) === null || _window2$parent === void 0 ? void 0 : _window2$parent.postMessage({
|
|
18
|
+
method: 'queryDouDianOpenId',
|
|
19
|
+
data: {
|
|
20
|
+
originTid: originTid
|
|
21
|
+
}
|
|
22
|
+
}, '*');
|
|
23
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
var _excluded = ["value", "onChange", "onTradeIdBlur"];
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
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); }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
/*
|
|
18
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
19
|
+
* @Date: 2022-11-15 15:39:26
|
|
20
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
21
|
+
* @LastEditTime: 2022-12-07 19:47:07
|
|
22
|
+
* @FilePath: /kefu/packages/enterprise/src/app/pages/ErpWorkOrder/components/OrderNum/index.tsx
|
|
23
|
+
* @Description:
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
26
|
+
*/
|
|
27
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
28
|
+
import { Button, Input, Popover, Radio, Image } from 'antd';
|
|
29
|
+
import get from 'lodash/get';
|
|
30
|
+
import { ErpScenes } from "../../../../index";
|
|
31
|
+
import { queryOrderDetail, queryDouDianOpenId } from "./communication";
|
|
32
|
+
import noImage from "./noImage.png";
|
|
33
|
+
import styles from "./index.module.scss";
|
|
34
|
+
var Card = function Card(_ref) {
|
|
35
|
+
var tid = _ref.tid,
|
|
36
|
+
sid = _ref.sid,
|
|
37
|
+
itemList = _ref.itemList,
|
|
38
|
+
sysStatusName = _ref.sysStatusName;
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: styles.card
|
|
41
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
42
|
+
style: {
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center'
|
|
45
|
+
}
|
|
46
|
+
}, sysStatusName && /*#__PURE__*/React.createElement("span", {
|
|
47
|
+
className: styles.tag
|
|
48
|
+
}, sysStatusName), /*#__PURE__*/React.createElement("span", {
|
|
49
|
+
style: {
|
|
50
|
+
marginLeft: '8px',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
display: 'flex'
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u5355\u53F7: ", /*#__PURE__*/React.createElement("b", null, sid)), /*#__PURE__*/React.createElement("span", null, "\u5E73\u53F0\u5355\u53F7: ", /*#__PURE__*/React.createElement("b", null, tid)))), itemList.map(function (item) {
|
|
55
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: styles.good
|
|
57
|
+
}, item.picUrl ? /*#__PURE__*/React.createElement(Image, {
|
|
58
|
+
width: 56,
|
|
59
|
+
src: item.picUrl
|
|
60
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
61
|
+
src: noImage,
|
|
62
|
+
alt: "\u65E0\u5546\u54C1\u56FE\u7247",
|
|
63
|
+
style: {
|
|
64
|
+
width: '56px',
|
|
65
|
+
height: '56px'
|
|
66
|
+
}
|
|
67
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: styles.content
|
|
69
|
+
}, /*#__PURE__*/React.createElement("span", null, item.title), /*#__PURE__*/React.createElement("span", null, item.productCode)), /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: styles.price
|
|
71
|
+
}, item.price && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("b", {
|
|
72
|
+
style: {
|
|
73
|
+
color: '#ff7a45',
|
|
74
|
+
fontSize: '16px'
|
|
75
|
+
}
|
|
76
|
+
}, item.price), ' ', "* 1")));
|
|
77
|
+
}));
|
|
78
|
+
};
|
|
79
|
+
var SubOrderList = function SubOrderList(_ref2) {
|
|
80
|
+
var subList = _ref2.subList;
|
|
81
|
+
var _useContext = useContext(ErpScenes.ErpContext),
|
|
82
|
+
orderList = _useContext.orderList,
|
|
83
|
+
setGlobalLoading = _useContext.setGlobalLoading,
|
|
84
|
+
setBuyerId = _useContext.setBuyerId,
|
|
85
|
+
setCurrentOrderDetail = _useContext.setCurrentOrderDetail;
|
|
86
|
+
var _useState = useState(),
|
|
87
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
88
|
+
value = _useState2[0],
|
|
89
|
+
setValue = _useState2[1];
|
|
90
|
+
var handleChange = function handleChange(e) {
|
|
91
|
+
setValue(e.target.value);
|
|
92
|
+
var selectOrder = get(orderList, "orderList.".concat(e.target.value), {});
|
|
93
|
+
// 如果是抖音的订单,需要根据这个订单号去获取买家id
|
|
94
|
+
if (selectOrder.shopSource === 'fxg') {
|
|
95
|
+
setGlobalLoading(true);
|
|
96
|
+
queryDouDianOpenId(selectOrder.originTid);
|
|
97
|
+
} else {
|
|
98
|
+
setBuyerId('');
|
|
99
|
+
}
|
|
100
|
+
setCurrentOrderDetail(_objectSpread({}, selectOrder));
|
|
101
|
+
};
|
|
102
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
style: {
|
|
104
|
+
height: '300px',
|
|
105
|
+
overflowY: 'auto'
|
|
106
|
+
},
|
|
107
|
+
className: styles.itemWrap,
|
|
108
|
+
onClick: function onClick(e) {
|
|
109
|
+
return e.stopPropagation();
|
|
110
|
+
}
|
|
111
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
112
|
+
value: value,
|
|
113
|
+
onChange: handleChange
|
|
114
|
+
}, subList.map(function (subOrder, index) {
|
|
115
|
+
return /*#__PURE__*/React.createElement(Radio, {
|
|
116
|
+
value: index
|
|
117
|
+
}, /*#__PURE__*/React.createElement(Card, subOrder));
|
|
118
|
+
})));
|
|
119
|
+
};
|
|
120
|
+
var OrderNum = function OrderNum(_ref3) {
|
|
121
|
+
var value = _ref3.value,
|
|
122
|
+
onChange = _ref3.onChange,
|
|
123
|
+
onTradeIdBlur = _ref3.onTradeIdBlur,
|
|
124
|
+
otherProp = _objectWithoutProperties(_ref3, _excluded);
|
|
125
|
+
var _useContext2 = useContext(ErpScenes.ErpContext),
|
|
126
|
+
visible = _useContext2.subOrderListVisible,
|
|
127
|
+
orderList = _useContext2.orderList,
|
|
128
|
+
setGlobalLoading = _useContext2.setGlobalLoading,
|
|
129
|
+
setSubOrderListVisible = _useContext2.setSubOrderListVisible;
|
|
130
|
+
var subList = orderList.orderList;
|
|
131
|
+
var handleQueryOrderDetail = function handleQueryOrderDetail() {
|
|
132
|
+
if (!value) return;
|
|
133
|
+
setGlobalLoading(true);
|
|
134
|
+
queryOrderDetail(value);
|
|
135
|
+
typeof onTradeIdBlur === 'function' && onTradeIdBlur(value);
|
|
136
|
+
};
|
|
137
|
+
useEffect(function () {
|
|
138
|
+
document.body.addEventListener('click', function () {
|
|
139
|
+
setSubOrderListVisible(false);
|
|
140
|
+
});
|
|
141
|
+
return document.body.removeEventListener('click', function () {
|
|
142
|
+
setSubOrderListVisible(false);
|
|
143
|
+
});
|
|
144
|
+
}, []);
|
|
145
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
146
|
+
visible: visible,
|
|
147
|
+
placement: "bottom",
|
|
148
|
+
content: /*#__PURE__*/React.createElement(SubOrderList, {
|
|
149
|
+
subList: subList
|
|
150
|
+
}),
|
|
151
|
+
trigger: "manually"
|
|
152
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
style: {
|
|
154
|
+
display: 'inline-flex',
|
|
155
|
+
width: '100%',
|
|
156
|
+
alignItems: 'center'
|
|
157
|
+
},
|
|
158
|
+
onClick: function onClick(e) {
|
|
159
|
+
return e.stopPropagation();
|
|
160
|
+
}
|
|
161
|
+
}, /*#__PURE__*/React.createElement(Input, _extends({
|
|
162
|
+
value: value,
|
|
163
|
+
onChange: onChange
|
|
164
|
+
}, otherProp)), /*#__PURE__*/React.createElement(Button, {
|
|
165
|
+
type: "primary",
|
|
166
|
+
onClick: handleQueryOrderDetail
|
|
167
|
+
}, "\u67E5\u8BE2\u8BA2\u5355")));
|
|
168
|
+
};
|
|
169
|
+
export default OrderNum;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.itemWrap {
|
|
2
|
+
width: 420px;
|
|
3
|
+
}
|
|
4
|
+
.card {
|
|
5
|
+
margin-bottom: 16px;
|
|
6
|
+
.tag {
|
|
7
|
+
padding: 2px;
|
|
8
|
+
background: #bae7ff;
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
height: 24px;
|
|
11
|
+
line-height: 21px;
|
|
12
|
+
}
|
|
13
|
+
.good {
|
|
14
|
+
margin-top: 8px;
|
|
15
|
+
width: 380px;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
.content {
|
|
19
|
+
flex: 1;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
margin-left: 8px;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
}
|
|
25
|
+
.price {
|
|
26
|
+
flex: 0 0 100px;
|
|
27
|
+
align-self: flex-end;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
### 该组件只能在ERP录入工单场景下使用,并且需要配合 ErpContext 这个上下文一起使用
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
-
isCombinationComponent: boolean;
|
|
11
|
-
formField: string;
|
|
12
|
-
canSort: boolean;
|
|
13
|
-
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface['dataType'];
|
|
15
|
-
constructor(options: PickOption);
|
|
16
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
17
|
-
copyHandle: (text: string) => void;
|
|
18
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
-
getComponentValue: (r: Record) => any;
|
|
21
|
-
renderExport: (value: any, record: Record) => any;
|
|
2
|
+
import TradeId from '../TradeId';
|
|
3
|
+
declare class ErpTradeId extends TradeId {
|
|
22
4
|
editRender: (p: any) => React.JSX.Element;
|
|
23
|
-
filterConfig: (item: ColumnConfig) => {
|
|
24
|
-
searchDefaultConditions: "in";
|
|
25
|
-
type: string;
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
filterComponentType: "Input";
|
|
29
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
30
|
-
formatFilterValue: (input: string) => string[];
|
|
31
|
-
};
|
|
32
5
|
}
|
|
33
6
|
export default ErpTradeId;
|
|
@@ -1,116 +1,53 @@
|
|
|
1
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
7
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
8
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
10
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5
13
|
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; }
|
|
6
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
15
|
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); }
|
|
8
16
|
import React from 'react';
|
|
9
|
-
import { TradeId } from '@kmkf-fe-packages/basic-components';
|
|
10
|
-
import copy from 'copy-to-clipboard';
|
|
11
|
-
import { message } from 'antd';
|
|
12
|
-
import { CopyOutlined } from '@ant-design/icons';
|
|
13
17
|
import GetFormItem from "../GetFormItem";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_defineProperty(this, "rules", void 0);
|
|
25
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
26
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
27
|
-
_defineProperty(this, "formField", void 0);
|
|
28
|
-
_defineProperty(this, "canSort", void 0);
|
|
29
|
-
_defineProperty(this, "children", void 0);
|
|
30
|
-
_defineProperty(this, "dataType", void 0);
|
|
31
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
32
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
33
|
-
id: _this.id,
|
|
34
|
-
label: _this.name,
|
|
35
|
-
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
36
|
-
}) : null;
|
|
37
|
-
});
|
|
38
|
-
_defineProperty(this, "copyHandle", function (text) {
|
|
39
|
-
copy(text);
|
|
40
|
-
message.success('复制成功');
|
|
41
|
-
});
|
|
42
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
43
|
-
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) === undefined) {
|
|
44
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
18
|
+
import TradeId from "../TradeId";
|
|
19
|
+
import OrderNo from "./components/OrderNum";
|
|
20
|
+
var ErpTradeId = /*#__PURE__*/function (_TradeId) {
|
|
21
|
+
_inherits(ErpTradeId, _TradeId);
|
|
22
|
+
var _super = _createSuper(ErpTradeId);
|
|
23
|
+
function ErpTradeId() {
|
|
24
|
+
var _this;
|
|
25
|
+
_classCallCheck(this, ErpTradeId);
|
|
26
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27
|
+
args[_key] = arguments[_key];
|
|
45
28
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
67
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_tradeId")];
|
|
68
|
-
});
|
|
69
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
70
|
-
var _record;
|
|
71
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record !== void 0 ? _record : '--';
|
|
72
|
-
});
|
|
73
|
-
_defineProperty(this, "editRender", function (p) {
|
|
74
|
-
var _this$componentConfig, _this$componentConfig2;
|
|
75
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
76
|
-
title: _this.name,
|
|
77
|
-
name: _this.id,
|
|
78
|
-
rules: _this.rules,
|
|
79
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
80
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
81
|
-
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
82
|
-
component: /*#__PURE__*/React.createElement(TradeId, null)
|
|
29
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
30
|
+
_defineProperty(_assertThisInitialized(_this), "editRender", function (p) {
|
|
31
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
32
|
+
var onTradeIdBlur = function onTradeIdBlur(value) {
|
|
33
|
+
var _p$onBlur;
|
|
34
|
+
p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, value, 'tradeId');
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
37
|
+
title: _this.name,
|
|
38
|
+
name: _this.id,
|
|
39
|
+
rules: _this.rules,
|
|
40
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
41
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
42
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
43
|
+
component: /*#__PURE__*/React.createElement(OrderNo, _extends({}, _this.componentConfig, {
|
|
44
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
45
|
+
onTradeIdBlur: onTradeIdBlur
|
|
46
|
+
}))
|
|
47
|
+
});
|
|
83
48
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
type: item.type,
|
|
89
|
-
id: "".concat(item.id, "_tradeId"),
|
|
90
|
-
// 过滤组件id
|
|
91
|
-
name: item.name,
|
|
92
|
-
// 过滤组件名称
|
|
93
|
-
filterComponentType: 'Input',
|
|
94
|
-
filterFn: function filterFn(value) {
|
|
95
|
-
return function (i) {
|
|
96
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'tradeId'), value);
|
|
97
|
-
};
|
|
98
|
-
},
|
|
99
|
-
formatFilterValue: function formatFilterValue(input) {
|
|
100
|
-
return input.split(/[,|,]/);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
});
|
|
104
|
-
this.name = options.name;
|
|
105
|
-
this.id = options.id;
|
|
106
|
-
this.sortField = "".concat(options.id, "_tradeId");
|
|
107
|
-
this.formField = "".concat(options.id, "_tradeId");
|
|
108
|
-
this.type = options.type;
|
|
109
|
-
this.componentConfig = options.componentConfig;
|
|
110
|
-
this.rules = [];
|
|
111
|
-
this.isCombinationComponent = false;
|
|
112
|
-
this.canSort = true;
|
|
113
|
-
this.children = [];
|
|
114
|
-
this.dataType = 'string';
|
|
115
|
-
});
|
|
49
|
+
return _this;
|
|
50
|
+
}
|
|
51
|
+
return _createClass(ErpTradeId);
|
|
52
|
+
}(TradeId);
|
|
116
53
|
export default ErpTradeId;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptState implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
align: ALignType;
|
|
12
|
+
width: number;
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
options: ComponentInterface["options"];
|
|
19
|
+
constructor(options: PickOption);
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: any, record: Record) => any;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
searchDefaultConditions: "in";
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "MultipleSelect";
|
|
32
|
+
props: {
|
|
33
|
+
options: any[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export default InterceptState;
|
|
@@ -0,0 +1,89 @@
|
|
|
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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
8
|
+
import React from "react";
|
|
9
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
import { SYMBOL } from "../../constant";
|
|
12
|
+
var InterceptState = /*#__PURE__*/_createClass(function InterceptState(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, InterceptState);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "formField", void 0);
|
|
26
|
+
_defineProperty(this, "canSort", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "options", void 0);
|
|
30
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
31
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
34
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
|
+
id: _this.id,
|
|
36
|
+
label: _this.name,
|
|
37
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
38
|
+
}) : null;
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
|
+
var _record$_this$id;
|
|
42
|
+
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
45
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
46
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
+
var _record$_this$id2;
|
|
50
|
+
return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "editRender", function () {
|
|
53
|
+
return null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
56
|
+
return {
|
|
57
|
+
searchDefaultConditions: SYMBOL.in,
|
|
58
|
+
type: item.type,
|
|
59
|
+
id: "".concat(item.id, "_qySelfInterceptLogisticsStatus"),
|
|
60
|
+
name: "".concat(item.name, "-\u62E6\u622A\u72B6\u6001"),
|
|
61
|
+
filterComponentType: "MultipleSelect",
|
|
62
|
+
props: {
|
|
63
|
+
options: _this.options || []
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
this.name = "拦截状态";
|
|
68
|
+
this.id = "".concat(options.id, "_qySelfInterceptLogisticsStatus");
|
|
69
|
+
this.sortField = "".concat(options.id, "_qySelfInterceptLogisticsStatus");
|
|
70
|
+
this.formField = "".concat(options.id, "_qySelfInterceptLogisticsStatus");
|
|
71
|
+
this.type = options.type;
|
|
72
|
+
this.componentConfig = options.componentConfig;
|
|
73
|
+
this.rules = [];
|
|
74
|
+
this.align = "left";
|
|
75
|
+
this.width = 200;
|
|
76
|
+
this.isCombinationComponent = false;
|
|
77
|
+
this.canSort = true;
|
|
78
|
+
this.children = [];
|
|
79
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
80
|
+
this.dataType = "string";
|
|
81
|
+
this.options = [{
|
|
82
|
+
label: "拦截成功",
|
|
83
|
+
value: "拦截成功"
|
|
84
|
+
}, {
|
|
85
|
+
label: "拦截失败",
|
|
86
|
+
value: "拦截失败"
|
|
87
|
+
}];
|
|
88
|
+
});
|
|
89
|
+
export default InterceptState;
|
|
@@ -6,6 +6,7 @@ import InterceptSnapshot from "./interceptSnapshot";
|
|
|
6
6
|
import InterceptAddress from "./InterceptAddress";
|
|
7
7
|
import InterceptType from "./InterceptType";
|
|
8
8
|
import InterceptStatus from "./InterceptStatus";
|
|
9
|
+
import InterceptState from "./InterceptState";
|
|
9
10
|
import Express from "../Express";
|
|
10
11
|
import ExpressCode from "../ExpressCode";
|
|
11
12
|
declare class Logistics implements ComponentInterface {
|
|
@@ -21,6 +22,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
21
22
|
interceptLogisticsStatus: InterceptStatus;
|
|
22
23
|
interceptSenderMobile: InterceptSenderMobile;
|
|
23
24
|
interceptSnapshot: InterceptSnapshot;
|
|
25
|
+
interceptState: InterceptState;
|
|
24
26
|
isCombinationComponent: boolean;
|
|
25
27
|
formField: string;
|
|
26
28
|
canSort: boolean;
|
|
@@ -50,21 +52,12 @@ declare class Logistics implements ComponentInterface {
|
|
|
50
52
|
mobile: any;
|
|
51
53
|
};
|
|
52
54
|
interceptSnapshot: any;
|
|
55
|
+
interceptState: any;
|
|
53
56
|
};
|
|
54
57
|
renderPc: () => null;
|
|
55
58
|
renderExport: () => null;
|
|
56
59
|
editRender: (p: any) => React.JSX.Element;
|
|
57
60
|
filterConfig: (item: ColumnConfig) => ({
|
|
58
|
-
searchDefaultConditions: "in";
|
|
59
|
-
type: string;
|
|
60
|
-
id: string;
|
|
61
|
-
name: string;
|
|
62
|
-
filterComponentType: "MultipleSelect";
|
|
63
|
-
props: {
|
|
64
|
-
options: any[];
|
|
65
|
-
};
|
|
66
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
67
|
-
} | {
|
|
68
61
|
searchDefaultConditions: "like";
|
|
69
62
|
type: string;
|
|
70
63
|
id: string;
|
|
@@ -78,13 +71,8 @@ declare class Logistics implements ComponentInterface {
|
|
|
78
71
|
name: string;
|
|
79
72
|
filterComponentType: "MultipleSelect";
|
|
80
73
|
props: {
|
|
81
|
-
options:
|
|
82
|
-
label: string;
|
|
83
|
-
value: string;
|
|
84
|
-
}[];
|
|
74
|
+
options: any[];
|
|
85
75
|
};
|
|
86
|
-
formatFilterValue: (value: string[]) => string[];
|
|
87
|
-
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
88
76
|
})[];
|
|
89
77
|
}
|
|
90
78
|
export default Logistics;
|
|
@@ -17,6 +17,7 @@ import InterceptSnapshot from "./interceptSnapshot";
|
|
|
17
17
|
import InterceptAddress from "./InterceptAddress";
|
|
18
18
|
import InterceptType from "./InterceptType";
|
|
19
19
|
import InterceptStatus from "./InterceptStatus";
|
|
20
|
+
import InterceptState from "./InterceptState";
|
|
20
21
|
import Express from "../Express";
|
|
21
22
|
import ExpressCode from "../ExpressCode";
|
|
22
23
|
import ColumnHeader from "./columnHeader";
|
|
@@ -35,6 +36,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
35
36
|
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
36
37
|
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
37
38
|
_defineProperty(this, "interceptSnapshot", void 0);
|
|
39
|
+
_defineProperty(this, "interceptState", void 0);
|
|
38
40
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
39
41
|
_defineProperty(this, "formField", void 0);
|
|
40
42
|
_defineProperty(this, "canSort", void 0);
|
|
@@ -47,10 +49,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
47
49
|
_defineProperty(this, "effects", void 0);
|
|
48
50
|
_defineProperty(this, "dataType", void 0);
|
|
49
51
|
_defineProperty(this, "renderClient", function (record) {
|
|
50
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptSnapshot.renderClient(record));
|
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
|
|
51
53
|
});
|
|
52
54
|
_defineProperty(this, "renderLog", function (record) {
|
|
53
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))));
|
|
55
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
|
|
54
56
|
});
|
|
55
57
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
56
58
|
return {
|
|
@@ -60,7 +62,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
60
62
|
interceptType: _this.interceptType.getComponentValue(r),
|
|
61
63
|
interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
|
|
62
64
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
|
|
63
|
-
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r)
|
|
65
|
+
interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
|
|
66
|
+
interceptState: _this.interceptState.getComponentValue(r)
|
|
64
67
|
};
|
|
65
68
|
});
|
|
66
69
|
_defineProperty(this, "renderPc", function () {
|
|
@@ -82,7 +85,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
82
85
|
logisticsOptions: _this.expressDateInstance.getExpressData(),
|
|
83
86
|
expressInterceptData: _this.expressInterceptData.getExpressData(),
|
|
84
87
|
logisticsAddressData: _this.logisticsAddressData.getAddressData(),
|
|
85
|
-
isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
|
|
88
|
+
isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing,
|
|
89
|
+
showState: true
|
|
86
90
|
}))
|
|
87
91
|
});
|
|
88
92
|
});
|
|
@@ -91,7 +95,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
91
95
|
subKey: "interceptCompany"
|
|
92
96
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
93
97
|
subKey: "interceptCode"
|
|
94
|
-
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
|
|
98
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)];
|
|
95
99
|
});
|
|
96
100
|
this.name = options.name;
|
|
97
101
|
this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
|
|
@@ -111,6 +115,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
111
115
|
this.interceptLogisticsStatus = new InterceptStatus(options);
|
|
112
116
|
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
113
117
|
this.interceptSnapshot = new InterceptSnapshot(options);
|
|
118
|
+
this.interceptState = new InterceptState(options);
|
|
114
119
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
115
120
|
id: "".concat(options.id, "_interceptCompany"),
|
|
116
121
|
name: "物流信息"
|
|
@@ -122,7 +127,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
122
127
|
this.isCombinationComponent = true;
|
|
123
128
|
this.canSort = false;
|
|
124
129
|
this.dataType = "object";
|
|
125
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot];
|
|
130
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot, this.interceptState];
|
|
126
131
|
this.rules = [{
|
|
127
132
|
validator: function validator(_, value) {
|
|
128
133
|
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre, _value$interceptSende;
|
|
@@ -7,6 +7,7 @@ import TrajectorySnapshot from "./trajectorySnapshot";
|
|
|
7
7
|
import TrajectoryStatus from '../LogisticsTrajectory/trajectoryStatus';
|
|
8
8
|
import TrajectoryLastLogisticsInfo from '../LogisticsTrajectory/trajectoryLastLogisticsInfo';
|
|
9
9
|
import TrajectoryLastUpdateTime from '../LogisticsTrajectory/trajectoryLastUpdateTime';
|
|
10
|
+
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
11
|
declare class LogisticsMoreTrajectory implements ComponentInterface {
|
|
11
12
|
name: string;
|
|
12
13
|
id: string;
|
|
@@ -26,9 +27,11 @@ declare class LogisticsMoreTrajectory implements ComponentInterface {
|
|
|
26
27
|
canSort: boolean;
|
|
27
28
|
children: ComponentInterface[];
|
|
28
29
|
dataType: ComponentInterface["dataType"];
|
|
30
|
+
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
29
31
|
constructor(options: PickOption);
|
|
30
32
|
editRender: (p: any) => React.JSX.Element;
|
|
31
33
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
34
|
+
renderStatus: (record: any, w?: number) => React.JSX.Element;
|
|
32
35
|
renderPc: () => null;
|
|
33
36
|
renderLog: (r: Record) => any;
|
|
34
37
|
getComponentValue: (r: Record) => any;
|
|
@@ -16,9 +16,10 @@ import TrajectorySnapshot from "./trajectorySnapshot";
|
|
|
16
16
|
import TrajectoryStatus from "../LogisticsTrajectory/trajectoryStatus";
|
|
17
17
|
import TrajectoryLastLogisticsInfo from "../LogisticsTrajectory/trajectoryLastLogisticsInfo";
|
|
18
18
|
import TrajectoryLastUpdateTime from "../LogisticsTrajectory/trajectoryLastUpdateTime";
|
|
19
|
+
import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
|
|
19
20
|
import GetFormItem from "../GetFormItem";
|
|
20
21
|
import ItemView from "../../commonComponents/ItemView";
|
|
21
|
-
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
22
|
+
import { isNull, ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
22
23
|
var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTrajectory(options) {
|
|
23
24
|
var _this = this,
|
|
24
25
|
_this$componentConfig3;
|
|
@@ -41,6 +42,7 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
|
|
|
41
42
|
_defineProperty(this, "canSort", void 0);
|
|
42
43
|
_defineProperty(this, "children", void 0);
|
|
43
44
|
_defineProperty(this, "dataType", void 0);
|
|
45
|
+
_defineProperty(this, "expressInterceptInstance", void 0);
|
|
44
46
|
_defineProperty(this, "editRender", function (p) {
|
|
45
47
|
var _this$componentConfig, _this$componentConfig2;
|
|
46
48
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
@@ -58,16 +60,39 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
|
|
|
58
60
|
id: _this.id,
|
|
59
61
|
label: _this.name,
|
|
60
62
|
value: record === null || record === void 0 ? void 0 : record[_this.id].map(function (item, index) {
|
|
61
|
-
return /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : record[_this.id].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/",
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : record[_this.id].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/", /*#__PURE__*/React.createElement("span", {
|
|
64
|
+
style: {
|
|
65
|
+
display: 'inline-block'
|
|
66
|
+
}
|
|
67
|
+
}, _this.renderStatus(item)), "/", item.trajectoryLastUpdateTime, "/", item.trajectoryLastLogisticsInfo);
|
|
62
68
|
})
|
|
63
69
|
}) : null;
|
|
64
70
|
});
|
|
71
|
+
_defineProperty(this, "renderStatus", function (record) {
|
|
72
|
+
var _this$expressIntercep;
|
|
73
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
74
|
+
var value = (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record['trajectoryStatus'])];
|
|
75
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
onClick: function onClick(e) {
|
|
77
|
+
return e.stopPropagation();
|
|
78
|
+
}
|
|
79
|
+
}, value !== null && value !== void 0 ? value : "--", value ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
80
|
+
modelWidth: w,
|
|
81
|
+
interceptCompany: record['trajectoryCompany'],
|
|
82
|
+
interceptCode: record['trajectoryCode'],
|
|
83
|
+
interceptSenderMobile: record['trajectoryPhone']
|
|
84
|
+
}) : null);
|
|
85
|
+
});
|
|
65
86
|
_defineProperty(this, "renderPc", function () {
|
|
66
87
|
return null;
|
|
67
88
|
});
|
|
68
89
|
_defineProperty(this, "renderLog", function (r) {
|
|
69
90
|
return !isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")]) ? r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].map(function (item, index) {
|
|
70
|
-
return /*#__PURE__*/React.createElement("div", null, (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/",
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", null, (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/", /*#__PURE__*/React.createElement("span", {
|
|
92
|
+
style: {
|
|
93
|
+
display: 'inline-block'
|
|
94
|
+
}
|
|
95
|
+
}, _this.renderStatus(item)), "/", item.trajectoryLastUpdateTime, "/", item.trajectoryLastLogisticsInfo);
|
|
71
96
|
}) : null;
|
|
72
97
|
});
|
|
73
98
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
@@ -88,6 +113,7 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
|
|
|
88
113
|
this.type = options.type;
|
|
89
114
|
this.componentConfig = options.componentConfig;
|
|
90
115
|
this.expressDateInstance = ExpressData.getInstance();
|
|
116
|
+
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
91
117
|
this.express = new TrajectoryCompany(_objectSpread(_objectSpread({}, options), {}, {
|
|
92
118
|
name: "".concat(this.name, "-\u516C\u53F8"),
|
|
93
119
|
id: "".concat(this.id, "_trajectoryMoreCompany")
|
|
@@ -102,15 +128,16 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
|
|
|
102
128
|
}));
|
|
103
129
|
this.trajectoryStatus = new TrajectoryStatus(_objectSpread(_objectSpread({}, options), {}, {
|
|
104
130
|
name: "".concat(this.name, "-\u7269\u6D41\u72B6\u6001"),
|
|
105
|
-
id: "".concat(this.id, "
|
|
131
|
+
id: "".concat(this.id, "_trajectoryMoreStatus"),
|
|
132
|
+
parentId: "".concat(this.id)
|
|
106
133
|
}));
|
|
107
134
|
this.trajectoryLastLogisticsInfo = new TrajectoryLastLogisticsInfo(_objectSpread(_objectSpread({}, options), {}, {
|
|
108
135
|
name: "".concat(this.name, "-\u6700\u540E\u7269\u6D41\u4FE1\u606F"),
|
|
109
|
-
id: "".concat(this.id, "
|
|
136
|
+
id: "".concat(this.id, "_trajectoryMoreLastLogisticsInfo")
|
|
110
137
|
}));
|
|
111
138
|
this.trajectoryLastUpdateTime = new TrajectoryLastUpdateTime(_objectSpread(_objectSpread({}, options), {}, {
|
|
112
139
|
name: "".concat(this.name, "-\u6700\u540E\u66F4\u65B0\u65F6\u95F4"),
|
|
113
|
-
id: "".concat(this.id, "
|
|
140
|
+
id: "".concat(this.id, "_trajectoryMoreLastUpdateTime")
|
|
114
141
|
}));
|
|
115
142
|
this.isCombinationComponent = true;
|
|
116
143
|
this.canSort = false;
|
|
@@ -102,7 +102,8 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
102
102
|
}));
|
|
103
103
|
this.trajectoryStatus = new TrajectoryStatus(_objectSpread(_objectSpread({}, options), {}, {
|
|
104
104
|
name: "".concat(this.name, "-\u7269\u6D41\u72B6\u6001"),
|
|
105
|
-
id: "".concat(this.id, "_trajectoryStatus")
|
|
105
|
+
id: "".concat(this.id, "_trajectoryStatus"),
|
|
106
|
+
parentId: "".concat(this.id)
|
|
106
107
|
}));
|
|
107
108
|
this.trajectoryLastLogisticsInfo = new TrajectoryLastLogisticsInfo(_objectSpread(_objectSpread({}, options), {}, {
|
|
108
109
|
name: "".concat(this.name, "-\u6700\u540E\u7269\u6D41\u4FE1\u606F"),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ALignType, Record } from "../../type";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
3
4
|
declare class TrajectoryStatus implements ComponentInterface {
|
|
4
5
|
name: string;
|
|
5
6
|
parentId: string;
|
|
@@ -15,12 +16,16 @@ declare class TrajectoryStatus implements ComponentInterface {
|
|
|
15
16
|
canSort: boolean;
|
|
16
17
|
children: ComponentInterface[];
|
|
17
18
|
dataType: ComponentInterface["dataType"];
|
|
18
|
-
|
|
19
|
+
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
20
|
+
constructor(options: PickOption & {
|
|
21
|
+
parentId: string;
|
|
22
|
+
});
|
|
23
|
+
renderStatus: (record: any, w?: number) => React.JSX.Element;
|
|
19
24
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
-
renderPc: (value:
|
|
25
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
21
26
|
renderLog: (r: Record) => any;
|
|
22
27
|
getComponentValue: (r: Record) => any;
|
|
23
|
-
renderExport: (value:
|
|
28
|
+
renderExport: (value: any, record: Record) => any;
|
|
24
29
|
editRender: () => null;
|
|
25
30
|
filterConfig: () => never[];
|
|
26
31
|
}
|
|
@@ -7,7 +7,9 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
7
|
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); }
|
|
8
8
|
import React from "react";
|
|
9
9
|
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
+
import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
|
|
10
11
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
+
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
13
|
var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(options) {
|
|
12
14
|
var _this = this;
|
|
13
15
|
_classCallCheck(this, TrajectoryStatus);
|
|
@@ -25,27 +27,46 @@ var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(optio
|
|
|
25
27
|
_defineProperty(this, "canSort", void 0);
|
|
26
28
|
_defineProperty(this, "children", void 0);
|
|
27
29
|
_defineProperty(this, "dataType", void 0);
|
|
30
|
+
_defineProperty(this, "expressInterceptInstance", void 0);
|
|
31
|
+
_defineProperty(this, "renderStatus", function (record) {
|
|
32
|
+
var _this$expressIntercep;
|
|
33
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
34
|
+
var interceptCode = "".concat(_this.parentId, "_trajectoryCode");
|
|
35
|
+
var interceptSenderMobile = "".concat(_this.parentId, "_trajectoryPhone");
|
|
36
|
+
var companyId = "".concat(_this.parentId, "_trajectoryCompany");
|
|
37
|
+
var value = (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record[_this.id])];
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
onClick: function onClick(e) {
|
|
40
|
+
return e.stopPropagation();
|
|
41
|
+
}
|
|
42
|
+
}, value !== null && value !== void 0 ? value : "--", value ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
43
|
+
modelWidth: w,
|
|
44
|
+
interceptCompany: record[companyId],
|
|
45
|
+
interceptCode: record[interceptCode],
|
|
46
|
+
interceptSenderMobile: record[interceptSenderMobile]
|
|
47
|
+
}) : null);
|
|
48
|
+
});
|
|
28
49
|
_defineProperty(this, "renderClient", function (record) {
|
|
29
50
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
30
51
|
id: _this.id,
|
|
31
52
|
label: _this.name,
|
|
32
|
-
value:
|
|
53
|
+
value: _this.renderStatus(record)
|
|
33
54
|
}) : null;
|
|
34
55
|
});
|
|
35
56
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
36
|
-
|
|
37
|
-
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
|
|
57
|
+
return _this.renderStatus(record, 700);
|
|
38
58
|
});
|
|
39
59
|
_defineProperty(this, "renderLog", function (r) {
|
|
40
|
-
|
|
41
|
-
|
|
60
|
+
var _this$expressIntercep2;
|
|
61
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
62
|
+
return (_this$expressIntercep2 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep2 === void 0 ? void 0 : _this$expressIntercep2[r === null || r === void 0 ? void 0 : r["".concat(_this.id)]];
|
|
42
63
|
});
|
|
43
64
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
44
65
|
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
45
66
|
});
|
|
46
67
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
47
|
-
var
|
|
48
|
-
return (
|
|
68
|
+
var _this$expressIntercep3, _this$expressIntercep4;
|
|
69
|
+
return (_this$expressIntercep3 = (_this$expressIntercep4 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep4 === void 0 ? void 0 : _this$expressIntercep4["".concat(record === null || record === void 0 ? void 0 : record[_this.id])]) !== null && _this$expressIntercep3 !== void 0 ? _this$expressIntercep3 : "--";
|
|
49
70
|
});
|
|
50
71
|
_defineProperty(this, "editRender", function () {
|
|
51
72
|
return null;
|
|
@@ -54,7 +75,7 @@ var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(optio
|
|
|
54
75
|
return [];
|
|
55
76
|
});
|
|
56
77
|
this.name = options.name;
|
|
57
|
-
this.parentId = options.
|
|
78
|
+
this.parentId = "".concat(options.parentId);
|
|
58
79
|
this.id = "".concat(options.id);
|
|
59
80
|
this.sortField = "".concat(options.id);
|
|
60
81
|
this.formField = "".concat(options.id);
|
|
@@ -67,5 +88,6 @@ var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(optio
|
|
|
67
88
|
this.canSort = false;
|
|
68
89
|
this.dataType = "string";
|
|
69
90
|
this.children = [];
|
|
91
|
+
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
70
92
|
});
|
|
71
93
|
export default TrajectoryStatus;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName,
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, 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, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, CommonInput, PaymentVoucherCode } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BuyerNick | CommonInput |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BuyerNick | CommonInput | CompletedUser | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | PaymentVoucherCode;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -76,6 +76,7 @@ export { default as MsgStatus } from './components/MsgStatus';
|
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
77
|
export { default as CommonInput } from "./components/CommonInput";
|
|
78
78
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
79
|
+
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
79
80
|
export { factory } from "./factory";
|
|
80
81
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
81
82
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
@@ -84,3 +85,4 @@ export { default as ShopList } from "./commonComponents/ShopList";
|
|
|
84
85
|
export { default as OperationLog } from "./commonComponents/OperationLog";
|
|
85
86
|
export { default as GetFormItem } from "./components/GetFormItem";
|
|
86
87
|
export { default as Global } from "./commonComponents/GlobalContext";
|
|
88
|
+
export * as ErpScenes from "./commonComponents/ErpContext";
|
package/dist/esm/index.js
CHANGED
|
@@ -76,6 +76,8 @@ export { default as MsgStatus } from "./components/MsgStatus";
|
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
77
|
export { default as CommonInput } from "./components/CommonInput";
|
|
78
78
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
79
|
+
// TODO: ERP 打款工单使用
|
|
80
|
+
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
79
81
|
export { factory } from "./factory";
|
|
80
82
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
81
83
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
@@ -83,4 +85,6 @@ export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
|
|
83
85
|
export { default as ShopList } from "./commonComponents/ShopList";
|
|
84
86
|
export { default as OperationLog } from "./commonComponents/OperationLog";
|
|
85
87
|
export { default as GetFormItem } from "./components/GetFormItem";
|
|
86
|
-
export { default as Global } from "./commonComponents/GlobalContext";
|
|
88
|
+
export { default as Global } from "./commonComponents/GlobalContext";
|
|
89
|
+
import * as _ErpScenes from "./commonComponents/ErpContext";
|
|
90
|
+
export { _ErpScenes as ErpScenes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.28.2-rc.
|
|
3
|
+
"version": "0.28.2-rc.12",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.28.2-rc.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.28.2-rc.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.28.2-rc.11",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.28.2-rc.8"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "94e64aecdfee39a5cad3b8391d11fb8208aa09aa",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|