@kmkf-fe-packages/services-components 0.7.15-alpha.5 → 0.7.15-alpha.51
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 +6 -8
- package/dist/esm/components/BS/BsExchange/index.js +207 -116
- package/dist/esm/components/BS/BsGoods/index.d.ts +9 -9
- package/dist/esm/components/BS/BsGoods/index.js +82 -60
- 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 +8 -5
- package/dist/esm/components/BS/BsReissue/index.js +89 -50
- package/dist/esm/components/BS/common/{BsChildCode.d.ts → BsHeaderCode.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildCode.js → BsHeaderCode.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildMoney.d.ts → BsHeaderMoney.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildMoney.js → BsHeaderMoney.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildName.d.ts → BsHeaderName.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildName.js → BsHeaderName.js} +28 -11
- package/dist/esm/components/BS/common/{BsChildNumber.d.ts → BsHeaderNumber.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildNumber.js → BsHeaderNumber.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildPic.d.ts → BsHeaderPic.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildPic.js → BsHeaderPic.js} +26 -10
- package/dist/esm/components/BS/common/{BsChildShare.d.ts → BsHeaderShare.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildShare.js → BsHeaderShare.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildSku.d.ts → BsHeaderSku.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildSku.js → BsHeaderSku.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildType.d.ts → BsHeaderType.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildType.js → BsHeaderType.js} +27 -11
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -3
- package/dist/esm/components/BS/common/BsMemo.js +43 -13
- package/dist/esm/components/BS/common/BsType.d.ts +1 -0
- package/dist/esm/components/BS/common/BsType.js +34 -8
- package/dist/esm/components/BS/common/index.d.ts +10 -10
- package/dist/esm/components/BS/common/index.js +8 -8
- 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 +5 -0
- package/dist/esm/components/Common/index.js +102 -2
- package/dist/esm/components/File/index.d.ts +4 -4
- package/dist/esm/components/File/index.js +29 -9
- package/dist/esm/components/FlowStatusSelect/index.d.ts +0 -1
- package/dist/esm/components/FlowStatusSelect/index.js +30 -24
- package/dist/esm/components/FlowWorkOrderId/index.d.ts +33 -0
- package/dist/esm/components/FlowWorkOrderId/index.js +107 -0
- package/dist/esm/components/JST/JstLogistics/index.js +25 -8
- package/dist/esm/components/LogisticsTrajectory/index.d.ts +8 -9
- package/dist/esm/components/LogisticsTrajectory/index.js +12 -10
- package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +6 -5
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +6 -6
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +8 -8
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +4 -10
- package/dist/esm/components/Payment/BuyerNick.js +1 -2
- package/dist/esm/components/Payment/index.d.ts +1 -0
- package/dist/esm/components/Payment/index.js +9 -6
- package/dist/esm/components/PostIng/index.d.ts +6 -29
- package/dist/esm/components/PostIng/index.js +73 -77
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +6 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +15 -14
- package/package.json +4 -4
- package/dist/esm/components/BS/common/BsExchangeImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsExchangeImage.js +0 -126
- package/dist/esm/components/BS/common/BsGoodImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsGoodImage.js +0 -88
|
@@ -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,21 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import
|
|
4
|
-
import { BsType, BsMemo } from "../common/index";
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BsType, BsMemo } from '../common/index';
|
|
5
4
|
declare class BsExchange implements ComponentInterface {
|
|
6
5
|
name: string;
|
|
7
6
|
id: string;
|
|
8
7
|
sortField: string;
|
|
9
8
|
type: string;
|
|
10
9
|
rules: any[];
|
|
11
|
-
componentConfig: ComponentInterface[
|
|
12
|
-
effects: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
11
|
+
effects: ComponentInterface['effects'];
|
|
13
12
|
isCombinationComponent: boolean;
|
|
14
13
|
formField: string;
|
|
15
14
|
canSort: boolean;
|
|
16
15
|
children: ComponentInterface[];
|
|
17
|
-
dataType: ComponentInterface[
|
|
18
|
-
goodImage: BsExchangeImage;
|
|
16
|
+
dataType: ComponentInterface['dataType'];
|
|
19
17
|
bsType: BsType;
|
|
20
18
|
bsMemo: BsMemo;
|
|
21
19
|
constructor(options: PickOption);
|
|
@@ -1,4 +1,10 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
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."); }
|
|
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); }
|
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
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; }
|
|
2
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; }
|
|
3
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; }
|
|
4
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); }
|
|
@@ -8,17 +14,146 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
14
|
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
15
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
16
|
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
|
|
17
|
+
import React from 'react';
|
|
12
18
|
import GetFormItem from "../../GetFormItem";
|
|
13
|
-
import {
|
|
19
|
+
import { BsGoodsTable } from "../../Common";
|
|
14
20
|
import ItemView from "../../../commonComponents/ItemView";
|
|
15
|
-
import { isNull, filterFn as _filterFn } from
|
|
16
|
-
import { BsExchange as Exchange } from
|
|
21
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
22
|
+
import { BsExchange as Exchange } from '@kmkf-fe-packages/basic-components';
|
|
17
23
|
import { SYMBOL } from "../../../constant";
|
|
18
|
-
import
|
|
19
|
-
|
|
24
|
+
import { BsType, BsMemo, BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "../common/index";
|
|
25
|
+
var returnHeaderMap = {
|
|
26
|
+
pic: {
|
|
27
|
+
component: BsHeaderPic,
|
|
28
|
+
name: '退回图片',
|
|
29
|
+
key: 'pic'
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
component: BsHeaderName,
|
|
33
|
+
name: '退回名称',
|
|
34
|
+
key: 'name'
|
|
35
|
+
},
|
|
36
|
+
code: {
|
|
37
|
+
component: BsHeaderCode,
|
|
38
|
+
name: '退回编码',
|
|
39
|
+
key: 'code'
|
|
40
|
+
},
|
|
41
|
+
sku: {
|
|
42
|
+
component: BsHeaderSku,
|
|
43
|
+
name: '退回sku编码',
|
|
44
|
+
key: 'sku'
|
|
45
|
+
},
|
|
46
|
+
money: {
|
|
47
|
+
component: BsHeaderMoney,
|
|
48
|
+
name: '退回实付金额',
|
|
49
|
+
key: 'money'
|
|
50
|
+
},
|
|
51
|
+
number: {
|
|
52
|
+
component: BsHeaderNumber,
|
|
53
|
+
name: '退回数量',
|
|
54
|
+
key: 'number'
|
|
55
|
+
},
|
|
56
|
+
share: {
|
|
57
|
+
component: BsHeaderShare,
|
|
58
|
+
name: '退回分摊价',
|
|
59
|
+
key: 'share'
|
|
60
|
+
},
|
|
61
|
+
type: {
|
|
62
|
+
component: BsHeaderType,
|
|
63
|
+
name: '退回赠品类型',
|
|
64
|
+
key: 'giftType'
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var swapOutHeaderMap = {
|
|
68
|
+
pic: {
|
|
69
|
+
component: BsHeaderPic,
|
|
70
|
+
name: '换出图片',
|
|
71
|
+
key: 'pic'
|
|
72
|
+
},
|
|
73
|
+
name: {
|
|
74
|
+
component: BsHeaderName,
|
|
75
|
+
name: '换出名称',
|
|
76
|
+
key: 'name'
|
|
77
|
+
},
|
|
78
|
+
code: {
|
|
79
|
+
component: BsHeaderCode,
|
|
80
|
+
name: '换出编码',
|
|
81
|
+
key: 'code'
|
|
82
|
+
},
|
|
83
|
+
sku: {
|
|
84
|
+
component: BsHeaderSku,
|
|
85
|
+
name: '换出sku编码',
|
|
86
|
+
key: 'sku'
|
|
87
|
+
},
|
|
88
|
+
money: {
|
|
89
|
+
component: BsHeaderMoney,
|
|
90
|
+
name: '换出实付金额',
|
|
91
|
+
key: 'money'
|
|
92
|
+
},
|
|
93
|
+
number: {
|
|
94
|
+
component: BsHeaderNumber,
|
|
95
|
+
name: '换出数量',
|
|
96
|
+
key: 'number'
|
|
97
|
+
},
|
|
98
|
+
share: {
|
|
99
|
+
component: BsHeaderShare,
|
|
100
|
+
name: '换出分摊价',
|
|
101
|
+
key: 'share'
|
|
102
|
+
},
|
|
103
|
+
type: {
|
|
104
|
+
component: BsHeaderType,
|
|
105
|
+
name: '换出赠品类型',
|
|
106
|
+
key: 'type'
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var giftHeaderMap = {
|
|
110
|
+
pic: {
|
|
111
|
+
component: BsHeaderPic,
|
|
112
|
+
name: '赠品图片',
|
|
113
|
+
key: 'pic'
|
|
114
|
+
},
|
|
115
|
+
name: {
|
|
116
|
+
component: BsHeaderName,
|
|
117
|
+
name: '赠品名称',
|
|
118
|
+
key: 'name'
|
|
119
|
+
},
|
|
120
|
+
code: {
|
|
121
|
+
component: BsHeaderCode,
|
|
122
|
+
name: '赠品编码',
|
|
123
|
+
key: 'code'
|
|
124
|
+
},
|
|
125
|
+
sku: {
|
|
126
|
+
component: BsHeaderSku,
|
|
127
|
+
name: '赠品sku编码',
|
|
128
|
+
key: 'sku'
|
|
129
|
+
},
|
|
130
|
+
money: {
|
|
131
|
+
component: BsHeaderMoney,
|
|
132
|
+
name: '赠品实付金额',
|
|
133
|
+
key: 'money'
|
|
134
|
+
},
|
|
135
|
+
number: {
|
|
136
|
+
component: BsHeaderNumber,
|
|
137
|
+
name: '赠品数量',
|
|
138
|
+
key: 'number'
|
|
139
|
+
},
|
|
140
|
+
share: {
|
|
141
|
+
component: BsHeaderShare,
|
|
142
|
+
name: '赠品分摊价',
|
|
143
|
+
key: 'share'
|
|
144
|
+
},
|
|
145
|
+
type: {
|
|
146
|
+
component: BsHeaderType,
|
|
147
|
+
name: '赠品赠品类型',
|
|
148
|
+
key: 'giftType'
|
|
149
|
+
}
|
|
150
|
+
};
|
|
20
151
|
var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
21
|
-
var _this = this
|
|
152
|
+
var _this = this,
|
|
153
|
+
_options$componentCon,
|
|
154
|
+
_options$componentCon2,
|
|
155
|
+
_options$componentCon3,
|
|
156
|
+
_this$componentConfig5;
|
|
22
157
|
_classCallCheck(this, BsExchange);
|
|
23
158
|
_defineProperty(this, "name", void 0);
|
|
24
159
|
_defineProperty(this, "id", void 0);
|
|
@@ -32,18 +167,32 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
32
167
|
_defineProperty(this, "canSort", void 0);
|
|
33
168
|
_defineProperty(this, "children", void 0);
|
|
34
169
|
_defineProperty(this, "dataType", void 0);
|
|
35
|
-
_defineProperty(this, "goodImage", void 0);
|
|
36
170
|
_defineProperty(this, "bsType", void 0);
|
|
37
171
|
_defineProperty(this, "bsMemo", void 0);
|
|
38
172
|
_defineProperty(this, "renderClient", function (record) {
|
|
39
|
-
|
|
173
|
+
var _this$componentConfig, _record, _record$bsExchangeTyp, _this$componentConfig2, _record2, _record2$bsExchangeTy, _this$componentConfig3;
|
|
174
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), /*#__PURE__*/React.createElement(ItemView, {
|
|
40
175
|
id: _this.id,
|
|
41
|
-
label: _this.name,
|
|
42
|
-
value: /*#__PURE__*/React.createElement(
|
|
43
|
-
list: _this.
|
|
44
|
-
|
|
176
|
+
label: "".concat(_this.name, "-\u9000\u56DE"),
|
|
177
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
178
|
+
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeReturnGoods) || [],
|
|
179
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
45
180
|
})
|
|
46
|
-
}) : null
|
|
181
|
+
}), ['2', '4'].includes(record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : (_record$bsExchangeTyp = _record.bsExchangeType) === null || _record$bsExchangeTyp === void 0 ? void 0 : _record$bsExchangeTyp[0]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
182
|
+
id: _this.id,
|
|
183
|
+
label: "".concat(_this.name, "-\u6362\u51FA"),
|
|
184
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
185
|
+
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeSwapOutGoods) || [],
|
|
186
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
187
|
+
})
|
|
188
|
+
}) : null, ['3', '4'].includes(record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id)]) === null || _record2 === void 0 ? void 0 : (_record2$bsExchangeTy = _record2.bsExchangeType) === null || _record2$bsExchangeTy === void 0 ? void 0 : _record2$bsExchangeTy[0]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
189
|
+
id: _this.id,
|
|
190
|
+
label: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
191
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
192
|
+
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)].bsExchangeGiftGoods) || [],
|
|
193
|
+
showHeader: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader) || []
|
|
194
|
+
})
|
|
195
|
+
}) : null) : null;
|
|
47
196
|
});
|
|
48
197
|
_defineProperty(this, "renderPc", function () {
|
|
49
198
|
return null;
|
|
@@ -58,7 +207,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
58
207
|
return null;
|
|
59
208
|
});
|
|
60
209
|
_defineProperty(this, "editRender", function (p) {
|
|
61
|
-
var _this$
|
|
210
|
+
var _this$componentConfig4, _this$effects, _this$effects2;
|
|
62
211
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
63
212
|
title: _this.name,
|
|
64
213
|
name: _this.id,
|
|
@@ -66,7 +215,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
66
215
|
required: false,
|
|
67
216
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
68
217
|
component: /*#__PURE__*/React.createElement(Exchange, _extends({}, _this.componentConfig, {
|
|
69
|
-
maxLength: ((_this$
|
|
218
|
+
maxLength: ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.maxLength) || 20,
|
|
70
219
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
71
220
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
72
221
|
width: "90%"
|
|
@@ -80,7 +229,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
80
229
|
type: item.type,
|
|
81
230
|
id: "".concat(item.id, "_bsReissueType"),
|
|
82
231
|
name: "".concat(item.name, "-\u6362\u8D27\u7C7B\u578B"),
|
|
83
|
-
filterComponentType:
|
|
232
|
+
filterComponentType: 'Cascader',
|
|
84
233
|
props: {
|
|
85
234
|
options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
|
|
86
235
|
},
|
|
@@ -94,19 +243,19 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
94
243
|
type: item.type,
|
|
95
244
|
id: "".concat(item.id, "_bsExchangeReturnGoods"),
|
|
96
245
|
name: "".concat(_this.name, "-\u9000\u56DE"),
|
|
97
|
-
filterComponentType:
|
|
246
|
+
filterComponentType: 'Input'
|
|
98
247
|
}, {
|
|
99
248
|
searchDefaultConditions: SYMBOL.like,
|
|
100
249
|
type: item.type,
|
|
101
250
|
id: "".concat(item.id, "_bsExchangeSwapOutGoods"),
|
|
102
251
|
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
103
|
-
filterComponentType:
|
|
252
|
+
filterComponentType: 'Input'
|
|
104
253
|
}, {
|
|
105
254
|
searchDefaultConditions: SYMBOL.like,
|
|
106
255
|
type: item.type,
|
|
107
256
|
id: "".concat(item.id, "_bsExchangeGiftGoods"),
|
|
108
257
|
name: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
109
|
-
filterComponentType:
|
|
258
|
+
filterComponentType: 'Input'
|
|
110
259
|
}];
|
|
111
260
|
});
|
|
112
261
|
this.name = options.name;
|
|
@@ -115,106 +264,48 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
115
264
|
this.formField = "".concat(options.id);
|
|
116
265
|
this.type = options.type;
|
|
117
266
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
118
|
-
this.isCombinationComponent =
|
|
267
|
+
this.isCombinationComponent = true;
|
|
119
268
|
this.canSort = false;
|
|
120
|
-
this.goodImage = new BsExchangeImage(_objectSpread(_objectSpread({}, options), {}, {
|
|
121
|
-
id: "".concat(options.id),
|
|
122
|
-
name: "换货商品"
|
|
123
|
-
}));
|
|
124
269
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
125
|
-
id: "".concat(options.id, "
|
|
126
|
-
name:
|
|
270
|
+
id: "".concat(options.id, "_bsExchangeType_type"),
|
|
271
|
+
name: '换货类型'
|
|
127
272
|
}));
|
|
128
273
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
129
|
-
id: "".concat(options.id, "
|
|
130
|
-
name:
|
|
274
|
+
id: "".concat(options.id, "_bsExchangeType_memo"),
|
|
275
|
+
name: '换货备注'
|
|
131
276
|
}));
|
|
132
|
-
this.children = [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
name: "退回分摊价",
|
|
158
|
-
id: "".concat(options.id, "_bsExchangeReturnGoods")
|
|
159
|
-
})), new BsChildType(_objectSpread(_objectSpread({}, options), {}, {
|
|
160
|
-
name: "退回赠品类型",
|
|
161
|
-
id: "".concat(options.id, "_bsExchangeReturnGoods")
|
|
162
|
-
})), new BsChildPic(_objectSpread(_objectSpread({}, options), {}, {
|
|
163
|
-
name: "换出图片",
|
|
164
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
165
|
-
})), new BsChildName(_objectSpread(_objectSpread({}, options), {}, {
|
|
166
|
-
name: "换出名称",
|
|
167
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
168
|
-
})), new BsChildCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
169
|
-
name: "换出编码",
|
|
170
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
171
|
-
})), new BsChildSku(_objectSpread(_objectSpread({}, options), {}, {
|
|
172
|
-
name: "换出sku编码",
|
|
173
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
174
|
-
})), new BsChildMoney(_objectSpread(_objectSpread({}, options), {}, {
|
|
175
|
-
name: "换出实付金额",
|
|
176
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
177
|
-
})), new BsChildNumber(_objectSpread(_objectSpread({}, options), {}, {
|
|
178
|
-
name: "换出数量",
|
|
179
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
180
|
-
})), new BsChildShare(_objectSpread(_objectSpread({}, options), {}, {
|
|
181
|
-
name: "换出分摊价",
|
|
182
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
183
|
-
})), new BsChildType(_objectSpread(_objectSpread({}, options), {}, {
|
|
184
|
-
name: "换出赠品类型",
|
|
185
|
-
id: "".concat(options.id, "_bsExchangeSwapOutGoods")
|
|
186
|
-
})), new BsChildPic(_objectSpread(_objectSpread({}, options), {}, {
|
|
187
|
-
name: "赠品图片",
|
|
188
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
189
|
-
})), new BsChildName(_objectSpread(_objectSpread({}, options), {}, {
|
|
190
|
-
name: "赠品名称",
|
|
191
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
192
|
-
})), new BsChildCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
193
|
-
name: "赠品编码",
|
|
194
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
195
|
-
})), new BsChildSku(_objectSpread(_objectSpread({}, options), {}, {
|
|
196
|
-
name: "赠品sku编码",
|
|
197
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
198
|
-
})), new BsChildMoney(_objectSpread(_objectSpread({}, options), {}, {
|
|
199
|
-
name: "赠品实付金额",
|
|
200
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
201
|
-
})), new BsChildNumber(_objectSpread(_objectSpread({}, options), {}, {
|
|
202
|
-
name: "赠品数量",
|
|
203
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
204
|
-
})), new BsChildShare(_objectSpread(_objectSpread({}, options), {}, {
|
|
205
|
-
name: "赠品分摊价",
|
|
206
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
207
|
-
})), new BsChildType(_objectSpread(_objectSpread({}, options), {}, {
|
|
208
|
-
name: "赠品赠品类型",
|
|
209
|
-
id: "".concat(options.id, "_bsExchangeGiftGoods")
|
|
210
|
-
}))];
|
|
277
|
+
this.children = [this.bsType, this.bsMemo].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) {
|
|
278
|
+
if (returnHeaderMap[next]) {
|
|
279
|
+
prv.push(new returnHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
280
|
+
name: returnHeaderMap[next].name,
|
|
281
|
+
id: "".concat(options.id, "_bsExchangeReturnGoods_").concat(returnHeaderMap[next].key)
|
|
282
|
+
})));
|
|
283
|
+
}
|
|
284
|
+
return prv;
|
|
285
|
+
}, [])), _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) {
|
|
286
|
+
if (swapOutHeaderMap[next]) {
|
|
287
|
+
prv.push(new swapOutHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
288
|
+
name: swapOutHeaderMap[next].name,
|
|
289
|
+
id: "".concat(options.id, "_bsExchangeSwapOutGoods_").concat(swapOutHeaderMap[next].key)
|
|
290
|
+
})));
|
|
291
|
+
}
|
|
292
|
+
return prv;
|
|
293
|
+
}, [])), _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) {
|
|
294
|
+
if (giftHeaderMap[next]) {
|
|
295
|
+
prv.push(new giftHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
296
|
+
name: giftHeaderMap[next].name,
|
|
297
|
+
id: "".concat(options.id, "_bsExchangeGiftGoods_").concat(giftHeaderMap[next].key)
|
|
298
|
+
})));
|
|
299
|
+
}
|
|
300
|
+
return prv;
|
|
301
|
+
}, [])));
|
|
211
302
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
212
|
-
this.rules = [{
|
|
303
|
+
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
213
304
|
required: true,
|
|
214
305
|
validator: function validator(_, value) {
|
|
215
306
|
var _value$bsExchangeRetu;
|
|
216
307
|
if (!value || !(value !== null && value !== void 0 && (_value$bsExchangeRetu = value.bsExchangeReturnGoods) !== null && _value$bsExchangeRetu !== void 0 && _value$bsExchangeRetu.length)) {
|
|
217
|
-
return Promise.reject(new Error(
|
|
308
|
+
return Promise.reject(new Error('请选择bs换货商品'));
|
|
218
309
|
}
|
|
219
310
|
return Promise.resolve();
|
|
220
311
|
}
|
|
@@ -222,12 +313,12 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
222
313
|
validator: function validator(_, value) {
|
|
223
314
|
var _value$bsExchangeType;
|
|
224
315
|
console.log(value);
|
|
225
|
-
if (value && [
|
|
316
|
+
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])) {
|
|
226
317
|
var hasNoGood = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
227
318
|
return !(item !== null && item !== void 0 && item.bsExchangeReturnGoods.length);
|
|
228
319
|
});
|
|
229
320
|
if (hasNoGood) {
|
|
230
|
-
return Promise.reject(new Error(
|
|
321
|
+
return Promise.reject(new Error('请选择退回商品后再提交工单'));
|
|
231
322
|
}
|
|
232
323
|
var hasMore = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
233
324
|
var returnMoney = ((item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || []).reduce(function (prv, next) {
|
|
@@ -241,18 +332,18 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
241
332
|
return returnMoney < swapOutMoney;
|
|
242
333
|
});
|
|
243
334
|
if (hasMore) {
|
|
244
|
-
return Promise.reject(new Error(
|
|
335
|
+
return Promise.reject(new Error('换货商品的金额不能大于退回商品的金额'));
|
|
245
336
|
}
|
|
246
337
|
var hasLen = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
247
338
|
return (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods.length) !== (item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods.length);
|
|
248
339
|
});
|
|
249
340
|
if (hasLen) {
|
|
250
|
-
return Promise.reject(new Error(
|
|
341
|
+
return Promise.reject(new Error('请核对商品数据,再提交工单'));
|
|
251
342
|
}
|
|
252
343
|
}
|
|
253
344
|
return Promise.resolve();
|
|
254
345
|
}
|
|
255
|
-
}];
|
|
256
|
-
this.dataType =
|
|
346
|
+
}] : [];
|
|
347
|
+
this.dataType = 'object';
|
|
257
348
|
});
|
|
258
349
|
export default BsExchange;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsGoods implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
10
|
-
effects: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
|
+
effects: ComponentInterface['effects'];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
-
renderClient: (record: any) =>
|
|
18
|
-
renderPc: (
|
|
19
|
-
renderLog: (r: Record) =>
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: () => null;
|
|
19
|
+
renderLog: (r: Record) => null;
|
|
20
20
|
getComponentValue: (r: Record) => any;
|
|
21
21
|
renderExport: () => null;
|
|
22
22
|
editRender: (p: any) => React.JSX.Element;
|
|
@@ -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;
|