@kmkf-fe-packages/basic-components 0.6.3-alpha.54 → 0.6.3-alpha.56

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
@@ -3113,14 +3113,25 @@ var LogisticsInterception = function LogisticsInterception(props) {
3113
3113
  var _item$config;
3114
3114
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.showAddress);
3115
3115
  });
3116
+ var showSender = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).some(function (item) {
3117
+ var _item$config2;
3118
+ return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.showSenderMobile);
3119
+ });
3120
+ var params = _objectSpread2({}, value);
3116
3121
  if (!showAddress) {
3117
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
3122
+ params = _objectSpread2(_objectSpread2({}, params), {}, {
3118
3123
  interceptAddress: [],
3119
3124
  interceptDetail: '',
3120
3125
  interceptReceiverName: '',
3121
3126
  interceptReceiverMobile: ''
3122
- }));
3127
+ });
3123
3128
  }
3129
+ if (!showSender) {
3130
+ params = _objectSpread2(_objectSpread2({}, params), {}, {
3131
+ interceptSenderMobile: undefined
3132
+ });
3133
+ }
3134
+ onChange === null || onChange === void 0 ? void 0 : onChange(params);
3124
3135
  }, [value === null || value === void 0 ? void 0 : value.interceptType]);
3125
3136
  //是否展示新地址
3126
3137
  var showNewAddress = useMemo(function () {
@@ -3129,6 +3140,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
3129
3140
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3130
3141
  })) === null || _find === void 0 ? void 0 : (_find$config = _find.config) === null || _find$config === void 0 ? void 0 : _find$config.showAddress;
3131
3142
  }, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
3143
+ //是否展示发件人手机号
3144
+ var showSenderMobile = useMemo(function () {
3145
+ var _find2, _find2$config;
3146
+ return (_find2 = (typeOptions || []).find(function (item) {
3147
+ return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3148
+ })) === null || _find2 === void 0 ? void 0 : (_find2$config = _find2.config) === null || _find2$config === void 0 ? void 0 : _find2$config.showSenderMobile;
3149
+ }, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
3132
3150
  //判断是否能修改物流信息
3133
3151
  var canEdit = useMemo(function () {
3134
3152
  var company = expressInterceptData.find(function (item) {
@@ -3143,12 +3161,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
3143
3161
  return item.value === val;
3144
3162
  });
3145
3163
  var returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
3146
- var _item$config2;
3147
- return item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.isDefault;
3164
+ var _item$config3;
3165
+ return item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.isDefault;
3148
3166
  });
3149
3167
  newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3150
3168
  interceptCompany: val,
3151
3169
  interceptType: returnValue === null || returnValue === void 0 ? void 0 : returnValue.value,
3170
+ interceptSenderMobile: undefined,
3152
3171
  interceptAddress: [],
3153
3172
  interceptDetail: undefined,
3154
3173
  interceptReceiverName: undefined,
@@ -3204,6 +3223,18 @@ var LogisticsInterception = function LogisticsInterception(props) {
3204
3223
  filterOption: function filterOption(input, option) {
3205
3224
  return option.label.includes(input);
3206
3225
  }
3226
+ })), /*#__PURE__*/React.createElement(Item, {
3227
+ label: '发件人手机号',
3228
+ required: true,
3229
+ key: 'interceptSenderMobile',
3230
+ hidden: !showSenderMobile
3231
+ }, /*#__PURE__*/React.createElement(Input, {
3232
+ value: value === null || value === void 0 ? void 0 : value.interceptSenderMobile,
3233
+ disabled: disabled || canEdit,
3234
+ placeholder: "\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7",
3235
+ onChange: function onChange(e) {
3236
+ return changeHandle(e.target.value, 'interceptSenderMobile');
3237
+ }
3207
3238
  })), /*#__PURE__*/React.createElement(Item, {
3208
3239
  label: '派送地址',
3209
3240
  required: true,
package/dist/index.js CHANGED
@@ -3123,14 +3123,25 @@ var LogisticsInterception = function LogisticsInterception(props) {
3123
3123
  var _item$config;
3124
3124
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.showAddress);
3125
3125
  });
3126
+ var showSender = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).some(function (item) {
3127
+ var _item$config2;
3128
+ return item.value === (value === null || value === void 0 ? void 0 : value.interceptType) && (item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.showSenderMobile);
3129
+ });
3130
+ var params = _objectSpread2({}, value);
3126
3131
  if (!showAddress) {
3127
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
3132
+ params = _objectSpread2(_objectSpread2({}, params), {}, {
3128
3133
  interceptAddress: [],
3129
3134
  interceptDetail: '',
3130
3135
  interceptReceiverName: '',
3131
3136
  interceptReceiverMobile: ''
3132
- }));
3137
+ });
3133
3138
  }
3139
+ if (!showSender) {
3140
+ params = _objectSpread2(_objectSpread2({}, params), {}, {
3141
+ interceptSenderMobile: undefined
3142
+ });
3143
+ }
3144
+ onChange === null || onChange === void 0 ? void 0 : onChange(params);
3134
3145
  }, [value === null || value === void 0 ? void 0 : value.interceptType]);
3135
3146
  //是否展示新地址
3136
3147
  var showNewAddress = React.useMemo(function () {
@@ -3139,6 +3150,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
3139
3150
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3140
3151
  })) === null || _find === void 0 ? void 0 : (_find$config = _find.config) === null || _find$config === void 0 ? void 0 : _find$config.showAddress;
3141
3152
  }, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
3153
+ //是否展示发件人手机号
3154
+ var showSenderMobile = React.useMemo(function () {
3155
+ var _find2, _find2$config;
3156
+ return (_find2 = (typeOptions || []).find(function (item) {
3157
+ return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3158
+ })) === null || _find2 === void 0 ? void 0 : (_find2$config = _find2.config) === null || _find2$config === void 0 ? void 0 : _find2$config.showSenderMobile;
3159
+ }, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
3142
3160
  //判断是否能修改物流信息
3143
3161
  var canEdit = React.useMemo(function () {
3144
3162
  var company = expressInterceptData.find(function (item) {
@@ -3153,12 +3171,13 @@ var LogisticsInterception = function LogisticsInterception(props) {
3153
3171
  return item.value === val;
3154
3172
  });
3155
3173
  var returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
3156
- var _item$config2;
3157
- return item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.isDefault;
3174
+ var _item$config3;
3175
+ return item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.isDefault;
3158
3176
  });
3159
3177
  newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3160
3178
  interceptCompany: val,
3161
3179
  interceptType: returnValue === null || returnValue === void 0 ? void 0 : returnValue.value,
3180
+ interceptSenderMobile: undefined,
3162
3181
  interceptAddress: [],
3163
3182
  interceptDetail: undefined,
3164
3183
  interceptReceiverName: undefined,
@@ -3214,6 +3233,18 @@ var LogisticsInterception = function LogisticsInterception(props) {
3214
3233
  filterOption: function filterOption(input, option) {
3215
3234
  return option.label.includes(input);
3216
3235
  }
3236
+ })), /*#__PURE__*/React__default['default'].createElement(Item, {
3237
+ label: '发件人手机号',
3238
+ required: true,
3239
+ key: 'interceptSenderMobile',
3240
+ hidden: !showSenderMobile
3241
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3242
+ value: value === null || value === void 0 ? void 0 : value.interceptSenderMobile,
3243
+ disabled: disabled || canEdit,
3244
+ placeholder: "\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7",
3245
+ onChange: function onChange(e) {
3246
+ return changeHandle(e.target.value, 'interceptSenderMobile');
3247
+ }
3217
3248
  })), /*#__PURE__*/React__default['default'].createElement(Item, {
3218
3249
  label: '派送地址',
3219
3250
  required: true,
@@ -3,6 +3,7 @@ interface LogisticsInterceptionValueType {
3
3
  interceptCompany: string;
4
4
  interceptCode: string;
5
5
  interceptType: string;
6
+ interceptSenderMobile: string;
6
7
  interceptAddress: any[];
7
8
  interceptDetail: string;
8
9
  interceptReceiverName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.6.3-alpha.54",
3
+ "version": "0.6.3-alpha.56",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "test": "jest"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.54",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.56",
24
24
  "umi-request": "^1.4.0"
25
25
  },
26
26
  "devDependencies": {
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "3374d90f3a3b8aa18e8d60390b8e95263ae3d967"
54
+ "gitHead": "7ba5b29d26ca0e9048f88e7c5d2eb472a6bd70c6"
55
55
  }