@kmkf-fe-packages/basic-components 0.6.3-alpha.30 → 0.6.3-alpha.38

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.
@@ -6,8 +6,8 @@ interface LogisticsInterceptionValueType {
6
6
  interceptDetail: string;
7
7
  interceptReceiverName: string;
8
8
  interceptReceiverMobile: string;
9
- interceptStatus: string | number;
10
- interceptOther: string;
9
+ interceptLogisticsStatus: string | number;
10
+ interceptLogisticsStatusOther: string;
11
11
  }
12
12
  interface LogisticsInterceptionProps {
13
13
  value: Partial<LogisticsInterceptionValueType>;
@@ -16,7 +16,6 @@ interface LogisticsInterceptionProps {
16
16
  required: boolean;
17
17
  disabled: boolean;
18
18
  isEditing: boolean;
19
- logisticsInterceptHandleStatus: string;
20
19
  onChange: (value: Partial<LogisticsInterceptionValueType>) => void;
21
20
  }
22
21
  declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) => JSX.Element;
package/dist/index.esm.js CHANGED
@@ -3119,8 +3119,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3119
3119
  _props$disabled = props.disabled,
3120
3120
  disabled = _props$disabled === void 0 ? false : _props$disabled,
3121
3121
  _props$isEditing = props.isEditing,
3122
- isEditing = _props$isEditing === void 0 ? false : _props$isEditing,
3123
- logisticsInterceptHandleStatus = props.logisticsInterceptHandleStatus;
3122
+ isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
3124
3123
  var _useState = useState(''),
3125
3124
  _useState2 = _slicedToArray(_useState, 2),
3126
3125
  initCompany = _useState2[0],
@@ -3154,7 +3153,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3154
3153
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptCompany);
3155
3154
  });
3156
3155
  setTypeOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []);
3157
- setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionStatusList) || []);
3156
+ setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.logisticsStatusList) || []);
3158
3157
  setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
3159
3158
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
3160
3159
  //拦截类型切换 需要清空新派送地
@@ -3183,18 +3182,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
3183
3182
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3184
3183
  })) === null || _find === void 0 ? void 0 : (_find$config = _find.config) === null || _find$config === void 0 ? void 0 : _find$config.showAddress;
3185
3184
  }, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
3186
- //判断是否能修改信息
3187
- var canEdit = useMemo(function () {
3188
- // 已对接公司如果拦截状态为【拦截中】,可以修改物流拦截组件信息,否则该组件不能修改;
3189
- // 非对接公司可以修改组件
3190
- // 修改后把工单信息重新提交给快递公司,清空拦截状态的值
3191
- if (!isInterface) return true;
3192
- //已对接公司在拦截中可以修改
3193
- var INTERCEPTING = !logisticsInterceptHandleStatus || logisticsInterceptHandleStatus === 'INTERCEPTING';
3194
- return isEditing ? INTERCEPTING : true;
3195
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany, statusOptions, isInterface, isEditing]);
3196
3185
  //判断是否能修改物流信息
3197
- var canEditCompany = useMemo(function () {
3186
+ var canEdit = useMemo(function () {
3198
3187
  var company = expressInterceptData.find(function (item) {
3199
3188
  return item.value === initCompany;
3200
3189
  });
@@ -3207,7 +3196,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
3207
3196
  return item.value === val;
3208
3197
  });
3209
3198
  var returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
3210
- return item === null || item === void 0 ? void 0 : item.isDefault;
3199
+ var _item$config2;
3200
+ return item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.isDefault;
3211
3201
  });
3212
3202
  newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3213
3203
  interceptCompany: val,
@@ -3216,8 +3206,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
3216
3206
  interceptDetail: undefined,
3217
3207
  interceptReceiverName: undefined,
3218
3208
  interceptReceiverMobile: undefined,
3219
- interceptStatus: undefined,
3220
- interceptOther: undefined
3209
+ interceptLogisticsStatus: undefined,
3210
+ interceptLogisticsStatusOther: undefined
3221
3211
  });
3222
3212
  }
3223
3213
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -3227,7 +3217,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3227
3217
  required: required,
3228
3218
  key: 'logistics'
3229
3219
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
3230
- disabled: disabled || canEditCompany,
3220
+ disabled: disabled || canEdit,
3231
3221
  placeholder: "\u7269\u6D41\u516C\u53F8",
3232
3222
  style: {
3233
3223
  width: '150px'
@@ -3242,7 +3232,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3242
3232
  return option.label.includes(input);
3243
3233
  }
3244
3234
  }), /*#__PURE__*/React.createElement(Input, {
3245
- disabled: disabled || canEditCompany,
3235
+ disabled: disabled || canEdit,
3246
3236
  placeholder: "\u7269\u6D41\u5355\u53F7",
3247
3237
  onChange: function onChange(e) {
3248
3238
  return changeHandle(e.target.value, 'interceptCode');
@@ -3253,7 +3243,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3253
3243
  required: required,
3254
3244
  key: 'interceptType'
3255
3245
  }, /*#__PURE__*/React.createElement(Select, {
3256
- disabled: disabled || !canEdit,
3246
+ disabled: disabled || canEdit,
3257
3247
  style: {
3258
3248
  width: '200px'
3259
3249
  },
@@ -3278,31 +3268,31 @@ var LogisticsInterception = function LogisticsInterception(props) {
3278
3268
  return changeHandle(val, 'interceptAddress');
3279
3269
  },
3280
3270
  options: [],
3281
- disabled: disabled || !canEdit
3271
+ disabled: disabled || canEdit
3282
3272
  }), /*#__PURE__*/React.createElement(Input, {
3283
3273
  value: value === null || value === void 0 ? void 0 : value.interceptDetail,
3284
- disabled: disabled || !canEdit,
3274
+ disabled: disabled || canEdit,
3285
3275
  placeholder: "\u8BE6\u7EC6\u5730\u5740",
3286
3276
  onChange: function onChange(e) {
3287
3277
  return changeHandle(e.target.value, 'interceptDetail');
3288
3278
  }
3289
3279
  })), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
3290
3280
  value: value === null || value === void 0 ? void 0 : value.interceptReceiverName,
3291
- disabled: disabled || !canEdit,
3281
+ disabled: disabled || canEdit,
3292
3282
  placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
3293
3283
  onChange: function onChange(e) {
3294
3284
  return changeHandle(e.target.value, 'interceptReceiverName');
3295
3285
  }
3296
3286
  }), /*#__PURE__*/React.createElement(Input, {
3297
3287
  value: value === null || value === void 0 ? void 0 : value.interceptReceiverMobile,
3298
- disabled: disabled || !canEdit,
3288
+ disabled: disabled || canEdit,
3299
3289
  placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
3300
3290
  onChange: function onChange(e) {
3301
3291
  return changeHandle(e.target.value, 'interceptReceiverMobile');
3302
3292
  }
3303
3293
  }))), /*#__PURE__*/React.createElement(Item, {
3304
- label: '拦截状态',
3305
- key: 'interceptStatus'
3294
+ label: '物流状态',
3295
+ key: 'interceptLogisticsStatus'
3306
3296
  }, /*#__PURE__*/React.createElement(Select, {
3307
3297
  disabled: disabled || isInterface,
3308
3298
  style: {
@@ -3310,22 +3300,22 @@ var LogisticsInterception = function LogisticsInterception(props) {
3310
3300
  },
3311
3301
  options: statusOptions,
3312
3302
  onChange: function onChange(val) {
3313
- return changeHandle(val, 'interceptStatus');
3303
+ return changeHandle(val, 'interceptLogisticsStatus');
3314
3304
  },
3315
- value: value === null || value === void 0 ? void 0 : value.interceptStatus,
3316
- placeholder: "\u62E6\u622A\u72B6\u6001",
3305
+ value: value === null || value === void 0 ? void 0 : value.interceptLogisticsStatus,
3306
+ placeholder: "\u7269\u6D41\u72B6\u6001",
3317
3307
  showSearch: true,
3318
3308
  filterOption: function filterOption(input, option) {
3319
3309
  return option.label.includes(input);
3320
3310
  }
3321
- }), (value === null || value === void 0 ? void 0 : value.interceptStatus) === 'OTHER' && /*#__PURE__*/React.createElement(Input, {
3311
+ }), (value === null || value === void 0 ? void 0 : value.interceptLogisticsStatus) === 'OTHER' && /*#__PURE__*/React.createElement(Input, {
3322
3312
  disabled: disabled || !canEdit,
3323
3313
  style: {
3324
3314
  width: '200px'
3325
3315
  },
3326
3316
  placeholder: "\u5176\u4ED6",
3327
3317
  onChange: function onChange(e) {
3328
- return changeHandle(e.target.value, 'interceptOther');
3318
+ return changeHandle(e.target.value, 'interceptLogisticsStatusOther');
3329
3319
  }
3330
3320
  })));
3331
3321
  };
package/dist/index.js CHANGED
@@ -3129,8 +3129,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3129
3129
  _props$disabled = props.disabled,
3130
3130
  disabled = _props$disabled === void 0 ? false : _props$disabled,
3131
3131
  _props$isEditing = props.isEditing,
3132
- isEditing = _props$isEditing === void 0 ? false : _props$isEditing,
3133
- logisticsInterceptHandleStatus = props.logisticsInterceptHandleStatus;
3132
+ isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
3134
3133
  var _useState = React.useState(''),
3135
3134
  _useState2 = _slicedToArray(_useState, 2),
3136
3135
  initCompany = _useState2[0],
@@ -3164,7 +3163,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3164
3163
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptCompany);
3165
3164
  });
3166
3165
  setTypeOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []);
3167
- setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionStatusList) || []);
3166
+ setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.logisticsStatusList) || []);
3168
3167
  setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
3169
3168
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
3170
3169
  //拦截类型切换 需要清空新派送地
@@ -3193,18 +3192,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
3193
3192
  return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3194
3193
  })) === null || _find === void 0 ? void 0 : (_find$config = _find.config) === null || _find$config === void 0 ? void 0 : _find$config.showAddress;
3195
3194
  }, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
3196
- //判断是否能修改信息
3197
- var canEdit = React.useMemo(function () {
3198
- // 已对接公司如果拦截状态为【拦截中】,可以修改物流拦截组件信息,否则该组件不能修改;
3199
- // 非对接公司可以修改组件
3200
- // 修改后把工单信息重新提交给快递公司,清空拦截状态的值
3201
- if (!isInterface) return true;
3202
- //已对接公司在拦截中可以修改
3203
- var INTERCEPTING = !logisticsInterceptHandleStatus || logisticsInterceptHandleStatus === 'INTERCEPTING';
3204
- return isEditing ? INTERCEPTING : true;
3205
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany, statusOptions, isInterface, isEditing]);
3206
3195
  //判断是否能修改物流信息
3207
- var canEditCompany = React.useMemo(function () {
3196
+ var canEdit = React.useMemo(function () {
3208
3197
  var company = expressInterceptData.find(function (item) {
3209
3198
  return item.value === initCompany;
3210
3199
  });
@@ -3217,7 +3206,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
3217
3206
  return item.value === val;
3218
3207
  });
3219
3208
  var returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
3220
- return item === null || item === void 0 ? void 0 : item.isDefault;
3209
+ var _item$config2;
3210
+ return item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : _item$config2.isDefault;
3221
3211
  });
3222
3212
  newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3223
3213
  interceptCompany: val,
@@ -3226,8 +3216,8 @@ var LogisticsInterception = function LogisticsInterception(props) {
3226
3216
  interceptDetail: undefined,
3227
3217
  interceptReceiverName: undefined,
3228
3218
  interceptReceiverMobile: undefined,
3229
- interceptStatus: undefined,
3230
- interceptOther: undefined
3219
+ interceptLogisticsStatus: undefined,
3220
+ interceptLogisticsStatusOther: undefined
3231
3221
  });
3232
3222
  }
3233
3223
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -3237,7 +3227,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3237
3227
  required: required,
3238
3228
  key: 'logistics'
3239
3229
  }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
3240
- disabled: disabled || canEditCompany,
3230
+ disabled: disabled || canEdit,
3241
3231
  placeholder: "\u7269\u6D41\u516C\u53F8",
3242
3232
  style: {
3243
3233
  width: '150px'
@@ -3252,7 +3242,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3252
3242
  return option.label.includes(input);
3253
3243
  }
3254
3244
  }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3255
- disabled: disabled || canEditCompany,
3245
+ disabled: disabled || canEdit,
3256
3246
  placeholder: "\u7269\u6D41\u5355\u53F7",
3257
3247
  onChange: function onChange(e) {
3258
3248
  return changeHandle(e.target.value, 'interceptCode');
@@ -3263,7 +3253,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3263
3253
  required: required,
3264
3254
  key: 'interceptType'
3265
3255
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
3266
- disabled: disabled || !canEdit,
3256
+ disabled: disabled || canEdit,
3267
3257
  style: {
3268
3258
  width: '200px'
3269
3259
  },
@@ -3288,31 +3278,31 @@ var LogisticsInterception = function LogisticsInterception(props) {
3288
3278
  return changeHandle(val, 'interceptAddress');
3289
3279
  },
3290
3280
  options: [],
3291
- disabled: disabled || !canEdit
3281
+ disabled: disabled || canEdit
3292
3282
  }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3293
3283
  value: value === null || value === void 0 ? void 0 : value.interceptDetail,
3294
- disabled: disabled || !canEdit,
3284
+ disabled: disabled || canEdit,
3295
3285
  placeholder: "\u8BE6\u7EC6\u5730\u5740",
3296
3286
  onChange: function onChange(e) {
3297
3287
  return changeHandle(e.target.value, 'interceptDetail');
3298
3288
  }
3299
3289
  })), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3300
3290
  value: value === null || value === void 0 ? void 0 : value.interceptReceiverName,
3301
- disabled: disabled || !canEdit,
3291
+ disabled: disabled || canEdit,
3302
3292
  placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
3303
3293
  onChange: function onChange(e) {
3304
3294
  return changeHandle(e.target.value, 'interceptReceiverName');
3305
3295
  }
3306
3296
  }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3307
3297
  value: value === null || value === void 0 ? void 0 : value.interceptReceiverMobile,
3308
- disabled: disabled || !canEdit,
3298
+ disabled: disabled || canEdit,
3309
3299
  placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
3310
3300
  onChange: function onChange(e) {
3311
3301
  return changeHandle(e.target.value, 'interceptReceiverMobile');
3312
3302
  }
3313
3303
  }))), /*#__PURE__*/React__default['default'].createElement(Item, {
3314
- label: '拦截状态',
3315
- key: 'interceptStatus'
3304
+ label: '物流状态',
3305
+ key: 'interceptLogisticsStatus'
3316
3306
  }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
3317
3307
  disabled: disabled || isInterface,
3318
3308
  style: {
@@ -3320,22 +3310,22 @@ var LogisticsInterception = function LogisticsInterception(props) {
3320
3310
  },
3321
3311
  options: statusOptions,
3322
3312
  onChange: function onChange(val) {
3323
- return changeHandle(val, 'interceptStatus');
3313
+ return changeHandle(val, 'interceptLogisticsStatus');
3324
3314
  },
3325
- value: value === null || value === void 0 ? void 0 : value.interceptStatus,
3326
- placeholder: "\u62E6\u622A\u72B6\u6001",
3315
+ value: value === null || value === void 0 ? void 0 : value.interceptLogisticsStatus,
3316
+ placeholder: "\u7269\u6D41\u72B6\u6001",
3327
3317
  showSearch: true,
3328
3318
  filterOption: function filterOption(input, option) {
3329
3319
  return option.label.includes(input);
3330
3320
  }
3331
- }), (value === null || value === void 0 ? void 0 : value.interceptStatus) === 'OTHER' && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3321
+ }), (value === null || value === void 0 ? void 0 : value.interceptLogisticsStatus) === 'OTHER' && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3332
3322
  disabled: disabled || !canEdit,
3333
3323
  style: {
3334
3324
  width: '200px'
3335
3325
  },
3336
3326
  placeholder: "\u5176\u4ED6",
3337
3327
  onChange: function onChange(e) {
3338
- return changeHandle(e.target.value, 'interceptOther');
3328
+ return changeHandle(e.target.value, 'interceptLogisticsStatusOther');
3339
3329
  }
3340
3330
  })));
3341
3331
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.6.3-alpha.30",
3
+ "version": "0.6.3-alpha.38",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -24,7 +24,6 @@
24
24
  "devDependencies": {
25
25
  "@typescript-eslint/eslint-plugin": "^5.59.2",
26
26
  "@typescript-eslint/parser": "^5.59.2",
27
- "@umijs/test": "^3.0.5",
28
27
  "babel-plugin-import": "^1.13.5",
29
28
  "dumi": "^1.0.16",
30
29
  "eslint": "^8.40.0",
@@ -42,5 +41,5 @@
42
41
  "publishConfig": {
43
42
  "access": "public"
44
43
  },
45
- "gitHead": "17f4fb7c97d953750f7bb2028bf2b5fc8205afc5"
44
+ "gitHead": "1e5da5160f4fb42e4bf813799a28fefca5fcf3cf"
46
45
  }