cloud-business 0.1.120-8 → 0.1.120-9

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/cloud-business.js CHANGED
@@ -30891,39 +30891,31 @@
30891
30891
  }
30892
30892
  });
30893
30893
  }
30894
- if (city) {
30895
- editValues.push({
30896
- field: "cityName",
30897
- value: {
30898
- "id": city,
30899
- "name": cityName || customerInfo.cityName
30900
- }
30901
- });
30902
- }
30903
- if (district) {
30904
- editValues.push({
30905
- field: "districtName",
30906
- value: {
30907
- "id": district,
30908
- "name": districtName || customerInfo.districtName
30909
- }
30910
- });
30911
- }
30912
- if (town) {
30913
- editValues.push({
30914
- field: "townName",
30915
- value: {
30916
- "id": town,
30917
- "name": townName || customerInfo.townName
30918
- }
30919
- });
30920
- }
30921
- if (address) {
30922
- editValues.push({
30923
- field: "address",
30924
- value: address
30925
- });
30926
- }
30894
+ editValues.push({
30895
+ field: "cityName",
30896
+ value: {
30897
+ "id": city,
30898
+ "name": city ? cityName || customerInfo.cityName : ''
30899
+ }
30900
+ });
30901
+ editValues.push({
30902
+ field: "districtName",
30903
+ value: {
30904
+ "id": district,
30905
+ "name": district ? districtName || customerInfo.districtName : ''
30906
+ }
30907
+ });
30908
+ editValues.push({
30909
+ field: "townName",
30910
+ value: {
30911
+ "id": town,
30912
+ "name": town ? townName || customerInfo.townName : ''
30913
+ }
30914
+ });
30915
+ editValues.push({
30916
+ field: "address",
30917
+ value: address
30918
+ });
30927
30919
  var saveObj = {};
30928
30920
  editValues.forEach(function (item) {
30929
30921
  var _customerInfoOrigin$i = customerInfoOrigin[item.field],
@@ -31210,7 +31202,7 @@
31210
31202
  function renderInfoValue(value) {
31211
31203
  return value || "-";
31212
31204
  }
31213
- function renderInfoValueSpecial(value, type) {
31205
+ function renderInfoValueSpecial(value, type, infoValue) {
31214
31206
  var tip = {
31215
31207
  type: 1,
31216
31208
  text: value
@@ -31220,7 +31212,7 @@
31220
31212
  className: "customer-info-text-address"
31221
31213
  }, /*#__PURE__*/React__default['default'].createElement(OverLengthTip, {
31222
31214
  tip: tip
31223
- })), /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tooltip, {
31215
+ })), infoValue === BASIC_INFO && /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tooltip, {
31224
31216
  placement: "top",
31225
31217
  content: "\u6B64\u5904\u663E\u793A\u5E73\u53F0\u4FA7\u63D0\u4F9B\u7684\u5BC6\u6587\u6570\u636E\uFF08\u5E73\u53F0\u4FA7\u4E0D\u652F\u6301\u89E3\u5BC6\u64CD\u4F5C\uFF09"
31226
31218
  }, /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
@@ -31232,7 +31224,7 @@
31232
31224
  className: "customer-info-text-address"
31233
31225
  }, /*#__PURE__*/React__default['default'].createElement(OverLengthTip, {
31234
31226
  tip: tip
31235
- })), /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tooltip, {
31227
+ })), infoValue === BASIC_INFO && /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Tooltip, {
31236
31228
  placement: "top",
31237
31229
  content: "\u6B64\u5904\u663E\u793A\u5E73\u53F0\u4FA7\u63D0\u4F9B\u7684\u5BC6\u6587\u6570\u636E\uFF08\u5E73\u53F0\u4FA7\u4E0D\u652F\u6301\u89E3\u5BC6\u64CD\u4F5C\uFF09"
31238
31230
  }, /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
@@ -31276,10 +31268,6 @@
31276
31268
  _useState12 = _slicedToArray(_useState11, 2),
31277
31269
  customerInfoOrigin = _useState12[0],
31278
31270
  setCustomerInfoOrigin = _useState12[1];
31279
- var _useState13 = React.useState({}),
31280
- _useState14 = _slicedToArray(_useState13, 2),
31281
- encryptInfo = _useState14[0],
31282
- setEncryptInfo = _useState14[1];
31283
31271
  var closeCustomerInfoEdit = /*#__PURE__*/function () {
31284
31272
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type) {
31285
31273
  var v, data;
@@ -31290,7 +31278,7 @@
31290
31278
 
31291
31279
  // 保存成功后重新拉取数据
31292
31280
  if (!(type === 'save')) {
31293
- _context.next = 8;
31281
+ _context.next = 7;
31294
31282
  break;
31295
31283
  }
31296
31284
  v = {
@@ -31305,11 +31293,8 @@
31305
31293
  }, v);
31306
31294
  case 5:
31307
31295
  data = _context.sent;
31308
- setEncryptInfo(data);
31309
- return _context.abrupt("return");
31310
- case 8:
31311
- setCustomerInfo(encryptInfo);
31312
- case 9:
31296
+ setCustomerInfo(_objectSpread2(_objectSpread2({}, data), v));
31297
+ case 7:
31313
31298
  case "end":
31314
31299
  return _context.stop();
31315
31300
  }
@@ -31404,12 +31389,6 @@
31404
31389
  }
31405
31390
  }
31406
31391
  });
31407
- if (type) {
31408
- // 处理展开隐藏操作
31409
- setCustomerInfo(_objectSpread2(_objectSpread2(_objectSpread2({}, customerInfo), v), {}, _defineProperty(_defineProperty({}, "".concat(type, "Temp"), info[type]), type, customerInfo[type])));
31410
- } else {
31411
- setCustomerInfo(_objectSpread2(_objectSpread2({}, info), v));
31412
- }
31413
31392
  return info;
31414
31393
  });
31415
31394
  case 2:
@@ -31465,7 +31444,7 @@
31465
31444
  }, v);
31466
31445
  case 8:
31467
31446
  data = _context4.sent;
31468
- setEncryptInfo(data);
31447
+ setCustomerInfo(_objectSpread2(_objectSpread2({}, data), v));
31469
31448
  if (data) {
31470
31449
  setInfoValue(id);
31471
31450
  }
@@ -31481,7 +31460,7 @@
31481
31460
  }();
31482
31461
  var changeCustomerInfo = /*#__PURE__*/function () {
31483
31462
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(ci, type) {
31484
- var res, _res, _res2, _res3;
31463
+ var res, _res, _res2, _res3, info;
31485
31464
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
31486
31465
  while (1) switch (_context5.prev = _context5.next) {
31487
31466
  case 0:
@@ -31542,11 +31521,11 @@
31542
31521
  return _context5.abrupt("return");
31543
31522
  case 25:
31544
31523
  if (!(infoValue === MAINTAIN_INFO)) {
31545
- _context5.next = 30;
31524
+ _context5.next = 32;
31546
31525
  break;
31547
31526
  }
31548
31527
  if (!(type === 'fullName' && !customerInfo.fullNameTemp || type === 'mobile' && !customerInfo.mobileTemp || type === 'email' && !customerInfo.emailTemp || type === 'address' && !customerInfo.addressTemp)) {
31549
- _context5.next = 30;
31528
+ _context5.next = 32;
31550
31529
  break;
31551
31530
  }
31552
31531
  _context5.next = 29;
@@ -31554,10 +31533,13 @@
31554
31533
  encrypt: false
31555
31534
  }, ci, type);
31556
31535
  case 29:
31536
+ info = _context5.sent;
31537
+ // 处理展开隐藏操作
31538
+ setCustomerInfo(_objectSpread2(_objectSpread2(_objectSpread2({}, customerInfo), ci), {}, _defineProperty(_defineProperty({}, "".concat(type, "Temp"), info[type]), type, customerInfo[type])));
31557
31539
  return _context5.abrupt("return");
31558
- case 30:
31540
+ case 32:
31559
31541
  setCustomerInfo(_objectSpread2(_objectSpread2({}, customerInfo), ci));
31560
- case 31:
31542
+ case 33:
31561
31543
  case "end":
31562
31544
  return _context5.stop();
31563
31545
  }
@@ -31650,7 +31632,7 @@
31650
31632
  className: "customer-info"
31651
31633
  }, /*#__PURE__*/React__default['default'].createElement("span", null, "\u59D3\u540D\uFF1A"), /*#__PURE__*/React__default['default'].createElement("span", {
31652
31634
  className: "customer-info-text"
31653
- }, renderInfoValueSpecial(customerInfo.fullNameV ? customerInfo.fullNameTemp : customerInfo.fullName, 'fullName'), customerInfo.fullName ? !customerInfo.fullNameV ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
31635
+ }, renderInfoValueSpecial(customerInfo.fullNameV ? customerInfo.fullNameTemp : customerInfo.fullName, 'fullName', infoValue), customerInfo.fullName ? !customerInfo.fullNameV ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
31654
31636
  type: "view",
31655
31637
  onClick: function onClick() {
31656
31638
  return changeCustomerInfo({
@@ -31672,7 +31654,7 @@
31672
31654
  className: "customer-info"
31673
31655
  }, /*#__PURE__*/React__default['default'].createElement("span", null, "\u6700\u65B0\u624B\u673A\u53F7\uFF1A"), /*#__PURE__*/React__default['default'].createElement("span", {
31674
31656
  className: "customer-info-text customer-info-text-special"
31675
- }, renderInfoValueSpecial(customerInfo.mobileV ? customerInfo.mobileTemp : customerInfo.mobile, 'mobile'), customerInfo.mobile ? !customerInfo.mobileV ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
31657
+ }, renderInfoValueSpecial(customerInfo.mobileV ? customerInfo.mobileTemp : customerInfo.mobile, 'mobile', infoValue), customerInfo.mobile ? !customerInfo.mobileV ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
31676
31658
  type: "view",
31677
31659
  onClick: function onClick() {
31678
31660
  return changeCustomerInfo({
@@ -31716,7 +31698,7 @@
31716
31698
  className: "customer-info"
31717
31699
  }, /*#__PURE__*/React__default['default'].createElement("span", null, "\u5730\u5740\uFF1A"), /*#__PURE__*/React__default['default'].createElement("span", {
31718
31700
  className: "customer-info-text"
31719
- }, renderInfoValueSpecial("".concat(customerInfo.stateName || '').concat(customerInfo.cityName || '').concat(customerInfo.districtName || '').concat(customerInfo.addressV ? customerInfo.addressTemp : customerInfo.address || ''), 'address'), customerInfo.address ? !customerInfo.addressV ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
31701
+ }, renderInfoValueSpecial("".concat(customerInfo.stateName || '').concat(customerInfo.cityName || '').concat(customerInfo.districtName || '').concat(customerInfo.addressV ? customerInfo.addressTemp : customerInfo.address || ''), 'address', infoValue), customerInfo.address ? !customerInfo.addressV ? /*#__PURE__*/React__default['default'].createElement(cloudReactV2.Icon, {
31720
31702
  type: "view",
31721
31703
  onClick: function onClick() {
31722
31704
  return changeCustomerInfo({
@@ -146590,7 +146572,7 @@
146590
146572
  }
146591
146573
  // 检验当前运行环境
146592
146574
  if (typeof window === 'undefined') {
146593
- console.warn('cloud-business@0.1.120-8 仅支持在浏览器环境进行使用!');
146575
+ console.warn('cloud-business@0.1.120-9 仅支持在浏览器环境进行使用!');
146594
146576
  }
146595
146577
  var bodys = document.getElementsByTagName('body')[0];
146596
146578
  var colors = [1, 2, 3, 4, 5, 6, 7];
@@ -146600,7 +146582,7 @@
146600
146582
  bodys.style.setProperty("--shuyunBlue".concat(i$2 + 1), color);
146601
146583
  }
146602
146584
  }
146603
- var version = '0.1.120-8';
146585
+ var version = '0.1.120-9';
146604
146586
 
146605
146587
  exports.AreaSelector = AreaSelector;
146606
146588
  exports.AreaSelectorNew = AreaSelector$1;