@kmkf-fe-packages/basic-components 1.22.1-beta.45 → 1.22.1-beta.48

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, CloseCircleOutlined, CaretUpOutlined } 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, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh, filterGyOrders } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, 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';
@@ -11018,7 +11018,7 @@ var jstGoods = function jstGoods(props) {
11018
11018
  changeIndex = _useState2[0],
11019
11019
  setChangeIndex = _useState2[1]; //选中的包裹
11020
11020
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
11021
- var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
11021
+ var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
11022
11022
  useEffect(function () {
11023
11023
  //没有值塞个默认值
11024
11024
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -12493,9 +12493,339 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12493
12493
  };
12494
12494
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12495
12495
 
12496
+ var getTableData$2 = function getTableData(_ref, formData) {
12497
+ var current = _ref.current,
12498
+ pageSize = _ref.pageSize;
12499
+ var data = {
12500
+ skuName: formData.skuName || null,
12501
+ sku: formData.sku || null,
12502
+ goodsName: formData.goodsName || null,
12503
+ goodNo: formData.goodNo || null
12504
+ };
12505
+ return extendRequest('/qy/gdfw/product/product/page', {
12506
+ method: 'post',
12507
+ data: _objectSpread2({
12508
+ pageSize: pageSize,
12509
+ pageNo: current,
12510
+ platform: 'GY_ERP'
12511
+ }, data)
12512
+ }).then(function (res) {
12513
+ var _res$data = res.data,
12514
+ _res$data$productSkuL = _res$data.productSkuList,
12515
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12516
+ _res$data$total = _res$data.total,
12517
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12518
+ var newProducts = productSkuList.map(function (item, index) {
12519
+ return _objectSpread2(_objectSpread2({}, item), {}, {
12520
+ salesPrice: item === null || item === void 0 ? void 0 : item.retailPrice,
12521
+ specNo: item.goodId
12522
+ });
12523
+ });
12524
+ return {
12525
+ total: total,
12526
+ list: newProducts
12527
+ };
12528
+ });
12529
+ };
12530
+ var columns$3 = [{
12531
+ dataIndex: 'index',
12532
+ title: 'NO',
12533
+ render: function render(val, record, index) {
12534
+ return /*#__PURE__*/React.createElement("div", {
12535
+ style: {
12536
+ width: 25
12537
+ }
12538
+ }, index + 1);
12539
+ },
12540
+ width: 80
12541
+ }, {
12542
+ dataIndex: 'specName',
12543
+ title: 'SKU名称',
12544
+ width: 250,
12545
+ ellipsis: true
12546
+ }, {
12547
+ dataIndex: 'specCode',
12548
+ title: 'SKU编码',
12549
+ width: 200,
12550
+ ellipsis: true
12551
+ }, {
12552
+ dataIndex: 'goodName',
12553
+ title: '商品名称',
12554
+ width: 250,
12555
+ ellipsis: true
12556
+ }, {
12557
+ dataIndex: 'goodShortName',
12558
+ title: "\u5546\u54C1\u7B80\u79F0",
12559
+ ellipsis: true,
12560
+ width: 250
12561
+ }, {
12562
+ dataIndex: 'goodNo',
12563
+ title: '商品编码',
12564
+ width: 200,
12565
+ ellipsis: true
12566
+ }, {
12567
+ dataIndex: 'goodPicUrl',
12568
+ title: '商品图片',
12569
+ width: 100,
12570
+ render: function render(picUrl) {
12571
+ return /*#__PURE__*/React.createElement("img", {
12572
+ style: {
12573
+ width: '40px',
12574
+ height: '40px',
12575
+ objectFit: 'contain'
12576
+ },
12577
+ src: picUrl
12578
+ });
12579
+ }
12580
+ }, {
12581
+ dataIndex: 'brandName',
12582
+ title: '品牌名称',
12583
+ width: 200,
12584
+ ellipsis: true
12585
+ }, {
12586
+ dataIndex: 'retailPrice',
12587
+ title: "\u6807\u51C6\u552E\u4EF7",
12588
+ ellipsis: true,
12589
+ width: 100
12590
+ }, {
12591
+ dataIndex: 'costPrice',
12592
+ title: "\u6210\u672C\u4EF7",
12593
+ ellipsis: true,
12594
+ width: 100
12595
+ }];
12596
+ var GoodList$2 = function GoodList(props, ref) {
12597
+ var _useState = useState([]),
12598
+ _useState2 = _slicedToArray(_useState, 2),
12599
+ selectList = _useState2[0],
12600
+ setSelect = _useState2[1];
12601
+ var _useState3 = useState([]),
12602
+ _useState4 = _slicedToArray(_useState3, 2),
12603
+ selectIds = _useState4[0],
12604
+ setSelectIds = _useState4[1];
12605
+ useImperativeHandle(ref, function () {
12606
+ return {
12607
+ getSelectGoodList: function getSelectGoodList() {
12608
+ return selectList;
12609
+ }
12610
+ };
12611
+ });
12612
+ var _Form$useForm = Form.useForm(),
12613
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
12614
+ form = _Form$useForm2[0];
12615
+ var _useAntdTable = useAntdTable(getTableData$2, {
12616
+ defaultPageSize: 10,
12617
+ form: form
12618
+ }),
12619
+ tableProps = _useAntdTable.tableProps,
12620
+ search = _useAntdTable.search,
12621
+ params = _useAntdTable.params;
12622
+ var submit = search.submit,
12623
+ reset = search.reset;
12624
+ var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
12625
+ layout: "inline",
12626
+ form: form
12627
+ }, /*#__PURE__*/React.createElement(Form.Item, {
12628
+ name: "skuName",
12629
+ style: {
12630
+ marginBottom: '12px'
12631
+ }
12632
+ }, /*#__PURE__*/React.createElement(Input, {
12633
+ placeholder: "\u5546\u54C1sku\u540D\u79F0",
12634
+ allowClear: true,
12635
+ style: {
12636
+ width: 150
12637
+ }
12638
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12639
+ name: "skuCode",
12640
+ style: {
12641
+ marginBottom: '12px'
12642
+ }
12643
+ }, /*#__PURE__*/React.createElement(Input, {
12644
+ placeholder: "\u5546\u54C1sku\u7F16\u7801",
12645
+ allowClear: true,
12646
+ style: {
12647
+ width: 150
12648
+ }
12649
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12650
+ name: "goodName",
12651
+ style: {
12652
+ marginBottom: '12px'
12653
+ }
12654
+ }, /*#__PURE__*/React.createElement(Input, {
12655
+ placeholder: "\u5546\u54C1\u540D\u79F0",
12656
+ allowClear: true,
12657
+ style: {
12658
+ width: 150
12659
+ }
12660
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12661
+ name: "goodNo",
12662
+ style: {
12663
+ marginBottom: '12px'
12664
+ }
12665
+ }, /*#__PURE__*/React.createElement(Input, {
12666
+ placeholder: "\u5546\u54C1\u7F16\u7801",
12667
+ allowClear: true,
12668
+ style: {
12669
+ width: 150
12670
+ }
12671
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12672
+ style: {
12673
+ marginBottom: '12px'
12674
+ }
12675
+ }, /*#__PURE__*/React.createElement(Button, {
12676
+ type: "primary",
12677
+ style: {
12678
+ marginRight: '8px'
12679
+ },
12680
+ onClick: submit
12681
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12682
+ onClick: reset
12683
+ }, "\u91CD\u7F6E")));
12684
+ var rowSelection = {
12685
+ selectedRowKeys: selectIds,
12686
+ fixed: true,
12687
+ onSelect: function onSelect(record, selected) {
12688
+ if (selected) {
12689
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
12690
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
12691
+ } else {
12692
+ setSelectIds(selectIds.filter(function (t) {
12693
+ return t !== record.specNo;
12694
+ }));
12695
+ setSelect(selectList.filter(function (t) {
12696
+ return t.specNo !== record.specNo;
12697
+ }));
12698
+ }
12699
+ },
12700
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
12701
+ if (selected) {
12702
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
12703
+ return t.specNo;
12704
+ }))));
12705
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
12706
+ } else {
12707
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
12708
+ return t.specNo;
12709
+ })));
12710
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
12711
+ return arrVal.specNo !== othVal.specNo;
12712
+ });
12713
+ setSelect(list);
12714
+ }
12715
+ }
12716
+ };
12717
+ var showTable = function showTable() {
12718
+ var handleDelete = function handleDelete(record) {
12719
+ setSelectIds(selectIds.filter(function (t) {
12720
+ return t !== record.specNo;
12721
+ }));
12722
+ setSelect(selectList.filter(function (t) {
12723
+ return t.specNo !== record.specNo;
12724
+ }));
12725
+ };
12726
+ var showColumns = [{
12727
+ dataIndex: '',
12728
+ title: "\u64CD\u4F5C",
12729
+ ellipsis: true,
12730
+ width: 100,
12731
+ render: function render(val, record) {
12732
+ return /*#__PURE__*/React.createElement(Button, {
12733
+ type: "link",
12734
+ onClick: function onClick() {
12735
+ return handleDelete(record);
12736
+ }
12737
+ }, "\u5220\u9664");
12738
+ }
12739
+ }].concat(takeRight(columns$3, columns$3.length - 1));
12740
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
12741
+ style: {
12742
+ width: '100%',
12743
+ maxWidth: '387px'
12744
+ }
12745
+ }, /*#__PURE__*/React.createElement(Table, {
12746
+ columns: showColumns,
12747
+ rowKey: 'specNo',
12748
+ dataSource: selectList,
12749
+ scroll: {
12750
+ x: '100%',
12751
+ y: 250
12752
+ },
12753
+ pagination: {
12754
+ size: 'small',
12755
+ total: selectIds.length,
12756
+ pageSize: 10,
12757
+ showSizeChanger: false
12758
+ }
12759
+ })) : null;
12760
+ };
12761
+ return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
12762
+ style: {
12763
+ marginTop: '4px'
12764
+ }
12765
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12766
+ rowSelection: rowSelection,
12767
+ rowKey: "specNo",
12768
+ columns: columns$3,
12769
+ scroll: {
12770
+ x: '100%',
12771
+ y: 250
12772
+ }
12773
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
12774
+ getPopupContainer: function getPopupContainer(triggerNode) {
12775
+ return triggerNode.parentElement;
12776
+ },
12777
+ content: showTable(),
12778
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
12779
+ }, /*#__PURE__*/React.createElement(Button, {
12780
+ danger: true,
12781
+ type: "text"
12782
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
12783
+ };
12784
+ var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
12785
+
12786
+ var GyGoodsModal = function GyGoodsModal(props, ref) {
12787
+ useImperativeHandle(ref, function () {
12788
+ return {
12789
+ open: function open() {
12790
+ setVisible(true);
12791
+ }
12792
+ };
12793
+ });
12794
+ var onSubmit = props.onSubmit,
12795
+ width = props.width;
12796
+ var _useState = useState(false),
12797
+ _useState2 = _slicedToArray(_useState, 2),
12798
+ visible = _useState2[0],
12799
+ setVisible = _useState2[1];
12800
+ var gyGoodsListRef = useRef(null);
12801
+ var _onCancel = function onCancel() {
12802
+ setVisible(false);
12803
+ };
12804
+ var onOk = function onOk() {
12805
+ var _gyGoodsListRef$curre;
12806
+ var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
12807
+ onSubmit(selectedList);
12808
+ _onCancel();
12809
+ };
12810
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
12811
+ title: '选择商品',
12812
+ okText: '确认',
12813
+ cancelText: '取消',
12814
+ visible: visible,
12815
+ width: width || 850,
12816
+ onCancel: function onCancel() {
12817
+ _onCancel();
12818
+ },
12819
+ onOk: onOk,
12820
+ wrapClassName: "goodModal"
12821
+ }, /*#__PURE__*/React.createElement(GyGoodsList, {
12822
+ ref: gyGoodsListRef
12823
+ })));
12824
+ };
12825
+ var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
12826
+
12496
12827
  var getColumns = function getColumns(_ref) {
12497
12828
  var _ref$text = _ref.text,
12498
- text = _ref$text === void 0 ? '' : _ref$text,
12499
12829
  disabled = _ref.disabled,
12500
12830
  updateHandle = _ref.updateHandle;
12501
12831
  return {
@@ -12519,7 +12849,13 @@ var getColumns = function getColumns(_ref) {
12519
12849
  }, {
12520
12850
  dataIndex: 'picPath',
12521
12851
  title: "\u5546\u54C1\u56FE\u7247",
12522
- width: 150
12852
+ width: 150,
12853
+ render: function render(val) {
12854
+ return /*#__PURE__*/React.createElement(Image, {
12855
+ width: 60,
12856
+ src: val
12857
+ });
12858
+ }
12523
12859
  }, {
12524
12860
  dataIndex: 'goodsSn',
12525
12861
  title: "\u8D27\u53F7",
@@ -12749,7 +13085,17 @@ var getColumns = function getColumns(_ref) {
12749
13085
  render: function render(val) {
12750
13086
  return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
12751
13087
  }
12752
- }],
13088
+ }]
13089
+ };
13090
+ };
13091
+
13092
+ var getColumns$1 = function getColumns(_ref) {
13093
+ var _ref$text = _ref.text,
13094
+ text = _ref$text === void 0 ? '' : _ref$text,
13095
+ disabled = _ref.disabled,
13096
+ updateHandle = _ref.updateHandle;
13097
+ return {
13098
+ //bs商品信息
12753
13099
  BS_GOODS: [{
12754
13100
  dataIndex: 'mark',
12755
13101
  title: "\u5546\u54C1\u6807\u8BB0",
@@ -12916,7 +13262,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12916
13262
  });
12917
13263
  };
12918
13264
 
12919
- var getColumns$1 = function getColumns(_ref) {
13265
+ var getColumns$2 = function getColumns(_ref) {
12920
13266
  var _ref$text = _ref.text,
12921
13267
  text = _ref$text === void 0 ? '' : _ref$text,
12922
13268
  disabled = _ref.disabled,
@@ -13303,7 +13649,7 @@ var getColumns$1 = function getColumns(_ref) {
13303
13649
  };
13304
13650
  };
13305
13651
 
13306
- var getColumns$2 = function getColumns(_ref) {
13652
+ var getColumns$3 = function getColumns(_ref) {
13307
13653
  var _ref$text = _ref.text,
13308
13654
  text = _ref$text === void 0 ? '' : _ref$text,
13309
13655
  disabled = _ref.disabled,
@@ -13387,25 +13733,228 @@ var getColumns$2 = function getColumns(_ref) {
13387
13733
  };
13388
13734
  };
13389
13735
 
13390
- var getColumnsMap = function getColumnsMap(args) {
13391
- var _ref = args || {},
13392
- _ref$text = _ref.text,
13736
+ var getColumns$4 = function getColumns(_ref) {
13737
+ var _ref$text = _ref.text,
13738
+ disabled = _ref.disabled,
13739
+ updateHandle = _ref.updateHandle;
13740
+ return {
13741
+ //管易商品信息
13742
+ GY_GOODS: [{
13743
+ dataIndex: 'goodName',
13744
+ title: "\u5546\u54C1\u540D\u79F0",
13745
+ width: 150
13746
+ }, {
13747
+ dataIndex: 'goodShortName',
13748
+ title: "\u5546\u54C1\u7B80\u79F0",
13749
+ width: 150
13750
+ }, {
13751
+ dataIndex: 'goodNo',
13752
+ title: "\u5546\u54C1\u7F16\u7801",
13753
+ width: 200
13754
+ }, {
13755
+ dataIndex: 'specName',
13756
+ title: "SKU\u540D\u79F0",
13757
+ align: 'center',
13758
+ ellipsis: true,
13759
+ width: 250
13760
+ }, {
13761
+ dataIndex: 'specCode',
13762
+ title: "SKU\u7F16\u7801",
13763
+ align: 'center',
13764
+ ellipsis: true,
13765
+ width: 150
13766
+ }, {
13767
+ dataIndex: 'qty',
13768
+ title: "\u6570\u91CF",
13769
+ width: 100,
13770
+ render: function render(val, record, index) {
13771
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13772
+ style: {
13773
+ width: 70
13774
+ },
13775
+ value: val,
13776
+ min: 1,
13777
+ precision: 0,
13778
+ onChange: function onChange(num) {
13779
+ return updateHandle(num, index, 'qty');
13780
+ }
13781
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13782
+ }
13783
+ }, {
13784
+ dataIndex: 'price',
13785
+ title: "\u5B9E\u9645\u5355\u4EF7",
13786
+ width: 150,
13787
+ render: function render(val, record, index) {
13788
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13789
+ style: {
13790
+ width: 130
13791
+ },
13792
+ value: val,
13793
+ min: 0,
13794
+ precision: 2,
13795
+ onChange: function onChange(num) {
13796
+ return updateHandle(num, index, 'price');
13797
+ }
13798
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13799
+ }
13800
+ }, {
13801
+ dataIndex: 'amount',
13802
+ title: "\u5B9E\u9645\u91D1\u989D",
13803
+ width: 150,
13804
+ render: function render(_, record) {
13805
+ return /*#__PURE__*/React.createElement("span", null, typeof record.qty === 'number' && typeof record.price === 'number' ? record.qty * record.price : '');
13806
+ }
13807
+ }, {
13808
+ dataIndex: 'originPrice',
13809
+ title: "\u6807\u51C6\u5355\u4EF7",
13810
+ width: 150
13811
+ }, {
13812
+ dataIndex: 'originAmount',
13813
+ title: "\u6807\u51C6\u91D1\u989D",
13814
+ width: 150
13815
+ }, {
13816
+ dataIndex: 'discountFee',
13817
+ title: "\u8BA9\u5229\u91D1\u989D",
13818
+ width: 150
13819
+ }, {
13820
+ dataIndex: 'amountAfter',
13821
+ title: "\u8BA9\u5229\u540E\u91D1\u989D",
13822
+ width: 150
13823
+ }, {
13824
+ dataIndex: 'cancel',
13825
+ title: "\u662F\u5426\u53D6\u6D88",
13826
+ width: 150,
13827
+ render: function render(val) {
13828
+ return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
13829
+ }
13830
+ }, {
13831
+ dataIndex: 'isGift',
13832
+ title: "\u662F\u5426\u8D60\u54C1",
13833
+ width: 150,
13834
+ render: function render(val, record, index) {
13835
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
13836
+ value: val,
13837
+ onChange: function onChange(value) {
13838
+ updateHandle(value, index, 'isGift');
13839
+ },
13840
+ options: [{
13841
+ label: '是',
13842
+ value: 1
13843
+ }, {
13844
+ label: '否',
13845
+ value: 0
13846
+ }]
13847
+ }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
13848
+ }
13849
+ }, {
13850
+ dataIndex: 'skuNote',
13851
+ title: "\u5546\u54C1\u5907\u6CE8",
13852
+ width: 150
13853
+ }],
13854
+ //管易补发商品信息
13855
+ GY_REISSUE_GOODS: [{
13856
+ dataIndex: 'goodName',
13857
+ title: "\u5546\u54C1\u540D\u79F0",
13858
+ width: 150
13859
+ }, {
13860
+ dataIndex: 'goodShortName',
13861
+ title: "\u5546\u54C1\u7B80\u79F0",
13862
+ width: 150
13863
+ }, {
13864
+ dataIndex: 'goodNo',
13865
+ title: "\u5546\u54C1\u7F16\u7801",
13866
+ width: 200
13867
+ }, {
13868
+ dataIndex: 'specName',
13869
+ title: "SKU\u540D\u79F0",
13870
+ align: 'center',
13871
+ ellipsis: true,
13872
+ width: 250
13873
+ }, {
13874
+ dataIndex: 'specCode',
13875
+ title: "SKU\u7F16\u7801",
13876
+ align: 'center',
13877
+ ellipsis: true,
13878
+ width: 150
13879
+ }, {
13880
+ dataIndex: 'qty',
13881
+ title: "\u6570\u91CF",
13882
+ width: 100,
13883
+ render: function render(val, record, index) {
13884
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13885
+ style: {
13886
+ width: 70
13887
+ },
13888
+ value: val,
13889
+ min: 1,
13890
+ precision: 0,
13891
+ onChange: function onChange(num) {
13892
+ return updateHandle(num, index, 'qty');
13893
+ }
13894
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13895
+ }
13896
+ }, {
13897
+ dataIndex: 'price',
13898
+ title: "\u5B9E\u9645\u5355\u4EF7",
13899
+ width: 150,
13900
+ render: function render(val, record, index) {
13901
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13902
+ style: {
13903
+ width: 130
13904
+ },
13905
+ value: val,
13906
+ min: 0,
13907
+ precision: 2,
13908
+ onChange: function onChange(num) {
13909
+ return updateHandle(num, index, 'price');
13910
+ }
13911
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13912
+ }
13913
+ }, {
13914
+ dataIndex: 'amount',
13915
+ title: "\u5B9E\u9645\u91D1\u989D",
13916
+ width: 150,
13917
+ render: function render(_, record) {
13918
+ return /*#__PURE__*/React.createElement("span", null, typeof record.qty === 'number' && typeof record.price === 'number' ? record.qty * record.price : '');
13919
+ }
13920
+ }, {
13921
+ dataIndex: 'originPrice',
13922
+ title: "\u6807\u51C6\u5355\u4EF7",
13923
+ width: 150
13924
+ }, {
13925
+ dataIndex: 'originAmount',
13926
+ title: "\u6807\u51C6\u91D1\u989D",
13927
+ width: 150
13928
+ }, {
13929
+ dataIndex: 'isGift',
13930
+ title: "\u662F\u5426\u8D60\u54C1",
13931
+ width: 150,
13932
+ render: function render(val, record, index) {
13933
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
13934
+ value: val,
13935
+ onChange: function onChange(value) {
13936
+ updateHandle(value, index, 'isGift');
13937
+ },
13938
+ options: [{
13939
+ label: '是',
13940
+ value: 1
13941
+ }, {
13942
+ label: '否',
13943
+ value: 0
13944
+ }]
13945
+ }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
13946
+ }
13947
+ }]
13948
+ };
13949
+ };
13950
+
13951
+ var getColumns$5 = function getColumns(_ref) {
13952
+ var _ref$text = _ref.text,
13393
13953
  text = _ref$text === void 0 ? '' : _ref$text,
13394
13954
  disabled = _ref.disabled,
13395
13955
  updateHandle = _ref.updateHandle;
13396
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns({
13397
- text: text,
13398
- disabled: disabled,
13399
- updateHandle: updateHandle
13400
- })), getColumns$1({
13401
- text: text,
13402
- disabled: disabled,
13403
- updateHandle: updateHandle
13404
- })), getColumns$2({
13405
- text: text,
13406
- disabled: disabled,
13407
- updateHandle: updateHandle
13408
- })), {}, {
13956
+ return {
13957
+ //bs商品信息
13409
13958
  default: [{
13410
13959
  dataIndex: 'mark',
13411
13960
  title: "\u5546\u54C1\u6807\u8BB0",
@@ -13502,6 +14051,41 @@ var getColumnsMap = function getColumnsMap(args) {
13502
14051
  ellipsis: true,
13503
14052
  width: 100
13504
14053
  }]
14054
+ };
14055
+ };
14056
+
14057
+ var getColumnsMap = function getColumnsMap(args) {
14058
+ var _ref = args || {},
14059
+ _ref$text = _ref.text,
14060
+ text = _ref$text === void 0 ? '' : _ref$text,
14061
+ disabled = _ref.disabled,
14062
+ updateHandle = _ref.updateHandle;
14063
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
14064
+ text: text,
14065
+ disabled: disabled,
14066
+ updateHandle: updateHandle
14067
+ })), getColumns({
14068
+ text: text,
14069
+ disabled: disabled,
14070
+ updateHandle: updateHandle
14071
+ })), getColumns$2({
14072
+ text: text,
14073
+ disabled: disabled,
14074
+ updateHandle: updateHandle
14075
+ })), getColumns$3({
14076
+ text: text,
14077
+ disabled: disabled,
14078
+ updateHandle: updateHandle
14079
+ })), getColumns$4({
14080
+ text: text,
14081
+ disabled: disabled,
14082
+ updateHandle: updateHandle
14083
+ })), {}, {
14084
+ default: getColumns$5({
14085
+ text: text,
14086
+ disabled: disabled,
14087
+ updateHandle: updateHandle
14088
+ })['default']
13505
14089
  });
13506
14090
  };
13507
14091
  var getColumnsBaseInfo = function getColumnsBaseInfo() {
@@ -13601,6 +14185,61 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
13601
14185
  });
13602
14186
  };
13603
14187
 
14188
+ var renderGiftType$1 = function renderGiftType(val) {
14189
+ var giftTypeMap = {
14190
+ 0: '非赠品',
14191
+ 1: '自动赠送',
14192
+ 2: '手工赠送',
14193
+ 3: '回购自动送赠品',
14194
+ 4: '前N有礼送赠品',
14195
+ 6: '天猫优仓赠品',
14196
+ 7: '淘宝CRM会员送赠'
14197
+ };
14198
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
14199
+ };
14200
+ var renderFieldMap$2 = {
14201
+ num: function num(_ref) {
14202
+ var disabled = _ref.disabled,
14203
+ updateHandle = _ref.updateHandle;
14204
+ return function (val, record, index) {
14205
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
14206
+ style: {
14207
+ width: 70
14208
+ },
14209
+ value: val,
14210
+ min: 1,
14211
+ precision: 0,
14212
+ onChange: function onChange(num) {
14213
+ return updateHandle(num, index, 'num');
14214
+ }
14215
+ }) : /*#__PURE__*/React.createElement("span", null, val);
14216
+ };
14217
+ },
14218
+ giftType: function giftType() {
14219
+ return renderGiftType$1;
14220
+ }
14221
+ };
14222
+ var getGyReissueGoodColumns = function getGyReissueGoodColumns(_ref2) {
14223
+ var disabled = _ref2.disabled,
14224
+ updateHandle = _ref2.updateHandle,
14225
+ operate = _ref2.operate;
14226
+ return getColumnsMap()['GY_REISSUE_GOODS'].map(function (item) {
14227
+ var newItem = _objectSpread2({
14228
+ align: 'center',
14229
+ ellipsis: true
14230
+ }, item);
14231
+ if (operate && (renderFieldMap$2 === null || renderFieldMap$2 === void 0 ? void 0 : renderFieldMap$2[item.dataIndex])) {
14232
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
14233
+ render: renderFieldMap$2 === null || renderFieldMap$2 === void 0 ? void 0 : renderFieldMap$2[item.dataIndex]({
14234
+ disabled: disabled,
14235
+ updateHandle: updateHandle
14236
+ })
14237
+ });
14238
+ }
14239
+ return newItem;
14240
+ });
14241
+ };
14242
+
13604
14243
  var MAIN_FIELD = 'uuid';
13605
14244
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
13606
14245
  var columns = _ref.columns,
@@ -13659,6 +14298,9 @@ var getButtonText = function getButtonText() {
13659
14298
  if (['WDT_REISSUE_GOODS'].includes(type)) {
13660
14299
  return '选择旺店通商品';
13661
14300
  }
14301
+ if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
14302
+ return '选择管易ERP商品';
14303
+ }
13662
14304
  return '选择商品';
13663
14305
  };
13664
14306
  var GoodItem$1 = function GoodItem(props) {
@@ -13762,6 +14404,7 @@ var GoodItem$1 = function GoodItem(props) {
13762
14404
  case 'BS_E3_GOODS':
13763
14405
  case 'BS_GOODS':
13764
14406
  case 'WLN_GOODS':
14407
+ case 'GY_GOODS':
13765
14408
  {
13766
14409
  columns = getColumnsMap({
13767
14410
  text: text,
@@ -13779,6 +14422,15 @@ var GoodItem$1 = function GoodItem(props) {
13779
14422
  });
13780
14423
  }
13781
14424
  break;
14425
+ case 'GY_REISSUE_GOODS':
14426
+ {
14427
+ columns = getGyReissueGoodColumns({
14428
+ disabled: disabled,
14429
+ updateHandle: updateHandle,
14430
+ operate: operate
14431
+ });
14432
+ }
14433
+ break;
13782
14434
  case 'BS_E3_REISSUE_GOODS':
13783
14435
  {
13784
14436
  columns = getBsE3ReissueGoodColumns({
@@ -13915,6 +14567,27 @@ var GoodItem$1 = function GoodItem(props) {
13915
14567
  canUpdateNumber: canUpdateNumber
13916
14568
  });
13917
14569
  });
14570
+ } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
14571
+ newList = list.map(function (item) {
14572
+ var goodName = item.goodName,
14573
+ goodShortName = item.goodShortName,
14574
+ goodNo = item.goodNo,
14575
+ specName = item.specName,
14576
+ specCode = item.specCode,
14577
+ originPrice = item.originPrice;
14578
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14579
+ uuid: uuid(),
14580
+ canDelete: true,
14581
+ canEdit: true,
14582
+ qty: 1,
14583
+ goodName: goodName,
14584
+ goodShortName: goodShortName,
14585
+ goodNo: goodNo,
14586
+ specName: specName,
14587
+ specCode: specCode,
14588
+ originPrice: originPrice
14589
+ });
14590
+ });
13918
14591
  } else {
13919
14592
  newList = list.map(function (item) {
13920
14593
  var goodsId = item.goodsId,
@@ -14010,6 +14683,14 @@ var GoodItem$1 = function GoodItem(props) {
14010
14683
  shopId: shopId,
14011
14684
  maxLength: maxLength,
14012
14685
  companyKey: companyKey
14686
+ }) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
14687
+ ref: refModal,
14688
+ onSubmit: onSubmit,
14689
+ width: width,
14690
+ shopList: shopList,
14691
+ shopId: shopId,
14692
+ maxLength: maxLength,
14693
+ companyKey: companyKey
14013
14694
  }) : /*#__PURE__*/React.createElement(GoodsModal$2, {
14014
14695
  ref: refModal,
14015
14696
  onSubmit: onSubmit,
@@ -14876,14 +15557,16 @@ var columnsMap = {
14876
15557
  dataIndex: 'orderMsg',
14877
15558
  width: 150,
14878
15559
  ellipsis: true
14879
- }]
15560
+ }],
15561
+ GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
14880
15562
  };
14881
15563
  var rowKeyMap = {
14882
15564
  BS_SYSTEM_ORDER: 'billNo',
14883
15565
  KM_SYSTEM_ORDER: 'billNo',
14884
15566
  WLN_SYSTEM_ORDER: 'billNo',
14885
15567
  WDT_SYSTEM_ORDER: 'billNo',
14886
- BS_E3_SYSTEM_ORDER: 'orderSn'
15568
+ BS_E3_SYSTEM_ORDER: 'orderSn',
15569
+ GY_SYSTEM_ORDER: 'billNo'
14887
15570
  };
14888
15571
  var index$1 = (function (props) {
14889
15572
  var value = props.value,
@@ -15146,13 +15829,14 @@ var WlnGoods = function WlnGoods(props) {
15146
15829
  };
15147
15830
 
15148
15831
  var componentMap$1 = {
15149
- 'WDT_GOODS': {
15832
+ WDT_GOODS: {
15150
15833
  type: 'wdt',
15151
15834
  key: 'wdtGoods',
15152
15835
  name: '旺店通',
15153
15836
  orderNo: 'srcTid',
15154
15837
  goodDetailOrderNo: 'srcTid',
15155
15838
  eventNameMap: {
15839
+ // pubsub 事件
15156
15840
  type: 'wdtType',
15157
15841
  updateGoodsHandle: updateWdtGoodsHandle,
15158
15842
  selectListReturn: 'wdtSelectListReturn',
@@ -15170,13 +15854,14 @@ var componentMap$1 = {
15170
15854
  exchangeDeleteGood: 'wdtExchangeDeleteGood'
15171
15855
  }
15172
15856
  },
15173
- 'BS_E3_GOODS': {
15857
+ BS_E3_GOODS: {
15174
15858
  type: 'e3',
15175
15859
  key: 'bsE3Goods',
15176
15860
  name: '百胜E3',
15177
15861
  orderNo: 'dealCode',
15178
15862
  goodDetailOrderNo: 'originalDealCode',
15179
15863
  eventNameMap: {
15864
+ // pubsub 事件
15180
15865
  type: 'bsE3Type',
15181
15866
  updateGoodsHandle: updateBsE3GoodsHandle,
15182
15867
  selectListReturn: 'bsE3SelectListReturn',
@@ -15193,6 +15878,31 @@ var componentMap$1 = {
15193
15878
  returnDeleteGood: 'bsE3ReturnDeleteGood',
15194
15879
  exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
15195
15880
  }
15881
+ },
15882
+ GY_GOODS: {
15883
+ type: 'gy',
15884
+ key: 'gyGoods',
15885
+ name: '管易',
15886
+ orderNo: 'dealCode',
15887
+ goodDetailOrderNo: 'originalDealCode',
15888
+ eventNameMap: {
15889
+ // pubsub 事件
15890
+ type: 'gyType',
15891
+ updateGoodsHandle: updateGyGoodsHandle,
15892
+ selectListReturn: 'gySelectListReturn',
15893
+ selectList: 'gySelectList',
15894
+ reissueSelectList: 'gyReissueSelectList',
15895
+ reissueSelectListReturn: 'gyReissueSelectListReturn',
15896
+ reissueDeleteGood: 'gyReissueDeleteGood',
15897
+ changeShopCode: 'gyChangeShopCode',
15898
+ reissueType: 'gyReissueType',
15899
+ returnType: 'gyReturnType',
15900
+ returnSelectListReturn: 'gyReturnSelectListReturn',
15901
+ returnSelectList: 'gyReturnSelectList',
15902
+ deleteGood: 'gyDeleteGood',
15903
+ returnDeleteGood: 'gyReturnDeleteGood',
15904
+ exchangeDeleteGood: 'gyExchangeDeleteGood'
15905
+ }
15196
15906
  }
15197
15907
  };
15198
15908
  var CommonGoods = function CommonGoods(props) {
@@ -16907,4 +17617,289 @@ var bsE3Reissue = function bsE3Reissue(props) {
16907
17617
  })));
16908
17618
  };
16909
17619
 
16910
- 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, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };
17620
+ var singletonMap$3 = new Map();
17621
+ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
17622
+ if (!singletonMap$3.has(orderNo)) {
17623
+ var p = new Promise(function (resolve, reject) {
17624
+ var doReject = function doReject(err) {
17625
+ // 清空掉错误的请求记录
17626
+ singletonMap$3.delete(orderNo);
17627
+ reject(err);
17628
+ };
17629
+ extendRequest('/qy/gdfw/oms/gyOrderDetail', {
17630
+ method: 'post',
17631
+ data: {
17632
+ tid: orderNo
17633
+ }
17634
+ }).then(function (data) {
17635
+ if (data === null || data === void 0 ? void 0 : data.success) {
17636
+ var _data$data, _data$data$trades;
17637
+ 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) {
17638
+ data.data.trades = filterGyOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
17639
+ return _objectSpread2(_objectSpread2({}, item), {}, {
17640
+ billNo: item.tradeNo,
17641
+ billTag: item.tagName
17642
+ });
17643
+ });
17644
+ }
17645
+ resolve(data.data);
17646
+ // 延迟10秒清除,保证订单的时效性
17647
+ setTimeout(function () {
17648
+ singletonMap$3.delete(orderNo);
17649
+ }, 1000 * 10);
17650
+ } else {
17651
+ doReject(data);
17652
+ }
17653
+ }).catch(doReject);
17654
+ });
17655
+ singletonMap$3.set(orderNo, p);
17656
+ }
17657
+ return singletonMap$3.get(orderNo);
17658
+ };
17659
+ var gyUtils = {
17660
+ getGyOrderListSingleton: getGyOrderListSingleton
17661
+ };
17662
+
17663
+ var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"];
17664
+ var typeMap$3 = {
17665
+ GY_REISSUE_GOODS: {
17666
+ key: 'gyReissueGoods',
17667
+ name: '管易',
17668
+ typeName: 'gyReissueType',
17669
+ systemOrder: 'gySystemOrder',
17670
+ systemOrderNo: 'gySystemOrderNo',
17671
+ reissueSelectList: 'gyReissueSelectList',
17672
+ reissueSelectListReturn: 'gyReissueSelectListReturn',
17673
+ reissueDeleteGood: 'gyReissueDeleteGood',
17674
+ changeShopCode: 'gyChangeShopCode',
17675
+ reissueType: 'gyReissueType',
17676
+ formatDefaultField: {
17677
+ money: 'orderPrice',
17678
+ share: 'sharePrice'
17679
+ },
17680
+ getOrderList: gyUtils.getGyOrderListSingleton
17681
+ }
17682
+ };
17683
+ var GyReissue = function GyReissue(props) {
17684
+ var _value$gySystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
17685
+ var value = props.value,
17686
+ onChange = props.onChange,
17687
+ _props$reasonList = props.reasonList,
17688
+ reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17689
+ disabled = props.disabled,
17690
+ type = props.type,
17691
+ other = _objectWithoutProperties(props, _excluded$l);
17692
+ var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$gySystemOrder = value.gySystemOrder) === null || _value$gySystemOrder === void 0 ? void 0 : _value$gySystemOrder.orders) || []).some(function (order) {
17693
+ var _order$srcTid;
17694
+ return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
17695
+ });
17696
+ var getOrderFlag = useRef(false);
17697
+ var _useState = useState(false),
17698
+ _useState2 = _slicedToArray(_useState, 2),
17699
+ isStrict = _useState2[0],
17700
+ setIsStrict = _useState2[1];
17701
+ useEffect(function () {
17702
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
17703
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$3[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
17704
+ var _value$typeMap$type$s4, _typeMap$type3;
17705
+ getOrderFlag.current = true;
17706
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
17707
+ }
17708
+ return;
17709
+ }, [value]);
17710
+ var getOrderList = /*#__PURE__*/function () {
17711
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
17712
+ var _typeMap$type4;
17713
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
17714
+ while (1) switch (_context.prev = _context.next) {
17715
+ case 0:
17716
+ (_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
17717
+ var _typeMap$type5, _typeMap$type6;
17718
+ var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
17719
+ var showOrderInfo = orders.map(function (_ref2) {
17720
+ var billNo = _ref2.billNo,
17721
+ billType = _ref2.billType,
17722
+ billTag = _ref2.billTag;
17723
+ return {
17724
+ billNo: billNo,
17725
+ billType: billType,
17726
+ billTag: billTag
17727
+ };
17728
+ });
17729
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
17730
+ showOrderInfo: showOrderInfo,
17731
+ orders: orders
17732
+ }))));
17733
+ });
17734
+ case 1:
17735
+ case "end":
17736
+ return _context.stop();
17737
+ }
17738
+ }, _callee);
17739
+ }));
17740
+ return function getOrderList(_x) {
17741
+ return _ref.apply(this, arguments);
17742
+ };
17743
+ }();
17744
+ var changeTypeHandle = function changeTypeHandle(val) {
17745
+ var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
17746
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
17747
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
17748
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
17749
+ var newValue = _objectSpread2({}, value);
17750
+ newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
17751
+ if (typeName === '1') {
17752
+ var _typeMap$type9;
17753
+ newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
17754
+ mode: isStrict
17755
+ });
17756
+ } else if (typeName === '2') {
17757
+ var _typeMap$type10;
17758
+ // 切换到非原单,清空列表
17759
+ newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
17760
+ }
17761
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17762
+ };
17763
+ var handleModeChange = function handleModeChange(mode) {
17764
+ var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
17765
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
17766
+ setIsStrict(mode);
17767
+ if (!isOriginalOrder) return;
17768
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
17769
+ mode: mode
17770
+ }))));
17771
+ };
17772
+ var getGoodDetails = function getGoodDetails(_ref3) {
17773
+ var _typeMap$type13, _typeMap$type14, _order$goodDetails;
17774
+ var mode = _ref3.mode,
17775
+ sysOrderNo = _ref3.sysOrderNo;
17776
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
17777
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
17778
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
17779
+ return order.tradeNo === systemOrderNo;
17780
+ });
17781
+ var goodDetails = (order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.length) ? updateGyGoodsHandle([order]) : [];
17782
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
17783
+ return mode ? goodDetails.filter(function (goodItem) {
17784
+ return !orderNo || goodItem.srcTid === orderNo;
17785
+ }) : goodDetails;
17786
+ };
17787
+ var changeGoodHandle = function changeGoodHandle(val) {
17788
+ var _typeMap$type15;
17789
+ var newValue = _objectSpread2({}, value);
17790
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
17791
+ var _typeMap$type16, _typeMap$type17;
17792
+ item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
17793
+ item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
17794
+ return item;
17795
+ });
17796
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17797
+ };
17798
+ var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
17799
+ var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
17800
+ var newValue = _objectSpread2({}, value);
17801
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
17802
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
17803
+ var _typeMap$type20;
17804
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
17805
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
17806
+ var _typeMap$type22;
17807
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
17808
+ mode: isStrict,
17809
+ sysOrderNo: val
17810
+ });
17811
+ }
17812
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17813
+ };
17814
+ var selectedGoodsChange = useCallback(function (skuList) {
17815
+ var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
17816
+ var newValue = _objectSpread2({}, value);
17817
+ // 原订单商品
17818
+ var originTradeGoodList = getGoodDetails({
17819
+ mode: isStrict
17820
+ }) || [];
17821
+ // 当前选中的所有商品【包含了原订单+商品库】
17822
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
17823
+ newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
17824
+ return skuList.includes(item.uuid);
17825
+ });
17826
+ console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
17827
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
17828
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
17829
+ //显示选择商品按钮 原单换不显示选择商品
17830
+ var showChangeBtn = useMemo(function () {
17831
+ var _typeMap$type27;
17832
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
17833
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
17834
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
17835
+ gutter: 8,
17836
+ wrap: true
17837
+ }, /*#__PURE__*/React.createElement(Col, {
17838
+ className: "gutter-row",
17839
+ xs: {
17840
+ span: 11
17841
+ },
17842
+ sm: {
17843
+ span: 6
17844
+ }
17845
+ }, /*#__PURE__*/React.createElement(Select, {
17846
+ style: {
17847
+ marginBottom: '8px'
17848
+ },
17849
+ disabled: disabled,
17850
+ allowClear: false,
17851
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
17852
+ onChange: function onChange(val) {
17853
+ return changeSystemOrderHandle(val);
17854
+ },
17855
+ placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
17856
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[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) {
17857
+ return /*#__PURE__*/React.createElement(Select.Option, {
17858
+ key: item.billNo,
17859
+ value: item.billNo,
17860
+ label: item.billNo
17861
+ }, item.billNo);
17862
+ }))), /*#__PURE__*/React.createElement(Col, {
17863
+ className: "gutter-row",
17864
+ xs: {
17865
+ span: 11
17866
+ },
17867
+ sm: {
17868
+ span: 6
17869
+ }
17870
+ }, /*#__PURE__*/React.createElement(Cascader, {
17871
+ style: {
17872
+ marginBottom: '8px'
17873
+ },
17874
+ disabled: disabled,
17875
+ allowClear: false,
17876
+ options: reasonList,
17877
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
17878
+ onChange: function onChange(val) {
17879
+ return changeTypeHandle(val);
17880
+ }
17881
+ }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
17882
+ key: 'reissueGoods'
17883
+ }, other), {}, {
17884
+ type: type,
17885
+ disabled: disabled,
17886
+ canUpdateNumber: showChangeBtn,
17887
+ showChangeBtn: showChangeBtn,
17888
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
17889
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
17890
+ onChange: function onChange(val) {
17891
+ return changeGoodHandle(val);
17892
+ },
17893
+ onModeChange: handleModeChange,
17894
+ showModeBtn: showModeBtn,
17895
+ isStrict: isStrict,
17896
+ tradeGoods: {
17897
+ originDataSource: getGoodDetails({
17898
+ mode: isStrict
17899
+ }),
17900
+ selectedGoodsChange: selectedGoodsChange
17901
+ }
17902
+ })));
17903
+ };
17904
+
17905
+ 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, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };