@kmkf-fe-packages/services-components 2.0.54-beta.0 → 2.0.54-beta.2
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/components/Common/constants/columnsBaseInfoMap.js +7 -6
- package/dist/esm/components/Common/index.js +7 -5
- package/dist/esm/components/CommonHeaderGood/index.js +110 -95
- package/dist/esm/components/GY/GyReissue/index.js +6 -20
- package/dist/esm/components/GY/GyReturn/index.js +6 -20
- package/dist/esm/components/PicturePro/PictureUrl.d.ts +0 -1
- package/dist/esm/components/PicturePro/PictureUrl.js +0 -3
- package/dist/esm/components/Public/ReissueGoods/index.d.ts +1 -1
- package/dist/esm/components/Public/ReissueGoods/index.js +25 -52
- package/package.json +4 -4
|
@@ -7,9 +7,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
7
7
|
import system from "./system";
|
|
8
8
|
import bs_e3 from "./bs_e3";
|
|
9
9
|
import bs from "./bs";
|
|
10
|
-
import
|
|
11
|
-
import gy from "./gy";
|
|
12
|
-
import { getJstColumns, getWlnColumns } from "@kmkf-fe-packages/basic-components";
|
|
10
|
+
import { getJstColumns, getWlnColumns, getGyColumns, getWdtColumns } from "@kmkf-fe-packages/basic-components";
|
|
13
11
|
import defaultColumns from "./defaultColumns";
|
|
14
12
|
export var getColumnsMap = function getColumnsMap(args) {
|
|
15
13
|
var _ref = args || {},
|
|
@@ -17,9 +15,12 @@ export var getColumnsMap = function getColumnsMap(args) {
|
|
|
17
15
|
text = _ref$text === void 0 ? "" : _ref$text;
|
|
18
16
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, system()), bs({
|
|
19
17
|
text: text
|
|
20
|
-
})), bs_e3()),
|
|
21
|
-
text: text
|
|
22
|
-
|
|
18
|
+
})), bs_e3()), getWdtColumns({
|
|
19
|
+
text: text,
|
|
20
|
+
disabled: true
|
|
21
|
+
})), getGyColumns({
|
|
22
|
+
disabled: true
|
|
23
|
+
})), getJstColumns({
|
|
23
24
|
disabled: true
|
|
24
25
|
})), getWlnColumns({
|
|
25
26
|
text: text
|
|
@@ -480,16 +480,18 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
|
480
480
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
481
481
|
if (isStringArray) {
|
|
482
482
|
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
483
|
-
return showHeader.includes(col.dataIndex);
|
|
483
|
+
return showHeader.includes(col.dataIndex) || (col === null || col === void 0 ? void 0 : col.validator);
|
|
484
484
|
});
|
|
485
485
|
} else if (isObjectArray) {
|
|
486
|
-
baseInfoColumns = showHeader.
|
|
487
|
-
return col.show !== false;
|
|
488
|
-
}).map(function (col) {
|
|
486
|
+
baseInfoColumns = showHeader.map(function (col) {
|
|
489
487
|
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
490
488
|
return item.dataIndex === col.dataIndex;
|
|
491
489
|
});
|
|
492
|
-
|
|
490
|
+
// 如果列应该显示(show不为false)或者有验证器,则返回对应的列配置
|
|
491
|
+
if (currentCol && (col.show !== false || currentCol !== null && currentCol !== void 0 && currentCol.validator)) {
|
|
492
|
+
return currentCol;
|
|
493
|
+
}
|
|
494
|
+
return undefined;
|
|
493
495
|
}).filter(Boolean);
|
|
494
496
|
}
|
|
495
497
|
var columnList = [{
|
|
@@ -1,10 +1,6 @@
|
|
|
1
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
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
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
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
5
|
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
6
|
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); }
|
|
@@ -22,6 +18,7 @@ import ItemView from "../../commonComponents/ItemView";
|
|
|
22
18
|
import { isNull, BS_E3_BOOLEAN_STATUS_MAP } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
19
|
import { BsHeaderPic, BsHeaderChild } from "../BS/common";
|
|
24
20
|
import ReissueGift from "../BsE3/ReissueGift";
|
|
21
|
+
import { erpColumnsMap } from "@kmkf-fe-packages/basic-components";
|
|
25
22
|
var GoodHeaderMap = {
|
|
26
23
|
WDT_GOODS: {
|
|
27
24
|
headerMap: {
|
|
@@ -880,36 +877,36 @@ var GoodHeaderMap = {
|
|
|
880
877
|
iId: "款式编码",
|
|
881
878
|
pic: {
|
|
882
879
|
component: BsHeaderPic,
|
|
883
|
-
name:
|
|
880
|
+
name: "商品图片"
|
|
884
881
|
},
|
|
885
882
|
propertiesValue: "规格值",
|
|
886
883
|
saleBasePrice: {
|
|
887
884
|
name: "原价",
|
|
888
885
|
transformValue: function transformValue(price) {
|
|
889
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
886
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
890
887
|
},
|
|
891
888
|
renderExport: function renderExport(price) {
|
|
892
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
889
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
893
890
|
}
|
|
894
891
|
},
|
|
895
892
|
salePrice: {
|
|
896
893
|
name: "单价",
|
|
897
894
|
transformValue: function transformValue(price) {
|
|
898
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
895
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
899
896
|
},
|
|
900
897
|
renderExport: function renderExport(price) {
|
|
901
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
898
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
902
899
|
}
|
|
903
900
|
},
|
|
904
901
|
qty: "数量",
|
|
905
902
|
saleAmount: {
|
|
906
903
|
name: "总金额",
|
|
907
904
|
transformValue: function transformValue(val, record, parentName) {
|
|
908
|
-
if (!record) return
|
|
905
|
+
if (!record) return "--";
|
|
909
906
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
910
907
|
},
|
|
911
908
|
renderExport: function renderExport(val, record, parentName) {
|
|
912
|
-
if (!record) return
|
|
909
|
+
if (!record) return "--";
|
|
913
910
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
914
911
|
}
|
|
915
912
|
},
|
|
@@ -917,10 +914,10 @@ var GoodHeaderMap = {
|
|
|
917
914
|
isGift: {
|
|
918
915
|
name: "是否赠品",
|
|
919
916
|
transformValue: function transformValue(val) {
|
|
920
|
-
return typeof val !==
|
|
917
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
921
918
|
},
|
|
922
919
|
renderExport: function renderExport(val) {
|
|
923
|
-
return typeof val !==
|
|
920
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
924
921
|
}
|
|
925
922
|
},
|
|
926
923
|
outerOiId: "子订单号"
|
|
@@ -934,35 +931,35 @@ var GoodHeaderMap = {
|
|
|
934
931
|
iId: "款式编码",
|
|
935
932
|
pic: {
|
|
936
933
|
component: BsHeaderPic,
|
|
937
|
-
name:
|
|
934
|
+
name: "商品图片"
|
|
938
935
|
},
|
|
939
936
|
propertiesValue: "规格值",
|
|
940
937
|
saleBasePrice: {
|
|
941
938
|
name: "原价",
|
|
942
939
|
transformValue: function transformValue(price) {
|
|
943
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
940
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
944
941
|
},
|
|
945
942
|
renderExport: function renderExport(price) {
|
|
946
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
943
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
947
944
|
}
|
|
948
945
|
},
|
|
949
946
|
salePrice: {
|
|
950
947
|
name: "单价",
|
|
951
948
|
transformValue: function transformValue(price) {
|
|
952
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
949
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
953
950
|
},
|
|
954
951
|
renderExport: function renderExport(price) {
|
|
955
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
952
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
956
953
|
}
|
|
957
954
|
},
|
|
958
955
|
qty: "数量",
|
|
959
956
|
isGift: {
|
|
960
957
|
name: "是否赠品",
|
|
961
958
|
transformValue: function transformValue(val) {
|
|
962
|
-
return typeof val !==
|
|
959
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
963
960
|
},
|
|
964
961
|
renderExport: function renderExport(val) {
|
|
965
|
-
return typeof val !==
|
|
962
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
966
963
|
}
|
|
967
964
|
},
|
|
968
965
|
remark: "备注"
|
|
@@ -976,36 +973,36 @@ var GoodHeaderMap = {
|
|
|
976
973
|
iId: "款式编码",
|
|
977
974
|
pic: {
|
|
978
975
|
component: BsHeaderPic,
|
|
979
|
-
name:
|
|
976
|
+
name: "商品图片"
|
|
980
977
|
},
|
|
981
978
|
propertiesValue: "规格值",
|
|
982
979
|
saleBasePrice: {
|
|
983
980
|
name: "原价",
|
|
984
981
|
transformValue: function transformValue(price) {
|
|
985
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
982
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
986
983
|
},
|
|
987
984
|
renderExport: function renderExport(price) {
|
|
988
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
985
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
989
986
|
}
|
|
990
987
|
},
|
|
991
988
|
salePrice: {
|
|
992
989
|
name: "单价",
|
|
993
990
|
transformValue: function transformValue(price) {
|
|
994
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
991
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
995
992
|
},
|
|
996
993
|
renderExport: function renderExport(price) {
|
|
997
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
994
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
998
995
|
}
|
|
999
996
|
},
|
|
1000
997
|
qty: "数量",
|
|
1001
998
|
saleAmount: {
|
|
1002
999
|
name: "总金额",
|
|
1003
1000
|
transformValue: function transformValue(val, record, parentName) {
|
|
1004
|
-
if (!record) return
|
|
1001
|
+
if (!record) return "--";
|
|
1005
1002
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1006
1003
|
},
|
|
1007
1004
|
renderExport: function renderExport(val, record, parentName) {
|
|
1008
|
-
if (!record) return
|
|
1005
|
+
if (!record) return "--";
|
|
1009
1006
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1010
1007
|
}
|
|
1011
1008
|
},
|
|
@@ -1013,10 +1010,10 @@ var GoodHeaderMap = {
|
|
|
1013
1010
|
isGift: {
|
|
1014
1011
|
name: "是否赠品",
|
|
1015
1012
|
transformValue: function transformValue(val) {
|
|
1016
|
-
return typeof val !==
|
|
1013
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
1017
1014
|
},
|
|
1018
1015
|
renderExport: function renderExport(val) {
|
|
1019
|
-
return typeof val !==
|
|
1016
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
1020
1017
|
}
|
|
1021
1018
|
},
|
|
1022
1019
|
remark: "备注",
|
|
@@ -1031,46 +1028,46 @@ var GoodHeaderMap = {
|
|
|
1031
1028
|
iId: "款式编码",
|
|
1032
1029
|
pic: {
|
|
1033
1030
|
component: BsHeaderPic,
|
|
1034
|
-
name:
|
|
1031
|
+
name: "商品图片"
|
|
1035
1032
|
},
|
|
1036
1033
|
propertiesValue: "规格值",
|
|
1037
1034
|
saleBasePrice: {
|
|
1038
1035
|
name: "原价",
|
|
1039
1036
|
transformValue: function transformValue(price) {
|
|
1040
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1037
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
1041
1038
|
},
|
|
1042
1039
|
renderExport: function renderExport(price) {
|
|
1043
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1040
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
1044
1041
|
}
|
|
1045
1042
|
},
|
|
1046
1043
|
salePrice: {
|
|
1047
1044
|
name: "单价",
|
|
1048
1045
|
transformValue: function transformValue(price) {
|
|
1049
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1046
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
1050
1047
|
},
|
|
1051
1048
|
renderExport: function renderExport(price) {
|
|
1052
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1049
|
+
return price || price === 0 ? Number(price).toFixed(2) : "";
|
|
1053
1050
|
}
|
|
1054
1051
|
},
|
|
1055
1052
|
qty: "数量",
|
|
1056
1053
|
saleAmount: {
|
|
1057
1054
|
name: "总金额",
|
|
1058
1055
|
transformValue: function transformValue(val, record, parentName) {
|
|
1059
|
-
if (!record) return
|
|
1056
|
+
if (!record) return "--";
|
|
1060
1057
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1061
1058
|
},
|
|
1062
1059
|
renderExport: function renderExport(val, record, parentName) {
|
|
1063
|
-
if (!record) return
|
|
1060
|
+
if (!record) return "--";
|
|
1064
1061
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1065
1062
|
}
|
|
1066
1063
|
},
|
|
1067
1064
|
isGift: {
|
|
1068
1065
|
name: "是否赠品",
|
|
1069
1066
|
transformValue: function transformValue(val) {
|
|
1070
|
-
return typeof val !==
|
|
1067
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
1071
1068
|
},
|
|
1072
1069
|
renderExport: function renderExport(val) {
|
|
1073
|
-
return typeof val !==
|
|
1070
|
+
return typeof val !== "boolean" ? "" : val ? "是" : "否";
|
|
1074
1071
|
}
|
|
1075
1072
|
},
|
|
1076
1073
|
remark: "备注"
|
|
@@ -1080,73 +1077,73 @@ var GoodHeaderMap = {
|
|
|
1080
1077
|
WLN_GOODS: {
|
|
1081
1078
|
headerMap: {
|
|
1082
1079
|
wlnItemName: {
|
|
1083
|
-
name:
|
|
1080
|
+
name: "商品名称",
|
|
1084
1081
|
width: 250
|
|
1085
1082
|
},
|
|
1086
1083
|
goodsCode: {
|
|
1087
|
-
name:
|
|
1084
|
+
name: "商品编码",
|
|
1088
1085
|
width: 250
|
|
1089
1086
|
},
|
|
1090
1087
|
skuCode: {
|
|
1091
|
-
name:
|
|
1088
|
+
name: "sku编码",
|
|
1092
1089
|
width: 250
|
|
1093
1090
|
},
|
|
1094
1091
|
skuName: {
|
|
1095
|
-
name:
|
|
1092
|
+
name: "线上sku名称",
|
|
1096
1093
|
width: 250
|
|
1097
1094
|
},
|
|
1098
1095
|
olnSkuCode: {
|
|
1099
|
-
name:
|
|
1096
|
+
name: "线上sku编码",
|
|
1100
1097
|
width: 150
|
|
1101
1098
|
},
|
|
1102
1099
|
sku: {
|
|
1103
|
-
name:
|
|
1100
|
+
name: "线上sku id",
|
|
1104
1101
|
width: 150
|
|
1105
1102
|
},
|
|
1106
1103
|
name: {
|
|
1107
|
-
name:
|
|
1104
|
+
name: "线上商品名称",
|
|
1108
1105
|
width: 250
|
|
1109
1106
|
},
|
|
1110
1107
|
pic: {
|
|
1111
|
-
name:
|
|
1108
|
+
name: "线上图片",
|
|
1112
1109
|
width: 100,
|
|
1113
1110
|
component: BsHeaderPic
|
|
1114
1111
|
},
|
|
1115
1112
|
olnItemCOde: {
|
|
1116
|
-
name:
|
|
1113
|
+
name: "线上商品编码",
|
|
1117
1114
|
width: 150
|
|
1118
1115
|
},
|
|
1119
1116
|
code: {
|
|
1120
|
-
name:
|
|
1117
|
+
name: "线上商品id",
|
|
1121
1118
|
width: 150
|
|
1122
1119
|
},
|
|
1123
1120
|
barCode: {
|
|
1124
|
-
name:
|
|
1121
|
+
name: "商品条码",
|
|
1125
1122
|
width: 150
|
|
1126
1123
|
},
|
|
1127
1124
|
money: {
|
|
1128
|
-
name:
|
|
1125
|
+
name: "实付金额",
|
|
1129
1126
|
width: 100
|
|
1130
1127
|
},
|
|
1131
1128
|
number: {
|
|
1132
|
-
name:
|
|
1129
|
+
name: "数量",
|
|
1133
1130
|
width: 100
|
|
1134
1131
|
},
|
|
1135
|
-
share:
|
|
1132
|
+
share: "应收款",
|
|
1136
1133
|
type: {
|
|
1137
|
-
name:
|
|
1134
|
+
name: "赠品类型",
|
|
1138
1135
|
width: 100
|
|
1139
1136
|
},
|
|
1140
1137
|
isPackage: {
|
|
1141
1138
|
width: 100,
|
|
1142
1139
|
name: "是否组合商品",
|
|
1143
1140
|
transformValue: function transformValue(val) {
|
|
1144
|
-
if (isNull(val)) return
|
|
1145
|
-
return val ?
|
|
1141
|
+
if (isNull(val)) return "--";
|
|
1142
|
+
return val ? "是" : "否";
|
|
1146
1143
|
},
|
|
1147
1144
|
renderExport: function renderExport(val) {
|
|
1148
|
-
if (isNull(val)) return
|
|
1149
|
-
return val ?
|
|
1145
|
+
if (isNull(val)) return "--";
|
|
1146
|
+
return val ? "是" : "否";
|
|
1150
1147
|
}
|
|
1151
1148
|
}
|
|
1152
1149
|
},
|
|
@@ -1233,56 +1230,74 @@ var CommonHeaderGoods = /*#__PURE__*/function () {
|
|
|
1233
1230
|
value: function getChildren(options) {
|
|
1234
1231
|
var _options$componentCon,
|
|
1235
1232
|
_this2 = this;
|
|
1233
|
+
var initBaseInfoColumns = erpColumnsMap[this.type];
|
|
1236
1234
|
var showHeader = options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader;
|
|
1235
|
+
|
|
1236
|
+
// 提取公共的类型判断逻辑
|
|
1237
1237
|
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
1238
1238
|
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1239
|
+
|
|
1240
|
+
// 获取需要显示的列索引列表
|
|
1241
|
+
var getDataIndexList = function getDataIndexList() {
|
|
1242
|
+
if (isStringArray) {
|
|
1243
|
+
return showHeader;
|
|
1244
|
+
}
|
|
1245
|
+
if (isObjectArray) {
|
|
1246
|
+
return showHeader.filter(function (item) {
|
|
1247
|
+
var currentCol = initBaseInfoColumns.find(function (col) {
|
|
1248
|
+
return col.dataIndex === item.dataIndex;
|
|
1249
|
+
});
|
|
1250
|
+
return item.show !== false || (currentCol === null || currentCol === void 0 ? void 0 : currentCol.validator);
|
|
1251
|
+
}).map(function (item) {
|
|
1252
|
+
return item.dataIndex;
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1255
|
+
return [];
|
|
1256
|
+
};
|
|
1257
|
+
var dataIndexList = getDataIndexList();
|
|
1247
1258
|
var getKeyIndex = function getKeyIndex(id) {
|
|
1248
1259
|
return dataIndexList.indexOf(id.split("_").pop() || "");
|
|
1249
1260
|
};
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1261
|
+
|
|
1262
|
+
// 创建表头组件配置
|
|
1263
|
+
var createHeaderConfig = function createHeaderConfig(key) {
|
|
1264
|
+
var _this2$itemKey;
|
|
1265
|
+
var headerConfig = GoodHeaderMap[_this2.type].headerMap[key];
|
|
1266
|
+
var isStringConfig = typeof headerConfig === "string";
|
|
1267
|
+
return {
|
|
1268
|
+
component: isStringConfig ? BsHeaderChild : headerConfig.component || BsHeaderChild,
|
|
1269
|
+
name: isStringConfig ? headerConfig : ((_this2$itemKey = _this2.itemKey) === null || _this2$itemKey === void 0 ? void 0 : _this2$itemKey[key]) || headerConfig.name,
|
|
1270
|
+
key: isStringConfig ? key : headerConfig.key || key,
|
|
1271
|
+
width: isStringConfig ? 80 : headerConfig.width || 80,
|
|
1272
|
+
transformValue: isStringConfig ? undefined : headerConfig.transformValue,
|
|
1273
|
+
renderExport: isStringConfig ? undefined : headerConfig.renderExport
|
|
1274
|
+
};
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
// 处理表头组件列表
|
|
1278
|
+
var headerComponents = Object.keys(GoodHeaderMap[this.type].headerMap).reduce(function (acc, key) {
|
|
1279
|
+
var shouldShow = Array.isArray(showHeader) && (isStringArray && showHeader.includes(key) || isObjectArray && dataIndexList.includes(key));
|
|
1280
|
+
if (shouldShow) {
|
|
1281
|
+
var config = createHeaderConfig(key);
|
|
1282
|
+
acc.push(new config.component(_objectSpread(_objectSpread({}, options), {}, {
|
|
1283
|
+
name: config.name,
|
|
1284
|
+
id: "".concat(options.id, "_").concat(config.key),
|
|
1285
|
+
width: config.width,
|
|
1274
1286
|
parentName: options.id,
|
|
1275
|
-
transformValue:
|
|
1276
|
-
renderExport:
|
|
1287
|
+
transformValue: config.transformValue,
|
|
1288
|
+
renderExport: config.renderExport
|
|
1277
1289
|
})));
|
|
1278
1290
|
}
|
|
1279
|
-
return
|
|
1280
|
-
}, [])
|
|
1291
|
+
return acc;
|
|
1292
|
+
}, []);
|
|
1293
|
+
|
|
1294
|
+
// 排序并返回结果
|
|
1295
|
+
return headerComponents.sort(function (a, b) {
|
|
1281
1296
|
if (Array.isArray(showHeader)) {
|
|
1282
1297
|
return getKeyIndex(a.id) - getKeyIndex(b.id);
|
|
1283
1298
|
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1299
|
+
return 0;
|
|
1300
|
+
});
|
|
1286
1301
|
}
|
|
1287
1302
|
}]);
|
|
1288
1303
|
return CommonHeaderGoods;
|
|
@@ -12,20 +12,11 @@ import React from "react";
|
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
14
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
-
import { GyReissue as Reissue } from "@kmkf-fe-packages/basic-components";
|
|
15
|
+
import { GyReissue as Reissue, erpColumnsMap } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
17
|
import { BsGoodsTable } from "../../Common/index";
|
|
18
18
|
import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
|
|
19
19
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
-
function toNum(value) {
|
|
21
|
-
if (typeof value === "string") {
|
|
22
|
-
return value ? +value : void 0;
|
|
23
|
-
}
|
|
24
|
-
if (typeof value === "number") {
|
|
25
|
-
return value;
|
|
26
|
-
}
|
|
27
|
-
return void 0;
|
|
28
|
-
}
|
|
29
20
|
var typeMap = {
|
|
30
21
|
GY_REISSUE_GOODS: {
|
|
31
22
|
key: "gyReissueGoods",
|
|
@@ -36,16 +27,11 @@ var typeMap = {
|
|
|
36
27
|
errMsg: "请选择管易补发商品",
|
|
37
28
|
validator: function validator(_rule, value) {
|
|
38
29
|
if (!_rule.required) return Promise.resolve();
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
goodsName = goods !== null && goods !== void 0 && goods.goodName ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : "";
|
|
45
|
-
}
|
|
46
|
-
return res;
|
|
47
|
-
})) {
|
|
48
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
30
|
+
var qtyValidator = erpColumnsMap["GY_REISSUE_GOODS"].find(function (column) {
|
|
31
|
+
return column.dataIndex === "qty";
|
|
32
|
+
}).validator(_rule, value);
|
|
33
|
+
if (qtyValidator) {
|
|
34
|
+
return qtyValidator;
|
|
49
35
|
}
|
|
50
36
|
return Promise.resolve();
|
|
51
37
|
}
|
|
@@ -15,17 +15,8 @@ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
|
15
15
|
import { SYMBOL } from "../../../constant";
|
|
16
16
|
import { BsGoodsTable } from "../../Common";
|
|
17
17
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
18
|
-
import { GyReturn as Return } from "@kmkf-fe-packages/basic-components";
|
|
18
|
+
import { GyReturn as Return, erpColumnsMap } from "@kmkf-fe-packages/basic-components";
|
|
19
19
|
import { BsType, SystemOrderNo } from "../../BS/common/index";
|
|
20
|
-
function toNum(value) {
|
|
21
|
-
if (typeof value === "string") {
|
|
22
|
-
return value ? +value : void 0;
|
|
23
|
-
}
|
|
24
|
-
if (typeof value === "number") {
|
|
25
|
-
return value;
|
|
26
|
-
}
|
|
27
|
-
return void 0;
|
|
28
|
-
}
|
|
29
20
|
var typeMap = {
|
|
30
21
|
GY_RETURN_GOODS: {
|
|
31
22
|
key: "gyReturnGoods",
|
|
@@ -35,16 +26,11 @@ var typeMap = {
|
|
|
35
26
|
errMsg: "请选择管易退货商品",
|
|
36
27
|
validator: function validator(_rule, value) {
|
|
37
28
|
if (!_rule.required) return Promise.resolve();
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
goodsName = goods !== null && goods !== void 0 && goods.goodName ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : "";
|
|
44
|
-
}
|
|
45
|
-
return res;
|
|
46
|
-
})) {
|
|
47
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
29
|
+
var qtyValidator = erpColumnsMap["GY_RETURN_GOODS"].find(function (column) {
|
|
30
|
+
return column.dataIndex === "qty";
|
|
31
|
+
}).validator(_rule, value);
|
|
32
|
+
if (qtyValidator) {
|
|
33
|
+
return qtyValidator;
|
|
48
34
|
}
|
|
49
35
|
return Promise.resolve();
|
|
50
36
|
}
|
|
@@ -19,7 +19,6 @@ declare class PictureUrl implements ComponentInterface {
|
|
|
19
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
20
|
renderLog: () => null;
|
|
21
21
|
getComponentValue: (r: Record) => any;
|
|
22
|
-
renderExport: () => null;
|
|
23
22
|
editRender: () => null;
|
|
24
23
|
filterConfig: () => never[];
|
|
25
24
|
}
|
|
@@ -68,9 +68,6 @@ var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
|
68
68
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
69
69
|
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
70
70
|
});
|
|
71
|
-
_defineProperty(this, "renderExport", function () {
|
|
72
|
-
return null;
|
|
73
|
-
});
|
|
74
71
|
_defineProperty(this, "editRender", function () {
|
|
75
72
|
return null;
|
|
76
73
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
|
|
4
|
-
import SystemOrderType from
|
|
4
|
+
import SystemOrderType from "../SystemOrderType";
|
|
5
5
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
6
6
|
declare class PublicReissue implements ComponentInterface {
|
|
7
7
|
name: string;
|
|
@@ -12,53 +12,35 @@ import React from "react";
|
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
14
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
-
import { PublicReissue as Reissue } from "@kmkf-fe-packages/basic-components";
|
|
15
|
+
import { PublicReissue as Reissue, erpColumnsMap } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
17
|
import { BsGoodsTable } from "../../Common/index";
|
|
18
18
|
import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
|
|
19
19
|
import SystemOrderType from "../SystemOrderType";
|
|
20
20
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
21
|
-
function toNum(value) {
|
|
22
|
-
if (typeof value === "string") {
|
|
23
|
-
return value ? +value : void 0;
|
|
24
|
-
}
|
|
25
|
-
if (typeof value === "number") {
|
|
26
|
-
return value;
|
|
27
|
-
}
|
|
28
|
-
return void 0;
|
|
29
|
-
}
|
|
30
21
|
var typeMap = {
|
|
31
22
|
JST_REISSUE_GOODS: {
|
|
32
23
|
key: "jstReissueGoods",
|
|
33
24
|
typeName: "jstReissueType",
|
|
34
25
|
remark: "jstReissueType_memo",
|
|
35
26
|
systemOrderNo: "jstSystemOrderNo",
|
|
36
|
-
systemOrderBillType:
|
|
27
|
+
systemOrderBillType: "jstSystemOrderBillType",
|
|
37
28
|
errMsg: "请选择聚水潭补发商品",
|
|
38
29
|
name: "聚水潭",
|
|
39
|
-
compType:
|
|
30
|
+
compType: "补发",
|
|
40
31
|
validator: function validator(_rule, value) {
|
|
41
32
|
if (!_rule.required) return Promise.resolve();
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
48
|
-
}
|
|
49
|
-
return res;
|
|
50
|
-
})) {
|
|
51
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
33
|
+
var qtyValidator = erpColumnsMap["JST_REISSUE_GOODS"].find(function (column) {
|
|
34
|
+
return column.dataIndex === "qty";
|
|
35
|
+
}).validator(_rule, value);
|
|
36
|
+
if (qtyValidator) {
|
|
37
|
+
return qtyValidator;
|
|
52
38
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
return res;
|
|
60
|
-
})) {
|
|
61
|
-
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
39
|
+
var salePriceValidator = erpColumnsMap["JST_REISSUE_GOODS"].find(function (column) {
|
|
40
|
+
return column.dataIndex === "salePrice";
|
|
41
|
+
}).validator(_rule, value);
|
|
42
|
+
if (salePriceValidator) {
|
|
43
|
+
return salePriceValidator;
|
|
62
44
|
}
|
|
63
45
|
return Promise.resolve();
|
|
64
46
|
}
|
|
@@ -68,32 +50,23 @@ var typeMap = {
|
|
|
68
50
|
typeName: "jstReturnType",
|
|
69
51
|
remark: "jstReturnType_memo",
|
|
70
52
|
systemOrderNo: "jstSystemOrderNo",
|
|
71
|
-
systemOrderBillType:
|
|
53
|
+
systemOrderBillType: "jstSystemOrderBillType",
|
|
72
54
|
errMsg: "请选择聚水潭退货商品",
|
|
73
55
|
name: "聚水潭",
|
|
74
|
-
compType:
|
|
56
|
+
compType: "退货",
|
|
75
57
|
validator: function validator(_rule, value) {
|
|
76
58
|
if (!_rule.required) return Promise.resolve();
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
83
|
-
}
|
|
84
|
-
return res;
|
|
85
|
-
})) {
|
|
86
|
-
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
59
|
+
var qtyValidator = erpColumnsMap["JST_RETURN_GOODS"].find(function (column) {
|
|
60
|
+
return column.dataIndex === "qty";
|
|
61
|
+
}).validator(_rule, value);
|
|
62
|
+
if (qtyValidator) {
|
|
63
|
+
return qtyValidator;
|
|
87
64
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
return res;
|
|
95
|
-
})) {
|
|
96
|
-
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
65
|
+
var salePriceValidator = erpColumnsMap["JST_RETURN_GOODS"].find(function (column) {
|
|
66
|
+
return column.dataIndex === "salePrice";
|
|
67
|
+
}).validator(_rule, value);
|
|
68
|
+
if (salePriceValidator) {
|
|
69
|
+
return salePriceValidator;
|
|
97
70
|
}
|
|
98
71
|
return Promise.resolve();
|
|
99
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.0.54-beta.
|
|
3
|
+
"version": "2.0.54-beta.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.0.54-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.54-beta.2",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.2",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b55971e660354da35d280c9894c498c607c26594",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|