@kmkf-fe-packages/services-components 0.26.1-beta.8 → 0.26.1
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/GlobalContext/index.d.ts +7 -0
- package/dist/esm/commonComponents/GlobalContext/index.js +104 -0
- package/dist/esm/components/BuyerNick/index.d.ts +3 -3
- package/dist/esm/components/BuyerNick/index.js +19 -9
- package/dist/esm/components/Common/index.d.ts +0 -1
- package/dist/esm/components/Common/index.js +3 -74
- package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +2 -2
- package/dist/esm/components/LogisticsInterception/InterceptStatus.js +1 -1
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +2 -2
- package/dist/esm/components/MultSelect/index.d.ts +4 -4
- package/dist/esm/components/MultSelect/index.js +13 -13
- package/dist/esm/components/Payment/PaymentStatus.d.ts +4 -4
- package/dist/esm/components/Payment/PaymentStatus.js +30 -30
- package/dist/esm/constant.js +13 -12
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +8 -15
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.js +2 -4
- package/dist/esm/service/api.d.ts +7 -1
- package/dist/esm/service/api.js +238 -5
- package/dist/esm/service/request.js +9 -1
- package/package.json +4 -4
- package/dist/esm/components/CommonInput/index.d.ts +0 -44
- package/dist/esm/components/CommonInput/index.js +0 -146
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.d.ts +0 -31
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +0 -88
- package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.d.ts +0 -46
- package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.js +0 -111
- package/dist/esm/components/LogisticsMoreInterception/InterceptType.d.ts +0 -44
- package/dist/esm/components/LogisticsMoreInterception/InterceptType.js +0 -96
- package/dist/esm/components/LogisticsMoreInterception/columnHeader.d.ts +0 -5
- package/dist/esm/components/LogisticsMoreInterception/columnHeader.js +0 -55
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +0 -69
- package/dist/esm/components/LogisticsMoreInterception/index.js +0 -184
- package/dist/esm/components/LogisticsMoreInterception/interceptCompany.d.ts +0 -39
- package/dist/esm/components/LogisticsMoreInterception/interceptCompany.js +0 -88
- package/dist/esm/components/LogisticsMoreInterception/interceptItem.d.ts +0 -34
- package/dist/esm/components/LogisticsMoreInterception/interceptItem.js +0 -81
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +0 -35
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +0 -82
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.d.ts +0 -34
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +0 -81
- package/dist/esm/components/PaymentVoucherCode/index.d.ts +0 -33
- package/dist/esm/components/PaymentVoucherCode/index.js +0 -104
|
@@ -5,9 +5,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
5
|
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; }
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
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); }
|
|
8
|
-
import React from
|
|
8
|
+
import React from 'react';
|
|
9
9
|
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
-
import { isNull, filterFn as _filterFn } from
|
|
10
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
11
|
import { SYMBOL } from "../../constant";
|
|
12
12
|
var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
13
13
|
var _this = this;
|
|
@@ -37,7 +37,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
39
39
|
var _record$_this$id;
|
|
40
|
-
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id :
|
|
40
|
+
return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : '--';
|
|
41
41
|
});
|
|
42
42
|
_defineProperty(this, "renderLog", function (r) {
|
|
43
43
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
@@ -47,7 +47,7 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
47
47
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
48
48
|
});
|
|
49
49
|
_defineProperty(this, "renderExport", function (value) {
|
|
50
|
-
return value !== null && value !== void 0 ? value :
|
|
50
|
+
return value !== null && value !== void 0 ? value : '--';
|
|
51
51
|
});
|
|
52
52
|
_defineProperty(this, "editRender", function () {
|
|
53
53
|
return null;
|
|
@@ -58,57 +58,57 @@ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
|
|
|
58
58
|
type: item.type,
|
|
59
59
|
id: "".concat(item.id, "_enterprisePaymentStatus"),
|
|
60
60
|
name: "".concat(item.name, "-\u6253\u6B3E\u72B6\u6001"),
|
|
61
|
-
filterComponentType:
|
|
61
|
+
filterComponentType: 'MultipleSelect',
|
|
62
62
|
props: {
|
|
63
63
|
options: _this.paymentStatusOptions
|
|
64
64
|
},
|
|
65
65
|
filterFn: function filterFn(value) {
|
|
66
66
|
return function (i) {
|
|
67
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
67
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'enterprisePaymentStatus'));
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
});
|
|
72
|
-
this.name =
|
|
72
|
+
this.name = '打款状态';
|
|
73
73
|
this.id = "".concat(options.id, "_enterprisePaymentStatus");
|
|
74
74
|
this.sortField = "".concat(options.id, "_enterprisePaymentStatus");
|
|
75
75
|
this.formField = "".concat(options.id, "_enterprisePaymentStatus");
|
|
76
76
|
this.type = options.type;
|
|
77
77
|
this.componentConfig = options.componentConfig;
|
|
78
78
|
this.rules = [];
|
|
79
|
-
this.align =
|
|
79
|
+
this.align = 'left';
|
|
80
80
|
this.width = 200;
|
|
81
|
-
this.dataType =
|
|
81
|
+
this.dataType = 'string';
|
|
82
82
|
this.paymentStatus = {
|
|
83
|
-
WAITING_EXAMINE:
|
|
84
|
-
EXAMINED:
|
|
85
|
-
FLAG_PAID:
|
|
86
|
-
ALI_PAY_WAITING:
|
|
87
|
-
ALI_PAY_SUCCESS:
|
|
88
|
-
ALI_PAY_FAIL:
|
|
89
|
-
ALI_PAY_CLOSE:
|
|
83
|
+
WAITING_EXAMINE: '未打款',
|
|
84
|
+
EXAMINED: '审核通过',
|
|
85
|
+
FLAG_PAID: '标记已打款',
|
|
86
|
+
ALI_PAY_WAITING: '支付宝待付款',
|
|
87
|
+
ALI_PAY_SUCCESS: '支付宝打款成功',
|
|
88
|
+
ALI_PAY_FAIL: '支付宝打款失败',
|
|
89
|
+
ALI_PAY_CLOSE: '支付宝打款关闭'
|
|
90
90
|
};
|
|
91
91
|
this.paymentStatusOptions = [{
|
|
92
|
-
label:
|
|
93
|
-
value:
|
|
92
|
+
label: '未打款',
|
|
93
|
+
value: '未打款'
|
|
94
94
|
}, {
|
|
95
|
-
label:
|
|
96
|
-
value:
|
|
95
|
+
label: '审核通过',
|
|
96
|
+
value: '审核通过'
|
|
97
97
|
}, {
|
|
98
|
-
label:
|
|
99
|
-
value:
|
|
98
|
+
label: '标记已打款',
|
|
99
|
+
value: '标记已打款'
|
|
100
100
|
}, {
|
|
101
|
-
label:
|
|
102
|
-
value:
|
|
101
|
+
label: '支付宝待付款',
|
|
102
|
+
value: '支付宝待付款'
|
|
103
103
|
}, {
|
|
104
|
-
label:
|
|
105
|
-
value:
|
|
104
|
+
label: '支付宝打款成功',
|
|
105
|
+
value: '支付宝打款成功'
|
|
106
106
|
}, {
|
|
107
|
-
label:
|
|
108
|
-
value:
|
|
107
|
+
label: '支付宝打款失败',
|
|
108
|
+
value: '支付宝打款失败'
|
|
109
109
|
}, {
|
|
110
|
-
label:
|
|
111
|
-
value:
|
|
110
|
+
label: '支付宝打款关闭',
|
|
111
|
+
value: '支付宝打款关闭'
|
|
112
112
|
}];
|
|
113
113
|
this.options = this.paymentStatusOptions;
|
|
114
114
|
this.isCombinationComponent = false;
|
package/dist/esm/constant.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
export var SYMBOL = {
|
|
2
|
-
between:
|
|
3
|
-
eq:
|
|
4
|
-
like:
|
|
5
|
-
gt:
|
|
6
|
-
gte:
|
|
7
|
-
lt:
|
|
8
|
-
lte:
|
|
9
|
-
ne:
|
|
10
|
-
in:
|
|
11
|
-
nin:
|
|
12
|
-
non:
|
|
13
|
-
notnull:
|
|
2
|
+
between: 'between',
|
|
3
|
+
eq: 'eq',
|
|
4
|
+
like: 'like',
|
|
5
|
+
gt: 'gt',
|
|
6
|
+
gte: 'gte',
|
|
7
|
+
lt: 'lt',
|
|
8
|
+
lte: 'lte',
|
|
9
|
+
ne: 'ne',
|
|
10
|
+
in: 'in',
|
|
11
|
+
nin: 'nin',
|
|
12
|
+
non: 'non',
|
|
13
|
+
notnull: 'notnull'
|
|
14
14
|
};
|
|
15
15
|
export var batchInput = function batchInput(val) {
|
|
16
|
+
console.log('batchInput', val);
|
|
16
17
|
return val ? val.split(/[,|,|\s|\n|\rn]/).filter(function (t) {
|
|
17
18
|
return !!t;
|
|
18
19
|
}).map(function (t) {
|
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, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception,
|
|
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, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, WdtGoods } 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) => BuyerNick | LogisticsMoreTrajectory | BasicMultSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus | WdtGoods;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception,
|
|
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, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, WdtGoods
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, WdtGoods } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -96,8 +96,6 @@ export var factory = function factory(type, options) {
|
|
|
96
96
|
return new SystemOrderNo(options);
|
|
97
97
|
case "LOGISTICS_INTERCEPTION":
|
|
98
98
|
return new LogisticsInterception(options);
|
|
99
|
-
case "LOGISTICS_INTERCEPTION_MORE":
|
|
100
|
-
return new LogisticsMoreInterception(options);
|
|
101
99
|
case "LOGISTICS_TRAJECTORY":
|
|
102
100
|
return new LogisticsTrajectory(options);
|
|
103
101
|
case "LOGISTICS_TRAJECTORY_MORE":
|
|
@@ -173,28 +171,23 @@ export var factory = function factory(type, options) {
|
|
|
173
171
|
// case "REISSUE_TRADE_ID":
|
|
174
172
|
// case 'EXCHANGE_TRADE_ID':
|
|
175
173
|
// return new CommonTradeId(options);
|
|
176
|
-
case
|
|
174
|
+
case 'NUMERICAL_CALCULATION':
|
|
177
175
|
return new Calculation(options);
|
|
178
|
-
case
|
|
176
|
+
case 'NODE_DEAD_LINE_INPUT':
|
|
179
177
|
// 工单时效
|
|
180
178
|
return new NodeDeadLine(options);
|
|
181
|
-
case
|
|
179
|
+
case 'HANDLER_DEAD_LINE_INPUT':
|
|
182
180
|
// 处理人时效
|
|
183
181
|
return new HandlerDeadLine(options);
|
|
184
|
-
case
|
|
182
|
+
case 'NODE_STAY_DURATION_INPUT':
|
|
185
183
|
// 工单停留时长
|
|
186
184
|
return new NodeStayDuration(options);
|
|
187
|
-
case
|
|
185
|
+
case 'WLN_GOODS':
|
|
188
186
|
// 万里牛商品
|
|
189
187
|
return new WlnGoods(options);
|
|
190
|
-
case
|
|
188
|
+
case 'WDT_GOODS':
|
|
191
189
|
// 万里牛商品
|
|
192
190
|
return new WdtGoods(options);
|
|
193
|
-
case "NEW_PAYMENT_STATUS":
|
|
194
|
-
case "BUSINESS_ORDER_NO":
|
|
195
|
-
return new CommonInput(options);
|
|
196
|
-
case "PAYMENT_VOUCHER_CODE":
|
|
197
|
-
return new PaymentVoucherCode(options);
|
|
198
191
|
default:
|
|
199
192
|
return new BasicInput(options);
|
|
200
193
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -49,7 +49,6 @@ export { default as FlowTag } from "./components/FlowTag";
|
|
|
49
49
|
export { default as TemplateSelect } from "./components/TemplateSelect";
|
|
50
50
|
export { default as WorkOrderId } from "./components/WorkOrderId";
|
|
51
51
|
export { default as LogisticsInterception } from "./components/LogisticsInterception";
|
|
52
|
-
export { default as LogisticsMoreInterception } from "./components/LogisticsMoreInterception";
|
|
53
52
|
export { default as LogisticsTrajectory } from "./components/LogisticsTrajectory";
|
|
54
53
|
export { default as LogisticsMoreTrajectory } from "./components/LogisticsMoreTrajectory";
|
|
55
54
|
export { default as PlatForm } from "./components/PlatForm";
|
|
@@ -70,10 +69,8 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
70
69
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
71
70
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
72
71
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
73
|
-
export { default as MsgStatus } from
|
|
72
|
+
export { default as MsgStatus } from './components/MsgStatus';
|
|
74
73
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
75
|
-
export { default as CommonInput } from "./components/CommonInput";
|
|
76
|
-
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
77
74
|
export { factory } from "./factory";
|
|
78
75
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
79
76
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
@@ -81,3 +78,4 @@ export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
|
|
81
78
|
export { default as ShopList } from "./commonComponents/ShopList";
|
|
82
79
|
export { default as OperationLog } from "./commonComponents/OperationLog";
|
|
83
80
|
export { default as GetFormItem } from "./components/GetFormItem";
|
|
81
|
+
export { default as Global } from "./commonComponents/GlobalContext";
|
package/dist/esm/index.js
CHANGED
|
@@ -49,7 +49,6 @@ export { default as FlowTag } from "./components/FlowTag";
|
|
|
49
49
|
export { default as TemplateSelect } from "./components/TemplateSelect";
|
|
50
50
|
export { default as WorkOrderId } from "./components/WorkOrderId";
|
|
51
51
|
export { default as LogisticsInterception } from "./components/LogisticsInterception";
|
|
52
|
-
export { default as LogisticsMoreInterception } from "./components/LogisticsMoreInterception";
|
|
53
52
|
export { default as LogisticsTrajectory } from "./components/LogisticsTrajectory";
|
|
54
53
|
export { default as LogisticsMoreTrajectory } from "./components/LogisticsMoreTrajectory";
|
|
55
54
|
export { default as PlatForm } from "./components/PlatForm";
|
|
@@ -72,12 +71,11 @@ export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
|
72
71
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
73
72
|
export { default as MsgStatus } from "./components/MsgStatus";
|
|
74
73
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
75
|
-
export { default as CommonInput } from "./components/CommonInput";
|
|
76
|
-
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
77
74
|
export { factory } from "./factory";
|
|
78
75
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
79
76
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
80
77
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
|
81
78
|
export { default as ShopList } from "./commonComponents/ShopList";
|
|
82
79
|
export { default as OperationLog } from "./commonComponents/OperationLog";
|
|
83
|
-
export { default as GetFormItem } from "./components/GetFormItem";
|
|
80
|
+
export { default as GetFormItem } from "./components/GetFormItem";
|
|
81
|
+
export { default as Global } from "./commonComponents/GlobalContext";
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export declare const replaceCheck: (data: any) => Promise<any>;
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const queryAddressData: () => Promise<void>;
|
|
3
|
+
export declare const queryBsAddressData: () => Promise<void>;
|
|
4
|
+
export declare const queryWdtAddressData: () => Promise<void>;
|
|
5
|
+
export declare const queryPlatData: () => Promise<void>;
|
|
6
|
+
export declare const queryExpressInterceptData: () => Promise<void>;
|
|
7
|
+
export declare const queryLogisticsAddressData: () => Promise<void>;
|
|
8
|
+
export declare const queryAllLogisticsCompany: () => Promise<void>;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
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); }
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
+
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
|
+
import get from 'lodash/get';
|
|
1
15
|
import request from "./request";
|
|
2
16
|
// 重复校验
|
|
3
17
|
export var replaceCheck = function replaceCheck(data) {
|
|
@@ -7,11 +21,230 @@ export var replaceCheck = function replaceCheck(data) {
|
|
|
7
21
|
data: data
|
|
8
22
|
});
|
|
9
23
|
};
|
|
10
|
-
|
|
11
|
-
export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
|
|
24
|
+
export var queryAddressData = function queryAddressData() {
|
|
12
25
|
return request({
|
|
13
|
-
url:
|
|
14
|
-
method:
|
|
15
|
-
data:
|
|
26
|
+
url: "/qy/gdfw/template/queryAreas/noLogin",
|
|
27
|
+
method: "get",
|
|
28
|
+
data: {}
|
|
29
|
+
}).then(function (resp) {
|
|
30
|
+
var map = {};
|
|
31
|
+
var res = {};
|
|
32
|
+
var list = resp.data;
|
|
33
|
+
for (var i = 0; i < list.length; i++) {
|
|
34
|
+
res[list[i]["id"]] = [list[i]["name"], list[i]["parentId"]];
|
|
35
|
+
map[list[i]["name"]] = list[i]["id"];
|
|
36
|
+
}
|
|
37
|
+
var instance = AddressData.getInstance();
|
|
38
|
+
instance.addrData = res;
|
|
39
|
+
instance.addrNameMap = map;
|
|
40
|
+
instance.addressOptions = get(toTree(list, 0), '0.children', []);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export var queryBsAddressData = function queryBsAddressData() {
|
|
44
|
+
return request({
|
|
45
|
+
url: "/qy/gdfw/template/queryBsAreas/noLogin",
|
|
46
|
+
method: "get",
|
|
47
|
+
data: {}
|
|
48
|
+
}).then(function (resp) {
|
|
49
|
+
var map = {};
|
|
50
|
+
var res = {};
|
|
51
|
+
var _resp$data = resp.data,
|
|
52
|
+
list = _resp$data === void 0 ? [] : _resp$data;
|
|
53
|
+
for (var i = 0; i < list.length; i++) {
|
|
54
|
+
res[list[i]["id"]] = [list[i]["name"], list[i]["parentId"]];
|
|
55
|
+
map[list[i]["name"]] = list[i]["id"];
|
|
56
|
+
}
|
|
57
|
+
var instance = BsAddressData.getInstance();
|
|
58
|
+
instance.addrData = res;
|
|
59
|
+
instance.addrNameMap = map;
|
|
60
|
+
instance.addressOptions = toTree(list, 1);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export var queryWdtAddressData = function queryWdtAddressData() {
|
|
64
|
+
return request({
|
|
65
|
+
url: "/qy/gdfw/template/queryWdtAreas/noLogin",
|
|
66
|
+
method: "get",
|
|
67
|
+
data: {}
|
|
68
|
+
}).then(function (resp) {
|
|
69
|
+
var map = {};
|
|
70
|
+
var res = {};
|
|
71
|
+
var _resp$data2 = resp.data,
|
|
72
|
+
list = _resp$data2 === void 0 ? [] : _resp$data2;
|
|
73
|
+
for (var i = 0; i < list.length; i++) {
|
|
74
|
+
res[list[i]["id"]] = [list[i]["name"], list[i]["parentId"]];
|
|
75
|
+
map[list[i]["name"]] = list[i]["id"];
|
|
76
|
+
}
|
|
77
|
+
var instance = WdtAddressData.getInstance();
|
|
78
|
+
instance.addrData = res;
|
|
79
|
+
instance.addrNameMap = map;
|
|
80
|
+
instance.addressOptions = toTree(list, 1);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
export var queryPlatData = function queryPlatData() {
|
|
84
|
+
return request({
|
|
85
|
+
url: "/qy/platform/listPlatform/noLogin",
|
|
86
|
+
method: "get",
|
|
87
|
+
data: {}
|
|
88
|
+
}).then(function (res) {
|
|
89
|
+
if (res.success) {
|
|
90
|
+
var platType = res.data || {};
|
|
91
|
+
platType.alreadyJoinedList = platType.alreadyJoinedList || [];
|
|
92
|
+
platType.notJoinList = platType.notJoinList || [];
|
|
93
|
+
var list = [].concat(_toConsumableArray(platType.alreadyJoinedList), _toConsumableArray(platType.notJoinList));
|
|
94
|
+
var instance = PlatData.getInstance();
|
|
95
|
+
instance.platTypeList = list;
|
|
96
|
+
var platMap = list === null || list === void 0 ? void 0 : list.reduce(function (cur, nxt) {
|
|
97
|
+
cur[nxt.platformType] = nxt.platformName;
|
|
98
|
+
return cur;
|
|
99
|
+
}, {});
|
|
100
|
+
instance.platMap = platMap;
|
|
101
|
+
var platSelectList = list.map(function (p) {
|
|
102
|
+
return {
|
|
103
|
+
label: p.platformName,
|
|
104
|
+
value: p.platformType
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
instance.platSelectList = platSelectList;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
112
|
+
return request({
|
|
113
|
+
url: '/qy/logistics/listLogisticsWithInterceptInfo/noLogin',
|
|
114
|
+
method: 'get',
|
|
115
|
+
data: {
|
|
116
|
+
platformType: 118
|
|
117
|
+
}
|
|
118
|
+
}).then(function (res) {
|
|
119
|
+
var data = res.data;
|
|
120
|
+
var instance = ExpressInterceptData.getInstance();
|
|
121
|
+
var companyTypeMap = {
|
|
122
|
+
SF: '顺丰',
|
|
123
|
+
ZTO: '中通',
|
|
124
|
+
JT: '极兔',
|
|
125
|
+
DEFAULT: ''
|
|
126
|
+
};
|
|
127
|
+
var expressList = data.map(function (item) {
|
|
128
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
129
|
+
label: item.name,
|
|
130
|
+
value: item.cpCode
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
instance.expressData = expressList;
|
|
134
|
+
var showBtn = {},
|
|
135
|
+
showSender = {},
|
|
136
|
+
showAddress = {},
|
|
137
|
+
showReturnAddress = {},
|
|
138
|
+
typeMap = {},
|
|
139
|
+
statusMap = {},
|
|
140
|
+
typeObj = {},
|
|
141
|
+
statusObj = {};
|
|
142
|
+
expressList.forEach(function (item) {
|
|
143
|
+
var _item$logisticsStatus, _item$interceptionTyp;
|
|
144
|
+
if (item !== null && item !== void 0 && (_item$logisticsStatus = item.logisticsStatusList) !== null && _item$logisticsStatus !== void 0 && _item$logisticsStatus.length) {
|
|
145
|
+
item.logisticsStatusList.forEach(function (t) {
|
|
146
|
+
statusMap["".concat(t.value)] = t.label;
|
|
147
|
+
if (statusObj[t.label]) {
|
|
148
|
+
statusObj[t.label] = statusObj[t.label].add(t.value);
|
|
149
|
+
} else {
|
|
150
|
+
statusObj[t.label] = new Set([t.value]);
|
|
151
|
+
}
|
|
152
|
+
//todo 取消拦截按钮
|
|
153
|
+
if (t !== null && t !== void 0 && t.showInterceptionBtn) {
|
|
154
|
+
showBtn["".concat(t.value)] = true;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
if (item !== null && item !== void 0 && (_item$interceptionTyp = item.interceptionTypeList) !== null && _item$interceptionTyp !== void 0 && _item$interceptionTyp.length) {
|
|
159
|
+
item.interceptionTypeList.forEach(function (t) {
|
|
160
|
+
var _t$config, _t$config2, _t$config3;
|
|
161
|
+
typeMap["".concat(t.value)] = t.label;
|
|
162
|
+
if (typeObj[t.label]) {
|
|
163
|
+
typeObj[t.label] = typeObj[t.label].add(t.value);
|
|
164
|
+
} else {
|
|
165
|
+
typeObj[t.label] = new Set([t.value]);
|
|
166
|
+
}
|
|
167
|
+
if (t !== null && t !== void 0 && (_t$config = t.config) !== null && _t$config !== void 0 && _t$config.showAddress) {
|
|
168
|
+
showAddress["".concat(t.value)] = true;
|
|
169
|
+
}
|
|
170
|
+
if (t !== null && t !== void 0 && (_t$config2 = t.config) !== null && _t$config2 !== void 0 && _t$config2.showAddressSelect) {
|
|
171
|
+
showReturnAddress["".concat(t.value)] = true;
|
|
172
|
+
}
|
|
173
|
+
if (t !== null && t !== void 0 && (_t$config3 = t.config) !== null && _t$config3 !== void 0 && _t$config3.showSenderMobile) {
|
|
174
|
+
showSender["".concat(t.value)] = true;
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
instance.showInterceptionMap = showBtn;
|
|
180
|
+
instance.typeNameMap = typeMap;
|
|
181
|
+
instance.statusNameMap = statusMap;
|
|
182
|
+
instance.showNewAddressMap = showAddress;
|
|
183
|
+
instance.showReturnAddressMap = showReturnAddress;
|
|
184
|
+
instance.showSenderMobileMap = showSender;
|
|
185
|
+
instance.typeOptions = Object.keys(typeObj).map(function (key) {
|
|
186
|
+
return {
|
|
187
|
+
label: key,
|
|
188
|
+
value: _toConsumableArray(typeObj[key]).join(',')
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
instance.typeConditionOptions = Object.keys(instance.typeNameMap).map(function (key) {
|
|
192
|
+
var type = key.split('|')[0];
|
|
193
|
+
return {
|
|
194
|
+
label: "".concat(companyTypeMap[type] || '').concat(instance.typeNameMap[key]),
|
|
195
|
+
value: key
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
instance.statusOptions = Object.keys(statusObj).map(function (key) {
|
|
199
|
+
return {
|
|
200
|
+
label: key,
|
|
201
|
+
value: _toConsumableArray(statusObj[key]).join(',')
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
var tempList = [];
|
|
205
|
+
var tempObj = {};
|
|
206
|
+
Object.keys(instance.statusNameMap).forEach(function (key) {
|
|
207
|
+
var type = key.split('|')[1];
|
|
208
|
+
if (!tempObj[type]) {
|
|
209
|
+
tempList.push({
|
|
210
|
+
label: instance.statusNameMap[key],
|
|
211
|
+
value: type
|
|
212
|
+
});
|
|
213
|
+
tempObj[type] = instance.statusNameMap[key];
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
instance.statusConditionOptions = tempList;
|
|
217
|
+
}).catch(function (e) {
|
|
218
|
+
console.log(e);
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
export var queryLogisticsAddressData = function queryLogisticsAddressData() {
|
|
222
|
+
return request({
|
|
223
|
+
url: "/qy/userConfig/listLogisticsAddress",
|
|
224
|
+
method: "get",
|
|
225
|
+
data: {}
|
|
226
|
+
}).then(function (res) {
|
|
227
|
+
var data = res.data;
|
|
228
|
+
var instance = LogisticsAddressData.getInstance();
|
|
229
|
+
instance.addressData = data;
|
|
230
|
+
}).catch(function (e) {
|
|
231
|
+
console.log(e);
|
|
232
|
+
});
|
|
233
|
+
};
|
|
234
|
+
export var queryAllLogisticsCompany = function queryAllLogisticsCompany() {
|
|
235
|
+
return request({
|
|
236
|
+
url: "/qy/logistics/company/getAllLogisticsCompany/noLogin",
|
|
237
|
+
method: "get",
|
|
238
|
+
data: {}
|
|
239
|
+
}).then(function (res) {
|
|
240
|
+
var data = res.data;
|
|
241
|
+
var instance = ExpressData.getInstance();
|
|
242
|
+
var expressList = data.logisticsCompanyDtoList.map(function (item) {
|
|
243
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
244
|
+
label: item.name,
|
|
245
|
+
value: item.cpCode
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
instance.expressData = expressList;
|
|
16
249
|
});
|
|
17
250
|
};
|
|
@@ -13,7 +13,15 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
13
13
|
*/
|
|
14
14
|
import { extend } from 'umi-request';
|
|
15
15
|
import { message } from 'antd';
|
|
16
|
-
var request = extend({
|
|
16
|
+
var request = extend({
|
|
17
|
+
useCache: true,
|
|
18
|
+
ttl: 24 * 3600 * 1000,
|
|
19
|
+
// 缓存1天
|
|
20
|
+
validateCache: function validateCache(url, options) {
|
|
21
|
+
var _options$method;
|
|
22
|
+
return (options === null || options === void 0 ? void 0 : (_options$method = options.method) === null || _options$method === void 0 ? void 0 : _options$method.toLowerCase()) === 'get';
|
|
23
|
+
}
|
|
24
|
+
});
|
|
17
25
|
var requestApi = function requestApi(_ref) {
|
|
18
26
|
var url = _ref.url,
|
|
19
27
|
method = _ref.method,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.26.1
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.26.1
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.26.1
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.26.1",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.26.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "a0bba4d2173af489b94bcd39c30078628963767a",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare class CommonInput implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
rules: any[];
|
|
9
|
-
showContains: boolean;
|
|
10
|
-
onlyContainsString: boolean;
|
|
11
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
-
effects: ComponentInterface["effects"];
|
|
13
|
-
isCombinationComponent: boolean;
|
|
14
|
-
formField: string;
|
|
15
|
-
canSort: boolean;
|
|
16
|
-
children: ComponentInterface[];
|
|
17
|
-
dataType: ComponentInterface["dataType"];
|
|
18
|
-
options: ComponentInterface["options"];
|
|
19
|
-
constructor(options: PickOption);
|
|
20
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
|
-
renderPc: (value: unknown, record: Record) => any;
|
|
22
|
-
renderLog: (r: Record) => any;
|
|
23
|
-
getComponentValue: (r: Record) => any;
|
|
24
|
-
renderExport: (value: unknown, record: Record) => any;
|
|
25
|
-
editRender: (p: any) => React.JSX.Element;
|
|
26
|
-
filterConfig: (item: ColumnConfig) => {
|
|
27
|
-
searchDefaultConditions: "like";
|
|
28
|
-
type: string;
|
|
29
|
-
id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
filterComponentType: "Input";
|
|
32
|
-
props?: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
searchDefaultConditions: "in";
|
|
35
|
-
type: string;
|
|
36
|
-
id: string;
|
|
37
|
-
name: string;
|
|
38
|
-
filterComponentType: "MultipleSelect";
|
|
39
|
-
props: {
|
|
40
|
-
options: any;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export default CommonInput;
|