@kmkf-fe-packages/services-components 2.1.9 → 2.1.11
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/AfterSalesOrderId/index.d.ts +10 -4
- package/dist/esm/components/AfterSalesOrderId/index.js +13 -10
- package/dist/esm/components/BS/common/expressCode.d.ts +10 -4
- package/dist/esm/components/BS/common/expressCode.js +22 -19
- package/dist/esm/components/BuyerNick/index.d.ts +17 -7
- package/dist/esm/components/BuyerNick/index.js +24 -11
- package/dist/esm/components/CommonHeaderGood/index.js +3 -3
- package/dist/esm/components/CommonMultiStatus/index.d.ts +8 -4
- package/dist/esm/components/CommonMultiStatus/index.js +79 -78
- package/dist/esm/components/Input/index.d.ts +14 -5
- package/dist/esm/components/Input/index.js +24 -18
- package/dist/esm/components/Picture/index.d.ts +5 -5
- package/dist/esm/components/Picture/index.js +19 -19
- package/dist/esm/components/PicturePro/PictureUrl.d.ts +4 -4
- package/dist/esm/components/PicturePro/PictureUrl.js +7 -7
- package/dist/esm/components/ReceiverName/index.d.ts +3 -3
- package/dist/esm/components/ReceiverName/index.js +8 -8
- package/dist/esm/components/Remark/index.d.ts +16 -6
- package/dist/esm/components/Remark/index.js +29 -16
- package/dist/esm/components/ShopName/index.d.ts +13 -3
- package/dist/esm/components/ShopName/index.js +16 -3
- package/dist/esm/components/TextArea/index.d.ts +16 -6
- package/dist/esm/components/TextArea/index.js +23 -10
- package/dist/esm/constant.d.ts +9 -0
- package/dist/esm/constant.js +38 -14
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +1 -1
- package/package.json +4 -4
- package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
|
@@ -8,100 +8,100 @@ 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 some from
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import some from 'lodash/some';
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import { CommonOrderContent } from "../Common";
|
|
15
|
-
import { CommonMultiStatus as Status } from
|
|
15
|
+
import { CommonMultiStatus as Status } from '@kmkf-fe-packages/basic-components';
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull, filterFn as _filterFn } from
|
|
18
|
-
import { SYMBOL } from "../../constant";
|
|
17
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
|
+
import { SEARCH_OPTIONS_V2, SYMBOL } from "../../constant";
|
|
19
19
|
var typeMap = {
|
|
20
20
|
RETURN_GOODS_STATUS: {
|
|
21
21
|
options: [{
|
|
22
|
-
value:
|
|
23
|
-
label:
|
|
24
|
-
color:
|
|
22
|
+
value: '成功',
|
|
23
|
+
label: '成功',
|
|
24
|
+
color: '#52c41a'
|
|
25
25
|
}, {
|
|
26
|
-
value:
|
|
27
|
-
label:
|
|
28
|
-
color:
|
|
26
|
+
value: '失败',
|
|
27
|
+
label: '失败',
|
|
28
|
+
color: '#ff4d4f'
|
|
29
29
|
}],
|
|
30
|
-
key:
|
|
31
|
-
code:
|
|
32
|
-
name:
|
|
30
|
+
key: 'returnGoodsStatusList',
|
|
31
|
+
code: 'returnGoodsStatusValue',
|
|
32
|
+
name: '退货状态',
|
|
33
33
|
type: 1,
|
|
34
|
-
valueKey:
|
|
35
|
-
idKey:
|
|
36
|
-
failValue:
|
|
34
|
+
valueKey: 'status',
|
|
35
|
+
idKey: 'systemOrderId',
|
|
36
|
+
failValue: '失败'
|
|
37
37
|
},
|
|
38
38
|
EXCHANGE_STATUS: {
|
|
39
39
|
options: [{
|
|
40
|
-
value:
|
|
41
|
-
label:
|
|
42
|
-
color:
|
|
40
|
+
value: '成功',
|
|
41
|
+
label: '成功',
|
|
42
|
+
color: '#52c41a'
|
|
43
43
|
}, {
|
|
44
|
-
value:
|
|
45
|
-
label:
|
|
46
|
-
color:
|
|
44
|
+
value: '失败',
|
|
45
|
+
label: '失败',
|
|
46
|
+
color: '#ff4d4f'
|
|
47
47
|
}],
|
|
48
|
-
key:
|
|
49
|
-
code:
|
|
50
|
-
name:
|
|
48
|
+
key: 'exchangeReason',
|
|
49
|
+
code: 'exchangeStatusValue',
|
|
50
|
+
name: '换货状态',
|
|
51
51
|
type: 1,
|
|
52
|
-
valueKey:
|
|
53
|
-
idKey:
|
|
54
|
-
failValue:
|
|
52
|
+
valueKey: 'status',
|
|
53
|
+
idKey: 'systemOrderId',
|
|
54
|
+
failValue: '失败'
|
|
55
55
|
},
|
|
56
56
|
WAREHOUSING_STATUS: {
|
|
57
57
|
options: [{
|
|
58
|
-
value:
|
|
59
|
-
label:
|
|
60
|
-
color:
|
|
58
|
+
value: '2',
|
|
59
|
+
label: '已入库',
|
|
60
|
+
color: '#52c41a'
|
|
61
61
|
}, {
|
|
62
|
-
value:
|
|
63
|
-
label:
|
|
64
|
-
color:
|
|
62
|
+
value: '1',
|
|
63
|
+
label: '部分入库',
|
|
64
|
+
color: '#e7780f'
|
|
65
65
|
}, {
|
|
66
|
-
value:
|
|
67
|
-
label:
|
|
68
|
-
color:
|
|
66
|
+
value: '0',
|
|
67
|
+
label: '未入库',
|
|
68
|
+
color: '#ff4d4f'
|
|
69
69
|
}],
|
|
70
|
-
key:
|
|
71
|
-
code:
|
|
72
|
-
name:
|
|
70
|
+
key: 'inStockStatusItemList',
|
|
71
|
+
code: 'inStockStatusList',
|
|
72
|
+
name: '商品入库状态(勿填)',
|
|
73
73
|
type: 2,
|
|
74
|
-
valueKey:
|
|
75
|
-
idKey:
|
|
76
|
-
failValue:
|
|
77
|
-
dataType:
|
|
74
|
+
valueKey: 'status',
|
|
75
|
+
idKey: 'systemOrderId',
|
|
76
|
+
failValue: '失败',
|
|
77
|
+
dataType: 'array_object'
|
|
78
78
|
},
|
|
79
79
|
BS_E3_WAREHOUSING_STATUS: {
|
|
80
80
|
options: [{
|
|
81
|
-
value:
|
|
82
|
-
label:
|
|
83
|
-
color:
|
|
81
|
+
value: '2',
|
|
82
|
+
label: '已入库',
|
|
83
|
+
color: '#52c41a'
|
|
84
84
|
}, {
|
|
85
|
-
value:
|
|
86
|
-
label:
|
|
87
|
-
color:
|
|
85
|
+
value: '1',
|
|
86
|
+
label: '部分入库',
|
|
87
|
+
color: '#e7780f'
|
|
88
88
|
}, {
|
|
89
|
-
value:
|
|
90
|
-
label:
|
|
91
|
-
color:
|
|
89
|
+
value: '0',
|
|
90
|
+
label: '未入库',
|
|
91
|
+
color: '#ff4d4f'
|
|
92
92
|
}, {
|
|
93
|
-
value:
|
|
94
|
-
label:
|
|
95
|
-
color:
|
|
93
|
+
value: '3',
|
|
94
|
+
label: '已退回给客户',
|
|
95
|
+
color: '#1B5BF3'
|
|
96
96
|
}],
|
|
97
|
-
key:
|
|
98
|
-
code:
|
|
99
|
-
name:
|
|
97
|
+
key: 'bsE3InStockStatusItemList',
|
|
98
|
+
code: 'bsE3InStockStatusList',
|
|
99
|
+
name: '商品入库状态',
|
|
100
100
|
type: 2,
|
|
101
|
-
valueKey:
|
|
102
|
-
idKey:
|
|
103
|
-
failValue:
|
|
104
|
-
dataType:
|
|
101
|
+
valueKey: 'status',
|
|
102
|
+
idKey: 'systemOrderId',
|
|
103
|
+
failValue: '失败',
|
|
104
|
+
dataType: 'array_object'
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
@@ -180,10 +180,10 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
180
180
|
});
|
|
181
181
|
if (_this.isSingleValue) {
|
|
182
182
|
var _typeMap$_this$type15;
|
|
183
|
-
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
183
|
+
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || '';
|
|
184
184
|
}
|
|
185
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
186
|
-
}).join(
|
|
185
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || '');
|
|
186
|
+
}).join(',');
|
|
187
187
|
});
|
|
188
188
|
_defineProperty(this, "editRender", function (p) {
|
|
189
189
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
|
|
@@ -194,7 +194,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
194
194
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
195
195
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
196
196
|
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,
|
|
197
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
197
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
|
|
198
198
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
199
199
|
type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
|
|
200
200
|
failValue: typeMap[_this.type].failValue
|
|
@@ -204,17 +204,18 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
204
204
|
_defineProperty(this, "filterConfig", function (item) {
|
|
205
205
|
var _typeMap$_this$type19, _item$templateConfig;
|
|
206
206
|
return {
|
|
207
|
-
searchDefaultConditions: [
|
|
207
|
+
searchDefaultConditions: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
208
208
|
type: item.type,
|
|
209
209
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
|
|
210
210
|
name: "".concat(_this.name),
|
|
211
|
-
filterComponentType: [
|
|
211
|
+
filterComponentType: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? 'MultipleSelect' : 'SelectInput',
|
|
212
212
|
props: {
|
|
213
213
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
214
214
|
fieldNames: {
|
|
215
|
-
label:
|
|
216
|
-
value:
|
|
217
|
-
}
|
|
215
|
+
label: 'label',
|
|
216
|
+
value: 'value'
|
|
217
|
+
},
|
|
218
|
+
filterOptions: SEARCH_OPTIONS_V2
|
|
218
219
|
},
|
|
219
220
|
filterFn: function filterFn(value) {
|
|
220
221
|
return function (i) {
|
|
@@ -222,8 +223,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
222
223
|
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.code), value);
|
|
223
224
|
};
|
|
224
225
|
},
|
|
225
|
-
formatFilterValue: [
|
|
226
|
-
if (value.type ===
|
|
226
|
+
formatFilterValue: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? null : function (value) {
|
|
227
|
+
if (value.type === 'in') {
|
|
227
228
|
return value.keywords;
|
|
228
229
|
} else {
|
|
229
230
|
return value;
|
|
@@ -242,7 +243,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
242
243
|
this.isCombinationComponent = false;
|
|
243
244
|
this.canSort = false;
|
|
244
245
|
this.children = [];
|
|
245
|
-
this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 :
|
|
246
|
+
this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 : 'object';
|
|
246
247
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
247
248
|
required: true,
|
|
248
249
|
validator: function validator(_, value) {
|
|
@@ -257,7 +258,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
257
258
|
return Promise.resolve();
|
|
258
259
|
}
|
|
259
260
|
}] : [];
|
|
260
|
-
this.align =
|
|
261
|
-
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) ===
|
|
261
|
+
this.align = 'left';
|
|
262
|
+
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === 'wdt' || this.type === 'BS_E3_WAREHOUSING_STATUS';
|
|
262
263
|
});
|
|
263
264
|
export default CommonMultiStatus;
|
|
@@ -1,17 +1,17 @@
|
|
|
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;
|
|
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[
|
|
14
|
+
dataType: ComponentInterface['dataType'];
|
|
15
15
|
templateId?: string;
|
|
16
16
|
flowTemplateKey?: string;
|
|
17
17
|
workOrderUniqueKey?: string;
|
|
@@ -23,11 +23,20 @@ declare class BasicInput implements ComponentInterface {
|
|
|
23
23
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
24
24
|
editRender: (p: any) => React.JSX.Element;
|
|
25
25
|
filterConfig: (item: ColumnConfig) => {
|
|
26
|
-
searchDefaultConditions:
|
|
26
|
+
searchDefaultConditions: {
|
|
27
|
+
in: "in";
|
|
28
|
+
anylike: "anylike";
|
|
29
|
+
};
|
|
27
30
|
type: string;
|
|
28
31
|
id: string;
|
|
29
32
|
name: string;
|
|
30
33
|
filterComponentType: "SelectInput";
|
|
34
|
+
props: {
|
|
35
|
+
filterOptions: {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
31
40
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
32
41
|
formatFilterValue: (value: any) => any;
|
|
33
42
|
};
|
|
@@ -9,12 +9,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
9
9
|
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; }
|
|
10
10
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
11
11
|
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); }
|
|
12
|
-
import React from
|
|
13
|
-
import { ApaasInput } from
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
|
-
import { isNull, filterFn as _filterFn } from
|
|
17
|
-
import { SYMBOL, batchInput } from "../../constant";
|
|
16
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
|
+
import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
|
|
18
18
|
import { replaceCheck } from "../../service/api";
|
|
19
19
|
var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
20
20
|
var _this = this,
|
|
@@ -36,7 +36,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
36
36
|
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
37
37
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
38
|
var _record;
|
|
39
|
-
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record !== void 0 ? _record :
|
|
39
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record !== void 0 ? _record : '--');
|
|
40
40
|
});
|
|
41
41
|
_defineProperty(this, "renderLog", function (r) {
|
|
42
42
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_input")])) return null;
|
|
@@ -67,7 +67,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
67
67
|
rules: _this.rules,
|
|
68
68
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
69
69
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
70
|
-
validateTrigger: [
|
|
70
|
+
validateTrigger: ['onBlur', 'onChange'],
|
|
71
71
|
required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
|
|
72
72
|
tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : '',
|
|
73
73
|
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
@@ -81,20 +81,26 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
81
81
|
});
|
|
82
82
|
_defineProperty(this, "filterConfig", function (item) {
|
|
83
83
|
return {
|
|
84
|
-
searchDefaultConditions:
|
|
84
|
+
searchDefaultConditions: {
|
|
85
|
+
in: SYMBOL.in,
|
|
86
|
+
anylike: SYMBOL.anylike
|
|
87
|
+
},
|
|
85
88
|
type: item.type,
|
|
86
89
|
id: "".concat(item.id, "_input"),
|
|
87
90
|
// 过滤组件id
|
|
88
91
|
name: item.name,
|
|
89
92
|
// 过滤组件名称
|
|
90
|
-
filterComponentType:
|
|
93
|
+
filterComponentType: 'SelectInput',
|
|
94
|
+
props: {
|
|
95
|
+
filterOptions: SEARCH_OPTIONS
|
|
96
|
+
},
|
|
91
97
|
filterFn: function filterFn(value) {
|
|
92
98
|
return function (i) {
|
|
93
|
-
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
99
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'input')).includes(value);
|
|
94
100
|
};
|
|
95
101
|
},
|
|
96
102
|
formatFilterValue: function formatFilterValue(value) {
|
|
97
|
-
if (value.type
|
|
103
|
+
if (['in', 'anylike'].includes(value.type)) {
|
|
98
104
|
return batchInput(value.keywords);
|
|
99
105
|
} else {
|
|
100
106
|
return value;
|
|
@@ -128,10 +134,10 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
128
134
|
return item.test(value);
|
|
129
135
|
});
|
|
130
136
|
if (testList.length && !isTest) {
|
|
131
|
-
return Promise.reject(new Error(
|
|
137
|
+
return Promise.reject(new Error('请填写正确的格式'));
|
|
132
138
|
}
|
|
133
139
|
if ((_this$componentConfig10 = _this.componentConfig) !== null && _this$componentConfig10 !== void 0 && _this$componentConfig10.isNumber && value > Number.MAX_SAFE_INTEGER) {
|
|
134
|
-
return Promise.reject(new Error(
|
|
140
|
+
return Promise.reject(new Error('输入数值超出最大数字上限,请使用文本框替代当前数字输入框组件'));
|
|
135
141
|
}
|
|
136
142
|
if ((_this$componentConfig11 = _this.componentConfig) !== null && _this$componentConfig11 !== void 0 && (_this$componentConfig12 = _this$componentConfig11.rulesOptions) !== null && _this$componentConfig12 !== void 0 && _this$componentConfig12.length) {
|
|
137
143
|
var _this$componentConfig13;
|
|
@@ -157,7 +163,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
157
163
|
return Promise.resolve();
|
|
158
164
|
}
|
|
159
165
|
}, {
|
|
160
|
-
validateTrigger:
|
|
166
|
+
validateTrigger: 'onBlur',
|
|
161
167
|
validator: function () {
|
|
162
168
|
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
|
|
163
169
|
var _this$componentConfig15;
|
|
@@ -194,11 +200,11 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
194
200
|
break;
|
|
195
201
|
}
|
|
196
202
|
messageMap = {
|
|
197
|
-
currWorkOrder:
|
|
198
|
-
currFlow:
|
|
199
|
-
allWorkOrder:
|
|
203
|
+
currWorkOrder: '数据已存在本模版同节点中,不能重复提交',
|
|
204
|
+
currFlow: '数据已存在本模版中,不能重复提交',
|
|
205
|
+
allWorkOrder: '数据已存在其他模版中,不能重复提交'
|
|
200
206
|
};
|
|
201
|
-
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$componentConfig16 = (_this$componentConfig17 = _this.componentConfig) === null || _this$componentConfig17 === void 0 ? void 0 : (_this$componentConfig18 = _this$componentConfig17.repeatConfig) === null || _this$componentConfig18 === void 0 ? void 0 : _this$componentConfig18.repeatRange) !== null && _this$componentConfig16 !== void 0 ? _this$componentConfig16 :
|
|
207
|
+
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$componentConfig16 = (_this$componentConfig17 = _this.componentConfig) === null || _this$componentConfig17 === void 0 ? void 0 : (_this$componentConfig18 = _this$componentConfig17.repeatConfig) === null || _this$componentConfig18 === void 0 ? void 0 : _this$componentConfig18.repeatRange) !== null && _this$componentConfig16 !== void 0 ? _this$componentConfig16 : ''] || '内容已存在,不能重复提交')));
|
|
202
208
|
case 11:
|
|
203
209
|
case "end":
|
|
204
210
|
return _context.stop();
|
|
@@ -214,6 +220,6 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
214
220
|
this.isCombinationComponent = false;
|
|
215
221
|
this.canSort = true;
|
|
216
222
|
this.children = [];
|
|
217
|
-
this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.isNumber ?
|
|
223
|
+
this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.isNumber ? 'number' : 'string';
|
|
218
224
|
});
|
|
219
225
|
export default BasicInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare type Value = string[] | undefined;
|
|
4
4
|
declare class BasicPicture implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
@@ -7,13 +7,13 @@ declare class BasicPicture implements ComponentInterface {
|
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
16
|
-
currenEnv: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
currenEnv: ComponentInterface["platform"];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
formatPictures: (pictures: string) => string[];
|
|
19
19
|
render: (value: Value) => React.JSX.Element | null;
|
|
@@ -6,13 +6,13 @@ 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 { Image } from
|
|
11
|
-
import { ApaasUploadAsync, ApaasUpload } from
|
|
12
|
-
import { imgResize } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { Image } from "antd";
|
|
11
|
+
import { ApaasUploadAsync, ApaasUpload } from "@kmkf-fe-packages/basic-components";
|
|
12
|
+
import { imgResize } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from
|
|
15
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { hostUrl } from "../../constant";
|
|
17
17
|
var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
18
18
|
var _this = this,
|
|
@@ -31,9 +31,9 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
32
|
_defineProperty(this, "currenEnv", void 0);
|
|
33
33
|
_defineProperty(this, "formatPictures", function (pictures) {
|
|
34
|
-
pictures = pictures.replace(/[\[\]]/g,
|
|
35
|
-
pictures = pictures.replace(/\s/g,
|
|
36
|
-
return pictures ? pictures.split(
|
|
34
|
+
pictures = pictures.replace(/[\[\]]/g, "");
|
|
35
|
+
pictures = pictures.replace(/\s/g, "");
|
|
36
|
+
return pictures ? pictures.split(",") : [];
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(this, "render", function (value) {
|
|
39
39
|
var _document;
|
|
@@ -41,20 +41,20 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
|
|
44
|
-
preview: _this.currenEnv ===
|
|
45
|
-
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById(
|
|
44
|
+
preview: _this.currenEnv === "ks" ? {
|
|
45
|
+
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById("root")
|
|
46
46
|
} : true
|
|
47
47
|
}, value === null || value === void 0 ? void 0 : value.map(function (pic) {
|
|
48
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
style: {
|
|
50
|
-
marginRight:
|
|
51
|
-
display:
|
|
50
|
+
marginRight: "5px",
|
|
51
|
+
display: "inline-block"
|
|
52
52
|
}
|
|
53
53
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
54
54
|
width: 32,
|
|
55
|
-
src: imgResize(pic ||
|
|
55
|
+
src: imgResize(pic || ""),
|
|
56
56
|
preview: {
|
|
57
|
-
src: imgResize(pic ||
|
|
57
|
+
src: imgResize(pic || "", 0, 0)
|
|
58
58
|
}
|
|
59
59
|
}));
|
|
60
60
|
})));
|
|
@@ -64,13 +64,13 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
64
64
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
65
65
|
}
|
|
66
66
|
var finalPictures = _this.formatPictures(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_picture")]).map(function (item) {
|
|
67
|
-
return "".concat(hostUrl, "/").concat(item);
|
|
67
|
+
return item.startsWith("http") ? item : "".concat(hostUrl, "/").concat(item);
|
|
68
68
|
});
|
|
69
69
|
return /*#__PURE__*/React.createElement(Image.PreviewGroup, null, finalPictures === null || finalPictures === void 0 ? void 0 : finalPictures.map(function (pic) {
|
|
70
70
|
return /*#__PURE__*/React.createElement("div", {
|
|
71
71
|
style: {
|
|
72
|
-
marginRight:
|
|
73
|
-
display:
|
|
72
|
+
marginRight: "5px",
|
|
73
|
+
display: "inline-block"
|
|
74
74
|
},
|
|
75
75
|
onClick: function onClick(e) {
|
|
76
76
|
return e.stopPropagation();
|
|
@@ -107,7 +107,7 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
107
107
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
108
108
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
109
109
|
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,
|
|
110
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
110
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
111
111
|
component: (_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.isSingleShop ? /*#__PURE__*/React.createElement(ApaasUpload, _this.componentConfig) : /*#__PURE__*/React.createElement(ApaasUploadAsync, _extends({}, _this.componentConfig, {
|
|
112
112
|
uniqueKey: _this.id,
|
|
113
113
|
hostUrl: hostUrl,
|
|
@@ -131,7 +131,7 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
131
131
|
this.isCombinationComponent = false;
|
|
132
132
|
this.canSort = true;
|
|
133
133
|
this.children = [];
|
|
134
|
-
this.dataType =
|
|
134
|
+
this.dataType = "string";
|
|
135
135
|
this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
|
|
136
136
|
});
|
|
137
137
|
export default BasicPicture;
|
|
@@ -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 PictureUrl 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
|
constructor(options: PickOption);
|
|
17
17
|
getParentId: () => string;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -11,10 +11,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import { Image } from
|
|
15
|
-
import React from
|
|
14
|
+
import { Image } from "antd";
|
|
15
|
+
import React from "react";
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull } from
|
|
17
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { hostUrl } from "../../constant";
|
|
19
19
|
var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
20
20
|
var _this = this;
|
|
@@ -32,7 +32,7 @@ var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
|
32
32
|
_defineProperty(this, "children", void 0);
|
|
33
33
|
_defineProperty(this, "dataType", void 0);
|
|
34
34
|
_defineProperty(this, "getParentId", function () {
|
|
35
|
-
var _this$id$split = _this.id.split(
|
|
35
|
+
var _this$id$split = _this.id.split("_"),
|
|
36
36
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
37
37
|
key = _this$id$split2[0],
|
|
38
38
|
name = _this$id$split2[1],
|
|
@@ -73,7 +73,7 @@ var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
|
73
73
|
});
|
|
74
74
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
75
75
|
var _this$getComponentVal;
|
|
76
|
-
return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
76
|
+
return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "";
|
|
77
77
|
});
|
|
78
78
|
_defineProperty(this, "filterConfig", function () {
|
|
79
79
|
return [];
|
|
@@ -84,11 +84,11 @@ var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
|
84
84
|
this.formField = options.id;
|
|
85
85
|
this.type = options.type;
|
|
86
86
|
this.componentConfig = options.componentConfig;
|
|
87
|
-
this.align =
|
|
87
|
+
this.align = "left";
|
|
88
88
|
this.width = 100;
|
|
89
89
|
this.isCombinationComponent = false;
|
|
90
90
|
this.canSort = false;
|
|
91
|
-
this.dataType =
|
|
91
|
+
this.dataType = "string";
|
|
92
92
|
this.children = [];
|
|
93
93
|
});
|
|
94
94
|
export default PictureUrl;
|
|
@@ -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 ReceiverName implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -12,7 +12,7 @@ declare class ReceiverName implements ComponentInterface {
|
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|