@kmkf-fe-packages/services-components 2.10.9-beta.80 → 2.10.9-beta.83
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.
|
@@ -11,6 +11,7 @@ declare class StatusSelect implements ComponentInterface {
|
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
+
sortChildField?: ComponentInterface["sortChildField"];
|
|
14
15
|
dataType: ComponentInterface["dataType"];
|
|
15
16
|
options: ComponentInterface["options"];
|
|
16
17
|
constructor(options: PickOption);
|
|
@@ -34,6 +35,31 @@ declare class StatusSelect implements ComponentInterface {
|
|
|
34
35
|
}[];
|
|
35
36
|
};
|
|
36
37
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
37
|
-
}
|
|
38
|
+
} | ({
|
|
39
|
+
searchDefaultConditions: "in";
|
|
40
|
+
type: string;
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
filterComponentType: "MultipleSelect";
|
|
44
|
+
props: {
|
|
45
|
+
options: {
|
|
46
|
+
value: string;
|
|
47
|
+
label: string;
|
|
48
|
+
color: string;
|
|
49
|
+
}[];
|
|
50
|
+
};
|
|
51
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
52
|
+
} | {
|
|
53
|
+
searchDefaultConditions: "anylike";
|
|
54
|
+
type: string;
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
filterComponentType: "Input";
|
|
58
|
+
props: {
|
|
59
|
+
placeholder: string;
|
|
60
|
+
};
|
|
61
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
62
|
+
formatFilterValue: (val: string) => string | string[];
|
|
63
|
+
})[];
|
|
38
64
|
}
|
|
39
65
|
export default StatusSelect;
|
|
@@ -13,8 +13,9 @@ import { CommonStatus } from "@kmkf-fe-packages/basic-components";
|
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
15
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
-
import { SYMBOL } from "../../constant";
|
|
16
|
+
import { SYMBOL, batchInput } from "../../constant";
|
|
17
17
|
import { getSelectTypeAttribute } from "./constants";
|
|
18
|
+
var STATUS_REASON_TYPES = ["AGREE_REFUND_STATUS", "REJECT_REFUND_STATUS", "AGREE_RETURN_GOODS_STATUS", "REJECT_RETURN_GOODS_STATUS"];
|
|
18
19
|
var selectTypeMap = {
|
|
19
20
|
REISSUE_STATUS: getSelectTypeAttribute({
|
|
20
21
|
key: "reissueStatusValue",
|
|
@@ -88,6 +89,7 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
88
89
|
_defineProperty(this, "formField", void 0);
|
|
89
90
|
_defineProperty(this, "canSort", void 0);
|
|
90
91
|
_defineProperty(this, "children", void 0);
|
|
92
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
91
93
|
_defineProperty(this, "dataType", void 0);
|
|
92
94
|
_defineProperty(this, "options", void 0);
|
|
93
95
|
_defineProperty(this, "editRender", function (p) {
|
|
@@ -152,23 +154,48 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
152
154
|
return record !== null && record !== void 0 && record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)] ? "".concat(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]).concat((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].info)]) || "") : "--";
|
|
153
155
|
});
|
|
154
156
|
_defineProperty(this, "filterConfig", function (item) {
|
|
155
|
-
|
|
157
|
+
var statusKey = selectTypeMap[_this.type].key;
|
|
158
|
+
var reasonKey = selectTypeMap[_this.type].info;
|
|
159
|
+
var statusFilter = {
|
|
156
160
|
searchDefaultConditions: SYMBOL.in,
|
|
157
161
|
type: item.type,
|
|
158
|
-
id: "".concat(item.id, "_").concat(
|
|
162
|
+
id: "".concat(item.id, "_").concat(statusKey),
|
|
159
163
|
// 过滤组件id
|
|
160
164
|
name: item.name,
|
|
161
|
-
// 过滤组件名称
|
|
162
165
|
filterComponentType: "MultipleSelect",
|
|
163
166
|
props: {
|
|
164
167
|
options: selectTypeMap[_this.type].options
|
|
165
168
|
},
|
|
166
169
|
filterFn: function filterFn(value) {
|
|
167
170
|
return function (i) {
|
|
168
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
171
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, statusKey));
|
|
169
172
|
};
|
|
170
173
|
} // 第一个为选中值,第二个参数为表格行记录值
|
|
171
174
|
};
|
|
175
|
+
|
|
176
|
+
if (!STATUS_REASON_TYPES.includes(_this.type)) {
|
|
177
|
+
return statusFilter;
|
|
178
|
+
}
|
|
179
|
+
return [statusFilter, {
|
|
180
|
+
searchDefaultConditions: SYMBOL.anylike,
|
|
181
|
+
type: item.type,
|
|
182
|
+
id: "".concat(item.id, "_").concat(reasonKey),
|
|
183
|
+
name: "".concat(item.name, "\u539F\u56E0"),
|
|
184
|
+
filterComponentType: "Input",
|
|
185
|
+
props: {
|
|
186
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(item.name, "\u5931\u8D25\u539F\u56E0\u5173\u952E\u5B57")
|
|
187
|
+
},
|
|
188
|
+
filterFn: function filterFn(value) {
|
|
189
|
+
return function (i) {
|
|
190
|
+
var keywords = batchInput(value);
|
|
191
|
+
var reason = "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, reasonKey) || "");
|
|
192
|
+
return Array.isArray(keywords) && keywords.some(function (keyword) {
|
|
193
|
+
return reason.includes(keyword);
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
formatFilterValue: batchInput
|
|
198
|
+
}];
|
|
172
199
|
});
|
|
173
200
|
this.name = options.name;
|
|
174
201
|
this.id = options.id;
|
|
@@ -191,5 +218,17 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
|
191
218
|
this.children = [];
|
|
192
219
|
this.dataType = "string";
|
|
193
220
|
this.options = selectTypeMap[options.type].options;
|
|
221
|
+
this.sortChildField = STATUS_REASON_TYPES.includes(options.type) ? [{
|
|
222
|
+
name: options.name,
|
|
223
|
+
key: this.formField,
|
|
224
|
+
dataType: this.dataType,
|
|
225
|
+
options: this.options,
|
|
226
|
+
conditionOnly: true
|
|
227
|
+
}, {
|
|
228
|
+
name: "".concat(options.name, "\u539F\u56E0"),
|
|
229
|
+
key: "".concat(options.id, "_").concat(selectTypeMap[options.type].info),
|
|
230
|
+
dataType: "like",
|
|
231
|
+
conditionOnly: true
|
|
232
|
+
}] : undefined;
|
|
194
233
|
});
|
|
195
234
|
export default StatusSelect;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, DxdShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect, ReturnWarehouse, KmExchange } 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) => BasicMultSelect | BasicSelect | StatusSelect | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | DxdShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
|
package/dist/esm/type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.10.9-beta.
|
|
3
|
+
"version": "2.10.9-beta.83",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.10.9-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.10.9-beta.83",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.83",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "084f2c880435b78d8eb0d800803bd8f82206dffe",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|