@kmkf-fe-packages/services-components 0.8.7-alpha.9 → 0.8.9-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/ShopList/index.js +7 -1
- package/dist/esm/components/JST/JstLogistics/index.js +4 -4
- package/dist/esm/components/JST/JstSendGood/index.js +8 -8
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +3 -3
- package/dist/esm/commonComponents/ShopName/index.d.ts +0 -9
- package/dist/esm/commonComponents/ShopName/index.js +0 -36
|
@@ -5,6 +5,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Select } from 'antd';
|
|
7
7
|
import PlatformAvatar from "../PlatformAvatar";
|
|
8
|
+
import { PlatData } from '@kmkf-fe-packages/kmkf-utils';
|
|
8
9
|
var ShopList = function ShopList(_ref) {
|
|
9
10
|
var _shopList$filter;
|
|
10
11
|
var shopList = _ref.shopList,
|
|
@@ -17,11 +18,16 @@ var ShopList = function ShopList(_ref) {
|
|
|
17
18
|
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
18
19
|
setShopId === null || setShopId === void 0 ? void 0 : setShopId(val);
|
|
19
20
|
};
|
|
21
|
+
var platDatInstance = PlatData.getInstance();
|
|
20
22
|
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
21
23
|
onChange: handleChange
|
|
22
24
|
}, prop), shopList === null || shopList === void 0 ? void 0 : (_shopList$filter = shopList.filter(function (item) {
|
|
23
25
|
return (item === null || item === void 0 ? void 0 : item.auditStatus) === 1;
|
|
24
26
|
})) === null || _shopList$filter === void 0 ? void 0 : _shopList$filter.map(function (item) {
|
|
27
|
+
var _platDatInstance$getP;
|
|
28
|
+
var plat = (_platDatInstance$getP = platDatInstance.getPlatData()) === null || _platDatInstance$getP === void 0 ? void 0 : _platDatInstance$getP.find(function (plat) {
|
|
29
|
+
return plat.platformType === item.shopSource;
|
|
30
|
+
});
|
|
25
31
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
26
32
|
value: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
27
33
|
label: item.shopName
|
|
@@ -30,7 +36,7 @@ var ShopList = function ShopList(_ref) {
|
|
|
30
36
|
marginRight: 5
|
|
31
37
|
},
|
|
32
38
|
type: item.shopSource
|
|
33
|
-
}), /*#__PURE__*/React.createElement("span", null, item.shopName));
|
|
39
|
+
}), /*#__PURE__*/React.createElement("span", null, (plat === null || plat === void 0 ? void 0 : plat.platformName) && "\u3010".concat(plat === null || plat === void 0 ? void 0 : plat.platformName, "\u3011"), item.shopName));
|
|
34
40
|
}));
|
|
35
41
|
};
|
|
36
42
|
export default ShopList;
|
|
@@ -109,12 +109,12 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
_defineProperty(this, "filterConfig", function (item) {
|
|
112
|
-
var _typeMap$_this$type5, _typeMap$_this$type6
|
|
112
|
+
var _typeMap$_this$type5, _typeMap$_this$type6;
|
|
113
113
|
return [{
|
|
114
114
|
searchDefaultConditions: SYMBOL.in,
|
|
115
115
|
type: item.type,
|
|
116
116
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.company),
|
|
117
|
-
name: "".concat(
|
|
117
|
+
name: "".concat(_this.name, "\u7269\u6D41\u516C\u53F8"),
|
|
118
118
|
filterComponentType: 'MultipleSelect',
|
|
119
119
|
props: {
|
|
120
120
|
options: _this.expressDateInstance.getExpressData() || []
|
|
@@ -132,8 +132,8 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
|
132
132
|
}, {
|
|
133
133
|
searchDefaultConditions: SYMBOL.like,
|
|
134
134
|
type: item.type,
|
|
135
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
136
|
-
name: "".concat(
|
|
135
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.code),
|
|
136
|
+
name: "".concat(_this.name, "\u7269\u6D41\u5355\u53F7"),
|
|
137
137
|
filterComponentType: 'Input',
|
|
138
138
|
filterFn: function filterFn(value) {
|
|
139
139
|
return function (i) {
|
|
@@ -105,17 +105,17 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
105
105
|
});
|
|
106
106
|
});
|
|
107
107
|
_defineProperty(this, "filterConfig", function (item) {
|
|
108
|
-
var _typeMap$_this$type5, _typeMap$_this$
|
|
108
|
+
var _typeMap$_this$type5, _typeMap$_this$type7;
|
|
109
109
|
return [{
|
|
110
110
|
searchDefaultConditions: SYMBOL.like,
|
|
111
111
|
type: item.type,
|
|
112
112
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.sendName),
|
|
113
|
-
name: "".concat(
|
|
113
|
+
name: "".concat(_this.name, "\u540D\u79F0"),
|
|
114
114
|
filterComponentType: "Input",
|
|
115
115
|
filterFn: function filterFn(value) {
|
|
116
116
|
return function (i) {
|
|
117
|
-
var _ref, _typeMap$_this$
|
|
118
|
-
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
117
|
+
var _ref, _typeMap$_this$type6;
|
|
118
|
+
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key) || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
|
|
119
119
|
var _String;
|
|
120
120
|
var name = item !== null && item !== void 0 && item.sendName ? (_String = String(item === null || item === void 0 ? void 0 : item.sendName)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
121
121
|
return name;
|
|
@@ -125,13 +125,13 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
|
125
125
|
}, {
|
|
126
126
|
searchDefaultConditions: SYMBOL.like,
|
|
127
127
|
type: item.type,
|
|
128
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
129
|
-
name: "".concat(
|
|
128
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.sendId),
|
|
129
|
+
name: "".concat(_this.name, "\u7F16\u7801"),
|
|
130
130
|
filterComponentType: "Input",
|
|
131
131
|
filterFn: function filterFn(value) {
|
|
132
132
|
return function (i) {
|
|
133
|
-
var _ref2, _typeMap$_this$
|
|
134
|
-
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
133
|
+
var _ref2, _typeMap$_this$type8;
|
|
134
|
+
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
|
|
135
135
|
var _String2;
|
|
136
136
|
var id = item !== null && item !== void 0 && item.sendId ? (_String2 = String(item === null || item === void 0 ? void 0 : item.sendId)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
|
|
137
137
|
return id;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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 } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => JstLogistics | JstSendGood | 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 | JstItemSelect | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.9-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.8.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.9-alpha.0",
|
|
30
30
|
"@kmkf-fe-packages/kmkf-utils": "^0.8.7-alpha.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "97f6ab166f536ac9098b1883732a91c848165a04"
|
|
44
44
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type ShopNameProps = {
|
|
3
|
-
hidden: boolean;
|
|
4
|
-
shopList: any[];
|
|
5
|
-
handleChangeShopId: (val: string) => void;
|
|
6
|
-
disabled: boolean | undefined;
|
|
7
|
-
};
|
|
8
|
-
declare const ShopName: ({ shopList, disabled, handleChangeShopId, hidden }: ShopNameProps) => React.JSX.Element;
|
|
9
|
-
export default ShopName;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Form } from 'antd';
|
|
3
|
-
import ShopList from "../ShopList";
|
|
4
|
-
var ShopName = function ShopName(_ref) {
|
|
5
|
-
var shopList = _ref.shopList,
|
|
6
|
-
disabled = _ref.disabled,
|
|
7
|
-
handleChangeShopId = _ref.handleChangeShopId,
|
|
8
|
-
hidden = _ref.hidden;
|
|
9
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
-
className: "form-item--wrap",
|
|
11
|
-
style: {
|
|
12
|
-
position: 'relative'
|
|
13
|
-
},
|
|
14
|
-
key: 'shopId'
|
|
15
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
16
|
-
name: "shopId",
|
|
17
|
-
label: "\u5E97\u94FA\u540D\u79F0",
|
|
18
|
-
className: "form-item-label--index",
|
|
19
|
-
hidden: hidden,
|
|
20
|
-
rules: [{
|
|
21
|
-
required: true,
|
|
22
|
-
message: '请选择店铺名称'
|
|
23
|
-
}]
|
|
24
|
-
}, /*#__PURE__*/React.createElement(ShopList, {
|
|
25
|
-
shopList: shopList,
|
|
26
|
-
disabled: disabled,
|
|
27
|
-
setShopId: handleChangeShopId,
|
|
28
|
-
placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
|
|
29
|
-
showSearch: true,
|
|
30
|
-
optionFilterProp: "label",
|
|
31
|
-
style: {
|
|
32
|
-
width: '220px'
|
|
33
|
-
}
|
|
34
|
-
})));
|
|
35
|
-
};
|
|
36
|
-
export default ShopName;
|