@kmkf-fe-packages/basic-components 0.7.1-alpha.0 → 0.7.1-alpha.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/index.esm.js
CHANGED
|
@@ -3101,7 +3101,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
3101
3101
|
_props$disabled = props.disabled,
|
|
3102
3102
|
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
3103
3103
|
var changeHandle = function changeHandle(val, type) {
|
|
3104
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
3104
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
3105
3105
|
};
|
|
3106
3106
|
var handleParseLogistics = function handleParseLogistics(val) {
|
|
3107
3107
|
var params = {
|
|
@@ -3148,8 +3148,12 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
3148
3148
|
})));
|
|
3149
3149
|
};
|
|
3150
3150
|
|
|
3151
|
+
var css_248z$6 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
3152
|
+
styleInject(css_248z$6);
|
|
3153
|
+
|
|
3151
3154
|
var Item = Form.Item;
|
|
3152
3155
|
var LogisticsAddress = LogisticsAddressData.getInstance();
|
|
3156
|
+
var address$1 = AddressData.getInstance();
|
|
3153
3157
|
var LogisticsInterception = function LogisticsInterception(props) {
|
|
3154
3158
|
var _props$value = props.value,
|
|
3155
3159
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -3157,8 +3161,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3157
3161
|
logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
|
|
3158
3162
|
_props$expressInterce = props.expressInterceptData,
|
|
3159
3163
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
3160
|
-
_props$logisticsAddre = props.logisticsAddressData,
|
|
3161
|
-
logisticsAddressData = _props$logisticsAddre === void 0 ? [] : _props$logisticsAddre,
|
|
3162
3164
|
_props$required = props.required,
|
|
3163
3165
|
required = _props$required === void 0 ? false : _props$required,
|
|
3164
3166
|
onChange = props.onChange,
|
|
@@ -3184,7 +3186,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3184
3186
|
setIsInterface = _useState8[1];
|
|
3185
3187
|
var firstIn = useRef(true);
|
|
3186
3188
|
useEffect(function () {
|
|
3187
|
-
AddressData.getInstance();
|
|
3188
3189
|
//存入第一次的物流地址,防止非对接物流切换成对接物流后无法编辑
|
|
3189
3190
|
if (firstIn.current && JSON.stringify(value) !== '{}') {
|
|
3190
3191
|
setInitCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
@@ -3261,11 +3262,25 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3261
3262
|
});
|
|
3262
3263
|
return isEditing && !!(company === null || company === void 0 ? void 0 : company.isInterface);
|
|
3263
3264
|
}, [isEditing, initCompany]);
|
|
3265
|
+
//退回地址列表
|
|
3264
3266
|
var logisticsAddressOptions = useMemo(function () {
|
|
3265
|
-
return
|
|
3267
|
+
return ((LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || []).filter(function (item) {
|
|
3266
3268
|
return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
3267
3269
|
});
|
|
3268
3270
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
3271
|
+
var returnValue = useMemo(function () {
|
|
3272
|
+
var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
|
|
3273
|
+
var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
|
|
3274
|
+
cpCode: (value === null || value === void 0 ? void 0 : value.interceptCompany) || '',
|
|
3275
|
+
province: value === null || value === void 0 ? void 0 : (_value$interceptAddre = value.interceptAddress) === null || _value$interceptAddre === void 0 ? void 0 : _value$interceptAddre[0],
|
|
3276
|
+
city: value === null || value === void 0 ? void 0 : (_value$interceptAddre2 = value.interceptAddress) === null || _value$interceptAddre2 === void 0 ? void 0 : _value$interceptAddre2[1],
|
|
3277
|
+
district: value === null || value === void 0 ? void 0 : (_value$interceptAddre3 = value.interceptAddress) === null || _value$interceptAddre3 === void 0 ? void 0 : _value$interceptAddre3[2],
|
|
3278
|
+
detail: (value === null || value === void 0 ? void 0 : value.interceptDetail) || '',
|
|
3279
|
+
userName: (value === null || value === void 0 ? void 0 : value.interceptReceiverName) || '',
|
|
3280
|
+
mobile: (value === null || value === void 0 ? void 0 : value.interceptReceiverMobile) || ''
|
|
3281
|
+
});
|
|
3282
|
+
return uk || undefined;
|
|
3283
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptAddress]);
|
|
3269
3284
|
//选择回调
|
|
3270
3285
|
var changeHandle = function changeHandle(val, type) {
|
|
3271
3286
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
@@ -3273,13 +3288,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3273
3288
|
var interceptCompany = expressInterceptData.find(function (item) {
|
|
3274
3289
|
return item.value === val;
|
|
3275
3290
|
});
|
|
3276
|
-
var
|
|
3291
|
+
var _returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
3277
3292
|
var _item$config3;
|
|
3278
3293
|
return item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.isDefault;
|
|
3279
3294
|
});
|
|
3280
3295
|
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3281
3296
|
interceptCompany: val,
|
|
3282
|
-
interceptType:
|
|
3297
|
+
interceptType: _returnValue === null || _returnValue === void 0 ? void 0 : _returnValue.value,
|
|
3283
3298
|
interceptSenderMobile: undefined,
|
|
3284
3299
|
interceptAddress: [],
|
|
3285
3300
|
interceptDetail: undefined,
|
|
@@ -3292,31 +3307,20 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3292
3307
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
3293
3308
|
};
|
|
3294
3309
|
//智能识别回调
|
|
3295
|
-
var changeIdentify = function changeIdentify(val
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, typeMap[type], val));
|
|
3305
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
3306
|
-
} else {
|
|
3307
|
-
//智能识别返填
|
|
3308
|
-
var parseValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3309
|
-
interceptAddress: (val === null || val === void 0 ? void 0 : val.address) || [],
|
|
3310
|
-
interceptDetail: (val === null || val === void 0 ? void 0 : val.detail) || '',
|
|
3311
|
-
interceptReceiverName: (val === null || val === void 0 ? void 0 : val.receiverName) || '',
|
|
3312
|
-
interceptReceiverMobile: (val === null || val === void 0 ? void 0 : val.receiverMobile) || ''
|
|
3313
|
-
});
|
|
3314
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(parseValue);
|
|
3315
|
-
}
|
|
3310
|
+
var changeIdentify = function changeIdentify(val) {
|
|
3311
|
+
//智能识别返填
|
|
3312
|
+
var parseValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3313
|
+
interceptAddress: (val === null || val === void 0 ? void 0 : val.address) || [],
|
|
3314
|
+
interceptDetail: (val === null || val === void 0 ? void 0 : val.detail) || '',
|
|
3315
|
+
interceptReceiverName: (val === null || val === void 0 ? void 0 : val.receiverName) || '',
|
|
3316
|
+
interceptReceiverMobile: (val === null || val === void 0 ? void 0 : val.receiverMobile) || ''
|
|
3317
|
+
});
|
|
3318
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parseValue);
|
|
3316
3319
|
};
|
|
3317
3320
|
//选择退回地址
|
|
3318
3321
|
var changeReturnAddress = function changeReturnAddress(uk) {
|
|
3319
3322
|
var item = LogisticsAddress.getItemByUk(uk);
|
|
3323
|
+
console.log(item);
|
|
3320
3324
|
if (item) {
|
|
3321
3325
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
3322
3326
|
interceptAddress: [item === null || item === void 0 ? void 0 : item.province, item === null || item === void 0 ? void 0 : item.city, item === null || item === void 0 ? void 0 : item.district],
|
|
@@ -3326,7 +3330,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3326
3330
|
}));
|
|
3327
3331
|
}
|
|
3328
3332
|
};
|
|
3329
|
-
return /*#__PURE__*/React.createElement(
|
|
3333
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3334
|
+
className: css_248z$6.interceptBox
|
|
3335
|
+
}, /*#__PURE__*/React.createElement(Item, {
|
|
3330
3336
|
label: '物流信息',
|
|
3331
3337
|
required: required,
|
|
3332
3338
|
key: 'logistics'
|
|
@@ -3389,9 +3395,19 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3389
3395
|
key: 'returnAddress',
|
|
3390
3396
|
hidden: !showReturnAddress
|
|
3391
3397
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3398
|
+
disabled: disabled || isEdit,
|
|
3399
|
+
value: returnValue,
|
|
3400
|
+
onChange: changeReturnAddress,
|
|
3401
|
+
placeholder: "\u8BF7\u9009\u62E9\u9000\u56DE\u5730\u5740",
|
|
3402
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
3403
|
+
return triggerNode.parentElement;
|
|
3404
|
+
}
|
|
3405
|
+
}, logisticsAddressOptions.map(function (item) {
|
|
3406
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
3407
|
+
key: item.uk,
|
|
3408
|
+
value: item.uk
|
|
3409
|
+
}, "".concat(address$1.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address$1.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address$1.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
|
|
3410
|
+
}))), /*#__PURE__*/React.createElement(Item, {
|
|
3395
3411
|
label: '派送地址',
|
|
3396
3412
|
required: true,
|
|
3397
3413
|
key: 'newAddress',
|
|
@@ -3549,8 +3565,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
3549
3565
|
})) : null) : null);
|
|
3550
3566
|
};
|
|
3551
3567
|
|
|
3552
|
-
var css_248z$
|
|
3553
|
-
styleInject(css_248z$
|
|
3568
|
+
var css_248z$7 = ".jstGoodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.jstGoodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.jstGoodsBox .right-context {\n font-size: 12px;\n}\n.jstGoodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.jstGoodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.jstGoodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.jstimgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n display: flex;\n justify-items: center;\n align-items: center;\n}\n.jstimgBox .add-btn {\n color: #86909c;\n}\n.jstimgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
3569
|
+
styleInject(css_248z$7);
|
|
3554
3570
|
|
|
3555
3571
|
var ItemList = function ItemList(props) {
|
|
3556
3572
|
var _props$value = props.value,
|
|
@@ -3623,8 +3639,8 @@ var ItemList = function ItemList(props) {
|
|
|
3623
3639
|
}, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
|
|
3624
3640
|
};
|
|
3625
3641
|
|
|
3626
|
-
var css_248z$
|
|
3627
|
-
styleInject(css_248z$
|
|
3642
|
+
var css_248z$8 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
3643
|
+
styleInject(css_248z$8);
|
|
3628
3644
|
|
|
3629
3645
|
var TabPane$1 = Tabs.TabPane;
|
|
3630
3646
|
var Option$2 = Select.Option;
|
package/dist/index.js
CHANGED
|
@@ -3111,7 +3111,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
3111
3111
|
_props$disabled = props.disabled,
|
|
3112
3112
|
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
3113
3113
|
var changeHandle = function changeHandle(val, type) {
|
|
3114
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
3114
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
3115
3115
|
};
|
|
3116
3116
|
var handleParseLogistics = function handleParseLogistics(val) {
|
|
3117
3117
|
var params = {
|
|
@@ -3158,8 +3158,12 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
3158
3158
|
})));
|
|
3159
3159
|
};
|
|
3160
3160
|
|
|
3161
|
+
var css_248z$6 = ".interceptBox :global(.ant-select-item-option-content) {\n overflow: auto !important;\n white-space: initial !important;\n}\n";
|
|
3162
|
+
styleInject(css_248z$6);
|
|
3163
|
+
|
|
3161
3164
|
var Item = antd.Form.Item;
|
|
3162
3165
|
var LogisticsAddress = kmkfUtils.LogisticsAddressData.getInstance();
|
|
3166
|
+
var address$1 = kmkfUtils.AddressData.getInstance();
|
|
3163
3167
|
var LogisticsInterception = function LogisticsInterception(props) {
|
|
3164
3168
|
var _props$value = props.value,
|
|
3165
3169
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -3167,8 +3171,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3167
3171
|
logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
|
|
3168
3172
|
_props$expressInterce = props.expressInterceptData,
|
|
3169
3173
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
3170
|
-
_props$logisticsAddre = props.logisticsAddressData,
|
|
3171
|
-
logisticsAddressData = _props$logisticsAddre === void 0 ? [] : _props$logisticsAddre,
|
|
3172
3174
|
_props$required = props.required,
|
|
3173
3175
|
required = _props$required === void 0 ? false : _props$required,
|
|
3174
3176
|
onChange = props.onChange,
|
|
@@ -3194,7 +3196,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3194
3196
|
setIsInterface = _useState8[1];
|
|
3195
3197
|
var firstIn = React.useRef(true);
|
|
3196
3198
|
React.useEffect(function () {
|
|
3197
|
-
kmkfUtils.AddressData.getInstance();
|
|
3198
3199
|
//存入第一次的物流地址,防止非对接物流切换成对接物流后无法编辑
|
|
3199
3200
|
if (firstIn.current && JSON.stringify(value) !== '{}') {
|
|
3200
3201
|
setInitCompany(value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
@@ -3271,11 +3272,25 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3271
3272
|
});
|
|
3272
3273
|
return isEditing && !!(company === null || company === void 0 ? void 0 : company.isInterface);
|
|
3273
3274
|
}, [isEditing, initCompany]);
|
|
3275
|
+
//退回地址列表
|
|
3274
3276
|
var logisticsAddressOptions = React.useMemo(function () {
|
|
3275
|
-
return
|
|
3277
|
+
return ((LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || []).filter(function (item) {
|
|
3276
3278
|
return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
3277
3279
|
});
|
|
3278
3280
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
3281
|
+
var returnValue = React.useMemo(function () {
|
|
3282
|
+
var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
|
|
3283
|
+
var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
|
|
3284
|
+
cpCode: (value === null || value === void 0 ? void 0 : value.interceptCompany) || '',
|
|
3285
|
+
province: value === null || value === void 0 ? void 0 : (_value$interceptAddre = value.interceptAddress) === null || _value$interceptAddre === void 0 ? void 0 : _value$interceptAddre[0],
|
|
3286
|
+
city: value === null || value === void 0 ? void 0 : (_value$interceptAddre2 = value.interceptAddress) === null || _value$interceptAddre2 === void 0 ? void 0 : _value$interceptAddre2[1],
|
|
3287
|
+
district: value === null || value === void 0 ? void 0 : (_value$interceptAddre3 = value.interceptAddress) === null || _value$interceptAddre3 === void 0 ? void 0 : _value$interceptAddre3[2],
|
|
3288
|
+
detail: (value === null || value === void 0 ? void 0 : value.interceptDetail) || '',
|
|
3289
|
+
userName: (value === null || value === void 0 ? void 0 : value.interceptReceiverName) || '',
|
|
3290
|
+
mobile: (value === null || value === void 0 ? void 0 : value.interceptReceiverMobile) || ''
|
|
3291
|
+
});
|
|
3292
|
+
return uk || undefined;
|
|
3293
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany, value === null || value === void 0 ? void 0 : value.interceptAddress]);
|
|
3279
3294
|
//选择回调
|
|
3280
3295
|
var changeHandle = function changeHandle(val, type) {
|
|
3281
3296
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
@@ -3283,13 +3298,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3283
3298
|
var interceptCompany = expressInterceptData.find(function (item) {
|
|
3284
3299
|
return item.value === val;
|
|
3285
3300
|
});
|
|
3286
|
-
var
|
|
3301
|
+
var _returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
|
|
3287
3302
|
var _item$config3;
|
|
3288
3303
|
return item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.isDefault;
|
|
3289
3304
|
});
|
|
3290
3305
|
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3291
3306
|
interceptCompany: val,
|
|
3292
|
-
interceptType:
|
|
3307
|
+
interceptType: _returnValue === null || _returnValue === void 0 ? void 0 : _returnValue.value,
|
|
3293
3308
|
interceptSenderMobile: undefined,
|
|
3294
3309
|
interceptAddress: [],
|
|
3295
3310
|
interceptDetail: undefined,
|
|
@@ -3302,31 +3317,20 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3302
3317
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
3303
3318
|
};
|
|
3304
3319
|
//智能识别回调
|
|
3305
|
-
var changeIdentify = function changeIdentify(val
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, typeMap[type], val));
|
|
3315
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
3316
|
-
} else {
|
|
3317
|
-
//智能识别返填
|
|
3318
|
-
var parseValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3319
|
-
interceptAddress: (val === null || val === void 0 ? void 0 : val.address) || [],
|
|
3320
|
-
interceptDetail: (val === null || val === void 0 ? void 0 : val.detail) || '',
|
|
3321
|
-
interceptReceiverName: (val === null || val === void 0 ? void 0 : val.receiverName) || '',
|
|
3322
|
-
interceptReceiverMobile: (val === null || val === void 0 ? void 0 : val.receiverMobile) || ''
|
|
3323
|
-
});
|
|
3324
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(parseValue);
|
|
3325
|
-
}
|
|
3320
|
+
var changeIdentify = function changeIdentify(val) {
|
|
3321
|
+
//智能识别返填
|
|
3322
|
+
var parseValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
3323
|
+
interceptAddress: (val === null || val === void 0 ? void 0 : val.address) || [],
|
|
3324
|
+
interceptDetail: (val === null || val === void 0 ? void 0 : val.detail) || '',
|
|
3325
|
+
interceptReceiverName: (val === null || val === void 0 ? void 0 : val.receiverName) || '',
|
|
3326
|
+
interceptReceiverMobile: (val === null || val === void 0 ? void 0 : val.receiverMobile) || ''
|
|
3327
|
+
});
|
|
3328
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parseValue);
|
|
3326
3329
|
};
|
|
3327
3330
|
//选择退回地址
|
|
3328
3331
|
var changeReturnAddress = function changeReturnAddress(uk) {
|
|
3329
3332
|
var item = LogisticsAddress.getItemByUk(uk);
|
|
3333
|
+
console.log(item);
|
|
3330
3334
|
if (item) {
|
|
3331
3335
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
3332
3336
|
interceptAddress: [item === null || item === void 0 ? void 0 : item.province, item === null || item === void 0 ? void 0 : item.city, item === null || item === void 0 ? void 0 : item.district],
|
|
@@ -3336,7 +3340,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3336
3340
|
}));
|
|
3337
3341
|
}
|
|
3338
3342
|
};
|
|
3339
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
3343
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3344
|
+
className: css_248z$6.interceptBox
|
|
3345
|
+
}, /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
3340
3346
|
label: '物流信息',
|
|
3341
3347
|
required: required,
|
|
3342
3348
|
key: 'logistics'
|
|
@@ -3399,9 +3405,19 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
3399
3405
|
key: 'returnAddress',
|
|
3400
3406
|
hidden: !showReturnAddress
|
|
3401
3407
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3408
|
+
disabled: disabled || isEdit,
|
|
3409
|
+
value: returnValue,
|
|
3410
|
+
onChange: changeReturnAddress,
|
|
3411
|
+
placeholder: "\u8BF7\u9009\u62E9\u9000\u56DE\u5730\u5740",
|
|
3412
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
3413
|
+
return triggerNode.parentElement;
|
|
3414
|
+
}
|
|
3415
|
+
}, logisticsAddressOptions.map(function (item) {
|
|
3416
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
3417
|
+
key: item.uk,
|
|
3418
|
+
value: item.uk
|
|
3419
|
+
}, "".concat(address$1.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address$1.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address$1.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
|
|
3420
|
+
}))), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
3405
3421
|
label: '派送地址',
|
|
3406
3422
|
required: true,
|
|
3407
3423
|
key: 'newAddress',
|
|
@@ -3559,8 +3575,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
3559
3575
|
})) : null) : null);
|
|
3560
3576
|
};
|
|
3561
3577
|
|
|
3562
|
-
var css_248z$
|
|
3563
|
-
styleInject(css_248z$
|
|
3578
|
+
var css_248z$7 = ".jstGoodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.jstGoodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.jstGoodsBox .right-context {\n font-size: 12px;\n}\n.jstGoodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.jstGoodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.jstGoodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.jstimgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n display: flex;\n justify-items: center;\n align-items: center;\n}\n.jstimgBox .add-btn {\n color: #86909c;\n}\n.jstimgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
3579
|
+
styleInject(css_248z$7);
|
|
3564
3580
|
|
|
3565
3581
|
var ItemList = function ItemList(props) {
|
|
3566
3582
|
var _props$value = props.value,
|
|
@@ -3633,8 +3649,8 @@ var ItemList = function ItemList(props) {
|
|
|
3633
3649
|
}, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
|
|
3634
3650
|
};
|
|
3635
3651
|
|
|
3636
|
-
var css_248z$
|
|
3637
|
-
styleInject(css_248z$
|
|
3652
|
+
var css_248z$8 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
3653
|
+
styleInject(css_248z$8);
|
|
3638
3654
|
|
|
3639
3655
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
3640
3656
|
var Option$2 = antd.Select.Option;
|
|
@@ -6,7 +6,7 @@ interface IdentifyAddressProps {
|
|
|
6
6
|
receiverName: string;
|
|
7
7
|
receiverMobile: string;
|
|
8
8
|
};
|
|
9
|
-
onChange: (value: any
|
|
9
|
+
onChange: (value: any) => void;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare const IdentifyAddress: (props: IdentifyAddressProps) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.7.1-alpha.
|
|
3
|
+
"version": "0.7.1-alpha.2",
|
|
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.7.1-alpha.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.1-alpha.1",
|
|
24
24
|
"umi-request": "^1.4.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "2ae79c47f83028fa24768cc565733214c7a313bb"
|
|
58
58
|
}
|