@kmkf-fe-packages/basic-components 2.0.55 → 2.0.57

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
@@ -3,7 +3,7 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
3
3
  import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isEqual, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
@@ -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,
@@ -16941,10 +17093,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
16941
17093
  var _data$data, _data$data$trades;
16942
17094
  if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
16943
17095
  data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
17096
+ var _tradeStatusMap$data$;
16944
17097
  return _objectSpread2(_objectSpread2({}, item), {}, {
16945
17098
  billNo: item.tradeNo,
16946
17099
  billType: WDT_ORDER_TYPE_MAP[item.tradeType],
16947
- billTag: item.tagName
17100
+ billTag: item.tagName,
17101
+ tradeStatusValue: tradeStatusMap === null || tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
16948
17102
  });
16949
17103
  });
16950
17104
  }
@@ -17187,7 +17341,6 @@ var index$3 = (function (props) {
17187
17341
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
17188
17342
  getBsE3OrderList(value.orderNo);
17189
17343
  } else if (type === 'GY_SYSTEM_ORDER') {
17190
- console.log('触发gy--getGyOrderList--1');
17191
17344
  getGyOrderList(value.orderNo);
17192
17345
  } else if (type === 'JST_SYSTEM_ORDER') {
17193
17346
  getJstOrderList(value.orderNo);
@@ -17301,11 +17454,13 @@ var index$3 = (function (props) {
17301
17454
  showOrderInfo: trades.map(function (_ref4) {
17302
17455
  var billNo = _ref4.billNo,
17303
17456
  billType = _ref4.billType,
17304
- billTag = _ref4.billTag;
17457
+ billTag = _ref4.billTag,
17458
+ tradeStatusValue = _ref4.tradeStatusValue;
17305
17459
  return {
17306
17460
  billNo: billNo,
17307
17461
  billType: billType,
17308
- billTag: billTag
17462
+ billTag: billTag,
17463
+ tradeStatusValue: tradeStatusValue
17309
17464
  };
17310
17465
  })
17311
17466
  }));
@@ -17623,7 +17778,7 @@ var CommonGoods = function CommonGoods(props) {
17623
17778
  disabled = props.disabled,
17624
17779
  onChange = props.onChange,
17625
17780
  compType = props.type;
17626
- console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
17781
+ // console.log('value?.orders', value?.orders);
17627
17782
  // 合并单订单会包含","
17628
17783
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
17629
17784
  var _order$componentMap$c;
@@ -18147,7 +18302,7 @@ var typeMap$1 = {
18147
18302
  }
18148
18303
  };
18149
18304
  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;
18305
+ var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
18151
18306
  var value = props.value,
18152
18307
  onChange = props.onChange,
18153
18308
  _props$reasonList = props.reasonList,
@@ -18217,11 +18372,13 @@ var wdtReissue = function wdtReissue(props) {
18217
18372
  var showOrderInfo = orders.map(function (_ref2) {
18218
18373
  var billNo = _ref2.billNo,
18219
18374
  billType = _ref2.billType,
18220
- billTag = _ref2.billTag;
18375
+ billTag = _ref2.billTag,
18376
+ tradeStatusValue = _ref2.tradeStatusValue;
18221
18377
  return {
18222
18378
  billNo: billNo,
18223
18379
  billType: billType,
18224
- billTag: billTag
18380
+ billTag: billTag,
18381
+ tradeStatusValue: tradeStatusValue
18225
18382
  };
18226
18383
  });
18227
18384
  onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
@@ -18304,7 +18461,7 @@ var wdtReissue = function wdtReissue(props) {
18304
18461
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18305
18462
  };
18306
18463
  var selectedGoodsChange = useCallback(function (skuList) {
18307
- var _typeMap$type21, _typeMap$type22, _uniqBy, _typeMap$type23;
18464
+ var _typeMap$type21, _typeMap$type22, _uniqBy;
18308
18465
  var newValue = _objectSpread2({}, value);
18309
18466
  // 原订单商品
18310
18467
  var originTradeGoodList = getGoodDetails({
@@ -18315,14 +18472,14 @@ var wdtReissue = function wdtReissue(props) {
18315
18472
  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
18473
  return skuList.includes(item.uuid);
18317
18474
  });
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)]);
18475
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
18319
18476
  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]);
18477
+ }, [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
18478
  //显示选择商品按钮 原单换不显示选择商品
18322
18479
  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]]);
18480
+ var _typeMap$type24;
18481
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
18482
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
18326
18483
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
18327
18484
  gutter: 8,
18328
18485
  wrap: true
@@ -18340,12 +18497,12 @@ var wdtReissue = function wdtReissue(props) {
18340
18497
  },
18341
18498
  disabled: disabled,
18342
18499
  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)],
18500
+ 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
18501
  onChange: function onChange(val) {
18345
18502
  return changeSystemOrderHandle(val);
18346
18503
  },
18347
18504
  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) {
18505
+ }, ((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
18506
  return /*#__PURE__*/React.createElement(Select.Option, {
18350
18507
  key: item.billNo,
18351
18508
  value: item.billNo,
@@ -18366,7 +18523,7 @@ var wdtReissue = function wdtReissue(props) {
18366
18523
  disabled: disabled,
18367
18524
  allowClear: false,
18368
18525
  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)],
18526
+ 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
18527
  onChange: function onChange(val) {
18371
18528
  return changeTypeHandle(val);
18372
18529
  }
@@ -18378,7 +18535,7 @@ var wdtReissue = function wdtReissue(props) {
18378
18535
  canUpdateNumber: showChangeBtn,
18379
18536
  showChangeBtn: showChangeBtn,
18380
18537
  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)],
18538
+ 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
18539
  onChange: function onChange(val) {
18383
18540
  return changeGoodHandle(val);
18384
18541
  },
@@ -19726,7 +19883,7 @@ var typeMap$4 = {
19726
19883
  }
19727
19884
  };
19728
19885
  var GyReissue = function GyReissue(props) {
19729
- var _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
19886
+ var _typeMap$type27, _typeMap$type28, _typeMap$type29, _systemOrder$orders, _typeMap$type30, _value$typeMap$type$s5, _typeMap$type31, _typeMap$type32, _typeMap$type33;
19730
19887
  var value = props.value,
19731
19888
  onChange = props.onChange,
19732
19889
  _props$reasonList = props.reasonList,
@@ -19881,7 +20038,7 @@ var GyReissue = function GyReissue(props) {
19881
20038
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19882
20039
  };
19883
20040
  var selectedGoodsChange = useCallback(function (skuList) {
19884
- var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
20041
+ var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy;
19885
20042
  pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
19886
20043
  var newValue = _objectSpread2({}, valueRef.current || {});
19887
20044
  // 原订单商品
@@ -19893,21 +20050,15 @@ var GyReissue = function GyReissue(props) {
19893
20050
  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
20051
  return skuList.includes(item.uuid);
19895
20052
  });
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)]);
20053
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
19897
20054
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19898
20055
  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]);
20056
+ }, [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
20057
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
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, {
20058
+ 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];
20059
+ 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]);
20060
+ var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
20061
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
19911
20062
  gutter: 8,
19912
20063
  wrap: true
19913
20064
  }, /*#__PURE__*/React.createElement(Col, {
@@ -19924,12 +20075,12 @@ var GyReissue = function GyReissue(props) {
19924
20075
  },
19925
20076
  disabled: disabled,
19926
20077
  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)],
20078
+ 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
20079
  onChange: function onChange(val) {
19929
20080
  return changeSystemOrderHandle(val);
19930
20081
  },
19931
20082
  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) {
20083
+ }, ((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
20084
  return /*#__PURE__*/React.createElement(Select.Option, {
19934
20085
  key: item.billNo,
19935
20086
  value: item.billNo,
@@ -19950,7 +20101,7 @@ var GyReissue = function GyReissue(props) {
19950
20101
  disabled: disabled,
19951
20102
  allowClear: false,
19952
20103
  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)],
20104
+ 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
20105
  onChange: function onChange(val) {
19955
20106
  return changeTypeHandle(val);
19956
20107
  }
@@ -19961,8 +20112,10 @@ var GyReissue = function GyReissue(props) {
19961
20112
  disabled: disabled,
19962
20113
  canUpdateNumber: showChangeBtn,
19963
20114
  showChangeBtn: showChangeBtn,
20115
+ showErpGoodsBtn: showErpGoodsBtn,
20116
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
19964
20117
  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)],
20118
+ 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
20119
  onChange: function onChange(val) {
19967
20120
  return changeGoodHandle(val);
19968
20121
  },
@@ -19999,7 +20152,7 @@ var typeMap$5 = {
19999
20152
  }
20000
20153
  };
20001
20154
  var GyReturnGoods = function GyReturnGoods(props) {
20002
- var _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
20155
+ var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
20003
20156
  var value = props.value,
20004
20157
  onChange = props.onChange,
20005
20158
  _props$reasonList = props.reasonList,
@@ -20107,7 +20260,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20107
20260
  };
20108
20261
  }();
20109
20262
  var selectedGoodsChange = useCallback(function (skuList) {
20110
- var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
20263
+ var _typeMap$type7, _typeMap$type8, _uniqBy;
20111
20264
  var newValue = _objectSpread2({}, value);
20112
20265
  // 原订单商品
20113
20266
  var originTradeGoodList = getGoodDetails({
@@ -20118,49 +20271,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
20118
20271
  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
20272
  return skuList.includes(item.uuid);
20120
20273
  });
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)]);
20274
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20122
20275
  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]);
20276
+ }, [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
20277
  var changeTypeHandle = function changeTypeHandle(val) {
20125
- var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
20278
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
20126
20279
  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;
20280
+ 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
20281
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
20129
20282
  var newValue = _objectSpread2({}, value);
20130
- newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
20283
+ newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
20131
20284
  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({
20285
+ var _typeMap$type12;
20286
+ newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
20134
20287
  mode: isStrict
20135
20288
  });
20136
20289
  } else if (typeName === '2') {
20137
- var _typeMap$type14;
20290
+ var _typeMap$type13;
20138
20291
  // 切换到非原单,清空列表
20139
- newValue[(_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
20292
+ newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
20140
20293
  }
20141
20294
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20142
20295
  };
20143
20296
  var changeGoodHandle = function changeGoodHandle(val) {
20144
- var _typeMap$type15;
20297
+ var _typeMap$type14;
20145
20298
  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;
20299
+ 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) {
20300
+ var _typeMap$type15, _typeMap$type16;
20301
+ 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;
20302
+ 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
20303
  return item;
20151
20304
  });
20152
20305
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20153
20306
  };
20154
20307
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
20155
- var _typeMap$type18, _value$typeMap$type$t2, _typeMap$type19, _value$typeMap$type$t3, _typeMap$type21;
20308
+ var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
20156
20309
  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({
20310
+ 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;
20311
+ 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])) {
20312
+ var _typeMap$type19;
20313
+ 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)] = [];
20314
+ } 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])) {
20315
+ var _typeMap$type21;
20316
+ 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
20317
  mode: isStrict,
20165
20318
  sysOrderNo: val
20166
20319
  });
@@ -20168,11 +20321,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
20168
20321
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20169
20322
  };
20170
20323
  var getGoodDetails = function getGoodDetails(_ref4) {
20171
- var _typeMap$type23, _typeMap$type24, _order$details;
20324
+ var _typeMap$type22, _typeMap$type23, _order$details;
20172
20325
  var mode = _ref4.mode,
20173
20326
  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];
20327
+ 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];
20328
+ 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
20329
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20177
20330
  return order.code === systemOrderNo;
20178
20331
  });
@@ -20183,19 +20336,18 @@ var GyReturnGoods = function GyReturnGoods(props) {
20183
20336
  }) : goodDetails;
20184
20337
  };
20185
20338
  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';
20339
+ var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
20340
+ 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
20341
  setIsStrict(mode);
20189
20342
  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({
20343
+ 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
20344
  mode: mode
20192
20345
  }))));
20193
20346
  };
20194
20347
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
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]]);
20348
+ 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];
20349
+ var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
20350
+ 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
20351
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
20200
20352
  gutter: 8,
20201
20353
  wrap: true
@@ -20213,12 +20365,12 @@ var GyReturnGoods = function GyReturnGoods(props) {
20213
20365
  },
20214
20366
  disabled: disabled,
20215
20367
  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)],
20368
+ 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
20369
  onChange: function onChange(val) {
20218
20370
  return changeSystemOrderHandle(val);
20219
20371
  },
20220
20372
  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) {
20373
+ }, ((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
20374
  return /*#__PURE__*/React.createElement(Select.Option, {
20223
20375
  key: item.billNo,
20224
20376
  value: item.billNo,
@@ -20239,7 +20391,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20239
20391
  disabled: disabled,
20240
20392
  allowClear: false,
20241
20393
  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)],
20394
+ 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
20395
  onChange: function onChange(val) {
20244
20396
  return changeTypeHandle(val);
20245
20397
  }
@@ -20251,13 +20403,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
20251
20403
  canUpdateNumber: showChangeBtn,
20252
20404
  showChangeBtn: showChangeBtn,
20253
20405
  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)],
20406
+ 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
20407
  onChange: function onChange(val) {
20256
20408
  return changeGoodHandle(val);
20257
20409
  },
20258
20410
  onModeChange: handleModeChange,
20259
20411
  isStrict: isStrict,
20260
- showErpGoodsBtn: false,
20412
+ showErpGoodsBtn: showErpGoodsBtn,
20413
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20261
20414
  tradeGoods: {
20262
20415
  originDataSource: getGoodDetails({
20263
20416
  mode: isStrict
@@ -20267,4 +20420,4 @@ var GyReturnGoods = function GyReturnGoods(props) {
20267
20420
  })));
20268
20421
  };
20269
20422
 
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 };
20423
+ 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 };