@kmkf-fe-packages/services-components 0.5.2-alpha.7 → 0.5.2-alpha.9

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.
@@ -22,6 +22,7 @@ declare class Express implements ComponentInterface {
22
22
  id: string;
23
23
  name: string;
24
24
  filterComponentType: "MultipleSelect";
25
+ options: any[];
25
26
  filterFn: (value: string) => (i: Record) => boolean;
26
27
  };
27
28
  }
@@ -61,6 +61,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
61
61
  id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
62
62
  name: "".concat(item.name, "-\u7269\u6D41\u516C\u53F8"),
63
63
  filterComponentType: 'MultipleSelect',
64
+ options: _this.expressDateInstance.getExpressData() || [],
64
65
  filterFn: function filterFn(value) {
65
66
  return function (i) {
66
67
  return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)));
@@ -27,10 +27,7 @@ declare class JstLogistics implements ComponentInterface {
27
27
  id: string;
28
28
  name: string;
29
29
  filterComponentType: "MultipleSelect";
30
- options: {
31
- label: string | number;
32
- value: string | number;
33
- }[] | undefined;
30
+ options: any[];
34
31
  filterFn: (value: string) => (i: Record) => any;
35
32
  })[];
36
33
  }
@@ -68,7 +68,6 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
68
68
  });
69
69
  });
70
70
  _defineProperty(this, "filterConfig", function (item) {
71
- var _this$expressDateInst;
72
71
  return [{
73
72
  id: "".concat(item.id, "_logisticsCode"),
74
73
  name: "jst\u7269\u6D41\u5355\u53F7",
@@ -82,12 +81,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
82
81
  id: "".concat(item.id, "_logisticsCompany"),
83
82
  name: "jst\u7269\u6D41\u516C\u53F8",
84
83
  filterComponentType: 'MultipleSelect',
85
- options: (_this$expressDateInst = _this.expressDateInstance.getExpressData()) === null || _this$expressDateInst === void 0 ? void 0 : _this$expressDateInst.map(function (item) {
86
- return {
87
- label: item.label,
88
- value: item.value
89
- };
90
- }),
84
+ options: _this.expressDateInstance.getExpressData() || [],
91
85
  filterFn: function filterFn(value) {
92
86
  return function (i) {
93
87
  var _ref;
@@ -0,0 +1,3 @@
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, 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 } from './index';
2
+ import { PickOption } from './type';
3
+ export declare const factory: (type: string, options: PickOption) => LogisticsInterception | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | 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 | FlowStatusSelect | TemplateSelect | WorkOrderId | PlatForm | ShopInput | Submitter | Handler | CompletedUser;
@@ -0,0 +1,105 @@
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, 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 } from "./index";
2
+ export var factory = function factory(type, options) {
3
+ var _options$componentCon;
4
+ switch (type) {
5
+ case 'PLATFORM_INPUT':
6
+ return new PlatForm();
7
+ case 'SHOP_INPUT':
8
+ return new ShopInput(options);
9
+ case 'OPERATOR_INPUT':
10
+ return new Submitter(options);
11
+ case 'HANDLER_INPUT':
12
+ return new Handler(options);
13
+ case 'COMPLETED_USER_INPUT':
14
+ return new CompletedUser(options);
15
+ case 'INPUT':
16
+ return new BasicInput(options);
17
+ case 'RADIO':
18
+ return new BasicRadio(options);
19
+ case 'TEXTAREA':
20
+ return new BasicTextArea(options);
21
+ case 'CHECKBOX':
22
+ return new BasicCheckbox(options);
23
+ case 'DATETIME':
24
+ return new BasicDataTime(options);
25
+ case 'SELECT':
26
+ return new BasicSelect(options);
27
+ case 'PICTURE':
28
+ return new BasicPicture(options);
29
+ case 'BASIC_MULT_SELECT':
30
+ return new BasicMultSelect(options);
31
+ case 'MULT_SELECT':
32
+ return new BasicCascader(options);
33
+ case 'BASIC_ADDRESS':
34
+ return new BasicAddress(options);
35
+ case 'BASIC_GRADE':
36
+ return new BasicGrade(options);
37
+ case 'RATE':
38
+ return new BasicRate(options);
39
+ case 'SHOP_NAME_INPUT':
40
+ return new ShopName(options);
41
+ case 'TRADE_ID_INPUT':
42
+ return options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.erpFlag ? new ErpTradeId(options) : new TradeId(options);
43
+ case 'BUYER_NICK_INPUT':
44
+ return new BuyerNick(options);
45
+ case 'RECEIVER_NAME_INPUT':
46
+ return new ReceiverName(options);
47
+ case 'RECEIVER_MOBILE_INPUT':
48
+ return new ReceiverMobile(options);
49
+ case 'RECEIVER_ADDRESS_INPUT':
50
+ return new ReceiverAddress(options);
51
+ case 'TRADE_CREATE_DATETIME':
52
+ case 'TRADE_PAYMENT_DATETIME':
53
+ case 'TRADE_DELIVERY_DATETIME':
54
+ case 'TRADE_CLOSING_DATETIME':
55
+ return new TradeDateTime(options);
56
+ case 'EXPRESS_LOGISTICS_SELECT':
57
+ return new Logistics(options);
58
+ case 'RETURN_LOGISTICS_SELECT':
59
+ return new ReturnLogistics(options);
60
+ case 'ACTUAL_PAYMENT':
61
+ return new ActualPayment(options);
62
+ case 'REMARK_INPUT':
63
+ return new ERemark(options);
64
+ case 'ITEM_SELECT':
65
+ return new ItemSelect(options);
66
+ case 'ITEM_ID':
67
+ return new ItemId(options);
68
+ case 'ITEM_ENCODE':
69
+ return new ItemEnCode(options);
70
+ case 'ALI_PAY_INPUT':
71
+ return new AliPay(options);
72
+ case 'ORDINARY_INVOICE':
73
+ return new Ordinary(options);
74
+ case 'ITEM_SELECT_THIRD':
75
+ return new ThirdItemSelect(options);
76
+ case 'ENTERPRISE_PAYMENT':
77
+ return new Payment(options);
78
+ case 'SYSTEM_ORDER_NO':
79
+ return new SystemOrderNo(options);
80
+ case 'LOGISTICS_INTERCEPTION':
81
+ return new LogisticsInterception(options);
82
+ case 'WORK_ORDER_ID_INPUT':
83
+ return new WorkOrderId(options);
84
+ case 'FLOW_STATUS_SELECT':
85
+ return new FlowStatusSelect(options);
86
+ case 'COMPLETED_DATETIME':
87
+ return new CommonDataTime(options);
88
+ case 'CREATED_DATETIME':
89
+ return new CommonDataTime(options);
90
+ case 'UPDATE_DATETIME':
91
+ return new CommonDataTime(options);
92
+ case 'TEMPLATE_ID_INPUT':
93
+ return new TemplateSelect(options);
94
+ case 'JST_LOGISTICS':
95
+ return new JstLogistics(options);
96
+ case 'JST_ITEM_SELECT_THIRD':
97
+ return new JstItemSelect(options);
98
+ case 'JST_SUPPLY':
99
+ return new JstSupply(options);
100
+ case 'JST_SEND_GOOD':
101
+ return new JstSendGood(options);
102
+ default:
103
+ return new BasicInput(options);
104
+ }
105
+ };
@@ -44,3 +44,4 @@ export { default as ShopInput } from './components/ShopInput';
44
44
  export { default as Submitter } from './components/Submitter';
45
45
  export { default as Handler } from './components/Handler';
46
46
  export { default as CompletedUser } from './components/CompletedUser';
47
+ export { factory } from './factory';
package/dist/esm/index.js CHANGED
@@ -43,4 +43,5 @@ export { default as PlatForm } from "./components/PlatForm";
43
43
  export { default as ShopInput } from "./components/ShopInput";
44
44
  export { default as Submitter } from "./components/Submitter";
45
45
  export { default as Handler } from "./components/Handler";
46
- export { default as CompletedUser } from "./components/CompletedUser";
46
+ export { default as CompletedUser } from "./components/CompletedUser";
47
+ export { factory } from "./factory";
@@ -104,6 +104,10 @@ export interface ComponentInterface {
104
104
  * @description 针对JD单店铺,需要使用企业工单的上传能力,这里增加了一个配置
105
105
  */
106
106
  isSingleShop?: boolean;
107
+ /**
108
+ * @description 针对ERP的订单组件需要特殊展示,此处增加一个特殊标识
109
+ */
110
+ erpFlag?: boolean;
107
111
  };
108
112
  effects?: {
109
113
  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.5.2-alpha.7",
3
+ "version": "0.5.2-alpha.9",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@kmkf-fe-packages/basic-components": "^0.5.2-alpha.0",
25
- "@kmkf-fe-packages/kmkf-utils": "^0.5.2-alpha.5"
25
+ "@kmkf-fe-packages/kmkf-utils": "^0.5.2-alpha.9"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@ant-design/icons": "^4.7.0",
@@ -35,5 +35,5 @@
35
35
  "gitHooks": {
36
36
  "pre-commit": "lint-staged"
37
37
  },
38
- "gitHead": "b744d4a75a02e842de968d4aff71cdec71908147"
38
+ "gitHead": "27221612cca3dd96e0319633a28175279fb7ae5c"
39
39
  }