@kmkf-fe-packages/services-components 0.7.15-alpha.3 → 0.7.15-alpha.31
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/QueryLogisticsTrack/index.js +23 -21
- package/dist/esm/components/BS/BsExchange/index.d.ts +4 -3
- package/dist/esm/components/BS/BsExchange/index.js +194 -16
- package/dist/esm/components/BS/BsGoods/index.d.ts +4 -4
- package/dist/esm/components/BS/BsGoods/index.js +55 -22
- package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -7
- package/dist/esm/components/BS/BsLogistics/index.js +14 -14
- package/dist/esm/components/BS/BsReissue/index.d.ts +4 -8
- package/dist/esm/components/BS/BsReissue/index.js +83 -24
- package/dist/esm/components/BS/common/BsHeaderCode.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderCode.js +71 -0
- package/dist/esm/components/BS/common/BsHeaderMoney.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderMoney.js +71 -0
- package/dist/esm/components/BS/common/BsHeaderName.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderName.js +71 -0
- package/dist/esm/components/BS/common/BsHeaderNumber.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderNumber.js +71 -0
- package/dist/esm/components/BS/common/BsHeaderPic.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderPic.js +72 -0
- package/dist/esm/components/BS/common/BsHeaderShare.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderShare.js +71 -0
- package/dist/esm/components/BS/common/BsHeaderSku.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderSku.js +71 -0
- package/dist/esm/components/BS/common/BsHeaderType.d.ts +25 -0
- package/dist/esm/components/BS/common/BsHeaderType.js +71 -0
- package/dist/esm/components/BS/common/index.d.ts +10 -0
- package/dist/esm/components/BS/common/index.js +10 -0
- package/dist/esm/components/Cascader/index.d.ts +1 -0
- package/dist/esm/components/Cascader/index.js +3 -1
- package/dist/esm/components/Common/index.d.ts +1 -0
- package/dist/esm/components/Common/index.js +11 -1
- package/dist/esm/components/JST/JstLogistics/index.js +25 -8
- package/dist/esm/components/LogisticsTrajectory/index.d.ts +0 -2
- package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +5 -4
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +0 -1
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +2 -8
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +3 -9
- package/dist/esm/components/PostIng/index.js +2 -2
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +2 -3
- package/dist/esm/type.d.ts +2 -1
- package/package.json +4 -4
|
@@ -9,7 +9,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
9
9
|
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; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import React, { useState } from "react";
|
|
12
|
-
import { Modal, Timeline, message
|
|
12
|
+
import { Modal, Timeline, message } from "antd";
|
|
13
13
|
import { request } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
var info = Modal.info;
|
|
15
15
|
var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
@@ -48,24 +48,26 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
48
48
|
}
|
|
49
49
|
return _context.abrupt("return", message.error("缺少物流公司或物流单号"));
|
|
50
50
|
case 2:
|
|
51
|
+
logisticsTraceSearch();
|
|
51
52
|
//如果是顺丰且没有手机号 要输入手机号
|
|
52
|
-
if (interceptCompany === "SF" && !interceptSenderMobile) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
// if (interceptCompany === "SF" && !interceptSenderMobile) {
|
|
54
|
+
// Modal.confirm({
|
|
55
|
+
// title: "查询物流轨迹",
|
|
56
|
+
// okText: "查询",
|
|
57
|
+
// cancelText: "取消",
|
|
58
|
+
// content: (
|
|
59
|
+
// <div>
|
|
60
|
+
// 发件人手机号
|
|
61
|
+
// <Input onChange={(e) => setInputVal(e.target.value)}></Input>
|
|
62
|
+
// </div>
|
|
63
|
+
// ),
|
|
64
|
+
// onOk: () => {
|
|
65
|
+
// logisticsTraceSearch(inputVal);
|
|
66
|
+
// },
|
|
67
|
+
// });
|
|
68
|
+
// } else {
|
|
69
|
+
// logisticsTraceSearch();
|
|
70
|
+
// }
|
|
69
71
|
case 3:
|
|
70
72
|
case "end":
|
|
71
73
|
return _context.stop();
|
|
@@ -93,17 +95,17 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
93
95
|
var result = res.result,
|
|
94
96
|
success = res.success,
|
|
95
97
|
data = res.data,
|
|
96
|
-
|
|
98
|
+
msg = res.message;
|
|
97
99
|
if (result === 100 || success) {
|
|
98
100
|
info({
|
|
99
101
|
title: "物流轨迹",
|
|
100
102
|
okText: "确定",
|
|
101
103
|
icon: null,
|
|
102
104
|
width: modelWidth,
|
|
103
|
-
content: LogisticsList(data)
|
|
105
|
+
content: LogisticsList(data === null || data === void 0 ? void 0 : data.traceDetailList)
|
|
104
106
|
});
|
|
105
107
|
} else {
|
|
106
|
-
|
|
108
|
+
msg && message.error(msg);
|
|
107
109
|
}
|
|
108
110
|
});
|
|
109
111
|
} catch (err) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import BsExchangeImage from "../common/BsExchangeImage";
|
|
4
|
-
import BsType from "../common/
|
|
5
|
-
import BsMemo from "../common/BsMemo";
|
|
4
|
+
import { BsType, BsMemo } from "../common/index";
|
|
6
5
|
declare class BsExchange implements ComponentInterface {
|
|
7
6
|
name: string;
|
|
8
7
|
id: string;
|
|
@@ -24,7 +23,7 @@ declare class BsExchange implements ComponentInterface {
|
|
|
24
23
|
renderPc: () => null;
|
|
25
24
|
renderLog: (r: Record) => null;
|
|
26
25
|
getComponentValue: (r: Record) => any;
|
|
27
|
-
renderExport: (value: any, record: any) =>
|
|
26
|
+
renderExport: (value: any, record: any) => null;
|
|
28
27
|
editRender: (p: any) => React.JSX.Element;
|
|
29
28
|
filterConfig: (item: ColumnConfig) => ({
|
|
30
29
|
searchDefaultConditions: "eq";
|
|
@@ -42,6 +41,8 @@ declare class BsExchange implements ComponentInterface {
|
|
|
42
41
|
id: string;
|
|
43
42
|
name: string;
|
|
44
43
|
filterComponentType: "Input";
|
|
44
|
+
props?: undefined;
|
|
45
|
+
filterFn?: undefined;
|
|
45
46
|
})[];
|
|
46
47
|
}
|
|
47
48
|
export default BsExchange;
|
|
@@ -1,12 +1,12 @@
|
|
|
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 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
|
-
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
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
4
|
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); }
|
|
7
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
7
|
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; }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
10
|
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); }
|
|
11
11
|
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); } }
|
|
12
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -18,13 +18,118 @@ import React from "react";
|
|
|
18
18
|
import GetFormItem from "../../GetFormItem";
|
|
19
19
|
import { GoodImage } from "../../Common";
|
|
20
20
|
import ItemView from "../../../commonComponents/ItemView";
|
|
21
|
-
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
21
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
22
22
|
import { BsExchange as Exchange } from "@kmkf-fe-packages/basic-components";
|
|
23
|
+
import { SYMBOL } from "../../../constant";
|
|
23
24
|
import BsExchangeImage from "../common/BsExchangeImage";
|
|
24
|
-
import BsType from "../common/
|
|
25
|
-
|
|
25
|
+
import { BsType, BsMemo, BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "../common/index";
|
|
26
|
+
var returnHeaderMap = {
|
|
27
|
+
pic: {
|
|
28
|
+
component: BsHeaderPic,
|
|
29
|
+
name: "退回图片"
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
component: BsHeaderName,
|
|
33
|
+
name: "退回名称"
|
|
34
|
+
},
|
|
35
|
+
code: {
|
|
36
|
+
component: BsHeaderCode,
|
|
37
|
+
name: "退回编码"
|
|
38
|
+
},
|
|
39
|
+
sku: {
|
|
40
|
+
component: BsHeaderSku,
|
|
41
|
+
name: "退回sku编码"
|
|
42
|
+
},
|
|
43
|
+
money: {
|
|
44
|
+
component: BsHeaderMoney,
|
|
45
|
+
name: "退回实付金额"
|
|
46
|
+
},
|
|
47
|
+
number: {
|
|
48
|
+
component: BsHeaderNumber,
|
|
49
|
+
name: "退回数量"
|
|
50
|
+
},
|
|
51
|
+
share: {
|
|
52
|
+
component: BsHeaderShare,
|
|
53
|
+
name: "退回分摊价"
|
|
54
|
+
},
|
|
55
|
+
type: {
|
|
56
|
+
component: BsHeaderType,
|
|
57
|
+
name: "退回赠品类型"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var swapOutHeaderMap = {
|
|
61
|
+
pic: {
|
|
62
|
+
component: BsHeaderPic,
|
|
63
|
+
name: "换出图片"
|
|
64
|
+
},
|
|
65
|
+
name: {
|
|
66
|
+
component: BsHeaderName,
|
|
67
|
+
name: "换出名称"
|
|
68
|
+
},
|
|
69
|
+
code: {
|
|
70
|
+
component: BsHeaderCode,
|
|
71
|
+
name: "换出编码"
|
|
72
|
+
},
|
|
73
|
+
sku: {
|
|
74
|
+
component: BsHeaderSku,
|
|
75
|
+
name: "换出sku编码"
|
|
76
|
+
},
|
|
77
|
+
money: {
|
|
78
|
+
component: BsHeaderMoney,
|
|
79
|
+
name: "换出实付金额"
|
|
80
|
+
},
|
|
81
|
+
number: {
|
|
82
|
+
component: BsHeaderNumber,
|
|
83
|
+
name: "换出数量"
|
|
84
|
+
},
|
|
85
|
+
share: {
|
|
86
|
+
component: BsHeaderShare,
|
|
87
|
+
name: "换出分摊价"
|
|
88
|
+
},
|
|
89
|
+
type: {
|
|
90
|
+
component: BsHeaderType,
|
|
91
|
+
name: "换出赠品类型"
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var giftHeaderMap = {
|
|
95
|
+
pic: {
|
|
96
|
+
component: BsHeaderPic,
|
|
97
|
+
name: "赠品图片"
|
|
98
|
+
},
|
|
99
|
+
name: {
|
|
100
|
+
component: BsHeaderName,
|
|
101
|
+
name: "赠品名称"
|
|
102
|
+
},
|
|
103
|
+
code: {
|
|
104
|
+
component: BsHeaderCode,
|
|
105
|
+
name: "赠品编码"
|
|
106
|
+
},
|
|
107
|
+
sku: {
|
|
108
|
+
component: BsHeaderSku,
|
|
109
|
+
name: "赠品sku编码"
|
|
110
|
+
},
|
|
111
|
+
money: {
|
|
112
|
+
component: BsHeaderMoney,
|
|
113
|
+
name: "赠品实付金额"
|
|
114
|
+
},
|
|
115
|
+
number: {
|
|
116
|
+
component: BsHeaderNumber,
|
|
117
|
+
name: "赠品数量"
|
|
118
|
+
},
|
|
119
|
+
share: {
|
|
120
|
+
component: BsHeaderShare,
|
|
121
|
+
name: "赠品分摊价"
|
|
122
|
+
},
|
|
123
|
+
type: {
|
|
124
|
+
component: BsHeaderType,
|
|
125
|
+
name: "赠品赠品类型"
|
|
126
|
+
}
|
|
127
|
+
};
|
|
26
128
|
var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
27
|
-
var _this = this
|
|
129
|
+
var _this = this,
|
|
130
|
+
_options$componentCon,
|
|
131
|
+
_options$componentCon2,
|
|
132
|
+
_options$componentCon3;
|
|
28
133
|
_classCallCheck(this, BsExchange);
|
|
29
134
|
_defineProperty(this, "name", void 0);
|
|
30
135
|
_defineProperty(this, "id", void 0);
|
|
@@ -58,13 +163,10 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
58
163
|
return null;
|
|
59
164
|
});
|
|
60
165
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
61
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id
|
|
166
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
62
167
|
});
|
|
63
168
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
64
|
-
|
|
65
|
-
return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsGoods")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (i) {
|
|
66
|
-
return i.numIid;
|
|
67
|
-
}).join("\n");
|
|
169
|
+
return null;
|
|
68
170
|
});
|
|
69
171
|
_defineProperty(this, "editRender", function (p) {
|
|
70
172
|
var _this$componentConfig, _this$effects, _this$effects2;
|
|
@@ -83,15 +185,48 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
83
185
|
});
|
|
84
186
|
});
|
|
85
187
|
_defineProperty(this, "filterConfig", function (item) {
|
|
86
|
-
|
|
188
|
+
var _item$config;
|
|
189
|
+
return [{
|
|
190
|
+
searchDefaultConditions: SYMBOL.eq,
|
|
191
|
+
type: item.type,
|
|
192
|
+
id: "".concat(item.id, "_bsReissueType"),
|
|
193
|
+
name: "".concat(item.name, "-\u6362\u8D27\u7C7B\u578B"),
|
|
194
|
+
filterComponentType: "Cascader",
|
|
195
|
+
props: {
|
|
196
|
+
options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
|
|
197
|
+
},
|
|
198
|
+
filterFn: function filterFn(value) {
|
|
199
|
+
return function (i) {
|
|
200
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "bsReissueType"), value);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}, {
|
|
204
|
+
searchDefaultConditions: SYMBOL.like,
|
|
205
|
+
type: item.type,
|
|
206
|
+
id: "".concat(item.id, "_bsExchangeReturnGoods"),
|
|
207
|
+
name: "".concat(_this.name, "-\u9000\u56DE"),
|
|
208
|
+
filterComponentType: "Input"
|
|
209
|
+
}, {
|
|
210
|
+
searchDefaultConditions: SYMBOL.like,
|
|
211
|
+
type: item.type,
|
|
212
|
+
id: "".concat(item.id, "_bsExchangeSwapOutGoods"),
|
|
213
|
+
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
214
|
+
filterComponentType: "Input"
|
|
215
|
+
}, {
|
|
216
|
+
searchDefaultConditions: SYMBOL.like,
|
|
217
|
+
type: item.type,
|
|
218
|
+
id: "".concat(item.id, "_bsExchangeGiftGoods"),
|
|
219
|
+
name: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
220
|
+
filterComponentType: "Input"
|
|
221
|
+
}];
|
|
87
222
|
});
|
|
88
223
|
this.name = options.name;
|
|
89
224
|
this.id = options.id;
|
|
90
|
-
this.sortField = "".concat(options.id
|
|
91
|
-
this.formField = "".concat(options.id
|
|
225
|
+
this.sortField = "".concat(options.id);
|
|
226
|
+
this.formField = "".concat(options.id);
|
|
92
227
|
this.type = options.type;
|
|
93
228
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
94
|
-
this.isCombinationComponent =
|
|
229
|
+
this.isCombinationComponent = true;
|
|
95
230
|
this.canSort = false;
|
|
96
231
|
this.goodImage = new BsExchangeImage(_objectSpread(_objectSpread({}, options), {}, {
|
|
97
232
|
id: "".concat(options.id),
|
|
@@ -105,7 +240,37 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
105
240
|
id: "".concat(options.id, "_bsReissueType"),
|
|
106
241
|
name: "换货备注"
|
|
107
242
|
}));
|
|
108
|
-
this.children = [
|
|
243
|
+
this.children = [new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
244
|
+
id: "".concat(options.id, "_bsReissueType"),
|
|
245
|
+
name: "换货类型"
|
|
246
|
+
})), new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
247
|
+
id: "".concat(options.id, "_bsReissueType"),
|
|
248
|
+
name: "换货备注"
|
|
249
|
+
}))].concat(_toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []).reduce(function (prv, next) {
|
|
250
|
+
if (returnHeaderMap[next]) {
|
|
251
|
+
prv.push(new returnHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
252
|
+
name: returnHeaderMap[next].name,
|
|
253
|
+
id: "".concat(options.id, "_bsExchangeReturnGoods")
|
|
254
|
+
})));
|
|
255
|
+
}
|
|
256
|
+
return prv;
|
|
257
|
+
}, [])), _toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showHeader) || []).reduce(function (prv, next) {
|
|
258
|
+
if (swapOutHeaderMap[next]) {
|
|
259
|
+
prv.push(new swapOutHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
260
|
+
name: swapOutHeaderMap[next].name,
|
|
261
|
+
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
262
|
+
})));
|
|
263
|
+
}
|
|
264
|
+
return prv;
|
|
265
|
+
}, [])), _toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon3 = options.componentConfig) === null || _options$componentCon3 === void 0 ? void 0 : _options$componentCon3.showHeader) || []).reduce(function (prv, next) {
|
|
266
|
+
if (giftHeaderMap[next]) {
|
|
267
|
+
prv.push(new giftHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
268
|
+
name: giftHeaderMap[next].name,
|
|
269
|
+
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
270
|
+
})));
|
|
271
|
+
}
|
|
272
|
+
return prv;
|
|
273
|
+
}, [])));
|
|
109
274
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
110
275
|
this.rules = [{
|
|
111
276
|
required: true,
|
|
@@ -119,7 +284,14 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
119
284
|
}, {
|
|
120
285
|
validator: function validator(_, value) {
|
|
121
286
|
var _value$bsExchangeType;
|
|
287
|
+
console.log(value);
|
|
122
288
|
if (value && ["2", "4"].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0])) {
|
|
289
|
+
var hasNoGood = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
290
|
+
return !(item !== null && item !== void 0 && item.bsExchangeReturnGoods.length);
|
|
291
|
+
});
|
|
292
|
+
if (hasNoGood) {
|
|
293
|
+
return Promise.reject(new Error("请选择退回商品后再提交工单"));
|
|
294
|
+
}
|
|
123
295
|
var hasMore = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
124
296
|
var returnMoney = ((item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || []).reduce(function (prv, next) {
|
|
125
297
|
prv += Number(next.money || 0);
|
|
@@ -134,6 +306,12 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
134
306
|
if (hasMore) {
|
|
135
307
|
return Promise.reject(new Error("换货商品的金额不能大于退回商品的金额"));
|
|
136
308
|
}
|
|
309
|
+
var hasLen = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
310
|
+
return (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods.length) !== (item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods.length);
|
|
311
|
+
});
|
|
312
|
+
if (hasLen) {
|
|
313
|
+
return Promise.reject(new Error("请核对商品数据,再提交工单"));
|
|
314
|
+
}
|
|
137
315
|
}
|
|
138
316
|
return Promise.resolve();
|
|
139
317
|
}
|
|
@@ -15,10 +15,10 @@ declare class BsGoods implements ComponentInterface {
|
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => any;
|
|
18
|
-
renderPc: (
|
|
19
|
-
renderLog: (r: Record) =>
|
|
18
|
+
renderPc: () => null;
|
|
19
|
+
renderLog: (r: Record) => null;
|
|
20
20
|
getComponentValue: (r: Record) => any;
|
|
21
|
-
renderExport: (
|
|
21
|
+
renderExport: () => null;
|
|
22
22
|
editRender: (p: any) => React.JSX.Element;
|
|
23
23
|
filterConfig: (item: ColumnConfig) => {
|
|
24
24
|
searchDefaultConditions: "like";
|
|
@@ -26,6 +26,6 @@ declare class BsGoods implements ComponentInterface {
|
|
|
26
26
|
id: string;
|
|
27
27
|
name: string;
|
|
28
28
|
filterComponentType: "Input";
|
|
29
|
-
};
|
|
29
|
+
}[];
|
|
30
30
|
}
|
|
31
31
|
export default BsGoods;
|
|
@@ -1,4 +1,6 @@
|
|
|
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 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
|
+
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; }
|
|
2
4
|
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); }
|
|
3
5
|
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); } }
|
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -9,11 +11,47 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
9
11
|
import React from "react";
|
|
10
12
|
import GetFormItem from "../../GetFormItem";
|
|
11
13
|
import { BsGoodImage } from "../../Common";
|
|
14
|
+
import { BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "../common/index";
|
|
12
15
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
16
|
import { BsGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
14
17
|
import { SYMBOL } from "../../../constant";
|
|
18
|
+
var childHeaderMap = {
|
|
19
|
+
pic: {
|
|
20
|
+
component: BsHeaderPic,
|
|
21
|
+
name: "图片"
|
|
22
|
+
},
|
|
23
|
+
name: {
|
|
24
|
+
component: BsHeaderName,
|
|
25
|
+
name: "名称"
|
|
26
|
+
},
|
|
27
|
+
code: {
|
|
28
|
+
component: BsHeaderCode,
|
|
29
|
+
name: "编码"
|
|
30
|
+
},
|
|
31
|
+
sku: {
|
|
32
|
+
component: BsHeaderSku,
|
|
33
|
+
name: "sku编码"
|
|
34
|
+
},
|
|
35
|
+
money: {
|
|
36
|
+
component: BsHeaderMoney,
|
|
37
|
+
name: "实付金额"
|
|
38
|
+
},
|
|
39
|
+
number: {
|
|
40
|
+
component: BsHeaderNumber,
|
|
41
|
+
name: "数量"
|
|
42
|
+
},
|
|
43
|
+
share: {
|
|
44
|
+
component: BsHeaderShare,
|
|
45
|
+
name: "分摊价"
|
|
46
|
+
},
|
|
47
|
+
type: {
|
|
48
|
+
component: BsHeaderType,
|
|
49
|
+
name: "赠品类型"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
15
52
|
var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
16
53
|
var _this = this,
|
|
54
|
+
_options$componentCon,
|
|
17
55
|
_this$componentConfig2;
|
|
18
56
|
_classCallCheck(this, BsGoods);
|
|
19
57
|
_defineProperty(this, "name", void 0);
|
|
@@ -36,30 +74,17 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
36
74
|
});
|
|
37
75
|
}) : null;
|
|
38
76
|
});
|
|
39
|
-
_defineProperty(this, "renderPc", function (
|
|
40
|
-
|
|
41
|
-
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
42
|
-
}
|
|
43
|
-
//兼容多个商品
|
|
44
|
-
return record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsGoods")].map(function (item, index) {
|
|
45
|
-
return /*#__PURE__*/React.createElement(BsGoodImage, {
|
|
46
|
-
item: item,
|
|
47
|
-
index: index
|
|
48
|
-
});
|
|
49
|
-
});
|
|
77
|
+
_defineProperty(this, "renderPc", function () {
|
|
78
|
+
return null;
|
|
50
79
|
});
|
|
51
80
|
_defineProperty(this, "renderLog", function (r) {
|
|
52
|
-
|
|
53
|
-
return _this.renderPc(undefined, r);
|
|
81
|
+
return null;
|
|
54
82
|
});
|
|
55
83
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
56
84
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsGoods")];
|
|
57
85
|
});
|
|
58
|
-
_defineProperty(this, "renderExport", function (
|
|
59
|
-
|
|
60
|
-
return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsGoods")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (i) {
|
|
61
|
-
return i.numIid;
|
|
62
|
-
}).join("\n");
|
|
86
|
+
_defineProperty(this, "renderExport", function () {
|
|
87
|
+
return null;
|
|
63
88
|
});
|
|
64
89
|
_defineProperty(this, "editRender", function (p) {
|
|
65
90
|
var _this$componentConfig, _this$effects, _this$effects2;
|
|
@@ -78,7 +103,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
78
103
|
});
|
|
79
104
|
});
|
|
80
105
|
_defineProperty(this, "filterConfig", function (item) {
|
|
81
|
-
return {
|
|
106
|
+
return [{
|
|
82
107
|
searchDefaultConditions: SYMBOL.like,
|
|
83
108
|
type: item.type,
|
|
84
109
|
id: "".concat(item.id, "_bsGoods"),
|
|
@@ -86,7 +111,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
86
111
|
name: item.name,
|
|
87
112
|
// 过滤组件名称
|
|
88
113
|
filterComponentType: "Input"
|
|
89
|
-
};
|
|
114
|
+
}];
|
|
90
115
|
});
|
|
91
116
|
this.name = options.name;
|
|
92
117
|
this.id = options.id;
|
|
@@ -94,9 +119,17 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
94
119
|
this.formField = "".concat(options.id, "_bsGoods");
|
|
95
120
|
this.type = options.type;
|
|
96
121
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
97
|
-
this.isCombinationComponent =
|
|
122
|
+
this.isCombinationComponent = true;
|
|
98
123
|
this.canSort = false;
|
|
99
|
-
this.children = []
|
|
124
|
+
this.children = ((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []).reduce(function (prv, next) {
|
|
125
|
+
if (childHeaderMap[next]) {
|
|
126
|
+
prv.push(new childHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
127
|
+
name: childHeaderMap[next].name,
|
|
128
|
+
id: "".concat(options.id, "_bsGoods")
|
|
129
|
+
})));
|
|
130
|
+
}
|
|
131
|
+
return prv;
|
|
132
|
+
}, []);
|
|
100
133
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
101
134
|
this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
|
|
102
135
|
required: true,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData } from
|
|
4
|
-
import Express from
|
|
5
|
-
import ExpressCode from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
|
+
import Express from '../../Express';
|
|
5
|
+
import ExpressCode from '../../ExpressCode';
|
|
6
6
|
declare class BsLogistics implements ComponentInterface {
|
|
7
7
|
name: string;
|
|
8
8
|
id: string;
|
|
9
9
|
sortField: string;
|
|
10
10
|
type: string;
|
|
11
11
|
rules: any[];
|
|
12
|
-
componentConfig: ComponentInterface[
|
|
12
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
13
13
|
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
14
14
|
express: Express;
|
|
15
15
|
expressCode: ExpressCode;
|
|
@@ -17,7 +17,7 @@ declare class BsLogistics implements ComponentInterface {
|
|
|
17
17
|
formField: string;
|
|
18
18
|
canSort: boolean;
|
|
19
19
|
children: ComponentInterface[];
|
|
20
|
-
dataType: ComponentInterface[
|
|
20
|
+
dataType: ComponentInterface['dataType'];
|
|
21
21
|
constructor(options: PickOption);
|
|
22
22
|
editRender: (p: any) => React.JSX.Element;
|
|
23
23
|
renderClient: (record: Record) => React.JSX.Element;
|
|
@@ -8,9 +8,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
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
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
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
|
-
import React from
|
|
12
|
-
import { ExpressData } from
|
|
13
|
-
import { ExpressLogistics } from
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import { ExpressLogistics } from '@kmkf-fe-packages/basic-components';
|
|
14
14
|
import Express from "../../Express";
|
|
15
15
|
import ExpressCode from "../../ExpressCode";
|
|
16
16
|
import GetFormItem from "../../GetFormItem";
|
|
@@ -66,9 +66,9 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
|
|
|
66
66
|
});
|
|
67
67
|
_defineProperty(this, "filterConfig", function (item) {
|
|
68
68
|
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
69
|
-
subKey:
|
|
69
|
+
subKey: 'bsLogisticsCompany'
|
|
70
70
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
71
|
-
subKey:
|
|
71
|
+
subKey: 'bsLogisticsCode'
|
|
72
72
|
}))];
|
|
73
73
|
});
|
|
74
74
|
this.name = options.name;
|
|
@@ -79,33 +79,33 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
|
|
|
79
79
|
this.componentConfig = options.componentConfig;
|
|
80
80
|
this.expressDateInstance = ExpressData.getInstance();
|
|
81
81
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
82
|
-
name:
|
|
82
|
+
name: '快递物流公司',
|
|
83
83
|
id: "".concat(this.id, "_bsLogisticsCompany")
|
|
84
84
|
}));
|
|
85
85
|
this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
86
|
-
name:
|
|
86
|
+
name: '快递物流单号',
|
|
87
87
|
id: "".concat(this.id, "_bsLogisticsCode")
|
|
88
88
|
}));
|
|
89
89
|
this.isCombinationComponent = true;
|
|
90
90
|
this.canSort = false;
|
|
91
|
-
this.dataType =
|
|
91
|
+
this.dataType = 'object';
|
|
92
92
|
this.children = [this.express, this.expressCode];
|
|
93
93
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
94
94
|
validator: function validator(_, value) {
|
|
95
95
|
var _this$componentConfig4;
|
|
96
96
|
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.isSingle) {
|
|
97
97
|
var _this$componentConfig5, _this$componentConfig6;
|
|
98
|
-
if (((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.
|
|
99
|
-
return Promise.reject(new Error(
|
|
100
|
-
} else if (((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.
|
|
101
|
-
return Promise.reject(new Error(
|
|
98
|
+
if (((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showHeader) === 'EXPRESS_COMPANY' && !(value !== null && value !== void 0 && value.company)) {
|
|
99
|
+
return Promise.reject(new Error('请选择物流公司'));
|
|
100
|
+
} else if (((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.showHeader) === 'EXPRESS_WAYBILL_CODE' && !(value !== null && value !== void 0 && value.order)) {
|
|
101
|
+
return Promise.reject(new Error('请输入物流单号'));
|
|
102
102
|
}
|
|
103
103
|
} else {
|
|
104
104
|
if (!(value !== null && value !== void 0 && value.company)) {
|
|
105
|
-
return Promise.reject(new Error(
|
|
105
|
+
return Promise.reject(new Error('请选择物流公司'));
|
|
106
106
|
}
|
|
107
107
|
if (!(value !== null && value !== void 0 && value.order)) {
|
|
108
|
-
return Promise.reject(new Error(
|
|
108
|
+
return Promise.reject(new Error('请输入物流单号'));
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
return Promise.resolve();
|