@kmkf-fe-packages/basic-components 1.17.8-beta.2 → 1.17.8-beta.23

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
@@ -7520,7 +7520,9 @@ var IdentifyAddress = function IdentifyAddress(props) {
7520
7520
  onChange: function onChange(e) {
7521
7521
  return changeHandle(e.target.value, 'receiverMobile');
7522
7522
  }
7523
- })), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Province, {
7523
+ })), /*#__PURE__*/React.createElement(Space, {
7524
+ wrap: true
7525
+ }, /*#__PURE__*/React.createElement(Province, {
7524
7526
  value: value.address,
7525
7527
  onChange: function onChange(val) {
7526
7528
  return changeHandle(val, 'address');
@@ -12022,6 +12024,347 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
12022
12024
  };
12023
12025
  var WdtGoodsModal = /*#__PURE__*/forwardRef(GoodsModal$3);
12024
12026
 
12027
+ var getTableData$1 = function getTableData(_ref, formData) {
12028
+ var current = _ref.current,
12029
+ pageSize = _ref.pageSize;
12030
+ var data = {
12031
+ goodsSn: formData.goodsSn || null,
12032
+ goodsname: formData.goodsname || null,
12033
+ sku: formData.sku || null,
12034
+ skuId: formData.skuId || null
12035
+ };
12036
+ return extendRequest('/qy/gdfw/product/product/page', {
12037
+ method: 'post',
12038
+ data: _objectSpread2({
12039
+ pageSize: pageSize,
12040
+ pageNo: current,
12041
+ platform: 'WDT_ERP'
12042
+ }, data)
12043
+ }).then(function (res) {
12044
+ var _res$data = res.data,
12045
+ _res$data$productSkuL = _res$data.productSkuList,
12046
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
12047
+ _res$data$total = _res$data.total,
12048
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
12049
+ var newProducts = productSkuList.map(function (item, index) {
12050
+ return _objectSpread2(_objectSpread2({}, item), {}, {
12051
+ index: index + 1
12052
+ });
12053
+ });
12054
+ return {
12055
+ total: total,
12056
+ list: newProducts
12057
+ };
12058
+ });
12059
+ };
12060
+ var columns$2 = [{
12061
+ dataIndex: 'index',
12062
+ title: 'NO',
12063
+ render: function render(val, record, index) {
12064
+ return /*#__PURE__*/React.createElement("div", {
12065
+ style: {
12066
+ width: 25
12067
+ }
12068
+ }, index + 1);
12069
+ },
12070
+ width: 100
12071
+ }, {
12072
+ dataIndex: 'specName',
12073
+ title: 'SKU名称',
12074
+ width: 250,
12075
+ ellipsis: true
12076
+ }, {
12077
+ dataIndex: 'specNo',
12078
+ title: 'SKU编码',
12079
+ width: 200,
12080
+ ellipsis: true
12081
+ }, {
12082
+ dataIndex: 'specId',
12083
+ title: 'SKUID',
12084
+ width: 200,
12085
+ ellipsis: true
12086
+ }, {
12087
+ dataIndex: 'specImgUrl',
12088
+ title: '商品图片',
12089
+ width: 100,
12090
+ render: function render(picUrl) {
12091
+ return /*#__PURE__*/React.createElement("img", {
12092
+ style: {
12093
+ width: '40px',
12094
+ height: '40px',
12095
+ objectFit: 'contain'
12096
+ },
12097
+ src: picUrl
12098
+ });
12099
+ }
12100
+ }, {
12101
+ dataIndex: 'goodName',
12102
+ title: '商品名称',
12103
+ width: 250,
12104
+ ellipsis: true
12105
+ }, {
12106
+ dataIndex: 'goodNo',
12107
+ title: '商品编码',
12108
+ width: 200,
12109
+ ellipsis: true
12110
+ }, {
12111
+ dataIndex: 'goodId',
12112
+ title: '商品ID',
12113
+ width: 200,
12114
+ ellipsis: true
12115
+ }, {
12116
+ dataIndex: 'marketPrice',
12117
+ title: '市场价',
12118
+ width: 140,
12119
+ render: function render(price) {
12120
+ return Number(price).toFixed(2);
12121
+ }
12122
+ }, {
12123
+ dataIndex: 'retailPrice',
12124
+ title: '零售价',
12125
+ width: 140,
12126
+ render: function render(price) {
12127
+ return Number(price).toFixed(2);
12128
+ }
12129
+ }, {
12130
+ dataIndex: 'memberPrice',
12131
+ title: '会员价',
12132
+ width: 140,
12133
+ render: function render(price) {
12134
+ return Number(price).toFixed(2);
12135
+ }
12136
+ }];
12137
+ var GoodList$1 = function GoodList(props, ref) {
12138
+ var _useState = useState([]),
12139
+ _useState2 = _slicedToArray(_useState, 2),
12140
+ selectList = _useState2[0],
12141
+ setSelect = _useState2[1];
12142
+ var _useState3 = useState([]),
12143
+ _useState4 = _slicedToArray(_useState3, 2),
12144
+ selectIds = _useState4[0],
12145
+ setSelectIds = _useState4[1];
12146
+ useImperativeHandle(ref, function () {
12147
+ return {
12148
+ getSelectGoodList: function getSelectGoodList() {
12149
+ return selectList;
12150
+ }
12151
+ };
12152
+ });
12153
+ var _Form$useForm = Form.useForm(),
12154
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
12155
+ form = _Form$useForm2[0];
12156
+ var _useAntdTable = useAntdTable(getTableData$1, {
12157
+ defaultPageSize: 10,
12158
+ form: form
12159
+ }),
12160
+ tableProps = _useAntdTable.tableProps,
12161
+ search = _useAntdTable.search,
12162
+ params = _useAntdTable.params;
12163
+ var submit = search.submit,
12164
+ reset = search.reset;
12165
+ var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
12166
+ layout: "inline",
12167
+ form: form
12168
+ }, /*#__PURE__*/React.createElement(Form.Item, {
12169
+ name: "goodsSn",
12170
+ style: {
12171
+ marginBottom: '12px'
12172
+ }
12173
+ }, /*#__PURE__*/React.createElement(Input, {
12174
+ placeholder: "\u5546\u54C1\u8D27\u53F7",
12175
+ allowClear: true,
12176
+ style: {
12177
+ width: 150
12178
+ }
12179
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12180
+ name: "goodsname",
12181
+ style: {
12182
+ marginBottom: '12px'
12183
+ }
12184
+ }, /*#__PURE__*/React.createElement(Input, {
12185
+ placeholder: "\u5546\u54C1\u540D\u79F0",
12186
+ allowClear: true,
12187
+ style: {
12188
+ width: 150
12189
+ }
12190
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12191
+ name: "sku",
12192
+ style: {
12193
+ marginBottom: '12px'
12194
+ }
12195
+ }, /*#__PURE__*/React.createElement(Input, {
12196
+ placeholder: "SKU",
12197
+ allowClear: true,
12198
+ style: {
12199
+ width: 150
12200
+ }
12201
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12202
+ name: "skuId",
12203
+ style: {
12204
+ marginBottom: '12px'
12205
+ }
12206
+ }, /*#__PURE__*/React.createElement(Input, {
12207
+ placeholder: "SKU ID",
12208
+ allowClear: true,
12209
+ style: {
12210
+ width: 150
12211
+ }
12212
+ })), /*#__PURE__*/React.createElement(Form.Item, {
12213
+ style: {
12214
+ marginBottom: '12px'
12215
+ }
12216
+ }, /*#__PURE__*/React.createElement(Button, {
12217
+ type: "primary",
12218
+ style: {
12219
+ marginRight: '8px'
12220
+ },
12221
+ onClick: submit
12222
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
12223
+ onClick: reset
12224
+ }, "\u91CD\u7F6E")));
12225
+ var rowSelection = {
12226
+ selectedRowKeys: selectIds,
12227
+ fixed: true,
12228
+ onSelect: function onSelect(record, selected) {
12229
+ if (selected) {
12230
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
12231
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
12232
+ } else {
12233
+ setSelectIds(selectIds.filter(function (t) {
12234
+ return t !== record.specNo;
12235
+ }));
12236
+ setSelect(selectList.filter(function (t) {
12237
+ return t.specNo !== record.specNo;
12238
+ }));
12239
+ }
12240
+ },
12241
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
12242
+ if (selected) {
12243
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
12244
+ return t.specNo;
12245
+ }))));
12246
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
12247
+ } else {
12248
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
12249
+ return t.specNo;
12250
+ })));
12251
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
12252
+ return arrVal.specNo !== othVal.specNo;
12253
+ });
12254
+ setSelect(list);
12255
+ }
12256
+ }
12257
+ };
12258
+ var showTable = function showTable() {
12259
+ var handleDelete = function handleDelete(record) {
12260
+ setSelectIds(selectIds.filter(function (t) {
12261
+ return t !== record.specNo;
12262
+ }));
12263
+ setSelect(selectList.filter(function (t) {
12264
+ return t.specNo !== record.specNo;
12265
+ }));
12266
+ };
12267
+ var showColumns = [{
12268
+ dataIndex: '',
12269
+ title: "\u64CD\u4F5C",
12270
+ ellipsis: true,
12271
+ width: 100,
12272
+ render: function render(val, record) {
12273
+ return /*#__PURE__*/React.createElement(Button, {
12274
+ type: "link",
12275
+ onClick: function onClick() {
12276
+ return handleDelete(record);
12277
+ }
12278
+ }, "\u5220\u9664");
12279
+ }
12280
+ }].concat(takeRight(columns$2, columns$2.length - 1));
12281
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
12282
+ style: {
12283
+ width: '100%',
12284
+ maxWidth: '387px'
12285
+ }
12286
+ }, /*#__PURE__*/React.createElement(Table, {
12287
+ columns: showColumns,
12288
+ rowKey: 'specNo',
12289
+ dataSource: selectList,
12290
+ scroll: {
12291
+ x: '100%',
12292
+ y: 250
12293
+ },
12294
+ pagination: {
12295
+ size: 'small',
12296
+ total: selectIds.length,
12297
+ pageSize: 10,
12298
+ showSizeChanger: false
12299
+ }
12300
+ })) : null;
12301
+ };
12302
+ return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
12303
+ style: {
12304
+ marginTop: '4px'
12305
+ }
12306
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
12307
+ rowSelection: rowSelection,
12308
+ rowKey: "specNo",
12309
+ columns: columns$2,
12310
+ scroll: {
12311
+ x: '100%',
12312
+ y: 250
12313
+ }
12314
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
12315
+ getPopupContainer: function getPopupContainer(triggerNode) {
12316
+ return triggerNode.parentElement;
12317
+ },
12318
+ content: showTable(),
12319
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
12320
+ }, /*#__PURE__*/React.createElement(Button, {
12321
+ danger: true,
12322
+ type: "text"
12323
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
12324
+ };
12325
+ var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$1);
12326
+
12327
+ var GoodsModal$4 = function GoodsModal(props, ref) {
12328
+ useImperativeHandle(ref, function () {
12329
+ return {
12330
+ open: function open() {
12331
+ setVisible(true);
12332
+ }
12333
+ };
12334
+ });
12335
+ var onSubmit = props.onSubmit,
12336
+ width = props.width;
12337
+ var _useState = useState(false),
12338
+ _useState2 = _slicedToArray(_useState, 2),
12339
+ visible = _useState2[0],
12340
+ setVisible = _useState2[1];
12341
+ var bsE3GoodListRef = useRef(null);
12342
+ var _onCancel = function onCancel() {
12343
+ setVisible(false);
12344
+ };
12345
+ var onOk = function onOk() {
12346
+ var _bsE3GoodListRef$curr;
12347
+ var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
12348
+ onSubmit(selectedList);
12349
+ _onCancel();
12350
+ };
12351
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
12352
+ title: '选择商品',
12353
+ okText: '确认',
12354
+ cancelText: '取消',
12355
+ visible: visible,
12356
+ width: width || 850,
12357
+ onCancel: function onCancel() {
12358
+ _onCancel();
12359
+ },
12360
+ onOk: onOk,
12361
+ wrapClassName: "goodModal"
12362
+ }, /*#__PURE__*/React.createElement(BsE3GoodList, {
12363
+ ref: bsE3GoodListRef
12364
+ })));
12365
+ };
12366
+ var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12367
+
12025
12368
  // interface GoodsItem {
12026
12369
  // title: string;
12027
12370
  // pic: string;
@@ -12692,6 +13035,14 @@ var GoodItem$1 = function GoodItem(props) {
12692
13035
  shopId: shopId,
12693
13036
  maxLength: maxLength,
12694
13037
  companyKey: companyKey
13038
+ }) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(BsE3GoodsModal, {
13039
+ ref: refModal,
13040
+ onSubmit: onSubmit,
13041
+ width: width,
13042
+ shopList: shopList,
13043
+ shopId: shopId,
13044
+ maxLength: maxLength,
13045
+ companyKey: companyKey
12695
13046
  }) : /*#__PURE__*/React.createElement(GoodsModal$2, {
12696
13047
  ref: refModal,
12697
13048
  onSubmit: onSubmit,
@@ -13311,19 +13662,89 @@ var BsReturnGoods = function BsReturnGoods(props) {
13311
13662
  })));
13312
13663
  };
13313
13664
 
13314
- var columnsNameMap = {
13315
- BS_SYSTEM_ORDER: {
13316
- typeName: '单据类型',
13317
- tagName: '标签'
13318
- },
13319
- WLN_SYSTEM_ORDER: {
13320
- typeName: '订单类型',
13321
- tagName: '标记'
13322
- },
13323
- WDT_SYSTEM_ORDER: {
13324
- typeName: '订单类型',
13325
- tagName: '订单标签'
13326
- }
13665
+ var columnsMap = {
13666
+ BS_SYSTEM_ORDER: [{
13667
+ title: '单据类型',
13668
+ dataIndex: 'billType',
13669
+ width: 150
13670
+ }, {
13671
+ title: '系统订单号',
13672
+ dataIndex: 'billNo',
13673
+ width: 150
13674
+ }, {
13675
+ title: '标签',
13676
+ dataIndex: 'billTag',
13677
+ width: 150
13678
+ }],
13679
+ WLN_SYSTEM_ORDER: [{
13680
+ title: '订单类型',
13681
+ dataIndex: 'billType',
13682
+ width: 150
13683
+ }, {
13684
+ title: '系统订单号',
13685
+ dataIndex: 'billNo',
13686
+ width: 150
13687
+ }, {
13688
+ title: '标记',
13689
+ dataIndex: 'billTag',
13690
+ width: 150
13691
+ }],
13692
+ WDT_SYSTEM_ORDER: [{
13693
+ title: '订单类型',
13694
+ dataIndex: 'billType',
13695
+ width: 150
13696
+ }, {
13697
+ title: '系统订单号',
13698
+ dataIndex: 'billNo',
13699
+ width: 150
13700
+ }, {
13701
+ title: '订单标签',
13702
+ dataIndex: 'billTag',
13703
+ width: 150
13704
+ }],
13705
+ BS_E3_SYSTEM_ORDER: [{
13706
+ title: '系统订单号',
13707
+ dataIndex: 'orderSn',
13708
+ width: 150
13709
+ }, {
13710
+ title: '订单状态',
13711
+ dataIndex: 'orderStatus',
13712
+ width: 100
13713
+ }, {
13714
+ title: '是否被拆分',
13715
+ dataIndex: 'isSplit',
13716
+ width: 100
13717
+ }, {
13718
+ title: '是否拆分子单',
13719
+ dataIndex: 'isSplitNew',
13720
+ width: 100
13721
+ }, {
13722
+ title: '是否被合并',
13723
+ dataIndex: 'isCombine',
13724
+ width: 100
13725
+ }, {
13726
+ title: '是否合并新单',
13727
+ dataIndex: 'isCombineNew',
13728
+ width: 100
13729
+ }, {
13730
+ title: '是否复制单',
13731
+ dataIndex: 'isCopy',
13732
+ width: 100
13733
+ }, {
13734
+ title: '是否换货单',
13735
+ dataIndex: 'isHH',
13736
+ width: 100
13737
+ }, {
13738
+ title: '订单备注',
13739
+ dataIndex: 'orderMsg',
13740
+ width: 150
13741
+ }]
13742
+ };
13743
+ var rowKeyMap = {
13744
+ BS_SYSTEM_ORDER: 'billNo',
13745
+ WLN_SYSTEM_ORDER: 'billNo',
13746
+ WDT_SYSTEM_ORDER: 'billNo',
13747
+ BS_E3_SYSTEM_ORDER: 'orderSn'
13327
13748
  };
13328
13749
  var index$1 = (function (props) {
13329
13750
  var value = props.value,
@@ -13341,21 +13762,13 @@ var index$1 = (function (props) {
13341
13762
  getWlnOrderList(value.orderNo);
13342
13763
  } else if (type === 'WDT_SYSTEM_ORDER') {
13343
13764
  getWdtOrderList(value.orderNo);
13765
+ } else if (type === 'BS_E3_SYSTEM_ORDER') {
13766
+ getBsE3OrderList(value.orderNo);
13344
13767
  }
13345
13768
  }
13346
13769
  }, [value, type]);
13347
13770
  var columns = useMemo(function () {
13348
- var _columnsNameMap$type, _columnsNameMap$type2;
13349
- return [{
13350
- dataIndex: 'billType',
13351
- title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
13352
- }, {
13353
- dataIndex: 'billNo',
13354
- title: '系统订单号'
13355
- }, {
13356
- dataIndex: 'billTag',
13357
- title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
13358
- }];
13771
+ return columnsMap[type] || [];
13359
13772
  }, [type]);
13360
13773
  var getOrderList = /*#__PURE__*/function () {
13361
13774
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
@@ -13499,6 +13912,62 @@ var index$1 = (function (props) {
13499
13912
  return _ref3.apply(this, arguments);
13500
13913
  };
13501
13914
  }();
13915
+ var getBsE3OrderList = /*#__PURE__*/function () {
13916
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(orderNo) {
13917
+ var _yield$request4, success, data, trades;
13918
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
13919
+ while (1) switch (_context4.prev = _context4.next) {
13920
+ case 0:
13921
+ _context4.next = 2;
13922
+ return extendRequest('/qy/gdfw/order/bsE3OrderDetail', {
13923
+ method: 'post',
13924
+ data: {
13925
+ billNo: orderNo
13926
+ }
13927
+ });
13928
+ case 2:
13929
+ _yield$request4 = _context4.sent;
13930
+ success = _yield$request4.success;
13931
+ data = _yield$request4.data;
13932
+ if (success) {
13933
+ trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
13934
+ return (item.srcTid || '').split(',').includes(orderNo);
13935
+ }).map(function (item) {
13936
+ if (Array.isArray(item.goodDetails)) {
13937
+ item.goodDetails = item.goodDetails.filter(function (good) {
13938
+ return good.srcTid === orderNo;
13939
+ });
13940
+ }
13941
+ return item;
13942
+ });
13943
+ _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13944
+ orders: trades.map(function (item) {
13945
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13946
+ billNo: item.tradeNo,
13947
+ billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13948
+ billTag: item.tagName
13949
+ });
13950
+ }),
13951
+ showOrderInfo: trades.map(function (item) {
13952
+ return {
13953
+ billNo: item.tradeNo,
13954
+ billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13955
+ billTag: item.tagName
13956
+ };
13957
+ })
13958
+ }));
13959
+ }
13960
+ onceRef.current = false;
13961
+ case 7:
13962
+ case "end":
13963
+ return _context4.stop();
13964
+ }
13965
+ }, _callee4);
13966
+ }));
13967
+ return function getBsE3OrderList(_x4) {
13968
+ return _ref4.apply(this, arguments);
13969
+ };
13970
+ }();
13502
13971
  var rowSelection = {
13503
13972
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
13504
13973
  fixed: true,
@@ -13519,7 +13988,7 @@ var index$1 = (function (props) {
13519
13988
  dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
13520
13989
  columns: columns,
13521
13990
  rowSelection: rowSelection,
13522
- rowKey: 'billNo',
13991
+ rowKey: rowKeyMap[type] || 'billNo',
13523
13992
  size: "small",
13524
13993
  pagination: false,
13525
13994
  scroll: {
@@ -13971,8 +14440,8 @@ var typeMap$1 = {
13971
14440
  key: 'wdtReissueGoods',
13972
14441
  name: '旺店通',
13973
14442
  typeName: 'wdtReissueType',
13974
- wdtSystemOrder: 'wdtSystemOrder',
13975
- wdtSystemOrderNo: 'wdtSystemOrderNo',
14443
+ systemOrder: 'wdtSystemOrder',
14444
+ systemOrderNo: 'wdtSystemOrderNo',
13976
14445
  reissueSelectList: 'wdtReissueSelectList',
13977
14446
  reissueSelectListReturn: 'wdtReissueSelectListReturn',
13978
14447
  reissueDeleteGood: 'wdtReissueDeleteGood',
@@ -13985,7 +14454,7 @@ var typeMap$1 = {
13985
14454
  }
13986
14455
  };
13987
14456
  var wdtReissue = function wdtReissue(props) {
13988
- var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type10, _typeMap$type26, _typeMap$type27, _value$typeMap$type$w2, _typeMap$type28, _typeMap$type29, _typeMap$type30;
14457
+ var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type10, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s2, _typeMap$type28, _typeMap$type29, _typeMap$type30;
13989
14458
  var value = props.value,
13990
14459
  onChange = props.onChange,
13991
14460
  _props$reasonList = props.reasonList,
@@ -14014,6 +14483,7 @@ var wdtReissue = function wdtReissue(props) {
14014
14483
  }));
14015
14484
  });
14016
14485
  }, [value, disabled]);
14486
+ // 用于暂存等系统订单下拉的回显,这块代码有bug,需要跟系统订单组件维护一个公共的slice
14017
14487
  useEffect(function () {
14018
14488
  var _value$orders, _value$showOrderInfo;
14019
14489
  if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
@@ -14025,33 +14495,32 @@ var wdtReissue = function wdtReissue(props) {
14025
14495
  }, [value]);
14026
14496
  useEffect(function () {
14027
14497
  var _typeMap$type5;
14028
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
14029
- if (wdtSystemOrderNo) {
14498
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrderNo];
14499
+ if (systemOrderNo) {
14030
14500
  var _value$typeMap$type$t, _typeMap$type6;
14031
14501
  if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
14032
- getGoodItems(wdtSystemOrderNo);
14502
+ getGoodItems(systemOrderNo);
14033
14503
  }
14034
14504
  }
14035
14505
  return;
14036
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
14506
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
14037
14507
  useEffect(function () {
14038
14508
  var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
14039
14509
  var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
14040
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
14510
+ var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrderNo];
14041
14511
  if (['1'].includes(typeName)) {
14042
- wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
14512
+ systemOrderNo && getGoodItems(systemOrderNo);
14043
14513
  } else if (['2'].includes(typeName)) {
14044
14514
  var newValue = _objectSpread2({}, value);
14045
- // newValue[`${typeMap?.[type]?.key}`] = [];
14046
14515
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14047
14516
  }
14048
14517
  return;
14049
14518
  }, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
14050
- var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
14051
- var _value$typeMap$type$w, _typeMap$type11, _ref;
14052
- var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
14519
+ var getGoodItems = function getGoodItems(systemOrderNo) {
14520
+ var _value$typeMap$type$s, _typeMap$type11, _ref;
14521
+ var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : _value$typeMap$type$s.orders;
14053
14522
  var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
14054
- return orderItem.billNo === wdtSystemOrderNo;
14523
+ return orderItem.billNo === systemOrderNo;
14055
14524
  });
14056
14525
  if (order) {
14057
14526
  var _typeMap$type12, _order$goodDetails;
@@ -14098,7 +14567,7 @@ var wdtReissue = function wdtReissue(props) {
14098
14567
  billTag: item.tagName
14099
14568
  };
14100
14569
  });
14101
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder]), {}, {
14570
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrder]), {}, {
14102
14571
  showOrderInfo: showOrderInfo,
14103
14572
  orders: orders
14104
14573
  }))));
@@ -14120,16 +14589,7 @@ var wdtReissue = function wdtReissue(props) {
14120
14589
  newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = [];
14121
14590
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14122
14591
  valueRef.current = newValue;
14123
- // if (['2'].includes(val[0])) {
14124
- // onChange?.(newValue);
14125
- // valueRef.current = newValue;
14126
- // }
14127
- // pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
14128
- // val: val[0],
14129
- // goodValue: newValue,
14130
- // });
14131
14592
  };
14132
-
14133
14593
  var changeGoodHandle = function changeGoodHandle(val) {
14134
14594
  var _typeMap$type19;
14135
14595
  var newValue = _objectSpread2({}, value);
@@ -14144,7 +14604,7 @@ var wdtReissue = function wdtReissue(props) {
14144
14604
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
14145
14605
  var _typeMap$type22, _value$typeMap$type$t4, _typeMap$type23;
14146
14606
  var newValue = _objectSpread2({}, value);
14147
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.wdtSystemOrderNo)] = val;
14607
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
14148
14608
  if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
14149
14609
  var _typeMap$type24;
14150
14610
  newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
@@ -14154,8 +14614,8 @@ var wdtReissue = function wdtReissue(props) {
14154
14614
  //显示选择商品按钮 原单换不显示选择商品
14155
14615
  var showChangeBtn = useMemo(function () {
14156
14616
  var _typeMap$type25;
14157
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
14158
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
14617
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
14618
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
14159
14619
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
14160
14620
  gutter: 8
14161
14621
  }, /*#__PURE__*/React.createElement(Col, {
@@ -14172,12 +14632,12 @@ var wdtReissue = function wdtReissue(props) {
14172
14632
  },
14173
14633
  disabled: disabled,
14174
14634
  allowClear: false,
14175
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrderNo)],
14635
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
14176
14636
  onChange: function onChange(val) {
14177
14637
  return changeSystemOrderHandle(val);
14178
14638
  },
14179
14639
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
14180
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
14640
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s2 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.showOrderInfo) || []).map(function (item) {
14181
14641
  return /*#__PURE__*/React.createElement(Select.Option, {
14182
14642
  key: item.billNo,
14183
14643
  value: item.billNo,
@@ -14223,7 +14683,7 @@ styleInject(css_248z$a);
14223
14683
  var TabPane$1 = Tabs.TabPane;
14224
14684
  var Option$2 = Select.Option;
14225
14685
  var Search$1 = Input.Search;
14226
- var GoodsModal$4 = function GoodsModal(props) {
14686
+ var GoodsModal$5 = function GoodsModal(props) {
14227
14687
  var onSubmit = props.onSubmit,
14228
14688
  _onCancel = props.onCancel,
14229
14689
  visible = props.visible,
@@ -14674,7 +15134,7 @@ var Goods$1 = function Goods(props, ref) {
14674
15134
  };
14675
15135
  return /*#__PURE__*/React.createElement("div", {
14676
15136
  className: "goodsBox"
14677
- }, /*#__PURE__*/React.createElement(GoodsModal$4, {
15137
+ }, /*#__PURE__*/React.createElement(GoodsModal$5, {
14678
15138
  visible: visible,
14679
15139
  onSubmit: onSubmit,
14680
15140
  type: type,