@kmkf-fe-packages/services-components 0.23.1-beta.1 → 0.23.1-beta.10
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/README.md +1 -1
- package/dist/esm/components/BS/BsLogistics/index.js +5 -4
- package/dist/esm/components/BS/BsReissue/index.d.ts +2 -1
- package/dist/esm/components/BS/BsReissue/index.js +14 -7
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +7 -6
- package/dist/esm/components/BS/BsSystemOrder/index.js +22 -19
- package/dist/esm/components/BS/DeliveryNo/index.d.ts +6 -5
- package/dist/esm/components/BS/DeliveryNo/index.js +15 -12
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
- package/dist/esm/components/BS/common/BsMemo.js +16 -15
- package/dist/esm/components/BS/common/BsType.d.ts +4 -4
- package/dist/esm/components/BS/common/BsType.js +14 -13
- package/dist/esm/components/Common/index.d.ts +2 -1
- package/dist/esm/components/Common/index.js +182 -68
- package/dist/esm/components/CommonHeaderGood/index.d.ts +27 -0
- package/dist/esm/components/CommonHeaderGood/index.js +187 -0
- package/dist/esm/components/CommonMultiStatus/index.d.ts +6 -5
- package/dist/esm/components/CommonMultiStatus/index.js +58 -51
- package/dist/esm/components/CommonSystemOrder/index.d.ts +6 -5
- package/dist/esm/components/CommonSystemOrder/index.js +29 -26
- package/dist/esm/components/FlowMarkSelect/index.js +3 -2
- package/dist/esm/components/FlowStatusSelect/index.js +1 -0
- package/dist/esm/components/FlowTag/index.js +1 -1
- package/dist/esm/components/FlowWorkOrderStatus/index.d.ts +40 -0
- package/dist/esm/components/FlowWorkOrderStatus/index.js +143 -0
- package/dist/esm/components/Input/index.d.ts +7 -6
- package/dist/esm/components/Input/index.js +37 -26
- package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -0
- package/dist/esm/components/JST/JstLogistics/index.js +21 -7
- package/dist/esm/components/Logistics/index.d.ts +6 -6
- package/dist/esm/components/Logistics/index.js +16 -15
- package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +48 -0
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +119 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.d.ts +34 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.js +98 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.d.ts +40 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.js +95 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.d.ts +32 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.js +74 -0
- package/dist/esm/components/NodeInput/index.d.ts +24 -0
- package/dist/esm/components/NodeInput/index.js +58 -0
- package/dist/esm/components/Payment/index.d.ts +12 -12
- package/dist/esm/components/Payment/index.js +11 -12
- package/dist/esm/components/TradeId/index.d.ts +1 -1
- package/dist/esm/components/TradeId/index.js +2 -2
- package/dist/esm/components/WDT/WdtGoods/index.d.ts +33 -0
- package/dist/esm/components/WDT/WdtGoods/index.js +121 -0
- package/dist/esm/constant.d.ts +1 -0
- package/dist/esm/constant.js +8 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +30 -3
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/type.d.ts +13 -13
- package/package.json +4 -4
|
@@ -358,78 +358,192 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
358
358
|
var list = _ref11.list,
|
|
359
359
|
showHeader = _ref11.showHeader,
|
|
360
360
|
_ref11$text = _ref11.text,
|
|
361
|
-
text = _ref11$text === void 0 ? '' : _ref11$text
|
|
361
|
+
text = _ref11$text === void 0 ? '' : _ref11$text,
|
|
362
|
+
type = _ref11.type;
|
|
362
363
|
//商品信息
|
|
363
|
-
|
|
364
|
+
|
|
365
|
+
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
364
366
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
365
|
-
return
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
367
|
+
return function (type) {
|
|
368
|
+
var columns = [];
|
|
369
|
+
switch (type) {
|
|
370
|
+
case 'WDT_REISSUE_GOODS':
|
|
371
|
+
case 'WDT_GOODS':
|
|
372
|
+
columns = [{
|
|
373
|
+
dataIndex: 'goodId',
|
|
374
|
+
title: "SPUID",
|
|
375
|
+
align: 'center',
|
|
376
|
+
ellipsis: true,
|
|
377
|
+
width: 70
|
|
378
|
+
}, {
|
|
379
|
+
dataIndex: 'goodNo',
|
|
380
|
+
title: "SPU\u5546\u54C1\u7F16\u7801",
|
|
381
|
+
align: 'center',
|
|
382
|
+
ellipsis: true,
|
|
383
|
+
width: 100
|
|
384
|
+
}, {
|
|
385
|
+
dataIndex: 'specId',
|
|
386
|
+
title: "".concat(text, "SKUID"),
|
|
387
|
+
align: 'center',
|
|
388
|
+
ellipsis: true,
|
|
389
|
+
width: 100
|
|
390
|
+
}, {
|
|
391
|
+
dataIndex: 'goodName',
|
|
392
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
393
|
+
align: 'center',
|
|
394
|
+
ellipsis: true,
|
|
395
|
+
width: 250
|
|
396
|
+
}, {
|
|
397
|
+
dataIndex: 'specNo',
|
|
398
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
399
|
+
align: 'center',
|
|
400
|
+
ellipsis: true,
|
|
401
|
+
width: 100
|
|
402
|
+
}, {
|
|
403
|
+
dataIndex: 'specName',
|
|
404
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
405
|
+
align: 'center',
|
|
406
|
+
ellipsis: true,
|
|
407
|
+
width: 250
|
|
408
|
+
}, {
|
|
409
|
+
dataIndex: 'imgUrl',
|
|
410
|
+
title: "\u56FE\u7247",
|
|
411
|
+
align: 'center',
|
|
412
|
+
ellipsis: true,
|
|
413
|
+
width: 100,
|
|
414
|
+
render: function render(val) {
|
|
415
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
416
|
+
width: 60,
|
|
417
|
+
src: val
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
}, {
|
|
421
|
+
dataIndex: 'orderPrice',
|
|
422
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
423
|
+
align: 'center',
|
|
424
|
+
ellipsis: true,
|
|
425
|
+
width: 100
|
|
426
|
+
}, {
|
|
427
|
+
dataIndex: 'num',
|
|
428
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
429
|
+
align: 'center',
|
|
430
|
+
ellipsis: true,
|
|
431
|
+
width: 100
|
|
432
|
+
},
|
|
433
|
+
// {
|
|
434
|
+
// dataIndex: 'actualNum',
|
|
435
|
+
// title: `${text}实发数量`,
|
|
436
|
+
// align: 'center',
|
|
437
|
+
// ellipsis: true,
|
|
438
|
+
// width: 100,
|
|
439
|
+
// },
|
|
440
|
+
{
|
|
441
|
+
dataIndex: 'sharePrice',
|
|
442
|
+
title: "\u5206\u644A\u4EF7",
|
|
443
|
+
align: 'center',
|
|
444
|
+
ellipsis: true,
|
|
445
|
+
width: 70
|
|
446
|
+
}, {
|
|
447
|
+
dataIndex: 'giftType',
|
|
448
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
449
|
+
align: 'center',
|
|
450
|
+
ellipsis: true,
|
|
451
|
+
width: 100,
|
|
452
|
+
render: function render(val) {
|
|
453
|
+
var giftTypeMap = {
|
|
454
|
+
0: '非赠品',
|
|
455
|
+
1: '自动赠送',
|
|
456
|
+
2: '手工赠送',
|
|
457
|
+
3: '回购自动送赠品',
|
|
458
|
+
4: '前N有礼送赠品',
|
|
459
|
+
6: '天猫优仓赠品',
|
|
460
|
+
7: '淘宝CRM会员送赠'
|
|
461
|
+
};
|
|
462
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
463
|
+
}
|
|
464
|
+
}];
|
|
465
|
+
break;
|
|
466
|
+
default:
|
|
467
|
+
columns = [{
|
|
468
|
+
dataIndex: 'mark',
|
|
469
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
470
|
+
align: 'center',
|
|
471
|
+
ellipsis: true,
|
|
472
|
+
width: 100
|
|
473
|
+
}, {
|
|
474
|
+
dataIndex: 'skuName',
|
|
475
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
476
|
+
align: 'center',
|
|
477
|
+
ellipsis: true,
|
|
478
|
+
width: 200
|
|
479
|
+
}, {
|
|
480
|
+
dataIndex: 'sku',
|
|
481
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
482
|
+
align: 'center',
|
|
483
|
+
ellipsis: true,
|
|
484
|
+
width: 100
|
|
485
|
+
}, {
|
|
486
|
+
dataIndex: 'name',
|
|
487
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
488
|
+
align: 'center',
|
|
489
|
+
ellipsis: true,
|
|
490
|
+
width: 200
|
|
491
|
+
}, {
|
|
492
|
+
dataIndex: 'pic',
|
|
493
|
+
title: "\u56FE\u7247",
|
|
494
|
+
align: 'center',
|
|
495
|
+
ellipsis: true,
|
|
496
|
+
width: 100,
|
|
497
|
+
render: function render(val) {
|
|
498
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
499
|
+
width: 60,
|
|
500
|
+
src: val
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
}, {
|
|
504
|
+
dataIndex: 'code',
|
|
505
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
506
|
+
align: 'center',
|
|
507
|
+
ellipsis: true,
|
|
508
|
+
width: 100
|
|
509
|
+
}, {
|
|
510
|
+
dataIndex: 'money',
|
|
511
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
512
|
+
align: 'center',
|
|
513
|
+
ellipsis: true,
|
|
514
|
+
width: 100
|
|
515
|
+
}, {
|
|
516
|
+
dataIndex: 'number',
|
|
517
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
518
|
+
align: 'center',
|
|
519
|
+
ellipsis: true,
|
|
520
|
+
width: 100
|
|
521
|
+
}, {
|
|
522
|
+
dataIndex: 'share',
|
|
523
|
+
title: "\u5206\u644A\u4EF7",
|
|
524
|
+
align: 'center',
|
|
525
|
+
ellipsis: true,
|
|
526
|
+
width: 70
|
|
527
|
+
}, {
|
|
528
|
+
dataIndex: 'type',
|
|
529
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
530
|
+
align: 'center',
|
|
531
|
+
ellipsis: true,
|
|
532
|
+
width: 100
|
|
533
|
+
}];
|
|
400
534
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
410
|
-
align: 'center',
|
|
411
|
-
ellipsis: true,
|
|
412
|
-
width: 100
|
|
413
|
-
}, {
|
|
414
|
-
dataIndex: 'number',
|
|
415
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
416
|
-
align: 'center',
|
|
417
|
-
ellipsis: true,
|
|
418
|
-
width: 100
|
|
419
|
-
}, {
|
|
420
|
-
dataIndex: 'share',
|
|
421
|
-
title: "\u5206\u644A\u4EF7",
|
|
422
|
-
align: 'center',
|
|
423
|
-
ellipsis: true,
|
|
424
|
-
width: 70
|
|
425
|
-
}, {
|
|
426
|
-
dataIndex: 'type',
|
|
427
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
428
|
-
align: 'center',
|
|
429
|
-
ellipsis: true,
|
|
430
|
-
width: 100
|
|
431
|
-
}];
|
|
535
|
+
return columns;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
//商品信息
|
|
539
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
540
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
541
|
+
var COLUMNS_INFO = COLUMNS_MAP(text);
|
|
542
|
+
return COLUMNS_INFO(type);
|
|
432
543
|
};
|
|
544
|
+
// const GOODS_INFO_COLUMNS = (text = '') => {
|
|
545
|
+
// return
|
|
546
|
+
// }
|
|
433
547
|
var newColumns = useMemo(function () {
|
|
434
548
|
var columnList = [{
|
|
435
549
|
dataIndex: '',
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class CommonHeaderGoods implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
itemKey: any;
|
|
17
|
+
constructor(options: PickOption);
|
|
18
|
+
getParentId: () => string;
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
21
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
22
|
+
getComponentValue: (r: Record) => any;
|
|
23
|
+
renderExport: (value: string, record: Record) => any;
|
|
24
|
+
editRender: () => null;
|
|
25
|
+
filterConfig: () => never[];
|
|
26
|
+
}
|
|
27
|
+
export default CommonHeaderGoods;
|
|
@@ -0,0 +1,187 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
+
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."); }
|
|
6
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
import React from "react";
|
|
21
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
22
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
|
+
import { BsHeaderPic, BsHeaderChild } from "../BS/common";
|
|
24
|
+
var GoodHeaderMap = {
|
|
25
|
+
"WDT_GOODS": {
|
|
26
|
+
headerMap: {
|
|
27
|
+
goodId: {
|
|
28
|
+
component: BsHeaderChild,
|
|
29
|
+
name: "SPUID",
|
|
30
|
+
key: "goodId",
|
|
31
|
+
width: 140
|
|
32
|
+
},
|
|
33
|
+
goodNo: {
|
|
34
|
+
component: BsHeaderChild,
|
|
35
|
+
name: "SPU商品编码",
|
|
36
|
+
key: "goodNo",
|
|
37
|
+
width: 200
|
|
38
|
+
},
|
|
39
|
+
imgUrl: {
|
|
40
|
+
component: BsHeaderPic,
|
|
41
|
+
name: "图片",
|
|
42
|
+
key: "imgUrl",
|
|
43
|
+
width: 70
|
|
44
|
+
},
|
|
45
|
+
specId: {
|
|
46
|
+
component: BsHeaderChild,
|
|
47
|
+
name: "SKUID",
|
|
48
|
+
key: "specId",
|
|
49
|
+
width: 200
|
|
50
|
+
},
|
|
51
|
+
goodName: {
|
|
52
|
+
component: BsHeaderChild,
|
|
53
|
+
name: "商品名称",
|
|
54
|
+
key: "goodName",
|
|
55
|
+
width: 100
|
|
56
|
+
},
|
|
57
|
+
specNo: {
|
|
58
|
+
component: BsHeaderChild,
|
|
59
|
+
name: "sku编码",
|
|
60
|
+
key: "specNo",
|
|
61
|
+
width: 140
|
|
62
|
+
},
|
|
63
|
+
specName: {
|
|
64
|
+
component: BsHeaderChild,
|
|
65
|
+
name: "sku名称",
|
|
66
|
+
key: "specName",
|
|
67
|
+
width: 140
|
|
68
|
+
},
|
|
69
|
+
orderPrice: {
|
|
70
|
+
component: BsHeaderChild,
|
|
71
|
+
name: "实付金额",
|
|
72
|
+
key: "orderPrice",
|
|
73
|
+
width: 100
|
|
74
|
+
},
|
|
75
|
+
sharePrice: {
|
|
76
|
+
component: BsHeaderChild,
|
|
77
|
+
name: "分摊价",
|
|
78
|
+
key: "sharePrice",
|
|
79
|
+
width: 120
|
|
80
|
+
},
|
|
81
|
+
giftType: {
|
|
82
|
+
component: BsHeaderChild,
|
|
83
|
+
name: "赠品类型",
|
|
84
|
+
key: "giftType",
|
|
85
|
+
width: 150
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
itemKey: {
|
|
89
|
+
goodId: "SPUID",
|
|
90
|
+
goodNo: "SPU商品编码",
|
|
91
|
+
specId: "SKUID",
|
|
92
|
+
goodName: "商品名称",
|
|
93
|
+
specNo: "sku编码",
|
|
94
|
+
specName: "sku名称",
|
|
95
|
+
orderPrice: "实付金额",
|
|
96
|
+
num: "数量",
|
|
97
|
+
sharePrice: "分摊价",
|
|
98
|
+
giftType: "赠品类型"
|
|
99
|
+
},
|
|
100
|
+
moneyKey: "orderPrice"
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
GoodHeaderMap['WDT_REISSUE_GOODS'] = GoodHeaderMap['WDT_GOODS'];
|
|
104
|
+
var CommonHeaderGoods = /*#__PURE__*/_createClass(function CommonHeaderGoods(options) {
|
|
105
|
+
var _this = this,
|
|
106
|
+
_GoodHeaderMap$this$t;
|
|
107
|
+
_classCallCheck(this, CommonHeaderGoods);
|
|
108
|
+
_defineProperty(this, "name", void 0);
|
|
109
|
+
_defineProperty(this, "id", void 0);
|
|
110
|
+
_defineProperty(this, "sortField", void 0);
|
|
111
|
+
_defineProperty(this, "type", void 0);
|
|
112
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
113
|
+
_defineProperty(this, "align", void 0);
|
|
114
|
+
_defineProperty(this, "width", void 0);
|
|
115
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
116
|
+
_defineProperty(this, "formField", void 0);
|
|
117
|
+
_defineProperty(this, "canSort", void 0);
|
|
118
|
+
_defineProperty(this, "children", void 0);
|
|
119
|
+
_defineProperty(this, "dataType", void 0);
|
|
120
|
+
_defineProperty(this, "itemKey", void 0);
|
|
121
|
+
_defineProperty(this, "getParentId", function () {
|
|
122
|
+
var _this$id$split = _this.id.split("_"),
|
|
123
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
124
|
+
key = _this$id$split2[0],
|
|
125
|
+
name = _this$id$split2[1],
|
|
126
|
+
code = _this$id$split2[2];
|
|
127
|
+
return "".concat(key, "_").concat(name);
|
|
128
|
+
});
|
|
129
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
130
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
131
|
+
id: _this.id,
|
|
132
|
+
label: _this.name,
|
|
133
|
+
value: _this.getComponentValue(record)
|
|
134
|
+
}) : null;
|
|
135
|
+
});
|
|
136
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
137
|
+
var _this$getComponentVal;
|
|
138
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
139
|
+
});
|
|
140
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
141
|
+
var id = _this.getParentId();
|
|
142
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
143
|
+
return _this.renderPc(undefined, r);
|
|
144
|
+
});
|
|
145
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
146
|
+
var id = _this.getParentId();
|
|
147
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
148
|
+
next[GoodHeaderMap[_this.type].moneyKey] && prv.push(next[GoodHeaderMap[_this.type].moneyKey]);
|
|
149
|
+
return prv;
|
|
150
|
+
}, []);
|
|
151
|
+
return list.join(",");
|
|
152
|
+
});
|
|
153
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
154
|
+
var _this$getComponentVal2;
|
|
155
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
156
|
+
});
|
|
157
|
+
_defineProperty(this, "editRender", function () {
|
|
158
|
+
return null;
|
|
159
|
+
});
|
|
160
|
+
_defineProperty(this, "filterConfig", function () {
|
|
161
|
+
return [];
|
|
162
|
+
});
|
|
163
|
+
this.name = options.name;
|
|
164
|
+
this.id = options.id;
|
|
165
|
+
this.sortField = options.id;
|
|
166
|
+
this.formField = options.id;
|
|
167
|
+
this.type = options.type;
|
|
168
|
+
this.componentConfig = options.componentConfig;
|
|
169
|
+
this.align = "left";
|
|
170
|
+
this.width = 200;
|
|
171
|
+
this.isCombinationComponent = true;
|
|
172
|
+
this.canSort = false;
|
|
173
|
+
this.dataType = "string";
|
|
174
|
+
this.itemKey = (_GoodHeaderMap$this$t = GoodHeaderMap[this.type]) === null || _GoodHeaderMap$this$t === void 0 ? void 0 : _GoodHeaderMap$this$t.itemKey;
|
|
175
|
+
this.children = _toConsumableArray(Object.keys(GoodHeaderMap[this.type].headerMap).reduce(function (prv, key) {
|
|
176
|
+
var _options$componentCon, _options$componentCon2;
|
|
177
|
+
if (options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && (_options$componentCon2 = _options$componentCon.showHeader) !== null && _options$componentCon2 !== void 0 && _options$componentCon2.includes(key)) {
|
|
178
|
+
prv.push(new GoodHeaderMap[_this.type].headerMap[key].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
179
|
+
name: _this.itemKey[key],
|
|
180
|
+
id: "".concat(options.id, "_").concat(GoodHeaderMap[_this.type].headerMap[key].key),
|
|
181
|
+
width: GoodHeaderMap[_this.type].headerMap[key].width
|
|
182
|
+
})));
|
|
183
|
+
}
|
|
184
|
+
return prv;
|
|
185
|
+
}, []));
|
|
186
|
+
});
|
|
187
|
+
export default CommonHeaderGoods;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class CommonMultiStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
10
|
align: ALignType;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -25,7 +25,7 @@ declare class CommonMultiStatus implements ComponentInterface {
|
|
|
25
25
|
type: string;
|
|
26
26
|
id: string;
|
|
27
27
|
name: string;
|
|
28
|
-
filterComponentType: "MultipleSelect" | "
|
|
28
|
+
filterComponentType: "MultipleSelect" | "SelectInput";
|
|
29
29
|
props: {
|
|
30
30
|
options: any[] | undefined;
|
|
31
31
|
fieldNames: {
|
|
@@ -34,6 +34,7 @@ declare class CommonMultiStatus implements ComponentInterface {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
37
|
+
formatFilterValue: ((value: any) => any) | null;
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
export default CommonMultiStatus;
|