@kmkf-fe-packages/services-components 0.7.15-alpha.76 → 0.7.15-alpha.78
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.
|
@@ -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,54 +8,54 @@ 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 { BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType, 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 childHeaderMap = {
|
|
20
20
|
pic: {
|
|
21
21
|
component: BsHeaderPic,
|
|
22
|
-
name:
|
|
23
|
-
key:
|
|
22
|
+
name: "图片",
|
|
23
|
+
key: "pic"
|
|
24
24
|
},
|
|
25
25
|
name: {
|
|
26
26
|
component: BsHeaderName,
|
|
27
|
-
name:
|
|
28
|
-
key:
|
|
27
|
+
name: "名称",
|
|
28
|
+
key: "name"
|
|
29
29
|
},
|
|
30
30
|
code: {
|
|
31
31
|
component: BsHeaderCode,
|
|
32
|
-
name:
|
|
33
|
-
key:
|
|
32
|
+
name: "编码",
|
|
33
|
+
key: "code"
|
|
34
34
|
},
|
|
35
35
|
sku: {
|
|
36
36
|
component: BsHeaderSku,
|
|
37
|
-
name:
|
|
38
|
-
key:
|
|
37
|
+
name: "sku编码",
|
|
38
|
+
key: "sku"
|
|
39
39
|
},
|
|
40
40
|
money: {
|
|
41
41
|
component: BsHeaderMoney,
|
|
42
|
-
name:
|
|
43
|
-
key:
|
|
42
|
+
name: "实付金额",
|
|
43
|
+
key: "money"
|
|
44
44
|
},
|
|
45
45
|
number: {
|
|
46
46
|
component: BsHeaderNumber,
|
|
47
|
-
name:
|
|
48
|
-
key:
|
|
47
|
+
name: "数量",
|
|
48
|
+
key: "number"
|
|
49
49
|
},
|
|
50
50
|
share: {
|
|
51
51
|
component: BsHeaderShare,
|
|
52
|
-
name:
|
|
53
|
-
key:
|
|
52
|
+
name: "分摊价",
|
|
53
|
+
key: "share"
|
|
54
54
|
},
|
|
55
55
|
type: {
|
|
56
56
|
component: BsHeaderType,
|
|
57
|
-
name:
|
|
58
|
-
key:
|
|
57
|
+
name: "赠品类型",
|
|
58
|
+
key: "giftType"
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
@@ -122,7 +122,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
122
122
|
// 过滤组件id
|
|
123
123
|
name: item.name,
|
|
124
124
|
// 过滤组件名称
|
|
125
|
-
filterComponentType:
|
|
125
|
+
filterComponentType: "Input"
|
|
126
126
|
}];
|
|
127
127
|
});
|
|
128
128
|
this.name = options.name;
|
|
@@ -135,7 +135,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
135
135
|
this.canSort = false;
|
|
136
136
|
this.bsGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
137
137
|
id: "".concat(options.id, "_bsGoods"),
|
|
138
|
-
name:
|
|
138
|
+
name: "商品信息"
|
|
139
139
|
}));
|
|
140
140
|
this.children = [this.bsGoods];
|
|
141
141
|
// this.children = (options?.componentConfig?.showHeader || []).reduce(
|
|
@@ -159,11 +159,11 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
159
159
|
validator: function validator(_, value) {
|
|
160
160
|
var _value$bsGoods;
|
|
161
161
|
if (!value || !(value !== null && value !== void 0 && (_value$bsGoods = value.bsGoods) !== null && _value$bsGoods !== void 0 && _value$bsGoods.length)) {
|
|
162
|
-
return Promise.reject(new Error(
|
|
162
|
+
return Promise.reject(new Error("请选择bs商品"));
|
|
163
163
|
}
|
|
164
164
|
return Promise.resolve();
|
|
165
165
|
}
|
|
166
166
|
}] : [];
|
|
167
|
-
this.dataType =
|
|
167
|
+
this.dataType = "object";
|
|
168
168
|
});
|
|
169
169
|
export default BsGoods;
|
|
@@ -297,6 +297,12 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
297
297
|
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
298
298
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
299
299
|
return [{
|
|
300
|
+
dataIndex: "mark",
|
|
301
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
302
|
+
align: "center",
|
|
303
|
+
ellipsis: true,
|
|
304
|
+
width: 100
|
|
305
|
+
}, {
|
|
300
306
|
dataIndex: "pic",
|
|
301
307
|
title: "\u56FE\u7247",
|
|
302
308
|
align: "center",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.78",
|
|
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.7.15-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.78",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.78"
|
|
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": "6b9df5c3d3f86da3f0dca5564281db9bb9ebda7e"
|
|
44
44
|
}
|