@kmkf-fe-packages/basic-components 2.0.55 → 2.0.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
@@ -473,6 +473,57 @@ function _nonIterableSpread() {
473
473
  function _nonIterableRest() {
474
474
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
475
475
  }
476
+ function _createForOfIteratorHelper(o, allowArrayLike) {
477
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
478
+ if (!it) {
479
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
480
+ if (it) o = it;
481
+ var i = 0;
482
+ var F = function () {};
483
+ return {
484
+ s: F,
485
+ n: function () {
486
+ if (i >= o.length) return {
487
+ done: true
488
+ };
489
+ return {
490
+ done: false,
491
+ value: o[i++]
492
+ };
493
+ },
494
+ e: function (e) {
495
+ throw e;
496
+ },
497
+ f: F
498
+ };
499
+ }
500
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
501
+ }
502
+ var normalCompletion = true,
503
+ didErr = false,
504
+ err;
505
+ return {
506
+ s: function () {
507
+ it = it.call(o);
508
+ },
509
+ n: function () {
510
+ var step = it.next();
511
+ normalCompletion = step.done;
512
+ return step;
513
+ },
514
+ e: function (e) {
515
+ didErr = true;
516
+ err = e;
517
+ },
518
+ f: function () {
519
+ try {
520
+ if (!normalCompletion && it.return != null) it.return();
521
+ } finally {
522
+ if (didErr) throw err;
523
+ }
524
+ }
525
+ };
526
+ }
476
527
  function _toPrimitive(input, hint) {
477
528
  if (typeof input !== "object" || input === null) return input;
478
529
  var prim = input[Symbol.toPrimitive];
@@ -14125,15 +14176,20 @@ var getColumns$2 = function getColumns(_ref) {
14125
14176
  WDT_REISSUE_GOODS: [{
14126
14177
  dataIndex: 'goodId',
14127
14178
  title: "\u5546\u54C1ID",
14128
- width: 120
14179
+ width: 120,
14180
+ align: 'center',
14181
+ ellipsis: true
14129
14182
  }, {
14130
14183
  dataIndex: 'goodNo',
14131
14184
  title: "\u5546\u54C1\u7F16\u7801",
14132
- width: 200
14185
+ align: 'center',
14186
+ ellipsis: true,
14187
+ width: 180
14133
14188
  }, {
14134
14189
  dataIndex: 'goodName',
14135
14190
  title: "\u5546\u54C1\u540D\u79F0",
14136
14191
  width: 200,
14192
+ align: 'center',
14137
14193
  render: function render(text) {
14138
14194
  return /*#__PURE__*/React.createElement(CopyTextIcon, {
14139
14195
  val: text
@@ -14142,14 +14198,19 @@ var getColumns$2 = function getColumns(_ref) {
14142
14198
  }, {
14143
14199
  dataIndex: 'specId',
14144
14200
  title: "SKUID",
14201
+ align: 'center',
14202
+ ellipsis: true,
14145
14203
  width: 150
14146
14204
  }, {
14147
14205
  dataIndex: 'specNo',
14148
14206
  title: "\u5546\u54C1SKU\u7F16\u7801",
14149
- width: 200
14207
+ align: 'center',
14208
+ ellipsis: true,
14209
+ width: 180
14150
14210
  }, {
14151
14211
  dataIndex: 'specName',
14152
14212
  title: "\u5546\u54C1SKU\u540D\u79F0",
14213
+ align: 'center',
14153
14214
  width: 250,
14154
14215
  render: function render(text) {
14155
14216
  return /*#__PURE__*/React.createElement(CopyTextIcon, {
@@ -14262,18 +14323,7 @@ var getColumns$2 = function getColumns(_ref) {
14262
14323
  align: 'center',
14263
14324
  ellipsis: true,
14264
14325
  width: 100,
14265
- render: function render(val) {
14266
- var giftTypeMap = {
14267
- 0: '非赠品',
14268
- 1: '自动赠送',
14269
- 2: '手工赠送',
14270
- 3: '回购自动送赠品',
14271
- 4: '前N有礼送赠品',
14272
- 6: '天猫优仓赠品',
14273
- 7: '淘宝CRM会员送赠'
14274
- };
14275
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14276
- }
14326
+ render: renderGiftType
14277
14327
  }],
14278
14328
  //旺店通退货商品信息
14279
14329
  WDT_RETURN_GOODS: [{
@@ -14369,18 +14419,7 @@ var getColumns$2 = function getColumns(_ref) {
14369
14419
  align: 'center',
14370
14420
  ellipsis: true,
14371
14421
  width: 100,
14372
- render: function render(val) {
14373
- var giftTypeMap = {
14374
- 0: '非赠品',
14375
- 1: '自动赠送',
14376
- 2: '手工赠送',
14377
- 3: '回购自动送赠品',
14378
- 4: '前N有礼送赠品',
14379
- 6: '天猫优仓赠品',
14380
- 7: '淘宝CRM会员送赠'
14381
- };
14382
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14383
- }
14422
+ render: renderGiftType
14384
14423
  }, {
14385
14424
  dataIndex: 'type',
14386
14425
  title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
@@ -14501,18 +14540,7 @@ var getColumns$2 = function getColumns(_ref) {
14501
14540
  align: 'center',
14502
14541
  ellipsis: true,
14503
14542
  width: 100,
14504
- render: function render(val) {
14505
- var giftTypeMap = {
14506
- 0: '非赠品',
14507
- 1: '自动赠送',
14508
- 2: '手工赠送',
14509
- 3: '回购自动送赠品',
14510
- 4: '前N有礼送赠品',
14511
- 6: '天猫优仓赠品',
14512
- 7: '淘宝CRM会员送赠'
14513
- };
14514
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14515
- }
14543
+ render: renderGiftType
14516
14544
  }, {
14517
14545
  dataIndex: 'type',
14518
14546
  title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
@@ -14696,6 +14724,15 @@ var getYesOrNo$1 = function getYesOrNo(val) {
14696
14724
  if (isNull(val)) return null;
14697
14725
  return val ? '是' : '否';
14698
14726
  };
14727
+ function toNum(value) {
14728
+ if (typeof value === 'string') {
14729
+ return value ? +value : void 0;
14730
+ }
14731
+ if (typeof value === 'number') {
14732
+ return value;
14733
+ }
14734
+ return void 0;
14735
+ }
14699
14736
  var getColumns$4 = function getColumns(_ref) {
14700
14737
  var _ref$text = _ref.text,
14701
14738
  disabled = _ref.disabled,
@@ -14853,6 +14890,19 @@ var getColumns$4 = function getColumns(_ref) {
14853
14890
  dataIndex: 'qty',
14854
14891
  title: "\u6570\u91CF",
14855
14892
  width: 100,
14893
+ validator: function validator(_rule, value) {
14894
+ var goodsName = '';
14895
+ if (((value === null || value === void 0 ? void 0 : value.gyReissueGoods) || []).some(function (goods) {
14896
+ var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
14897
+ var res = typeof qty === 'number' ? qty < 1 : true;
14898
+ if (res) {
14899
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
14900
+ }
14901
+ return res;
14902
+ })) {
14903
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
14904
+ }
14905
+ },
14856
14906
  render: function render(val, record, index) {
14857
14907
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14858
14908
  style: {
@@ -14956,6 +15006,19 @@ var getColumns$4 = function getColumns(_ref) {
14956
15006
  dataIndex: 'qty',
14957
15007
  title: "\u6570\u91CF",
14958
15008
  width: 100,
15009
+ validator: function validator(_rule, value) {
15010
+ var goodsName = '';
15011
+ if (((value === null || value === void 0 ? void 0 : value.gyReturnGoods) || []).some(function (goods) {
15012
+ var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
15013
+ var res = typeof qty === 'number' ? qty < 1 : true;
15014
+ if (res) {
15015
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
15016
+ }
15017
+ return res;
15018
+ })) {
15019
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
15020
+ }
15021
+ },
14959
15022
  render: function render(val, record, index) {
14960
15023
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14961
15024
  style: {
@@ -15047,6 +15110,15 @@ var fillAttrs = function fillAttrs(item) {
15047
15110
  if (!item.align) item.align = 'center';
15048
15111
  return item;
15049
15112
  };
15113
+ function toNum$1(value) {
15114
+ if (typeof value === 'string') {
15115
+ return value ? +value : void 0;
15116
+ }
15117
+ if (typeof value === 'number') {
15118
+ return value;
15119
+ }
15120
+ return void 0;
15121
+ }
15050
15122
  var getColumns$5 = function getColumns() {
15051
15123
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
15052
15124
  _ref$text = _ref.text,
@@ -15230,6 +15302,19 @@ var getColumns$5 = function getColumns() {
15230
15302
  ellipsis: true,
15231
15303
  align: 'center',
15232
15304
  width: 120,
15305
+ validator: function validator(_rule, value) {
15306
+ var goodsName = '';
15307
+ if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
15308
+ var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
15309
+ var res = typeof v === 'number' ? v < 0 : true;
15310
+ if (res) {
15311
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
15312
+ }
15313
+ return res;
15314
+ })) {
15315
+ return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
15316
+ }
15317
+ },
15233
15318
  render: function render(val, record, index) {
15234
15319
  return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15235
15320
  style: {
@@ -15249,6 +15334,19 @@ var getColumns$5 = function getColumns() {
15249
15334
  ellipsis: true,
15250
15335
  align: 'center',
15251
15336
  width: 100,
15337
+ validator: function validator(_rule, value) {
15338
+ var goodsName = '';
15339
+ if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
15340
+ var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
15341
+ var res = typeof qty === 'number' ? qty < 1 : true;
15342
+ if (res) {
15343
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
15344
+ }
15345
+ return res;
15346
+ })) {
15347
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
15348
+ }
15349
+ },
15252
15350
  render: function render(val, record, index) {
15253
15351
  return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15254
15352
  style: {
@@ -15333,6 +15431,19 @@ var getColumns$5 = function getColumns() {
15333
15431
  dataIndex: 'salePrice',
15334
15432
  title: '单价',
15335
15433
  width: 120,
15434
+ validator: function validator(_rule, value) {
15435
+ var goodsName = '';
15436
+ if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
15437
+ var v = toNum$1(goods === null || goods === void 0 ? void 0 : goods.salePrice);
15438
+ var res = typeof v === 'number' ? v < 0 : true;
15439
+ if (res) {
15440
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
15441
+ }
15442
+ return res;
15443
+ })) {
15444
+ return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
15445
+ }
15446
+ },
15336
15447
  render: function render(val, record, index) {
15337
15448
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15338
15449
  style: {
@@ -15350,6 +15461,19 @@ var getColumns$5 = function getColumns() {
15350
15461
  dataIndex: 'qty',
15351
15462
  title: '数量',
15352
15463
  width: 100,
15464
+ validator: function validator(_rule, value) {
15465
+ var goodsName = '';
15466
+ if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
15467
+ var qty = toNum$1(goods === null || goods === void 0 ? void 0 : goods.qty);
15468
+ var res = typeof qty === 'number' ? qty < 1 : true;
15469
+ if (res) {
15470
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
15471
+ }
15472
+ return res;
15473
+ })) {
15474
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
15475
+ }
15476
+ },
15353
15477
  render: function render(val, record, index) {
15354
15478
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15355
15479
  style: {
@@ -15661,6 +15785,30 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15661
15785
  })['default']
15662
15786
  });
15663
15787
  };
15788
+ var erpColumnsMap = getColumnsMap$1();
15789
+ var erpFormValidator = function erpFormValidator(_rule, value, type) {
15790
+ var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
15791
+ return column.validator;
15792
+ }).filter(Boolean);
15793
+ var res = null;
15794
+ var _iterator = _createForOfIteratorHelper(validatorFnList),
15795
+ _step;
15796
+ try {
15797
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
15798
+ var validatorFn = _step.value;
15799
+ var validatorResult = validatorFn(_rule, value, type);
15800
+ if (validatorResult) {
15801
+ res = validatorResult;
15802
+ break;
15803
+ }
15804
+ }
15805
+ } catch (err) {
15806
+ _iterator.e(err);
15807
+ } finally {
15808
+ _iterator.f();
15809
+ }
15810
+ return res;
15811
+ };
15664
15812
  var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
15665
15813
  var clone_columnsMap = cloneDeep(getColumnsMap$1());
15666
15814
  var newColumns = {};
@@ -15668,7 +15816,8 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
15668
15816
  newColumns[key] = clone_columnsMap[key].map(function (col) {
15669
15817
  return {
15670
15818
  title: col.title,
15671
- dataIndex: col.dataIndex
15819
+ dataIndex: col.dataIndex,
15820
+ disabled: !!col.validator
15672
15821
  };
15673
15822
  });
15674
15823
  });
@@ -15790,6 +15939,7 @@ var GoodsModalMap = {
15790
15939
  BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15791
15940
  GY_GOODS: GyGoodsModal$2,
15792
15941
  GY_REISSUE_GOODS: GyGoodsModal$2,
15942
+ GY_RETURN_GOODS: GyGoodsModal$2,
15793
15943
  JST_GOODS: JstGoodsModal,
15794
15944
  JST_REISSUE_GOODS: JstGoodsModal,
15795
15945
  JST_RETURN_GOODS: JstGoodsModal,
@@ -15827,7 +15977,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
15827
15977
  return item === null || item === void 0 ? void 0 : item[uniqueKey];
15828
15978
  }));
15829
15979
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
15830
- console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15980
+ // console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15831
15981
  onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
15832
15982
  };
15833
15983
  var rowSelection = {
@@ -15862,7 +16012,7 @@ var getButtonText = function getButtonText() {
15862
16012
  if (['WDT_REISSUE_GOODS'].includes(type)) {
15863
16013
  return '选择旺店通商品';
15864
16014
  }
15865
- if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16015
+ if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
15866
16016
  return '选择管易ERP商品';
15867
16017
  }
15868
16018
  if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
@@ -16050,16 +16200,18 @@ var GoodItem$1 = function GoodItem(props) {
16050
16200
  var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
16051
16201
  if (isStringArray) {
16052
16202
  baseInfoColumns = initBaseInfoColumns.filter(function (col) {
16053
- return showHeader.includes(col.dataIndex);
16203
+ return showHeader.includes(col.dataIndex) || (col === null || col === void 0 ? void 0 : col.validator);
16054
16204
  });
16055
16205
  } else if (isObjectArray) {
16056
- baseInfoColumns = showHeader.filter(function (col) {
16057
- return col.show !== false;
16058
- }).map(function (col) {
16206
+ baseInfoColumns = showHeader.map(function (col) {
16059
16207
  var currentCol = initBaseInfoColumns.find(function (item) {
16060
16208
  return item.dataIndex === col.dataIndex;
16061
16209
  });
16062
- return currentCol ? currentCol : undefined;
16210
+ // 如果列应该显示(show不为false)或者有验证器,则返回对应的列配置
16211
+ if (currentCol && (col.show !== false || (currentCol === null || currentCol === void 0 ? void 0 : currentCol.validator))) {
16212
+ return currentCol;
16213
+ }
16214
+ return undefined;
16063
16215
  }).filter(Boolean);
16064
16216
  }
16065
16217
  var columnList = [{
@@ -16163,7 +16315,7 @@ var GoodItem$1 = function GoodItem(props) {
16163
16315
  canUpdateNumber: canUpdateNumber
16164
16316
  });
16165
16317
  });
16166
- } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16318
+ } else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
16167
16319
  newList = list.map(function (item) {
16168
16320
  var goodName = item.goodName,
16169
16321
  goodShortName = item.goodShortName,
@@ -17187,7 +17339,6 @@ var index$3 = (function (props) {
17187
17339
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
17188
17340
  getBsE3OrderList(value.orderNo);
17189
17341
  } else if (type === 'GY_SYSTEM_ORDER') {
17190
- console.log('触发gy--getGyOrderList--1');
17191
17342
  getGyOrderList(value.orderNo);
17192
17343
  } else if (type === 'JST_SYSTEM_ORDER') {
17193
17344
  getJstOrderList(value.orderNo);
@@ -17623,7 +17774,7 @@ var CommonGoods = function CommonGoods(props) {
17623
17774
  disabled = props.disabled,
17624
17775
  onChange = props.onChange,
17625
17776
  compType = props.type;
17626
- console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
17777
+ // console.log('value?.orders', value?.orders);
17627
17778
  // 合并单订单会包含","
17628
17779
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
17629
17780
  var _order$componentMap$c;
@@ -18147,7 +18298,7 @@ var typeMap$1 = {
18147
18298
  }
18148
18299
  };
18149
18300
  var wdtReissue = function wdtReissue(props) {
18150
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
18301
+ var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
18151
18302
  var value = props.value,
18152
18303
  onChange = props.onChange,
18153
18304
  _props$reasonList = props.reasonList,
@@ -18304,7 +18455,7 @@ var wdtReissue = function wdtReissue(props) {
18304
18455
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18305
18456
  };
18306
18457
  var selectedGoodsChange = useCallback(function (skuList) {
18307
- var _typeMap$type21, _typeMap$type22, _uniqBy, _typeMap$type23;
18458
+ var _typeMap$type21, _typeMap$type22, _uniqBy;
18308
18459
  var newValue = _objectSpread2({}, value);
18309
18460
  // 原订单商品
18310
18461
  var originTradeGoodList = getGoodDetails({
@@ -18315,14 +18466,14 @@ var wdtReissue = function wdtReissue(props) {
18315
18466
  newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18316
18467
  return skuList.includes(item.uuid);
18317
18468
  });
18318
- console.log('商品发生变化', newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]);
18469
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
18319
18470
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18320
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
18471
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)], isStrict]);
18321
18472
  //显示选择商品按钮 原单换不显示选择商品
18322
18473
  var showChangeBtn = useMemo(function () {
18323
- var _typeMap$type25;
18324
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
18325
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
18474
+ var _typeMap$type24;
18475
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
18476
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
18326
18477
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
18327
18478
  gutter: 8,
18328
18479
  wrap: true
@@ -18340,12 +18491,12 @@ var wdtReissue = function wdtReissue(props) {
18340
18491
  },
18341
18492
  disabled: disabled,
18342
18493
  allowClear: false,
18343
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
18494
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
18344
18495
  onChange: function onChange(val) {
18345
18496
  return changeSystemOrderHandle(val);
18346
18497
  },
18347
18498
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
18348
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
18499
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
18349
18500
  return /*#__PURE__*/React.createElement(Select.Option, {
18350
18501
  key: item.billNo,
18351
18502
  value: item.billNo,
@@ -18366,7 +18517,7 @@ var wdtReissue = function wdtReissue(props) {
18366
18517
  disabled: disabled,
18367
18518
  allowClear: false,
18368
18519
  options: reasonList,
18369
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName)],
18520
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
18370
18521
  onChange: function onChange(val) {
18371
18522
  return changeTypeHandle(val);
18372
18523
  }
@@ -18378,7 +18529,7 @@ var wdtReissue = function wdtReissue(props) {
18378
18529
  canUpdateNumber: showChangeBtn,
18379
18530
  showChangeBtn: showChangeBtn,
18380
18531
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18381
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
18532
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
18382
18533
  onChange: function onChange(val) {
18383
18534
  return changeGoodHandle(val);
18384
18535
  },
@@ -19726,7 +19877,7 @@ var typeMap$4 = {
19726
19877
  }
19727
19878
  };
19728
19879
  var GyReissue = function GyReissue(props) {
19729
- var _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
19880
+ var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
19730
19881
  var value = props.value,
19731
19882
  onChange = props.onChange,
19732
19883
  _props$reasonList = props.reasonList,
@@ -19881,7 +20032,7 @@ var GyReissue = function GyReissue(props) {
19881
20032
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19882
20033
  };
19883
20034
  var selectedGoodsChange = useCallback(function (skuList) {
19884
- var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
20035
+ var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
19885
20036
  pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
19886
20037
  var newValue = _objectSpread2({}, valueRef.current || {});
19887
20038
  // 原订单商品
@@ -19893,21 +20044,15 @@ var GyReissue = function GyReissue(props) {
19893
20044
  newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19894
20045
  return skuList.includes(item.uuid);
19895
20046
  });
19896
- console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]);
20047
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
19897
20048
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19898
20049
  pushGyLog('afterSelectedGoodsChange', newValue);
19899
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
20050
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)], isStrict]);
19900
20051
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
19901
- var showChangeBtn = useMemo(function () {
19902
- var _typeMap$type29;
19903
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
19904
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
19905
- return /*#__PURE__*/React.createElement("div", {
19906
- id: "TEST_GY",
19907
- onClick: function onClick() {
19908
- console.log('TEST_GY', value);
19909
- }
19910
- }, /*#__PURE__*/React.createElement(Row, {
20052
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder];
20053
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
20054
+ var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
20055
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
19911
20056
  gutter: 8,
19912
20057
  wrap: true
19913
20058
  }, /*#__PURE__*/React.createElement(Col, {
@@ -19924,12 +20069,12 @@ var GyReissue = function GyReissue(props) {
19924
20069
  },
19925
20070
  disabled: disabled,
19926
20071
  allowClear: false,
19927
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo)],
20072
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo)],
19928
20073
  onChange: function onChange(val) {
19929
20074
  return changeSystemOrderHandle(val);
19930
20075
  },
19931
20076
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
19932
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
20077
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
19933
20078
  return /*#__PURE__*/React.createElement(Select.Option, {
19934
20079
  key: item.billNo,
19935
20080
  value: item.billNo,
@@ -19950,7 +20095,7 @@ var GyReissue = function GyReissue(props) {
19950
20095
  disabled: disabled,
19951
20096
  allowClear: false,
19952
20097
  options: reasonList,
19953
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.typeName)],
20098
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.typeName)],
19954
20099
  onChange: function onChange(val) {
19955
20100
  return changeTypeHandle(val);
19956
20101
  }
@@ -19961,8 +20106,10 @@ var GyReissue = function GyReissue(props) {
19961
20106
  disabled: disabled,
19962
20107
  canUpdateNumber: showChangeBtn,
19963
20108
  showChangeBtn: showChangeBtn,
20109
+ showErpGoodsBtn: showErpGoodsBtn,
20110
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
19964
20111
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
19965
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
20112
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)],
19966
20113
  onChange: function onChange(val) {
19967
20114
  return changeGoodHandle(val);
19968
20115
  },
@@ -19999,7 +20146,7 @@ var typeMap$5 = {
19999
20146
  }
20000
20147
  };
20001
20148
  var GyReturnGoods = function GyReturnGoods(props) {
20002
- var _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
20149
+ var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
20003
20150
  var value = props.value,
20004
20151
  onChange = props.onChange,
20005
20152
  _props$reasonList = props.reasonList,
@@ -20107,7 +20254,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20107
20254
  };
20108
20255
  }();
20109
20256
  var selectedGoodsChange = useCallback(function (skuList) {
20110
- var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
20257
+ var _typeMap$type7, _typeMap$type8, _uniqBy;
20111
20258
  var newValue = _objectSpread2({}, value);
20112
20259
  // 原订单商品
20113
20260
  var originTradeGoodList = getGoodDetails({
@@ -20118,49 +20265,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
20118
20265
  newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20119
20266
  return skuList.includes(item.uuid);
20120
20267
  });
20121
- console.log('商品发生变化', newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)]);
20268
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20122
20269
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20123
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)], isStrict]);
20270
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
20124
20271
  var changeTypeHandle = function changeTypeHandle(val) {
20125
- var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
20272
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
20126
20273
  var typeName = val === null || val === void 0 ? void 0 : val[0];
20127
- if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
20274
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
20128
20275
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
20129
20276
  var newValue = _objectSpread2({}, value);
20130
- newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
20277
+ newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
20131
20278
  if (typeName === '1') {
20132
- var _typeMap$type13;
20133
- newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
20279
+ var _typeMap$type12;
20280
+ newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
20134
20281
  mode: isStrict
20135
20282
  });
20136
20283
  } else if (typeName === '2') {
20137
- var _typeMap$type14;
20284
+ var _typeMap$type13;
20138
20285
  // 切换到非原单,清空列表
20139
- newValue[(_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
20286
+ newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
20140
20287
  }
20141
20288
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20142
20289
  };
20143
20290
  var changeGoodHandle = function changeGoodHandle(val) {
20144
- var _typeMap$type15;
20291
+ var _typeMap$type14;
20145
20292
  var newValue = _objectSpread2({}, value);
20146
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
20147
- var _typeMap$type16, _typeMap$type17;
20148
- item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
20149
- item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
20293
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
20294
+ var _typeMap$type15, _typeMap$type16;
20295
+ item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
20296
+ item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
20150
20297
  return item;
20151
20298
  });
20152
20299
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20153
20300
  };
20154
20301
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
20155
- var _typeMap$type18, _value$typeMap$type$t2, _typeMap$type19, _value$typeMap$type$t3, _typeMap$type21;
20302
+ var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
20156
20303
  var newValue = _objectSpread2({}, value);
20157
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
20158
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
20159
- var _typeMap$type20;
20160
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
20161
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
20162
- var _typeMap$type22;
20163
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
20304
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
20305
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
20306
+ var _typeMap$type19;
20307
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
20308
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
20309
+ var _typeMap$type21;
20310
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
20164
20311
  mode: isStrict,
20165
20312
  sysOrderNo: val
20166
20313
  });
@@ -20168,11 +20315,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
20168
20315
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20169
20316
  };
20170
20317
  var getGoodDetails = function getGoodDetails(_ref4) {
20171
- var _typeMap$type23, _typeMap$type24, _order$details;
20318
+ var _typeMap$type22, _typeMap$type23, _order$details;
20172
20319
  var mode = _ref4.mode,
20173
20320
  sysOrderNo = _ref4.sysOrderNo;
20174
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder];
20175
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo];
20321
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
20322
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
20176
20323
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20177
20324
  return order.code === systemOrderNo;
20178
20325
  });
@@ -20183,19 +20330,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
20183
20330
  }) : goodDetails;
20184
20331
  };
20185
20332
  var handleModeChange = function handleModeChange(mode) {
20186
- var _value$typeMap$type$t4, _typeMap$type25, _typeMap$type26;
20187
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
20333
+ var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
20334
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
20188
20335
  setIsStrict(mode);
20189
20336
  if (!isOriginalOrder) return;
20190
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key, getGoodDetails({
20337
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
20191
20338
  mode: mode
20192
20339
  }))));
20193
20340
  };
20194
20341
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20195
- var showChangeBtn = useMemo(function () {
20196
- var _typeMap$type27;
20197
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20198
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
20342
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
20343
+ var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
20344
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20199
20345
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
20200
20346
  gutter: 8,
20201
20347
  wrap: true
@@ -20213,12 +20359,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
20213
20359
  },
20214
20360
  disabled: disabled,
20215
20361
  allowClear: false,
20216
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
20362
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
20217
20363
  onChange: function onChange(val) {
20218
20364
  return changeSystemOrderHandle(val);
20219
20365
  },
20220
20366
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
20221
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
20367
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
20222
20368
  return /*#__PURE__*/React.createElement(Select.Option, {
20223
20369
  key: item.billNo,
20224
20370
  value: item.billNo,
@@ -20239,7 +20385,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20239
20385
  disabled: disabled,
20240
20386
  allowClear: false,
20241
20387
  options: reasonList,
20242
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
20388
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
20243
20389
  onChange: function onChange(val) {
20244
20390
  return changeTypeHandle(val);
20245
20391
  }
@@ -20251,13 +20397,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
20251
20397
  canUpdateNumber: showChangeBtn,
20252
20398
  showChangeBtn: showChangeBtn,
20253
20399
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20254
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type32 = typeMap$5[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
20400
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
20255
20401
  onChange: function onChange(val) {
20256
20402
  return changeGoodHandle(val);
20257
20403
  },
20258
20404
  onModeChange: handleModeChange,
20259
20405
  isStrict: isStrict,
20260
- showErpGoodsBtn: false,
20406
+ showErpGoodsBtn: showErpGoodsBtn,
20407
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20261
20408
  tradeGoods: {
20262
20409
  originDataSource: getGoodDetails({
20263
20410
  mode: isStrict
@@ -20267,4 +20414,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
20267
20414
  })));
20268
20415
  };
20269
20416
 
20270
- 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, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, index$2 as erpModalColumnsMap, getColumns$5 as getJstColumns, getColumns$3 as getWlnColumns };
20417
+ 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, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };