@kmkf-fe-packages/services-components 0.8.17-alpha.2 → 0.8.17-alpha.21
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/README.md +2 -3
- package/dist/esm/components/BS/DeliveryNo/index.d.ts +32 -0
- package/dist/esm/components/BS/DeliveryNo/index.js +137 -0
- package/dist/esm/components/BS/common/BsHeaderGood.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderGood.js +42 -36
- package/dist/esm/components/Calculation/index.d.ts +31 -0
- package/dist/esm/components/Calculation/index.js +108 -0
- package/dist/esm/components/Common/index.js +7 -1
- package/dist/esm/components/CommonTradeId/index.js +1 -1
- package/dist/esm/components/GetFormItem/index.d.ts +4 -2
- package/dist/esm/components/GetFormItem/index.js +10 -3
- package/dist/esm/components/ShopInput/index.d.ts +1 -0
- package/dist/esm/components/ShopInput/index.js +2 -0
- package/dist/esm/components/StatusSelect/index.d.ts +5 -5
- package/dist/esm/components/StatusSelect/index.js +47 -47
- package/dist/esm/components/TextArea/index.d.ts +3 -3
- package/dist/esm/components/TextArea/index.js +9 -9
- package/dist/esm/factory.d.ts +3 -3
- package/dist/esm/factory.js +82 -78
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/type.d.ts +2 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
###
|
|
2
|
-
|
|
3
|
-
111
|
|
1
|
+
### 关于组件后缀
|
|
2
|
+
- 针对于自定义组件的后缀,在提交的时候是以组件类型的驼峰式来命名的
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class DeliveryNo implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
align: ALignType;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: (value: any, record: any) => any;
|
|
22
|
+
editRender: (p: any) => React.JSX.Element;
|
|
23
|
+
filterConfig: (item: ColumnConfig) => {
|
|
24
|
+
searchDefaultConditions: "like";
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
filterComponentType: "Input";
|
|
29
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
30
|
+
}[];
|
|
31
|
+
}
|
|
32
|
+
export default DeliveryNo;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
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); }
|
|
9
|
+
import React from "react";
|
|
10
|
+
import some from "lodash/some";
|
|
11
|
+
import GetFormItem from "../../GetFormItem";
|
|
12
|
+
import { JstGoodImage } from "../../Common";
|
|
13
|
+
import { JstGoods } from "@kmkf-fe-packages/basic-components";
|
|
14
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
15
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { SYMBOL } from "../../../constant";
|
|
17
|
+
var typeMap = {
|
|
18
|
+
BS_DELIVERY_NO: {
|
|
19
|
+
key: "deliveryNoList",
|
|
20
|
+
code: "deliveryNoIds"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var DeliveryNo = /*#__PURE__*/_createClass(function DeliveryNo(options) {
|
|
24
|
+
var _this = this,
|
|
25
|
+
_typeMap$options$type,
|
|
26
|
+
_typeMap$options$type2,
|
|
27
|
+
_this$componentConfig3;
|
|
28
|
+
_classCallCheck(this, DeliveryNo);
|
|
29
|
+
_defineProperty(this, "name", void 0);
|
|
30
|
+
_defineProperty(this, "id", void 0);
|
|
31
|
+
_defineProperty(this, "sortField", void 0);
|
|
32
|
+
_defineProperty(this, "type", void 0);
|
|
33
|
+
_defineProperty(this, "rules", void 0);
|
|
34
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
35
|
+
_defineProperty(this, "align", void 0);
|
|
36
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
37
|
+
_defineProperty(this, "formField", void 0);
|
|
38
|
+
_defineProperty(this, "canSort", void 0);
|
|
39
|
+
_defineProperty(this, "children", void 0);
|
|
40
|
+
_defineProperty(this, "dataType", void 0);
|
|
41
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
42
|
+
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
43
|
+
return !isNull(item);
|
|
44
|
+
}) : false;
|
|
45
|
+
return isShow ? /*#__PURE__*/React.createElement(ItemView, {
|
|
46
|
+
id: _this.id,
|
|
47
|
+
label: _this.name,
|
|
48
|
+
value: /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
49
|
+
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
50
|
+
type: 4
|
|
51
|
+
})
|
|
52
|
+
}) : null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
55
|
+
var _typeMap$_this$type;
|
|
56
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)];
|
|
57
|
+
//兼容多个商品
|
|
58
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
59
|
+
onClick: function onClick(e) {
|
|
60
|
+
return e.stopPropagation();
|
|
61
|
+
}
|
|
62
|
+
}, /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
63
|
+
list: list,
|
|
64
|
+
type: 4
|
|
65
|
+
}));
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
68
|
+
var _typeMap$_this$type2;
|
|
69
|
+
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)];
|
|
70
|
+
if (isNull(list)) return null;
|
|
71
|
+
return _this.renderPc(undefined, r);
|
|
72
|
+
});
|
|
73
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
74
|
+
var _typeMap$_this$type3;
|
|
75
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.key)];
|
|
76
|
+
});
|
|
77
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
78
|
+
var _typeMap$_this$type4;
|
|
79
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
|
|
80
|
+
return (list || []).map(function (item) {
|
|
81
|
+
return item === null || item === void 0 ? void 0 : item.deliveryNo;
|
|
82
|
+
}).join(",");
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "editRender", function (p) {
|
|
85
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
86
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
87
|
+
title: _this.name,
|
|
88
|
+
name: _this.id,
|
|
89
|
+
rules: _this.rules,
|
|
90
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
91
|
+
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,
|
|
92
|
+
component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
|
|
93
|
+
type: 4
|
|
94
|
+
}))
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
98
|
+
var _typeMap$_this$type5;
|
|
99
|
+
return [{
|
|
100
|
+
searchDefaultConditions: SYMBOL.like,
|
|
101
|
+
type: item.type,
|
|
102
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.code),
|
|
103
|
+
name: "".concat(_this.name),
|
|
104
|
+
filterComponentType: "Input",
|
|
105
|
+
filterFn: function filterFn(value) {
|
|
106
|
+
return function (i) {
|
|
107
|
+
var _typeMap$_this$type6;
|
|
108
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.code), value);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}];
|
|
112
|
+
});
|
|
113
|
+
this.name = options.name;
|
|
114
|
+
this.id = options.id;
|
|
115
|
+
this.sortField = "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.key);
|
|
116
|
+
this.formField = "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.key);
|
|
117
|
+
this.type = options.type;
|
|
118
|
+
this.componentConfig = options.componentConfig;
|
|
119
|
+
this.isCombinationComponent = false;
|
|
120
|
+
this.canSort = false;
|
|
121
|
+
this.children = [];
|
|
122
|
+
this.dataType = "object";
|
|
123
|
+
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
124
|
+
required: true,
|
|
125
|
+
validator: function validator(_, value) {
|
|
126
|
+
var hasNo = (value || []).some(function (item) {
|
|
127
|
+
return item.deliveryNo;
|
|
128
|
+
});
|
|
129
|
+
if (!hasNo) {
|
|
130
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684\u51FA\u5E93\u5355"));
|
|
131
|
+
}
|
|
132
|
+
return Promise.resolve();
|
|
133
|
+
}
|
|
134
|
+
}] : [];
|
|
135
|
+
this.align = "left";
|
|
136
|
+
});
|
|
137
|
+
export default DeliveryNo;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class BsHeaderGods implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
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
|
itemKey: any;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
getParentId: () => string;
|
|
@@ -17,63 +17,69 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
17
17
|
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; }
|
|
18
18
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
19
|
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); }
|
|
20
|
-
import React from
|
|
20
|
+
import React from "react";
|
|
21
21
|
import ItemView from "../../../commonComponents/ItemView";
|
|
22
|
-
import { isNull } from
|
|
22
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
23
|
import { BsHeaderPic, BsHeaderChild } from "./index";
|
|
24
24
|
var HeaderMap = {
|
|
25
25
|
mark: {
|
|
26
26
|
component: BsHeaderChild,
|
|
27
|
-
name:
|
|
28
|
-
key:
|
|
27
|
+
name: "商品标记",
|
|
28
|
+
key: "mark",
|
|
29
29
|
width: 140
|
|
30
30
|
},
|
|
31
|
+
skuName: {
|
|
32
|
+
component: BsHeaderChild,
|
|
33
|
+
name: "sku名称",
|
|
34
|
+
key: "skuName",
|
|
35
|
+
width: 200
|
|
36
|
+
},
|
|
31
37
|
pic: {
|
|
32
38
|
component: BsHeaderPic,
|
|
33
|
-
name:
|
|
34
|
-
key:
|
|
39
|
+
name: "图片",
|
|
40
|
+
key: "pic",
|
|
35
41
|
width: 70
|
|
36
42
|
},
|
|
37
43
|
name: {
|
|
38
44
|
component: BsHeaderChild,
|
|
39
|
-
name:
|
|
40
|
-
key:
|
|
45
|
+
name: "名称",
|
|
46
|
+
key: "name",
|
|
41
47
|
width: 200
|
|
42
48
|
},
|
|
43
49
|
code: {
|
|
44
50
|
component: BsHeaderChild,
|
|
45
|
-
name:
|
|
46
|
-
key:
|
|
51
|
+
name: "编码",
|
|
52
|
+
key: "code",
|
|
47
53
|
width: 100
|
|
48
54
|
},
|
|
49
55
|
sku: {
|
|
50
56
|
component: BsHeaderChild,
|
|
51
|
-
name:
|
|
52
|
-
key:
|
|
57
|
+
name: "sku编码",
|
|
58
|
+
key: "sku",
|
|
53
59
|
width: 140
|
|
54
60
|
},
|
|
55
61
|
money: {
|
|
56
62
|
component: BsHeaderChild,
|
|
57
|
-
name:
|
|
58
|
-
key:
|
|
63
|
+
name: "实付金额",
|
|
64
|
+
key: "money",
|
|
59
65
|
width: 140
|
|
60
66
|
},
|
|
61
67
|
number: {
|
|
62
68
|
component: BsHeaderChild,
|
|
63
|
-
name:
|
|
64
|
-
key:
|
|
69
|
+
name: "数量",
|
|
70
|
+
key: "number",
|
|
65
71
|
width: 100
|
|
66
72
|
},
|
|
67
73
|
share: {
|
|
68
74
|
component: BsHeaderChild,
|
|
69
|
-
name:
|
|
70
|
-
key:
|
|
75
|
+
name: "分摊价",
|
|
76
|
+
key: "share",
|
|
71
77
|
width: 120
|
|
72
78
|
},
|
|
73
79
|
type: {
|
|
74
80
|
component: BsHeaderChild,
|
|
75
|
-
name:
|
|
76
|
-
key:
|
|
81
|
+
name: "赠品类型",
|
|
82
|
+
key: "type",
|
|
77
83
|
width: 150
|
|
78
84
|
}
|
|
79
85
|
};
|
|
@@ -94,7 +100,7 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
94
100
|
_defineProperty(this, "dataType", void 0);
|
|
95
101
|
_defineProperty(this, "itemKey", void 0);
|
|
96
102
|
_defineProperty(this, "getParentId", function () {
|
|
97
|
-
var _this$id$split = _this.id.split(
|
|
103
|
+
var _this$id$split = _this.id.split("_"),
|
|
98
104
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
99
105
|
key = _this$id$split2[0],
|
|
100
106
|
name = _this$id$split2[1],
|
|
@@ -110,7 +116,7 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
110
116
|
});
|
|
111
117
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
112
118
|
var _this$getComponentVal;
|
|
113
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
119
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
114
120
|
});
|
|
115
121
|
_defineProperty(this, "renderLog", function (r) {
|
|
116
122
|
var id = _this.getParentId();
|
|
@@ -120,14 +126,14 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
120
126
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
121
127
|
var id = _this.getParentId();
|
|
122
128
|
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
123
|
-
next[
|
|
129
|
+
next["money"] && prv.push(next["money"]);
|
|
124
130
|
return prv;
|
|
125
131
|
}, []);
|
|
126
|
-
return list.join(
|
|
132
|
+
return list.join(",");
|
|
127
133
|
});
|
|
128
134
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
129
135
|
var _this$getComponentVal2;
|
|
130
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
136
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
131
137
|
});
|
|
132
138
|
_defineProperty(this, "editRender", function () {
|
|
133
139
|
return null;
|
|
@@ -141,21 +147,21 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
141
147
|
this.formField = options.id;
|
|
142
148
|
this.type = options.type;
|
|
143
149
|
this.componentConfig = options.componentConfig;
|
|
144
|
-
this.align =
|
|
150
|
+
this.align = "left";
|
|
145
151
|
this.width = 200;
|
|
146
152
|
this.isCombinationComponent = true;
|
|
147
153
|
this.canSort = false;
|
|
148
|
-
this.dataType =
|
|
154
|
+
this.dataType = "string";
|
|
149
155
|
this.itemKey = {
|
|
150
|
-
mark:
|
|
151
|
-
pic:
|
|
152
|
-
name:
|
|
153
|
-
code:
|
|
154
|
-
sku:
|
|
155
|
-
money:
|
|
156
|
-
number:
|
|
157
|
-
share:
|
|
158
|
-
type:
|
|
156
|
+
mark: "商品标记",
|
|
157
|
+
pic: "图片",
|
|
158
|
+
name: "名称",
|
|
159
|
+
code: "编码",
|
|
160
|
+
sku: "sku编码",
|
|
161
|
+
money: "实付金额",
|
|
162
|
+
number: "数量",
|
|
163
|
+
share: "分摊价",
|
|
164
|
+
type: "赠品类型"
|
|
159
165
|
};
|
|
160
166
|
this.children = _toConsumableArray(Object.keys(HeaderMap).reduce(function (prv, key) {
|
|
161
167
|
var _options$componentCon, _options$componentCon2;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class Calculation implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
isCombinationComponent: boolean;
|
|
11
|
+
formField: string;
|
|
12
|
+
canSort: boolean;
|
|
13
|
+
children: ComponentInterface[];
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
17
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
18
|
+
getComponentValue: (r: Record) => any;
|
|
19
|
+
renderExport: (value: any, record: Record) => any;
|
|
20
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
21
|
+
editRender: (p: any) => React.JSX.Element;
|
|
22
|
+
filterConfig: (item: ColumnConfig) => {
|
|
23
|
+
searchDefaultConditions: "like";
|
|
24
|
+
type: string;
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
filterComponentType: "Input";
|
|
28
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export default Calculation;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
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); }
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { ApaasInput } from "@kmkf-fe-packages/basic-components";
|
|
11
|
+
import GetFormItem from "../GetFormItem";
|
|
12
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { SYMBOL } from "../../constant";
|
|
15
|
+
var CalculationInput = function CalculationInput(props) {
|
|
16
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
17
|
+
style: {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
alignItems: 'center'
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/React.createElement(ApaasInput, props), /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
style: {
|
|
23
|
+
marginLeft: '4px'
|
|
24
|
+
}
|
|
25
|
+
}, props === null || props === void 0 ? void 0 : props.unit));
|
|
26
|
+
};
|
|
27
|
+
var Calculation = /*#__PURE__*/_createClass(function Calculation(options) {
|
|
28
|
+
var _this = this;
|
|
29
|
+
_classCallCheck(this, Calculation);
|
|
30
|
+
_defineProperty(this, "name", void 0);
|
|
31
|
+
_defineProperty(this, "id", void 0);
|
|
32
|
+
_defineProperty(this, "sortField", void 0);
|
|
33
|
+
_defineProperty(this, "type", void 0);
|
|
34
|
+
_defineProperty(this, "rules", void 0);
|
|
35
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
36
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
37
|
+
_defineProperty(this, "formField", void 0);
|
|
38
|
+
_defineProperty(this, "canSort", void 0);
|
|
39
|
+
_defineProperty(this, "children", void 0);
|
|
40
|
+
_defineProperty(this, "dataType", void 0);
|
|
41
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
42
|
+
var _record;
|
|
43
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_numericalCalculation")]) !== null && _record !== void 0 ? _record : "--");
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
46
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_numericalCalculation")])) return null;
|
|
47
|
+
return _this.renderPc(undefined, r);
|
|
48
|
+
});
|
|
49
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
50
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_numericalCalculation")];
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
53
|
+
var _record2;
|
|
54
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_numericalCalculation")]) !== null && _record2 !== void 0 ? _record2 : "--";
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
57
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
58
|
+
id: _this.id,
|
|
59
|
+
label: _this.name,
|
|
60
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
61
|
+
}) : null;
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "editRender", function (p) {
|
|
64
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
|
|
65
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
66
|
+
title: _this.name,
|
|
67
|
+
name: _this.id,
|
|
68
|
+
rules: _this.rules,
|
|
69
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
70
|
+
required: false,
|
|
71
|
+
style: {
|
|
72
|
+
display: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && (_this$componentConfig2 = _this$componentConfig.config) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.display ? 'unset' : 'none'
|
|
73
|
+
} // TODO: 样式隐藏
|
|
74
|
+
,
|
|
75
|
+
component: /*#__PURE__*/React.createElement(CalculationInput, _extends({
|
|
76
|
+
disabled: true
|
|
77
|
+
}, (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.config))
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
81
|
+
return {
|
|
82
|
+
searchDefaultConditions: SYMBOL.like,
|
|
83
|
+
type: item.type,
|
|
84
|
+
id: "".concat(item.id, "_numericalCalculation"),
|
|
85
|
+
// 过滤组件id
|
|
86
|
+
name: item.name,
|
|
87
|
+
// 过滤组件名称
|
|
88
|
+
filterComponentType: "Input",
|
|
89
|
+
filterFn: function filterFn(value) {
|
|
90
|
+
return function (i) {
|
|
91
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "numericalCalculation")).includes(value);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
this.name = options.name;
|
|
97
|
+
this.id = options.id;
|
|
98
|
+
this.sortField = "".concat(options.id, "_numericalCalculation");
|
|
99
|
+
this.formField = "".concat(options.id, "_numericalCalculation");
|
|
100
|
+
this.type = options.type;
|
|
101
|
+
this.componentConfig = options.componentConfig;
|
|
102
|
+
this.rules = [];
|
|
103
|
+
this.isCombinationComponent = false;
|
|
104
|
+
this.canSort = true;
|
|
105
|
+
this.children = [];
|
|
106
|
+
this.dataType = "number";
|
|
107
|
+
});
|
|
108
|
+
export default Calculation;
|
|
@@ -226,7 +226,7 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
226
226
|
color: "#1890ff",
|
|
227
227
|
cursor: "pointer"
|
|
228
228
|
}
|
|
229
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join("/") : item.sendId ? item.sendId : item.sendName) : null));
|
|
229
|
+
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join("/") : item.sendId ? item.sendId : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || "") : null));
|
|
230
230
|
}) : null;
|
|
231
231
|
};
|
|
232
232
|
//bs商品展示 todo
|
|
@@ -315,6 +315,12 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
315
315
|
src: val
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
+
}, {
|
|
319
|
+
dataIndex: "skuName",
|
|
320
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
321
|
+
align: "center",
|
|
322
|
+
ellipsis: true,
|
|
323
|
+
width: 200
|
|
318
324
|
}, {
|
|
319
325
|
dataIndex: "name",
|
|
320
326
|
title: "".concat(text, "\u540D\u79F0"),
|
|
@@ -93,7 +93,7 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
|
|
|
93
93
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
94
94
|
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,
|
|
95
95
|
component: /*#__PURE__*/React.createElement(Input, _extends({}, _this.componentConfig, {
|
|
96
|
-
placeholder: "\
|
|
96
|
+
placeholder: "\u65E0\u987B\u586B\u5199",
|
|
97
97
|
disabled: true
|
|
98
98
|
}))
|
|
99
99
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
2
|
declare type GetFormItemProps = {
|
|
3
3
|
rules: any[];
|
|
4
4
|
required: boolean;
|
|
@@ -6,6 +6,8 @@ declare type GetFormItemProps = {
|
|
|
6
6
|
name: string;
|
|
7
7
|
component: JSX.Element | null;
|
|
8
8
|
hidden?: boolean;
|
|
9
|
+
style?: CSSProperties | undefined;
|
|
10
|
+
[prop: string]: any;
|
|
9
11
|
};
|
|
10
|
-
declare const GetFormItem: ({ rules, required, title, component, name, hidden }: GetFormItemProps) => React.JSX.Element | null;
|
|
12
|
+
declare const GetFormItem: ({ rules, required, title, component, name, hidden, style, }: GetFormItemProps) => React.JSX.Element | null;
|
|
11
13
|
export default GetFormItem;
|
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
1
7
|
import React from "react";
|
|
2
8
|
import { Form } from "antd";
|
|
3
9
|
var GetFormItem = function GetFormItem(_ref) {
|
|
@@ -7,7 +13,8 @@ var GetFormItem = function GetFormItem(_ref) {
|
|
|
7
13
|
component = _ref.component,
|
|
8
14
|
name = _ref.name,
|
|
9
15
|
_ref$hidden = _ref.hidden,
|
|
10
|
-
hidden = _ref$hidden === void 0 ? false : _ref$hidden
|
|
16
|
+
hidden = _ref$hidden === void 0 ? false : _ref$hidden,
|
|
17
|
+
style = _ref.style;
|
|
11
18
|
var newRules = rules;
|
|
12
19
|
if (required) {
|
|
13
20
|
newRules = rules.concat({
|
|
@@ -19,9 +26,9 @@ var GetFormItem = function GetFormItem(_ref) {
|
|
|
19
26
|
if (hidden) return null;
|
|
20
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
28
|
className: "form-item--wrap",
|
|
22
|
-
style: {
|
|
29
|
+
style: _objectSpread({
|
|
23
30
|
position: "relative"
|
|
24
|
-
}
|
|
31
|
+
}, style)
|
|
25
32
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
26
33
|
name: name,
|
|
27
34
|
label: title,
|
|
@@ -13,6 +13,7 @@ declare class ShopInput implements ComponentInterface {
|
|
|
13
13
|
children: ComponentInterface[];
|
|
14
14
|
dataType: ComponentInterface['dataType'];
|
|
15
15
|
options: ComponentInterface['options'];
|
|
16
|
+
format: ComponentInterface['format'];
|
|
16
17
|
constructor(options: PickOption);
|
|
17
18
|
renderPc: (shopName: unknown, record: any) => React.JSX.Element;
|
|
18
19
|
renderLog: (record: Record) => any;
|
|
@@ -25,6 +25,7 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
|
25
25
|
_defineProperty(this, "children", void 0);
|
|
26
26
|
_defineProperty(this, "dataType", void 0);
|
|
27
27
|
_defineProperty(this, "options", void 0);
|
|
28
|
+
_defineProperty(this, "format", void 0);
|
|
28
29
|
_defineProperty(this, "renderPc", function (shopName, record) {
|
|
29
30
|
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(PlatformAvatar, {
|
|
30
31
|
type: record === null || record === void 0 ? void 0 : record.platform,
|
|
@@ -96,5 +97,6 @@ var ShopInput = /*#__PURE__*/_createClass(function ShopInput(options) {
|
|
|
96
97
|
this.children = [];
|
|
97
98
|
this.dataType = 'string';
|
|
98
99
|
this.options = this === null || this === void 0 ? void 0 : (_this$effects4 = this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.shopList;
|
|
100
|
+
this.format = 'shopInput';
|
|
99
101
|
});
|
|
100
102
|
export default ShopInput;
|
|
@@ -1,18 +1,18 @@
|
|
|
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 StatusSelect 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[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
10
|
isCombinationComponent: boolean;
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
15
|
-
options: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface['dataType'];
|
|
15
|
+
options: ComponentInterface['options'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
editRender: (p: any) => React.JSX.Element;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -8,69 +8,69 @@ 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 { CommonStatus } from
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { CommonStatus } from '@kmkf-fe-packages/basic-components';
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull, filterFn as _filterFn } from
|
|
15
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
16
|
import { SYMBOL } from "../../constant";
|
|
17
17
|
// const statusOptions: Array<{ value: string }> = [{ value: '成功' }, { value: '失败' }]
|
|
18
18
|
var selectTypeMap = {
|
|
19
19
|
REISSUE_STATUS: {
|
|
20
20
|
options: [{
|
|
21
|
-
value:
|
|
22
|
-
label:
|
|
23
|
-
color:
|
|
21
|
+
value: '成功',
|
|
22
|
+
label: '成功',
|
|
23
|
+
color: '#52c41a'
|
|
24
24
|
}, {
|
|
25
|
-
value:
|
|
26
|
-
label:
|
|
27
|
-
color:
|
|
25
|
+
value: '失败',
|
|
26
|
+
label: '失败',
|
|
27
|
+
color: '#ff4d4f'
|
|
28
28
|
}],
|
|
29
|
-
key:
|
|
30
|
-
info:
|
|
31
|
-
failValue:
|
|
29
|
+
key: 'reissueStatusValue',
|
|
30
|
+
info: 'reissueReason',
|
|
31
|
+
failValue: '失败'
|
|
32
32
|
},
|
|
33
33
|
EXCHANGE_STATUS: {
|
|
34
34
|
options: [{
|
|
35
|
-
value:
|
|
36
|
-
label:
|
|
37
|
-
color:
|
|
35
|
+
value: '成功',
|
|
36
|
+
label: '成功',
|
|
37
|
+
color: '#52c41a'
|
|
38
38
|
}, {
|
|
39
|
-
value:
|
|
40
|
-
label:
|
|
41
|
-
color:
|
|
39
|
+
value: '失败',
|
|
40
|
+
label: '失败',
|
|
41
|
+
color: '#ff4d4f'
|
|
42
42
|
}],
|
|
43
|
-
key:
|
|
44
|
-
info:
|
|
45
|
-
failValue:
|
|
43
|
+
key: 'exchangeStatusValue',
|
|
44
|
+
info: 'exchangeReason',
|
|
45
|
+
failValue: '失败'
|
|
46
46
|
},
|
|
47
|
-
|
|
47
|
+
ADJUST_WORK_ORDER_STATUS: {
|
|
48
48
|
options: [{
|
|
49
|
-
value:
|
|
50
|
-
label:
|
|
51
|
-
color:
|
|
49
|
+
value: '成功',
|
|
50
|
+
label: '成功',
|
|
51
|
+
color: '#52c41a'
|
|
52
52
|
}, {
|
|
53
|
-
value:
|
|
54
|
-
label:
|
|
55
|
-
color:
|
|
53
|
+
value: '失败',
|
|
54
|
+
label: '失败',
|
|
55
|
+
color: '#ff4d4f'
|
|
56
56
|
}],
|
|
57
|
-
key:
|
|
58
|
-
info:
|
|
59
|
-
failValue:
|
|
57
|
+
key: 'adjustWorkOrderStatusValue',
|
|
58
|
+
info: 'adjustWorkOrderReason',
|
|
59
|
+
failValue: '失败'
|
|
60
60
|
},
|
|
61
61
|
RETURN_GOODS_STATUS: {
|
|
62
62
|
options: [{
|
|
63
|
-
value:
|
|
64
|
-
label:
|
|
65
|
-
color:
|
|
63
|
+
value: '成功',
|
|
64
|
+
label: '成功',
|
|
65
|
+
color: '#52c41a'
|
|
66
66
|
}, {
|
|
67
|
-
value:
|
|
68
|
-
label:
|
|
69
|
-
color:
|
|
67
|
+
value: '失败',
|
|
68
|
+
label: '失败',
|
|
69
|
+
color: '#ff4d4f'
|
|
70
70
|
}],
|
|
71
|
-
key:
|
|
72
|
-
info:
|
|
73
|
-
failValue:
|
|
71
|
+
key: 'returnGoodsStatusValue',
|
|
72
|
+
info: 'returnGoodsReason',
|
|
73
|
+
failValue: '失败'
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
@@ -107,7 +107,7 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
107
107
|
var status = record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.status;
|
|
108
108
|
var statusColor = ((_selectTypeMap$_this$ = selectTypeMap[_this.type].options.find(function (item) {
|
|
109
109
|
return item.value === status;
|
|
110
|
-
})) === null || _selectTypeMap$_this$ === void 0 ? void 0 : _selectTypeMap$_this$.color) ||
|
|
110
|
+
})) === null || _selectTypeMap$_this$ === void 0 ? void 0 : _selectTypeMap$_this$.color) || '#000';
|
|
111
111
|
return !isNull(record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.status) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
112
112
|
id: _this.id,
|
|
113
113
|
label: _this.name,
|
|
@@ -115,7 +115,7 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
115
115
|
style: {
|
|
116
116
|
color: statusColor
|
|
117
117
|
}
|
|
118
|
-
}, record === null || record === void 0 ? void 0 : (_record$_this$id3 = record[_this.id]) === null || _record$_this$id3 === void 0 ? void 0 : _record$_this$id3.status), /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : (_record$_this$id4 = record[_this.id]) === null || _record$_this$id4 === void 0 ? void 0 : _record$_this$id4.reason) ||
|
|
118
|
+
}, record === null || record === void 0 ? void 0 : (_record$_this$id3 = record[_this.id]) === null || _record$_this$id3 === void 0 ? void 0 : _record$_this$id3.status), /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : (_record$_this$id4 = record[_this.id]) === null || _record$_this$id4 === void 0 ? void 0 : _record$_this$id4.reason) || ''))
|
|
119
119
|
}) : null;
|
|
120
120
|
});
|
|
121
121
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -123,12 +123,12 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
123
123
|
var status = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)];
|
|
124
124
|
var statusColor = ((_selectTypeMap$_this$2 = selectTypeMap[_this.type].options.find(function (item) {
|
|
125
125
|
return item.value === status;
|
|
126
|
-
})) === null || _selectTypeMap$_this$2 === void 0 ? void 0 : _selectTypeMap$_this$2.color) ||
|
|
126
|
+
})) === null || _selectTypeMap$_this$2 === void 0 ? void 0 : _selectTypeMap$_this$2.color) || '#000';
|
|
127
127
|
return !isNull(status) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
128
128
|
style: {
|
|
129
129
|
color: statusColor
|
|
130
130
|
}
|
|
131
|
-
}, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]), /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].info)]) ||
|
|
131
|
+
}, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]), /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].info)]) || '')) : '--';
|
|
132
132
|
});
|
|
133
133
|
_defineProperty(this, "renderLog", function (r) {
|
|
134
134
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)])) return null;
|
|
@@ -139,7 +139,7 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
139
139
|
});
|
|
140
140
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
141
141
|
var _record;
|
|
142
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]) !== null && _record !== void 0 ? _record :
|
|
142
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]) !== null && _record !== void 0 ? _record : '--';
|
|
143
143
|
});
|
|
144
144
|
_defineProperty(this, "filterConfig", function (item) {
|
|
145
145
|
return {
|
|
@@ -149,7 +149,7 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
149
149
|
// 过滤组件id
|
|
150
150
|
name: item.name,
|
|
151
151
|
// 过滤组件名称
|
|
152
|
-
filterComponentType:
|
|
152
|
+
filterComponentType: 'MultipleSelect',
|
|
153
153
|
props: {
|
|
154
154
|
options: selectTypeMap[_this.type].options
|
|
155
155
|
},
|
|
@@ -172,7 +172,7 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
172
172
|
this.isCombinationComponent = false;
|
|
173
173
|
this.canSort = true;
|
|
174
174
|
this.children = [];
|
|
175
|
-
this.dataType =
|
|
175
|
+
this.dataType = 'string';
|
|
176
176
|
this.options = selectTypeMap[options.type].options;
|
|
177
177
|
});
|
|
178
178
|
export default StatusSelect;
|
|
@@ -1,5 +1,5 @@
|
|
|
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 BasicInput implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -11,7 +11,7 @@ declare class BasicInput implements ComponentInterface {
|
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
15
|
constructor(options: PickOption);
|
|
16
16
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
17
17
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -6,11 +6,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import { ApaasTextArea } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { ApaasTextArea } from "@kmkf-fe-packages/basic-components";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
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 BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
16
16
|
var _this = this;
|
|
@@ -28,7 +28,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
28
28
|
_defineProperty(this, "dataType", void 0);
|
|
29
29
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
30
30
|
var _record;
|
|
31
|
-
return /*#__PURE__*/React.createElement("
|
|
31
|
+
return /*#__PURE__*/React.createElement("pre", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record !== void 0 ? _record : "--");
|
|
32
32
|
});
|
|
33
33
|
_defineProperty(this, "renderLog", function (r) {
|
|
34
34
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_textarea")])) return null;
|
|
@@ -39,13 +39,13 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
39
39
|
});
|
|
40
40
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
41
41
|
var _record2;
|
|
42
|
-
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record2 !== void 0 ? _record2 :
|
|
42
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_textarea")]) !== null && _record2 !== void 0 ? _record2 : "--";
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "renderClient", function (record) {
|
|
45
45
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
46
46
|
id: _this.id,
|
|
47
47
|
label: _this.name,
|
|
48
|
-
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
48
|
+
value: /*#__PURE__*/React.createElement("pre", null, record === null || record === void 0 ? void 0 : record[_this.id])
|
|
49
49
|
}) : null;
|
|
50
50
|
});
|
|
51
51
|
_defineProperty(this, "editRender", function (p) {
|
|
@@ -69,10 +69,10 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
69
69
|
// 过滤组件id
|
|
70
70
|
name: item.name,
|
|
71
71
|
// 过滤组件名称
|
|
72
|
-
filterComponentType:
|
|
72
|
+
filterComponentType: "Input",
|
|
73
73
|
filterFn: function filterFn(value) {
|
|
74
74
|
return function (i) {
|
|
75
|
-
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
75
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "textarea")).includes(value);
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
};
|
|
@@ -83,7 +83,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
83
83
|
this.formField = "".concat(options.id, "_textarea");
|
|
84
84
|
this.type = options.type;
|
|
85
85
|
this.componentConfig = options.componentConfig;
|
|
86
|
-
this.dataType =
|
|
86
|
+
this.dataType = "string";
|
|
87
87
|
this.rules = [];
|
|
88
88
|
this.isCombinationComponent = false;
|
|
89
89
|
this.canSort = true;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsSystemOrder, StatusSelect, CommonTradeId } from
|
|
2
|
-
import { PickOption } from
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsSystemOrder, StatusSelect, CommonTradeId, DeliveryNo, Calculation } from './index';
|
|
2
|
+
import { PickOption } from './type';
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => StatusSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | DeliveryNo | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | CommonTradeId | Calculation;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,143 +1,147 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsSystemOrder, StatusSelect, CommonTradeId } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsSystemOrder, StatusSelect, CommonTradeId, DeliveryNo, Calculation } from "./index";
|
|
2
2
|
export var factory = function factory(type, options) {
|
|
3
3
|
var _options$componentCon;
|
|
4
4
|
switch (type) {
|
|
5
|
-
case
|
|
5
|
+
case 'PLATFORM_INPUT':
|
|
6
6
|
return new PlatForm();
|
|
7
|
-
case
|
|
7
|
+
case 'SHOP_INPUT':
|
|
8
8
|
return new ShopInput(options);
|
|
9
|
-
case
|
|
9
|
+
case 'OPERATOR_INPUT':
|
|
10
10
|
return new Submitter(options);
|
|
11
|
-
case
|
|
11
|
+
case 'HANDLER_INPUT':
|
|
12
12
|
return new Handler(options);
|
|
13
|
-
case
|
|
13
|
+
case 'COMPLETED_USER_INPUT':
|
|
14
14
|
return new CompletedUser(options);
|
|
15
|
-
case
|
|
15
|
+
case 'INPUT':
|
|
16
16
|
return new BasicInput(options);
|
|
17
|
-
case
|
|
17
|
+
case 'RADIO':
|
|
18
18
|
return new BasicRadio(options);
|
|
19
|
-
case
|
|
19
|
+
case 'TEXTAREA':
|
|
20
20
|
return new BasicTextArea(options);
|
|
21
|
-
case
|
|
21
|
+
case 'CHECKBOX':
|
|
22
22
|
return new BasicCheckbox(options);
|
|
23
|
-
case
|
|
23
|
+
case 'DATETIME':
|
|
24
24
|
return new BasicDataTime(options);
|
|
25
|
-
case
|
|
26
|
-
case
|
|
25
|
+
case 'SELECT':
|
|
26
|
+
case 'BUYER_MESSAGE_NOTICE':
|
|
27
27
|
return new BasicSelect(options);
|
|
28
|
-
case
|
|
28
|
+
case 'PICTURE':
|
|
29
29
|
return new BasicPicture(options);
|
|
30
|
-
case
|
|
30
|
+
case 'BASIC_MULT_SELECT':
|
|
31
31
|
return new BasicMultSelect(options);
|
|
32
|
-
case
|
|
32
|
+
case 'MULT_SELECT':
|
|
33
33
|
return new BasicCascader(options);
|
|
34
|
-
case
|
|
34
|
+
case 'BASIC_ADDRESS':
|
|
35
35
|
return new BasicAddress(options);
|
|
36
|
-
case
|
|
36
|
+
case 'BASIC_GRADE':
|
|
37
37
|
return new BasicGrade(options);
|
|
38
|
-
case
|
|
38
|
+
case 'RATE':
|
|
39
39
|
return new BasicRate(options);
|
|
40
|
-
case
|
|
40
|
+
case 'FILE':
|
|
41
41
|
return new BasicFile(options);
|
|
42
|
-
case
|
|
42
|
+
case 'POSTING':
|
|
43
43
|
return new BasicPosting(options);
|
|
44
|
-
case
|
|
44
|
+
case 'SHOP_NAME_INPUT':
|
|
45
45
|
return new ShopName(options);
|
|
46
|
-
case
|
|
46
|
+
case 'TRADE_ID_INPUT':
|
|
47
47
|
return options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.erpFlag ? new ErpTradeId(options) : new TradeId(options);
|
|
48
|
-
case
|
|
48
|
+
case 'BUYER_NICK_INPUT':
|
|
49
49
|
return new BuyerNick(options);
|
|
50
|
-
case
|
|
50
|
+
case 'RECEIVER_NAME_INPUT':
|
|
51
51
|
return new ReceiverName(options);
|
|
52
|
-
case
|
|
52
|
+
case 'RECEIVER_MOBILE_INPUT':
|
|
53
53
|
return new ReceiverMobile(options);
|
|
54
|
-
case
|
|
54
|
+
case 'RECEIVER_ADDRESS_INPUT':
|
|
55
55
|
return new ReceiverAddress(options);
|
|
56
|
-
case
|
|
57
|
-
case
|
|
58
|
-
case
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
case
|
|
62
|
-
case
|
|
56
|
+
case 'TRADE_CREATE_DATETIME':
|
|
57
|
+
case 'TRADE_PAYMENT_DATETIME':
|
|
58
|
+
case 'TRADE_DELIVERY_DATETIME':
|
|
59
|
+
case 'TRADE_CLOSING_DATETIME':
|
|
60
|
+
case 'BS_SIGNING_TIME':
|
|
61
|
+
case 'BS_SEND_TIME':
|
|
62
|
+
case 'BS_TRADE_PAYMENT_TIME':
|
|
63
63
|
return new TradeDateTime(options);
|
|
64
|
-
case
|
|
64
|
+
case 'EXPRESS_LOGISTICS_SELECT':
|
|
65
65
|
return new Logistics(options);
|
|
66
|
-
case
|
|
66
|
+
case 'RETURN_LOGISTICS_SELECT':
|
|
67
67
|
return new ReturnLogistics(options);
|
|
68
|
-
case
|
|
69
|
-
case
|
|
70
|
-
case
|
|
71
|
-
case
|
|
68
|
+
case 'ACTUAL_PAYMENT':
|
|
69
|
+
case 'BS_NET_RECEIPTS':
|
|
70
|
+
case 'BS_DEPOSIT':
|
|
71
|
+
case 'BS_PACKAGE_WEIGHT':
|
|
72
72
|
return new ActualPayment(options);
|
|
73
|
-
case
|
|
73
|
+
case 'REMARK_INPUT':
|
|
74
74
|
return new ERemark(options);
|
|
75
|
-
case
|
|
75
|
+
case 'ITEM_SELECT':
|
|
76
76
|
return new ItemSelect(options);
|
|
77
|
-
case
|
|
77
|
+
case 'ITEM_ID':
|
|
78
78
|
return new ItemId(options);
|
|
79
|
-
case
|
|
79
|
+
case 'ITEM_ENCODE':
|
|
80
80
|
return new ItemEnCode(options);
|
|
81
|
-
case
|
|
81
|
+
case 'ALI_PAY_INPUT':
|
|
82
82
|
return new AliPay(options);
|
|
83
|
-
case
|
|
83
|
+
case 'ORDINARY_INVOICE':
|
|
84
84
|
return new Ordinary(options);
|
|
85
|
-
case
|
|
85
|
+
case 'ITEM_SELECT_THIRD':
|
|
86
86
|
return new ThirdItemSelect(options);
|
|
87
|
-
case
|
|
87
|
+
case 'ENTERPRISE_PAYMENT':
|
|
88
88
|
return new Payment(options);
|
|
89
|
-
case
|
|
89
|
+
case 'SYSTEM_ORDER_NO':
|
|
90
90
|
return new SystemOrderNo(options);
|
|
91
|
-
case
|
|
91
|
+
case 'LOGISTICS_INTERCEPTION':
|
|
92
92
|
return new LogisticsInterception(options);
|
|
93
|
-
case
|
|
93
|
+
case 'LOGISTICS_TRAJECTORY':
|
|
94
94
|
return new LogisticsTrajectory(options);
|
|
95
|
-
case
|
|
95
|
+
case 'WORK_ORDER_ID_INPUT':
|
|
96
96
|
return new WorkOrderId(options);
|
|
97
|
-
case
|
|
97
|
+
case 'FLOW_STATUS_SELECT':
|
|
98
98
|
return new FlowStatusSelect(options);
|
|
99
|
-
case
|
|
99
|
+
case 'COMPLETED_DATETIME':
|
|
100
100
|
return new CommonDataTime(options);
|
|
101
|
-
case
|
|
101
|
+
case 'CREATED_DATETIME':
|
|
102
102
|
return new CommonDataTime(options);
|
|
103
|
-
case
|
|
103
|
+
case 'UPDATE_DATETIME':
|
|
104
104
|
return new CommonDataTime(options);
|
|
105
|
-
case
|
|
105
|
+
case 'TEMPLATE_ID_INPUT':
|
|
106
106
|
return new TemplateSelect(options);
|
|
107
|
-
case
|
|
108
|
-
case
|
|
109
|
-
case
|
|
107
|
+
case 'JST_LOGISTICS':
|
|
108
|
+
case 'BS_LOGISTICS':
|
|
109
|
+
case 'REISSUE_LOGISTICS':
|
|
110
110
|
return new JstLogistics(options);
|
|
111
|
-
case
|
|
111
|
+
case 'JST_ITEM_SELECT_THIRD':
|
|
112
112
|
return new JstItemSelect(options);
|
|
113
|
-
case
|
|
113
|
+
case 'JST_SUPPLY':
|
|
114
114
|
return new JstSupply(options);
|
|
115
|
-
case
|
|
115
|
+
case 'BS_SYSTEM_ORDER':
|
|
116
116
|
return new BsSystemOrder(options);
|
|
117
|
-
case
|
|
118
|
-
case
|
|
117
|
+
case 'JST_SEND_GOOD':
|
|
118
|
+
case 'BS_SEND_GOOD':
|
|
119
119
|
return new JstSendGood(options);
|
|
120
|
-
case
|
|
120
|
+
case 'BS_POSTING':
|
|
121
121
|
return new BasicPosting(options);
|
|
122
|
-
case
|
|
122
|
+
case 'BS_GOODS':
|
|
123
123
|
return new BsGoods(options);
|
|
124
|
-
case
|
|
124
|
+
case 'BS_EXCHANGE_GOODS':
|
|
125
125
|
return new BsExchange(options);
|
|
126
|
-
case
|
|
126
|
+
case 'BS_REISSUE_GOODS':
|
|
127
127
|
return new BsReissue(options);
|
|
128
|
-
case
|
|
128
|
+
case 'BS_DELIVERY_NO':
|
|
129
|
+
return new DeliveryNo(options);
|
|
130
|
+
case 'FLOW_WORK_ORDER_ID_INPUT':
|
|
129
131
|
return new FlowWorkOrderId(options);
|
|
130
|
-
case
|
|
132
|
+
case 'OUTER_WORK_ORDER_ID_INPUT':
|
|
131
133
|
return new FlowWorkOrderId(options);
|
|
132
|
-
case
|
|
133
|
-
case
|
|
134
|
-
case
|
|
135
|
-
case
|
|
134
|
+
case 'REISSUE_STATUS':
|
|
135
|
+
case 'EXCHANGE_STATUS':
|
|
136
|
+
case 'ADJUST_WORK_ORDER_STATUS':
|
|
137
|
+
case 'RETURN_GOODS_STATUS':
|
|
136
138
|
return new StatusSelect(options);
|
|
137
|
-
case
|
|
138
|
-
case
|
|
139
|
-
case
|
|
139
|
+
case 'REISSUE_TRADE_ID':
|
|
140
|
+
case 'EXCHANGE_TRADE_ID':
|
|
141
|
+
case 'RETURN_GOODS_TRADE_ID':
|
|
140
142
|
return new CommonTradeId(options);
|
|
143
|
+
case 'NUMERICAL_CALCULATION':
|
|
144
|
+
return new Calculation(options);
|
|
141
145
|
default:
|
|
142
146
|
return new BasicInput(options);
|
|
143
147
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { default as BsSystemOrder } from "./components/BS/BsSystemOrder";
|
|
|
41
41
|
export { default as BsGoods } from "./components/BS/BsGoods";
|
|
42
42
|
export { default as BsExchange } from "./components/BS/BsExchange";
|
|
43
43
|
export { default as BsReissue } from "./components/BS/BsReissue";
|
|
44
|
+
export { default as DeliveryNo } from "./components/BS/DeliveryNo";
|
|
44
45
|
export { default as FlowStatusSelect } from "./components/FlowStatusSelect";
|
|
45
46
|
export { default as TemplateSelect } from "./components/TemplateSelect";
|
|
46
47
|
export { default as WorkOrderId } from "./components/WorkOrderId";
|
|
@@ -54,6 +55,7 @@ export { default as CompletedUser } from "./components/CompletedUser";
|
|
|
54
55
|
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
55
56
|
export { default as StatusSelect } from "./components/StatusSelect";
|
|
56
57
|
export { default as CommonTradeId } from "./components/CommonTradeId";
|
|
58
|
+
export { default as Calculation } from "./components/Calculation";
|
|
57
59
|
export { factory } from "./factory";
|
|
58
60
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
59
61
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/dist/esm/index.js
CHANGED
|
@@ -41,6 +41,7 @@ export { default as BsSystemOrder } from "./components/BS/BsSystemOrder";
|
|
|
41
41
|
export { default as BsGoods } from "./components/BS/BsGoods";
|
|
42
42
|
export { default as BsExchange } from "./components/BS/BsExchange";
|
|
43
43
|
export { default as BsReissue } from "./components/BS/BsReissue";
|
|
44
|
+
export { default as DeliveryNo } from "./components/BS/DeliveryNo";
|
|
44
45
|
export { default as FlowStatusSelect } from "./components/FlowStatusSelect";
|
|
45
46
|
export { default as TemplateSelect } from "./components/TemplateSelect";
|
|
46
47
|
export { default as WorkOrderId } from "./components/WorkOrderId";
|
|
@@ -54,6 +55,7 @@ export { default as CompletedUser } from "./components/CompletedUser";
|
|
|
54
55
|
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
55
56
|
export { default as StatusSelect } from "./components/StatusSelect";
|
|
56
57
|
export { default as CommonTradeId } from "./components/CommonTradeId";
|
|
58
|
+
export { default as Calculation } from "./components/Calculation";
|
|
57
59
|
export { factory } from "./factory";
|
|
58
60
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
59
61
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface ComponentInterface {
|
|
|
39
39
|
width?: number;
|
|
40
40
|
align?: ALignType;
|
|
41
41
|
dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
|
|
42
|
-
format?: "dateTime" | "date" | "time" | "cascader";
|
|
42
|
+
format?: "dateTime" | "date" | "time" | "cascader" | 'shopInput';
|
|
43
43
|
options?: Array<any>;
|
|
44
44
|
/**
|
|
45
45
|
* @description 组件下标
|
|
@@ -147,6 +147,7 @@ export interface ComponentInterface {
|
|
|
147
147
|
showHeader?: string[];
|
|
148
148
|
reasonList?: any[];
|
|
149
149
|
disabled?: boolean;
|
|
150
|
+
config?: any;
|
|
150
151
|
};
|
|
151
152
|
effects?: {
|
|
152
153
|
queryWorkOrderDetail?: (r: Record) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.17-alpha.
|
|
3
|
+
"version": "0.8.17-alpha.21",
|
|
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.17-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.17-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.17-alpha.19",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.17-alpha.19"
|
|
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": "319b660649aae071fd1c8fb928909761b317638f"
|
|
44
44
|
}
|