@kmkf-fe-packages/basic-components 2.0.54 → 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];
@@ -12548,9 +12599,7 @@ var useGetColumns = (function (type) {
12548
12599
  loading = _useState4[0],
12549
12600
  setLoading = _useState4[1];
12550
12601
  var showColumnsDataIndexList = useMemo(function () {
12551
- return columns.filter(function (item) {
12552
- return Object.hasOwn(item, 'dataIndex');
12553
- }).map(function (item) {
12602
+ return columns.map(function (item) {
12554
12603
  return item.dataIndex;
12555
12604
  });
12556
12605
  }, [columns]);
@@ -14127,15 +14176,20 @@ var getColumns$2 = function getColumns(_ref) {
14127
14176
  WDT_REISSUE_GOODS: [{
14128
14177
  dataIndex: 'goodId',
14129
14178
  title: "\u5546\u54C1ID",
14130
- width: 120
14179
+ width: 120,
14180
+ align: 'center',
14181
+ ellipsis: true
14131
14182
  }, {
14132
14183
  dataIndex: 'goodNo',
14133
14184
  title: "\u5546\u54C1\u7F16\u7801",
14134
- width: 200
14185
+ align: 'center',
14186
+ ellipsis: true,
14187
+ width: 180
14135
14188
  }, {
14136
14189
  dataIndex: 'goodName',
14137
14190
  title: "\u5546\u54C1\u540D\u79F0",
14138
14191
  width: 200,
14192
+ align: 'center',
14139
14193
  render: function render(text) {
14140
14194
  return /*#__PURE__*/React.createElement(CopyTextIcon, {
14141
14195
  val: text
@@ -14144,14 +14198,19 @@ var getColumns$2 = function getColumns(_ref) {
14144
14198
  }, {
14145
14199
  dataIndex: 'specId',
14146
14200
  title: "SKUID",
14201
+ align: 'center',
14202
+ ellipsis: true,
14147
14203
  width: 150
14148
14204
  }, {
14149
14205
  dataIndex: 'specNo',
14150
14206
  title: "\u5546\u54C1SKU\u7F16\u7801",
14151
- width: 200
14207
+ align: 'center',
14208
+ ellipsis: true,
14209
+ width: 180
14152
14210
  }, {
14153
14211
  dataIndex: 'specName',
14154
14212
  title: "\u5546\u54C1SKU\u540D\u79F0",
14213
+ align: 'center',
14155
14214
  width: 250,
14156
14215
  render: function render(text) {
14157
14216
  return /*#__PURE__*/React.createElement(CopyTextIcon, {
@@ -14264,18 +14323,7 @@ var getColumns$2 = function getColumns(_ref) {
14264
14323
  align: 'center',
14265
14324
  ellipsis: true,
14266
14325
  width: 100,
14267
- render: function render(val) {
14268
- var giftTypeMap = {
14269
- 0: '非赠品',
14270
- 1: '自动赠送',
14271
- 2: '手工赠送',
14272
- 3: '回购自动送赠品',
14273
- 4: '前N有礼送赠品',
14274
- 6: '天猫优仓赠品',
14275
- 7: '淘宝CRM会员送赠'
14276
- };
14277
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14278
- }
14326
+ render: renderGiftType
14279
14327
  }],
14280
14328
  //旺店通退货商品信息
14281
14329
  WDT_RETURN_GOODS: [{
@@ -14371,18 +14419,7 @@ var getColumns$2 = function getColumns(_ref) {
14371
14419
  align: 'center',
14372
14420
  ellipsis: true,
14373
14421
  width: 100,
14374
- render: function render(val) {
14375
- var giftTypeMap = {
14376
- 0: '非赠品',
14377
- 1: '自动赠送',
14378
- 2: '手工赠送',
14379
- 3: '回购自动送赠品',
14380
- 4: '前N有礼送赠品',
14381
- 6: '天猫优仓赠品',
14382
- 7: '淘宝CRM会员送赠'
14383
- };
14384
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14385
- }
14422
+ render: renderGiftType
14386
14423
  }, {
14387
14424
  dataIndex: 'type',
14388
14425
  title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
@@ -14503,18 +14540,7 @@ var getColumns$2 = function getColumns(_ref) {
14503
14540
  align: 'center',
14504
14541
  ellipsis: true,
14505
14542
  width: 100,
14506
- render: function render(val) {
14507
- var giftTypeMap = {
14508
- 0: '非赠品',
14509
- 1: '自动赠送',
14510
- 2: '手工赠送',
14511
- 3: '回购自动送赠品',
14512
- 4: '前N有礼送赠品',
14513
- 6: '天猫优仓赠品',
14514
- 7: '淘宝CRM会员送赠'
14515
- };
14516
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14517
- }
14543
+ render: renderGiftType
14518
14544
  }, {
14519
14545
  dataIndex: 'type',
14520
14546
  title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
@@ -14698,6 +14724,15 @@ var getYesOrNo$1 = function getYesOrNo(val) {
14698
14724
  if (isNull(val)) return null;
14699
14725
  return val ? '是' : '否';
14700
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
+ }
14701
14736
  var getColumns$4 = function getColumns(_ref) {
14702
14737
  var _ref$text = _ref.text,
14703
14738
  disabled = _ref.disabled,
@@ -14855,6 +14890,19 @@ var getColumns$4 = function getColumns(_ref) {
14855
14890
  dataIndex: 'qty',
14856
14891
  title: "\u6570\u91CF",
14857
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
+ },
14858
14906
  render: function render(val, record, index) {
14859
14907
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14860
14908
  style: {
@@ -14958,6 +15006,19 @@ var getColumns$4 = function getColumns(_ref) {
14958
15006
  dataIndex: 'qty',
14959
15007
  title: "\u6570\u91CF",
14960
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
+ },
14961
15022
  render: function render(val, record, index) {
14962
15023
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14963
15024
  style: {
@@ -15049,6 +15110,15 @@ var fillAttrs = function fillAttrs(item) {
15049
15110
  if (!item.align) item.align = 'center';
15050
15111
  return item;
15051
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
+ }
15052
15122
  var getColumns$5 = function getColumns() {
15053
15123
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
15054
15124
  _ref$text = _ref.text,
@@ -15232,6 +15302,19 @@ var getColumns$5 = function getColumns() {
15232
15302
  ellipsis: true,
15233
15303
  align: 'center',
15234
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
+ },
15235
15318
  render: function render(val, record, index) {
15236
15319
  return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15237
15320
  style: {
@@ -15251,6 +15334,19 @@ var getColumns$5 = function getColumns() {
15251
15334
  ellipsis: true,
15252
15335
  align: 'center',
15253
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
+ },
15254
15350
  render: function render(val, record, index) {
15255
15351
  return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15256
15352
  style: {
@@ -15335,6 +15431,19 @@ var getColumns$5 = function getColumns() {
15335
15431
  dataIndex: 'salePrice',
15336
15432
  title: '单价',
15337
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
+ },
15338
15447
  render: function render(val, record, index) {
15339
15448
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15340
15449
  style: {
@@ -15352,6 +15461,19 @@ var getColumns$5 = function getColumns() {
15352
15461
  dataIndex: 'qty',
15353
15462
  title: '数量',
15354
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
+ },
15355
15477
  render: function render(val, record, index) {
15356
15478
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
15357
15479
  style: {
@@ -15663,6 +15785,30 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15663
15785
  })['default']
15664
15786
  });
15665
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
+ };
15666
15812
  var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
15667
15813
  var clone_columnsMap = cloneDeep(getColumnsMap$1());
15668
15814
  var newColumns = {};
@@ -15670,7 +15816,8 @@ var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
15670
15816
  newColumns[key] = clone_columnsMap[key].map(function (col) {
15671
15817
  return {
15672
15818
  title: col.title,
15673
- dataIndex: col.dataIndex
15819
+ dataIndex: col.dataIndex,
15820
+ disabled: !!col.validator
15674
15821
  };
15675
15822
  });
15676
15823
  });
@@ -15792,6 +15939,7 @@ var GoodsModalMap = {
15792
15939
  BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15793
15940
  GY_GOODS: GyGoodsModal$2,
15794
15941
  GY_REISSUE_GOODS: GyGoodsModal$2,
15942
+ GY_RETURN_GOODS: GyGoodsModal$2,
15795
15943
  JST_GOODS: JstGoodsModal,
15796
15944
  JST_REISSUE_GOODS: JstGoodsModal,
15797
15945
  JST_RETURN_GOODS: JstGoodsModal,
@@ -15829,7 +15977,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
15829
15977
  return item === null || item === void 0 ? void 0 : item[uniqueKey];
15830
15978
  }));
15831
15979
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
15832
- console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15980
+ // console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15833
15981
  onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
15834
15982
  };
15835
15983
  var rowSelection = {
@@ -15864,7 +16012,7 @@ var getButtonText = function getButtonText() {
15864
16012
  if (['WDT_REISSUE_GOODS'].includes(type)) {
15865
16013
  return '选择旺店通商品';
15866
16014
  }
15867
- if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16015
+ if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
15868
16016
  return '选择管易ERP商品';
15869
16017
  }
15870
16018
  if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
@@ -16052,16 +16200,18 @@ var GoodItem$1 = function GoodItem(props) {
16052
16200
  var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
16053
16201
  if (isStringArray) {
16054
16202
  baseInfoColumns = initBaseInfoColumns.filter(function (col) {
16055
- return showHeader.includes(col.dataIndex);
16203
+ return showHeader.includes(col.dataIndex) || (col === null || col === void 0 ? void 0 : col.validator);
16056
16204
  });
16057
16205
  } else if (isObjectArray) {
16058
- baseInfoColumns = showHeader.filter(function (col) {
16059
- return col.show !== false;
16060
- }).map(function (col) {
16206
+ baseInfoColumns = showHeader.map(function (col) {
16061
16207
  var currentCol = initBaseInfoColumns.find(function (item) {
16062
16208
  return item.dataIndex === col.dataIndex;
16063
16209
  });
16064
- 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;
16065
16215
  }).filter(Boolean);
16066
16216
  }
16067
16217
  var columnList = [{
@@ -16165,7 +16315,7 @@ var GoodItem$1 = function GoodItem(props) {
16165
16315
  canUpdateNumber: canUpdateNumber
16166
16316
  });
16167
16317
  });
16168
- } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16318
+ } else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
16169
16319
  newList = list.map(function (item) {
16170
16320
  var goodName = item.goodName,
16171
16321
  goodShortName = item.goodShortName,
@@ -17189,7 +17339,6 @@ var index$3 = (function (props) {
17189
17339
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
17190
17340
  getBsE3OrderList(value.orderNo);
17191
17341
  } else if (type === 'GY_SYSTEM_ORDER') {
17192
- console.log('触发gy--getGyOrderList--1');
17193
17342
  getGyOrderList(value.orderNo);
17194
17343
  } else if (type === 'JST_SYSTEM_ORDER') {
17195
17344
  getJstOrderList(value.orderNo);
@@ -17625,7 +17774,7 @@ var CommonGoods = function CommonGoods(props) {
17625
17774
  disabled = props.disabled,
17626
17775
  onChange = props.onChange,
17627
17776
  compType = props.type;
17628
- console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
17777
+ // console.log('value?.orders', value?.orders);
17629
17778
  // 合并单订单会包含","
17630
17779
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
17631
17780
  var _order$componentMap$c;
@@ -18149,7 +18298,7 @@ var typeMap$1 = {
18149
18298
  }
18150
18299
  };
18151
18300
  var wdtReissue = function wdtReissue(props) {
18152
- 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;
18153
18302
  var value = props.value,
18154
18303
  onChange = props.onChange,
18155
18304
  _props$reasonList = props.reasonList,
@@ -18306,7 +18455,7 @@ var wdtReissue = function wdtReissue(props) {
18306
18455
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18307
18456
  };
18308
18457
  var selectedGoodsChange = useCallback(function (skuList) {
18309
- var _typeMap$type21, _typeMap$type22, _uniqBy, _typeMap$type23;
18458
+ var _typeMap$type21, _typeMap$type22, _uniqBy;
18310
18459
  var newValue = _objectSpread2({}, value);
18311
18460
  // 原订单商品
18312
18461
  var originTradeGoodList = getGoodDetails({
@@ -18317,14 +18466,14 @@ var wdtReissue = function wdtReissue(props) {
18317
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) {
18318
18467
  return skuList.includes(item.uuid);
18319
18468
  });
18320
- 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}`]);
18321
18470
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18322
- }, [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]);
18323
18472
  //显示选择商品按钮 原单换不显示选择商品
18324
18473
  var showChangeBtn = useMemo(function () {
18325
- var _typeMap$type25;
18326
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
18327
- }, [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]]);
18328
18477
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
18329
18478
  gutter: 8,
18330
18479
  wrap: true
@@ -18342,12 +18491,12 @@ var wdtReissue = function wdtReissue(props) {
18342
18491
  },
18343
18492
  disabled: disabled,
18344
18493
  allowClear: false,
18345
- 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)],
18346
18495
  onChange: function onChange(val) {
18347
18496
  return changeSystemOrderHandle(val);
18348
18497
  },
18349
18498
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
18350
- }, ((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) {
18351
18500
  return /*#__PURE__*/React.createElement(Select.Option, {
18352
18501
  key: item.billNo,
18353
18502
  value: item.billNo,
@@ -18368,7 +18517,7 @@ var wdtReissue = function wdtReissue(props) {
18368
18517
  disabled: disabled,
18369
18518
  allowClear: false,
18370
18519
  options: reasonList,
18371
- 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)],
18372
18521
  onChange: function onChange(val) {
18373
18522
  return changeTypeHandle(val);
18374
18523
  }
@@ -18380,7 +18529,7 @@ var wdtReissue = function wdtReissue(props) {
18380
18529
  canUpdateNumber: showChangeBtn,
18381
18530
  showChangeBtn: showChangeBtn,
18382
18531
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18383
- 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)],
18384
18533
  onChange: function onChange(val) {
18385
18534
  return changeGoodHandle(val);
18386
18535
  },
@@ -19728,7 +19877,7 @@ var typeMap$4 = {
19728
19877
  }
19729
19878
  };
19730
19879
  var GyReissue = function GyReissue(props) {
19731
- 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;
19732
19881
  var value = props.value,
19733
19882
  onChange = props.onChange,
19734
19883
  _props$reasonList = props.reasonList,
@@ -19883,7 +20032,7 @@ var GyReissue = function GyReissue(props) {
19883
20032
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19884
20033
  };
19885
20034
  var selectedGoodsChange = useCallback(function (skuList) {
19886
- var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
20035
+ var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
19887
20036
  pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
19888
20037
  var newValue = _objectSpread2({}, valueRef.current || {});
19889
20038
  // 原订单商品
@@ -19895,21 +20044,15 @@ var GyReissue = function GyReissue(props) {
19895
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) {
19896
20045
  return skuList.includes(item.uuid);
19897
20046
  });
19898
- 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}`]);
19899
20048
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19900
20049
  pushGyLog('afterSelectedGoodsChange', newValue);
19901
- }, [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]);
19902
20051
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
19903
- var showChangeBtn = useMemo(function () {
19904
- var _typeMap$type29;
19905
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
19906
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
19907
- return /*#__PURE__*/React.createElement("div", {
19908
- id: "TEST_GY",
19909
- onClick: function onClick() {
19910
- console.log('TEST_GY', value);
19911
- }
19912
- }, /*#__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, {
19913
20056
  gutter: 8,
19914
20057
  wrap: true
19915
20058
  }, /*#__PURE__*/React.createElement(Col, {
@@ -19926,12 +20069,12 @@ var GyReissue = function GyReissue(props) {
19926
20069
  },
19927
20070
  disabled: disabled,
19928
20071
  allowClear: false,
19929
- 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)],
19930
20073
  onChange: function onChange(val) {
19931
20074
  return changeSystemOrderHandle(val);
19932
20075
  },
19933
20076
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
19934
- }, ((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) {
19935
20078
  return /*#__PURE__*/React.createElement(Select.Option, {
19936
20079
  key: item.billNo,
19937
20080
  value: item.billNo,
@@ -19952,7 +20095,7 @@ var GyReissue = function GyReissue(props) {
19952
20095
  disabled: disabled,
19953
20096
  allowClear: false,
19954
20097
  options: reasonList,
19955
- 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)],
19956
20099
  onChange: function onChange(val) {
19957
20100
  return changeTypeHandle(val);
19958
20101
  }
@@ -19963,8 +20106,10 @@ var GyReissue = function GyReissue(props) {
19963
20106
  disabled: disabled,
19964
20107
  canUpdateNumber: showChangeBtn,
19965
20108
  showChangeBtn: showChangeBtn,
20109
+ showErpGoodsBtn: showErpGoodsBtn,
20110
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
19966
20111
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
19967
- 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)],
19968
20113
  onChange: function onChange(val) {
19969
20114
  return changeGoodHandle(val);
19970
20115
  },
@@ -20001,7 +20146,7 @@ var typeMap$5 = {
20001
20146
  }
20002
20147
  };
20003
20148
  var GyReturnGoods = function GyReturnGoods(props) {
20004
- 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;
20005
20150
  var value = props.value,
20006
20151
  onChange = props.onChange,
20007
20152
  _props$reasonList = props.reasonList,
@@ -20109,7 +20254,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20109
20254
  };
20110
20255
  }();
20111
20256
  var selectedGoodsChange = useCallback(function (skuList) {
20112
- var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
20257
+ var _typeMap$type7, _typeMap$type8, _uniqBy;
20113
20258
  var newValue = _objectSpread2({}, value);
20114
20259
  // 原订单商品
20115
20260
  var originTradeGoodList = getGoodDetails({
@@ -20120,49 +20265,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
20120
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) {
20121
20266
  return skuList.includes(item.uuid);
20122
20267
  });
20123
- 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}`]);
20124
20269
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20125
- }, [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]);
20126
20271
  var changeTypeHandle = function changeTypeHandle(val) {
20127
- var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
20272
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
20128
20273
  var typeName = val === null || val === void 0 ? void 0 : val[0];
20129
- 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;
20130
20275
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
20131
20276
  var newValue = _objectSpread2({}, value);
20132
- 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;
20133
20278
  if (typeName === '1') {
20134
- var _typeMap$type13;
20135
- 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({
20136
20281
  mode: isStrict
20137
20282
  });
20138
20283
  } else if (typeName === '2') {
20139
- var _typeMap$type14;
20284
+ var _typeMap$type13;
20140
20285
  // 切换到非原单,清空列表
20141
- 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] = [];
20142
20287
  }
20143
20288
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20144
20289
  };
20145
20290
  var changeGoodHandle = function changeGoodHandle(val) {
20146
- var _typeMap$type15;
20291
+ var _typeMap$type14;
20147
20292
  var newValue = _objectSpread2({}, value);
20148
- 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) {
20149
- var _typeMap$type16, _typeMap$type17;
20150
- 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;
20151
- 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;
20152
20297
  return item;
20153
20298
  });
20154
20299
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20155
20300
  };
20156
20301
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
20157
- 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;
20158
20303
  var newValue = _objectSpread2({}, value);
20159
- 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;
20160
- 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])) {
20161
- var _typeMap$type20;
20162
- 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)] = [];
20163
- } 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])) {
20164
- var _typeMap$type22;
20165
- 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({
20166
20311
  mode: isStrict,
20167
20312
  sysOrderNo: val
20168
20313
  });
@@ -20170,11 +20315,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
20170
20315
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20171
20316
  };
20172
20317
  var getGoodDetails = function getGoodDetails(_ref4) {
20173
- var _typeMap$type23, _typeMap$type24, _order$details;
20318
+ var _typeMap$type22, _typeMap$type23, _order$details;
20174
20319
  var mode = _ref4.mode,
20175
20320
  sysOrderNo = _ref4.sysOrderNo;
20176
- 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];
20177
- 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];
20178
20323
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20179
20324
  return order.code === systemOrderNo;
20180
20325
  });
@@ -20185,19 +20330,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
20185
20330
  }) : goodDetails;
20186
20331
  };
20187
20332
  var handleModeChange = function handleModeChange(mode) {
20188
- var _value$typeMap$type$t4, _typeMap$type25, _typeMap$type26;
20189
- 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';
20190
20335
  setIsStrict(mode);
20191
20336
  if (!isOriginalOrder) return;
20192
- 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({
20193
20338
  mode: mode
20194
20339
  }))));
20195
20340
  };
20196
20341
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20197
- var showChangeBtn = useMemo(function () {
20198
- var _typeMap$type27;
20199
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20200
- }, [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]);
20201
20345
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
20202
20346
  gutter: 8,
20203
20347
  wrap: true
@@ -20215,12 +20359,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
20215
20359
  },
20216
20360
  disabled: disabled,
20217
20361
  allowClear: false,
20218
- 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)],
20219
20363
  onChange: function onChange(val) {
20220
20364
  return changeSystemOrderHandle(val);
20221
20365
  },
20222
20366
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
20223
- }, ((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) {
20224
20368
  return /*#__PURE__*/React.createElement(Select.Option, {
20225
20369
  key: item.billNo,
20226
20370
  value: item.billNo,
@@ -20241,7 +20385,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20241
20385
  disabled: disabled,
20242
20386
  allowClear: false,
20243
20387
  options: reasonList,
20244
- 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)],
20245
20389
  onChange: function onChange(val) {
20246
20390
  return changeTypeHandle(val);
20247
20391
  }
@@ -20253,13 +20397,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
20253
20397
  canUpdateNumber: showChangeBtn,
20254
20398
  showChangeBtn: showChangeBtn,
20255
20399
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20256
- 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)],
20257
20401
  onChange: function onChange(val) {
20258
20402
  return changeGoodHandle(val);
20259
20403
  },
20260
20404
  onModeChange: handleModeChange,
20261
20405
  isStrict: isStrict,
20262
- showErpGoodsBtn: false,
20406
+ showErpGoodsBtn: showErpGoodsBtn,
20407
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20263
20408
  tradeGoods: {
20264
20409
  originDataSource: getGoodDetails({
20265
20410
  mode: isStrict
@@ -20269,4 +20414,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
20269
20414
  })));
20270
20415
  };
20271
20416
 
20272
- 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 };