@kmkf-fe-packages/services-components 0.28.2-alpha.3 → 0.28.2-alpha.7
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/components/ErpTradeId/components/OrderNum/index.d.ts +2 -1
- package/dist/esm/components/ErpTradeId/components/OrderNum/index.js +17 -10
- package/dist/esm/components/ErpTradeId/components/OrderNum/{index.module.scss → index.less} +2 -2
- package/dist/esm/components/ErpTradeId/index.js +9 -1
- package/dist/esm/components/Payment/PaymentTid.d.ts +2 -1
- package/dist/esm/components/Payment/PaymentTid.js +25 -2
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,8 @@
|
|
|
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
|
+
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; }
|
|
2
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; }
|
|
3
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; }
|
|
4
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; }
|
|
@@ -26,21 +30,21 @@ import get from 'lodash/get';
|
|
|
26
30
|
import { ErpScenes } from "../../../../index";
|
|
27
31
|
import { queryOrderDetail, queryDouDianOpenId } from "./communication";
|
|
28
32
|
import noImage from "./noImage.png";
|
|
29
|
-
import
|
|
33
|
+
import "./index.less";
|
|
30
34
|
var Card = function Card(_ref) {
|
|
31
35
|
var tid = _ref.tid,
|
|
32
36
|
sid = _ref.sid,
|
|
33
37
|
itemList = _ref.itemList,
|
|
34
38
|
sysStatusName = _ref.sysStatusName;
|
|
35
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
-
className:
|
|
40
|
+
className: "erp-suborder-card"
|
|
37
41
|
}, /*#__PURE__*/React.createElement("span", {
|
|
38
42
|
style: {
|
|
39
43
|
display: 'flex',
|
|
40
44
|
alignItems: 'center'
|
|
41
45
|
}
|
|
42
46
|
}, sysStatusName && /*#__PURE__*/React.createElement("span", {
|
|
43
|
-
className:
|
|
47
|
+
className: "tag"
|
|
44
48
|
}, sysStatusName), /*#__PURE__*/React.createElement("span", {
|
|
45
49
|
style: {
|
|
46
50
|
marginLeft: '8px',
|
|
@@ -49,7 +53,7 @@ var Card = function Card(_ref) {
|
|
|
49
53
|
}
|
|
50
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) {
|
|
51
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className:
|
|
56
|
+
className: "good"
|
|
53
57
|
}, item.picUrl ? /*#__PURE__*/React.createElement(Image, {
|
|
54
58
|
width: 56,
|
|
55
59
|
src: item.picUrl
|
|
@@ -61,9 +65,9 @@ var Card = function Card(_ref) {
|
|
|
61
65
|
height: '56px'
|
|
62
66
|
}
|
|
63
67
|
}), /*#__PURE__*/React.createElement("div", {
|
|
64
|
-
className:
|
|
68
|
+
className: "content"
|
|
65
69
|
}, /*#__PURE__*/React.createElement("span", null, item.title), /*#__PURE__*/React.createElement("span", null, item.productCode)), /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className:
|
|
70
|
+
className: "price"
|
|
67
71
|
}, item.price && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("b", {
|
|
68
72
|
style: {
|
|
69
73
|
color: '#ff7a45',
|
|
@@ -100,7 +104,7 @@ var SubOrderList = function SubOrderList(_ref2) {
|
|
|
100
104
|
height: '300px',
|
|
101
105
|
overflowY: 'auto'
|
|
102
106
|
},
|
|
103
|
-
className:
|
|
107
|
+
className: "erp-suborder-itemWrap",
|
|
104
108
|
onClick: function onClick(e) {
|
|
105
109
|
return e.stopPropagation();
|
|
106
110
|
}
|
|
@@ -115,7 +119,9 @@ var SubOrderList = function SubOrderList(_ref2) {
|
|
|
115
119
|
};
|
|
116
120
|
var OrderNum = function OrderNum(_ref3) {
|
|
117
121
|
var value = _ref3.value,
|
|
118
|
-
onChange = _ref3.onChange
|
|
122
|
+
onChange = _ref3.onChange,
|
|
123
|
+
onTradeIdBlur = _ref3.onTradeIdBlur,
|
|
124
|
+
otherProp = _objectWithoutProperties(_ref3, _excluded);
|
|
119
125
|
var _useContext2 = useContext(ErpScenes.ErpContext),
|
|
120
126
|
visible = _useContext2.subOrderListVisible,
|
|
121
127
|
orderList = _useContext2.orderList,
|
|
@@ -126,6 +132,7 @@ var OrderNum = function OrderNum(_ref3) {
|
|
|
126
132
|
if (!value) return;
|
|
127
133
|
setGlobalLoading(true);
|
|
128
134
|
queryOrderDetail(value);
|
|
135
|
+
typeof onTradeIdBlur === 'function' && onTradeIdBlur(value);
|
|
129
136
|
};
|
|
130
137
|
useEffect(function () {
|
|
131
138
|
document.body.addEventListener('click', function () {
|
|
@@ -151,10 +158,10 @@ var OrderNum = function OrderNum(_ref3) {
|
|
|
151
158
|
onClick: function onClick(e) {
|
|
152
159
|
return e.stopPropagation();
|
|
153
160
|
}
|
|
154
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
161
|
+
}, /*#__PURE__*/React.createElement(Input, _extends({
|
|
155
162
|
value: value,
|
|
156
163
|
onChange: onChange
|
|
157
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
164
|
+
}, otherProp)), /*#__PURE__*/React.createElement(Button, {
|
|
158
165
|
type: "primary",
|
|
159
166
|
onClick: handleQueryOrderDetail
|
|
160
167
|
}, "\u67E5\u8BE2\u8BA2\u5355")));
|
|
@@ -1,4 +1,5 @@
|
|
|
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"); } }
|
|
@@ -28,6 +29,10 @@ var ErpTradeId = /*#__PURE__*/function (_TradeId) {
|
|
|
28
29
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
30
|
_defineProperty(_assertThisInitialized(_this), "editRender", function (p) {
|
|
30
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
|
+
};
|
|
31
36
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
32
37
|
title: _this.name,
|
|
33
38
|
name: _this.id,
|
|
@@ -35,7 +40,10 @@ var ErpTradeId = /*#__PURE__*/function (_TradeId) {
|
|
|
35
40
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
36
41
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
37
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,
|
|
38
|
-
component: /*#__PURE__*/React.createElement(OrderNo,
|
|
43
|
+
component: /*#__PURE__*/React.createElement(OrderNo, _extends({}, _this.componentConfig, {
|
|
44
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
45
|
+
onTradeIdBlur: onTradeIdBlur
|
|
46
|
+
}))
|
|
39
47
|
});
|
|
40
48
|
});
|
|
41
49
|
return _this;
|
|
@@ -16,7 +16,8 @@ declare class PaymentTid implements ComponentInterface {
|
|
|
16
16
|
dataType: ComponentInterface['dataType'];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
|
|
19
|
+
copyHandle: (text: string) => void;
|
|
20
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
21
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
22
|
getComponentValue: (r: Record) => any;
|
|
22
23
|
renderExport: (value: string) => string;
|
|
@@ -6,10 +6,13 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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
|
+
import { message } from 'antd';
|
|
9
10
|
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
11
|
+
import { CopyOutlined } from '@ant-design/icons';
|
|
10
12
|
import GetFormItem from "../GetFormItem";
|
|
11
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
12
14
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
15
|
+
import copy from 'copy-to-clipboard';
|
|
13
16
|
import { SYMBOL } from "../../constant";
|
|
14
17
|
var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
15
18
|
var _this = this;
|
|
@@ -34,9 +37,29 @@ var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
|
34
37
|
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
35
38
|
}) : null;
|
|
36
39
|
});
|
|
40
|
+
_defineProperty(this, "copyHandle", function (text) {
|
|
41
|
+
copy(text);
|
|
42
|
+
message.success('复制成功');
|
|
43
|
+
});
|
|
37
44
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
47
|
+
}
|
|
48
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
49
|
+
onClick: function onClick(e) {
|
|
50
|
+
return e.stopPropagation();
|
|
51
|
+
}
|
|
52
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
onClick: function onClick(e) {
|
|
54
|
+
_this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
55
|
+
e.stopPropagation();
|
|
56
|
+
}
|
|
57
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
58
|
+
style: {
|
|
59
|
+
paddingLeft: '4px',
|
|
60
|
+
cursor: 'pointer'
|
|
61
|
+
}
|
|
62
|
+
}, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
|
|
40
63
|
});
|
|
41
64
|
_defineProperty(this, "renderLog", function (r) {
|
|
42
65
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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, WdtGoods, CommonInput, PaymentVoucherCode } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName |
|
|
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 | WdtGoods | PaymentVoucherCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.28.2-alpha.
|
|
3
|
+
"version": "0.28.2-alpha.7",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "cc4f2f7b671ba6db5d5606ac95be871f81f9f52a",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|