@kmkf-fe-packages/basic-components 0.14.1-alpha.8 → 0.15.0-alpha.0
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/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef, useState, useEffect,
|
|
1
|
+
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo } from 'react';
|
|
2
2
|
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Tabs, ConfigProvider, Pagination, Popover, Table } from 'antd';
|
|
3
3
|
import { EyeOutlined, DeleteOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
@@ -899,7 +899,7 @@ var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "ac
|
|
|
899
899
|
var fn$1 = function fn() {
|
|
900
900
|
return void 0;
|
|
901
901
|
};
|
|
902
|
-
var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
902
|
+
var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
903
903
|
var _ref$maxCount = _ref.maxCount,
|
|
904
904
|
maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
|
|
905
905
|
_ref$maxSize = _ref.maxSize,
|
|
@@ -1120,6 +1120,11 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
|
1120
1120
|
});
|
|
1121
1121
|
};
|
|
1122
1122
|
}, [pasteDefaultStates]);
|
|
1123
|
+
useImperativeHandle(ref, function () {
|
|
1124
|
+
return {
|
|
1125
|
+
taskCompleted: !uploading
|
|
1126
|
+
};
|
|
1127
|
+
}, [uploading]);
|
|
1123
1128
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
1124
1129
|
spinning: uploading
|
|
1125
1130
|
}, /*#__PURE__*/React.createElement("p", {
|
|
@@ -1172,6 +1177,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
|
1172
1177
|
}
|
|
1173
1178
|
})));
|
|
1174
1179
|
};
|
|
1180
|
+
var index = /*#__PURE__*/forwardRef(ApaasUploadAsync);
|
|
1175
1181
|
|
|
1176
1182
|
var css_248z$2 = ".index-module_imageBox__1rpoB {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1rpoB .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__1rpoB .index-module_inputImage__MyiR1 {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageShow__3BNqT {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP {\n width: 100px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover {\n background: transparent;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover .index-module_mask__uy8r2:before {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP .index-module_delete__28zCp {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2:hover .index-module_actions__1-6f4 {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 .index-module_icon__3yEcS {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C {\n display: inline-block;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- .index-module_addBtn__3a1TQ {\n color: #86909C;\n}\n.index-module_imageBox__1rpoB .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1rpoB .ant-upload .index-module_addBtn__3a1TQ {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_tips__168Vy {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
1177
1183
|
var styles$2 = {"imageBox":"index-module_imageBox__1rpoB","inputImage":"index-module_inputImage__MyiR1","imageShow":"index-module_imageShow__3BNqT","imageWrap":"index-module_imageWrap__LyKfP","-webkit-mask":"index-module_mask__uy8r2","mask":"index-module_mask__uy8r2","delete":"index-module_delete__28zCp","actions":"index-module_actions__1-6f4","icon":"index-module_icon__3yEcS","imagePaste":"index-module_imagePaste__Ac77C","fakeBox":"index-module_fakeBox__3W1d-","addBtn":"index-module_addBtn__3a1TQ","tips":"index-module_tips__168Vy"};
|
|
@@ -9718,6 +9724,24 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
9718
9724
|
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
9719
9725
|
};
|
|
9720
9726
|
|
|
9727
|
+
//组件类型的默认值
|
|
9728
|
+
var typeInitValueMap = {
|
|
9729
|
+
1: [{
|
|
9730
|
+
logisticsCompany: null,
|
|
9731
|
+
logisticsCode: null
|
|
9732
|
+
}],
|
|
9733
|
+
2: [{
|
|
9734
|
+
supplyId: null,
|
|
9735
|
+
supplyName: null
|
|
9736
|
+
}],
|
|
9737
|
+
3: [{
|
|
9738
|
+
sendId: null,
|
|
9739
|
+
sendName: null
|
|
9740
|
+
}],
|
|
9741
|
+
4: [{
|
|
9742
|
+
deliveryNo: null
|
|
9743
|
+
}]
|
|
9744
|
+
};
|
|
9721
9745
|
var jstGoods = function jstGoods(props) {
|
|
9722
9746
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
9723
9747
|
var _props$value = props.value,
|
|
@@ -9732,11 +9756,12 @@ var jstGoods = function jstGoods(props) {
|
|
|
9732
9756
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9733
9757
|
changeIndex = _useState2[0],
|
|
9734
9758
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9759
|
+
useEffect(function () {
|
|
9760
|
+
//没有值塞个默认值
|
|
9761
|
+
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
9762
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
9763
|
+
}
|
|
9764
|
+
}, [value, type]);
|
|
9740
9765
|
var content = function content(item, index) {
|
|
9741
9766
|
return /*#__PURE__*/React.createElement("div", {
|
|
9742
9767
|
style: {
|
|
@@ -11118,7 +11143,7 @@ var columnsNameMap = {
|
|
|
11118
11143
|
tagName: '标记'
|
|
11119
11144
|
}
|
|
11120
11145
|
};
|
|
11121
|
-
var index = (function (props) {
|
|
11146
|
+
var index$1 = (function (props) {
|
|
11122
11147
|
var value = props.value,
|
|
11123
11148
|
_onChange = props.onChange,
|
|
11124
11149
|
disabled = props.disabled,
|
|
@@ -11758,7 +11783,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
11758
11783
|
userNick: userNick
|
|
11759
11784
|
}));
|
|
11760
11785
|
};
|
|
11761
|
-
var index$
|
|
11786
|
+
var index$2 = /*#__PURE__*/forwardRef(Goods$1);
|
|
11762
11787
|
|
|
11763
11788
|
var _excluded$g = ["onChange", "value", "failValue"];
|
|
11764
11789
|
function CommonStatus(props) {
|
|
@@ -11785,6 +11810,28 @@ function CommonStatus(props) {
|
|
|
11785
11810
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : value.reason) : null);
|
|
11786
11811
|
}
|
|
11787
11812
|
|
|
11813
|
+
var typeInitValueMap$1 = {
|
|
11814
|
+
1: {
|
|
11815
|
+
initValue: [{
|
|
11816
|
+
deliveryNo: ''
|
|
11817
|
+
}]
|
|
11818
|
+
},
|
|
11819
|
+
2: {
|
|
11820
|
+
initValue: [{
|
|
11821
|
+
returnGoodsTradeId: ''
|
|
11822
|
+
}]
|
|
11823
|
+
},
|
|
11824
|
+
3: {
|
|
11825
|
+
initValue: [{
|
|
11826
|
+
billNo: ''
|
|
11827
|
+
}]
|
|
11828
|
+
},
|
|
11829
|
+
4: {
|
|
11830
|
+
initValue: [{
|
|
11831
|
+
billNo: ''
|
|
11832
|
+
}]
|
|
11833
|
+
}
|
|
11834
|
+
};
|
|
11788
11835
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
11789
11836
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
11790
11837
|
var _props$value = props.value,
|
|
@@ -11797,11 +11844,11 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
11797
11844
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11798
11845
|
changeIndex = _useState2[0],
|
|
11799
11846
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11847
|
+
useEffect(function () {
|
|
11848
|
+
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
11849
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap$1[type].initValue);
|
|
11850
|
+
}
|
|
11851
|
+
}, [value, type]);
|
|
11805
11852
|
var content = function content(item, index) {
|
|
11806
11853
|
return /*#__PURE__*/React.createElement("div", {
|
|
11807
11854
|
style: {
|
|
@@ -11854,16 +11901,10 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
11854
11901
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11855
11902
|
disabled: true,
|
|
11856
11903
|
placeholder: "\u8BF7\u8F93\u5165\u8865\u53D1\u5355id",
|
|
11857
|
-
onChange: function onChange(e) {
|
|
11858
|
-
return changeInputHandle(e.target.value, 'reissueTradeId');
|
|
11859
|
-
},
|
|
11860
11904
|
value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
|
|
11861
11905
|
})) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11862
11906
|
disabled: true,
|
|
11863
11907
|
placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
|
|
11864
|
-
onChange: function onChange(e) {
|
|
11865
|
-
return changeInputHandle(e.target.value, 'exchangeTradeId');
|
|
11866
|
-
},
|
|
11867
11908
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
11868
11909
|
})) : null) : null);
|
|
11869
11910
|
};
|
|
@@ -11945,73 +11986,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
11945
11986
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
11946
11987
|
};
|
|
11947
11988
|
|
|
11948
|
-
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
11949
|
-
var msgTypeCh = {
|
|
11950
|
-
'ding': '钉钉',
|
|
11951
|
-
'wechat': '微信',
|
|
11952
|
-
'qq': 'QQ',
|
|
11953
|
-
'qywx': '企业微信'
|
|
11954
|
-
};
|
|
11955
|
-
var MsgStatus = function MsgStatus(props) {
|
|
11956
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
11957
|
-
var _props$value = props.value,
|
|
11958
|
-
value = _props$value === void 0 ? [] : _props$value,
|
|
11959
|
-
onChange = props.onChange,
|
|
11960
|
-
disabled = props.disabled,
|
|
11961
|
-
failValue = props.failValue,
|
|
11962
|
-
_props$type = props.type,
|
|
11963
|
-
type = _props$type === void 0 ? 1 : _props$type,
|
|
11964
|
-
other = _objectWithoutProperties(props, _excluded$i);
|
|
11965
|
-
var _useState = useState(0),
|
|
11966
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11967
|
-
changeIndex = _useState2[0],
|
|
11968
|
-
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11969
|
-
var changeHandle = function changeHandle(val, valType) {
|
|
11970
|
-
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
11971
|
-
changeOrderInfo[valType] = val;
|
|
11972
|
-
if (val !== failValue) {
|
|
11973
|
-
changeOrderInfo.reason = '';
|
|
11974
|
-
}
|
|
11975
|
-
var newList = _toConsumableArray(value);
|
|
11976
|
-
newList[changeIndex] = changeOrderInfo;
|
|
11977
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
11978
|
-
};
|
|
11979
|
-
//判断是否是单个且没有商品数据
|
|
11980
|
-
var isSingle = useMemo(function () {
|
|
11981
|
-
return value && value.length === 1;
|
|
11982
|
-
}, [value]);
|
|
11983
|
-
return /*#__PURE__*/React.createElement("div", null, !isSingle ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, {
|
|
11984
|
-
wrap: true
|
|
11985
|
-
}, (value || []).map(function (item, index) {
|
|
11986
|
-
var key = item.msgType || 'ding';
|
|
11987
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
11988
|
-
style: {
|
|
11989
|
-
color: changeIndex === index ? '#4569d4' : 'black',
|
|
11990
|
-
cursor: 'pointer'
|
|
11991
|
-
},
|
|
11992
|
-
onClick: function onClick() {
|
|
11993
|
-
return setChangeIndex(index);
|
|
11994
|
-
}
|
|
11995
|
-
}, msgTypeCh[key], item.ruleName);
|
|
11996
|
-
}))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
11997
|
-
showSearch: true,
|
|
11998
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
11999
|
-
filterOption: function filterOption(input, option) {
|
|
12000
|
-
return option.label.includes(input);
|
|
12001
|
-
},
|
|
12002
|
-
style: {
|
|
12003
|
-
width: 200
|
|
12004
|
-
},
|
|
12005
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
12006
|
-
disabled: disabled,
|
|
12007
|
-
onChange: function onChange(val) {
|
|
12008
|
-
return changeHandle(val, 'status');
|
|
12009
|
-
}
|
|
12010
|
-
}))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React.createElement("div", {
|
|
12011
|
-
className: "c-red"
|
|
12012
|
-
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
12013
|
-
};
|
|
12014
|
-
|
|
12015
11989
|
var CalculationInput = function CalculationInput(props) {
|
|
12016
11990
|
var _props$config = props.config,
|
|
12017
11991
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -12030,4 +12004,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
12030
12004
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
12031
12005
|
};
|
|
12032
12006
|
|
|
12033
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$
|
|
12007
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
|
package/dist/index.js
CHANGED
|
@@ -910,7 +910,7 @@ var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "ac
|
|
|
910
910
|
var fn$1 = function fn() {
|
|
911
911
|
return void 0;
|
|
912
912
|
};
|
|
913
|
-
var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
913
|
+
var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
914
914
|
var _ref$maxCount = _ref.maxCount,
|
|
915
915
|
maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
|
|
916
916
|
_ref$maxSize = _ref.maxSize,
|
|
@@ -1131,6 +1131,11 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
|
1131
1131
|
});
|
|
1132
1132
|
};
|
|
1133
1133
|
}, [pasteDefaultStates]);
|
|
1134
|
+
React.useImperativeHandle(ref, function () {
|
|
1135
|
+
return {
|
|
1136
|
+
taskCompleted: !uploading
|
|
1137
|
+
};
|
|
1138
|
+
}, [uploading]);
|
|
1134
1139
|
return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
|
|
1135
1140
|
spinning: uploading
|
|
1136
1141
|
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
@@ -1183,6 +1188,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
|
|
|
1183
1188
|
}
|
|
1184
1189
|
})));
|
|
1185
1190
|
};
|
|
1191
|
+
var index = /*#__PURE__*/React.forwardRef(ApaasUploadAsync);
|
|
1186
1192
|
|
|
1187
1193
|
var css_248z$2 = ".index-module_imageBox__1rpoB {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1rpoB .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__1rpoB .index-module_inputImage__MyiR1 {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageShow__3BNqT {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP {\n width: 100px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover {\n background: transparent;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover .index-module_mask__uy8r2:before {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP .index-module_delete__28zCp {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2:hover .index-module_actions__1-6f4 {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 .index-module_icon__3yEcS {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C {\n display: inline-block;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- .index-module_addBtn__3a1TQ {\n color: #86909C;\n}\n.index-module_imageBox__1rpoB .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1rpoB .ant-upload .index-module_addBtn__3a1TQ {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_tips__168Vy {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
1188
1194
|
var styles$2 = {"imageBox":"index-module_imageBox__1rpoB","inputImage":"index-module_inputImage__MyiR1","imageShow":"index-module_imageShow__3BNqT","imageWrap":"index-module_imageWrap__LyKfP","-webkit-mask":"index-module_mask__uy8r2","mask":"index-module_mask__uy8r2","delete":"index-module_delete__28zCp","actions":"index-module_actions__1-6f4","icon":"index-module_icon__3yEcS","imagePaste":"index-module_imagePaste__Ac77C","fakeBox":"index-module_fakeBox__3W1d-","addBtn":"index-module_addBtn__3a1TQ","tips":"index-module_tips__168Vy"};
|
|
@@ -9729,6 +9735,24 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
9729
9735
|
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
9730
9736
|
};
|
|
9731
9737
|
|
|
9738
|
+
//组件类型的默认值
|
|
9739
|
+
var typeInitValueMap = {
|
|
9740
|
+
1: [{
|
|
9741
|
+
logisticsCompany: null,
|
|
9742
|
+
logisticsCode: null
|
|
9743
|
+
}],
|
|
9744
|
+
2: [{
|
|
9745
|
+
supplyId: null,
|
|
9746
|
+
supplyName: null
|
|
9747
|
+
}],
|
|
9748
|
+
3: [{
|
|
9749
|
+
sendId: null,
|
|
9750
|
+
sendName: null
|
|
9751
|
+
}],
|
|
9752
|
+
4: [{
|
|
9753
|
+
deliveryNo: null
|
|
9754
|
+
}]
|
|
9755
|
+
};
|
|
9732
9756
|
var jstGoods = function jstGoods(props) {
|
|
9733
9757
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
|
|
9734
9758
|
var _props$value = props.value,
|
|
@@ -9743,11 +9767,12 @@ var jstGoods = function jstGoods(props) {
|
|
|
9743
9767
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9744
9768
|
changeIndex = _useState2[0],
|
|
9745
9769
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9770
|
+
React.useEffect(function () {
|
|
9771
|
+
//没有值塞个默认值
|
|
9772
|
+
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
9773
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
9774
|
+
}
|
|
9775
|
+
}, [value, type]);
|
|
9751
9776
|
var content = function content(item, index) {
|
|
9752
9777
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
9753
9778
|
style: {
|
|
@@ -11129,7 +11154,7 @@ var columnsNameMap = {
|
|
|
11129
11154
|
tagName: '标记'
|
|
11130
11155
|
}
|
|
11131
11156
|
};
|
|
11132
|
-
var index = (function (props) {
|
|
11157
|
+
var index$1 = (function (props) {
|
|
11133
11158
|
var value = props.value,
|
|
11134
11159
|
_onChange = props.onChange,
|
|
11135
11160
|
disabled = props.disabled,
|
|
@@ -11769,7 +11794,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
11769
11794
|
userNick: userNick
|
|
11770
11795
|
}));
|
|
11771
11796
|
};
|
|
11772
|
-
var index$
|
|
11797
|
+
var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
|
|
11773
11798
|
|
|
11774
11799
|
var _excluded$g = ["onChange", "value", "failValue"];
|
|
11775
11800
|
function CommonStatus(props) {
|
|
@@ -11796,6 +11821,28 @@ function CommonStatus(props) {
|
|
|
11796
11821
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : value.reason) : null);
|
|
11797
11822
|
}
|
|
11798
11823
|
|
|
11824
|
+
var typeInitValueMap$1 = {
|
|
11825
|
+
1: {
|
|
11826
|
+
initValue: [{
|
|
11827
|
+
deliveryNo: ''
|
|
11828
|
+
}]
|
|
11829
|
+
},
|
|
11830
|
+
2: {
|
|
11831
|
+
initValue: [{
|
|
11832
|
+
returnGoodsTradeId: ''
|
|
11833
|
+
}]
|
|
11834
|
+
},
|
|
11835
|
+
3: {
|
|
11836
|
+
initValue: [{
|
|
11837
|
+
billNo: ''
|
|
11838
|
+
}]
|
|
11839
|
+
},
|
|
11840
|
+
4: {
|
|
11841
|
+
initValue: [{
|
|
11842
|
+
billNo: ''
|
|
11843
|
+
}]
|
|
11844
|
+
}
|
|
11845
|
+
};
|
|
11799
11846
|
var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
11800
11847
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4;
|
|
11801
11848
|
var _props$value = props.value,
|
|
@@ -11808,11 +11855,11 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
11808
11855
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11809
11856
|
changeIndex = _useState2[0],
|
|
11810
11857
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11858
|
+
React.useEffect(function () {
|
|
11859
|
+
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
11860
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap$1[type].initValue);
|
|
11861
|
+
}
|
|
11862
|
+
}, [value, type]);
|
|
11816
11863
|
var content = function content(item, index) {
|
|
11817
11864
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11818
11865
|
style: {
|
|
@@ -11865,16 +11912,10 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
11865
11912
|
})) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11866
11913
|
disabled: true,
|
|
11867
11914
|
placeholder: "\u8BF7\u8F93\u5165\u8865\u53D1\u5355id",
|
|
11868
|
-
onChange: function onChange(e) {
|
|
11869
|
-
return changeInputHandle(e.target.value, 'reissueTradeId');
|
|
11870
|
-
},
|
|
11871
11915
|
value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
|
|
11872
11916
|
})) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11873
11917
|
disabled: true,
|
|
11874
11918
|
placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
|
|
11875
|
-
onChange: function onChange(e) {
|
|
11876
|
-
return changeInputHandle(e.target.value, 'exchangeTradeId');
|
|
11877
|
-
},
|
|
11878
11919
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
11879
11920
|
})) : null) : null);
|
|
11880
11921
|
};
|
|
@@ -11956,73 +11997,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
11956
11997
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
11957
11998
|
};
|
|
11958
11999
|
|
|
11959
|
-
var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
|
|
11960
|
-
var msgTypeCh = {
|
|
11961
|
-
'ding': '钉钉',
|
|
11962
|
-
'wechat': '微信',
|
|
11963
|
-
'qq': 'QQ',
|
|
11964
|
-
'qywx': '企业微信'
|
|
11965
|
-
};
|
|
11966
|
-
var MsgStatus = function MsgStatus(props) {
|
|
11967
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
11968
|
-
var _props$value = props.value,
|
|
11969
|
-
value = _props$value === void 0 ? [] : _props$value,
|
|
11970
|
-
onChange = props.onChange,
|
|
11971
|
-
disabled = props.disabled,
|
|
11972
|
-
failValue = props.failValue,
|
|
11973
|
-
_props$type = props.type,
|
|
11974
|
-
type = _props$type === void 0 ? 1 : _props$type,
|
|
11975
|
-
other = _objectWithoutProperties(props, _excluded$i);
|
|
11976
|
-
var _useState = React.useState(0),
|
|
11977
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11978
|
-
changeIndex = _useState2[0],
|
|
11979
|
-
setChangeIndex = _useState2[1]; //选中的包裹
|
|
11980
|
-
var changeHandle = function changeHandle(val, valType) {
|
|
11981
|
-
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
11982
|
-
changeOrderInfo[valType] = val;
|
|
11983
|
-
if (val !== failValue) {
|
|
11984
|
-
changeOrderInfo.reason = '';
|
|
11985
|
-
}
|
|
11986
|
-
var newList = _toConsumableArray(value);
|
|
11987
|
-
newList[changeIndex] = changeOrderInfo;
|
|
11988
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
11989
|
-
};
|
|
11990
|
-
//判断是否是单个且没有商品数据
|
|
11991
|
-
var isSingle = React.useMemo(function () {
|
|
11992
|
-
return value && value.length === 1;
|
|
11993
|
-
}, [value]);
|
|
11994
|
-
return /*#__PURE__*/React__default['default'].createElement("div", null, !isSingle ? /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
11995
|
-
wrap: true
|
|
11996
|
-
}, (value || []).map(function (item, index) {
|
|
11997
|
-
var key = item.msgType || 'ding';
|
|
11998
|
-
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
11999
|
-
style: {
|
|
12000
|
-
color: changeIndex === index ? '#4569d4' : 'black',
|
|
12001
|
-
cursor: 'pointer'
|
|
12002
|
-
},
|
|
12003
|
-
onClick: function onClick() {
|
|
12004
|
-
return setChangeIndex(index);
|
|
12005
|
-
}
|
|
12006
|
-
}, msgTypeCh[key], item.ruleName);
|
|
12007
|
-
}))) : null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
12008
|
-
showSearch: true,
|
|
12009
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
12010
|
-
filterOption: function filterOption(input, option) {
|
|
12011
|
-
return option.label.includes(input);
|
|
12012
|
-
},
|
|
12013
|
-
style: {
|
|
12014
|
-
width: 200
|
|
12015
|
-
},
|
|
12016
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
12017
|
-
disabled: disabled,
|
|
12018
|
-
onChange: function onChange(val) {
|
|
12019
|
-
return changeHandle(val, 'status');
|
|
12020
|
-
}
|
|
12021
|
-
}))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12022
|
-
className: "c-red"
|
|
12023
|
-
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
12024
|
-
};
|
|
12025
|
-
|
|
12026
12000
|
var CalculationInput = function CalculationInput(props) {
|
|
12027
12001
|
var _props$config = props.config,
|
|
12028
12002
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -12059,13 +12033,13 @@ exports.ApaasSelect = ApaasSelect;
|
|
|
12059
12033
|
exports.ApaasSlider = ApaasSlider;
|
|
12060
12034
|
exports.ApaasTextArea = ApaasTextArea;
|
|
12061
12035
|
exports.ApaasUpload = ApaasUpload;
|
|
12062
|
-
exports.ApaasUploadAsync =
|
|
12036
|
+
exports.ApaasUploadAsync = index;
|
|
12063
12037
|
exports.ApaasUploadFile = ApaasUploadFile;
|
|
12064
12038
|
exports.BsExchange = BsExchange;
|
|
12065
12039
|
exports.BsGoods = BsGoods;
|
|
12066
12040
|
exports.BsReissue = BsReissue;
|
|
12067
12041
|
exports.BsReturn = BsReturnGoods;
|
|
12068
|
-
exports.BsSystemOrder = index;
|
|
12042
|
+
exports.BsSystemOrder = index$1;
|
|
12069
12043
|
exports.BuyerNick = BuyerNick;
|
|
12070
12044
|
exports.CalculationInput = CalculationInput;
|
|
12071
12045
|
exports.ChooseBaby = ChooseBaby;
|
|
@@ -12074,14 +12048,13 @@ exports.CommonStatus = CommonStatus;
|
|
|
12074
12048
|
exports.CommonSystemOrder = CommonSystemOrder;
|
|
12075
12049
|
exports.ExpressLogistics = ExpressLogistics;
|
|
12076
12050
|
exports.Goods = Goods;
|
|
12077
|
-
exports.GoodsTable = index$
|
|
12051
|
+
exports.GoodsTable = index$2;
|
|
12078
12052
|
exports.IdentifyAddress = IdentifyAddress;
|
|
12079
12053
|
exports.Invoice = Invoice;
|
|
12080
12054
|
exports.JstGoods = jstGoods;
|
|
12081
12055
|
exports.JstItemList = ItemList;
|
|
12082
12056
|
exports.LogisticsInterception = LogisticsInterception;
|
|
12083
12057
|
exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
12084
|
-
exports.MsgStatus = MsgStatus;
|
|
12085
12058
|
exports.ParseLogistics = ParseLogistics;
|
|
12086
12059
|
exports.Payment = Payment;
|
|
12087
12060
|
exports.Remark = RemarkInput;
|
|
@@ -13,5 +13,5 @@ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'
|
|
|
13
13
|
hostUrl?: string;
|
|
14
14
|
actionUrl?: string;
|
|
15
15
|
}
|
|
16
|
-
declare const
|
|
17
|
-
export default
|
|
16
|
+
declare const _default: React.ForwardRefExoticComponent<ApaasUploadProps & React.RefAttributes<any>>;
|
|
17
|
+
export default _default;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ export { default as GoodsTable } from './common/GoodsTable';
|
|
|
46
46
|
export { default as CommonStatus } from './common/CommonStatus';
|
|
47
47
|
export { default as CommonSystemOrder } from './common/CommonSystemOrder';
|
|
48
48
|
export { default as CommonMultiStatus } from './common/CommonMultiStatus';
|
|
49
|
-
export { default as MsgStatus } from './common/MsgStatus';
|
|
50
49
|
export { default as ParseLogistics } from './common/ParseLogistics';
|
|
51
50
|
export { default as IdentifyAddress } from './common/IdentifyAddress';
|
|
52
51
|
export { default as CalculationInput } from './apaas/CalculationInput';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-alpha.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.15.0-alpha.0",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"pubsub-js": "^1.9.4",
|
|
26
26
|
"react-copy-to-clipboard": "^5.1.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "d655ae092175a9211245feee158c52e6cd288003"
|
|
65
65
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface StatusProps {
|
|
3
|
-
value: {
|
|
4
|
-
status: string;
|
|
5
|
-
reason?: string;
|
|
6
|
-
systemOrderId?: string;
|
|
7
|
-
}[];
|
|
8
|
-
failValue: string;
|
|
9
|
-
options: any[];
|
|
10
|
-
onChange: (val: any) => void;
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
type: number;
|
|
13
|
-
}
|
|
14
|
-
declare const MsgStatus: (props: Partial<StatusProps>) => React.JSX.Element;
|
|
15
|
-
export default MsgStatus;
|