@kmkf-fe-packages/services-components 0.8.9-alpha.1 → 0.8.9-alpha.2
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/BS/BsExchange/index.d.ts +6 -6
- package/dist/esm/components/BS/BsExchange/index.js +26 -25
- package/dist/esm/components/BS/BsGoods/index.d.ts +6 -6
- package/dist/esm/components/BS/BsGoods/index.js +9 -8
- package/dist/esm/components/BS/BsReissue/index.d.ts +6 -6
- package/dist/esm/components/BS/BsReissue/index.js +15 -14
- package/dist/esm/components/Express/index.d.ts +5 -5
- package/dist/esm/components/Express/index.js +8 -8
- package/dist/esm/components/PostIng/index.js +2 -2
- package/dist/esm/type.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { BsType, BsMemo, BsHeaderGood } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsType, BsMemo, BsHeaderGood } from "../common/index";
|
|
4
4
|
declare class BsExchange implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
11
|
-
effects: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
12
|
isCombinationComponent: boolean;
|
|
13
13
|
formField: string;
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
dataType: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
17
|
bsType: BsType;
|
|
18
18
|
bsMemo: BsMemo;
|
|
19
19
|
returnGoods: BsHeaderGood;
|
|
@@ -8,12 +8,12 @@ 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
|
|
11
|
+
import React from "react";
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import { BsGoodsTable } from "../../Common";
|
|
14
14
|
import ItemView from "../../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from
|
|
16
|
-
import { BsExchange as Exchange } from
|
|
15
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { BsExchange as Exchange } from "@kmkf-fe-packages/basic-components";
|
|
17
17
|
import { SYMBOL } from "../../../constant";
|
|
18
18
|
import { BsType, BsMemo, BsHeaderGood } from "../common/index";
|
|
19
19
|
var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
@@ -38,8 +38,8 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
38
38
|
_defineProperty(this, "giftGoods", void 0);
|
|
39
39
|
_defineProperty(this, "renderClient", function (record) {
|
|
40
40
|
var _this$componentConfig, _this$componentConfig2, _record, _record$bsExchangeTyp, _this$componentConfig3;
|
|
41
|
-
var bsExchangeReturnGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeReturnGoods")]) ||
|
|
42
|
-
var bsExchangeSwapOutGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeSwapOutGoods")]) ||
|
|
41
|
+
var bsExchangeReturnGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeReturnGoods")]) || "[]");
|
|
42
|
+
var bsExchangeSwapOutGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeSwapOutGoods")]) || "[]");
|
|
43
43
|
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, {
|
|
44
44
|
id: _this.id,
|
|
45
45
|
label: "".concat(_this.name, "-\u9000\u56DE"),
|
|
@@ -54,7 +54,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
54
54
|
list: bsExchangeSwapOutGoods || [],
|
|
55
55
|
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
56
56
|
})
|
|
57
|
-
}), [
|
|
57
|
+
}), ["3", "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]) && record !== null && record !== void 0 && record["".concat(_this.id)].bsExchangeGiftGoods.length ? /*#__PURE__*/React.createElement(ItemView, {
|
|
58
58
|
id: "".concat(_this.id, "-gift"),
|
|
59
59
|
label: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
60
60
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
@@ -76,7 +76,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
76
76
|
return null;
|
|
77
77
|
});
|
|
78
78
|
_defineProperty(this, "editRender", function (p) {
|
|
79
|
-
var _this$componentConfig4, _this$effects, _this$effects2;
|
|
79
|
+
var _this$componentConfig4, _this$effects, _this$effects2, _this$effects3;
|
|
80
80
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
81
81
|
title: _this.name,
|
|
82
82
|
name: _this.id,
|
|
@@ -87,6 +87,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
87
87
|
maxLength: ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.maxLength) || 20,
|
|
88
88
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
89
89
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
90
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
90
91
|
width: "90%"
|
|
91
92
|
}))
|
|
92
93
|
});
|
|
@@ -98,13 +99,13 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
98
99
|
type: item.type,
|
|
99
100
|
id: "".concat(item.id, "_bsExchangeType"),
|
|
100
101
|
name: "".concat(item.name, "-\u6362\u8D27\u7C7B\u578B"),
|
|
101
|
-
filterComponentType:
|
|
102
|
+
filterComponentType: "Cascader",
|
|
102
103
|
props: {
|
|
103
104
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
104
105
|
fieldNames: {
|
|
105
|
-
label:
|
|
106
|
-
value:
|
|
107
|
-
children:
|
|
106
|
+
label: "label",
|
|
107
|
+
value: "value",
|
|
108
|
+
children: "children"
|
|
108
109
|
}
|
|
109
110
|
},
|
|
110
111
|
formatFilterValue: function formatFilterValue(val) {
|
|
@@ -117,19 +118,19 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
117
118
|
type: item.type,
|
|
118
119
|
id: "".concat(item.id, "_bsExchangeReturnGoods"),
|
|
119
120
|
name: "".concat(_this.name, "-\u9000\u56DE"),
|
|
120
|
-
filterComponentType:
|
|
121
|
+
filterComponentType: "Input"
|
|
121
122
|
}, {
|
|
122
123
|
searchDefaultConditions: SYMBOL.like,
|
|
123
124
|
type: item.type,
|
|
124
125
|
id: "".concat(item.id, "_bsExchangeSwapOutGoods"),
|
|
125
126
|
name: "".concat(_this.name, "-\u6362\u51FA"),
|
|
126
|
-
filterComponentType:
|
|
127
|
+
filterComponentType: "Input"
|
|
127
128
|
}, {
|
|
128
129
|
searchDefaultConditions: SYMBOL.like,
|
|
129
130
|
type: item.type,
|
|
130
131
|
id: "".concat(item.id, "_bsExchangeGiftGoods"),
|
|
131
132
|
name: "".concat(_this.name, "-\u8D60\u54C1"),
|
|
132
|
-
filterComponentType:
|
|
133
|
+
filterComponentType: "Input"
|
|
133
134
|
}];
|
|
134
135
|
});
|
|
135
136
|
this.name = options.name;
|
|
@@ -142,23 +143,23 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
142
143
|
this.canSort = false;
|
|
143
144
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
144
145
|
id: "".concat(options.id, "_bsExchangeType"),
|
|
145
|
-
name:
|
|
146
|
+
name: "换货类型"
|
|
146
147
|
}));
|
|
147
148
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
148
149
|
id: "".concat(options.id, "_bsExchangeType_memo"),
|
|
149
|
-
name:
|
|
150
|
+
name: "换货备注"
|
|
150
151
|
}));
|
|
151
152
|
this.returnGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
152
153
|
id: "".concat(options.id, "_bsExchangeReturnGoods"),
|
|
153
|
-
name:
|
|
154
|
+
name: "退回商品"
|
|
154
155
|
}));
|
|
155
156
|
this.swapOutGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
156
157
|
id: "".concat(options.id, "_bsExchangeSwapOutGoods"),
|
|
157
|
-
name:
|
|
158
|
+
name: "换出商品"
|
|
158
159
|
}));
|
|
159
160
|
this.giftGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
160
161
|
id: "".concat(options.id, "_bsExchangeGiftGoods"),
|
|
161
|
-
name:
|
|
162
|
+
name: "赠品商品"
|
|
162
163
|
}));
|
|
163
164
|
this.children = [this.bsType, this.bsMemo, this.returnGoods, this.swapOutGoods, this.giftGoods];
|
|
164
165
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
@@ -166,19 +167,19 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
166
167
|
validator: function validator(_, value) {
|
|
167
168
|
var _this$componentConfig5, _value$bsExchangeRetu;
|
|
168
169
|
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && (_value$bsExchangeRetu = value.bsExchangeReturnGoods) !== null && _value$bsExchangeRetu !== void 0 && _value$bsExchangeRetu.length)) {
|
|
169
|
-
return Promise.reject(new Error(
|
|
170
|
+
return Promise.reject(new Error("请选择bs换货商品"));
|
|
170
171
|
}
|
|
171
172
|
return Promise.resolve();
|
|
172
173
|
}
|
|
173
174
|
}, {
|
|
174
175
|
validator: function validator(_, value) {
|
|
175
176
|
var _value$bsExchangeType;
|
|
176
|
-
if (value && [
|
|
177
|
+
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])) {
|
|
177
178
|
var hasNoGood = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
178
179
|
return !(item !== null && item !== void 0 && item.bsExchangeReturnGoods.length);
|
|
179
180
|
});
|
|
180
181
|
if (hasNoGood) {
|
|
181
|
-
return Promise.reject(new Error(
|
|
182
|
+
return Promise.reject(new Error("请选择退回商品后再提交工单"));
|
|
182
183
|
}
|
|
183
184
|
var hasMore = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
184
185
|
var returnMoney = ((item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || []).reduce(function (prv, next) {
|
|
@@ -192,18 +193,18 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
192
193
|
return returnMoney < swapOutMoney;
|
|
193
194
|
});
|
|
194
195
|
if (hasMore) {
|
|
195
|
-
return Promise.reject(new Error(
|
|
196
|
+
return Promise.reject(new Error("换货商品的金额不能大于退回商品的金额"));
|
|
196
197
|
}
|
|
197
198
|
var hasLen = ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).some(function (item) {
|
|
198
199
|
return (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods.length) !== (item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods.length);
|
|
199
200
|
});
|
|
200
201
|
if (hasLen) {
|
|
201
|
-
return Promise.reject(new Error(
|
|
202
|
+
return Promise.reject(new Error("请核对商品数据,再提交工单"));
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
205
|
return Promise.resolve();
|
|
205
206
|
}
|
|
206
207
|
}];
|
|
207
|
-
this.dataType =
|
|
208
|
+
this.dataType = "object";
|
|
208
209
|
});
|
|
209
210
|
export default BsExchange;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { BsHeaderGood } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsHeaderGood } from "../common/index";
|
|
4
4
|
declare class BsGoods implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
11
|
-
effects: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
12
|
isCombinationComponent: boolean;
|
|
13
13
|
formField: string;
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
dataType: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
17
|
bsGoods: BsHeaderGood;
|
|
18
18
|
constructor(options: PickOption);
|
|
19
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -8,13 +8,13 @@ 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
|
|
11
|
+
import React from "react";
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import { BsGoodsTable } from "../../Common";
|
|
14
14
|
import { BsHeaderGood } from "../common/index";
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from
|
|
17
|
-
import { BsGoods as Goods } from
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
import { BsGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
18
|
import { SYMBOL } from "../../../constant";
|
|
19
19
|
var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
20
20
|
var _this = this,
|
|
@@ -57,7 +57,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
57
57
|
return null;
|
|
58
58
|
});
|
|
59
59
|
_defineProperty(this, "editRender", function (p) {
|
|
60
|
-
var _this$componentConfig2, _this$effects, _this$effects2;
|
|
60
|
+
var _this$componentConfig2, _this$effects, _this$effects2, _this$effects3;
|
|
61
61
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
62
62
|
title: _this.name,
|
|
63
63
|
name: _this.id,
|
|
@@ -68,6 +68,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
68
68
|
maxLength: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.maxLength) || 20,
|
|
69
69
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
70
70
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
71
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
71
72
|
width: "90%"
|
|
72
73
|
}))
|
|
73
74
|
});
|
|
@@ -80,7 +81,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
80
81
|
// 过滤组件id
|
|
81
82
|
name: item.name,
|
|
82
83
|
// 过滤组件名称
|
|
83
|
-
filterComponentType:
|
|
84
|
+
filterComponentType: "Input"
|
|
84
85
|
}];
|
|
85
86
|
});
|
|
86
87
|
this.name = options.name;
|
|
@@ -93,7 +94,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
93
94
|
this.canSort = false;
|
|
94
95
|
this.bsGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
95
96
|
id: "".concat(options.id, "_bsGoods"),
|
|
96
|
-
name:
|
|
97
|
+
name: "商品信息"
|
|
97
98
|
}));
|
|
98
99
|
this.children = [this.bsGoods];
|
|
99
100
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
@@ -102,11 +103,11 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
102
103
|
validator: function validator(_, value) {
|
|
103
104
|
var _value$bsGoods;
|
|
104
105
|
if (!value || !(value !== null && value !== void 0 && (_value$bsGoods = value.bsGoods) !== null && _value$bsGoods !== void 0 && _value$bsGoods.length)) {
|
|
105
|
-
return Promise.reject(new Error(
|
|
106
|
+
return Promise.reject(new Error("请选择bs商品"));
|
|
106
107
|
}
|
|
107
108
|
return Promise.resolve();
|
|
108
109
|
}
|
|
109
110
|
}] : [];
|
|
110
|
-
this.dataType =
|
|
111
|
+
this.dataType = "object";
|
|
111
112
|
});
|
|
112
113
|
export default BsGoods;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { BsType, BsMemo, BsHeaderGood } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsType, BsMemo, BsHeaderGood } from "../common/index";
|
|
4
4
|
declare class BsReissue implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
11
|
-
effects: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
12
|
isCombinationComponent: boolean;
|
|
13
13
|
formField: string;
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
dataType: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
17
|
bsType: BsType;
|
|
18
18
|
bsMemo: BsMemo;
|
|
19
19
|
reissueGoods: BsHeaderGood;
|
|
@@ -8,11 +8,11 @@ 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
|
|
11
|
+
import React from "react";
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
15
|
-
import { BsReissue as Reissue } from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
+
import { BsReissue as Reissue } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
17
|
import { BsGoodsTable } from "../../Common";
|
|
18
18
|
import { BsType, BsMemo, BsHeaderGood } from "../common/index";
|
|
@@ -59,7 +59,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
59
59
|
return null;
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "editRender", function (p) {
|
|
62
|
-
var _this$componentConfig2, _this$effects, _this$effects2;
|
|
62
|
+
var _this$componentConfig2, _this$effects, _this$effects2, _this$effects3;
|
|
63
63
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
64
64
|
title: _this.name,
|
|
65
65
|
name: _this.id,
|
|
@@ -70,6 +70,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
70
70
|
maxLength: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.maxLength) || 20,
|
|
71
71
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
72
72
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
73
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
73
74
|
width: "90%"
|
|
74
75
|
}))
|
|
75
76
|
});
|
|
@@ -81,13 +82,13 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
81
82
|
type: item.type,
|
|
82
83
|
id: "".concat(item.id, "_bsReissueType"),
|
|
83
84
|
name: "".concat(item.name, "-\u8865\u53D1\u7C7B\u578B"),
|
|
84
|
-
filterComponentType:
|
|
85
|
+
filterComponentType: "Cascader",
|
|
85
86
|
props: {
|
|
86
87
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
87
88
|
fieldNames: {
|
|
88
|
-
label:
|
|
89
|
-
value:
|
|
90
|
-
children:
|
|
89
|
+
label: "label",
|
|
90
|
+
value: "value",
|
|
91
|
+
children: "children"
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
formatFilterValue: function formatFilterValue(val) {
|
|
@@ -105,7 +106,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
105
106
|
type: item.type,
|
|
106
107
|
id: "".concat(item.id, "_bsReissueGoods"),
|
|
107
108
|
name: "".concat(_this.name),
|
|
108
|
-
filterComponentType:
|
|
109
|
+
filterComponentType: "Input"
|
|
109
110
|
}];
|
|
110
111
|
});
|
|
111
112
|
this.name = options.name;
|
|
@@ -118,15 +119,15 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
118
119
|
this.canSort = false;
|
|
119
120
|
this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
|
|
120
121
|
id: "".concat(options.id, "_bsReissueType"),
|
|
121
|
-
name:
|
|
122
|
+
name: "补发类型"
|
|
122
123
|
}));
|
|
123
124
|
this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
|
|
124
125
|
id: "".concat(options.id, "_bsReissueType_memo"),
|
|
125
|
-
name:
|
|
126
|
+
name: "补发备注"
|
|
126
127
|
}));
|
|
127
128
|
this.reissueGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
128
129
|
id: "".concat(options.id, "_bsReissueGoods"),
|
|
129
|
-
name:
|
|
130
|
+
name: "商品信息"
|
|
130
131
|
}));
|
|
131
132
|
this.children = [this.bsType, this.bsMemo, this.reissueGoods];
|
|
132
133
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
@@ -135,11 +136,11 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
135
136
|
validator: function validator(_, value) {
|
|
136
137
|
var _value$bsReissueGoods;
|
|
137
138
|
if (!value || !(value !== null && value !== void 0 && (_value$bsReissueGoods = value.bsReissueGoods) !== null && _value$bsReissueGoods !== void 0 && _value$bsReissueGoods.length)) {
|
|
138
|
-
return Promise.reject(new Error(
|
|
139
|
+
return Promise.reject(new Error("请选择bs补发商品"));
|
|
139
140
|
}
|
|
140
141
|
return Promise.resolve();
|
|
141
142
|
}
|
|
142
143
|
}] : [];
|
|
143
|
-
this.dataType =
|
|
144
|
+
this.dataType = "object";
|
|
144
145
|
});
|
|
145
146
|
export default BsReissue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
4
|
declare class Express implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
@@ -15,8 +15,8 @@ declare class Express implements ComponentInterface {
|
|
|
15
15
|
formField: string;
|
|
16
16
|
canSort: boolean;
|
|
17
17
|
children: ComponentInterface[];
|
|
18
|
-
dataType: ComponentInterface[
|
|
19
|
-
options: ComponentInterface[
|
|
18
|
+
dataType: ComponentInterface["dataType"];
|
|
19
|
+
options: ComponentInterface["options"];
|
|
20
20
|
constructor(options: PickOption);
|
|
21
21
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
22
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
@@ -5,12 +5,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
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
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
|
-
import React from
|
|
9
|
-
import { ExpressData } from
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
10
|
import GetFormItem from "../GetFormItem";
|
|
11
11
|
import ExpressCompany from "../ExpressCompany";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
-
import { isNull, filterFn as _filterFn } from
|
|
13
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import { SYMBOL } from "../../constant";
|
|
15
15
|
var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
16
16
|
var _this = this;
|
|
@@ -51,7 +51,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
51
51
|
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
52
52
|
});
|
|
53
53
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
54
|
-
return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id]);
|
|
54
|
+
return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id]) || "--";
|
|
55
55
|
});
|
|
56
56
|
_defineProperty(this, "editRender", function (p) {
|
|
57
57
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
|
|
@@ -61,7 +61,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
61
61
|
rules: _this.rules,
|
|
62
62
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
63
63
|
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,
|
|
64
|
-
component: !((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.isSingle) || ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) ===
|
|
64
|
+
component: !((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.isSingle) || ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) === "EXPRESS_COMPANY" ? /*#__PURE__*/React.createElement(ExpressCompany, {
|
|
65
65
|
options: _this.expressDateInstance.getExpressData()
|
|
66
66
|
}) : null
|
|
67
67
|
});
|
|
@@ -73,7 +73,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
73
73
|
type: item.type,
|
|
74
74
|
id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
|
|
75
75
|
name: "".concat(item.name, "-\u7269\u6D41\u516C\u53F8"),
|
|
76
|
-
filterComponentType:
|
|
76
|
+
filterComponentType: "MultipleSelect",
|
|
77
77
|
props: {
|
|
78
78
|
options: _this.expressDateInstance.getExpressData() || []
|
|
79
79
|
},
|
|
@@ -91,13 +91,13 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
91
91
|
this.type = options.type;
|
|
92
92
|
this.componentConfig = options.componentConfig;
|
|
93
93
|
this.rules = [];
|
|
94
|
-
this.align =
|
|
94
|
+
this.align = "left";
|
|
95
95
|
this.expressDateInstance = ExpressData.getInstance();
|
|
96
96
|
this.width = 200;
|
|
97
97
|
this.isCombinationComponent = false;
|
|
98
98
|
this.canSort = true;
|
|
99
99
|
this.children = [];
|
|
100
|
-
this.dataType =
|
|
100
|
+
this.dataType = "string";
|
|
101
101
|
this.options = this.expressDateInstance.getExpressData() || [];
|
|
102
102
|
});
|
|
103
103
|
export default Express;
|
|
@@ -109,8 +109,8 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
109
109
|
})) return null;
|
|
110
110
|
var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
|
|
111
111
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
112
|
-
}).join("");
|
|
113
|
-
return "".concat(addressText).concat(detail, " ").concat(name).concat(mobile);
|
|
112
|
+
}).join("/");
|
|
113
|
+
return "".concat(addressText, "/").concat(detail, "/ ").concat(name, "/").concat(mobile);
|
|
114
114
|
});
|
|
115
115
|
_defineProperty(this, "renderClient", function (record) {
|
|
116
116
|
var _typeMap$_this$type13, _typeMap$_this$type14, _typeMap$_this$type15, _typeMap$_this$type16, _typeMap$_this$type17, _typeMap$_this$type18, _ref4;
|
package/dist/esm/type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.9-alpha.
|
|
3
|
+
"version": "0.8.9-alpha.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.8.9-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.9-alpha.2",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.9-alpha.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "2326638457272e646e3fb9f5f20f5ce92e8a8347"
|
|
44
44
|
}
|