@kmkf-fe-packages/kmkf-utils 0.8.14-alpha.0 → 0.8.15-alpha.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/expressInterceptData/index.d.ts +16 -0
- package/dist/esm/expressInterceptData/index.js +45 -4
- package/dist/esm/global.d.ts +1 -0
- package/dist/esm/utils/index.d.ts +1 -1
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/orderBackFormValues.d.ts +2 -4
- package/dist/esm/utils/orderBackFormValues.js +27 -194
- package/package.json +2 -2
|
@@ -20,10 +20,18 @@ export default class ExpressInterceptData {
|
|
|
20
20
|
label: string;
|
|
21
21
|
value: string;
|
|
22
22
|
}[];
|
|
23
|
+
typeConditionOptions: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
23
27
|
statusOptions: {
|
|
24
28
|
label: string;
|
|
25
29
|
value: string;
|
|
26
30
|
}[];
|
|
31
|
+
statusConditionOptions: {
|
|
32
|
+
label: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}[];
|
|
27
35
|
constructor();
|
|
28
36
|
initData: () => OptionsItem[] | undefined;
|
|
29
37
|
getExpressData: () => OptionsItem[] | undefined;
|
|
@@ -37,10 +45,18 @@ export default class ExpressInterceptData {
|
|
|
37
45
|
label: string;
|
|
38
46
|
value: string;
|
|
39
47
|
}[];
|
|
48
|
+
getTypeConditionOptions(): {
|
|
49
|
+
label: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}[];
|
|
40
52
|
getStatusOptions(): {
|
|
41
53
|
label: string;
|
|
42
54
|
value: string;
|
|
43
55
|
}[];
|
|
56
|
+
getStatusConditionOptions(): {
|
|
57
|
+
label: string;
|
|
58
|
+
value: string;
|
|
59
|
+
}[];
|
|
44
60
|
setExpressData: (val: OptionsItem[]) => OptionsItem[];
|
|
45
61
|
isInterfaceCompany: (company: string) => boolean;
|
|
46
62
|
static getInstance(): ExpressInterceptData;
|
|
@@ -14,6 +14,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
14
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
15
|
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); }
|
|
16
16
|
import request from "../request";
|
|
17
|
+
var companyTypeMap = {
|
|
18
|
+
SF: '顺丰',
|
|
19
|
+
ZTO: '中通',
|
|
20
|
+
JT: '极兔',
|
|
21
|
+
DEFAULT: ''
|
|
22
|
+
};
|
|
17
23
|
var ExpressInterceptData = /*#__PURE__*/function () {
|
|
18
24
|
//展示拦截按钮映射
|
|
19
25
|
//展示发件人手机号映射
|
|
@@ -21,8 +27,11 @@ var ExpressInterceptData = /*#__PURE__*/function () {
|
|
|
21
27
|
//退回诶之显示映射
|
|
22
28
|
//拦截类型映射
|
|
23
29
|
//物流状态映射
|
|
30
|
+
|
|
24
31
|
//拦截类型筛选options
|
|
32
|
+
// 拦截类型筛选options 顺丰/中通/极兔要拆开
|
|
25
33
|
//物流状态筛选options
|
|
34
|
+
//物流状态条件选择筛选
|
|
26
35
|
function ExpressInterceptData() {
|
|
27
36
|
var _this = this;
|
|
28
37
|
_classCallCheck(this, ExpressInterceptData);
|
|
@@ -34,12 +43,14 @@ var ExpressInterceptData = /*#__PURE__*/function () {
|
|
|
34
43
|
_defineProperty(this, "typeNameMap", null);
|
|
35
44
|
_defineProperty(this, "statusNameMap", null);
|
|
36
45
|
_defineProperty(this, "typeOptions", []);
|
|
46
|
+
_defineProperty(this, "typeConditionOptions", []);
|
|
37
47
|
_defineProperty(this, "statusOptions", []);
|
|
48
|
+
_defineProperty(this, "statusConditionOptions", []);
|
|
38
49
|
_defineProperty(this, "initData", function () {
|
|
39
50
|
if (_this.expressData.length > 0) return _this.expressData;
|
|
40
51
|
request({
|
|
41
|
-
url:
|
|
42
|
-
method:
|
|
52
|
+
url: '/qy/logistics/listLogisticsWithInterceptInfo',
|
|
53
|
+
method: 'post',
|
|
43
54
|
data: {
|
|
44
55
|
platformType: 118
|
|
45
56
|
}
|
|
@@ -106,15 +117,35 @@ var ExpressInterceptData = /*#__PURE__*/function () {
|
|
|
106
117
|
_this.typeOptions = Object.keys(typeObj).map(function (key) {
|
|
107
118
|
return {
|
|
108
119
|
label: key,
|
|
109
|
-
value: _toConsumableArray(typeObj[key]).join(
|
|
120
|
+
value: _toConsumableArray(typeObj[key]).join(',')
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
_this.typeConditionOptions = Object.keys(_this.typeNameMap).map(function (key) {
|
|
124
|
+
var type = key.split('|')[0];
|
|
125
|
+
return {
|
|
126
|
+
label: "".concat(companyTypeMap[type] || '').concat(_this.typeNameMap[key]),
|
|
127
|
+
value: key
|
|
110
128
|
};
|
|
111
129
|
});
|
|
112
130
|
_this.statusOptions = Object.keys(statusObj).map(function (key) {
|
|
113
131
|
return {
|
|
114
132
|
label: key,
|
|
115
|
-
value: _toConsumableArray(statusObj[key]).join(
|
|
133
|
+
value: _toConsumableArray(statusObj[key]).join(',')
|
|
116
134
|
};
|
|
117
135
|
});
|
|
136
|
+
var tempList = [];
|
|
137
|
+
var tempObj = {};
|
|
138
|
+
Object.keys(_this.statusNameMap).forEach(function (key) {
|
|
139
|
+
var type = key.split('|')[1];
|
|
140
|
+
if (!tempObj[type]) {
|
|
141
|
+
tempList.push({
|
|
142
|
+
label: _this.statusNameMap[key],
|
|
143
|
+
value: type
|
|
144
|
+
});
|
|
145
|
+
tempObj[type] = _this.statusNameMap[key];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
_this.statusConditionOptions = tempList;
|
|
118
149
|
}).catch(function (e) {
|
|
119
150
|
console.log(e);
|
|
120
151
|
});
|
|
@@ -177,11 +208,21 @@ var ExpressInterceptData = /*#__PURE__*/function () {
|
|
|
177
208
|
value: function getTypeOptions() {
|
|
178
209
|
return this.typeOptions;
|
|
179
210
|
}
|
|
211
|
+
}, {
|
|
212
|
+
key: "getTypeConditionOptions",
|
|
213
|
+
value: function getTypeConditionOptions() {
|
|
214
|
+
return this.typeConditionOptions;
|
|
215
|
+
}
|
|
180
216
|
}, {
|
|
181
217
|
key: "getStatusOptions",
|
|
182
218
|
value: function getStatusOptions() {
|
|
183
219
|
return this.statusOptions;
|
|
184
220
|
}
|
|
221
|
+
}, {
|
|
222
|
+
key: "getStatusConditionOptions",
|
|
223
|
+
value: function getStatusConditionOptions() {
|
|
224
|
+
return this.statusConditionOptions;
|
|
225
|
+
}
|
|
185
226
|
}], [{
|
|
186
227
|
key: "getInstance",
|
|
187
228
|
value: function getInstance() {
|
package/dist/esm/global.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { default as imgResize } from "./imgResize";
|
|
|
5
5
|
export { default as isNull } from "./isNull";
|
|
6
6
|
export { default as getExpression } from "./getExpression";
|
|
7
7
|
export { default as formatDisplayConfig } from "./formatDisplayConfig";
|
|
8
|
-
export {
|
|
8
|
+
export { default as orderBackFormValues } from "./orderBackFormValues";
|
|
9
9
|
export { default as uuid } from "./getUUid";
|
|
10
10
|
export * as filterFn from "./filterFn";
|
|
11
11
|
export * as templateFn from "./template";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { default as imgResize } from "./imgResize";
|
|
|
5
5
|
export { default as isNull } from "./isNull";
|
|
6
6
|
export { default as getExpression } from "./getExpression";
|
|
7
7
|
export { default as formatDisplayConfig } from "./formatDisplayConfig";
|
|
8
|
-
export {
|
|
8
|
+
export { default as orderBackFormValues } from "./orderBackFormValues";
|
|
9
9
|
export { default as uuid } from "./getUUid";
|
|
10
10
|
import * as _filterFn from "./filterFn";
|
|
11
11
|
export { _filterFn as filterFn };
|
|
@@ -19,7 +19,5 @@ interface OrderBackFormValuesI {
|
|
|
19
19
|
detail: Record<string, unknown>;
|
|
20
20
|
fromQNCreateWorkOrderByOrderNo: boolean;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
export
|
|
24
|
-
export declare const bsOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
|
|
25
|
-
export {};
|
|
22
|
+
declare const _default: ({ detail, order_no, formValue, templateDetail, type, fromQNCreateWorkOrderByOrderNo, }: OrderBackFormValuesI) => Record<string, any>;
|
|
23
|
+
export default _default;
|
|
@@ -1,9 +1,3 @@
|
|
|
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
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
2
|
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
3
|
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); }
|
|
@@ -137,7 +131,6 @@ var updateBsGoodsHandle = function updateBsGoodsHandle() {
|
|
|
137
131
|
return list;
|
|
138
132
|
};
|
|
139
133
|
var updateBsItemListHandle = function updateBsItemListHandle(list, type) {
|
|
140
|
-
var _newList;
|
|
141
134
|
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
142
135
|
var showField = config.showField;
|
|
143
136
|
var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
|
|
@@ -174,7 +167,7 @@ var updateBsItemListHandle = function updateBsItemListHandle(list, type) {
|
|
|
174
167
|
prv.push.apply(prv, _toConsumableArray(advList));
|
|
175
168
|
return prv;
|
|
176
169
|
}, []);
|
|
177
|
-
if (!
|
|
170
|
+
if (!newList.length) {
|
|
178
171
|
switch (type) {
|
|
179
172
|
case "logistics":
|
|
180
173
|
newList = [{
|
|
@@ -238,7 +231,8 @@ var taobaoGoodHandle = function taobaoGoodHandle() {
|
|
|
238
231
|
});
|
|
239
232
|
};
|
|
240
233
|
//订单返填数据重组
|
|
241
|
-
export
|
|
234
|
+
export default (function (_ref) {
|
|
235
|
+
var _detail$bsOrder, _detail$bsOrder$order, _detail$bsOrder$order2, _detail$bsOrder$order3;
|
|
242
236
|
var _ref$detail = _ref.detail,
|
|
243
237
|
detail = _ref$detail === void 0 ? {} : _ref$detail,
|
|
244
238
|
_ref$order_no = _ref.order_no,
|
|
@@ -251,9 +245,13 @@ export var orderBackFormValues = function orderBackFormValues(_ref) {
|
|
|
251
245
|
type = _ref$type === void 0 ? "add" : _ref$type,
|
|
252
246
|
_ref$fromQNCreateWork = _ref.fromQNCreateWorkOrderByOrderNo,
|
|
253
247
|
fromQNCreateWorkOrderByOrderNo = _ref$fromQNCreateWork === void 0 ? false : _ref$fromQNCreateWork;
|
|
254
|
-
var
|
|
248
|
+
var advItem = ((_detail$bsOrder = detail["bsOrder"]) === null || _detail$bsOrder === void 0 ? void 0 : (_detail$bsOrder$order = _detail$bsOrder.orders) === null || _detail$bsOrder$order === void 0 ? void 0 : (_detail$bsOrder$order2 = _detail$bsOrder$order[0]) === null || _detail$bsOrder$order2 === void 0 ? void 0 : (_detail$bsOrder$order3 = _detail$bsOrder$order2.advancedDistributionInfos) === null || _detail$bsOrder$order3 === void 0 ? void 0 : _detail$bsOrder$order3[0]) || {};
|
|
249
|
+
return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
|
|
250
|
+
var _detail$bsOrder2, _detail$bsOrder3, _detail$bsOrder3$orde, _detail$bsOrder3$orde2, _detail$bsOrder3$orde3, _detail$bsOrder4, _detail$bsOrder5, _detail$bsOrder6, _detail$bsOrder7, _detail$bsOrder8, _detail$bsOrder9, _detail$bsOrder10, _detail$bsOrder11, _detail$bsOrder12, _detail$bsOrder13;
|
|
255
251
|
var uniqueKey = next.uniqueKey;
|
|
256
252
|
var config = next.componentConfig;
|
|
253
|
+
var weight = 0;
|
|
254
|
+
var bsPostingAddress = [];
|
|
257
255
|
switch (next.workOrderComponentType) {
|
|
258
256
|
case "TRADE_ID_INPUT":
|
|
259
257
|
prv[uniqueKey] = order_no || detail["orderNo"];
|
|
@@ -357,203 +355,38 @@ export var orderBackFormValues = function orderBackFormValues(_ref) {
|
|
|
357
355
|
};
|
|
358
356
|
break;
|
|
359
357
|
}
|
|
360
|
-
// case "JST_ITEM_SELECT_THIRD":
|
|
361
|
-
// prv[uniqueKey] = updateJSTItemListHandle(
|
|
362
|
-
// detail["jstItemList"] as any[],
|
|
363
|
-
// "itemList",
|
|
364
|
-
// config
|
|
365
|
-
// );
|
|
366
|
-
// break;
|
|
367
|
-
// case "JST_SUPPLY":
|
|
368
|
-
// prv[uniqueKey] = updateJSTItemListHandle(
|
|
369
|
-
// detail["jstItemList"] as any[],
|
|
370
|
-
// "supply",
|
|
371
|
-
// config
|
|
372
|
-
// );
|
|
373
|
-
// break;
|
|
374
|
-
// case "JST_SEND_GOOD":
|
|
375
|
-
// prv[uniqueKey] = updateJSTItemListHandle(
|
|
376
|
-
// detail["jstItemList"] as any[],
|
|
377
|
-
// "send",
|
|
378
|
-
// config
|
|
379
|
-
// );
|
|
380
|
-
// break;
|
|
381
|
-
// case "JST_LOGISTICS":
|
|
382
|
-
// prv[uniqueKey] = updateJSTItemListHandle(
|
|
383
|
-
// detail["jstItemList"] as any[],
|
|
384
|
-
// "logistics",
|
|
385
|
-
// config
|
|
386
|
-
// );
|
|
387
|
-
// break;
|
|
388
|
-
case "SYSTEM_ORDER_NO":
|
|
389
|
-
prv[uniqueKey] = detail["sid"];
|
|
390
|
-
break;
|
|
391
|
-
// case "BS_SIGNING_TIME":
|
|
392
|
-
// prv[uniqueKey] = detail["bsOrder"]?.receiptDate;
|
|
393
|
-
// break;
|
|
394
|
-
// case "BS_SEND_TIME":
|
|
395
|
-
// prv[uniqueKey] =
|
|
396
|
-
// detail[
|
|
397
|
-
// "bsOrder"
|
|
398
|
-
// ]?.orders[0]?.advancedDistributionInfos?.[0]?.deliveryDate;
|
|
399
|
-
|
|
400
|
-
// break;
|
|
401
|
-
// case "BS_TRADE_PAYMENT_TIME":
|
|
402
|
-
// prv[uniqueKey] = detail["bsOrder"]?.payDate;
|
|
403
|
-
// break;
|
|
404
|
-
// case "BS_DEPOSIT":
|
|
405
|
-
// prv[uniqueKey] = detail["bsOrder"]?.amountPaid;
|
|
406
|
-
// break;
|
|
407
|
-
// case "BS_NET_RECEIPTS":
|
|
408
|
-
// prv[uniqueKey] = detail["bsOrder"]?.merchantRealIncome;
|
|
409
|
-
// break;
|
|
410
|
-
// case "BS_PACKAGE_WEIGHT":
|
|
411
|
-
// weight = (detail["bsOrder"]?.orders || []).reduce(
|
|
412
|
-
// (prv: any, next: any) => {
|
|
413
|
-
// const number = (next?.advancedDistributionInfos || []).reduce(
|
|
414
|
-
// (p: any, n: any) => {
|
|
415
|
-
// p += n.orderWeight || 0;
|
|
416
|
-
// return p;
|
|
417
|
-
// },
|
|
418
|
-
// 0
|
|
419
|
-
// );
|
|
420
|
-
// prv += number || 0;
|
|
421
|
-
// return prv;
|
|
422
|
-
// },
|
|
423
|
-
// 0
|
|
424
|
-
// );
|
|
425
|
-
// prv[uniqueKey] = weight || null;
|
|
426
|
-
// break;
|
|
427
|
-
// case "BS_GOODS":
|
|
428
|
-
// prv[uniqueKey] = {
|
|
429
|
-
// shopCode: detail["bsOrder"]?.shopCode,
|
|
430
|
-
// bsGoods: updateBsGoodsHandle(detail["bsOrder"]?.orders),
|
|
431
|
-
// };
|
|
432
|
-
// break;
|
|
433
|
-
// case "BS_EXCHANGE_GOODS":
|
|
434
|
-
// prv[uniqueKey] = {
|
|
435
|
-
// shopCode: detail["bsOrder"]?.shopCode,
|
|
436
|
-
// bsExchangeType: [],
|
|
437
|
-
// bsExchangeReturnGoods: [],
|
|
438
|
-
// bsExchangeSwapOutGoods: [],
|
|
439
|
-
// bsExchangeGiftGoods: [],
|
|
440
|
-
// };
|
|
441
|
-
// break;
|
|
442
|
-
// case "BS_REISSUE_GOODS":
|
|
443
|
-
// prv[uniqueKey] = {
|
|
444
|
-
// shopCode: detail["bsOrder"]?.shopCode,
|
|
445
|
-
// bsReissueType: [],
|
|
446
|
-
// bsReissueGoods: [],
|
|
447
|
-
// };
|
|
448
|
-
// break;
|
|
449
|
-
// case "BS_LOGISTICS":
|
|
450
|
-
// prv[uniqueKey] = updateBsItemListHandle(
|
|
451
|
-
// detail["bsOrder"]?.orders,
|
|
452
|
-
// "logistics",
|
|
453
|
-
// config
|
|
454
|
-
// );
|
|
455
|
-
// break;
|
|
456
|
-
// case "BS_SEND_GOOD":
|
|
457
|
-
// prv[uniqueKey] = updateBsItemListHandle(
|
|
458
|
-
// detail["bsOrder"]?.orders,
|
|
459
|
-
// "send",
|
|
460
|
-
// config
|
|
461
|
-
// );
|
|
462
|
-
|
|
463
|
-
// break;
|
|
464
|
-
// case "BS_POSTING":
|
|
465
|
-
// if (advItem?.provinceId) {
|
|
466
|
-
// bsPostingAddress = [advItem?.provinceId, advItem?.cityId];
|
|
467
|
-
// if (advItem?.districtId) {
|
|
468
|
-
// bsPostingAddress.push(advItem?.districtId);
|
|
469
|
-
// }
|
|
470
|
-
// }
|
|
471
|
-
|
|
472
|
-
// prv[uniqueKey] = {
|
|
473
|
-
// postingAddress: bsPostingAddress,
|
|
474
|
-
// postingDetail: advItem?.address,
|
|
475
|
-
// postingReceiverName: advItem?.receiver,
|
|
476
|
-
// postingReceiverMobile: advItem?.receiverTel,
|
|
477
|
-
// };
|
|
478
|
-
|
|
479
|
-
// break;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
return prv;
|
|
483
|
-
}, {});
|
|
484
|
-
var jstValues = jstOrderBackFormValues(detail["jstItemList"], templateDetail);
|
|
485
|
-
var bsValues = bsOrderBackFormValues(detail["bsOrder"], templateDetail);
|
|
486
|
-
console.log(orderValues, jstValues, bsValues);
|
|
487
|
-
return _objectSpread(_objectSpread(_objectSpread({}, orderValues), jstValues), bsValues);
|
|
488
|
-
};
|
|
489
|
-
//jst订单返填逻辑
|
|
490
|
-
export var jstOrderBackFormValues = function jstOrderBackFormValues() {
|
|
491
|
-
var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
492
|
-
var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
493
|
-
return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
|
|
494
|
-
var uniqueKey = next.uniqueKey;
|
|
495
|
-
var config = next.componentConfig;
|
|
496
|
-
switch (next.workOrderComponentType) {
|
|
497
358
|
case "JST_ITEM_SELECT_THIRD":
|
|
498
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail, "itemList", config);
|
|
359
|
+
prv[uniqueKey] = updateJSTItemListHandle(detail["jstItemList"], "itemList", config);
|
|
499
360
|
break;
|
|
500
361
|
case "JST_SUPPLY":
|
|
501
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail, "supply", config);
|
|
362
|
+
prv[uniqueKey] = updateJSTItemListHandle(detail["jstItemList"], "supply", config);
|
|
502
363
|
break;
|
|
503
364
|
case "JST_SEND_GOOD":
|
|
504
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail, "send", config);
|
|
365
|
+
prv[uniqueKey] = updateJSTItemListHandle(detail["jstItemList"], "send", config);
|
|
505
366
|
break;
|
|
506
367
|
case "JST_LOGISTICS":
|
|
507
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail, "logistics", config);
|
|
368
|
+
prv[uniqueKey] = updateJSTItemListHandle(detail["jstItemList"], "logistics", config);
|
|
508
369
|
break;
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}, {});
|
|
512
|
-
};
|
|
513
|
-
//bs订单返填逻辑
|
|
514
|
-
export var bsOrderBackFormValues = function bsOrderBackFormValues() {
|
|
515
|
-
var _detail$orders, _detail$orders$, _detail$orders$$advan;
|
|
516
|
-
var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
517
|
-
var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
518
|
-
var advItem = (detail === null || detail === void 0 ? void 0 : (_detail$orders = detail.orders) === null || _detail$orders === void 0 ? void 0 : (_detail$orders$ = _detail$orders[0]) === null || _detail$orders$ === void 0 ? void 0 : (_detail$orders$$advan = _detail$orders$.advancedDistributionInfos) === null || _detail$orders$$advan === void 0 ? void 0 : _detail$orders$$advan[0]) || {};
|
|
519
|
-
var weight = 0;
|
|
520
|
-
var bsPostingAddress = [];
|
|
521
|
-
return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
|
|
522
|
-
var _detail$orders2, _detail$orders2$, _detail$orders2$$adva, _detail$orders2$$adva2;
|
|
523
|
-
var uniqueKey = next.uniqueKey;
|
|
524
|
-
var config = next.componentConfig;
|
|
525
|
-
switch (next.workOrderComponentType) {
|
|
526
|
-
case "BS_SYSTEM_ORDER":
|
|
527
|
-
prv[uniqueKey] = {
|
|
528
|
-
orderNo: detail === null || detail === void 0 ? void 0 : detail.sourceBillNo,
|
|
529
|
-
orders: detail === null || detail === void 0 ? void 0 : detail.systemOrders,
|
|
530
|
-
selectIds: [],
|
|
531
|
-
showOrderInfo: detail === null || detail === void 0 ? void 0 : detail.systemOrders.map(function (item) {
|
|
532
|
-
return {
|
|
533
|
-
billNo: item.billNo,
|
|
534
|
-
billType: item.billType,
|
|
535
|
-
billTag: item.billTag
|
|
536
|
-
};
|
|
537
|
-
})
|
|
538
|
-
};
|
|
370
|
+
case "SYSTEM_ORDER_NO":
|
|
371
|
+
prv[uniqueKey] = detail["sid"];
|
|
539
372
|
break;
|
|
540
373
|
case "BS_SIGNING_TIME":
|
|
541
|
-
prv[uniqueKey] = detail === null ||
|
|
374
|
+
prv[uniqueKey] = (_detail$bsOrder2 = detail["bsOrder"]) === null || _detail$bsOrder2 === void 0 ? void 0 : _detail$bsOrder2.receiptDate;
|
|
542
375
|
break;
|
|
543
376
|
case "BS_SEND_TIME":
|
|
544
|
-
prv[uniqueKey] =
|
|
377
|
+
prv[uniqueKey] = (_detail$bsOrder3 = detail["bsOrder"]) === null || _detail$bsOrder3 === void 0 ? void 0 : (_detail$bsOrder3$orde = _detail$bsOrder3.orders[0]) === null || _detail$bsOrder3$orde === void 0 ? void 0 : (_detail$bsOrder3$orde2 = _detail$bsOrder3$orde.advancedDistributionInfos) === null || _detail$bsOrder3$orde2 === void 0 ? void 0 : (_detail$bsOrder3$orde3 = _detail$bsOrder3$orde2[0]) === null || _detail$bsOrder3$orde3 === void 0 ? void 0 : _detail$bsOrder3$orde3.deliveryDate;
|
|
545
378
|
break;
|
|
546
379
|
case "BS_TRADE_PAYMENT_TIME":
|
|
547
|
-
prv[uniqueKey] = detail === null ||
|
|
380
|
+
prv[uniqueKey] = (_detail$bsOrder4 = detail["bsOrder"]) === null || _detail$bsOrder4 === void 0 ? void 0 : _detail$bsOrder4.payDate;
|
|
548
381
|
break;
|
|
549
382
|
case "BS_DEPOSIT":
|
|
550
|
-
prv[uniqueKey] = detail === null ||
|
|
383
|
+
prv[uniqueKey] = (_detail$bsOrder5 = detail["bsOrder"]) === null || _detail$bsOrder5 === void 0 ? void 0 : _detail$bsOrder5.amountPaid;
|
|
551
384
|
break;
|
|
552
385
|
case "BS_NET_RECEIPTS":
|
|
553
|
-
prv[uniqueKey] = detail === null ||
|
|
386
|
+
prv[uniqueKey] = (_detail$bsOrder6 = detail["bsOrder"]) === null || _detail$bsOrder6 === void 0 ? void 0 : _detail$bsOrder6.merchantRealIncome;
|
|
554
387
|
break;
|
|
555
388
|
case "BS_PACKAGE_WEIGHT":
|
|
556
|
-
weight = ((detail === null ||
|
|
389
|
+
weight = (((_detail$bsOrder7 = detail["bsOrder"]) === null || _detail$bsOrder7 === void 0 ? void 0 : _detail$bsOrder7.orders) || []).reduce(function (prv, next) {
|
|
557
390
|
var number = ((next === null || next === void 0 ? void 0 : next.advancedDistributionInfos) || []).reduce(function (p, n) {
|
|
558
391
|
p += n.orderWeight || 0;
|
|
559
392
|
return p;
|
|
@@ -565,13 +398,13 @@ export var bsOrderBackFormValues = function bsOrderBackFormValues() {
|
|
|
565
398
|
break;
|
|
566
399
|
case "BS_GOODS":
|
|
567
400
|
prv[uniqueKey] = {
|
|
568
|
-
shopCode: detail === null ||
|
|
569
|
-
bsGoods: updateBsGoodsHandle(detail === null ||
|
|
401
|
+
shopCode: (_detail$bsOrder8 = detail["bsOrder"]) === null || _detail$bsOrder8 === void 0 ? void 0 : _detail$bsOrder8.shopCode,
|
|
402
|
+
bsGoods: updateBsGoodsHandle((_detail$bsOrder9 = detail["bsOrder"]) === null || _detail$bsOrder9 === void 0 ? void 0 : _detail$bsOrder9.orders)
|
|
570
403
|
};
|
|
571
404
|
break;
|
|
572
405
|
case "BS_EXCHANGE_GOODS":
|
|
573
406
|
prv[uniqueKey] = {
|
|
574
|
-
shopCode: detail === null ||
|
|
407
|
+
shopCode: (_detail$bsOrder10 = detail["bsOrder"]) === null || _detail$bsOrder10 === void 0 ? void 0 : _detail$bsOrder10.shopCode,
|
|
575
408
|
bsExchangeType: [],
|
|
576
409
|
bsExchangeReturnGoods: [],
|
|
577
410
|
bsExchangeSwapOutGoods: [],
|
|
@@ -580,16 +413,16 @@ export var bsOrderBackFormValues = function bsOrderBackFormValues() {
|
|
|
580
413
|
break;
|
|
581
414
|
case "BS_REISSUE_GOODS":
|
|
582
415
|
prv[uniqueKey] = {
|
|
583
|
-
shopCode: detail === null ||
|
|
416
|
+
shopCode: (_detail$bsOrder11 = detail["bsOrder"]) === null || _detail$bsOrder11 === void 0 ? void 0 : _detail$bsOrder11.shopCode,
|
|
584
417
|
bsReissueType: [],
|
|
585
418
|
bsReissueGoods: []
|
|
586
419
|
};
|
|
587
420
|
break;
|
|
588
421
|
case "BS_LOGISTICS":
|
|
589
|
-
prv[uniqueKey] = updateBsItemListHandle(detail === null ||
|
|
422
|
+
prv[uniqueKey] = updateBsItemListHandle((_detail$bsOrder12 = detail["bsOrder"]) === null || _detail$bsOrder12 === void 0 ? void 0 : _detail$bsOrder12.orders, "logistics", config);
|
|
590
423
|
break;
|
|
591
424
|
case "BS_SEND_GOOD":
|
|
592
|
-
prv[uniqueKey] = updateBsItemListHandle(detail === null ||
|
|
425
|
+
prv[uniqueKey] = updateBsItemListHandle((_detail$bsOrder13 = detail["bsOrder"]) === null || _detail$bsOrder13 === void 0 ? void 0 : _detail$bsOrder13.orders, "send", config);
|
|
593
426
|
break;
|
|
594
427
|
case "BS_POSTING":
|
|
595
428
|
if (advItem !== null && advItem !== void 0 && advItem.provinceId) {
|
|
@@ -608,4 +441,4 @@ export var bsOrderBackFormValues = function bsOrderBackFormValues() {
|
|
|
608
441
|
}
|
|
609
442
|
return prv;
|
|
610
443
|
}, {});
|
|
611
|
-
};
|
|
444
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-utils",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.15-alpha.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"gitHooks": {
|
|
43
43
|
"pre-commit": "lint-staged"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "7dfa5c1a4e86ef9ab482cd3dd611eb41e7ac2400"
|
|
46
46
|
}
|