@kmkf-fe-packages/basic-components 2.7.7-beta.10 → 2.7.7-beta.12

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.
Files changed (2) hide show
  1. package/dist/index.esm.js +187 -84
  2. package/package.json +3 -3
package/dist/index.esm.js CHANGED
@@ -9351,7 +9351,8 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
9351
9351
  },
9352
9352
  jstReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
9353
9353
  jstReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnGoods")), []),
9354
- jstSystemOrderBillType: getValue("".concat(nex.uniqueKey, "_jstSystemOrderBillType")) || '',
9354
+ // jstSystemOrderBillType:
9355
+ // getValue(`${nex.uniqueKey}_jstSystemOrderBillType`) || '',
9355
9356
  shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
9356
9357
  jstSystemOrderNo: getValue("".concat(nex.uniqueKey, "_jstSystemOrderNo"))
9357
9358
  });
@@ -22223,7 +22224,8 @@ var getColumns$5 = function getColumns() {
22223
22224
  min: 0,
22224
22225
  precision: 2,
22225
22226
  onChange: function onChange(num) {
22226
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
22227
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
22228
+ if ((num || num === 0) && (record.qty || record.qty === 0)) updateHandle(num * (record.qty || 0), index, 'saleAmount');
22227
22229
  }
22228
22230
  }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(4).replace(/\.?0+$/, '') : '');
22229
22231
  }
@@ -22253,16 +22255,39 @@ var getColumns$5 = function getColumns() {
22253
22255
  min: 1,
22254
22256
  precision: 0,
22255
22257
  onChange: function onChange(num) {
22256
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
22258
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
22259
+ if ((num || num === 0) && (record.salePrice || record.salePrice === 0)) updateHandle(num * (record.salePrice || 0), index, 'saleAmount');
22257
22260
  }
22258
22261
  }) : /*#__PURE__*/React.createElement("span", null, val);
22259
22262
  }
22260
22263
  }, {
22261
22264
  dataIndex: 'saleAmount',
22262
22265
  title: '总金额',
22263
- render: function render(val, record) {
22264
- var amount = (record.qty || 0) * (+record.salePrice || 0);
22265
- return Number(amount).toFixed(4).replace(/\.?0+$/, '');
22266
+ validator: function validator(_rule, value) {
22267
+ var goodsName = '';
22268
+ if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
22269
+ var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.saleAmount);
22270
+ var res = typeof v === 'number' ? v < 0 : true;
22271
+ if (res) {
22272
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
22273
+ }
22274
+ return res;
22275
+ })) {
22276
+ return Promise.reject("".concat(goodsName, "\u603B\u91D1\u989D\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
22277
+ }
22278
+ },
22279
+ render: function render(val, record, index) {
22280
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22281
+ style: {
22282
+ width: 130
22283
+ },
22284
+ value: val,
22285
+ min: 0,
22286
+ precision: 2,
22287
+ onChange: function onChange(num) {
22288
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'saleAmount');
22289
+ }
22290
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
22266
22291
  }
22267
22292
  }, {
22268
22293
  dataIndex: 'batchId',
@@ -22343,6 +22368,19 @@ var getColumns$5 = function getColumns() {
22343
22368
  dataIndex: 'salePrice',
22344
22369
  title: '单价',
22345
22370
  width: 120,
22371
+ validator: function validator(_rule, value) {
22372
+ var goodsName = '';
22373
+ if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
22374
+ var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.salePrice);
22375
+ var res = typeof v === 'number' ? v < 0 : true;
22376
+ if (res) {
22377
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
22378
+ }
22379
+ return res;
22380
+ })) {
22381
+ return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
22382
+ }
22383
+ },
22346
22384
  render: function render(val, record, index) {
22347
22385
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22348
22386
  style: {
@@ -22352,7 +22390,8 @@ var getColumns$5 = function getColumns() {
22352
22390
  min: 0,
22353
22391
  precision: 2,
22354
22392
  onChange: function onChange(num) {
22355
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
22393
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'salePrice');
22394
+ if ((num || num === 0) && (record.qty || record.qty === 0)) updateHandle(num * (record.qty || 0), index, 'saleAmount');
22356
22395
  }
22357
22396
  }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(4).replace(/\.?0+$/, '') : '');
22358
22397
  }
@@ -22360,6 +22399,19 @@ var getColumns$5 = function getColumns() {
22360
22399
  dataIndex: 'qty',
22361
22400
  title: '数量',
22362
22401
  width: 100,
22402
+ validator: function validator(_rule, value) {
22403
+ var goodsName = '';
22404
+ if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
22405
+ var qty = toNum$3(goods === null || goods === void 0 ? void 0 : goods.qty);
22406
+ var res = typeof qty === 'number' ? qty < 1 : true;
22407
+ if (res) {
22408
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
22409
+ }
22410
+ return res;
22411
+ })) {
22412
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
22413
+ }
22414
+ },
22363
22415
  render: function render(val, record, index) {
22364
22416
  return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22365
22417
  style: {
@@ -22369,16 +22421,39 @@ var getColumns$5 = function getColumns() {
22369
22421
  min: 1,
22370
22422
  precision: 0,
22371
22423
  onChange: function onChange(num) {
22372
- return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
22424
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'qty');
22425
+ if ((num || num === 0) && (record.salePrice || record.salePrice === 0)) updateHandle(num * (record.salePrice || 0), index, 'saleAmount');
22373
22426
  }
22374
22427
  }) : /*#__PURE__*/React.createElement("span", null, val);
22375
22428
  }
22376
22429
  }, {
22377
22430
  dataIndex: 'saleAmount',
22378
22431
  title: '总金额',
22379
- render: function render(val, record) {
22380
- var amount = (record.qty || 0) * (+record.salePrice || 0);
22381
- return amount ? Number(amount).toFixed(4).replace(/\.?0+$/, '') : '';
22432
+ validator: function validator(_rule, value) {
22433
+ var goodsName = '';
22434
+ if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
22435
+ var v = toNum$3(goods === null || goods === void 0 ? void 0 : goods.saleAmount);
22436
+ var res = typeof v === 'number' ? v < 0 : true;
22437
+ if (res) {
22438
+ goodsName = (goods === null || goods === void 0 ? void 0 : goods.name) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
22439
+ }
22440
+ return res;
22441
+ })) {
22442
+ return Promise.reject("".concat(goodsName, "\u603B\u91D1\u989D\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
22443
+ }
22444
+ },
22445
+ render: function render(val, record, index) {
22446
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
22447
+ style: {
22448
+ width: 130
22449
+ },
22450
+ value: val,
22451
+ min: 0,
22452
+ precision: 2,
22453
+ onChange: function onChange(num) {
22454
+ updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'saleAmount');
22455
+ }
22456
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
22382
22457
  }
22383
22458
  }, {
22384
22459
  dataIndex: 'isGift',
@@ -24989,6 +25064,8 @@ var systemOrderNoMap = {
24989
25064
  KM_RETURN_GOODS: 'sid',
24990
25065
  KM_EXCHANGE_GOODS: 'sid',
24991
25066
  JST_REISSUE_GOODS: 'oId',
25067
+ JST_RETURN_GOODS: 'oId',
25068
+ JST_EXCHANGE_GOODS: 'oId',
24992
25069
  GY_REISSUE_GOODS: 'code',
24993
25070
  BS_E3_REISSUE_GOODS: 'orderSn',
24994
25071
  WDT_REISSUE_GOODS: 'tradeNo'
@@ -25301,10 +25378,11 @@ var GoodItem$1 = function GoodItem(props) {
25301
25378
  var canDelete = ['JST_AFTERSALE_GOODS'].includes(type);
25302
25379
  var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
25303
25380
  // 监听聚水潭退货商品
25304
- var jstReturnGoods = Form === null || Form === void 0 ? void 0 : Form.useWatch('3979edfd6d', form);
25305
- var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
25381
+ // const jstReturnGoods = Form?.useWatch('3979edfd6d', form);
25382
+ // const isShowSelectTradeGoods =
25383
+ // type !== 'JST_EXCHANGE_GOODS' || jstReturnGoods?.jstSystemOrderNo;
25306
25384
  // 判断是否为是否展示系统单筛选项
25307
- var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'WLN_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
25385
+ var isShowSelect = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS', 'JY_GOODS', 'JY_REISSUE_GOODS', 'JKY_GOODS', 'JKY_REISSUE_GOODS', 'WLN_REISSUE_GOODS', 'GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS'].includes(type) || false;
25308
25386
  var isReissueType = type && ['GY_REISSUE_GOODS', 'KM_REISSUE_GOODS', 'BS_E3_REISSUE_GOODS', 'WDT_REISSUE_GOODS', 'JST_REISSUE_GOODS', 'JY_REISSUE_GOODS', 'JKY_REISSUE_GOODS', 'WLN_REISSUE_GOODS'].includes(type) || false;
25309
25387
  var refModal = useRef();
25310
25388
  console.debug('表格数据', value);
@@ -25598,7 +25676,7 @@ var GoodItem$1 = function GoodItem(props) {
25598
25676
  }, showModeBtn && /*#__PURE__*/React.createElement(Checkbox, {
25599
25677
  checked: isStrict,
25600
25678
  onChange: handleCheckboxChange
25601
- }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && isShowSelectTradeGoods && /*#__PURE__*/React.createElement(SelectTradeGoods, {
25679
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !isEmpty(tradeGoods) && /*#__PURE__*/React.createElement(SelectTradeGoods, {
25602
25680
  isReloadSelectTable: isReloadSelectTable,
25603
25681
  validSystemOrderFn: validSystemOrderFn,
25604
25682
  validSystemOrder: validSystemOrder,
@@ -28531,7 +28609,8 @@ var componentMap$2 = {
28531
28609
  checkShowModeBtn: function checkShowModeBtn(value) {
28532
28610
  var _value$allOrders;
28533
28611
  return value === null || value === void 0 ? void 0 : (_value$allOrders = value.allOrders) === null || _value$allOrders === void 0 ? void 0 : _value$allOrders.some(function (order) {
28534
- return order === null || order === void 0 ? void 0 : order.tpTid.includes('|');
28612
+ var _order$tpTid;
28613
+ return order === null || order === void 0 ? void 0 : (_order$tpTid = order.tpTid) === null || _order$tpTid === void 0 ? void 0 : _order$tpTid.includes('|');
28535
28614
  });
28536
28615
  }
28537
28616
  },
@@ -29148,10 +29227,11 @@ var componentMap$4 = {
29148
29227
  systemOrderNo: 'jstSystemOrderNo',
29149
29228
  oIdKey: 'oId',
29150
29229
  goodDetailsKey: 'items',
29151
- skuIdKey: 'skuId',
29152
29230
  outerOiIdKey: '',
29153
29231
  name: '聚水潭',
29154
29232
  updateGoodsHandle: updateJstGoodsHandle,
29233
+ isShowSelectTradeGoods: true,
29234
+ mergeIdenticalGoods: jstMergeIdenticalGoods,
29155
29235
  eventNameMap: {
29156
29236
  // pubsub 事件
29157
29237
  exchangeCopyGood: 'jstExchangeCopyGood',
@@ -29169,7 +29249,7 @@ var componentMap$4 = {
29169
29249
  systemOrderNo: 'kmSystemOrderNo',
29170
29250
  oIdKey: 'billNo',
29171
29251
  goodDetailsKey: 'subOrders',
29172
- skuIdKey: 'skuId',
29252
+ uniqueKey: 'skuId',
29173
29253
  outerOiIdKey: '',
29174
29254
  name: '快麦',
29175
29255
  updateGoodsHandle: updateKmGoodsHandle,
@@ -29217,7 +29297,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29217
29297
  disabled = props.disabled,
29218
29298
  compType = props.type,
29219
29299
  form = props.form;
29220
- var uniqueKey = (componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp = componentMap$4[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.skuIdKey) || 'uuid';
29300
+ var uniqueKey = (componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp = componentMap$4[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.uniqueKey) || 'uuid';
29221
29301
  var valueRef = useRef({});
29222
29302
  // PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
29223
29303
  var _useState = useState(false),
@@ -29228,6 +29308,10 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29228
29308
  _useState4 = _slicedToArray(_useState3, 2),
29229
29309
  originDataSource = _useState4[0],
29230
29310
  setOriginDataSource = _useState4[1];
29311
+ var _useState5 = useState([]),
29312
+ _useState6 = _slicedToArray(_useState5, 2),
29313
+ orders = _useState6[0],
29314
+ setOrders = _useState6[1];
29231
29315
  useEffect(function () {
29232
29316
  var subscription = componentMap$4[compType].eventNameMap.exchangeBackCopyGood && pubsub.subscribe(componentMap$4[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
29233
29317
  if (disabled) return;
@@ -29287,11 +29371,13 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29287
29371
  newValue[componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$4[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.valueKey] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), uniqueKey)) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
29288
29372
  return skuList.includes(item[uniqueKey]);
29289
29373
  });
29290
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
29374
+ onChange === null || onChange === void 0 ? void 0 : onChange(JSON.parse(JSON.stringify(newValue)));
29291
29375
  }, [value === null || value === void 0 ? void 0 : value[componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$4[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.valueKey], isStrict, originDataSource]);
29292
29376
  var getGoodDetails = function getGoodDetails(_ref) {
29293
- var _componentMap$compTyp5, _componentMap$compTyp6, _order$componentMap$c, _componentMap$compTyp7;
29294
- var returnGoodsValue = _ref.returnGoodsValue,
29377
+ var _componentMap$compTyp5, _componentMap$compTyp6, _componentMap$compTyp7, _componentMap$compTyp8;
29378
+ var _ref$isAllOrders = _ref.isAllOrders,
29379
+ isAllOrders = _ref$isAllOrders === void 0 ? false : _ref$isAllOrders,
29380
+ returnGoodsValue = _ref.returnGoodsValue,
29295
29381
  mode = _ref.mode,
29296
29382
  sysOrderNo = _ref.sysOrderNo;
29297
29383
  var systemOrder = returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp5 = componentMap$4[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.systemOrder];
@@ -29299,9 +29385,17 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29299
29385
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
29300
29386
  return order[componentMap$4[compType].oIdKey] === systemOrderNo;
29301
29387
  });
29302
- var goodDetails = jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$4[compType].goodDetailsKey]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.length) ? (_componentMap$compTyp7 = componentMap$4[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.updateGoodsHandle([order], {
29388
+ var orders = isAllOrders ? (systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || [] : order ? [order] : [];
29389
+ setOrders(orders);
29390
+ var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
29391
+ var _order$componentMap$c;
29392
+ return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$4[compType].goodDetailsKey]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.length;
29393
+ });
29394
+ var goodDetails = hasGoodDetails ? componentMap$4[compType].mergeIdenticalGoods ? componentMap$4[compType].mergeIdenticalGoods((_componentMap$compTyp7 = componentMap$4[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.updateGoodsHandle(orders, {
29395
+ canEdit: true
29396
+ })) : (_componentMap$compTyp8 = componentMap$4[compType]) === null || _componentMap$compTyp8 === void 0 ? void 0 : _componentMap$compTyp8.updateGoodsHandle(orders, {
29303
29397
  canEdit: true
29304
- }) : []);
29398
+ }) : [];
29305
29399
  var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
29306
29400
  return mode ? goodDetails.filter(function (goodItem) {
29307
29401
  return !orderNo || goodItem[componentMap$4[compType].outerOiIdKey] === orderNo;
@@ -29310,13 +29404,16 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29310
29404
  var getDataSourceAsync = function getDataSourceAsync() {
29311
29405
  return new Promise(function (resolve) {
29312
29406
  pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
29407
+ var _componentMap$compTyp9, _componentMap$compTyp10;
29313
29408
  resolve(data);
29314
29409
  console.log('getDataSourceAsync---111data--', data, getGoodDetails({
29315
29410
  returnGoodsValue: data,
29316
- mode: isStrict
29411
+ mode: isStrict,
29412
+ isAllOrders: componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp9 = componentMap$4[compType]) === null || _componentMap$compTyp9 === void 0 ? void 0 : _componentMap$compTyp9.isShowSelectTradeGoods
29317
29413
  }));
29318
29414
  setOriginDataSource(getGoodDetails({
29319
29415
  returnGoodsValue: data,
29416
+ isAllOrders: componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp10 = componentMap$4[compType]) === null || _componentMap$compTyp10 === void 0 ? void 0 : _componentMap$compTyp10.isShowSelectTradeGoods,
29320
29417
  mode: isStrict
29321
29418
  }));
29322
29419
  });
@@ -29328,7 +29425,8 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29328
29425
  key: componentMap$4[compType].type
29329
29426
  }, props), {}, {
29330
29427
  validSystemOrderFn: function validSystemOrderFn() {
29331
- return componentMap$4[compType].validSystemOrderFn(form);
29428
+ var _componentMap$compTyp11, _componentMap$compTyp12;
29429
+ return (_componentMap$compTyp11 = (_componentMap$compTyp12 = componentMap$4[compType]).validSystemOrderFn) === null || _componentMap$compTyp11 === void 0 ? void 0 : _componentMap$compTyp11.call(_componentMap$compTyp12, form);
29332
29430
  },
29333
29431
  isReloadSelectTable: componentMap$4[compType].isReloadSelectTable,
29334
29432
  disabled: disabled,
@@ -29337,6 +29435,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
29337
29435
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
29338
29436
  value: value === null || value === void 0 ? void 0 : value[componentMap$4[compType].valueKey],
29339
29437
  otherOperations: copyGoods(),
29438
+ systemOrders: orders,
29340
29439
  tradeGoods: componentMap$4[compType].showChooseTradeGoodsBtn ? {
29341
29440
  uniqueKey: uniqueKey,
29342
29441
  originDataSource: originDataSource,
@@ -29631,7 +29730,7 @@ var typeMap$2 = {
29631
29730
  typeName: 'jstReturnType',
29632
29731
  systemOrder: 'jstSystemOrder',
29633
29732
  systemOrderNo: 'jstSystemOrderNo',
29634
- systemOrderBillType: 'jstSystemOrderBillType',
29733
+ // systemOrderBillType: 'jstSystemOrderBillType',
29635
29734
  getOrderList: jstUtils.getJstOrderListSingleton,
29636
29735
  updateGoodsHandle: updateJstGoodsHandle,
29637
29736
  alwaysShowChooseErpGoodsBtn: true,
@@ -29641,6 +29740,8 @@ var typeMap$2 = {
29641
29740
  goodDetailsKey: 'items',
29642
29741
  mergeIdenticalGoods: jstMergeIdenticalGoods,
29643
29742
  uniqueKey: 'uuid',
29743
+ hideSelectSysOrderId: true,
29744
+ isShowSelectTradeGoods: true,
29644
29745
  eventNameMap: {
29645
29746
  // pubsub 事件
29646
29747
  exchangeCopyGood: 'jstExchangeCopyGood',
@@ -29735,16 +29836,16 @@ var typeMap$2 = {
29735
29836
  goodDetailsKey: 'items',
29736
29837
  isShowSelectTradeGoods: true,
29737
29838
  checkShowModeBtn: function checkShowModeBtn(value) {
29738
- var _value$wlnSystemOrder, _value$wlnSystemOrder2;
29839
+ var _value$wlnSystemOrder, _value$wlnSystemOrder2, _selectOrder$tpTid, _selectOrder$tid;
29739
29840
  var selectOrder = (value === null || value === void 0 ? void 0 : value.wlnSystemOrderNo) && (value === null || value === void 0 ? void 0 : (_value$wlnSystemOrder = value.wlnSystemOrder) === null || _value$wlnSystemOrder === void 0 ? void 0 : (_value$wlnSystemOrder2 = _value$wlnSystemOrder.orders) === null || _value$wlnSystemOrder2 === void 0 ? void 0 : _value$wlnSystemOrder2.find(function (order) {
29740
29841
  return (value === null || value === void 0 ? void 0 : value.wlnSystemOrderNo) === (order === null || order === void 0 ? void 0 : order.billNo);
29741
29842
  }));
29742
- return (selectOrder === null || selectOrder === void 0 ? void 0 : selectOrder.tpTid.includes('|')) || (selectOrder === null || selectOrder === void 0 ? void 0 : selectOrder.tid.includes('|'));
29843
+ return (selectOrder === null || selectOrder === void 0 ? void 0 : (_selectOrder$tpTid = selectOrder.tpTid) === null || _selectOrder$tpTid === void 0 ? void 0 : _selectOrder$tpTid.includes('|')) || (selectOrder === null || selectOrder === void 0 ? void 0 : (_selectOrder$tid = selectOrder.tid) === null || _selectOrder$tid === void 0 ? void 0 : _selectOrder$tid.includes('|'));
29743
29844
  }
29744
29845
  }
29745
29846
  };
29746
29847
  var PublicReissue = function PublicReissue(props) {
29747
- var _typeMap$type, _typeMap$type2, _typeMap$type20, _typeMap$type38, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _value$typeMap$type$s8, _typeMap$type48, _typeMap$type49, _typeMap$type50, _typeMap$type51, _typeMap$type52, _typeMap$type53, _typeMap$type54, _typeMap$type55, _value$typeMap$type$s9, _typeMap$type56, _typeMap$type57, _typeMap$type58, _typeMap$type59;
29848
+ var _typeMap$type, _typeMap$type2, _typeMap$type21, _typeMap$type39, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48, _typeMap$type49, _value$typeMap$type$s8, _typeMap$type50, _typeMap$type51, _typeMap$type52, _typeMap$type53, _typeMap$type54, _typeMap$type55, _typeMap$type56, _typeMap$type57, _value$typeMap$type$s9, _typeMap$type58, _typeMap$type59, _typeMap$type60, _typeMap$type61;
29748
29849
  var value = props.value,
29749
29850
  onChange = props.onChange,
29750
29851
  _props$reasonList = props.reasonList,
@@ -29844,23 +29945,25 @@ var PublicReissue = function PublicReissue(props) {
29844
29945
  var newValue = _objectSpread2({}, value);
29845
29946
  newValue[(_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName] = val;
29846
29947
  if (typeName === '1') {
29847
- var _typeMap$type16;
29948
+ var _typeMap$type16, _typeMap$type17;
29848
29949
  newValue[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key] = getGoodDetails({
29849
- mode: isStrict
29950
+ mode: isStrict,
29951
+ // 如果没有选择系统单,拿平台单下所有商品
29952
+ isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.hideSelectSysOrderId
29850
29953
  });
29851
29954
  } else if (typeName === '2') {
29852
- var _typeMap$type17;
29955
+ var _typeMap$type18;
29853
29956
  // 切换到非原单,清空列表
29854
- newValue[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key] = [];
29957
+ newValue[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key] = [];
29855
29958
  }
29856
29959
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
29857
29960
  };
29858
29961
  var handleModeChange = function handleModeChange(mode) {
29859
- var _value$typeMap$type$t, _typeMap$type18, _typeMap$type19;
29860
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
29962
+ var _value$typeMap$type$t, _typeMap$type19, _typeMap$type20;
29963
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
29861
29964
  setIsStrict(mode);
29862
29965
  if (!isOriginalOrder) return;
29863
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key, getGoodDetails({
29966
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key, getGoodDetails({
29864
29967
  mode: mode
29865
29968
  }))));
29866
29969
  };
@@ -29877,7 +29980,7 @@ var PublicReissue = function PublicReissue(props) {
29877
29980
  });
29878
29981
  }
29879
29982
  return map;
29880
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key]]);
29983
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key]]);
29881
29984
  // 用于跟踪已经处理过的 sysItemId,避免重复处理
29882
29985
  var processedSysItemIdsRef = useRef(new Set());
29883
29986
  useEffect(function () {
@@ -29949,13 +30052,13 @@ var PublicReissue = function PublicReissue(props) {
29949
30052
  }
29950
30053
  }, [sysItemIdMap]);
29951
30054
  var getGoodDetails = function getGoodDetails(_ref5) {
29952
- var _typeMap$type21, _typeMap$type22, _value$typeMap$type$s6, _typeMap$type23, _typeMap$type24, _typeMap$type25, _typeMap$type26;
30055
+ var _typeMap$type22, _typeMap$type23, _value$typeMap$type$s6, _typeMap$type24, _typeMap$type25, _typeMap$type26, _typeMap$type27;
29953
30056
  var mode = _ref5.mode,
29954
30057
  sysOrderNo = _ref5.sysOrderNo,
29955
30058
  _ref5$isAllOrders = _ref5.isAllOrders,
29956
30059
  isAllOrders = _ref5$isAllOrders === void 0 ? false : _ref5$isAllOrders;
29957
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrder];
29958
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo];
30060
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
30061
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
29959
30062
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
29960
30063
  return order[typeMap$2[type].oIdKey] === systemOrderNo;
29961
30064
  });
@@ -29982,12 +30085,12 @@ var PublicReissue = function PublicReissue(props) {
29982
30085
  canEdit: true
29983
30086
  };
29984
30087
  }
29985
- var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : order ? [order] : [];
30088
+ var orders = isAllOrders ? (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orders) || [] : order ? [order] : [];
29986
30089
  var hasGoodDetails = orders === null || orders === void 0 ? void 0 : orders.some(function (order) {
29987
30090
  var _order$typeMap$type$g;
29988
30091
  return order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length;
29989
30092
  });
29990
- var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.isSelectTradeGoodsMerge)) && typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.updateGoodsHandle(orders, orderRest, type)) : (_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.updateGoodsHandle(orders, orderRest, type) : [];
30093
+ var goodDetails = hasGoodDetails ? (!isAllOrders || ((_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.isSelectTradeGoodsMerge)) && typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.updateGoodsHandle(orders, orderRest, type)) : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.updateGoodsHandle(orders, orderRest, type) : [];
29991
30094
  var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
29992
30095
  var list = mode && !isAllOrders ? goodDetails.filter(function (goodItem) {
29993
30096
  return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
@@ -29995,30 +30098,30 @@ var PublicReissue = function PublicReissue(props) {
29995
30098
  return list;
29996
30099
  };
29997
30100
  var changeGoodHandle = function changeGoodHandle(val) {
29998
- var _typeMap$type27;
30101
+ var _typeMap$type28;
29999
30102
  var newValue = _objectSpread2({}, value);
30000
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)] = val || [];
30103
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = val || [];
30001
30104
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
30002
30105
  };
30003
30106
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
30004
- var _typeMap$type28, _typeMap$type29, _value$typeMap$type$t2, _typeMap$type34, _value$typeMap$type$t3, _typeMap$type36;
30107
+ var _typeMap$type29, _typeMap$type30, _value$typeMap$type$t2, _typeMap$type35, _value$typeMap$type$t3, _typeMap$type37;
30005
30108
  var newValue = _objectSpread2({}, value);
30006
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)] = val;
30007
- if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderBillType) {
30008
- var _value$typeMap$type$s7, _typeMap$type30, _typeMap$type32, _typeMap$type33;
30009
- var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders) || [];
30109
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)] = val;
30110
+ if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderBillType) {
30111
+ var _value$typeMap$type$s7, _typeMap$type31, _typeMap$type33, _typeMap$type34;
30112
+ var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.orders) || [];
30010
30113
  var targetOrder = val && orders.find(function (oItem) {
30011
- var _typeMap$type31;
30012
- return oItem[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.oIdKey] === val;
30114
+ var _typeMap$type32;
30115
+ return oItem[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.oIdKey] === val;
30013
30116
  });
30014
- newValue[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.orderTypeKey];
30015
- }
30016
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
30017
- var _typeMap$type35;
30018
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)] = [];
30019
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
30020
- var _typeMap$type37;
30021
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)] = getGoodDetails({
30117
+ newValue[(_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.orderTypeKey];
30118
+ }
30119
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
30120
+ var _typeMap$type36;
30121
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.key)] = [];
30122
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
30123
+ var _typeMap$type38;
30124
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key)] = getGoodDetails({
30022
30125
  mode: isStrict,
30023
30126
  sysOrderNo: val
30024
30127
  });
@@ -30026,28 +30129,28 @@ var PublicReissue = function PublicReissue(props) {
30026
30129
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
30027
30130
  };
30028
30131
  //显示选择商品按钮
30029
- var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.systemOrderNo]);
30132
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.systemOrderNo]);
30030
30133
  var selectedGoodsChange = useCallback(function (skuList) {
30031
- var _typeMap$type39, _typeMap$type40, _typeMap$type41, _uniqBy, _typeMap$type42;
30134
+ var _typeMap$type40, _typeMap$type41, _typeMap$type42, _uniqBy, _typeMap$type43;
30032
30135
  var newValue = _objectSpread2({}, value);
30033
30136
  // 原订单商品
30034
30137
  var originTradeGoodList = getGoodDetails({
30035
30138
  mode: isStrict,
30036
- isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.isShowSelectTradeGoods
30139
+ isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.isShowSelectTradeGoods
30037
30140
  }) || [];
30038
30141
  // 当前选中的所有商品【包含了原订单+商品库】
30039
- var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.key)]) || [];
30040
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
30041
- var _typeMap$type43;
30042
- return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.uniqueKey) || 'uuid']);
30142
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.key)]) || [];
30143
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
30144
+ var _typeMap$type44;
30145
+ return skuList.includes(item[(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.uniqueKey) || 'uuid']);
30043
30146
  });
30044
30147
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
30045
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.key)], isStrict]);
30148
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.key)], value, isStrict]);
30046
30149
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
30047
30150
  gutter: 8,
30048
30151
  wrap: true,
30049
- id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.key) || "".concat(Date.now())
30050
- }, /*#__PURE__*/React.createElement(Col, {
30152
+ id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.key) || "".concat(Date.now())
30153
+ }, !(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.hideSelectSysOrderId) && /*#__PURE__*/React.createElement(Col, {
30051
30154
  className: "gutter-row",
30052
30155
  xs: {
30053
30156
  span: 11
@@ -30062,12 +30165,12 @@ var PublicReissue = function PublicReissue(props) {
30062
30165
  },
30063
30166
  disabled: disabled,
30064
30167
  allowClear: false,
30065
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.systemOrderNo)],
30168
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.systemOrderNo)],
30066
30169
  onChange: function onChange(val) {
30067
30170
  return changeSystemOrderHandle(val);
30068
30171
  },
30069
- placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.compType) || '', "\u7CFB\u7EDF\u5355")
30070
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
30172
+ placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.compType) || '', "\u7CFB\u7EDF\u5355")
30173
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s8 = value[(_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.systemOrder]) === null || _value$typeMap$type$s8 === void 0 ? void 0 : _value$typeMap$type$s8.showOrderInfo) || []).map(function (item) {
30071
30174
  return /*#__PURE__*/React.createElement(Select.Option, {
30072
30175
  key: item[typeMap$2[type].oIdKey],
30073
30176
  value: item[typeMap$2[type].oIdKey],
@@ -30089,11 +30192,11 @@ var PublicReissue = function PublicReissue(props) {
30089
30192
  disabled: isSettingConfig ? !isSettingConfig : disabled,
30090
30193
  allowClear: false,
30091
30194
  options: reasonList,
30092
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type49 = typeMap$2[type]) === null || _typeMap$type49 === void 0 ? void 0 : _typeMap$type49.typeName)],
30195
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.typeName)],
30093
30196
  onChange: function onChange(val) {
30094
30197
  return changeTypeHandle(val);
30095
30198
  }
30096
- })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type50 = typeMap$2[type]) === null || _typeMap$type50 === void 0 ? void 0 : _typeMap$type50.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React.createElement(Col, {
30199
+ })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React.createElement(Col, {
30097
30200
  className: "gutter-row",
30098
30201
  xs: {
30099
30202
  span: 11
@@ -30102,7 +30205,7 @@ var PublicReissue = function PublicReissue(props) {
30102
30205
  span: 6
30103
30206
  }
30104
30207
  }, /*#__PURE__*/React.createElement(Input, {
30105
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type51 = typeMap$2[type]) === null || _typeMap$type51 === void 0 ? void 0 : _typeMap$type51.systemOrderBillType)],
30208
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.systemOrderBillType)],
30106
30209
  disabled: disabled,
30107
30210
  readOnly: true
30108
30211
  }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
@@ -30113,25 +30216,25 @@ var PublicReissue = function PublicReissue(props) {
30113
30216
  canUpdateNumber: showChangeBtn,
30114
30217
  hasSelectedSystemOrder: showChangeBtn,
30115
30218
  // showChangeBtn={showChangeBtn || typeMap?.[type]?.isShowSelectTradeGoods}
30116
- alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type52 = typeMap$2[type]) === null || _typeMap$type52 === void 0 ? void 0 : _typeMap$type52.alwaysShowChooseErpGoodsBtn,
30117
- showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type53 = typeMap$2[type]) === null || _typeMap$type53 === void 0 ? void 0 : _typeMap$type53.showErpGoodsBtn,
30219
+ alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.alwaysShowChooseErpGoodsBtn,
30220
+ showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.showErpGoodsBtn,
30118
30221
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
30119
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type54 = typeMap$2[type]) === null || _typeMap$type54 === void 0 ? void 0 : _typeMap$type54.key)],
30222
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type56 = typeMap$2[type]) === null || _typeMap$type56 === void 0 ? void 0 : _typeMap$type56.key)],
30120
30223
  onChange: function onChange(val) {
30121
30224
  return changeGoodHandle(val);
30122
30225
  },
30123
30226
  onModeChange: handleModeChange,
30124
30227
  showModeBtn: showModeBtn,
30125
30228
  isStrict: isStrict,
30126
- isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type55 = typeMap$2[type]) === null || _typeMap$type55 === void 0 ? void 0 : _typeMap$type55.isShowSelectTradeGoods,
30127
- systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type56 = typeMap$2[type]) === null || _typeMap$type56 === void 0 ? void 0 : _typeMap$type56.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
30128
- selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type57 = typeMap$2[type]) === null || _typeMap$type57 === void 0 ? void 0 : _typeMap$type57.systemOrderNo)]] : [],
30229
+ isShowSelectTradeGoods: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type57 = typeMap$2[type]) === null || _typeMap$type57 === void 0 ? void 0 : _typeMap$type57.isShowSelectTradeGoods,
30230
+ systemOrders: value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type58 = typeMap$2[type]) === null || _typeMap$type58 === void 0 ? void 0 : _typeMap$type58.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.orders,
30231
+ selectedSystemOrders: showChangeBtn ? [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type59 = typeMap$2[type]) === null || _typeMap$type59 === void 0 ? void 0 : _typeMap$type59.systemOrderNo)]] : [],
30129
30232
  tradeGoods: {
30130
30233
  originDataSource: getGoodDetails({
30131
30234
  mode: isStrict,
30132
- isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type58 = typeMap$2[type]) === null || _typeMap$type58 === void 0 ? void 0 : _typeMap$type58.isShowSelectTradeGoods
30235
+ isAllOrders: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type60 = typeMap$2[type]) === null || _typeMap$type60 === void 0 ? void 0 : _typeMap$type60.isShowSelectTradeGoods
30133
30236
  }),
30134
- uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type59 = typeMap$2[type]) === null || _typeMap$type59 === void 0 ? void 0 : _typeMap$type59.uniqueKey) || 'uuid',
30237
+ uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type61 = typeMap$2[type]) === null || _typeMap$type61 === void 0 ? void 0 : _typeMap$type61.uniqueKey) || 'uuid',
30135
30238
  selectedGoodsChange: selectedGoodsChange
30136
30239
  }
30137
30240
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.7.7-beta.10",
3
+ "version": "2.7.7-beta.12",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "2.7.7-beta.9",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.7.7-beta.12",
24
24
  "ahooks": "^3.7.4",
25
25
  "ali-react-table": "2.6.1",
26
26
  "bignumber.js": "^9.1.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "5e7df843f7c481d3b61e55cc660ad41e7e956608"
69
+ "gitHead": "8d0c1e9dd97c19700b86a22e901524cf6393e9df"
70
70
  }