@kmkf-fe-packages/services-components 2.0.54-beta.6 → 2.0.55
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/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +52 -0
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +180 -0
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +186 -0
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +12 -13
- package/dist/esm/components/BS/BsGoods/dist/index.js +113 -0
- package/dist/esm/components/BS/BsLogistics/index.js +0 -8
- package/dist/esm/components/BS/common/expressCode.js +0 -3
- package/dist/esm/components/BS/common/expressCompany.js +0 -3
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -7
- package/dist/esm/components/Common/dist/index.js +1019 -0
- package/dist/esm/components/Common/index.d.ts +2 -2
- package/dist/esm/components/Common/index.js +152 -155
- package/dist/esm/components/CommonHeaderGood/index.js +95 -110
- package/dist/esm/components/GY/GyReissue/index.js +25 -11
- package/dist/esm/components/GY/GyReturn/index.js +25 -11
- package/dist/esm/components/JST/JstSendGood/index.js +1 -1
- package/dist/esm/components/MsgStatus/index.js +2 -7
- package/dist/esm/components/Payment/PaymentAmount.d.ts +1 -0
- package/dist/esm/components/Payment/PaymentAmount.js +4 -0
- package/dist/esm/components/PicturePro/PictureUrl.d.ts +1 -0
- package/dist/esm/components/PicturePro/PictureUrl.js +3 -0
- package/dist/esm/components/Public/ReissueGoods/index.d.ts +1 -1
- package/dist/esm/components/Public/ReissueGoods/index.js +60 -19
- package/dist/esm/components/Reissue/Logistics/index.d.ts +11 -1
- package/dist/esm/components/Reissue/Logistics/index.js +35 -15
- package/dist/esm/components/TradeDateTime/index.d.ts +5 -5
- package/dist/esm/components/TradeDateTime/index.js +27 -29
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +0 -2
- package/dist/esm/service/api.d.ts +0 -1
- package/dist/esm/service/api.js +0 -6
- package/package.json +4 -4
|
@@ -1,6 +1,10 @@
|
|
|
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); }
|
|
4
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
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."); }
|
|
6
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); }
|
|
@@ -18,7 +22,6 @@ import ItemView from "../../commonComponents/ItemView";
|
|
|
18
22
|
import { isNull, BS_E3_BOOLEAN_STATUS_MAP } from "@kmkf-fe-packages/kmkf-utils";
|
|
19
23
|
import { BsHeaderPic, BsHeaderChild } from "../BS/common";
|
|
20
24
|
import ReissueGift from "../BsE3/ReissueGift";
|
|
21
|
-
import { erpColumnsMap } from "@kmkf-fe-packages/basic-components";
|
|
22
25
|
var GoodHeaderMap = {
|
|
23
26
|
WDT_GOODS: {
|
|
24
27
|
headerMap: {
|
|
@@ -877,36 +880,36 @@ var GoodHeaderMap = {
|
|
|
877
880
|
iId: "款式编码",
|
|
878
881
|
pic: {
|
|
879
882
|
component: BsHeaderPic,
|
|
880
|
-
name:
|
|
883
|
+
name: '商品图片'
|
|
881
884
|
},
|
|
882
885
|
propertiesValue: "规格值",
|
|
883
886
|
saleBasePrice: {
|
|
884
887
|
name: "原价",
|
|
885
888
|
transformValue: function transformValue(price) {
|
|
886
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
889
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
887
890
|
},
|
|
888
891
|
renderExport: function renderExport(price) {
|
|
889
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
892
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
890
893
|
}
|
|
891
894
|
},
|
|
892
895
|
salePrice: {
|
|
893
896
|
name: "单价",
|
|
894
897
|
transformValue: function transformValue(price) {
|
|
895
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
898
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
896
899
|
},
|
|
897
900
|
renderExport: function renderExport(price) {
|
|
898
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
901
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
899
902
|
}
|
|
900
903
|
},
|
|
901
904
|
qty: "数量",
|
|
902
905
|
saleAmount: {
|
|
903
906
|
name: "总金额",
|
|
904
907
|
transformValue: function transformValue(val, record, parentName) {
|
|
905
|
-
if (!record) return
|
|
908
|
+
if (!record) return '--';
|
|
906
909
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
907
910
|
},
|
|
908
911
|
renderExport: function renderExport(val, record, parentName) {
|
|
909
|
-
if (!record) return
|
|
912
|
+
if (!record) return '--';
|
|
910
913
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
911
914
|
}
|
|
912
915
|
},
|
|
@@ -914,10 +917,10 @@ var GoodHeaderMap = {
|
|
|
914
917
|
isGift: {
|
|
915
918
|
name: "是否赠品",
|
|
916
919
|
transformValue: function transformValue(val) {
|
|
917
|
-
return typeof val !==
|
|
920
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
918
921
|
},
|
|
919
922
|
renderExport: function renderExport(val) {
|
|
920
|
-
return typeof val !==
|
|
923
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
921
924
|
}
|
|
922
925
|
},
|
|
923
926
|
outerOiId: "子订单号"
|
|
@@ -931,35 +934,35 @@ var GoodHeaderMap = {
|
|
|
931
934
|
iId: "款式编码",
|
|
932
935
|
pic: {
|
|
933
936
|
component: BsHeaderPic,
|
|
934
|
-
name:
|
|
937
|
+
name: '商品图片'
|
|
935
938
|
},
|
|
936
939
|
propertiesValue: "规格值",
|
|
937
940
|
saleBasePrice: {
|
|
938
941
|
name: "原价",
|
|
939
942
|
transformValue: function transformValue(price) {
|
|
940
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
943
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
941
944
|
},
|
|
942
945
|
renderExport: function renderExport(price) {
|
|
943
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
946
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
944
947
|
}
|
|
945
948
|
},
|
|
946
949
|
salePrice: {
|
|
947
950
|
name: "单价",
|
|
948
951
|
transformValue: function transformValue(price) {
|
|
949
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
952
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
950
953
|
},
|
|
951
954
|
renderExport: function renderExport(price) {
|
|
952
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
955
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
953
956
|
}
|
|
954
957
|
},
|
|
955
958
|
qty: "数量",
|
|
956
959
|
isGift: {
|
|
957
960
|
name: "是否赠品",
|
|
958
961
|
transformValue: function transformValue(val) {
|
|
959
|
-
return typeof val !==
|
|
962
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
960
963
|
},
|
|
961
964
|
renderExport: function renderExport(val) {
|
|
962
|
-
return typeof val !==
|
|
965
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
963
966
|
}
|
|
964
967
|
},
|
|
965
968
|
remark: "备注"
|
|
@@ -973,36 +976,36 @@ var GoodHeaderMap = {
|
|
|
973
976
|
iId: "款式编码",
|
|
974
977
|
pic: {
|
|
975
978
|
component: BsHeaderPic,
|
|
976
|
-
name:
|
|
979
|
+
name: '商品图片'
|
|
977
980
|
},
|
|
978
981
|
propertiesValue: "规格值",
|
|
979
982
|
saleBasePrice: {
|
|
980
983
|
name: "原价",
|
|
981
984
|
transformValue: function transformValue(price) {
|
|
982
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
985
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
983
986
|
},
|
|
984
987
|
renderExport: function renderExport(price) {
|
|
985
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
988
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
986
989
|
}
|
|
987
990
|
},
|
|
988
991
|
salePrice: {
|
|
989
992
|
name: "单价",
|
|
990
993
|
transformValue: function transformValue(price) {
|
|
991
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
994
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
992
995
|
},
|
|
993
996
|
renderExport: function renderExport(price) {
|
|
994
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
997
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
995
998
|
}
|
|
996
999
|
},
|
|
997
1000
|
qty: "数量",
|
|
998
1001
|
saleAmount: {
|
|
999
1002
|
name: "总金额",
|
|
1000
1003
|
transformValue: function transformValue(val, record, parentName) {
|
|
1001
|
-
if (!record) return
|
|
1004
|
+
if (!record) return '--';
|
|
1002
1005
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1003
1006
|
},
|
|
1004
1007
|
renderExport: function renderExport(val, record, parentName) {
|
|
1005
|
-
if (!record) return
|
|
1008
|
+
if (!record) return '--';
|
|
1006
1009
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1007
1010
|
}
|
|
1008
1011
|
},
|
|
@@ -1010,10 +1013,10 @@ var GoodHeaderMap = {
|
|
|
1010
1013
|
isGift: {
|
|
1011
1014
|
name: "是否赠品",
|
|
1012
1015
|
transformValue: function transformValue(val) {
|
|
1013
|
-
return typeof val !==
|
|
1016
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
1014
1017
|
},
|
|
1015
1018
|
renderExport: function renderExport(val) {
|
|
1016
|
-
return typeof val !==
|
|
1019
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
1017
1020
|
}
|
|
1018
1021
|
},
|
|
1019
1022
|
remark: "备注",
|
|
@@ -1028,46 +1031,46 @@ var GoodHeaderMap = {
|
|
|
1028
1031
|
iId: "款式编码",
|
|
1029
1032
|
pic: {
|
|
1030
1033
|
component: BsHeaderPic,
|
|
1031
|
-
name:
|
|
1034
|
+
name: '商品图片'
|
|
1032
1035
|
},
|
|
1033
1036
|
propertiesValue: "规格值",
|
|
1034
1037
|
saleBasePrice: {
|
|
1035
1038
|
name: "原价",
|
|
1036
1039
|
transformValue: function transformValue(price) {
|
|
1037
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1040
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
1038
1041
|
},
|
|
1039
1042
|
renderExport: function renderExport(price) {
|
|
1040
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1043
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
1041
1044
|
}
|
|
1042
1045
|
},
|
|
1043
1046
|
salePrice: {
|
|
1044
1047
|
name: "单价",
|
|
1045
1048
|
transformValue: function transformValue(price) {
|
|
1046
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1049
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
1047
1050
|
},
|
|
1048
1051
|
renderExport: function renderExport(price) {
|
|
1049
|
-
return price || price === 0 ? Number(price).toFixed(2) :
|
|
1052
|
+
return price || price === 0 ? Number(price).toFixed(2) : '';
|
|
1050
1053
|
}
|
|
1051
1054
|
},
|
|
1052
1055
|
qty: "数量",
|
|
1053
1056
|
saleAmount: {
|
|
1054
1057
|
name: "总金额",
|
|
1055
1058
|
transformValue: function transformValue(val, record, parentName) {
|
|
1056
|
-
if (!record) return
|
|
1059
|
+
if (!record) return '--';
|
|
1057
1060
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1058
1061
|
},
|
|
1059
1062
|
renderExport: function renderExport(val, record, parentName) {
|
|
1060
|
-
if (!record) return
|
|
1063
|
+
if (!record) return '--';
|
|
1061
1064
|
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1062
1065
|
}
|
|
1063
1066
|
},
|
|
1064
1067
|
isGift: {
|
|
1065
1068
|
name: "是否赠品",
|
|
1066
1069
|
transformValue: function transformValue(val) {
|
|
1067
|
-
return typeof val !==
|
|
1070
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
1068
1071
|
},
|
|
1069
1072
|
renderExport: function renderExport(val) {
|
|
1070
|
-
return typeof val !==
|
|
1073
|
+
return typeof val !== 'boolean' ? '' : val ? '是' : '否';
|
|
1071
1074
|
}
|
|
1072
1075
|
},
|
|
1073
1076
|
remark: "备注"
|
|
@@ -1077,73 +1080,73 @@ var GoodHeaderMap = {
|
|
|
1077
1080
|
WLN_GOODS: {
|
|
1078
1081
|
headerMap: {
|
|
1079
1082
|
wlnItemName: {
|
|
1080
|
-
name:
|
|
1083
|
+
name: '商品名称',
|
|
1081
1084
|
width: 250
|
|
1082
1085
|
},
|
|
1083
1086
|
goodsCode: {
|
|
1084
|
-
name:
|
|
1087
|
+
name: '商品编码',
|
|
1085
1088
|
width: 250
|
|
1086
1089
|
},
|
|
1087
1090
|
skuCode: {
|
|
1088
|
-
name:
|
|
1091
|
+
name: 'sku编码',
|
|
1089
1092
|
width: 250
|
|
1090
1093
|
},
|
|
1091
1094
|
skuName: {
|
|
1092
|
-
name:
|
|
1095
|
+
name: '线上sku名称',
|
|
1093
1096
|
width: 250
|
|
1094
1097
|
},
|
|
1095
1098
|
olnSkuCode: {
|
|
1096
|
-
name:
|
|
1099
|
+
name: '线上sku编码',
|
|
1097
1100
|
width: 150
|
|
1098
1101
|
},
|
|
1099
1102
|
sku: {
|
|
1100
|
-
name:
|
|
1103
|
+
name: '线上sku id',
|
|
1101
1104
|
width: 150
|
|
1102
1105
|
},
|
|
1103
1106
|
name: {
|
|
1104
|
-
name:
|
|
1107
|
+
name: '线上商品名称',
|
|
1105
1108
|
width: 250
|
|
1106
1109
|
},
|
|
1107
1110
|
pic: {
|
|
1108
|
-
name:
|
|
1111
|
+
name: '线上图片',
|
|
1109
1112
|
width: 100,
|
|
1110
1113
|
component: BsHeaderPic
|
|
1111
1114
|
},
|
|
1112
1115
|
olnItemCOde: {
|
|
1113
|
-
name:
|
|
1116
|
+
name: '线上商品编码',
|
|
1114
1117
|
width: 150
|
|
1115
1118
|
},
|
|
1116
1119
|
code: {
|
|
1117
|
-
name:
|
|
1120
|
+
name: '线上商品id',
|
|
1118
1121
|
width: 150
|
|
1119
1122
|
},
|
|
1120
1123
|
barCode: {
|
|
1121
|
-
name:
|
|
1124
|
+
name: '商品条码',
|
|
1122
1125
|
width: 150
|
|
1123
1126
|
},
|
|
1124
1127
|
money: {
|
|
1125
|
-
name:
|
|
1128
|
+
name: '实付金额',
|
|
1126
1129
|
width: 100
|
|
1127
1130
|
},
|
|
1128
1131
|
number: {
|
|
1129
|
-
name:
|
|
1132
|
+
name: '数量',
|
|
1130
1133
|
width: 100
|
|
1131
1134
|
},
|
|
1132
|
-
share:
|
|
1135
|
+
share: '应收款',
|
|
1133
1136
|
type: {
|
|
1134
|
-
name:
|
|
1137
|
+
name: '赠品类型',
|
|
1135
1138
|
width: 100
|
|
1136
1139
|
},
|
|
1137
1140
|
isPackage: {
|
|
1138
1141
|
width: 100,
|
|
1139
1142
|
name: "是否组合商品",
|
|
1140
1143
|
transformValue: function transformValue(val) {
|
|
1141
|
-
if (isNull(val)) return
|
|
1142
|
-
return val ?
|
|
1144
|
+
if (isNull(val)) return '--';
|
|
1145
|
+
return val ? '是' : '否';
|
|
1143
1146
|
},
|
|
1144
1147
|
renderExport: function renderExport(val) {
|
|
1145
|
-
if (isNull(val)) return
|
|
1146
|
-
return val ?
|
|
1148
|
+
if (isNull(val)) return '--';
|
|
1149
|
+
return val ? '是' : '否';
|
|
1147
1150
|
}
|
|
1148
1151
|
}
|
|
1149
1152
|
},
|
|
@@ -1230,74 +1233,56 @@ var CommonHeaderGoods = /*#__PURE__*/function () {
|
|
|
1230
1233
|
value: function getChildren(options) {
|
|
1231
1234
|
var _options$componentCon,
|
|
1232
1235
|
_this2 = this;
|
|
1233
|
-
var initBaseInfoColumns = erpColumnsMap[this.type];
|
|
1234
1236
|
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
|
-
|
|
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();
|
|
1239
|
+
var dataIndexList = [];
|
|
1240
|
+
if (isStringArray) {
|
|
1241
|
+
dataIndexList = showHeader;
|
|
1242
|
+
} else if (isObjectArray) {
|
|
1243
|
+
dataIndexList = showHeader.map(function (item) {
|
|
1244
|
+
return item.dataIndex;
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1258
1247
|
var getKeyIndex = function getKeyIndex(id) {
|
|
1259
1248
|
return dataIndexList.indexOf(id.split("_").pop() || "");
|
|
1260
1249
|
};
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
width: config.width,
|
|
1250
|
+
var list = _toConsumableArray(Object.keys(GoodHeaderMap[this.type].headerMap).reduce(function (prv, key) {
|
|
1251
|
+
if (Array.isArray(showHeader) && (isStringArray && showHeader.includes(key) || isObjectArray && showHeader.filter(function (item) {
|
|
1252
|
+
return item.show !== false;
|
|
1253
|
+
}).map(function (item) {
|
|
1254
|
+
return item.dataIndex;
|
|
1255
|
+
}).includes(key))) {
|
|
1256
|
+
var _this2$itemKey;
|
|
1257
|
+
var target = typeof GoodHeaderMap[_this2.type].headerMap[key] === 'string' ? {
|
|
1258
|
+
component: BsHeaderChild,
|
|
1259
|
+
name: GoodHeaderMap[_this2.type].headerMap[key],
|
|
1260
|
+
key: key,
|
|
1261
|
+
width: 80
|
|
1262
|
+
} : {
|
|
1263
|
+
component: GoodHeaderMap[_this2.type].headerMap[key].component || BsHeaderChild,
|
|
1264
|
+
name: ((_this2$itemKey = _this2.itemKey) === null || _this2$itemKey === void 0 ? void 0 : _this2$itemKey[key]) || GoodHeaderMap[_this2.type].headerMap[key].name,
|
|
1265
|
+
key: GoodHeaderMap[_this2.type].headerMap[key].key || key,
|
|
1266
|
+
width: GoodHeaderMap[_this2.type].headerMap[key].width || 80,
|
|
1267
|
+
transformValue: GoodHeaderMap[_this2.type].headerMap[key].transformValue,
|
|
1268
|
+
renderExport: GoodHeaderMap[_this2.type].headerMap[key].renderExport
|
|
1269
|
+
};
|
|
1270
|
+
prv.push(new target.component(_objectSpread(_objectSpread({}, options), {}, {
|
|
1271
|
+
name: target.name,
|
|
1272
|
+
id: "".concat(options.id, "_").concat(target.key),
|
|
1273
|
+
width: target.width,
|
|
1286
1274
|
parentName: options.id,
|
|
1287
|
-
transformValue:
|
|
1288
|
-
renderExport:
|
|
1275
|
+
transformValue: target.transformValue,
|
|
1276
|
+
renderExport: target.renderExport
|
|
1289
1277
|
})));
|
|
1290
1278
|
}
|
|
1291
|
-
return
|
|
1292
|
-
}, [])
|
|
1293
|
-
|
|
1294
|
-
// 排序并返回结果
|
|
1295
|
-
return headerComponents.sort(function (a, b) {
|
|
1279
|
+
return prv;
|
|
1280
|
+
}, []).sort(function (a, b) {
|
|
1296
1281
|
if (Array.isArray(showHeader)) {
|
|
1297
1282
|
return getKeyIndex(a.id) - getKeyIndex(b.id);
|
|
1298
1283
|
}
|
|
1299
|
-
|
|
1300
|
-
|
|
1284
|
+
}));
|
|
1285
|
+
return list;
|
|
1301
1286
|
}
|
|
1302
1287
|
}]);
|
|
1303
1288
|
return CommonHeaderGoods;
|
|
@@ -12,11 +12,20 @@ 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
|
|
15
|
+
import { GyReissue as Reissue } 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
|
+
}
|
|
20
29
|
var typeMap = {
|
|
21
30
|
GY_REISSUE_GOODS: {
|
|
22
31
|
key: "gyReissueGoods",
|
|
@@ -25,11 +34,18 @@ var typeMap = {
|
|
|
25
34
|
remark: "gyReissueType_memo",
|
|
26
35
|
systemOrderNo: "gySystemOrderNo",
|
|
27
36
|
errMsg: "请选择管易补发商品",
|
|
28
|
-
validator: function validator(_rule, value
|
|
37
|
+
validator: function validator(_rule, value) {
|
|
29
38
|
if (!_rule.required) return Promise.resolve();
|
|
30
|
-
var
|
|
31
|
-
if (
|
|
32
|
-
|
|
39
|
+
var goodsName = "";
|
|
40
|
+
if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
|
|
41
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
42
|
+
var res = typeof qty === "number" ? qty < 1 : true;
|
|
43
|
+
if (res) {
|
|
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"));
|
|
33
49
|
}
|
|
34
50
|
return Promise.resolve();
|
|
35
51
|
}
|
|
@@ -41,7 +57,8 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
|
|
|
41
57
|
_typeMap$options$type2,
|
|
42
58
|
_typeMap$options$type3,
|
|
43
59
|
_typeMap$options$type4,
|
|
44
|
-
_this$componentConfig6
|
|
60
|
+
_this$componentConfig6,
|
|
61
|
+
_typeMap$options$type7;
|
|
45
62
|
_classCallCheck(this, GyReissue);
|
|
46
63
|
_defineProperty(this, "name", void 0);
|
|
47
64
|
_defineProperty(this, "id", void 0);
|
|
@@ -194,11 +211,8 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
|
|
|
194
211
|
}
|
|
195
212
|
}, {
|
|
196
213
|
required: isRequired,
|
|
197
|
-
validator: function
|
|
198
|
-
|
|
199
|
-
return ((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : (_typeMap$options$type8 = _typeMap$options$type7.validator) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.call(_typeMap$options$type7, _rule, value, options.type)) || function () {
|
|
200
|
-
return Promise.resolve();
|
|
201
|
-
};
|
|
214
|
+
validator: ((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.validator) || function () {
|
|
215
|
+
return Promise.resolve();
|
|
202
216
|
}
|
|
203
217
|
}];
|
|
204
218
|
this.dataType = "object";
|
|
@@ -15,8 +15,17 @@ 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
|
|
18
|
+
import { GyReturn as Return } 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
|
+
}
|
|
20
29
|
var typeMap = {
|
|
21
30
|
GY_RETURN_GOODS: {
|
|
22
31
|
key: "gyReturnGoods",
|
|
@@ -24,11 +33,18 @@ var typeMap = {
|
|
|
24
33
|
typeName: "gyReturnType",
|
|
25
34
|
systemOrderNo: "gySystemOrderNo",
|
|
26
35
|
errMsg: "请选择管易退货商品",
|
|
27
|
-
validator: function validator(_rule, value
|
|
36
|
+
validator: function validator(_rule, value) {
|
|
28
37
|
if (!_rule.required) return Promise.resolve();
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
|
|
38
|
+
var goodsName = "";
|
|
39
|
+
if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
|
|
40
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
41
|
+
var res = typeof qty === "number" ? qty < 1 : true;
|
|
42
|
+
if (res) {
|
|
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"));
|
|
32
48
|
}
|
|
33
49
|
return Promise.resolve();
|
|
34
50
|
}
|
|
@@ -39,7 +55,8 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
|
|
|
39
55
|
_typeMap$options$type,
|
|
40
56
|
_typeMap$options$type2,
|
|
41
57
|
_typeMap$options$type3,
|
|
42
|
-
_this$componentConfig6
|
|
58
|
+
_this$componentConfig6,
|
|
59
|
+
_typeMap$options$type6;
|
|
43
60
|
_classCallCheck(this, GyReturn);
|
|
44
61
|
_defineProperty(this, "name", void 0);
|
|
45
62
|
_defineProperty(this, "id", void 0);
|
|
@@ -186,11 +203,8 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
|
|
|
186
203
|
}
|
|
187
204
|
}, {
|
|
188
205
|
required: isRequired,
|
|
189
|
-
validator: function
|
|
190
|
-
|
|
191
|
-
return ((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : (_typeMap$options$type7 = _typeMap$options$type6.validator) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.call(_typeMap$options$type6, _rule, value, options.type)) || function () {
|
|
192
|
-
return Promise.resolve();
|
|
193
|
-
};
|
|
206
|
+
validator: ((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.validator) || function () {
|
|
207
|
+
return Promise.resolve();
|
|
194
208
|
}
|
|
195
209
|
}];
|
|
196
210
|
this.dataType = "object";
|
|
@@ -176,7 +176,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
176
176
|
});
|
|
177
177
|
_defineProperty(this, "filterConfig", function (item) {
|
|
178
178
|
var _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type11;
|
|
179
|
-
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "
|
|
179
|
+
return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
|
|
180
180
|
searchDefaultConditions: SYMBOL.in,
|
|
181
181
|
type: item.type,
|
|
182
182
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.sendName),
|
|
@@ -39,15 +39,10 @@ var typeMap = {
|
|
|
39
39
|
label: "等待执行",
|
|
40
40
|
color: "#e7780f"
|
|
41
41
|
}, {
|
|
42
|
-
oldValue: "
|
|
42
|
+
oldValue: "等待发送",
|
|
43
43
|
value: "不满足条件,无需执行",
|
|
44
44
|
label: "不满足条件,无需执行",
|
|
45
45
|
color: "#8A8A8A"
|
|
46
|
-
}, {
|
|
47
|
-
oldValue: "暂不满足条件,等待执行",
|
|
48
|
-
value: "暂不满足条件,等待执行",
|
|
49
|
-
label: "暂不满足条件,等待执行",
|
|
50
|
-
color: "#4D90F7"
|
|
51
46
|
}],
|
|
52
47
|
key: "msgStatusValues",
|
|
53
48
|
code: "msgStatus4Search",
|
|
@@ -130,7 +125,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
|
|
|
130
125
|
return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
|
|
131
126
|
});
|
|
132
127
|
var key = item.msgType || "ding";
|
|
133
|
-
return "".concat(msgTypeCh[key]
|
|
128
|
+
return "".concat(msgTypeCh[key]).concat(item.ruleName ? "-".concat(item.ruleName) : "", ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "");
|
|
134
129
|
}).join(",");
|
|
135
130
|
});
|
|
136
131
|
_defineProperty(this, "editRender", function (p) {
|
|
@@ -36,5 +36,6 @@ declare class PaymentAmount implements ComponentInterface {
|
|
|
36
36
|
formatFilterValue: (val: Array<number | null>) => (number | null)[];
|
|
37
37
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
38
38
|
};
|
|
39
|
+
formDataTransform: (value: string) => string | number;
|
|
39
40
|
}
|
|
40
41
|
export default PaymentAmount;
|
|
@@ -132,6 +132,10 @@ var PaymentAmount = /*#__PURE__*/_createClass(function PaymentAmount(options) {
|
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
});
|
|
135
|
+
_defineProperty(this, "formDataTransform", function (value) {
|
|
136
|
+
var isNumber = new RegExp(/^[+-]?\d+(\.\d+)?$/);
|
|
137
|
+
return isNumber.test(value) ? Number(value) : value;
|
|
138
|
+
});
|
|
135
139
|
this.name = '打款金额';
|
|
136
140
|
this.id = "".concat(options.id, "_enterprisePaymentRefundFee");
|
|
137
141
|
this.sortField = "".concat(options.id, "_enterprisePaymentRefundFee");
|
|
@@ -19,6 +19,7 @@ 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;
|
|
22
23
|
editRender: () => null;
|
|
23
24
|
filterConfig: () => never[];
|
|
24
25
|
}
|
|
@@ -68,6 +68,9 @@ 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
|
+
});
|
|
71
74
|
_defineProperty(this, "editRender", function () {
|
|
72
75
|
return null;
|
|
73
76
|
});
|