@kmkf-fe-packages/basic-components 2.0.79-beta.26 → 2.0.79-beta.29

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
@@ -1,13 +1,16 @@
1
1
  import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
2
- import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton } from 'antd';
3
- import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled, VideoCameraTwoTone } from '@ant-design/icons';
2
+ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate as Rate$1, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton, Empty, Tooltip } from 'antd';
3
+ import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, MinusCircleFilled, VideoCameraTwoTone } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection } from 'lodash';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, hasAddNullComponent, SEARCH_OPTIONS, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject as reject$1, isEmpty, intersection } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
11
+ import { internals, useTablePipeline, features, BaseTable } from 'ali-react-table';
12
+ import zh_CN from 'antd/lib/locale-provider/zh_CN';
13
+ import { SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID } from '@kmkf-fe-packages/kmkf-utils/src/constants/constant';
11
14
  import BigNumber from 'bignumber.js';
12
15
 
13
16
  function _iterableToArrayLimit(arr, i) {
@@ -7702,7 +7705,7 @@ function ApaasRate(props) {
7702
7705
  span: 24
7703
7706
  }, /*#__PURE__*/React.createElement("span", {
7704
7707
  className: styles$4.rateLabel
7705
- }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React.createElement(Rate, _objectSpread2(_objectSpread2({}, other), {}, {
7708
+ }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React.createElement(Rate$1, _objectSpread2(_objectSpread2({}, other), {}, {
7706
7709
  value: rateValues[item.id] || 0,
7707
7710
  onChange: function onChange(val) {
7708
7711
  return changeHandle(val, item.id);
@@ -11348,7 +11351,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11348
11351
  if (disabled) {
11349
11352
  return;
11350
11353
  }
11351
- if (newCompany === 'SF' && !(newCompany && trajectoryCode && trajectoryPhone)) {
11354
+ if (['KYE', 'SF'].includes(newCompany) && !(newCompany && trajectoryCode && trajectoryPhone)) {
11352
11355
  return;
11353
11356
  } else if (!(newCompany && trajectoryCode)) {
11354
11357
  return;
@@ -11484,7 +11487,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11484
11487
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
11485
11488
  });
11486
11489
  };
11487
- return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
11490
+ return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), ['KYE', 'SF'].includes(value === null || value === void 0 ? void 0 : value.trajectoryCompany) ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
11488
11491
  };
11489
11492
 
11490
11493
  var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
@@ -13170,7 +13173,7 @@ var GoodList = function GoodList(props, ref) {
13170
13173
  setBrandList(list);
13171
13174
  }
13172
13175
  } else {
13173
- reject(res);
13176
+ reject$1(res);
13174
13177
  }
13175
13178
  }).catch(console.error);
13176
13179
  };
@@ -13326,6 +13329,15 @@ var GoodList = function GoodList(props, ref) {
13326
13329
  };
13327
13330
  var WdtGoodList = /*#__PURE__*/forwardRef(GoodList);
13328
13331
 
13332
+ // interface GoodModelProps {
13333
+ // shopId: number | string;
13334
+ // maxLength: number;
13335
+ // shopList: any[];
13336
+ // width?: string | number;
13337
+ // shopCode?: string;
13338
+ // companyKey: string;
13339
+ // onSubmit: (...args: any[]) => any;
13340
+ // }
13329
13341
  var GoodsModal$3 = function GoodsModal(props, ref) {
13330
13342
  useImperativeHandle(ref, function () {
13331
13343
  return {
@@ -13796,6 +13808,15 @@ var GoodList$2 = function GoodList(props, ref) {
13796
13808
  };
13797
13809
  var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$2);
13798
13810
 
13811
+ // interface GoodModelProps {
13812
+ // shopId: number | string;
13813
+ // maxLength: number;
13814
+ // shopList: any[];
13815
+ // width?: string | number;
13816
+ // shopCode?: string;
13817
+ // companyKey: string;
13818
+ // onSubmit: (...args: any[]) => any;
13819
+ // }
13799
13820
  var GoodsModal$4 = function GoodsModal(props, ref) {
13800
13821
  useImperativeHandle(ref, function () {
13801
13822
  return {
@@ -14273,27 +14294,1279 @@ var GoodList$4 = function GoodList(props, ref) {
14273
14294
  };
14274
14295
  var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
14275
14296
 
14297
+ function always(value) {
14298
+ return function () {
14299
+ return value;
14300
+ };
14301
+ }
14302
+ var arrayUtils = {
14303
+ diff: function diff(arr1, arr2) {
14304
+ var set = new Set(arr2);
14305
+ return arr1.filter(function (x) {
14306
+ return !set.has(x);
14307
+ });
14308
+ },
14309
+ merge: function merge(arr1, arr2) {
14310
+ var set = new Set(arr1);
14311
+ return arr1.concat(arr2.filter(function (x) {
14312
+ return !set.has(x);
14313
+ }));
14314
+ }
14315
+ };
14316
+ function multiSelect() {
14317
+ var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14318
+ return function multiSelectStep(pipeline) {
14319
+ var _opts$isDisabled, _opts$clickArea, _ref, _ref2, _opts$value, _pipeline$getStateAtK, _ref3, _ref4, _opts$lastKey, _pipeline$getStateAtK2, _opts$checkboxPlaceme;
14320
+ var stateKey = 'multiSelect';
14321
+ var Checkbox = pipeline.ctx.components.Checkbox;
14322
+ if (Checkbox == null) {
14323
+ throw new Error('使用 multiSelect 之前需要设置 pipeline.ctx.components.Checkbox');
14324
+ }
14325
+ var primaryKey = pipeline.ensurePrimaryKey('multiSelect');
14326
+ var isDisabled = (_opts$isDisabled = opts.isDisabled) !== null && _opts$isDisabled !== void 0 ? _opts$isDisabled : always(false);
14327
+ var clickArea = (_opts$clickArea = opts.clickArea) !== null && _opts$clickArea !== void 0 ? _opts$clickArea : 'checkbox';
14328
+ var value = (_ref = (_ref2 = (_opts$value = opts.value) !== null && _opts$value !== void 0 ? _opts$value : (_pipeline$getStateAtK = pipeline.getStateAtKey(stateKey)) === null || _pipeline$getStateAtK === void 0 ? void 0 : _pipeline$getStateAtK.value) !== null && _ref2 !== void 0 ? _ref2 : opts.defaultValue) !== null && _ref !== void 0 ? _ref : [];
14329
+ var lastKey = (_ref3 = (_ref4 = (_opts$lastKey = opts.lastKey) !== null && _opts$lastKey !== void 0 ? _opts$lastKey : (_pipeline$getStateAtK2 = pipeline.getStateAtKey(stateKey)) === null || _pipeline$getStateAtK2 === void 0 ? void 0 : _pipeline$getStateAtK2.lastKey) !== null && _ref4 !== void 0 ? _ref4 : opts.defaultLastKey) !== null && _ref3 !== void 0 ? _ref3 : '';
14330
+ var _onChange = function onChange(nextValue, key, keys, action) {
14331
+ var _opts$onChange;
14332
+ (_opts$onChange = opts.onChange) === null || _opts$onChange === void 0 ? void 0 : _opts$onChange.call(opts, nextValue, key, keys, action);
14333
+ pipeline.setStateAtKey(stateKey, {
14334
+ value: nextValue,
14335
+ lastKey: key
14336
+ }, {
14337
+ keys: keys,
14338
+ action: action
14339
+ });
14340
+ };
14341
+ var dataSource = pipeline.getDataSource();
14342
+ /** dataSource 中包含的所有 keys */
14343
+ var fullKeySet = new Set();
14344
+ /** 所有有效的 keys(disable 状态为 false) */
14345
+ var allKeys = [];
14346
+ var getPrimaryKey = function getPrimaryKey(key) {
14347
+ var _ref5 = (key === null || key === void 0 ? void 0 : key.split('-')) || [],
14348
+ _ref6 = _slicedToArray(_ref5, 1),
14349
+ lastKey = _ref6[0];
14350
+ return lastKey;
14351
+ };
14352
+ dataSource.forEach(function (row, rowIndex) {
14353
+ var rowKey = internals.safeGetRowKey(primaryKey, row, rowIndex);
14354
+ rowKey = getPrimaryKey(rowKey);
14355
+ fullKeySet.add(rowKey);
14356
+ // 在 allKeys 中排除被禁用的 key
14357
+ if (!isDisabled(row, rowIndex) && !allKeys.includes(rowKey)) {
14358
+ allKeys.push(rowKey);
14359
+ }
14360
+ });
14361
+ var set = new Set(value);
14362
+ var isAllChecked = allKeys.length > 0 && allKeys.every(function (key) {
14363
+ return set.has(key);
14364
+ });
14365
+ var isAnyChecked = allKeys.some(function (key) {
14366
+ return set.has(key);
14367
+ });
14368
+ var defaultCheckboxColumnTitle = /*#__PURE__*/React.createElement(Checkbox, {
14369
+ checked: isAllChecked,
14370
+ indeterminate: !isAllChecked && isAnyChecked,
14371
+ onChange: function onChange(_) {
14372
+ if (isAllChecked) {
14373
+ _onChange(arrayUtils.diff(value, allKeys), '', allKeys, 'uncheck-all');
14374
+ } else {
14375
+ _onChange(arrayUtils.merge(value, allKeys), '', allKeys, 'check-all');
14376
+ }
14377
+ }
14378
+ });
14379
+ var checkboxColumn = _objectSpread2(_objectSpread2({
14380
+ name: '是否选中',
14381
+ title: defaultCheckboxColumnTitle,
14382
+ width: 50,
14383
+ align: 'center'
14384
+ }, opts.checkboxColumn), {}, {
14385
+ getCellProps: function getCellProps(value, row, rowIndex) {
14386
+ var rowKey = internals.safeGetRowKey(primaryKey, row, rowIndex);
14387
+ rowKey = getPrimaryKey(rowKey);
14388
+ if (fullKeySet.has(rowKey) && clickArea === 'cell') {
14389
+ var prevChecked = set.has(rowKey);
14390
+ var disabled = isDisabled(row, rowIndex);
14391
+ return {
14392
+ style: {
14393
+ cursor: disabled ? 'not-allowed' : 'pointer'
14394
+ },
14395
+ onClick: disabled ? undefined : function (e) {
14396
+ if (opts.stopClickEventPropagation) {
14397
+ e.stopPropagation();
14398
+ }
14399
+ onCheckboxChange(prevChecked, rowKey, e.shiftKey);
14400
+ }
14401
+ };
14402
+ }
14403
+ return {};
14404
+ },
14405
+ features: {
14406
+ autoRowSpan: function autoRowSpan(prevValue, value, prevRow, row) {
14407
+ var lastKey = getPrimaryKey(prevRow === null || prevRow === void 0 ? void 0 : prevRow.rowKey);
14408
+ var currentKey = getPrimaryKey(row === null || row === void 0 ? void 0 : row.rowKey);
14409
+ return lastKey === currentKey;
14410
+ }
14411
+ },
14412
+ render: function render(_, row, rowIndex) {
14413
+ var key = internals.safeGetRowKey(primaryKey, row, rowIndex);
14414
+ key = getPrimaryKey(key);
14415
+ var checked = set.has(key);
14416
+ return /*#__PURE__*/React.createElement(Checkbox, {
14417
+ checked: checked,
14418
+ disabled: isDisabled(row, rowIndex),
14419
+ onChange: clickArea === 'checkbox' ? function (arg1, arg2) {
14420
+ var _arg2$nativeEvent;
14421
+ // 这里要同时兼容 antd 和 fusion 的用法
14422
+ // fusion: arg2?.nativeEvent
14423
+ // antd: arg1.nativeEvent
14424
+ var nativeEvent = (_arg2$nativeEvent = arg2 === null || arg2 === void 0 ? void 0 : arg2.nativeEvent) !== null && _arg2$nativeEvent !== void 0 ? _arg2$nativeEvent : arg1.nativeEvent;
14425
+ if (nativeEvent) {
14426
+ if (opts.stopClickEventPropagation) {
14427
+ nativeEvent.stopPropagation();
14428
+ }
14429
+ onCheckboxChange(checked, key, nativeEvent.shiftKey);
14430
+ }
14431
+ } : undefined
14432
+ });
14433
+ }
14434
+ });
14435
+ var nextColumns = pipeline.getColumns().slice();
14436
+ var checkboxPlacement = (_opts$checkboxPlaceme = opts.checkboxPlacement) !== null && _opts$checkboxPlaceme !== void 0 ? _opts$checkboxPlaceme : 'start';
14437
+ if (checkboxPlacement === 'start') {
14438
+ nextColumns.unshift(checkboxColumn);
14439
+ } else {
14440
+ nextColumns.push(checkboxColumn);
14441
+ }
14442
+ pipeline.columns(nextColumns);
14443
+ pipeline.appendRowPropsGetter(function (row, rowIndex) {
14444
+ var rowKey = internals.safeGetRowKey(primaryKey, row, rowIndex);
14445
+ rowKey = getPrimaryKey(rowKey);
14446
+ if (!fullKeySet.has(rowKey)) {
14447
+ // rowKey 不在 fullKeySet 中说明这一行是在 multiSelect 之后才生成的,multiSelect 不对之后生成的行进行处理
14448
+ return {};
14449
+ }
14450
+ var style = {};
14451
+ var className = '';
14452
+ var onClick;
14453
+ var checked = set.has(rowKey);
14454
+ if (opts.highlightRowWhenSelected && checked) {
14455
+ className = 'highlight';
14456
+ }
14457
+ if (clickArea === 'row') {
14458
+ var disabled = isDisabled(row, rowIndex);
14459
+ if (!disabled) {
14460
+ style.cursor = 'pointer';
14461
+ onClick = function onClick(e) {
14462
+ if (opts.stopClickEventPropagation) {
14463
+ e.stopPropagation();
14464
+ }
14465
+ onCheckboxChange(checked, rowKey, e.shiftKey);
14466
+ };
14467
+ }
14468
+ }
14469
+ return {
14470
+ className: className,
14471
+ style: style,
14472
+ onClick: onClick
14473
+ };
14474
+ });
14475
+ return pipeline;
14476
+ function onCheckboxChange(prevChecked, key, batch) {
14477
+ var batchKeys = [key];
14478
+ if (batch && lastKey) {
14479
+ var lastIdx = allKeys.indexOf(lastKey);
14480
+ var cntIdx = allKeys.indexOf(key);
14481
+ var _ref7 = lastIdx < cntIdx ? [lastIdx, cntIdx] : [cntIdx, lastIdx],
14482
+ _ref8 = _slicedToArray(_ref7, 2),
14483
+ start = _ref8[0],
14484
+ end = _ref8[1];
14485
+ batchKeys = allKeys.slice(start, end + 1);
14486
+ }
14487
+ if (prevChecked) {
14488
+ _onChange && _onChange(arrayUtils.diff(value, batchKeys), key, batchKeys, 'uncheck');
14489
+ } else {
14490
+ _onChange && _onChange(arrayUtils.merge(value, batchKeys), key, batchKeys, 'check');
14491
+ }
14492
+ }
14493
+ };
14494
+ }
14495
+
14496
+ var css_248z$b = ".high-performance-table .lock-left {\n background: #FFF !important;\n}\n.high-performance-table .art-empty-wrapper {\n margin-top: 24px;\n}\n.high-performance-table .cell-content {\n height: 48px;\n display: flex;\n align-items: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 8px 12px;\n}\n";
14497
+ styleInject(css_248z$b);
14498
+
14499
+ var _excluded$e = ["children"];
14500
+ var Cell = function Cell(_ref) {
14501
+ var tdProps = _ref.tdProps;
14502
+ var children = tdProps.children,
14503
+ otherProps = _objectWithoutProperties(tdProps, _excluded$e);
14504
+ return /*#__PURE__*/React.createElement("td", _objectSpread2({}, otherProps), /*#__PURE__*/React.createElement("div", {
14505
+ className: 'cell-content'
14506
+ }, children));
14507
+ };
14508
+ var HighPerformanceTable = function HighPerformanceTable(_ref2) {
14509
+ var _ref2$disabledIds = _ref2.disabledIds,
14510
+ disabledIds = _ref2$disabledIds === void 0 ? [] : _ref2$disabledIds,
14511
+ selectedKeys = _ref2.selectedKeys,
14512
+ handleChangeSelectedKeys = _ref2.handleChangeSelectedKeys,
14513
+ dataSource = _ref2.dataSource,
14514
+ columns = _ref2.columns,
14515
+ height = _ref2.height,
14516
+ loading = _ref2.loading,
14517
+ className = _ref2.className,
14518
+ onRow = _ref2.onRow;
14519
+ // console.debug('selectedKeys', selectedKeys);
14520
+ var _useState = useState(),
14521
+ _useState2 = _slicedToArray(_useState, 2),
14522
+ lastClickRowIndex = _useState2[0],
14523
+ setLastClickRowIndex = _useState2[1];
14524
+ var pipeline = useTablePipeline({
14525
+ components: {
14526
+ Checkbox: Checkbox
14527
+ }
14528
+ }).input({
14529
+ dataSource: dataSource,
14530
+ columns: columns
14531
+ }).primaryKey('rowKey').use(features.columnRangeHover()) // 高亮展示
14532
+ .use(features.columnResize({
14533
+ handleHoverBackground: '#aaa',
14534
+ handleActiveBackground: '#89bff7'
14535
+ }));
14536
+ pipeline.use(multiSelect({
14537
+ value: selectedKeys,
14538
+ isDisabled: function isDisabled(value) {
14539
+ return disabledIds.includes(value === null || value === void 0 ? void 0 : value.id);
14540
+ },
14541
+ onChange: handleChangeSelectedKeys,
14542
+ highlightRowWhenSelected: true,
14543
+ checkboxPlacement: 'start',
14544
+ checkboxColumn: {
14545
+ lock: true
14546
+ },
14547
+ clickArea: 'cell',
14548
+ stopClickEventPropagation: true
14549
+ }));
14550
+ pipeline.use(features.autoRowSpan());
14551
+ // FIXME: 自定义列头宽度暂时有实现难度,暂缓实现
14552
+ // pipeline.use(
14553
+ // features.columnResize({
14554
+ // onChangeSizes(sizeList) {
14555
+ // console.log('sizeList', sizeList);
14556
+ // },
14557
+ // }),
14558
+ // );
14559
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseTable, _objectSpread2(_objectSpread2({
14560
+ style: {
14561
+ maxHeight: height,
14562
+ overflow: 'auto',
14563
+ '--bgcolor': 'transparent',
14564
+ '--font-size': '13px',
14565
+ '--cell-padding': '0px'
14566
+ },
14567
+ className: "high-performance-table ".concat(className),
14568
+ useOuterBorder: true
14569
+ }, pipeline.getProps()), {}, {
14570
+ components: {
14571
+ EmptyContent: Empty,
14572
+ Cell: Cell
14573
+ },
14574
+ primaryKey: "rowKey",
14575
+ getRowProps: function getRowProps(record, rowIndex) {
14576
+ return {
14577
+ style: (record === null || record === void 0 ? void 0 : record.id) === lastClickRowIndex ? {
14578
+ '--hover-bgcolor': 'transparent',
14579
+ background: 'rgba(196, 197, 199, 0.2)'
14580
+ } : {
14581
+ backgroundColor: 'transparent'
14582
+ },
14583
+ onClick: function onClick() {
14584
+ setLastClickRowIndex(record === null || record === void 0 ? void 0 : record.id); // TODO: 使用id就是强业务相关了,这里要求同一条工单需要id相同,rowKey不同
14585
+ typeof onRow === 'function' && onRow(record, rowIndex);
14586
+ }
14587
+ };
14588
+ },
14589
+ useVirtual: true,
14590
+ isLoading: loading
14591
+ })));
14592
+ };
14593
+
14594
+ var css_248z$c = ".search-header-wrap .is-open {\n height: auto;\n}\n.search-header-wrap .not-open {\n max-height: 71px;\n overflow-y: auto;\n}\n#table-resizable .header {\n display: flex;\n align-items: center;\n padding: 8px 16px;\n background-color: #fff;\n}\n#table-resizable .header .operate {\n height: 32px;\n padding: 8px 0;\n cursor: pointer;\n}\n#table-resizable .header .operate .anticon {\n font-size: 16px;\n}\n#table-resizable .header .operate .anticon:hover {\n color: #1b5bf3;\n transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);\n}\n#table-resizable .header .title {\n font-weight: bold;\n}\n#table-resizable .actions-layout {\n display: flex;\n justify-content: space-between;\n}\n#table-resizable .react-resizable {\n position: relative;\n background-clip: padding-box;\n}\n#table-resizable th[colspan] {\n padding: 0px !important;\n overflow: hidden;\n color: #86909c;\n font-weight: normal;\n font-size: 14px;\n font-family: PingFangSC-Regular;\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: #e5e6eb;\n}\n#table-resizable .react-resizable-handle {\n position: absolute;\n right: -5px;\n bottom: 0;\n z-index: 1;\n width: 10px;\n height: 100%;\n cursor: col-resize;\n}\n#table-resizable .fz-12 {\n padding-right: 8px;\n font-size: 12px;\n}\n#table-resizable .tableFooter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 64px;\n padding: 0 36px 0 24px;\n background-color: #fff;\n}\n#table-resizable .tableFooter .total {\n /* 文字色/86909C */\n color: #86909c;\n font-weight: normal;\n font-size: 14px;\n font-family: PingFangSC-Regular;\n line-height: 22px;\n letter-spacing: 0px;\n}\n#table-resizable .ant-table-tbody > tr > td {\n padding: 4px 8px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n#table-resizable .ant-form-item {\n margin-bottom: 4px;\n margin-right: 0;\n}\n#table-resizable .ant-table-ping-left .ant-table-cell-fix-left-first::after,\n#table-resizable .ant-table-ping-left .ant-table-cell-fix-left-last::after,\n#table-resizable .ant-table-thead > tr > th,\n#table-resizable .ant-table-cell-fix-left-first::after,\n#table-resizable .ant-table .ant-table-container::before,\n#table-resizable .ant-table .ant-table-container::after,\n#table-resizable .ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container::after,\n#table-resizable .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(\n .ant-table-row-expand-icon-cell\n ):not([colspan])::before,\n#table-resizable .ant-table-cell-fix-left-last::after {\n box-shadow: none;\n transform: none;\n transition: none;\n}\n#table-resizable .ant-checkbox-checked .ant-checkbox-inner::after {\n transition: none;\n}\n#table-resizable .ant-checkbox-checked::after {\n animation: none;\n}\n#table-resizable .rowSelectClass {\n background-color: #eee;\n}\n#table-resizable .rowSelectClass .ant-table-cell-fix-left {\n background-color: #eee;\n}\n";
14595
+ styleInject(css_248z$c);
14596
+
14597
+ var TrimInput = function TrimInput(props) {
14598
+ var handleBlur = function handleBlur(e) {
14599
+ // 去除头尾空格
14600
+ e.target.value = e.target.value.trim();
14601
+ var onChange = props.onChange,
14602
+ onBlur = props.onBlur;
14603
+ // 主动调 onChange,将数据同步给 Form
14604
+ onChange(e);
14605
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
14606
+ };
14607
+ return /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, props), {}, {
14608
+ onBlur: handleBlur
14609
+ }));
14610
+ };
14611
+
14612
+ var Rate = function Rate(_ref) {
14613
+ var value = _ref.value,
14614
+ _onChange = _ref.onChange,
14615
+ placeholder = _ref.placeholder,
14616
+ prefix = _ref.prefix;
14617
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(InputNumber, {
14618
+ prefix: prefix,
14619
+ style: {
14620
+ width: '150px'
14621
+ },
14622
+ value: value === null || value === void 0 ? void 0 : value[0],
14623
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder[0],
14624
+ onChange: function onChange(val) {
14625
+ _onChange([val ? Number(val) : val, value === null || value === void 0 ? void 0 : value[1]]);
14626
+ }
14627
+ }), /*#__PURE__*/React.createElement("span", {
14628
+ style: {
14629
+ padding: '0px 8px'
14630
+ }
14631
+ }, "-"), /*#__PURE__*/React.createElement(InputNumber, {
14632
+ prefix: prefix,
14633
+ style: {
14634
+ width: '150px'
14635
+ },
14636
+ value: value === null || value === void 0 ? void 0 : value[1],
14637
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder[1],
14638
+ onChange: function onChange(val) {
14639
+ _onChange([value === null || value === void 0 ? void 0 : value[0], val ? Number(val) : val]);
14640
+ }
14641
+ }));
14642
+ };
14643
+
14644
+ var reject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAA5uSURBVHic7Z1BbBNXGsf/b+zYScckjUGMWTCVanFI1bVPSMgcYCvFFWorEaRWPcSRKi1S6TkcyqVwaQ/k3KBupWpJTq2UIBUpqiMhOOCNlJO9CB+QkUposVnqQDJDYjue2YM9IXHsmTeeeTOONb8LIhmPX/z3+973vu973xAY5Nzss/dqW9UzIOQDQDlBCDmqKMowAI/Re7loUiOErCqK8gdAHkFR7ni8ffcWxo88NHITQnNR4maBh7x5Hp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5aWVjlQic4vIgg4UBlbWjo6gTlRi25x/ggAJVzDy0ZXwyPY6RE7i4vjaeAPADdDc4sIgr9awL3xSuXEV8CcOU0ar1R2WsA90EweJjb6iQucc1w4XqnsHHL+OQd+AiVeccbmwE+HnH/eT1ygT4g+zW65XGTAN4yx28H7R3iFc77FgcfHE6p+OAoMALv3748yTZtnqvoAnM+AGgWiwgZjG9yynvB2e6W3FRqEkMDHaZZKtzqqeocBd8H5DSjKdXB+FYDqyWXiPCww9ga2/RqMveLAs5RlPc9Wqy/dGPk/lTM43UA4NxYAAAAASUVORK5CYII=";
14647
+
14648
+ var _excluded$f = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
14649
+ var AsyncSelect = function AsyncSelect(props) {
14650
+ var mode = props.mode,
14651
+ maxSelectCount = props.maxSelectCount,
14652
+ _props$showOnly = props.showOnly,
14653
+ showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
14654
+ getOptionsAsync = props.getOptionsAsync,
14655
+ _onChange = props.onChange,
14656
+ otherProps = _objectWithoutProperties(props, _excluded$f);
14657
+ var _React$useState = React.useState([]),
14658
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14659
+ data = _React$useState2[0],
14660
+ setData = _React$useState2[1];
14661
+ React.useEffect(function () {
14662
+ getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
14663
+ setData(list);
14664
+ });
14665
+ }, []);
14666
+ var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
14667
+ var getValueString = function getValueString(value) {
14668
+ var list = options;
14669
+ if (mode === 'multiple' && Array.isArray(value)) {
14670
+ var _list$filter$map$join;
14671
+ return (_list$filter$map$join = list.filter(function (item) {
14672
+ return value.includes(item.value);
14673
+ }).map(function (item) {
14674
+ return item.label;
14675
+ }).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
14676
+ } else {
14677
+ var selectedItem = list.find(function (item) {
14678
+ return item.value === value;
14679
+ });
14680
+ return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
14681
+ }
14682
+ };
14683
+ if (showOnly) {
14684
+ return getValueString(props.value);
14685
+ }
14686
+ return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
14687
+ showArrow: true,
14688
+ showSearch: true,
14689
+ filterOption: function filterOption(input, option) {
14690
+ return option.label.includes(input);
14691
+ },
14692
+ notFoundContent: null
14693
+ }, otherProps), {}, {
14694
+ options: options,
14695
+ mode: mode,
14696
+ onChange: function onChange(value, option) {
14697
+ if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
14698
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
14699
+ } else {
14700
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
14701
+ }
14702
+ }
14703
+ }));
14704
+ };
14705
+
14706
+ var _excluded$g = ["filterComponentType", "searchDefaultConditions", "props", "ShopList"];
14707
+ var RangePicker = DatePicker.RangePicker;
14708
+ var _SelectInput = function SelectInput(props) {
14709
+ var _props$value = props.value,
14710
+ value = _props$value === void 0 ? {
14711
+ type: 'keywords',
14712
+ keywords: ''
14713
+ } : _props$value,
14714
+ onChange = props.onChange;
14715
+ var handleSelectChange = function handleSelectChange(val) {
14716
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
14717
+ type: val
14718
+ });
14719
+ if (val !== 'keywords') {
14720
+ newValue.keywords = '';
14721
+ }
14722
+ onChange(newValue);
14723
+ };
14724
+ var handleInputChange = function handleInputChange(e) {
14725
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
14726
+ keywords: e.target.value
14727
+ });
14728
+ onChange(newValue);
14729
+ };
14730
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
14731
+ style: {
14732
+ minWidth: '120px',
14733
+ width: '40%'
14734
+ },
14735
+ options: SEARCH_OPTIONS,
14736
+ value: value.type,
14737
+ onChange: handleSelectChange
14738
+ }), value.type === 'keywords' ? /*#__PURE__*/React.createElement(TrimInput, {
14739
+ style: {
14740
+ width: '60%'
14741
+ },
14742
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14743
+ value: value.keywords,
14744
+ allowClear: true,
14745
+ onChange: handleInputChange
14746
+ }) : null);
14747
+ };
14748
+ var _TradeInput = function TradeInput(props) {
14749
+ // const repeatOrderList = useSelector(selectRepeatOrderList);
14750
+ // const userInfo = useSelector(selectUserInfo);
14751
+ // const isRepeat = repeatOrderList.includes(userInfo?.companyKey || '');
14752
+ // PS: 订单重复的先不做筛选,后续有需求了再补充
14753
+ var isRepeat = false;
14754
+ var _props$value2 = props.value,
14755
+ value = _props$value2 === void 0 ? {
14756
+ tradeIdSearchRepeat: false,
14757
+ value: ''
14758
+ } : _props$value2,
14759
+ onChange = props.onChange;
14760
+ var handleInputChange = function handleInputChange(e) {
14761
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
14762
+ value: e.target.value
14763
+ });
14764
+ onChange(newValue);
14765
+ };
14766
+ return "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
14767
+ title: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14768
+ key: 'tradeInput'
14769
+ }, /*#__PURE__*/React.createElement(TrimInput, {
14770
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14771
+ allowClear: true,
14772
+ value: value.value,
14773
+ onChange: handleInputChange
14774
+ }), isRepeat ) : /*#__PURE__*/React.createElement("div", {
14775
+ key: 'tradeInput'
14776
+ }, /*#__PURE__*/React.createElement(TrimInput, {
14777
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14778
+ allowClear: true,
14779
+ value: value.value,
14780
+ onChange: handleInputChange
14781
+ }), isRepeat );
14782
+ };
14783
+ var componentMap$1 = {
14784
+ Input: function Input(props) {
14785
+ return "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
14786
+ title: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name)
14787
+ }, /*#__PURE__*/React.createElement(TrimInput, _objectSpread2({
14788
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14789
+ allowClear: true
14790
+ }, props))) : /*#__PURE__*/React.createElement(TrimInput, _objectSpread2({
14791
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14792
+ allowClear: true
14793
+ }, props));
14794
+ },
14795
+ MultipleSelect: function MultipleSelect(props) {
14796
+ return "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
14797
+ title: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name)
14798
+ }, /*#__PURE__*/React.createElement(Select, _objectSpread2({
14799
+ mode: "multiple",
14800
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14801
+ optionFilterProp: "label",
14802
+ allowClear: true,
14803
+ maxTagCount: "responsive"
14804
+ }, props))) : /*#__PURE__*/React.createElement(Select, _objectSpread2({
14805
+ mode: "multiple",
14806
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14807
+ optionFilterProp: "label",
14808
+ allowClear: true,
14809
+ maxTagCount: "responsive"
14810
+ }, props));
14811
+ },
14812
+ Date: function Date(props) {
14813
+ return /*#__PURE__*/React.createElement(RangePicker, _objectSpread2({
14814
+ placeholder: ["".concat(props.name, "\u5F00\u59CB\u65F6\u95F4"), "".concat(props.name, "\u7ED3\u675F\u65F6\u95F4")],
14815
+ allowClear: true,
14816
+ showTime: {
14817
+ defaultValue: [hooks().startOf('day'), hooks().endOf('day')]
14818
+ },
14819
+ maxTagCount: "responsive"
14820
+ }, props));
14821
+ },
14822
+ Cascader: function Cascader$1(props) {
14823
+ return "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
14824
+ title: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name)
14825
+ }, /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
14826
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14827
+ allowClear: true,
14828
+ showSearch: true,
14829
+ maxTagCount: "responsive",
14830
+ fieldNames: {
14831
+ label: 'label',
14832
+ value: 'actived',
14833
+ children: 'children'
14834
+ }
14835
+ }, props))) : /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
14836
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14837
+ allowClear: true,
14838
+ showSearch: true,
14839
+ maxTagCount: "responsive",
14840
+ fieldNames: {
14841
+ label: 'label',
14842
+ value: 'actived',
14843
+ children: 'children'
14844
+ }
14845
+ }, props));
14846
+ },
14847
+ // ShopList: (props: any) => (
14848
+ // <ShopList
14849
+ // placeholder="请选择店铺名称"
14850
+ // showSearch
14851
+ // optionFilterProp="label"
14852
+ // allowClear
14853
+ // maxTagCount="responsive"
14854
+ // style={{ width: '220px' }}
14855
+ // {...props}
14856
+ // />
14857
+ // ),
14858
+ Rate: function Rate$1(props) {
14859
+ return /*#__PURE__*/React.createElement(Rate, _objectSpread2({}, props));
14860
+ },
14861
+ SelectInput: function SelectInput(props) {
14862
+ return /*#__PURE__*/React.createElement(_SelectInput, _objectSpread2({}, props));
14863
+ },
14864
+ TradeInput: function TradeInput(props) {
14865
+ return /*#__PURE__*/React.createElement(_TradeInput, _objectSpread2({}, props));
14866
+ },
14867
+ AsyncSelect: function AsyncSelect$1(props) {
14868
+ return /*#__PURE__*/React.createElement(AsyncSelect, _objectSpread2({
14869
+ placeholder: "\u8BF7\u9009\u62E9".concat((props === null || props === void 0 ? void 0 : props.name) || '')
14870
+ }, props));
14871
+ }
14872
+ };
14873
+ var getShopList = function getShopList() {
14874
+ return servers.singletonWrap(function () {
14875
+ return servers.queryShopList();
14876
+ }, {
14877
+ name: "getShopList",
14878
+ key: 'getShopList',
14879
+ cacheTime: 1000 * 60
14880
+ });
14881
+ };
14882
+ var FilterSelectOption = function FilterSelectOption(props) {
14883
+ // otherProps 中存在value和onChange属性
14884
+ var filterComponentType = props.filterComponentType,
14885
+ searchDefaultConditions = props.searchDefaultConditions,
14886
+ componentProps = props.props,
14887
+ ShopList = props.ShopList,
14888
+ otherProps = _objectWithoutProperties(props, _excluded$g);
14889
+ var _React$useState = React.useState([]),
14890
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14891
+ shopList = _React$useState2[0],
14892
+ setShopList = _React$useState2[1];
14893
+ React.useEffect(function () {
14894
+ getShopList().then(function (_ref) {
14895
+ var data = _ref.data;
14896
+ setShopList(data);
14897
+ return function () {
14898
+ setShopList([]);
14899
+ };
14900
+ }).catch(console.warn);
14901
+ }, []);
14902
+ var Comp = filterComponentType === 'ShopList' ? function (props) {
14903
+ return /*#__PURE__*/React.createElement(ShopList, _objectSpread2(_objectSpread2({
14904
+ placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
14905
+ showSearch: true,
14906
+ optionFilterProp: "label",
14907
+ allowClear: true,
14908
+ maxTagCount: "responsive",
14909
+ valueMapping: "uniqueKey",
14910
+ style: {
14911
+ width: '220px'
14912
+ }
14913
+ }, props), {}, {
14914
+ shopList: shopList
14915
+ }));
14916
+ } : componentMap$1[filterComponentType];
14917
+ var newComponentProps = cloneDeep(componentProps);
14918
+ if (hasAddNullComponent.includes(props.type)) {
14919
+ var options = cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
14920
+ var nullList = props.type === 'LOGISTICS_INTERCEPTION' ? props.id.split('_')[1] === 'interceptLogisticsStatus' ? [{
14921
+ label: '为空',
14922
+ value: 'isNull'
14923
+ }] : [] : [{
14924
+ label: '为空',
14925
+ value: 'isNull'
14926
+ }, {
14927
+ label: '不为空',
14928
+ value: 'notNull'
14929
+ }];
14930
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
14931
+ options: [].concat(nullList, _toConsumableArray(options))
14932
+ });
14933
+ }
14934
+ //标记组件渲染图片 无法深拷贝,需要手动映射label
14935
+ if (props.type === 'FLOW_MARK_SELECT') {
14936
+ var MARK_FLAG_MAP = {
14937
+ '1': /*#__PURE__*/React.createElement("svg", {
14938
+ viewBox: "0 0 1024 1024",
14939
+ version: "1.1",
14940
+ xmlns: "http://www.w3.org/2000/svg",
14941
+ "p-id": "7093",
14942
+ width: "18",
14943
+ height: "18"
14944
+ }, /*#__PURE__*/React.createElement("path", {
14945
+ d: "M575.852903 115.426402L661.092435 288.054362c10.130509 20.465674 29.675227 34.689317 52.289797 37.963825l190.433097 27.62866c56.996902 8.288598 79.7138 78.281203 38.475467 118.496253l-137.836314 134.35715c-16.372539 15.963226-23.84251 38.987109-19.954032 61.49935l32.540421 189.716799c9.721195 56.792245-49.833916 100.077146-100.793444 73.267113L545.870691 841.446188a69.491196 69.491196 0 0 0-64.67153 0l-170.376737 89.537324c-50.959528 26.810033-110.51464-16.474868-100.793444-73.267113L242.569401 667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055 472.245428c-41.238333-40.215049-18.521435-110.207655 38.475467-118.496252l190.433097-27.62866c22.61457-3.274508 42.159288-17.498151 52.289797-37.963826L451.319277 115.426402c25.479764-51.675827 99.053862-51.675827 124.533626 0z",
14946
+ fill: "#C6C6C6",
14947
+ "p-id": "7094"
14948
+ })),
14949
+ '7': /*#__PURE__*/React.createElement("svg", {
14950
+ viewBox: "0 0 1024 1024",
14951
+ version: "1.1",
14952
+ xmlns: "http://www.w3.org/2000/svg",
14953
+ "p-id": "7093",
14954
+ width: "18",
14955
+ height: "18"
14956
+ }, /*#__PURE__*/React.createElement("path", {
14957
+ d: "M575.852903 115.426402L661.092435 288.054362c10.130509 20.465674 29.675227 34.689317 52.289797 37.963825l190.433097 27.62866c56.996902 8.288598 79.7138 78.281203 38.475467 118.496253l-137.836314 134.35715c-16.372539 15.963226-23.84251 38.987109-19.954032 61.49935l32.540421 189.716799c9.721195 56.792245-49.833916 100.077146-100.793444 73.267113L545.870691 841.446188a69.491196 69.491196 0 0 0-64.67153 0l-170.376737 89.537324c-50.959528 26.810033-110.51464-16.474868-100.793444-73.267113L242.569401 667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055 472.245428c-41.238333-40.215049-18.521435-110.207655 38.475467-118.496252l190.433097-27.62866c22.61457-3.274508 42.159288-17.498151 52.289797-37.963826L451.319277 115.426402c25.479764-51.675827 99.053862-51.675827 124.533626 0z",
14958
+ fill: "#8a8a8a",
14959
+ "p-id": "7094"
14960
+ })),
14961
+ '2': /*#__PURE__*/React.createElement("svg", {
14962
+ viewBox: "0 0 1024 1024",
14963
+ version: "1.1",
14964
+ xmlns: "http://www.w3.org/2000/svg",
14965
+ "p-id": "7093",
14966
+ width: "18",
14967
+ height: "18"
14968
+ }, /*#__PURE__*/React.createElement("path", {
14969
+ d: "M575.852903 115.426402L661.092435 288.054362c10.130509 20.465674 29.675227 34.689317 52.289797 37.963825l190.433097 27.62866c56.996902 8.288598 79.7138 78.281203 38.475467 118.496253l-137.836314 134.35715c-16.372539 15.963226-23.84251 38.987109-19.954032 61.49935l32.540421 189.716799c9.721195 56.792245-49.833916 100.077146-100.793444 73.267113L545.870691 841.446188a69.491196 69.491196 0 0 0-64.67153 0l-170.376737 89.537324c-50.959528 26.810033-110.51464-16.474868-100.793444-73.267113L242.569401 667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055 472.245428c-41.238333-40.215049-18.521435-110.207655 38.475467-118.496252l190.433097-27.62866c22.61457-3.274508 42.159288-17.498151 52.289797-37.963826L451.319277 115.426402c25.479764-51.675827 99.053862-51.675827 124.533626 0z",
14970
+ fill: "#ff0000",
14971
+ "p-id": "7094"
14972
+ })),
14973
+ '3': /*#__PURE__*/React.createElement("svg", {
14974
+ viewBox: "0 0 1024 1024",
14975
+ version: "1.1",
14976
+ xmlns: "http://www.w3.org/2000/svg",
14977
+ "p-id": "7093",
14978
+ width: "18",
14979
+ height: "18"
14980
+ }, /*#__PURE__*/React.createElement("path", {
14981
+ d: "M575.852903 115.426402L661.092435 288.054362c10.130509 20.465674 29.675227 34.689317 52.289797 37.963825l190.433097 27.62866c56.996902 8.288598 79.7138 78.281203 38.475467 118.496253l-137.836314 134.35715c-16.372539 15.963226-23.84251 38.987109-19.954032 61.49935l32.540421 189.716799c9.721195 56.792245-49.833916 100.077146-100.793444 73.267113L545.870691 841.446188a69.491196 69.491196 0 0 0-64.67153 0l-170.376737 89.537324c-50.959528 26.810033-110.51464-16.474868-100.793444-73.267113L242.569401 667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055 472.245428c-41.238333-40.215049-18.521435-110.207655 38.475467-118.496252l190.433097-27.62866c22.61457-3.274508 42.159288-17.498151 52.289797-37.963826L451.319277 115.426402c25.479764-51.675827 99.053862-51.675827 124.533626 0z",
14982
+ fill: "#f6b343",
14983
+ "p-id": "7094"
14984
+ })),
14985
+ '4': /*#__PURE__*/React.createElement("svg", {
14986
+ viewBox: "0 0 1024 1024",
14987
+ version: "1.1",
14988
+ xmlns: "http://www.w3.org/2000/svg",
14989
+ "p-id": "7093",
14990
+ width: "18",
14991
+ height: "18"
14992
+ }, /*#__PURE__*/React.createElement("path", {
14993
+ d: "M575.852903 115.426402L661.092435 288.054362c10.130509 20.465674 29.675227 34.689317 52.289797 37.963825l190.433097 27.62866c56.996902 8.288598 79.7138 78.281203 38.475467 118.496253l-137.836314 134.35715c-16.372539 15.963226-23.84251 38.987109-19.954032 61.49935l32.540421 189.716799c9.721195 56.792245-49.833916 100.077146-100.793444 73.267113L545.870691 841.446188a69.491196 69.491196 0 0 0-64.67153 0l-170.376737 89.537324c-50.959528 26.810033-110.51464-16.474868-100.793444-73.267113L242.569401 667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055 472.245428c-41.238333-40.215049-18.521435-110.207655 38.475467-118.496252l190.433097-27.62866c22.61457-3.274508 42.159288-17.498151 52.289797-37.963826L451.319277 115.426402c25.479764-51.675827 99.053862-51.675827 124.533626 0z",
14994
+ fill: "#4d90f7",
14995
+ "p-id": "7094"
14996
+ })),
14997
+ '5': /*#__PURE__*/React.createElement("svg", {
14998
+ viewBox: "0 0 1024 1024",
14999
+ version: "1.1",
15000
+ xmlns: "http://www.w3.org/2000/svg",
15001
+ "p-id": "7093",
15002
+ width: "18",
15003
+ height: "18"
15004
+ }, /*#__PURE__*/React.createElement("path", {
15005
+ d: "M575.852903 115.426402L661.092435 288.054362c10.130509 20.465674 29.675227 34.689317 52.289797 37.963825l190.433097 27.62866c56.996902 8.288598 79.7138 78.281203 38.475467 118.496253l-137.836314 134.35715c-16.372539 15.963226-23.84251 38.987109-19.954032 61.49935l32.540421 189.716799c9.721195 56.792245-49.833916 100.077146-100.793444 73.267113L545.870691 841.446188a69.491196 69.491196 0 0 0-64.67153 0l-170.376737 89.537324c-50.959528 26.810033-110.51464-16.474868-100.793444-73.267113L242.569401 667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055 472.245428c-41.238333-40.215049-18.521435-110.207655 38.475467-118.496252l190.433097-27.62866c22.61457-3.274508 42.159288-17.498151 52.289797-37.963826L451.319277 115.426402c25.479764-51.675827 99.053862-51.675827 124.533626 0z",
15006
+ fill: "#6ed86c",
15007
+ "p-id": "7094"
15008
+ })),
15009
+ '6': /*#__PURE__*/React.createElement("svg", {
15010
+ viewBox: "0 0 1024 1024",
15011
+ version: "1.1",
15012
+ xmlns: "http://www.w3.org/2000/svg",
15013
+ "p-id": "7093",
15014
+ width: "18",
15015
+ height: "18"
15016
+ }, /*#__PURE__*/React.createElement("path", {
15017
+ d: "M575.852903 115.426402L661.092435 288.054362c10.130509 20.465674 29.675227 34.689317 52.289797 37.963825l190.433097 27.62866c56.996902 8.288598 79.7138 78.281203 38.475467 118.496253l-137.836314 134.35715c-16.372539 15.963226-23.84251 38.987109-19.954032 61.49935l32.540421 189.716799c9.721195 56.792245-49.833916 100.077146-100.793444 73.267113L545.870691 841.446188a69.491196 69.491196 0 0 0-64.67153 0l-170.376737 89.537324c-50.959528 26.810033-110.51464-16.474868-100.793444-73.267113L242.569401 667.9996c3.888478-22.512241-3.581493-45.536125-19.954032-61.49935L84.779055 472.245428c-41.238333-40.215049-18.521435-110.207655 38.475467-118.496252l190.433097-27.62866c22.61457-3.274508 42.159288-17.498151 52.289797-37.963826L451.319277 115.426402c25.479764-51.675827 99.053862-51.675827 124.533626 0z",
15018
+ fill: "#be4ed1",
15019
+ "p-id": "7094"
15020
+ }))
15021
+ };
15022
+ var markOptions = cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
15023
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
15024
+ options: markOptions.map(function (t) {
15025
+ return {
15026
+ label: MARK_FLAG_MAP[t.value],
15027
+ value: t.value
15028
+ };
15029
+ })
15030
+ });
15031
+ } else if (props.type === 'FLOW_TAG') {
15032
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
15033
+ options: [{
15034
+ label: '为空',
15035
+ value: 'isNull'
15036
+ }, {
15037
+ label: /*#__PURE__*/React.createElement("img", {
15038
+ src: reminder,
15039
+ style: {
15040
+ width: '16px'
15041
+ }
15042
+ }),
15043
+ value: 'REMINDER'
15044
+ }, {
15045
+ label: /*#__PURE__*/React.createElement("img", {
15046
+ src: reject,
15047
+ style: {
15048
+ width: '16px'
15049
+ }
15050
+ }),
15051
+ value: 'REJECT'
15052
+ }]
15053
+ });
15054
+ } else if (props.type === 'HANDLER_INPUT') {
15055
+ var _options = cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
15056
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
15057
+ options: _options.map(function (item) {
15058
+ var _item$value$split = item.value.split(':'),
15059
+ _item$value$split2 = _slicedToArray(_item$value$split, 2),
15060
+ val = _item$value$split2[0],
15061
+ groupText = _item$value$split2[1];
15062
+ return _objectSpread2(_objectSpread2({}, item), {}, {
15063
+ label: groupText ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
15064
+ style: {
15065
+ marginRight: '8px',
15066
+ backgroundColor: '#d6e7ff',
15067
+ padding: '3px 7px',
15068
+ borderRadius: '4px',
15069
+ color: '#3a75ed',
15070
+ fontWeight: 400,
15071
+ lineHeight: '13px',
15072
+ display: 'inline-block'
15073
+ }
15074
+ }, /*#__PURE__*/React.createElement("i", {
15075
+ className: "iconfont icon-group"
15076
+ })), /*#__PURE__*/React.createElement("span", null, item.label)) : item.label
15077
+ });
15078
+ })
15079
+ });
15080
+ }
15081
+ if (Comp) return /*#__PURE__*/React.createElement(Comp, _objectSpread2(_objectSpread2({}, newComponentProps), otherProps));
15082
+ return null;
15083
+ };
15084
+
15085
+ var RangePicker$1 = DatePicker.RangePicker;
15086
+ var defaultTimeOptions = [{
15087
+ label: '提交时间',
15088
+ value: SUBMIT_TIME_ID
15089
+ }, {
15090
+ label: '修改时间',
15091
+ value: UPGRADE_TIME_ID
15092
+ }, {
15093
+ label: '完成时间',
15094
+ value: FINAL_TIME_ID
15095
+ }];
15096
+ var timeCustomOptions = [{
15097
+ label: '自定义时间',
15098
+ value: CUSTOM_TIME_ID
15099
+ }, {
15100
+ label: '今天',
15101
+ value: 1
15102
+ }, {
15103
+ label: '近7天',
15104
+ value: 7
15105
+ }, {
15106
+ label: '近30天',
15107
+ value: 30
15108
+ }];
15109
+ var SearchHeader = function SearchHeader(_ref) {
15110
+ var allFields = _ref.allFields,
15111
+ children = _ref.children,
15112
+ status = _ref.status,
15113
+ _ref$layout = _ref.layout,
15114
+ layout = _ref$layout === void 0 ? 'block' : _ref$layout,
15115
+ _ref$isShowTime = _ref.isShowTime,
15116
+ isShowTime = _ref$isShowTime === void 0 ? true : _ref$isShowTime,
15117
+ timeOptions = _ref.timeOptions,
15118
+ ShopList = _ref.ShopList;
15119
+ // const fixedFieldsOptions = useMemo(() => {
15120
+ // return allFields.filter(item => fixedFields?.includes(item.id));
15121
+ // }, [fixedFields, allFields]);
15122
+ return /*#__PURE__*/React.createElement("div", {
15123
+ className: 'search-header-wrap'
15124
+ }, /*#__PURE__*/React.createElement("div", {
15125
+ className: "".concat(status ? 'is-open' : 'not-open')
15126
+ }, /*#__PURE__*/React.createElement("div", {
15127
+ style: {
15128
+ display: 'flex',
15129
+ alignItems: 'center',
15130
+ flexWrap: 'wrap'
15131
+ }
15132
+ }, isShowTime && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
15133
+ name: "timeType"
15134
+ }, /*#__PURE__*/React.createElement(Select, {
15135
+ options: timeOptions !== null && timeOptions !== void 0 ? timeOptions : defaultTimeOptions,
15136
+ style: {
15137
+ width: '120px',
15138
+ marginRight: '8px'
15139
+ },
15140
+ showSearch: true,
15141
+ optionFilterProp: "label"
15142
+ })), /*#__PURE__*/React.createElement(Form.Item, {
15143
+ name: "customTime"
15144
+ }, /*#__PURE__*/React.createElement(Select, {
15145
+ options: timeCustomOptions,
15146
+ style: {
15147
+ width: '120px',
15148
+ marginRight: '8px'
15149
+ },
15150
+ showSearch: true,
15151
+ optionFilterProp: "label"
15152
+ })), /*#__PURE__*/React.createElement(Form.Item, {
15153
+ name: "time",
15154
+ style: {
15155
+ marginRight: '4px'
15156
+ }
15157
+ }, /*#__PURE__*/React.createElement(RangePicker$1, {
15158
+ showTime: {
15159
+ defaultValue: [hooks().startOf('day'), hooks().endOf('day')]
15160
+ },
15161
+ allowClear: true
15162
+ }))), allFields === null || allFields === void 0 ? void 0 : allFields.map(function (item) {
15163
+ // const show = fixedFieldsOptions?.map(i => i?.id)?.includes(item.id);
15164
+ var show = true;
15165
+ return /*#__PURE__*/React.createElement(Form.Item, {
15166
+ name: item.id,
15167
+ rules: item.rules || [],
15168
+ hidden: !show,
15169
+ style: {
15170
+ marginRight: '4px',
15171
+ minWidth: '220px'
15172
+ },
15173
+ key: item.id
15174
+ }, /*#__PURE__*/React.createElement(FilterSelectOption, _objectSpread2({
15175
+ ShopList: ShopList
15176
+ }, item)));
15177
+ }), /*#__PURE__*/React.createElement(Form.Item, null, layout === 'inner' && /*#__PURE__*/React.createElement(React.Fragment, null, children)))), layout === 'block' && /*#__PURE__*/React.createElement(React.Fragment, null, children));
15178
+ };
15179
+
15180
+ var initStatus = {
15181
+ batchAuditDialogVisible: false,
15182
+ exportVisible: false,
15183
+ filterListVisible: false,
15184
+ exportLoading: false,
15185
+ open: false,
15186
+ visible: false,
15187
+ batchVisible: false,
15188
+ batchSubmitVisible: false,
15189
+ importVisible: false,
15190
+ smartWorkOrderStatusVisible: false
15191
+ };
15192
+ var SearchForm$1 = function SearchForm(props) {
15193
+ var submit = props.submit,
15194
+ reset = props.reset,
15195
+ filterItems = props.filterItems,
15196
+ form = props.form;
15197
+ var _useStatus = useStatus(initStatus),
15198
+ _useStatus2 = _slicedToArray(_useStatus, 2),
15199
+ status = _useStatus2[0],
15200
+ changeStatus = _useStatus2[1];
15201
+ return /*#__PURE__*/React.createElement(ConfigProvider, {
15202
+ locale: zh_CN
15203
+ }, /*#__PURE__*/React.createElement("div", {
15204
+ id: "table-resizable"
15205
+ }, /*#__PURE__*/React.createElement(Form, {
15206
+ layout: "inline",
15207
+ form: form
15208
+ }, !!(filterItems === null || filterItems === void 0 ? void 0 : filterItems.length) && /*#__PURE__*/React.createElement(SearchHeader, {
15209
+ isShowTime: false,
15210
+ ShopList: props.ShopList,
15211
+ fixedFields: filterItems || [],
15212
+ allFields: filterItems || [],
15213
+ status: status === null || status === void 0 ? void 0 : status.open
15214
+ }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
15215
+ type: "primary",
15216
+ onClick: submit
15217
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
15218
+ onClick: reset
15219
+ }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
15220
+ type: "link",
15221
+ onClick: function onClick() {
15222
+ return changeStatus({
15223
+ open: !(status === null || status === void 0 ? void 0 : status.open)
15224
+ });
15225
+ },
15226
+ icon: (status === null || status === void 0 ? void 0 : status.open) ? /*#__PURE__*/React.createElement(UpOutlined, null) : /*#__PURE__*/React.createElement(DownOutlined, null)
15227
+ }, (status === null || status === void 0 ? void 0 : status.open) ? '收起' : '展开'))))));
15228
+ };
15229
+
15230
+ var queryWorkOrderList = function queryWorkOrderList(params) {
15231
+ return servers.singletonWrap(function () {
15232
+ return servers.queryWorkOrderList(params);
15233
+ }, {
15234
+ name: 'queryWorkOrderList',
15235
+ key: 'queryWorkOrderList',
15236
+ cacheTime: 60
15237
+ });
15238
+ };
15239
+ var WorkorderList = function WorkorderList(props, ref) {
15240
+ // console.log('**** 调用 useGoodsSourceFormat 开始, goodsSource:', props);
15241
+ var _Form$useForm = Form.useForm(),
15242
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
15243
+ form = _Form$useForm2[0];
15244
+ var _React$useState = React.useState([]),
15245
+ _React$useState2 = _slicedToArray(_React$useState, 2),
15246
+ selectedKeys = _React$useState2[0],
15247
+ setSelectedKeys = _React$useState2[1];
15248
+ var _React$useState3 = React.useState([]),
15249
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
15250
+ selectedList = _React$useState4[0],
15251
+ setSelectedList = _React$useState4[1];
15252
+ var goodsSourceFormat = props.useGoodsSourceFormat(props.goodsSource);
15253
+ var _React$useState5 = React.useState([]),
15254
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
15255
+ workOrderList = _React$useState6[0],
15256
+ setWorkOrderList = _React$useState6[1];
15257
+ var _React$useState7 = React.useState({
15258
+ loading: false,
15259
+ total: 0,
15260
+ current: 1,
15261
+ pageSize: 2
15262
+ }),
15263
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
15264
+ paginationData = _React$useState8[0],
15265
+ setPaginationData = _React$useState8[1];
15266
+ var _useGetColumns = useGetColumns(props.erp),
15267
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 2),
15268
+ columns = _useGetColumns2[0],
15269
+ showColumnsDataIndexList = _useGetColumns2[1];
15270
+ var disabledIds = (props.seletedGooods || []).map(function (goods) {
15271
+ return goods.id;
15272
+ }).filter(function (key) {
15273
+ return key;
15274
+ });
15275
+ useImperativeHandle(ref, function () {
15276
+ return {
15277
+ getSelectGoodList: function getSelectGoodList() {
15278
+ return selectedList;
15279
+ }
15280
+ };
15281
+ });
15282
+ // console.log('**** 调用 useGoodsSourceFormat 结束:', {
15283
+ // goodsSourceFormat,
15284
+ // goodsSource: props.goodsSource,
15285
+ // });
15286
+ var paginationChange = function paginationChange(current, pageSize) {
15287
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15288
+ current: current,
15289
+ pageSize: pageSize
15290
+ }));
15291
+ };
15292
+ var fecthTableData = /*#__PURE__*/function () {
15293
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
15294
+ var current,
15295
+ pageSize,
15296
+ _ref2,
15297
+ flowTemplateKey,
15298
+ flowNodeId,
15299
+ templateKey,
15300
+ _ref2$tableColumns,
15301
+ tableColumns,
15302
+ formData,
15303
+ params,
15304
+ fields,
15305
+ uniqueKeys,
15306
+ _args = arguments;
15307
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15308
+ while (1) switch (_context.prev = _context.next) {
15309
+ case 0:
15310
+ current = _args.length > 0 && _args[0] !== undefined ? _args[0] : paginationData.current;
15311
+ pageSize = _args.length > 1 && _args[1] !== undefined ? _args[1] : paginationData.pageSize;
15312
+ _ref2 = goodsSourceFormat || {}, flowTemplateKey = _ref2.flowTemplateKey, flowNodeId = _ref2.flowNodeId, templateKey = _ref2.templateKey, _ref2$tableColumns = _ref2.tableColumns, tableColumns = _ref2$tableColumns === void 0 ? [] : _ref2$tableColumns;
15313
+ _context.next = 5;
15314
+ return form.validateFields();
15315
+ case 5:
15316
+ formData = _context.sent;
15317
+ if (templateKey) {
15318
+ _context.next = 10;
15319
+ break;
15320
+ }
15321
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15322
+ total: 0
15323
+ }));
15324
+ setWorkOrderList([]);
15325
+ return _context.abrupt("return");
15326
+ case 10:
15327
+ params = finalFormData({
15328
+ options: goodsSourceFormat.filterItems || [],
15329
+ formData: formData,
15330
+ current: current,
15331
+ pageSize: pageSize
15332
+ });
15333
+ params.flowTemplateKey = flowTemplateKey;
15334
+ params.flowNodeId = flowNodeId;
15335
+ params.templateKey = templateKey;
15336
+ // params.returnRepeatValueKeys = returnRepeatValueKeys;
15337
+ // 不对店铺数据进行过滤,
15338
+ // true表示不过滤拿到所有数据,false表示按照权限过滤,名字相当奇怪
15339
+ params.needFilterShopByPermission = true;
15340
+ fields = tableColumns === null || tableColumns === void 0 ? void 0 : tableColumns.reduce(function (cur, nxt) {
15341
+ if (DATA_SPLIT_COMPONENT_FIELDS_MAP === null || DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]) {
15342
+ return cur.concat(DATA_SPLIT_COMPONENT_FIELDS_MAP === null || DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]);
15343
+ }
15344
+ return cur;
15345
+ }, []);
15346
+ uniqueKeys = tableColumns === null || tableColumns === void 0 ? void 0 : tableColumns.reduce(function (cur, nxt) {
15347
+ if (DATA_SPLIT_COMPONENT_FIELDS_MAP === null || DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]) {
15348
+ return cur.concat(nxt.id);
15349
+ }
15350
+ return cur;
15351
+ }, []);
15352
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15353
+ loading: true
15354
+ }));
15355
+ // console.log('**** 搜索条件 params: ', {
15356
+ // params,
15357
+ // goodsSourceFormat,
15358
+ // goodsSource: props.goodsSource,
15359
+ // });
15360
+ return _context.abrupt("return", queryWorkOrderList(_objectSpread2(_objectSpread2({}, params), goodsSourceFormat.queryComponentsConfig)).then(function (res) {
15361
+ var _res$data, _res$data2;
15362
+ var curryTransformList = transformList(fields, uniqueKeys);
15363
+ var newDataSource = curryTransformList(dataSourceTrans((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || []));
15364
+ // console.log(`数据转换 1:`, newDataSource);
15365
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15366
+ total: res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.total,
15367
+ loading: false
15368
+ }));
15369
+ setWorkOrderList(newDataSource);
15370
+ }).catch(function (error) {
15371
+ console.log('**** 获取表格数据错误', error);
15372
+ }));
15373
+ case 19:
15374
+ case "end":
15375
+ return _context.stop();
15376
+ }
15377
+ }, _callee);
15378
+ }));
15379
+ return function fecthTableData() {
15380
+ return _ref.apply(this, arguments);
15381
+ };
15382
+ }();
15383
+ // console.log(`🚀 ~ index.tsx:51 ~ WorkorderList ~ columns:`, {
15384
+ // columns,
15385
+ // selectedKeys,
15386
+ // selectedList,
15387
+ // seletedGooods: props.seletedGooods,
15388
+ // disabledIds,
15389
+ // });
15390
+ var reset = function reset() {
15391
+ var current = 1;
15392
+ form.resetFields();
15393
+ if (paginationData.current !== current) {
15394
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15395
+ current: current
15396
+ }));
15397
+ } else {
15398
+ fecthTableData();
15399
+ }
15400
+ };
15401
+ var handleSelect = function handleSelect(keys) {
15402
+ var deletedKeys = selectedKeys.filter(function (key) {
15403
+ return !keys.includes(key);
15404
+ });
15405
+ setSelectedKeys(keys);
15406
+ // console.log(
15407
+ // '**** in handleChangeSelectedKeys',
15408
+ // keys,
15409
+ // '删除的keys: ',
15410
+ // deletedKeys,
15411
+ // );
15412
+ var newList = _toConsumableArray(selectedList);
15413
+ deletedKeys.forEach(function (key) {
15414
+ var deletedItemIndex = newList.findIndex(function (item) {
15415
+ return item.id === key;
15416
+ });
15417
+ if (deletedItemIndex > -1) {
15418
+ newList.splice(deletedItemIndex, 1);
15419
+ }
15420
+ });
15421
+ keys.forEach(function (key) {
15422
+ var selectedItem = newList.find(function (item) {
15423
+ return item.id === key;
15424
+ });
15425
+ if (!selectedItem) {
15426
+ var workOrderData = workOrderList.find(function (item) {
15427
+ return item.id === key;
15428
+ });
15429
+ var goods = goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
15430
+ newList.push(goods);
15431
+ }
15432
+ });
15433
+ setSelectedList(newList);
15434
+ };
15435
+ React.useEffect(function () {
15436
+ // console.log('**** templateKey 变化', goodsSourceFormat.templateKey);
15437
+ if (goodsSourceFormat.templateKey) {
15438
+ fecthTableData();
15439
+ }
15440
+ }, [goodsSourceFormat.templateKey]);
15441
+ var showTable = function showTable() {
15442
+ var handleDelete = function handleDelete(record) {
15443
+ setSelectedKeys(selectedKeys.filter(function (t) {
15444
+ return t !== record.id;
15445
+ }));
15446
+ setSelectedList(selectedList.filter(function (t) {
15447
+ return t.id !== record.id;
15448
+ }));
15449
+ };
15450
+ var showColumns = [{
15451
+ dataIndex: '',
15452
+ title: "\u64CD\u4F5C",
15453
+ ellipsis: true,
15454
+ width: 100,
15455
+ render: function render(val, record) {
15456
+ return /*#__PURE__*/React.createElement(Button, {
15457
+ type: "link",
15458
+ onClick: function onClick() {
15459
+ return handleDelete(record);
15460
+ }
15461
+ }, "\u5220\u9664");
15462
+ }
15463
+ }].concat(takeRight(columns, columns.length - 1));
15464
+ return selectedKeys.length ? /*#__PURE__*/React.createElement("div", {
15465
+ style: {
15466
+ width: '100%',
15467
+ maxWidth: '387px'
15468
+ }
15469
+ }, /*#__PURE__*/React.createElement(Table, {
15470
+ columns: showColumns,
15471
+ rowKey: 'id',
15472
+ dataSource: selectedList,
15473
+ scroll: {
15474
+ x: '100%',
15475
+ y: 250
15476
+ },
15477
+ pagination: {
15478
+ size: 'small',
15479
+ total: selectedKeys.length,
15480
+ pageSize: 10,
15481
+ showSizeChanger: false
15482
+ }
15483
+ })) : null;
15484
+ };
15485
+ React.useEffect(function () {
15486
+ fecthTableData();
15487
+ }, [paginationData.current, paginationData.pageSize]);
15488
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SearchForm$1, {
15489
+ form: form,
15490
+ submit: function submit() {
15491
+ return fecthTableData();
15492
+ },
15493
+ reset: reset,
15494
+ filterItems: goodsSourceFormat.filterItems,
15495
+ ShopList: goodsSourceFormat.ShopList
15496
+ }), /*#__PURE__*/React.createElement("div", {
15497
+ style: {
15498
+ marginTop: '4px'
15499
+ }
15500
+ }, /*#__PURE__*/React.createElement(HighPerformanceTable, {
15501
+ disabledIds: disabledIds,
15502
+ columns: goodsSourceFormat.tableColumns,
15503
+ selectedKeys: selectedKeys,
15504
+ handleChangeSelectedKeys: handleSelect,
15505
+ height: 250,
15506
+ dataSource: workOrderList,
15507
+ loading: paginationData.loading
15508
+ }), /*#__PURE__*/React.createElement(Pagination, {
15509
+ disabled: paginationData.loading,
15510
+ current: paginationData.current,
15511
+ pageSize: paginationData.pageSize,
15512
+ total: paginationData.total,
15513
+ onChange: paginationChange,
15514
+ showSizeChanger: true,
15515
+ style: {
15516
+ marginTop: 8,
15517
+ textAlign: 'right'
15518
+ },
15519
+ size: "small",
15520
+ pageSizeOptions: [10, 20, 50, 100, 500, 1000]
15521
+ })), /*#__PURE__*/React.createElement(Popover, {
15522
+ getPopupContainer: function getPopupContainer(triggerNode) {
15523
+ return triggerNode.parentElement;
15524
+ },
15525
+ content: showTable(),
15526
+ title: "\u5DF2\u9009\u62E9".concat(selectedKeys.length, "\u4E2A\u5546\u54C1")
15527
+ }, /*#__PURE__*/React.createElement(Button, {
15528
+ danger: true,
15529
+ type: "text"
15530
+ }, "\u5DF2\u9009".concat(selectedKeys.length > 99 ? '99+' : selectedKeys.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
15531
+ };
15532
+ var WorkorderList$1 = /*#__PURE__*/forwardRef(WorkorderList);
15533
+
15534
+ // interface GoodModelProps {
15535
+ // shopId: number | string;
15536
+ // maxLength: number;
15537
+ // shopList: any[];
15538
+ // width?: string | number;
15539
+ // shopCode?: string;
15540
+ // companyKey: string;
15541
+ // onSubmit: (...args: any[]) => any;
15542
+ // }
14276
15543
  var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
15544
+ var _props$goodsSource;
15545
+ var _useState = useState(),
15546
+ _useState2 = _slicedToArray(_useState, 2),
15547
+ seletedGooods = _useState2[0],
15548
+ setSeletedGooods = _useState2[1];
14277
15549
  useImperativeHandle(ref, function () {
14278
15550
  return {
14279
- open: function open() {
15551
+ open: function open(shopCode, options) {
15552
+ setSeletedGooods((options === null || options === void 0 ? void 0 : options.value) || []);
14280
15553
  setVisible(true);
14281
15554
  }
14282
15555
  };
14283
15556
  });
14284
15557
  var onSubmit = props.onSubmit,
14285
15558
  width = props.width;
14286
- var _useState = useState(false),
14287
- _useState2 = _slicedToArray(_useState, 2),
14288
- visible = _useState2[0],
14289
- setVisible = _useState2[1];
14290
- var gyGoodsListRef = useRef(null);
15559
+ var _useState3 = useState(false),
15560
+ _useState4 = _slicedToArray(_useState3, 2),
15561
+ visible = _useState4[0],
15562
+ setVisible = _useState4[1];
15563
+ var goodsListRef = useRef(null);
14291
15564
  var _onCancel = function onCancel() {
14292
15565
  setVisible(false);
14293
15566
  };
14294
15567
  var onOk = function onOk() {
14295
- var _gyGoodsListRef$curre;
14296
- var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
15568
+ var _goodsListRef$current;
15569
+ var selectedList = ((_goodsListRef$current = goodsListRef.current) === null || _goodsListRef$current === void 0 ? void 0 : _goodsListRef$current.getSelectGoodList()) || [];
14297
15570
  onSubmit(selectedList);
14298
15571
  _onCancel();
14299
15572
  };
@@ -14308,8 +15581,14 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
14308
15581
  },
14309
15582
  onOk: onOk,
14310
15583
  wrapClassName: "goodModal"
14311
- }, /*#__PURE__*/React.createElement(GyGoodsList$1, {
14312
- ref: gyGoodsListRef
15584
+ }, ((_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source) === 'workOrder' ? /*#__PURE__*/React.createElement(WorkorderList$1, {
15585
+ erp: "gy",
15586
+ goodsSource: props.goodsSource,
15587
+ seletedGooods: seletedGooods,
15588
+ useGoodsSourceFormat: props.useGoodsSourceFormat,
15589
+ ref: goodsListRef
15590
+ }) : /*#__PURE__*/React.createElement(GyGoodsList$1, {
15591
+ ref: goodsListRef
14313
15592
  })));
14314
15593
  };
14315
15594
  var GyGoodsModal$2 = /*#__PURE__*/forwardRef(GyGoodsModal$1);
@@ -17221,7 +18500,9 @@ var getButtonText = function getButtonText() {
17221
18500
  return '选择商品';
17222
18501
  };
17223
18502
  var GoodItem$1 = function GoodItem(props) {
17224
- var _props$value = props.value,
18503
+ var useGoodsSourceFormat = props.useGoodsSourceFormat,
18504
+ goodsSource = props.goodsSource,
18505
+ _props$value = props.value,
17225
18506
  value = _props$value === void 0 ? [] : _props$value,
17226
18507
  type = props.type,
17227
18508
  onChange = props.onChange,
@@ -17579,7 +18860,9 @@ var GoodItem$1 = function GoodItem(props) {
17579
18860
  shopList: shopList,
17580
18861
  shopId: shopId,
17581
18862
  maxLength: maxLength,
17582
- companyKey: companyKey
18863
+ companyKey: companyKey,
18864
+ goodsSource: goodsSource,
18865
+ useGoodsSourceFormat: useGoodsSourceFormat
17583
18866
  }));
17584
18867
  };
17585
18868
 
@@ -17718,7 +19001,7 @@ var BsGoods = function BsGoods(props) {
17718
19001
  }));
17719
19002
  };
17720
19003
 
17721
- var _excluded$e = ["value", "onChange", "reasonList", "disabled"];
19004
+ var _excluded$h = ["value", "onChange", "reasonList", "disabled"];
17722
19005
  var BsExchange = function BsExchange(props) {
17723
19006
  var _value$bsExchangeType4, _value$bsExchangeType5, _value$bsExchangeType6;
17724
19007
  var value = props.value,
@@ -17726,7 +19009,7 @@ var BsExchange = function BsExchange(props) {
17726
19009
  _props$reasonList = props.reasonList,
17727
19010
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17728
19011
  disabled = props.disabled,
17729
- other = _objectWithoutProperties(props, _excluded$e);
19012
+ other = _objectWithoutProperties(props, _excluded$h);
17730
19013
  var valueRef = useRef({});
17731
19014
  useEffect(function () {
17732
19015
  valueRef.current = value;
@@ -17953,7 +19236,7 @@ var BsExchange = function BsExchange(props) {
17953
19236
  }))) : null);
17954
19237
  };
17955
19238
 
17956
- var _excluded$f = ["value", "onChange", "reasonList", "disabled", "type"];
19239
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
17957
19240
  var typeMap = {
17958
19241
  BS_REISSUE_GOODS: {
17959
19242
  key: 'bsReissueGoods',
@@ -17978,7 +19261,7 @@ var BsReissue = function BsReissue(props) {
17978
19261
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17979
19262
  disabled = props.disabled,
17980
19263
  type = props.type,
17981
- other = _objectWithoutProperties(props, _excluded$f);
19264
+ other = _objectWithoutProperties(props, _excluded$i);
17982
19265
  var valueRef = useRef({});
17983
19266
  useEffect(function () {
17984
19267
  var _typeMap$type;
@@ -18094,14 +19377,14 @@ var BsReissue = function BsReissue(props) {
18094
19377
  })));
18095
19378
  };
18096
19379
 
18097
- var _excluded$g = ["value", "onChange", "reasonList", "disabled"];
19380
+ var _excluded$j = ["value", "onChange", "reasonList", "disabled"];
18098
19381
  var BsReturnGoods = function BsReturnGoods(props) {
18099
19382
  var value = props.value,
18100
19383
  onChange = props.onChange,
18101
19384
  _props$reasonList = props.reasonList,
18102
19385
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18103
19386
  disabled = props.disabled,
18104
- other = _objectWithoutProperties(props, _excluded$g);
19387
+ other = _objectWithoutProperties(props, _excluded$j);
18105
19388
  var valueRef = useRef({});
18106
19389
  useEffect(function () {
18107
19390
  pubsub.subscribe('returnSelectList', function (_, data) {
@@ -18493,7 +19776,7 @@ var kmUtils = {
18493
19776
  getOrderListSingleton: getOrderListSingleton$2
18494
19777
  };
18495
19778
 
18496
- var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
19779
+ var _excluded$k = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
18497
19780
  var columnsMap = {
18498
19781
  BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
18499
19782
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
@@ -18747,7 +20030,7 @@ var index$3 = (function (props) {
18747
20030
  vipCode = _ref10.vipCode,
18748
20031
  shopCode = _ref10.shopCode,
18749
20032
  cancel = _ref10.cancel,
18750
- rest = _objectWithoutProperties(_ref10, _excluded$h);
20033
+ rest = _objectWithoutProperties(_ref10, _excluded$k);
18751
20034
  return _objectSpread2(_objectSpread2({}, rest), {}, {
18752
20035
  billNo: billNo,
18753
20036
  billType: billType,
@@ -18961,7 +20244,7 @@ var WlnGoods = function WlnGoods(props) {
18961
20244
  }));
18962
20245
  };
18963
20246
 
18964
- var componentMap$1 = {
20247
+ var componentMap$2 = {
18965
20248
  WDT_GOODS: {
18966
20249
  type: 'wdt',
18967
20250
  key: 'wdtGoods',
@@ -19103,7 +20386,7 @@ var CommonGoods = function CommonGoods(props) {
19103
20386
  // 合并单订单会包含","
19104
20387
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
19105
20388
  var _order$componentMap$c;
19106
- return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$1[compType].orderNo]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.includes(',');
20389
+ return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$2[compType].orderNo]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.includes(',');
19107
20390
  });
19108
20391
  var getOrderFlag = useRef(false);
19109
20392
  var _useState = useState(false),
@@ -19146,7 +20429,7 @@ var CommonGoods = function CommonGoods(props) {
19146
20429
  };
19147
20430
  }();
19148
20431
  useEffect(function () {
19149
- tokens.current = [pubsub.subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
20432
+ tokens.current = [pubsub.subscribe(componentMap$2[compType].eventNameMap.type, function (type, data) {
19150
20433
  if (disabled) return;
19151
20434
  // console.log(type, data);
19152
20435
  withInfo.current = {
@@ -19157,13 +20440,13 @@ var CommonGoods = function CommonGoods(props) {
19157
20440
  setTableSelect(['2', '4'].includes(data.val));
19158
20441
  if (['1', '3'].includes(data.val)) {
19159
20442
  var _valueRef$current2, _valueRef$current3;
19160
- pubsub.publish(componentMap$1[compType].eventNameMap.selectListReturn, {
19161
- list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2[componentMap$1[compType].key]) || []),
20443
+ pubsub.publish(componentMap$2[compType].eventNameMap.selectListReturn, {
20444
+ list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2[componentMap$2[compType].key]) || []),
19162
20445
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3.shopCode,
19163
20446
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
19164
20447
  });
19165
20448
  }
19166
- }), pubsub.subscribe(componentMap$1[compType].eventNameMap.reissueType, function (type, data) {
20449
+ }), pubsub.subscribe(componentMap$2[compType].eventNameMap.reissueType, function (type, data) {
19167
20450
  if (disabled) return;
19168
20451
  withInfo.current = {
19169
20452
  type: type,
@@ -19173,13 +20456,13 @@ var CommonGoods = function CommonGoods(props) {
19173
20456
  setTableSelect(['2', '4'].includes(data.val));
19174
20457
  if (['1', '3'].includes(data.val)) {
19175
20458
  var _valueRef$current4, _valueRef$current5;
19176
- pubsub.publish(componentMap$1[compType].eventNameMap.reissueSelectListReturn, {
19177
- list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4[componentMap$1[compType].key]) || []),
20459
+ pubsub.publish(componentMap$2[compType].eventNameMap.reissueSelectListReturn, {
20460
+ list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4[componentMap$2[compType].key]) || []),
19178
20461
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5.shopCode,
19179
20462
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
19180
20463
  });
19181
20464
  }
19182
- }), pubsub.subscribe(componentMap$1[compType].eventNameMap.returnType, function (type, data) {
20465
+ }), pubsub.subscribe(componentMap$2[compType].eventNameMap.returnType, function (type, data) {
19183
20466
  if (disabled) return;
19184
20467
  withInfo.current = {
19185
20468
  type: type,
@@ -19189,13 +20472,13 @@ var CommonGoods = function CommonGoods(props) {
19189
20472
  setTableSelect(['2', '4'].includes(data.val));
19190
20473
  if (['1', '3'].includes(data.val)) {
19191
20474
  var _valueRef$current6, _valueRef$current7;
19192
- pubsub.publish(componentMap$1[compType].eventNameMap.returnSelectListReturn, {
19193
- list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6[componentMap$1[compType].key]) || []),
20475
+ pubsub.publish(componentMap$2[compType].eventNameMap.returnSelectListReturn, {
20476
+ list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6[componentMap$2[compType].key]) || []),
19194
20477
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
19195
20478
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
19196
20479
  });
19197
20480
  }
19198
- }), pubsub.subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
20481
+ }), pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
19199
20482
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
19200
20483
  shopCode: data.shopCode
19201
20484
  }));
@@ -19216,8 +20499,8 @@ var CommonGoods = function CommonGoods(props) {
19216
20499
  // type: componentMap[compType].eventNameMap.selectList,
19217
20500
  // returnType: componentMap[compType].eventNameMap.returnSelectList,
19218
20501
  // reissueType: componentMap[compType].eventNameMap.reissueSelectList,
19219
- type: componentMap$1[compType].eventNameMap.selectList
19220
- }, _defineProperty(_typeMap, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList), _defineProperty(_typeMap, "".concat(componentMap$1[compType].type, "ReturnType"), componentMap$1[compType].eventNameMap.returnSelectList), _typeMap);
20502
+ type: componentMap$2[compType].eventNameMap.selectList
20503
+ }, _defineProperty(_typeMap, "".concat(componentMap$2[compType].type, "ReissueType"), componentMap$2[compType].eventNameMap.reissueSelectList), _defineProperty(_typeMap, "".concat(componentMap$2[compType].type, "ReturnType"), componentMap$2[compType].eventNameMap.returnSelectList), _typeMap);
19221
20504
  var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
19222
20505
  // console.log('onSelect', type, withInfo.current, newList);
19223
20506
  pubsub.publish(type, {
@@ -19232,38 +20515,38 @@ var CommonGoods = function CommonGoods(props) {
19232
20515
  };
19233
20516
  var _onDelete = function onDelete(item) {
19234
20517
  var deleteId = item === null || item === void 0 ? void 0 : item.specId;
19235
- pubsub.publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
19236
- pubsub.publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
19237
- pubsub.publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
19238
- pubsub.publish(componentMap$1[compType].eventNameMap.exchangeDeleteGood, deleteId);
20518
+ pubsub.publish(componentMap$2[compType].eventNameMap.deleteGood, deleteId);
20519
+ pubsub.publish(componentMap$2[compType].eventNameMap.reissueDeleteGood, deleteId);
20520
+ pubsub.publish(componentMap$2[compType].eventNameMap.returnDeleteGood, deleteId);
20521
+ pubsub.publish(componentMap$2[compType].eventNameMap.exchangeDeleteGood, deleteId);
19239
20522
  };
19240
20523
  var changeHandle = function changeHandle(list) {
19241
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
20524
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$2[compType].key, list)));
19242
20525
  };
19243
20526
  var handleModeChange = function handleModeChange(isStrict) {
19244
20527
  // isStrict 是否只展示当前平台订单商品
19245
20528
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({
19246
20529
  isStrict: isStrict
19247
- }, componentMap$1[compType].key, getGoodDetails({
20530
+ }, componentMap$2[compType].key, getGoodDetails({
19248
20531
  mode: isStrict
19249
20532
  }))));
19250
20533
  };
19251
20534
  var getGoodDetails = function getGoodDetails(_ref2) {
19252
20535
  var mode = _ref2.mode;
19253
- var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
20536
+ var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
19254
20537
  var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.orders) || [], {
19255
20538
  orderBackGoodsLevel: props.orderBackGoodsLevel
19256
20539
  });
19257
20540
  var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
19258
20541
  return mode ? goodDetails.filter(function (goodItem) {
19259
20542
  var _componentMap$compTyp;
19260
- return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp = componentMap$1[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.goodDetailOrderNo]) === orderNo;
20543
+ return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp = componentMap$2[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.goodDetailOrderNo]) === orderNo;
19261
20544
  }) : goodDetails;
19262
20545
  };
19263
20546
  // 找到该订单号下所有商品
19264
20547
  var getAllTradeGoodsDetails = function getAllTradeGoodsDetails(_ref3) {
19265
20548
  var mode = _ref3.mode;
19266
- var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
20549
+ var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
19267
20550
  console.log('value?.allOrders', value, (value === null || value === void 0 ? void 0 : value.allOrders) || []);
19268
20551
  var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.allOrders) || [], {
19269
20552
  orderBackGoodsLevel: props.orderBackGoodsLevel
@@ -19271,7 +20554,7 @@ var CommonGoods = function CommonGoods(props) {
19271
20554
  var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
19272
20555
  return mode ? goodDetails.filter(function (goodItem) {
19273
20556
  var _componentMap$compTyp2;
19274
- return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp2 = componentMap$1[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.goodDetailOrderNo]) === orderNo;
20557
+ return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp2 = componentMap$2[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.goodDetailOrderNo]) === orderNo;
19275
20558
  }) : goodDetails;
19276
20559
  };
19277
20560
  var selectedGoodsChange = useCallback(function (skuList) {
@@ -19283,16 +20566,16 @@ var CommonGoods = function CommonGoods(props) {
19283
20566
  mode: isStrict
19284
20567
  }) || [];
19285
20568
  // 当前选中的所有商品【包含了原订单+商品库】
19286
- var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(componentMap$1 === null || componentMap$1 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$1[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.key)]) || [];
19287
- newValue["".concat(componentMap$1 === null || componentMap$1 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$1[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20569
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$2[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.key)]) || [];
20570
+ newValue["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$2[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19288
20571
  return skuList.includes(item.uuid);
19289
20572
  });
19290
20573
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19291
- }, [value === null || value === void 0 ? void 0 : value["".concat(componentMap$1 === null || componentMap$1 === void 0 ? void 0 : (_componentMap$compTyp5 = componentMap$1[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.key)], value === null || value === void 0 ? void 0 : value.isStrict]);
20574
+ }, [value === null || value === void 0 ? void 0 : value["".concat(componentMap$2 === null || componentMap$2 === void 0 ? void 0 : (_componentMap$compTyp5 = componentMap$2[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.key)], value === null || value === void 0 ? void 0 : value.isStrict]);
19292
20575
  // 商品信息组件暂存后 重新编辑,此时需要重新获取订单下所有系统自订单的商品信息
19293
20576
  var getDataSourceAsync = function getDataSourceAsync() {
19294
20577
  var _componentMap$compTyp6;
19295
- return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$compTyp6 = componentMap$1[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.getOrderList(value === null || value === void 0 ? void 0 : value.orderNo).then(function (data) {
20578
+ return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$compTyp6 = componentMap$2[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.getOrderList(value === null || value === void 0 ? void 0 : value.orderNo).then(function (data) {
19296
20579
  var list = processAllOrders({
19297
20580
  data: data,
19298
20581
  orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
@@ -19304,10 +20587,10 @@ var CommonGoods = function CommonGoods(props) {
19304
20587
  }) : Promise.resolve();
19305
20588
  };
19306
20589
  return /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
19307
- key: componentMap$1[compType].key
20590
+ key: componentMap$2[compType].key
19308
20591
  }, props), {}, {
19309
20592
  disabled: disabled,
19310
- value: value === null || value === void 0 ? void 0 : value[componentMap$1[compType].key],
20593
+ value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].key],
19311
20594
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
19312
20595
  tableSelect: ['2', '4'].includes(withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current3 = withInfo.current) === null || _withInfo$current3 === void 0 ? void 0 : _withInfo$current3.val),
19313
20596
  selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
@@ -19335,7 +20618,7 @@ var CommonGoods = function CommonGoods(props) {
19335
20618
  }));
19336
20619
  };
19337
20620
 
19338
- var componentMap$2 = {
20621
+ var componentMap$3 = {
19339
20622
  WDT_RETURN_GOODS: {
19340
20623
  type: 'wdt',
19341
20624
  valueKey: 'wdtReturnGoods',
@@ -19363,10 +20646,10 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19363
20646
  isSettingConfig = props.isSettingConfig;
19364
20647
  var valueRef = useRef({});
19365
20648
  useEffect(function () {
19366
- var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
20649
+ var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.exchangeCopyGood, function () {
19367
20650
  var _valueRef$current, _valueRef$current2;
19368
- pubsub.publish(componentMap$2[compType].eventNameMap.exchangeBackCopyGood, {
19369
- list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[componentMap$2[compType].valueKey]) || []),
20651
+ pubsub.publish(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, {
20652
+ list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[componentMap$3[compType].valueKey]) || []),
19370
20653
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
19371
20654
  });
19372
20655
  });
@@ -19375,13 +20658,13 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19375
20658
  };
19376
20659
  }, []);
19377
20660
  useEffect(function () {
19378
- var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.returnSelectList, function (_, data) {
20661
+ var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.returnSelectList, function (_, data) {
19379
20662
  if (disabled) return;
19380
20663
  var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
19381
20664
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
19382
20665
  });
19383
20666
  if (compType === 'WDT_RETURN_GOODS') {
19384
- newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
20667
+ newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
19385
20668
  if (typeof item.type === 'undefined') {
19386
20669
  item.type = '1';
19387
20670
  }
@@ -19394,7 +20677,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19394
20677
  return item;
19395
20678
  });
19396
20679
  } else {
19397
- newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
20680
+ newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
19398
20681
  }
19399
20682
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19400
20683
  });
@@ -19403,13 +20686,13 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19403
20686
  };
19404
20687
  }, []);
19405
20688
  useEffect(function () {
19406
- var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.returnSelectListReturn, function (_, data) {
20689
+ var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.returnSelectListReturn, function (_, data) {
19407
20690
  if (disabled) return;
19408
20691
  var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
19409
20692
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
19410
20693
  });
19411
20694
  if (compType === 'WDT_RETURN_GOODS') {
19412
- newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
20695
+ newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
19413
20696
  if (typeof item.type === 'undefined') {
19414
20697
  item.type = '1';
19415
20698
  }
@@ -19422,7 +20705,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19422
20705
  return item;
19423
20706
  });
19424
20707
  } else {
19425
- newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
20708
+ newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
19426
20709
  }
19427
20710
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19428
20711
  });
@@ -19432,17 +20715,17 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19432
20715
  }, []);
19433
20716
  useEffect(function () {
19434
20717
  valueRef.current = value;
19435
- pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.returnDeleteGood, function (_, data) {
20718
+ pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.returnDeleteGood, function (_, data) {
19436
20719
  if (disabled) return;
19437
20720
  if (value) {
19438
20721
  var newValue = _objectSpread2({}, value);
19439
- newValue[componentMap$2[compType].valueKey] = newValue[componentMap$2[compType].valueKey].filter(function (item) {
20722
+ newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
19440
20723
  return item.sku !== data;
19441
20724
  });
19442
20725
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19443
20726
  }
19444
20727
  });
19445
- pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
20728
+ pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
19446
20729
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
19447
20730
  shopCode: data.shopCode
19448
20731
  }));
@@ -19450,20 +20733,20 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19450
20733
  }, [value, disabled]);
19451
20734
  var changeTypeHandle = function changeTypeHandle(val) {
19452
20735
  var newValue = _objectSpread2({}, value);
19453
- newValue[componentMap$2[compType].returnTypeKey] = val;
19454
- newValue[componentMap$2[compType].valueKey] = [];
20736
+ newValue[componentMap$3[compType].returnTypeKey] = val;
20737
+ newValue[componentMap$3[compType].valueKey] = [];
19455
20738
  if (isSettingConfig || ['2'].includes(val[0])) {
19456
20739
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19457
20740
  valueRef.current = newValue;
19458
20741
  }
19459
- pubsub.publish(componentMap$2[compType].eventNameMap.returnType, {
20742
+ pubsub.publish(componentMap$3[compType].eventNameMap.returnType, {
19460
20743
  val: val[0],
19461
20744
  goodValue: newValue
19462
20745
  });
19463
20746
  };
19464
20747
  var changeGoodHandle = function changeGoodHandle(val) {
19465
20748
  var newValue = _objectSpread2({}, value);
19466
- newValue[componentMap$2[compType].valueKey] = val;
20749
+ newValue[componentMap$3[compType].valueKey] = val;
19467
20750
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19468
20751
  };
19469
20752
  //显示选择商品按钮 原单换不显示选择商品
@@ -19477,25 +20760,25 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
19477
20760
  disabled: isSettingConfig ? !isSettingConfig : disabled,
19478
20761
  allowClear: false,
19479
20762
  options: reasonList,
19480
- value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
20763
+ value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].returnTypeKey],
19481
20764
  onChange: function onChange(val) {
19482
20765
  return changeTypeHandle(val);
19483
20766
  }
19484
20767
  }), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
19485
- key: componentMap$2[compType].type
20768
+ key: componentMap$3[compType].type
19486
20769
  }, props), {}, {
19487
20770
  disabled: disabled,
19488
20771
  canUpdateNumber: true,
19489
20772
  showChangeBtn: false,
19490
20773
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
19491
- value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].valueKey],
20774
+ value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
19492
20775
  onChange: function onChange(val) {
19493
20776
  return changeGoodHandle(val);
19494
20777
  }
19495
20778
  })));
19496
20779
  };
19497
20780
 
19498
- var componentMap$3 = {
20781
+ var componentMap$4 = {
19499
20782
  WDT_EXCHANGE_GOODS: {
19500
20783
  type: 'wdt',
19501
20784
  valueKey: 'wdtExchangeGoods',
@@ -19535,7 +20818,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
19535
20818
  onChange = props.onChange,
19536
20819
  disabled = props.disabled,
19537
20820
  compType = props.type;
19538
- var uniqueKey = (componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp = componentMap$3[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.skuIdKey) || 'uuid';
20821
+ 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';
19539
20822
  var valueRef = useRef({});
19540
20823
  // PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
19541
20824
  var _useState = useState(false),
@@ -19547,13 +20830,13 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
19547
20830
  originDataSource = _useState4[0],
19548
20831
  setOriginDataSource = _useState4[1];
19549
20832
  useEffect(function () {
19550
- var subscription = componentMap$3[compType].eventNameMap.exchangeBackCopyGood && pubsub.subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
20833
+ var subscription = componentMap$4[compType].eventNameMap.exchangeBackCopyGood && pubsub.subscribe(componentMap$4[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
19551
20834
  if (disabled) return;
19552
20835
  var newValue = {
19553
20836
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
19554
20837
  };
19555
20838
  if (compType === 'WDT_EXCHANGE_GOODS') {
19556
- newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
20839
+ newValue[componentMap$4[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
19557
20840
  if (typeof item.type === 'undefined') {
19558
20841
  item.type = '1';
19559
20842
  }
@@ -19564,7 +20847,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
19564
20847
  return item;
19565
20848
  });
19566
20849
  } else {
19567
- newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
20850
+ newValue[componentMap$4[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
19568
20851
  }
19569
20852
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19570
20853
  });
@@ -19583,12 +20866,12 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
19583
20866
  return item;
19584
20867
  });
19585
20868
  }
19586
- newValue[componentMap$3[compType].valueKey] = val;
20869
+ newValue[componentMap$4[compType].valueKey] = val;
19587
20870
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19588
20871
  };
19589
20872
  var copyGoods = function copyGoods() {
19590
20873
  var copyHandle = function copyHandle() {
19591
- pubsub.publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, compType);
20874
+ pubsub.publish(componentMap$4[compType].eventNameMap.exchangeCopyGood, compType);
19592
20875
  };
19593
20876
  return /*#__PURE__*/React.createElement(Button, {
19594
20877
  type: "link",
@@ -19601,50 +20884,50 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
19601
20884
  // 原订单商品
19602
20885
  var originTradeGoodList = originDataSource || [];
19603
20886
  // 当前选中的所有商品【包含了原订单+商品库】
19604
- var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value[componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp2 = componentMap$3[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.valueKey]) || [];
19605
- newValue[componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$3[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) {
20887
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value[componentMap$4 === null || componentMap$4 === void 0 ? void 0 : (_componentMap$compTyp2 = componentMap$4[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.valueKey]) || [];
20888
+ 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) {
19606
20889
  return skuList.includes(item[uniqueKey]);
19607
20890
  });
19608
20891
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19609
- }, [value === null || value === void 0 ? void 0 : value[componentMap$3 === null || componentMap$3 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$3[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.valueKey], isStrict, originDataSource]);
20892
+ }, [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]);
19610
20893
  var getGoodDetails = function getGoodDetails(_ref) {
19611
20894
  var _componentMap$compTyp5, _componentMap$compTyp6, _order$componentMap$c, _componentMap$compTyp7;
19612
20895
  var returnGoodsValue = _ref.returnGoodsValue,
19613
20896
  mode = _ref.mode,
19614
20897
  sysOrderNo = _ref.sysOrderNo;
19615
- var systemOrder = returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp5 = componentMap$3[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.systemOrder];
19616
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp6 = componentMap$3[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.systemOrderNo];
20898
+ 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];
20899
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp6 = componentMap$4[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.systemOrderNo];
19617
20900
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
19618
- return order[componentMap$3[compType].oIdKey] === systemOrderNo;
20901
+ return order[componentMap$4[compType].oIdKey] === systemOrderNo;
19619
20902
  });
19620
- var goodDetails = jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$3[compType].goodDetailsKey]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.length) ? (_componentMap$compTyp7 = componentMap$3[compType]) === null || _componentMap$compTyp7 === void 0 ? void 0 : _componentMap$compTyp7.updateGoodsHandle([order], true) : []);
20903
+ 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], true) : []);
19621
20904
  var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
19622
20905
  return mode ? goodDetails.filter(function (goodItem) {
19623
- return !orderNo || goodItem[componentMap$3[compType].outerOiIdKey] === orderNo;
20906
+ return !orderNo || goodItem[componentMap$4[compType].outerOiIdKey] === orderNo;
19624
20907
  }) : goodDetails;
19625
20908
  };
19626
20909
  var getDataSourceAsync = function getDataSourceAsync() {
19627
20910
  return new Promise(function (resolve) {
19628
- pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
20911
+ pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
19629
20912
  resolve(data);
19630
20913
  setOriginDataSource(getGoodDetails({
19631
20914
  returnGoodsValue: data,
19632
20915
  mode: isStrict
19633
20916
  }));
19634
20917
  });
19635
- pubsub.publish(componentMap$3[compType].eventNameMap.returnGoodsSysorder, compType);
20918
+ pubsub.publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
19636
20919
  });
19637
20920
  };
19638
20921
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
19639
- key: componentMap$3[compType].type
20922
+ key: componentMap$4[compType].type
19640
20923
  }, props), {}, {
19641
20924
  disabled: disabled,
19642
20925
  canUpdateNumber: true,
19643
20926
  showChangeBtn: true,
19644
20927
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
19645
- value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
20928
+ value: value === null || value === void 0 ? void 0 : value[componentMap$4[compType].valueKey],
19646
20929
  otherOperations: copyGoods(),
19647
- tradeGoods: componentMap$3[compType].showChooseTradeGoodsBtn ? {
20930
+ tradeGoods: componentMap$4[compType].showChooseTradeGoodsBtn ? {
19648
20931
  uniqueKey: uniqueKey,
19649
20932
  originDataSource: originDataSource,
19650
20933
  getDataSourceAsync: getDataSourceAsync,
@@ -19656,7 +20939,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
19656
20939
  })));
19657
20940
  };
19658
20941
 
19659
- var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
20942
+ var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
19660
20943
  var typeMap$1 = {
19661
20944
  WDT_REISSUE_GOODS: {
19662
20945
  key: 'wdtReissueGoods',
@@ -19685,7 +20968,7 @@ var wdtReissue = function wdtReissue(props) {
19685
20968
  disabled = props.disabled,
19686
20969
  type = props.type,
19687
20970
  isSettingConfig = props.isSettingConfig,
19688
- other = _objectWithoutProperties(props, _excluded$i);
20971
+ other = _objectWithoutProperties(props, _excluded$l);
19689
20972
  var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
19690
20973
  var _order$srcTid;
19691
20974
  return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
@@ -19929,7 +21212,7 @@ var wdtReissue = function wdtReissue(props) {
19929
21212
  })));
19930
21213
  };
19931
21214
 
19932
- var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
21215
+ var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
19933
21216
  var typeMap$2 = {
19934
21217
  JST_REISSUE_GOODS: {
19935
21218
  compType: '补发',
@@ -19997,7 +21280,7 @@ var PublicReissue = function PublicReissue(props) {
19997
21280
  disabled = props.disabled,
19998
21281
  type = props.type,
19999
21282
  isSettingConfig = props.isSettingConfig,
20000
- other = _objectWithoutProperties(props, _excluded$j);
21283
+ other = _objectWithoutProperties(props, _excluded$m);
20001
21284
  var getOrderFlag = useRef(false);
20002
21285
  var _useState = useState(false),
20003
21286
  _useState2 = _slicedToArray(_useState, 2),
@@ -20264,8 +21547,8 @@ var PublicReissue = function PublicReissue(props) {
20264
21547
  })));
20265
21548
  };
20266
21549
 
20267
- var css_248z$b = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
20268
- styleInject(css_248z$b);
21550
+ var css_248z$d = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
21551
+ styleInject(css_248z$d);
20269
21552
 
20270
21553
  var TabPane$1 = Tabs.TabPane;
20271
21554
  var Option$2 = Select.Option;
@@ -20740,12 +22023,12 @@ var Goods$1 = function Goods(props, ref) {
20740
22023
  };
20741
22024
  var index$4 = /*#__PURE__*/forwardRef(Goods$1);
20742
22025
 
20743
- var _excluded$k = ["onChange", "value", "failValue"];
22026
+ var _excluded$n = ["onChange", "value", "failValue"];
20744
22027
  function CommonStatus(props) {
20745
22028
  var onChange = props.onChange,
20746
22029
  value = props.value,
20747
22030
  failValue = props.failValue,
20748
- other = _objectWithoutProperties(props, _excluded$k);
22031
+ other = _objectWithoutProperties(props, _excluded$n);
20749
22032
  var changeHandle = function changeHandle(val) {
20750
22033
  onChange === null || onChange === void 0 ? void 0 : onChange({
20751
22034
  status: val,
@@ -20884,7 +22167,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
20884
22167
  })) : null) : null);
20885
22168
  };
20886
22169
 
20887
- var _excluded$l = ["value", "onChange", "disabled", "failValue", "type"];
22170
+ var _excluded$o = ["value", "onChange", "disabled", "failValue", "type"];
20888
22171
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
20889
22172
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
20890
22173
  var _props$value = props.value,
@@ -20894,7 +22177,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
20894
22177
  failValue = props.failValue,
20895
22178
  _props$type = props.type,
20896
22179
  type = _props$type === void 0 ? 1 : _props$type,
20897
- other = _objectWithoutProperties(props, _excluded$l);
22180
+ other = _objectWithoutProperties(props, _excluded$o);
20898
22181
  var _useState = useState(0),
20899
22182
  _useState2 = _slicedToArray(_useState, 2),
20900
22183
  changeIndex = _useState2[0],
@@ -20960,7 +22243,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
20960
22243
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
20961
22244
  };
20962
22245
 
20963
- var _excluded$m = ["value", "onChange", "disabled", "failValue", "type"];
22246
+ var _excluded$p = ["value", "onChange", "disabled", "failValue", "type"];
20964
22247
  var MsgStatus = function MsgStatus(props) {
20965
22248
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
20966
22249
  var _props$value = props.value,
@@ -20970,7 +22253,7 @@ var MsgStatus = function MsgStatus(props) {
20970
22253
  failValue = props.failValue,
20971
22254
  _props$type = props.type,
20972
22255
  type = _props$type === void 0 ? 1 : _props$type,
20973
- other = _objectWithoutProperties(props, _excluded$m);
22256
+ other = _objectWithoutProperties(props, _excluded$p);
20974
22257
  var _useState = useState(0),
20975
22258
  _useState2 = _slicedToArray(_useState, 2),
20976
22259
  changeIndex = _useState2[0],
@@ -21021,64 +22304,6 @@ var MsgStatus = function MsgStatus(props) {
21021
22304
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
21022
22305
  };
21023
22306
 
21024
- var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
21025
- var AsyncSelect = function AsyncSelect(props) {
21026
- var mode = props.mode,
21027
- maxSelectCount = props.maxSelectCount,
21028
- _props$showOnly = props.showOnly,
21029
- showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
21030
- getOptionsAsync = props.getOptionsAsync,
21031
- _onChange = props.onChange,
21032
- otherProps = _objectWithoutProperties(props, _excluded$n);
21033
- var _React$useState = React.useState([]),
21034
- _React$useState2 = _slicedToArray(_React$useState, 2),
21035
- data = _React$useState2[0],
21036
- setData = _React$useState2[1];
21037
- React.useEffect(function () {
21038
- getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
21039
- setData(list);
21040
- });
21041
- }, []);
21042
- var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
21043
- var getValueString = function getValueString(value) {
21044
- var list = options;
21045
- if (mode === 'multiple' && Array.isArray(value)) {
21046
- var _list$filter$map$join;
21047
- return (_list$filter$map$join = list.filter(function (item) {
21048
- return value.includes(item.value);
21049
- }).map(function (item) {
21050
- return item.label;
21051
- }).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
21052
- } else {
21053
- var selectedItem = list.find(function (item) {
21054
- return item.value === value;
21055
- });
21056
- return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
21057
- }
21058
- };
21059
- if (showOnly) {
21060
- return getValueString(props.value);
21061
- }
21062
- return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
21063
- showArrow: true,
21064
- showSearch: true,
21065
- filterOption: function filterOption(input, option) {
21066
- return option.label.includes(input);
21067
- },
21068
- notFoundContent: null
21069
- }, otherProps), {}, {
21070
- options: options,
21071
- mode: mode,
21072
- onChange: function onChange(value, option) {
21073
- if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
21074
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
21075
- } else {
21076
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
21077
- }
21078
- }
21079
- }));
21080
- };
21081
-
21082
22307
  var CalculationInput = function CalculationInput(props) {
21083
22308
  var _props$config = props.config,
21084
22309
  config = _props$config === void 0 ? {} : _props$config;
@@ -21097,7 +22322,7 @@ var CalculationInput = function CalculationInput(props) {
21097
22322
  }, config === null || config === void 0 ? void 0 : config.unit));
21098
22323
  };
21099
22324
 
21100
- var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
22325
+ var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
21101
22326
  var typeMap$3 = {
21102
22327
  BS_E3_REISSUE_GOODS: {
21103
22328
  key: 'bsE3ReissueGoods',
@@ -21116,7 +22341,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
21116
22341
  disabled = props.disabled,
21117
22342
  type = props.type,
21118
22343
  isSettingConfig = props.isSettingConfig,
21119
- other = _objectWithoutProperties(props, _excluded$o);
22344
+ other = _objectWithoutProperties(props, _excluded$q);
21120
22345
  var getOrderFlag = useRef(false);
21121
22346
  var valueRef = useRef(null);
21122
22347
  var _useState = useState(false),
@@ -21336,11 +22561,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
21336
22561
  })));
21337
22562
  };
21338
22563
 
21339
- var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
22564
+ var css_248z$e = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
21340
22565
  var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
21341
- styleInject(css_248z$c);
22566
+ styleInject(css_248z$e);
21342
22567
 
21343
- var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
22568
+ var _excluded$r = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
21344
22569
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
21345
22570
  var typeMap$4 = {
21346
22571
  GY_REISSUE_GOODS: {
@@ -21370,7 +22595,7 @@ var GyReissue = function GyReissue(props) {
21370
22595
  disabled = props.disabled,
21371
22596
  type = props.type,
21372
22597
  isSettingConfig = props.isSettingConfig,
21373
- other = _objectWithoutProperties(props, _excluded$p);
22598
+ other = _objectWithoutProperties(props, _excluded$r);
21374
22599
  // const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
21375
22600
  // order?.platformCode?.includes(';'),
21376
22601
  // );
@@ -21647,7 +22872,7 @@ var GyReissue = function GyReissue(props) {
21647
22872
  })));
21648
22873
  };
21649
22874
 
21650
- var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
22875
+ var _excluded$s = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
21651
22876
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
21652
22877
  var typeMap$5 = {
21653
22878
  GY_RETURN_GOODS: {
@@ -21677,7 +22902,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
21677
22902
  disabled = props.disabled,
21678
22903
  type = props.type,
21679
22904
  isSettingConfig = props.isSettingConfig,
21680
- other = _objectWithoutProperties(props, _excluded$q);
22905
+ other = _objectWithoutProperties(props, _excluded$s);
21681
22906
  var valueRef = useRef({});
21682
22907
  var getOrderFlag = useRef(false);
21683
22908
  var _useState = useState(false),
@@ -21942,11 +23167,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
21942
23167
  })));
21943
23168
  };
21944
23169
 
21945
- var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
23170
+ var css_248z$f = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
21946
23171
  var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
21947
- styleInject(css_248z$d);
23172
+ styleInject(css_248z$f);
21948
23173
 
21949
- var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
23174
+ var _excluded$t = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
21950
23175
  var Dragger$1 = Upload.Dragger;
21951
23176
  var fn$4 = function fn() {
21952
23177
  return void 0;
@@ -21969,7 +23194,7 @@ var KmVideo = function KmVideo(_ref) {
21969
23194
  canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
21970
23195
  _ref$actionUrl = _ref.actionUrl,
21971
23196
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
21972
- resetProps = _objectWithoutProperties(_ref, _excluded$r);
23197
+ resetProps = _objectWithoutProperties(_ref, _excluded$t);
21973
23198
  var _useState = useState(false),
21974
23199
  _useState2 = _slicedToArray(_useState, 2),
21975
23200
  visible = _useState2[0],