@kmkf-fe-packages/basic-components 2.2.10 → 2.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12,6 +12,8 @@ var lodash = require('lodash');
12
12
  var ahooks = require('ahooks');
13
13
  var zhCN = require('antd/lib/locale/zh_CN');
14
14
  var pubsub = require('pubsub-js');
15
+ var aliReactTable = require('ali-react-table');
16
+ var zh_CN = require('antd/lib/locale-provider/zh_CN');
15
17
  var BigNumber = require('bignumber.js');
16
18
 
17
19
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -20,6 +22,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
20
22
  var request__default = /*#__PURE__*/_interopDefaultLegacy(request);
21
23
  var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
22
24
  var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
25
+ var zh_CN__default = /*#__PURE__*/_interopDefaultLegacy(zh_CN);
23
26
  var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
24
27
 
25
28
  function _iterableToArrayLimit(arr, i) {
@@ -7237,7 +7240,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
7237
7240
  var _ref$maxCount = _ref.maxCount,
7238
7241
  maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
7239
7242
  _ref$maxSize = _ref.maxSize,
7240
- maxSize = _ref$maxSize === void 0 ? 100 : _ref$maxSize,
7243
+ maxSize = _ref$maxSize === void 0 ? 200 : _ref$maxSize,
7241
7244
  _ref$onChange = _ref.onChange,
7242
7245
  onChange = _ref$onChange === void 0 ? fn$3 : _ref$onChange,
7243
7246
  _ref$value = _ref.value,
@@ -11820,6 +11823,7 @@ var jstGoods = function jstGoods(props) {
11820
11823
  var _props$value = props.value,
11821
11824
  value = _props$value === void 0 ? [] : _props$value,
11822
11825
  onChange = props.onChange,
11826
+ _onBlur = props.onBlur,
11823
11827
  disabled = props.disabled,
11824
11828
  _props$type = props.type,
11825
11829
  type = _props$type === void 0 ? 1 : _props$type,
@@ -11949,6 +11953,9 @@ var jstGoods = function jstGoods(props) {
11949
11953
  onChange: function onChange(e) {
11950
11954
  return changeInputHandle(e.target.value, 'logisticsCode');
11951
11955
  },
11956
+ onBlur: function onBlur(e) {
11957
+ return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value);
11958
+ },
11952
11959
  value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.logisticsCode
11953
11960
  }) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11954
11961
  disabled: disabled,
@@ -13429,6 +13436,15 @@ var GoodList = function GoodList(props, ref) {
13429
13436
  };
13430
13437
  var WdtGoodList = /*#__PURE__*/React.forwardRef(GoodList);
13431
13438
 
13439
+ // interface GoodModelProps {
13440
+ // shopId: number | string;
13441
+ // maxLength: number;
13442
+ // shopList: any[];
13443
+ // width?: string | number;
13444
+ // shopCode?: string;
13445
+ // companyKey: string;
13446
+ // onSubmit: (...args: any[]) => any;
13447
+ // }
13432
13448
  var GoodsModal$3 = function GoodsModal(props, ref) {
13433
13449
  React.useImperativeHandle(ref, function () {
13434
13450
  return {
@@ -13911,6 +13927,15 @@ var GoodList$2 = function GoodList(props, ref) {
13911
13927
  };
13912
13928
  var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$2);
13913
13929
 
13930
+ // interface GoodModelProps {
13931
+ // shopId: number | string;
13932
+ // maxLength: number;
13933
+ // shopList: any[];
13934
+ // width?: string | number;
13935
+ // shopCode?: string;
13936
+ // companyKey: string;
13937
+ // onSubmit: (...args: any[]) => any;
13938
+ // }
13914
13939
  var GoodsModal$4 = function GoodsModal(props, ref) {
13915
13940
  React.useImperativeHandle(ref, function () {
13916
13941
  return {
@@ -14264,62 +14289,1290 @@ var GoodList$4 = function GoodList(props, ref) {
14264
14289
  return selectList;
14265
14290
  }
14266
14291
  };
14267
- });
14268
- var _Form$useForm = antd.Form.useForm(),
14269
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
14270
- form = _Form$useForm2[0];
14271
- var _useAntdTable = ahooks.useAntdTable(getTableData$4, {
14272
- defaultPageSize: 10,
14273
- form: form
14274
- }),
14275
- tableProps = _useAntdTable.tableProps,
14276
- search = _useAntdTable.search,
14277
- params = _useAntdTable.params;
14278
- var submit = search.submit,
14279
- reset = search.reset;
14280
- var rowSelection = {
14281
- selectedRowKeys: selectIds,
14282
- fixed: true,
14283
- onSelect: function onSelect(record, selected) {
14284
- if (selected) {
14285
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
14286
- setSelect([].concat(_toConsumableArray(selectList), [record]));
14287
- } else {
14288
- setSelectIds(selectIds.filter(function (t) {
14289
- return t !== record.id;
14290
- }));
14291
- setSelect(selectList.filter(function (t) {
14292
- return t.id !== record.id;
14293
- }));
14292
+ });
14293
+ var _Form$useForm = antd.Form.useForm(),
14294
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
14295
+ form = _Form$useForm2[0];
14296
+ var _useAntdTable = ahooks.useAntdTable(getTableData$4, {
14297
+ defaultPageSize: 10,
14298
+ form: form
14299
+ }),
14300
+ tableProps = _useAntdTable.tableProps,
14301
+ search = _useAntdTable.search,
14302
+ params = _useAntdTable.params;
14303
+ var submit = search.submit,
14304
+ reset = search.reset;
14305
+ var rowSelection = {
14306
+ selectedRowKeys: selectIds,
14307
+ fixed: true,
14308
+ onSelect: function onSelect(record, selected) {
14309
+ if (selected) {
14310
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
14311
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
14312
+ } else {
14313
+ setSelectIds(selectIds.filter(function (t) {
14314
+ return t !== record.id;
14315
+ }));
14316
+ setSelect(selectList.filter(function (t) {
14317
+ return t.id !== record.id;
14318
+ }));
14319
+ }
14320
+ },
14321
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
14322
+ if (selected) {
14323
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
14324
+ return t.id;
14325
+ }))));
14326
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
14327
+ } else {
14328
+ setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
14329
+ return t.id;
14330
+ })));
14331
+ var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
14332
+ return arrVal.id !== othVal.id;
14333
+ });
14334
+ setSelect(list);
14335
+ }
14336
+ }
14337
+ };
14338
+ var showTable = function showTable() {
14339
+ var handleDelete = function handleDelete(record) {
14340
+ setSelectIds(selectIds.filter(function (t) {
14341
+ return t !== record.id;
14342
+ }));
14343
+ setSelect(selectList.filter(function (t) {
14344
+ return t.id !== record.id;
14345
+ }));
14346
+ };
14347
+ var showColumns = [{
14348
+ dataIndex: '',
14349
+ title: "\u64CD\u4F5C",
14350
+ ellipsis: true,
14351
+ width: 100,
14352
+ render: function render(val, record) {
14353
+ return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
14354
+ type: "link",
14355
+ onClick: function onClick() {
14356
+ return handleDelete(record);
14357
+ }
14358
+ }, "\u5220\u9664");
14359
+ }
14360
+ }].concat(lodash.takeRight(columns, columns.length - 1));
14361
+ return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
14362
+ style: {
14363
+ width: '100%',
14364
+ maxWidth: '387px'
14365
+ }
14366
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
14367
+ columns: showColumns,
14368
+ rowKey: 'id',
14369
+ dataSource: selectList,
14370
+ scroll: {
14371
+ x: '100%',
14372
+ y: 250
14373
+ },
14374
+ pagination: {
14375
+ size: 'small',
14376
+ total: selectIds.length,
14377
+ pageSize: 10,
14378
+ showSizeChanger: false
14379
+ }
14380
+ })) : null;
14381
+ };
14382
+ return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
14383
+ active: true,
14384
+ loading: loading
14385
+ }, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
14386
+ searchFormData: searchFormData$3,
14387
+ form: form,
14388
+ showColumnsDataIndexList: showColumnsDataIndexList,
14389
+ submit: submit,
14390
+ reset: reset
14391
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
14392
+ style: {
14393
+ marginTop: '4px'
14394
+ }
14395
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
14396
+ rowSelection: rowSelection,
14397
+ rowKey: "id",
14398
+ columns: columns,
14399
+ scroll: {
14400
+ x: '100%',
14401
+ y: 250
14402
+ }
14403
+ }, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
14404
+ getPopupContainer: function getPopupContainer(triggerNode) {
14405
+ return triggerNode.parentElement;
14406
+ },
14407
+ content: showTable(),
14408
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
14409
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
14410
+ danger: true,
14411
+ type: "text"
14412
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
14413
+ };
14414
+ var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$4);
14415
+
14416
+ function always(value) {
14417
+ return function () {
14418
+ return value;
14419
+ };
14420
+ }
14421
+ var arrayUtils = {
14422
+ diff: function diff(arr1, arr2) {
14423
+ var set = new Set(arr2);
14424
+ return arr1.filter(function (x) {
14425
+ return !set.has(x);
14426
+ });
14427
+ },
14428
+ merge: function merge(arr1, arr2) {
14429
+ var set = new Set(arr1);
14430
+ return arr1.concat(arr2.filter(function (x) {
14431
+ return !set.has(x);
14432
+ }));
14433
+ }
14434
+ };
14435
+ function multiSelect() {
14436
+ var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14437
+ return function multiSelectStep(pipeline) {
14438
+ var _opts$isDisabled, _opts$clickArea, _ref, _ref2, _opts$value, _pipeline$getStateAtK, _ref3, _ref4, _opts$lastKey, _pipeline$getStateAtK2, _opts$checkboxPlaceme;
14439
+ var stateKey = 'multiSelect';
14440
+ var Checkbox = pipeline.ctx.components.Checkbox;
14441
+ if (Checkbox == null) {
14442
+ throw new Error('使用 multiSelect 之前需要设置 pipeline.ctx.components.Checkbox');
14443
+ }
14444
+ var primaryKey = pipeline.ensurePrimaryKey('multiSelect');
14445
+ var isDisabled = (_opts$isDisabled = opts.isDisabled) !== null && _opts$isDisabled !== void 0 ? _opts$isDisabled : always(false);
14446
+ var clickArea = (_opts$clickArea = opts.clickArea) !== null && _opts$clickArea !== void 0 ? _opts$clickArea : 'checkbox';
14447
+ 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 : [];
14448
+ 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 : '';
14449
+ var _onChange = function onChange(nextValue, key, keys, action) {
14450
+ var _opts$onChange;
14451
+ (_opts$onChange = opts.onChange) === null || _opts$onChange === void 0 ? void 0 : _opts$onChange.call(opts, nextValue, key, keys, action);
14452
+ pipeline.setStateAtKey(stateKey, {
14453
+ value: nextValue,
14454
+ lastKey: key
14455
+ }, {
14456
+ keys: keys,
14457
+ action: action
14458
+ });
14459
+ };
14460
+ var dataSource = pipeline.getDataSource();
14461
+ /** dataSource 中包含的所有 keys */
14462
+ var fullKeySet = new Set();
14463
+ /** 所有有效的 keys(disable 状态为 false) */
14464
+ var allKeys = [];
14465
+ var getPrimaryKey = function getPrimaryKey(key) {
14466
+ var _ref5 = (key === null || key === void 0 ? void 0 : key.split('-')) || [],
14467
+ _ref6 = _slicedToArray(_ref5, 1),
14468
+ lastKey = _ref6[0];
14469
+ return lastKey;
14470
+ };
14471
+ dataSource.forEach(function (row, rowIndex) {
14472
+ var rowKey = aliReactTable.internals.safeGetRowKey(primaryKey, row, rowIndex);
14473
+ rowKey = getPrimaryKey(rowKey);
14474
+ fullKeySet.add(rowKey);
14475
+ // 在 allKeys 中排除被禁用的 key
14476
+ if (!isDisabled(row, rowIndex) && !allKeys.includes(rowKey)) {
14477
+ allKeys.push(rowKey);
14478
+ }
14479
+ });
14480
+ var set = new Set(value);
14481
+ var isAllChecked = allKeys.length > 0 && allKeys.every(function (key) {
14482
+ return set.has(key);
14483
+ });
14484
+ var isAnyChecked = allKeys.some(function (key) {
14485
+ return set.has(key);
14486
+ });
14487
+ var defaultCheckboxColumnTitle = /*#__PURE__*/React__default['default'].createElement(Checkbox, {
14488
+ checked: isAllChecked,
14489
+ indeterminate: !isAllChecked && isAnyChecked,
14490
+ onChange: function onChange(_) {
14491
+ if (isAllChecked) {
14492
+ _onChange(arrayUtils.diff(value, allKeys), '', allKeys, 'uncheck-all');
14493
+ } else {
14494
+ _onChange(arrayUtils.merge(value, allKeys), '', allKeys, 'check-all');
14495
+ }
14496
+ }
14497
+ });
14498
+ var checkboxColumn = _objectSpread2(_objectSpread2({
14499
+ name: '是否选中',
14500
+ title: defaultCheckboxColumnTitle,
14501
+ width: 50,
14502
+ align: 'center'
14503
+ }, opts.checkboxColumn), {}, {
14504
+ getCellProps: function getCellProps(value, row, rowIndex) {
14505
+ var rowKey = aliReactTable.internals.safeGetRowKey(primaryKey, row, rowIndex);
14506
+ rowKey = getPrimaryKey(rowKey);
14507
+ if (fullKeySet.has(rowKey) && clickArea === 'cell') {
14508
+ var prevChecked = set.has(rowKey);
14509
+ var disabled = isDisabled(row, rowIndex);
14510
+ return {
14511
+ style: {
14512
+ cursor: disabled ? 'not-allowed' : 'pointer'
14513
+ },
14514
+ onClick: disabled ? undefined : function (e) {
14515
+ if (opts.stopClickEventPropagation) {
14516
+ e.stopPropagation();
14517
+ }
14518
+ onCheckboxChange(prevChecked, rowKey, e.shiftKey);
14519
+ }
14520
+ };
14521
+ }
14522
+ return {};
14523
+ },
14524
+ features: {
14525
+ autoRowSpan: function autoRowSpan(prevValue, value, prevRow, row) {
14526
+ var lastKey = getPrimaryKey(prevRow === null || prevRow === void 0 ? void 0 : prevRow.rowKey);
14527
+ var currentKey = getPrimaryKey(row === null || row === void 0 ? void 0 : row.rowKey);
14528
+ return lastKey === currentKey;
14529
+ }
14530
+ },
14531
+ render: function render(_, row, rowIndex) {
14532
+ var key = aliReactTable.internals.safeGetRowKey(primaryKey, row, rowIndex);
14533
+ key = getPrimaryKey(key);
14534
+ var checked = set.has(key);
14535
+ return /*#__PURE__*/React__default['default'].createElement(Checkbox, {
14536
+ checked: checked,
14537
+ disabled: isDisabled(row, rowIndex),
14538
+ onChange: clickArea === 'checkbox' ? function (arg1, arg2) {
14539
+ var _arg2$nativeEvent;
14540
+ // 这里要同时兼容 antd 和 fusion 的用法
14541
+ // fusion: arg2?.nativeEvent
14542
+ // antd: arg1.nativeEvent
14543
+ var nativeEvent = (_arg2$nativeEvent = arg2 === null || arg2 === void 0 ? void 0 : arg2.nativeEvent) !== null && _arg2$nativeEvent !== void 0 ? _arg2$nativeEvent : arg1.nativeEvent;
14544
+ if (nativeEvent) {
14545
+ if (opts.stopClickEventPropagation) {
14546
+ nativeEvent.stopPropagation();
14547
+ }
14548
+ onCheckboxChange(checked, key, nativeEvent.shiftKey);
14549
+ }
14550
+ } : undefined
14551
+ });
14552
+ }
14553
+ });
14554
+ var nextColumns = pipeline.getColumns().slice();
14555
+ var checkboxPlacement = (_opts$checkboxPlaceme = opts.checkboxPlacement) !== null && _opts$checkboxPlaceme !== void 0 ? _opts$checkboxPlaceme : 'start';
14556
+ if (checkboxPlacement === 'start') {
14557
+ nextColumns.unshift(checkboxColumn);
14558
+ } else {
14559
+ nextColumns.push(checkboxColumn);
14560
+ }
14561
+ pipeline.columns(nextColumns);
14562
+ pipeline.appendRowPropsGetter(function (row, rowIndex) {
14563
+ var rowKey = aliReactTable.internals.safeGetRowKey(primaryKey, row, rowIndex);
14564
+ rowKey = getPrimaryKey(rowKey);
14565
+ if (!fullKeySet.has(rowKey)) {
14566
+ // rowKey 不在 fullKeySet 中说明这一行是在 multiSelect 之后才生成的,multiSelect 不对之后生成的行进行处理
14567
+ return {};
14568
+ }
14569
+ var style = {};
14570
+ var className = '';
14571
+ var onClick;
14572
+ var checked = set.has(rowKey);
14573
+ if (opts.highlightRowWhenSelected && checked) {
14574
+ className = 'highlight';
14575
+ }
14576
+ if (clickArea === 'row') {
14577
+ var disabled = isDisabled(row, rowIndex);
14578
+ if (!disabled) {
14579
+ style.cursor = 'pointer';
14580
+ onClick = function onClick(e) {
14581
+ if (opts.stopClickEventPropagation) {
14582
+ e.stopPropagation();
14583
+ }
14584
+ onCheckboxChange(checked, rowKey, e.shiftKey);
14585
+ };
14586
+ }
14587
+ }
14588
+ return {
14589
+ className: className,
14590
+ style: style,
14591
+ onClick: onClick
14592
+ };
14593
+ });
14594
+ return pipeline;
14595
+ function onCheckboxChange(prevChecked, key, batch) {
14596
+ var batchKeys = [key];
14597
+ if (batch && lastKey) {
14598
+ var lastIdx = allKeys.indexOf(lastKey);
14599
+ var cntIdx = allKeys.indexOf(key);
14600
+ var _ref7 = lastIdx < cntIdx ? [lastIdx, cntIdx] : [cntIdx, lastIdx],
14601
+ _ref8 = _slicedToArray(_ref7, 2),
14602
+ start = _ref8[0],
14603
+ end = _ref8[1];
14604
+ batchKeys = allKeys.slice(start, end + 1);
14605
+ }
14606
+ if (prevChecked) {
14607
+ _onChange && _onChange(arrayUtils.diff(value, batchKeys), key, batchKeys, 'uncheck');
14608
+ } else {
14609
+ _onChange && _onChange(arrayUtils.merge(value, batchKeys), key, batchKeys, 'check');
14610
+ }
14611
+ }
14612
+ };
14613
+ }
14614
+
14615
+ 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";
14616
+ styleInject(css_248z$b);
14617
+
14618
+ var _excluded$e = ["children"];
14619
+ var Cell = function Cell(_ref) {
14620
+ var tdProps = _ref.tdProps;
14621
+ var children = tdProps.children,
14622
+ otherProps = _objectWithoutProperties(tdProps, _excluded$e);
14623
+ return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread2({}, otherProps), /*#__PURE__*/React__default['default'].createElement("div", {
14624
+ className: "cell-content"
14625
+ }, children));
14626
+ };
14627
+ var HighPerformanceTable = function HighPerformanceTable(_ref2) {
14628
+ var _ref2$disabledIds = _ref2.disabledIds,
14629
+ disabledIds = _ref2$disabledIds === void 0 ? [] : _ref2$disabledIds,
14630
+ _ref2$useSelectCol = _ref2.useSelectCol,
14631
+ useSelectCol = _ref2$useSelectCol === void 0 ? true : _ref2$useSelectCol,
14632
+ selectedKeys = _ref2.selectedKeys,
14633
+ handleChangeSelectedKeys = _ref2.handleChangeSelectedKeys,
14634
+ dataSource = _ref2.dataSource,
14635
+ columns = _ref2.columns,
14636
+ height = _ref2.height,
14637
+ loading = _ref2.loading,
14638
+ className = _ref2.className,
14639
+ onRow = _ref2.onRow;
14640
+ // console.debug('selectedKeys', selectedKeys);
14641
+ var _useState = React.useState(),
14642
+ _useState2 = _slicedToArray(_useState, 2),
14643
+ lastClickRowIndex = _useState2[0],
14644
+ setLastClickRowIndex = _useState2[1];
14645
+ var pipeline = aliReactTable.useTablePipeline({
14646
+ components: {
14647
+ Checkbox: antd.Checkbox
14648
+ }
14649
+ }).input({
14650
+ dataSource: dataSource,
14651
+ columns: columns
14652
+ }).primaryKey('rowKey').use(aliReactTable.features.columnRangeHover()) // 高亮展示
14653
+ .use(aliReactTable.features.columnResize({
14654
+ handleHoverBackground: '#aaa',
14655
+ handleActiveBackground: '#89bff7'
14656
+ }));
14657
+ if (useSelectCol) {
14658
+ pipeline.use(multiSelect({
14659
+ value: selectedKeys,
14660
+ isDisabled: function isDisabled(value) {
14661
+ return disabledIds.includes(value === null || value === void 0 ? void 0 : value.id);
14662
+ },
14663
+ onChange: handleChangeSelectedKeys,
14664
+ highlightRowWhenSelected: true,
14665
+ checkboxPlacement: 'start',
14666
+ checkboxColumn: {
14667
+ lock: true
14668
+ },
14669
+ clickArea: 'cell',
14670
+ stopClickEventPropagation: true
14671
+ }));
14672
+ }
14673
+ pipeline.use(aliReactTable.features.autoRowSpan());
14674
+ // FIXME: 自定义列头宽度暂时有实现难度,暂缓实现
14675
+ // pipeline.use(
14676
+ // features.columnResize({
14677
+ // onChangeSizes(sizeList) {
14678
+ // console.log('sizeList', sizeList);
14679
+ // },
14680
+ // }),
14681
+ // );
14682
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(aliReactTable.BaseTable, _objectSpread2(_objectSpread2({
14683
+ style: {
14684
+ maxHeight: height,
14685
+ overflow: 'auto',
14686
+ '--bgcolor': 'transparent',
14687
+ '--font-size': '13px',
14688
+ '--cell-padding': '0px'
14689
+ },
14690
+ className: "high-performance-table ".concat(className),
14691
+ useOuterBorder: true
14692
+ }, pipeline.getProps()), {}, {
14693
+ components: {
14694
+ EmptyContent: antd.Empty,
14695
+ Cell: Cell
14696
+ },
14697
+ primaryKey: "rowKey",
14698
+ getRowProps: function getRowProps(record, rowIndex) {
14699
+ return {
14700
+ style: (record === null || record === void 0 ? void 0 : record.id) === lastClickRowIndex ? {
14701
+ '--hover-bgcolor': 'transparent',
14702
+ background: 'rgba(196, 197, 199, 0.2)'
14703
+ } : {
14704
+ backgroundColor: 'transparent'
14705
+ },
14706
+ onClick: function onClick() {
14707
+ setLastClickRowIndex(record === null || record === void 0 ? void 0 : record.id); // TODO: 使用id就是强业务相关了,这里要求同一条工单需要id相同,rowKey不同
14708
+ typeof onRow === 'function' && onRow(record, rowIndex);
14709
+ }
14710
+ };
14711
+ },
14712
+ useVirtual: true,
14713
+ isLoading: loading
14714
+ })));
14715
+ };
14716
+
14717
+ 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";
14718
+ styleInject(css_248z$c);
14719
+
14720
+ var TrimInput = function TrimInput(props) {
14721
+ var handleBlur = function handleBlur(e) {
14722
+ // 去除头尾空格
14723
+ e.target.value = e.target.value.trim();
14724
+ var onChange = props.onChange,
14725
+ onBlur = props.onBlur;
14726
+ // 主动调 onChange,将数据同步给 Form
14727
+ onChange(e);
14728
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
14729
+ };
14730
+ return /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, props), {}, {
14731
+ onBlur: handleBlur
14732
+ }));
14733
+ };
14734
+
14735
+ var Rate = function Rate(_ref) {
14736
+ var value = _ref.value,
14737
+ _onChange = _ref.onChange,
14738
+ placeholder = _ref.placeholder,
14739
+ prefix = _ref.prefix;
14740
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14741
+ prefix: prefix,
14742
+ style: {
14743
+ width: '150px'
14744
+ },
14745
+ value: value === null || value === void 0 ? void 0 : value[0],
14746
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder[0],
14747
+ onChange: function onChange(val) {
14748
+ _onChange([val ? Number(val) : val, value === null || value === void 0 ? void 0 : value[1]]);
14749
+ }
14750
+ }), /*#__PURE__*/React__default['default'].createElement("span", {
14751
+ style: {
14752
+ padding: '0px 8px'
14753
+ }
14754
+ }, "-"), /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
14755
+ prefix: prefix,
14756
+ style: {
14757
+ width: '150px'
14758
+ },
14759
+ value: value === null || value === void 0 ? void 0 : value[1],
14760
+ placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder[1],
14761
+ onChange: function onChange(val) {
14762
+ _onChange([value === null || value === void 0 ? void 0 : value[0], val ? Number(val) : val]);
14763
+ }
14764
+ }));
14765
+ };
14766
+
14767
+ var reject = "data:image/png;base64,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";
14768
+
14769
+ var reminder = "data:image/png;base64,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";
14770
+
14771
+ var _excluded$f = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
14772
+ var AsyncSelect = function AsyncSelect(props) {
14773
+ var mode = props.mode,
14774
+ maxSelectCount = props.maxSelectCount,
14775
+ _props$showOnly = props.showOnly,
14776
+ showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
14777
+ getOptionsAsync = props.getOptionsAsync,
14778
+ _onChange = props.onChange,
14779
+ otherProps = _objectWithoutProperties(props, _excluded$f);
14780
+ var _React$useState = React__default['default'].useState([]),
14781
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14782
+ data = _React$useState2[0],
14783
+ setData = _React$useState2[1];
14784
+ React__default['default'].useEffect(function () {
14785
+ getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
14786
+ setData(list);
14787
+ });
14788
+ }, []);
14789
+ var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
14790
+ var getValueString = function getValueString(value) {
14791
+ var list = options;
14792
+ if (mode === 'multiple' && Array.isArray(value)) {
14793
+ var _list$filter$map$join;
14794
+ return (_list$filter$map$join = list.filter(function (item) {
14795
+ return value.includes(item.value);
14796
+ }).map(function (item) {
14797
+ return item.label;
14798
+ }).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
14799
+ } else {
14800
+ var selectedItem = list.find(function (item) {
14801
+ return item.value === value;
14802
+ });
14803
+ return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
14804
+ }
14805
+ };
14806
+ if (showOnly) {
14807
+ return getValueString(props.value);
14808
+ }
14809
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
14810
+ showArrow: true,
14811
+ showSearch: true,
14812
+ filterOption: function filterOption(input, option) {
14813
+ return option.label.includes(input);
14814
+ },
14815
+ notFoundContent: null
14816
+ }, otherProps), {}, {
14817
+ options: options,
14818
+ mode: mode,
14819
+ onChange: function onChange(value, option) {
14820
+ if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
14821
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
14822
+ } else {
14823
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
14824
+ }
14825
+ }
14826
+ }));
14827
+ };
14828
+
14829
+ var _excluded$g = ["filterComponentType", "searchDefaultConditions", "props", "ShopList"];
14830
+ var RangePicker = antd.DatePicker.RangePicker;
14831
+ var _SelectInput = function SelectInput(props) {
14832
+ var _props$value = props.value,
14833
+ value = _props$value === void 0 ? {
14834
+ type: 'anylike',
14835
+ keywords: ''
14836
+ } : _props$value,
14837
+ onChange = props.onChange,
14838
+ filterOptions = props.filterOptions;
14839
+ var handleSelectChange = function handleSelectChange(val) {
14840
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
14841
+ type: val
14842
+ });
14843
+ if (!['in', 'anylike'].includes(val)) {
14844
+ newValue.keywords = '';
14845
+ }
14846
+ onChange(newValue);
14847
+ };
14848
+ var handleInputChange = function handleInputChange(e) {
14849
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
14850
+ keywords: e.target.value
14851
+ });
14852
+ onChange(newValue);
14853
+ };
14854
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
14855
+ style: {
14856
+ minWidth: '120px',
14857
+ width: '40%'
14858
+ },
14859
+ options: filterOptions,
14860
+ value: value.type,
14861
+ onChange: handleSelectChange
14862
+ }), ['in', 'anylike'].includes(value.type) ? /*#__PURE__*/React__default['default'].createElement(TrimInput, {
14863
+ style: {
14864
+ width: '60%'
14865
+ },
14866
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14867
+ value: value.keywords,
14868
+ allowClear: true,
14869
+ onChange: handleInputChange
14870
+ }) : null);
14871
+ };
14872
+ var _TradeInput = function TradeInput(props) {
14873
+ // const repeatOrderList = useSelector(selectRepeatOrderList);
14874
+ // const userInfo = useSelector(selectUserInfo);
14875
+ // const isRepeat = repeatOrderList.includes(userInfo?.companyKey || '');
14876
+ // PS: 订单重复的先不做筛选,后续有需求了再补充
14877
+ var isRepeat = false;
14878
+ var _props$value2 = props.value,
14879
+ value = _props$value2 === void 0 ? {
14880
+ tradeIdSearchRepeat: false,
14881
+ value: ''
14882
+ } : _props$value2,
14883
+ onChange = props.onChange;
14884
+ var handleInputChange = function handleInputChange(e) {
14885
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
14886
+ value: e.target.value
14887
+ });
14888
+ onChange(newValue);
14889
+ };
14890
+ return "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14891
+ title: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14892
+ key: 'tradeInput'
14893
+ }, /*#__PURE__*/React__default['default'].createElement(TrimInput, {
14894
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14895
+ allowClear: true,
14896
+ value: value.value,
14897
+ onChange: handleInputChange
14898
+ }), isRepeat ) : /*#__PURE__*/React__default['default'].createElement("div", {
14899
+ key: 'tradeInput'
14900
+ }, /*#__PURE__*/React__default['default'].createElement(TrimInput, {
14901
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14902
+ allowClear: true,
14903
+ value: value.value,
14904
+ onChange: handleInputChange
14905
+ }), isRepeat );
14906
+ };
14907
+ var componentMap$1 = {
14908
+ Input: function Input(props) {
14909
+ return "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14910
+ title: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name)
14911
+ }, /*#__PURE__*/React__default['default'].createElement(TrimInput, _objectSpread2({
14912
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14913
+ allowClear: true
14914
+ }, props))) : /*#__PURE__*/React__default['default'].createElement(TrimInput, _objectSpread2({
14915
+ placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
14916
+ allowClear: true
14917
+ }, props));
14918
+ },
14919
+ MultipleSelect: function MultipleSelect(props) {
14920
+ return "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14921
+ title: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name)
14922
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2({
14923
+ mode: "multiple",
14924
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14925
+ optionFilterProp: "label",
14926
+ allowClear: true,
14927
+ maxTagCount: "responsive"
14928
+ }, props))) : /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2({
14929
+ mode: "multiple",
14930
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14931
+ optionFilterProp: "label",
14932
+ allowClear: true,
14933
+ maxTagCount: "responsive"
14934
+ }, props));
14935
+ },
14936
+ Date: function Date(props) {
14937
+ return /*#__PURE__*/React__default['default'].createElement(RangePicker, _objectSpread2({
14938
+ placeholder: ["".concat(props.name, "\u5F00\u59CB\u65F6\u95F4"), "".concat(props.name, "\u7ED3\u675F\u65F6\u95F4")],
14939
+ allowClear: true,
14940
+ showTime: {
14941
+ defaultValue: [hooks().startOf('day'), hooks().endOf('day')]
14942
+ },
14943
+ maxTagCount: "responsive"
14944
+ }, props));
14945
+ },
14946
+ Cascader: function Cascader(props) {
14947
+ return "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14948
+ title: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name)
14949
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
14950
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14951
+ allowClear: true,
14952
+ showSearch: true,
14953
+ maxTagCount: "responsive",
14954
+ fieldNames: {
14955
+ label: 'label',
14956
+ value: 'actived',
14957
+ children: 'children'
14958
+ }
14959
+ }, props))) : /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
14960
+ placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
14961
+ allowClear: true,
14962
+ showSearch: true,
14963
+ maxTagCount: "responsive",
14964
+ fieldNames: {
14965
+ label: 'label',
14966
+ value: 'actived',
14967
+ children: 'children'
14968
+ }
14969
+ }, props));
14970
+ },
14971
+ // ShopList: (props: any) => (
14972
+ // <ShopList
14973
+ // placeholder="请选择店铺名称"
14974
+ // showSearch
14975
+ // optionFilterProp="label"
14976
+ // allowClear
14977
+ // maxTagCount="responsive"
14978
+ // style={{ width: '220px' }}
14979
+ // {...props}
14980
+ // />
14981
+ // ),
14982
+ Rate: function Rate$1(props) {
14983
+ return /*#__PURE__*/React__default['default'].createElement(Rate, _objectSpread2({}, props));
14984
+ },
14985
+ SelectInput: function SelectInput(props) {
14986
+ return /*#__PURE__*/React__default['default'].createElement(_SelectInput, _objectSpread2({}, props));
14987
+ },
14988
+ TradeInput: function TradeInput(props) {
14989
+ return /*#__PURE__*/React__default['default'].createElement(_TradeInput, _objectSpread2({}, props));
14990
+ },
14991
+ AsyncSelect: function AsyncSelect$1(props) {
14992
+ return /*#__PURE__*/React__default['default'].createElement(AsyncSelect, _objectSpread2({
14993
+ placeholder: "\u8BF7\u9009\u62E9".concat((props === null || props === void 0 ? void 0 : props.name) || '')
14994
+ }, props));
14995
+ }
14996
+ };
14997
+ var FilterSelectOption = function FilterSelectOption(props) {
14998
+ // otherProps 中存在value和onChange属性
14999
+ var filterComponentType = props.filterComponentType,
15000
+ searchDefaultConditions = props.searchDefaultConditions,
15001
+ componentProps = props.props,
15002
+ ShopList = props.ShopList,
15003
+ otherProps = _objectWithoutProperties(props, _excluded$g);
15004
+ var Comp = filterComponentType === 'ShopList' ? function (props) {
15005
+ return /*#__PURE__*/React__default['default'].createElement(ShopList, _objectSpread2({
15006
+ placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
15007
+ showSearch: true,
15008
+ optionFilterProp: "label",
15009
+ allowClear: true,
15010
+ maxTagCount: "responsive",
15011
+ valueMapping: "uniqueKey",
15012
+ style: {
15013
+ width: '190px'
15014
+ }
15015
+ }, props));
15016
+ } : componentMap$1[filterComponentType];
15017
+ var newComponentProps = lodash.cloneDeep(componentProps);
15018
+ if (kmkfUtils.hasAddNullComponent.includes(props.type)) {
15019
+ var options = lodash.cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
15020
+ var nullList = props.type === 'LOGISTICS_INTERCEPTION' ? props.id.split('_')[1] === 'interceptLogisticsStatus' ? [{
15021
+ label: '为空',
15022
+ value: 'isNull'
15023
+ }] : [] : [{
15024
+ label: '为空',
15025
+ value: 'isNull'
15026
+ }, {
15027
+ label: '不为空',
15028
+ value: 'notNull'
15029
+ }];
15030
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
15031
+ options: [].concat(nullList, _toConsumableArray(options))
15032
+ });
15033
+ }
15034
+ //标记组件渲染图片 无法深拷贝,需要手动映射label
15035
+ if (props.type === 'FLOW_MARK_SELECT') {
15036
+ var MARK_FLAG_MAP = {
15037
+ '1': /*#__PURE__*/React__default['default'].createElement("svg", {
15038
+ viewBox: "0 0 1024 1024",
15039
+ version: "1.1",
15040
+ xmlns: "http://www.w3.org/2000/svg",
15041
+ "p-id": "7093",
15042
+ width: "18",
15043
+ height: "18"
15044
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15045
+ 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",
15046
+ fill: "#C6C6C6",
15047
+ "p-id": "7094"
15048
+ })),
15049
+ '7': /*#__PURE__*/React__default['default'].createElement("svg", {
15050
+ viewBox: "0 0 1024 1024",
15051
+ version: "1.1",
15052
+ xmlns: "http://www.w3.org/2000/svg",
15053
+ "p-id": "7093",
15054
+ width: "18",
15055
+ height: "18"
15056
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15057
+ 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",
15058
+ fill: "#8a8a8a",
15059
+ "p-id": "7094"
15060
+ })),
15061
+ '2': /*#__PURE__*/React__default['default'].createElement("svg", {
15062
+ viewBox: "0 0 1024 1024",
15063
+ version: "1.1",
15064
+ xmlns: "http://www.w3.org/2000/svg",
15065
+ "p-id": "7093",
15066
+ width: "18",
15067
+ height: "18"
15068
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15069
+ 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",
15070
+ fill: "#ff0000",
15071
+ "p-id": "7094"
15072
+ })),
15073
+ '3': /*#__PURE__*/React__default['default'].createElement("svg", {
15074
+ viewBox: "0 0 1024 1024",
15075
+ version: "1.1",
15076
+ xmlns: "http://www.w3.org/2000/svg",
15077
+ "p-id": "7093",
15078
+ width: "18",
15079
+ height: "18"
15080
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15081
+ 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",
15082
+ fill: "#f6b343",
15083
+ "p-id": "7094"
15084
+ })),
15085
+ '4': /*#__PURE__*/React__default['default'].createElement("svg", {
15086
+ viewBox: "0 0 1024 1024",
15087
+ version: "1.1",
15088
+ xmlns: "http://www.w3.org/2000/svg",
15089
+ "p-id": "7093",
15090
+ width: "18",
15091
+ height: "18"
15092
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15093
+ 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",
15094
+ fill: "#4d90f7",
15095
+ "p-id": "7094"
15096
+ })),
15097
+ '5': /*#__PURE__*/React__default['default'].createElement("svg", {
15098
+ viewBox: "0 0 1024 1024",
15099
+ version: "1.1",
15100
+ xmlns: "http://www.w3.org/2000/svg",
15101
+ "p-id": "7093",
15102
+ width: "18",
15103
+ height: "18"
15104
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15105
+ 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",
15106
+ fill: "#6ed86c",
15107
+ "p-id": "7094"
15108
+ })),
15109
+ '6': /*#__PURE__*/React__default['default'].createElement("svg", {
15110
+ viewBox: "0 0 1024 1024",
15111
+ version: "1.1",
15112
+ xmlns: "http://www.w3.org/2000/svg",
15113
+ "p-id": "7093",
15114
+ width: "18",
15115
+ height: "18"
15116
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15117
+ 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",
15118
+ fill: "#be4ed1",
15119
+ "p-id": "7094"
15120
+ }))
15121
+ };
15122
+ var markOptions = lodash.cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
15123
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
15124
+ options: markOptions.map(function (t) {
15125
+ return {
15126
+ label: MARK_FLAG_MAP[t.value],
15127
+ value: t.value
15128
+ };
15129
+ })
15130
+ });
15131
+ } else if (props.type === 'FLOW_TAG') {
15132
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
15133
+ options: [{
15134
+ label: '为空',
15135
+ value: 'isNull'
15136
+ }, {
15137
+ label: /*#__PURE__*/React__default['default'].createElement("img", {
15138
+ src: reminder,
15139
+ style: {
15140
+ width: '16px'
15141
+ }
15142
+ }),
15143
+ value: 'REMINDER'
15144
+ }, {
15145
+ label: /*#__PURE__*/React__default['default'].createElement("img", {
15146
+ src: reject,
15147
+ style: {
15148
+ width: '16px'
15149
+ }
15150
+ }),
15151
+ value: 'REJECT'
15152
+ }]
15153
+ });
15154
+ } else if (props.type === 'HANDLER_INPUT') {
15155
+ var _options = lodash.cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
15156
+ newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
15157
+ options: _options.map(function (item) {
15158
+ var _item$value$split = item.value.split(':'),
15159
+ _item$value$split2 = _slicedToArray(_item$value$split, 2),
15160
+ val = _item$value$split2[0],
15161
+ groupText = _item$value$split2[1];
15162
+ return _objectSpread2(_objectSpread2({}, item), {}, {
15163
+ label: groupText ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("span", {
15164
+ style: {
15165
+ marginRight: '8px',
15166
+ backgroundColor: '#d6e7ff',
15167
+ padding: '3px 7px',
15168
+ borderRadius: '4px',
15169
+ color: '#3a75ed',
15170
+ fontWeight: 400,
15171
+ lineHeight: '13px',
15172
+ display: 'inline-block'
15173
+ }
15174
+ }, /*#__PURE__*/React__default['default'].createElement("svg", {
15175
+ viewBox: "0 0 1024 1024",
15176
+ version: "1.1",
15177
+ xmlns: "http://www.w3.org/2000/svg",
15178
+ "p-id": "6771",
15179
+ width: "13",
15180
+ height: "13"
15181
+ }, /*#__PURE__*/React__default['default'].createElement("path", {
15182
+ d: "M452.267 171.042a196.13 196.13 0 0 0-46.2-14.455 165.376 165.376 0 0 0-27.306-2.987h-8.397a165.376 165.376 0 0 0-27.648 2.987c-19.951 3.686-38.93 10.154-56.389 19.524-55.842 29.986-86.357 84.002-86.357 156.399v8.072c-0.051 6.861 0.29 15.838 1.024 25.6 1.348 18.091 3.823 35.277 7.475 51.2 7.202 31.284 18.5 55.706 35.328 73.216 1.844 1.912 4.71 5.53 7.305 9.472 3.14 4.796 4.898 8.739 5.222 10.462 0 2.919 0.188 2.338-1.416 3.823-5.103 4.71-16.691 11.503-39.731 22.835-119.638 58.846-159.71 92.16-160.154 149.504l-3.72 53.214a41.677 41.677 0 0 0 38.57 44.527c3.243 0.222 49.732 0.393 114.961 0.512-0.205-19.114 0.546-36.096 2.082-51.2a25724.587 25724.587 0 0 1-103.833-0.273l3.072-44.049 0.068-1.792c0-29.696 29.303-54.187 131.55-104.5 55.091-27.101 69.751-40.669 69.751-73.044a45.49 45.49 0 0 0-0.392-5.888c-1.349-10.445-6.059-21.3-13.244-32.24a122.487 122.487 0 0 0-13.175-16.844c-9.507-9.882-17.05-26.198-22.358-49.238a292.386 292.386 0 0 1-6.314-43.52 288.444 288.444 0 0 1-0.888-21.64v-8.192c0-54.033 20.6-90.488 59.392-111.309a141.892 141.892 0 0 1 41.472-14.285 116.463 116.463 0 0 1 18.552-2.133h7.953c3.976 0.034 10.632 0.734 18.227 2.133a154.902 154.902 0 0 1 17.8 4.386 165.598 165.598 0 0 1 37.718-40.277zM806.4 599.092c-43.588-21.505-47.428-24.901-47.497-32.769 0.342-2.355 2.475-7.253 6.315-13.107 2.987-4.574 6.298-8.772 8.448-11.008 18.347-19.132 30.72-45.943 38.622-80.435a381.44 381.44 0 0 0 8.277-56.781c0.802-10.803 1.178-20.753 1.144-28.399v-8.465c0-80.333-33.434-139.674-94.686-172.646a211.695 211.695 0 0 0-61.97-21.504 181.01 181.01 0 0 0-29.934-3.311h-9.336c-8.345 0.068-18.841 1.177-30.31 3.294a211.678 211.678 0 0 0-61.969 21.504c-61.27 32.99-94.686 92.33-94.686 172.151v9.028c-0.034 7.595 0.341 17.545 1.144 28.365 1.501 20.07 4.232 39.134 8.277 56.747 7.902 34.509 20.275 61.32 38.605 80.435 2.167 2.253 5.461 6.451 8.465 11.025 3.84 5.854 5.973 10.752 6.314 13.09-0.068 7.885-3.925 11.264-47.496 32.785-132.318 65.28-176.35 102.008-176.794 164.489l-4.164 59.562a43.537 43.537 0 0 0 40.26 46.558c12.613 0.888 627.15 1.024 637.782-0.17a43.554 43.554 0 0 0 38.4-48.043l-6.452-59.563c-1.194-61.474-45.602-98.116-176.742-162.833z m151.194 165.426l25.565-1.382-0.102-1.963-25.566 1.383-18.108 1.962h18.21z m-25.566 0.785l5.802 53.487c-67.157 0.598-545.62 0.512-613.034-0.05l3.67-52.447c0.067-36.659 33.313-64.546 148.308-121.292 60.416-29.816 76.05-44.323 76.05-78.934 0-2.048-0.137-4.096-0.41-6.178-1.417-11.127-6.485-22.87-14.268-34.73a133.888 133.888 0 0 0-14.336-18.398c-11.025-11.486-19.644-30.208-25.668-56.44a330.77 330.77 0 0 1-7.117-49.1 326.349 326.349 0 0 1-1.007-24.457v-9.148c0-61.474 23.552-103.253 67.755-127.061a160.649 160.649 0 0 1 47.036-16.248c8.652-1.604 16.213-2.39 21.196-2.44h8.892c4.608 0.034 12.203 0.853 20.821 2.44 16.862 3.123 32.7 8.534 47.036 16.248 44.203 23.808 67.755 65.587 67.755 127.061v9.233c0.034 6.23-0.29 14.848-1.007 24.354-1.314 17.596-3.67 34.134-7.117 49.118-6.024 26.232-14.643 44.954-25.668 56.44a133.87 133.87 0 0 0-14.336 18.397c-7.766 11.862-12.851 23.604-14.268 34.731a48.589 48.589 0 0 0-0.41 6.178c0 34.611 15.634 49.118 76.05 78.934 115.012 56.763 148.24 84.65 148.24 119.517h7.39l-7.338 0.785z",
15183
+ fill: "#3a75ed",
15184
+ "p-id": "6772"
15185
+ }))), /*#__PURE__*/React__default['default'].createElement("span", null, item.label)) : item.label
15186
+ });
15187
+ })
15188
+ });
15189
+ }
15190
+ if (Comp) return /*#__PURE__*/React__default['default'].createElement(Comp, _objectSpread2(_objectSpread2({}, newComponentProps), otherProps));
15191
+ return null;
15192
+ };
15193
+
15194
+ var RangePicker$1 = antd.DatePicker.RangePicker;
15195
+ var defaultTimeOptions = [{
15196
+ label: '提交时间',
15197
+ value: kmkfUtils.SUBMIT_TIME_ID
15198
+ }, {
15199
+ label: '修改时间',
15200
+ value: kmkfUtils.UPGRADE_TIME_ID
15201
+ }, {
15202
+ label: '完成时间',
15203
+ value: kmkfUtils.FINAL_TIME_ID
15204
+ }];
15205
+ var timeCustomOptions = [{
15206
+ label: '自定义时间',
15207
+ value: kmkfUtils.CUSTOM_TIME_ID
15208
+ }, {
15209
+ label: '今天',
15210
+ value: 1
15211
+ }, {
15212
+ label: '近7天',
15213
+ value: 7
15214
+ }, {
15215
+ label: '近30天',
15216
+ value: 30
15217
+ }];
15218
+ var SearchHeader = function SearchHeader(_ref) {
15219
+ var allFields = _ref.allFields,
15220
+ children = _ref.children,
15221
+ status = _ref.status,
15222
+ _ref$layout = _ref.layout,
15223
+ layout = _ref$layout === void 0 ? 'block' : _ref$layout,
15224
+ _ref$isShowTime = _ref.isShowTime,
15225
+ isShowTime = _ref$isShowTime === void 0 ? true : _ref$isShowTime,
15226
+ timeOptions = _ref.timeOptions,
15227
+ ShopList = _ref.ShopList;
15228
+ // const fixedFieldsOptions = useMemo(() => {
15229
+ // return allFields.filter(item => fixedFields?.includes(item.id));
15230
+ // }, [fixedFields, allFields]);
15231
+ return /*#__PURE__*/React__default['default'].createElement("div", {
15232
+ className: 'search-header-wrap'
15233
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
15234
+ className: "".concat(status ? 'is-open' : 'not-open')
15235
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
15236
+ style: {
15237
+ display: 'flex',
15238
+ alignItems: 'center',
15239
+ flexWrap: 'wrap'
15240
+ }
15241
+ }, isShowTime && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
15242
+ name: "timeType"
15243
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
15244
+ options: timeOptions !== null && timeOptions !== void 0 ? timeOptions : defaultTimeOptions,
15245
+ style: {
15246
+ width: '120px',
15247
+ marginRight: '8px'
15248
+ },
15249
+ showSearch: true,
15250
+ optionFilterProp: "label"
15251
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
15252
+ name: "customTime"
15253
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
15254
+ options: timeCustomOptions,
15255
+ style: {
15256
+ width: '120px',
15257
+ marginRight: '8px'
15258
+ },
15259
+ showSearch: true,
15260
+ optionFilterProp: "label"
15261
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
15262
+ name: "time",
15263
+ style: {
15264
+ marginRight: '4px'
15265
+ }
15266
+ }, /*#__PURE__*/React__default['default'].createElement(RangePicker$1, {
15267
+ showTime: {
15268
+ defaultValue: [hooks().startOf('day'), hooks().endOf('day')]
15269
+ },
15270
+ allowClear: true
15271
+ }))), allFields === null || allFields === void 0 ? void 0 : allFields.map(function (item) {
15272
+ // const show = fixedFieldsOptions?.map(i => i?.id)?.includes(item.id);
15273
+ var show = true;
15274
+ return /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
15275
+ name: item.id,
15276
+ rules: item.rules || [],
15277
+ hidden: !show,
15278
+ style: {
15279
+ marginRight: '4px',
15280
+ minWidth: '190px'
15281
+ },
15282
+ key: item.id
15283
+ }, /*#__PURE__*/React__default['default'].createElement(FilterSelectOption, _objectSpread2({
15284
+ ShopList: ShopList
15285
+ }, item)));
15286
+ }), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, layout === 'inner' && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, children)))), layout === 'block' && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, children));
15287
+ };
15288
+
15289
+ var initStatus = {
15290
+ batchAuditDialogVisible: false,
15291
+ exportVisible: false,
15292
+ filterListVisible: false,
15293
+ exportLoading: false,
15294
+ open: false,
15295
+ visible: false,
15296
+ batchVisible: false,
15297
+ batchSubmitVisible: false,
15298
+ importVisible: false,
15299
+ smartWorkOrderStatusVisible: false
15300
+ };
15301
+ var SearchForm$1 = function SearchForm(props) {
15302
+ var submit = props.submit,
15303
+ reset = props.reset,
15304
+ filterItems = props.filterItems,
15305
+ form = props.form;
15306
+ var _useStatus = kmkfUtils.useStatus(initStatus),
15307
+ _useStatus2 = _slicedToArray(_useStatus, 2),
15308
+ status = _useStatus2[0],
15309
+ changeStatus = _useStatus2[1];
15310
+ return /*#__PURE__*/React__default['default'].createElement(antd.ConfigProvider, {
15311
+ locale: zh_CN__default['default']
15312
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
15313
+ id: "table-resizable"
15314
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
15315
+ layout: "inline",
15316
+ form: form
15317
+ }, !!(filterItems === null || filterItems === void 0 ? void 0 : filterItems.length) && /*#__PURE__*/React__default['default'].createElement(SearchHeader, {
15318
+ isShowTime: false,
15319
+ ShopList: props.ShopList,
15320
+ fixedFields: filterItems || [],
15321
+ allFields: filterItems || [],
15322
+ status: status === null || status === void 0 ? void 0 : status.open
15323
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
15324
+ type: "primary",
15325
+ onClick: submit
15326
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
15327
+ onClick: reset
15328
+ }, "\u91CD\u7F6E"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
15329
+ type: "link",
15330
+ onClick: function onClick() {
15331
+ return changeStatus({
15332
+ open: !(status === null || status === void 0 ? void 0 : status.open)
15333
+ });
15334
+ },
15335
+ icon: (status === null || status === void 0 ? void 0 : status.open) ? /*#__PURE__*/React__default['default'].createElement(icons.UpOutlined, null) : /*#__PURE__*/React__default['default'].createElement(icons.DownOutlined, null)
15336
+ }, (status === null || status === void 0 ? void 0 : status.open) ? '收起' : '展开'))))));
15337
+ };
15338
+
15339
+ var queryWorkOrderList = function queryWorkOrderList(params) {
15340
+ return kmkfUtils.servers.singletonWrap(function () {
15341
+ return kmkfUtils.servers.queryWorkOrderList(params);
15342
+ }, {
15343
+ name: 'queryWorkOrderList',
15344
+ key: 'queryWorkOrderList',
15345
+ cacheTime: 60
15346
+ });
15347
+ };
15348
+ var WorkorderList = function WorkorderList(props, ref) {
15349
+ // console.log('**** 调用 useGoodsSourceFormat 开始, goodsSource:', props);
15350
+ var _Form$useForm = antd.Form.useForm(),
15351
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
15352
+ form = _Form$useForm2[0];
15353
+ var _React$useState = React__default['default'].useState([]),
15354
+ _React$useState2 = _slicedToArray(_React$useState, 2),
15355
+ selectedKeys = _React$useState2[0],
15356
+ setSelectedKeys = _React$useState2[1];
15357
+ var _React$useState3 = React__default['default'].useState([]),
15358
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
15359
+ selectedList = _React$useState4[0],
15360
+ setSelectedList = _React$useState4[1];
15361
+ var goodsSourceFormat = props.useGoodsSourceFormat(props.goodsSource);
15362
+ var _React$useState5 = React__default['default'].useState([]),
15363
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
15364
+ workOrderList = _React$useState6[0],
15365
+ setWorkOrderList = _React$useState6[1];
15366
+ var _React$useState7 = React__default['default'].useState({
15367
+ loading: false,
15368
+ total: 0,
15369
+ current: 1,
15370
+ pageSize: 10
15371
+ }),
15372
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
15373
+ paginationData = _React$useState8[0],
15374
+ setPaginationData = _React$useState8[1];
15375
+ var disabledIds = (props.seletedGooods || []).map(function (goods) {
15376
+ return goods.id;
15377
+ }).filter(function (key) {
15378
+ return key;
15379
+ });
15380
+ React.useImperativeHandle(ref, function () {
15381
+ return {
15382
+ getSelectGoodList: function getSelectGoodList() {
15383
+ return selectedList.map(function (workOrderData) {
15384
+ return goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
15385
+ });
15386
+ }
15387
+ };
15388
+ });
15389
+ // console.log('**** 调用 useGoodsSourceFormat 结束:', {
15390
+ // goodsSourceFormat,
15391
+ // goodsSource: props.goodsSource,
15392
+ // });
15393
+ var paginationChange = function paginationChange(current, pageSize) {
15394
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15395
+ current: current,
15396
+ pageSize: pageSize
15397
+ }));
15398
+ };
15399
+ var fecthTableData = /*#__PURE__*/function () {
15400
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
15401
+ var current,
15402
+ pageSize,
15403
+ _ref2,
15404
+ flowTemplateKey,
15405
+ flowNodeId,
15406
+ templateKey,
15407
+ _ref2$tableColumns,
15408
+ tableColumns,
15409
+ formData,
15410
+ params,
15411
+ fields,
15412
+ uniqueKeys,
15413
+ _args = arguments;
15414
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15415
+ while (1) switch (_context.prev = _context.next) {
15416
+ case 0:
15417
+ current = _args.length > 0 && _args[0] !== undefined ? _args[0] : paginationData.current;
15418
+ pageSize = _args.length > 1 && _args[1] !== undefined ? _args[1] : paginationData.pageSize;
15419
+ _ref2 = goodsSourceFormat || {}, flowTemplateKey = _ref2.flowTemplateKey, flowNodeId = _ref2.flowNodeId, templateKey = _ref2.templateKey, _ref2$tableColumns = _ref2.tableColumns, tableColumns = _ref2$tableColumns === void 0 ? [] : _ref2$tableColumns;
15420
+ _context.next = 5;
15421
+ return form.validateFields();
15422
+ case 5:
15423
+ formData = _context.sent;
15424
+ if (templateKey) {
15425
+ _context.next = 10;
15426
+ break;
15427
+ }
15428
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15429
+ total: 0
15430
+ }));
15431
+ setWorkOrderList([]);
15432
+ return _context.abrupt("return");
15433
+ case 10:
15434
+ params = kmkfUtils.finalFormData({
15435
+ options: goodsSourceFormat.filterItems || [],
15436
+ formData: formData,
15437
+ current: current,
15438
+ pageSize: pageSize
15439
+ });
15440
+ params.flowTemplateKey = flowTemplateKey;
15441
+ params.flowNodeId = flowNodeId;
15442
+ params.templateKey = templateKey;
15443
+ // params.returnRepeatValueKeys = returnRepeatValueKeys;
15444
+ // 不对店铺数据进行过滤,
15445
+ // true表示不过滤拿到所有数据,false表示按照权限过滤,名字相当奇怪
15446
+ params.needFilterShopByPermission = true;
15447
+ fields = tableColumns === null || tableColumns === void 0 ? void 0 : tableColumns.reduce(function (cur, nxt) {
15448
+ if (kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP === null || kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]) {
15449
+ return cur.concat(kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP === null || kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]);
15450
+ }
15451
+ return cur;
15452
+ }, []);
15453
+ uniqueKeys = tableColumns === null || tableColumns === void 0 ? void 0 : tableColumns.reduce(function (cur, nxt) {
15454
+ if (kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP === null || kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : kmkfUtils.DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]) {
15455
+ return cur.concat(nxt.id);
15456
+ }
15457
+ return cur;
15458
+ }, []);
15459
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15460
+ loading: true
15461
+ }));
15462
+ // console.log('**** 搜索条件 params: ', {
15463
+ // params,
15464
+ // goodsSourceFormat,
15465
+ // goodsSource: props.goodsSource,
15466
+ // });
15467
+ return _context.abrupt("return", queryWorkOrderList(_objectSpread2(_objectSpread2({}, params), goodsSourceFormat.queryComponentsConfig)).then(function (res) {
15468
+ var _res$data, _res$data2;
15469
+ var curryTransformList = kmkfUtils.transformList(fields, uniqueKeys);
15470
+ var newDataSource = curryTransformList(kmkfUtils.dataSourceTrans((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || []));
15471
+ // console.log(`数据转换 1:`, newDataSource);
15472
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15473
+ total: res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.total,
15474
+ loading: false
15475
+ }));
15476
+ setWorkOrderList(newDataSource);
15477
+ }).catch(function (error) {
15478
+ console.log('**** 获取表格数据错误', error);
15479
+ }));
15480
+ case 19:
15481
+ case "end":
15482
+ return _context.stop();
15483
+ }
15484
+ }, _callee);
15485
+ }));
15486
+ return function fecthTableData() {
15487
+ return _ref.apply(this, arguments);
15488
+ };
15489
+ }();
15490
+ // console.log(`🚀 ~ index.tsx:51 ~ WorkorderList ~ columns:`, {
15491
+ // columns,
15492
+ // selectedKeys,
15493
+ // selectedList,
15494
+ // seletedGooods: props.seletedGooods,
15495
+ // disabledIds,
15496
+ // });
15497
+ var reset = function reset() {
15498
+ var current = 1;
15499
+ form.resetFields();
15500
+ if (paginationData.current !== current) {
15501
+ setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
15502
+ current: current
15503
+ }));
15504
+ } else {
15505
+ fecthTableData();
15506
+ }
15507
+ };
15508
+ var handleSelect = function handleSelect(keys) {
15509
+ var deletedKeys = selectedKeys.filter(function (key) {
15510
+ return !keys.includes(key);
15511
+ });
15512
+ setSelectedKeys(keys);
15513
+ // console.log(
15514
+ // '**** in handleChangeSelectedKeys',
15515
+ // keys,
15516
+ // '删除的keys: ',
15517
+ // deletedKeys,
15518
+ // );
15519
+ var newList = _toConsumableArray(selectedList);
15520
+ deletedKeys.forEach(function (key) {
15521
+ var deletedItemIndex = newList.findIndex(function (item) {
15522
+ return item.id === key;
15523
+ });
15524
+ if (deletedItemIndex > -1) {
15525
+ newList.splice(deletedItemIndex, 1);
14294
15526
  }
14295
- },
14296
- onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
14297
- if (selected) {
14298
- setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
14299
- return t.id;
14300
- }))));
14301
- setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
14302
- } else {
14303
- setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
14304
- return t.id;
14305
- })));
14306
- var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
14307
- return arrVal.id !== othVal.id;
15527
+ });
15528
+ keys.forEach(function (key) {
15529
+ var selectedItem = newList.find(function (item) {
15530
+ return item.id === key;
15531
+ });
15532
+ if (!selectedItem) {
15533
+ var workOrderData = workOrderList.find(function (item) {
15534
+ return item.id === key;
14308
15535
  });
14309
- setSelect(list);
15536
+ // const goods = goodsSourceFormat.workOrderDataToGoods(
15537
+ // workOrderData,
15538
+ // props.erp,
15539
+ // );
15540
+ newList.push(workOrderData);
14310
15541
  }
14311
- }
15542
+ });
15543
+ setSelectedList(newList);
14312
15544
  };
15545
+ React__default['default'].useEffect(function () {
15546
+ // console.log('**** templateKey 变化', goodsSourceFormat.templateKey);
15547
+ if (goodsSourceFormat.templateKey) {
15548
+ fecthTableData();
15549
+ }
15550
+ }, [goodsSourceFormat.templateKey]);
14313
15551
  var showTable = function showTable() {
14314
15552
  var handleDelete = function handleDelete(record) {
14315
- setSelectIds(selectIds.filter(function (t) {
15553
+ setSelectedKeys(selectedKeys.filter(function (t) {
14316
15554
  return t !== record.id;
14317
15555
  }));
14318
- setSelect(selectList.filter(function (t) {
15556
+ setSelectedList(selectedList.filter(function (t) {
14319
15557
  return t.id !== record.id;
14320
15558
  }));
14321
15559
  };
14322
- var showColumns = [{
15560
+ var _React$useState9 = React__default['default'].useState({
15561
+ current: 1,
15562
+ pageSize: 1
15563
+ }),
15564
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
15565
+ showPaginationData = _React$useState10[0],
15566
+ setShowPaginationData = _React$useState10[1];
15567
+ var pointer = (showPaginationData.current - 1) * showPaginationData.pageSize;
15568
+ var showList = selectedList.slice(pointer, pointer + showPaginationData.pageSize);
15569
+ var showPaginationChange = function showPaginationChange(current, pageSize) {
15570
+ setShowPaginationData(_objectSpread2(_objectSpread2({}, showPaginationData), {}, {
15571
+ current: current,
15572
+ pageSize: pageSize
15573
+ }));
15574
+ };
15575
+ var operationCol = {
14323
15576
  dataIndex: '',
14324
15577
  title: "\u64CD\u4F5C",
14325
15578
  ellipsis: true,
@@ -14332,83 +15585,118 @@ var GoodList$4 = function GoodList(props, ref) {
14332
15585
  }
14333
15586
  }, "\u5220\u9664");
14334
15587
  }
14335
- }].concat(lodash.takeRight(columns, columns.length - 1));
14336
- return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
15588
+ };
15589
+ return selectedKeys.length ? /*#__PURE__*/React__default['default'].createElement("div", {
14337
15590
  style: {
14338
15591
  width: '100%',
14339
15592
  maxWidth: '387px'
14340
15593
  }
14341
- }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
14342
- columns: showColumns,
14343
- rowKey: 'id',
14344
- dataSource: selectList,
14345
- scroll: {
14346
- x: '100%',
14347
- y: 250
15594
+ }, /*#__PURE__*/React__default['default'].createElement(HighPerformanceTable, {
15595
+ useSelectCol: false,
15596
+ columns: [operationCol].concat(_toConsumableArray(goodsSourceFormat.tableColumns)),
15597
+ height: 250,
15598
+ dataSource: showList,
15599
+ loading: false
15600
+ }), /*#__PURE__*/React__default['default'].createElement(antd.Pagination, {
15601
+ disabled: false,
15602
+ current: showPaginationData.current,
15603
+ pageSize: showPaginationData.pageSize,
15604
+ total: selectedList.length,
15605
+ onChange: showPaginationChange,
15606
+ showSizeChanger: true,
15607
+ style: {
15608
+ marginTop: 8,
15609
+ textAlign: 'right'
14348
15610
  },
14349
- pagination: {
14350
- size: 'small',
14351
- total: selectIds.length,
14352
- pageSize: 10,
14353
- showSizeChanger: false
14354
- }
15611
+ size: "small",
15612
+ pageSizeOptions: [10, 20, 50, 100, 500, 1000]
14355
15613
  })) : null;
14356
15614
  };
14357
- return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
14358
- active: true,
14359
- loading: loading
14360
- }, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
14361
- searchFormData: searchFormData$3,
15615
+ React__default['default'].useEffect(function () {
15616
+ fecthTableData();
15617
+ }, [paginationData.current, paginationData.pageSize]);
15618
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(SearchForm$1, {
14362
15619
  form: form,
14363
- showColumnsDataIndexList: showColumnsDataIndexList,
14364
- submit: submit,
14365
- reset: reset
15620
+ submit: function submit() {
15621
+ return fecthTableData();
15622
+ },
15623
+ reset: reset,
15624
+ filterItems: goodsSourceFormat.filterItems,
15625
+ ShopList: goodsSourceFormat.ShopList
14366
15626
  }), /*#__PURE__*/React__default['default'].createElement("div", {
14367
15627
  style: {
14368
15628
  marginTop: '4px'
14369
15629
  }
14370
- }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
14371
- rowSelection: rowSelection,
14372
- rowKey: "id",
14373
- columns: columns,
14374
- scroll: {
14375
- x: '100%',
14376
- y: 250
14377
- }
14378
- }, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
15630
+ }, /*#__PURE__*/React__default['default'].createElement(HighPerformanceTable, {
15631
+ disabledIds: disabledIds,
15632
+ columns: goodsSourceFormat.tableColumns,
15633
+ selectedKeys: selectedKeys,
15634
+ handleChangeSelectedKeys: handleSelect,
15635
+ height: 350,
15636
+ dataSource: workOrderList,
15637
+ loading: paginationData.loading
15638
+ }), /*#__PURE__*/React__default['default'].createElement(antd.Pagination, {
15639
+ disabled: paginationData.loading,
15640
+ current: paginationData.current,
15641
+ pageSize: paginationData.pageSize,
15642
+ total: paginationData.total,
15643
+ onChange: paginationChange,
15644
+ showSizeChanger: true,
15645
+ style: {
15646
+ marginTop: 8,
15647
+ textAlign: 'right'
15648
+ },
15649
+ size: "small",
15650
+ pageSizeOptions: [10, 20, 50, 100, 500, 1000]
15651
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
14379
15652
  getPopupContainer: function getPopupContainer(triggerNode) {
14380
15653
  return triggerNode.parentElement;
14381
15654
  },
14382
15655
  content: showTable(),
14383
- title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
15656
+ title: "\u5DF2\u9009\u62E9".concat(selectedKeys.length, "\u4E2A\u5546\u54C1")
14384
15657
  }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
14385
15658
  danger: true,
14386
15659
  type: "text"
14387
- }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
15660
+ }, "\u5DF2\u9009".concat(selectedKeys.length > 99 ? '99+' : selectedKeys.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
14388
15661
  };
14389
- var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$4);
14390
-
15662
+ var WorkorderList$1 = /*#__PURE__*/React.forwardRef(WorkorderList);
15663
+
15664
+ // interface GoodModelProps {
15665
+ // shopId: number | string;
15666
+ // maxLength: number;
15667
+ // shopList: any[];
15668
+ // width?: string | number;
15669
+ // shopCode?: string;
15670
+ // companyKey: string;
15671
+ // onSubmit: (...args: any[]) => any;
15672
+ // }
14391
15673
  var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
15674
+ var _props$goodsSource;
15675
+ var _useState = React.useState(),
15676
+ _useState2 = _slicedToArray(_useState, 2),
15677
+ seletedGooods = _useState2[0],
15678
+ setSeletedGooods = _useState2[1];
14392
15679
  React.useImperativeHandle(ref, function () {
14393
15680
  return {
14394
- open: function open() {
15681
+ open: function open(shopCode, options) {
15682
+ setSeletedGooods((options === null || options === void 0 ? void 0 : options.value) || []);
14395
15683
  setVisible(true);
14396
15684
  }
14397
15685
  };
14398
15686
  });
14399
15687
  var onSubmit = props.onSubmit,
14400
15688
  width = props.width;
14401
- var _useState = React.useState(false),
14402
- _useState2 = _slicedToArray(_useState, 2),
14403
- visible = _useState2[0],
14404
- setVisible = _useState2[1];
14405
- var gyGoodsListRef = React.useRef(null);
15689
+ var _useState3 = React.useState(false),
15690
+ _useState4 = _slicedToArray(_useState3, 2),
15691
+ visible = _useState4[0],
15692
+ setVisible = _useState4[1];
15693
+ var goodsListRef = React.useRef(null);
14406
15694
  var _onCancel = function onCancel() {
14407
15695
  setVisible(false);
14408
15696
  };
14409
15697
  var onOk = function onOk() {
14410
- var _gyGoodsListRef$curre;
14411
- var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
15698
+ var _goodsListRef$current;
15699
+ var selectedList = ((_goodsListRef$current = goodsListRef.current) === null || _goodsListRef$current === void 0 ? void 0 : _goodsListRef$current.getSelectGoodList()) || [];
14412
15700
  onSubmit(selectedList);
14413
15701
  _onCancel();
14414
15702
  };
@@ -14423,8 +15711,14 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
14423
15711
  },
14424
15712
  onOk: onOk,
14425
15713
  wrapClassName: "goodModal"
14426
- }, /*#__PURE__*/React__default['default'].createElement(GyGoodsList$1, {
14427
- ref: gyGoodsListRef
15714
+ }, ((_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source) === 'workOrder' ? /*#__PURE__*/React__default['default'].createElement(WorkorderList$1, {
15715
+ erp: "gy",
15716
+ goodsSource: props.goodsSource,
15717
+ seletedGooods: seletedGooods,
15718
+ useGoodsSourceFormat: props.useGoodsSourceFormat,
15719
+ ref: goodsListRef
15720
+ }) : /*#__PURE__*/React__default['default'].createElement(GyGoodsList$1, {
15721
+ ref: goodsListRef
14428
15722
  })));
14429
15723
  };
14430
15724
  var GyGoodsModal$2 = /*#__PURE__*/React.forwardRef(GyGoodsModal$1);
@@ -16671,7 +17965,7 @@ var getColumns$7 = function getColumns(_ref) {
16671
17965
  SKX_GOODS: [{
16672
17966
  dataIndex: 'skuEcode',
16673
17967
  title: "[SKX]\u53D1\u8D27\u5355\u660E\u7EC6-skuEcode",
16674
- width: 200
17968
+ width: 250
16675
17969
  }, {
16676
17970
  dataIndex: 'subOrderId',
16677
17971
  title: "[SKX]\u53D1\u8D27\u5355-\u5B50\u8BA2\u5355\u53F7",
@@ -16690,7 +17984,7 @@ var getColumns$7 = function getColumns(_ref) {
16690
17984
  SKX_RETURN_GOODS: [{
16691
17985
  dataIndex: 'returnSkuEcode',
16692
17986
  title: "[SKX]\u9000\u8D27\u5355\u660E\u7EC6-returnSkuEcode",
16693
- width: 200
17987
+ width: 300
16694
17988
  }, {
16695
17989
  dataIndex: 'returnSubOrderId',
16696
17990
  title: "[SKX]\u9000\u8D27\u5355-\u5B50\u8BA2\u5355\u53F7",
@@ -16999,44 +18293,52 @@ var isErpType = {
16999
18293
  var processGoods = function processGoods(_ref) {
17000
18294
  var list = _ref.list,
17001
18295
  type = _ref.type,
17002
- canUpdateNumber = _ref.canUpdateNumber;
18296
+ canUpdateNumber = _ref.canUpdateNumber,
18297
+ _ref$source = _ref.source,
18298
+ source = _ref$source === void 0 ? 'erp' : _ref$source;
17003
18299
  var newList = [];
17004
18300
  // 根据商品类型处理数据
17005
18301
  if (isErpType.isWdt(type)) {
17006
18302
  newList = processWdtGoods({
17007
18303
  list: list,
17008
18304
  type: type,
17009
- canUpdateNumber: canUpdateNumber
18305
+ canUpdateNumber: canUpdateNumber,
18306
+ source: source
17010
18307
  });
17011
18308
  } else if (isErpType.isBsE3(type)) {
17012
18309
  newList = processBsE3Goods({
17013
18310
  list: list,
17014
18311
  type: type,
17015
- canUpdateNumber: canUpdateNumber
18312
+ canUpdateNumber: canUpdateNumber,
18313
+ source: source
17016
18314
  });
17017
18315
  } else if (isErpType.isGy(type)) {
17018
18316
  newList = processGyGoods({
17019
18317
  list: list,
17020
18318
  type: type,
17021
- canUpdateNumber: canUpdateNumber
18319
+ canUpdateNumber: canUpdateNumber,
18320
+ source: source
17022
18321
  });
17023
18322
  } else if (isErpType.isJst(type)) {
17024
18323
  newList = processJstGoods({
17025
18324
  list: list,
17026
18325
  type: type,
17027
- canUpdateNumber: canUpdateNumber
18326
+ canUpdateNumber: canUpdateNumber,
18327
+ source: source
17028
18328
  });
17029
18329
  } else if (isErpType.isKm(type)) {
17030
18330
  newList = processKmGoods({
17031
18331
  list: list,
17032
18332
  type: type,
17033
- canUpdateNumber: canUpdateNumber
18333
+ canUpdateNumber: canUpdateNumber,
18334
+ source: source
17034
18335
  });
17035
18336
  } else {
17036
18337
  newList = processDefaultGoods({
17037
18338
  list: list,
17038
18339
  type: type,
17039
- canUpdateNumber: canUpdateNumber
18340
+ canUpdateNumber: canUpdateNumber,
18341
+ source: source
17040
18342
  });
17041
18343
  }
17042
18344
  return newList;
@@ -17101,26 +18403,31 @@ var processBsE3Goods = function processBsE3Goods(_ref3) {
17101
18403
  });
17102
18404
  };
17103
18405
  var processGyGoods = function processGyGoods(_ref4) {
17104
- var list = _ref4.list;
18406
+ var list = _ref4.list,
18407
+ source = _ref4.source;
18408
+ var isFormWorkOrder = source === 'workOrder';
17105
18409
  return list.map(function (item) {
17106
18410
  var goodName = item.goodName,
17107
18411
  goodShortName = item.goodShortName,
17108
18412
  goodNo = item.goodNo,
17109
18413
  specName = item.specName,
17110
18414
  specNo = item.specNo,
17111
- retailPrice = item.retailPrice;
18415
+ retailPrice = item.retailPrice,
18416
+ qty = item.qty,
18417
+ originPrice = item.originPrice,
18418
+ originAmount = item.originAmount;
17112
18419
  return _objectSpread2(_objectSpread2({}, item), {}, {
17113
18420
  uuid: kmkfUtils.uuid(),
17114
18421
  canDelete: true,
17115
18422
  canEdit: true,
17116
- qty: 1,
18423
+ qty: isFormWorkOrder ? qty : 1,
17117
18424
  goodName: goodName,
17118
18425
  goodShortName: goodShortName,
17119
18426
  goodNo: goodNo,
17120
18427
  specName: specName,
17121
18428
  specNo: specNo,
17122
- originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
17123
- originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
18429
+ originPrice: isFormWorkOrder ? originPrice : !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
18430
+ originAmount: isFormWorkOrder ? originAmount : !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
17124
18431
  });
17125
18432
  });
17126
18433
  };
@@ -17363,7 +18670,9 @@ var getButtonText = function getButtonText() {
17363
18670
  return '选择商品';
17364
18671
  };
17365
18672
  var GoodItem$1 = function GoodItem(props) {
17366
- var _props$value = props.value,
18673
+ var useGoodsSourceFormat = props.useGoodsSourceFormat,
18674
+ goodsSource = props.goodsSource,
18675
+ _props$value = props.value,
17367
18676
  value = _props$value === void 0 ? [] : _props$value,
17368
18677
  type = props.type,
17369
18678
  onChange = props.onChange,
@@ -17634,7 +18943,8 @@ var GoodItem$1 = function GoodItem(props) {
17634
18943
  var newList = processGoods({
17635
18944
  list: list,
17636
18945
  canUpdateNumber: canUpdateNumber,
17637
- type: type
18946
+ type: type,
18947
+ source: (goodsSource === null || goodsSource === void 0 ? void 0 : goodsSource.source) || 'erp'
17638
18948
  });
17639
18949
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
17640
18950
  };
@@ -17723,7 +19033,9 @@ var GoodItem$1 = function GoodItem(props) {
17723
19033
  shopList: shopList,
17724
19034
  shopId: shopId,
17725
19035
  maxLength: maxLength,
17726
- companyKey: companyKey
19036
+ companyKey: companyKey,
19037
+ goodsSource: goodsSource,
19038
+ useGoodsSourceFormat: useGoodsSourceFormat
17727
19039
  }));
17728
19040
  };
17729
19041
 
@@ -17862,7 +19174,7 @@ var BsGoods = function BsGoods(props) {
17862
19174
  }));
17863
19175
  };
17864
19176
 
17865
- var _excluded$e = ["value", "onChange", "reasonList", "disabled"];
19177
+ var _excluded$h = ["value", "onChange", "reasonList", "disabled"];
17866
19178
  var BsExchange = function BsExchange(props) {
17867
19179
  var _value$bsExchangeType4, _value$bsExchangeType5, _value$bsExchangeType6;
17868
19180
  var value = props.value,
@@ -17870,7 +19182,7 @@ var BsExchange = function BsExchange(props) {
17870
19182
  _props$reasonList = props.reasonList,
17871
19183
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17872
19184
  disabled = props.disabled,
17873
- other = _objectWithoutProperties(props, _excluded$e);
19185
+ other = _objectWithoutProperties(props, _excluded$h);
17874
19186
  var valueRef = React.useRef({});
17875
19187
  React.useEffect(function () {
17876
19188
  valueRef.current = value;
@@ -18097,7 +19409,7 @@ var BsExchange = function BsExchange(props) {
18097
19409
  }))) : null);
18098
19410
  };
18099
19411
 
18100
- var _excluded$f = ["value", "onChange", "reasonList", "disabled", "type"];
19412
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
18101
19413
  var typeMap = {
18102
19414
  BS_REISSUE_GOODS: {
18103
19415
  key: 'bsReissueGoods',
@@ -18122,7 +19434,7 @@ var BsReissue = function BsReissue(props) {
18122
19434
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18123
19435
  disabled = props.disabled,
18124
19436
  type = props.type,
18125
- other = _objectWithoutProperties(props, _excluded$f);
19437
+ other = _objectWithoutProperties(props, _excluded$i);
18126
19438
  var valueRef = React.useRef({});
18127
19439
  React.useEffect(function () {
18128
19440
  var _typeMap$type;
@@ -18238,14 +19550,14 @@ var BsReissue = function BsReissue(props) {
18238
19550
  })));
18239
19551
  };
18240
19552
 
18241
- var _excluded$g = ["value", "onChange", "reasonList", "disabled"];
19553
+ var _excluded$j = ["value", "onChange", "reasonList", "disabled"];
18242
19554
  var BsReturnGoods = function BsReturnGoods(props) {
18243
19555
  var value = props.value,
18244
19556
  onChange = props.onChange,
18245
19557
  _props$reasonList = props.reasonList,
18246
19558
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18247
19559
  disabled = props.disabled,
18248
- other = _objectWithoutProperties(props, _excluded$g);
19560
+ other = _objectWithoutProperties(props, _excluded$j);
18249
19561
  var valueRef = React.useRef({});
18250
19562
  React.useEffect(function () {
18251
19563
  pubsub__default['default'].subscribe('returnSelectList', function (_, data) {
@@ -18387,7 +19699,7 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
18387
19699
  var p = new Promise(function (resolve, reject) {
18388
19700
  var doReject = function doReject(err) {
18389
19701
  // 清空掉错误的请求记录
18390
- // singletonMap.delete(orderNo);
19702
+ singletonMap$1.delete(orderNo);
18391
19703
  reject(err);
18392
19704
  };
18393
19705
  extendRequest('/qy/gdfw/order/bse3OrderDetail', {
@@ -18475,7 +19787,7 @@ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
18475
19787
  var p = new Promise(function (resolve, reject) {
18476
19788
  var doReject = function doReject(err) {
18477
19789
  // 清空掉错误的请求记录
18478
- // singletonMap.delete(orderNo);
19790
+ singletonMap$3.delete(orderNo);
18479
19791
  reject(err);
18480
19792
  };
18481
19793
  kmkfUtils.servers.JST.jstOrderDetailWrap(orderNo).then(function (data) {
@@ -18637,7 +19949,7 @@ var kmUtils = {
18637
19949
  getOrderListSingleton: getOrderListSingleton$2
18638
19950
  };
18639
19951
 
18640
- var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
19952
+ var _excluded$k = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
18641
19953
  var columnsMap = {
18642
19954
  BS_SYSTEM_ORDER: kmkfUtils.BS_SYSTEM_ORDER_CONFIG.columns,
18643
19955
  KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
@@ -18891,7 +20203,7 @@ var index$2 = (function (props) {
18891
20203
  vipCode = _ref10.vipCode,
18892
20204
  shopCode = _ref10.shopCode,
18893
20205
  cancel = _ref10.cancel,
18894
- rest = _objectWithoutProperties(_ref10, _excluded$h);
20206
+ rest = _objectWithoutProperties(_ref10, _excluded$k);
18895
20207
  return _objectSpread2(_objectSpread2({}, rest), {}, {
18896
20208
  billNo: billNo,
18897
20209
  billType: billType,
@@ -18966,9 +20278,9 @@ var index$2 = (function (props) {
18966
20278
  }));
18967
20279
  });
18968
20280
 
18969
- var css_248z$b = ".customizeUpload-module_customizeUpload__2tG-4 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n width: 100%;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj {\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:hover:not(:disabled) {\n color: #40a9ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 {\n position: relative;\n width: 24px;\n height: 24px;\n overflow: hidden;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_image__3hOnT {\n width: 100%;\n height: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: white;\n font-size: 10px;\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl:hover {\n background-color: rgba(255, 0, 0, 0.8);\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1:hover .customizeUpload-module_deleteBtn__85Jsl {\n opacity: 1;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_uploadContainer__rUcw7 {\n margin-top: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq {\n width: 280px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverTitle__3Qw2t {\n margin-bottom: 4px;\n color: #262626;\n font-weight: 500;\n font-size: 16px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverSubtitle__1NA3m {\n margin-bottom: 16px;\n color: #8c8c8c;\n font-size: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G {\n display: flex;\n gap: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J {\n display: flex;\n flex: 1;\n gap: 6px;\n align-items: center;\n justify-content: center;\n height: 40px;\n background-color: #fafafa;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:hover:not(:disabled) {\n color: #40a9ff;\n background-color: #f0f8ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n";
20281
+ var css_248z$d = ".customizeUpload-module_customizeUpload__2tG-4 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n width: 100%;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj {\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:hover:not(:disabled) {\n color: #40a9ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 {\n position: relative;\n width: 24px;\n height: 24px;\n overflow: hidden;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_image__3hOnT {\n width: 100%;\n height: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: white;\n font-size: 10px;\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl:hover {\n background-color: rgba(255, 0, 0, 0.8);\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1:hover .customizeUpload-module_deleteBtn__85Jsl {\n opacity: 1;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_uploadContainer__rUcw7 {\n margin-top: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq {\n width: 280px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverTitle__3Qw2t {\n margin-bottom: 4px;\n color: #262626;\n font-weight: 500;\n font-size: 16px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverSubtitle__1NA3m {\n margin-bottom: 16px;\n color: #8c8c8c;\n font-size: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G {\n display: flex;\n gap: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J {\n display: flex;\n flex: 1;\n gap: 6px;\n align-items: center;\n justify-content: center;\n height: 40px;\n background-color: #fafafa;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:hover:not(:disabled) {\n color: #40a9ff;\n background-color: #f0f8ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n";
18970
20282
  var styles$5 = {"customizeUpload":"customizeUpload-module_customizeUpload__2tG-4","addButton":"customizeUpload-module_addButton__2w8Jj","imageItem":"customizeUpload-module_imageItem__yn6H1","image":"customizeUpload-module_image__3hOnT","deleteBtn":"customizeUpload-module_deleteBtn__85Jsl","uploadContainer":"customizeUpload-module_uploadContainer__rUcw7","popoverContent":"customizeUpload-module_popoverContent__FrAiq","popoverTitle":"customizeUpload-module_popoverTitle__3Qw2t","popoverSubtitle":"customizeUpload-module_popoverSubtitle__1NA3m","actionButtons":"customizeUpload-module_actionButtons__2la0G","actionButton":"customizeUpload-module_actionButton__1Wr1J"};
18971
- styleInject(css_248z$b);
20283
+ styleInject(css_248z$d);
18972
20284
 
18973
20285
  var CustomizeUpload = function CustomizeUpload(_ref) {
18974
20286
  var _ref$value = _ref.value,
@@ -19527,6 +20839,7 @@ var OrderSubForm = function OrderSubForm(props) {
19527
20839
  manual = props.manual,
19528
20840
  correlationList = props.subConfig.correlationList,
19529
20841
  effects = props.effects;
20842
+ console.log('effects', effects);
19530
20843
  var valueRef = React.useRef(value);
19531
20844
  React.useEffect(function () {
19532
20845
  valueRef.current = value;
@@ -19706,11 +21019,16 @@ var OrderSubForm = function OrderSubForm(props) {
19706
21019
  }));
19707
21020
  };
19708
21021
  var getDataSourceAsync = function getDataSourceAsync() {
19709
- var _effects$form;
19710
- var _ref = (effects === null || effects === void 0 ? void 0 : (_effects$form = effects.form) === null || _effects$form === void 0 ? void 0 : _effects$form.getFieldsValue()) || {},
19711
- _ref$shopId = _ref.shopId,
19712
- shopId = _ref$shopId === void 0 ? '' : _ref$shopId;
19713
- return (value === null || value === void 0 ? void 0 : value.orderNo) && shopId ? getOrderListSingleton$4({
21022
+ var _ref = effects || {},
21023
+ shopList = _ref.shopList,
21024
+ form = _ref.form;
21025
+ var _ref2 = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {},
21026
+ _ref2$shopId = _ref2.shopId,
21027
+ shopId = _ref2$shopId === void 0 ? '' : _ref2$shopId;
21028
+ var JOIN_SHOP = shopList === null || shopList === void 0 ? void 0 : shopList.find(function (item) {
21029
+ return !item.notJoin && item.shopId == shopId;
21030
+ });
21031
+ return (value === null || value === void 0 ? void 0 : value.orderNo) && shopId && JOIN_SHOP ? getOrderListSingleton$4({
19714
21032
  orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
19715
21033
  shopId: shopId
19716
21034
  }).then(function (data) {
@@ -19718,7 +21036,7 @@ var OrderSubForm = function OrderSubForm(props) {
19718
21036
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
19719
21037
  allOrders: allOrders
19720
21038
  }));
19721
- }) : Promise.resolve();
21039
+ }).catch(console.debug) : Promise.resolve();
19722
21040
  };
19723
21041
  var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
19724
21042
  var goodDetails = (value === null || value === void 0 ? void 0 : value.allOrders) || [];
@@ -19925,7 +21243,7 @@ var WlnGoods = function WlnGoods(props) {
19925
21243
  }));
19926
21244
  };
19927
21245
 
19928
- var componentMap$1 = {
21246
+ var componentMap$2 = {
19929
21247
  WDT_GOODS: {
19930
21248
  type: 'wdt',
19931
21249
  key: 'wdtGoods',
@@ -20067,7 +21385,7 @@ var CommonGoods = function CommonGoods(props) {
20067
21385
  // 合并单订单会包含","
20068
21386
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
20069
21387
  var _order$componentMap$c;
20070
- 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(',');
21388
+ 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(',');
20071
21389
  });
20072
21390
  var getOrderFlag = React.useRef(false);
20073
21391
  var _useState = React.useState(false),
@@ -20110,7 +21428,7 @@ var CommonGoods = function CommonGoods(props) {
20110
21428
  };
20111
21429
  }();
20112
21430
  React.useEffect(function () {
20113
- tokens.current = [pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
21431
+ tokens.current = [pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.type, function (type, data) {
20114
21432
  if (disabled) return;
20115
21433
  // console.log(type, data);
20116
21434
  withInfo.current = {
@@ -20121,13 +21439,13 @@ var CommonGoods = function CommonGoods(props) {
20121
21439
  setTableSelect(['2', '4'].includes(data.val));
20122
21440
  if (['1', '3'].includes(data.val)) {
20123
21441
  var _valueRef$current2, _valueRef$current3;
20124
- pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.selectListReturn, {
20125
- list: lodash.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]) || []),
21442
+ pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.selectListReturn, {
21443
+ list: lodash.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]) || []),
20126
21444
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3.shopCode,
20127
21445
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
20128
21446
  });
20129
21447
  }
20130
- }), pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.reissueType, function (type, data) {
21448
+ }), pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.reissueType, function (type, data) {
20131
21449
  if (disabled) return;
20132
21450
  withInfo.current = {
20133
21451
  type: type,
@@ -20137,13 +21455,13 @@ var CommonGoods = function CommonGoods(props) {
20137
21455
  setTableSelect(['2', '4'].includes(data.val));
20138
21456
  if (['1', '3'].includes(data.val)) {
20139
21457
  var _valueRef$current4, _valueRef$current5;
20140
- pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueSelectListReturn, {
20141
- list: lodash.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]) || []),
21458
+ pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.reissueSelectListReturn, {
21459
+ list: lodash.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]) || []),
20142
21460
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5.shopCode,
20143
21461
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
20144
21462
  });
20145
21463
  }
20146
- }), pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.returnType, function (type, data) {
21464
+ }), pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.returnType, function (type, data) {
20147
21465
  if (disabled) return;
20148
21466
  withInfo.current = {
20149
21467
  type: type,
@@ -20153,13 +21471,13 @@ var CommonGoods = function CommonGoods(props) {
20153
21471
  setTableSelect(['2', '4'].includes(data.val));
20154
21472
  if (['1', '3'].includes(data.val)) {
20155
21473
  var _valueRef$current6, _valueRef$current7;
20156
- pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnSelectListReturn, {
20157
- list: lodash.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]) || []),
21474
+ pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.returnSelectListReturn, {
21475
+ list: lodash.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]) || []),
20158
21476
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
20159
21477
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
20160
21478
  });
20161
21479
  }
20162
- }), pubsub__default['default'].subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
21480
+ }), pubsub__default['default'].subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
20163
21481
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
20164
21482
  shopCode: data.shopCode
20165
21483
  }));
@@ -20180,8 +21498,8 @@ var CommonGoods = function CommonGoods(props) {
20180
21498
  // type: componentMap[compType].eventNameMap.selectList,
20181
21499
  // returnType: componentMap[compType].eventNameMap.returnSelectList,
20182
21500
  // reissueType: componentMap[compType].eventNameMap.reissueSelectList,
20183
- type: componentMap$1[compType].eventNameMap.selectList
20184
- }, _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);
21501
+ type: componentMap$2[compType].eventNameMap.selectList
21502
+ }, _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);
20185
21503
  var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
20186
21504
  // console.log('onSelect', type, withInfo.current, newList);
20187
21505
  pubsub__default['default'].publish(type, {
@@ -20196,38 +21514,38 @@ var CommonGoods = function CommonGoods(props) {
20196
21514
  };
20197
21515
  var _onDelete = function onDelete(item) {
20198
21516
  var deleteId = item === null || item === void 0 ? void 0 : item.specId;
20199
- pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
20200
- pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
20201
- pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
20202
- pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.exchangeDeleteGood, deleteId);
21517
+ pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.deleteGood, deleteId);
21518
+ pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.reissueDeleteGood, deleteId);
21519
+ pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.returnDeleteGood, deleteId);
21520
+ pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.exchangeDeleteGood, deleteId);
20203
21521
  };
20204
21522
  var changeHandle = function changeHandle(list) {
20205
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
21523
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$2[compType].key, list)));
20206
21524
  };
20207
21525
  var handleModeChange = function handleModeChange(isStrict) {
20208
21526
  // isStrict 是否只展示当前平台订单商品
20209
21527
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({
20210
21528
  isStrict: isStrict
20211
- }, componentMap$1[compType].key, getGoodDetails({
21529
+ }, componentMap$2[compType].key, getGoodDetails({
20212
21530
  mode: isStrict
20213
21531
  }))));
20214
21532
  };
20215
21533
  var getGoodDetails = function getGoodDetails(_ref2) {
20216
21534
  var mode = _ref2.mode;
20217
- var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
21535
+ var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
20218
21536
  var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.orders) || [], {
20219
21537
  orderBackGoodsLevel: props.orderBackGoodsLevel
20220
21538
  });
20221
21539
  var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
20222
21540
  return mode ? goodDetails.filter(function (goodItem) {
20223
21541
  var _componentMap$compTyp;
20224
- 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;
21542
+ 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;
20225
21543
  }) : goodDetails;
20226
21544
  };
20227
21545
  // 找到该订单号下所有商品
20228
21546
  var getAllTradeGoodsDetails = function getAllTradeGoodsDetails(_ref3) {
20229
21547
  var mode = _ref3.mode;
20230
- var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
21548
+ var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
20231
21549
  console.log('value?.allOrders', value, (value === null || value === void 0 ? void 0 : value.allOrders) || []);
20232
21550
  var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.allOrders) || [], {
20233
21551
  orderBackGoodsLevel: props.orderBackGoodsLevel
@@ -20235,7 +21553,7 @@ var CommonGoods = function CommonGoods(props) {
20235
21553
  var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
20236
21554
  return mode ? goodDetails.filter(function (goodItem) {
20237
21555
  var _componentMap$compTyp2;
20238
- 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;
21556
+ 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;
20239
21557
  }) : goodDetails;
20240
21558
  };
20241
21559
  var selectedGoodsChange = React.useCallback(function (skuList) {
@@ -20247,16 +21565,16 @@ var CommonGoods = function CommonGoods(props) {
20247
21565
  mode: isStrict
20248
21566
  }) || [];
20249
21567
  // 当前选中的所有商品【包含了原订单+商品库】
20250
- 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)]) || [];
20251
- 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 = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
21568
+ 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)]) || [];
21569
+ 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 = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20252
21570
  return skuList.includes(item.uuid);
20253
21571
  });
20254
21572
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20255
- }, [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]);
21573
+ }, [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]);
20256
21574
  // 商品信息组件暂存后 重新编辑,此时需要重新获取订单下所有系统自订单的商品信息
20257
21575
  var getDataSourceAsync = function getDataSourceAsync() {
20258
21576
  var _componentMap$compTyp6;
20259
- 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) {
21577
+ 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) {
20260
21578
  var list = processAllOrders({
20261
21579
  data: data,
20262
21580
  orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
@@ -20268,10 +21586,10 @@ var CommonGoods = function CommonGoods(props) {
20268
21586
  }) : Promise.resolve();
20269
21587
  };
20270
21588
  return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
20271
- key: componentMap$1[compType].key
21589
+ key: componentMap$2[compType].key
20272
21590
  }, props), {}, {
20273
21591
  disabled: disabled,
20274
- value: value === null || value === void 0 ? void 0 : value[componentMap$1[compType].key],
21592
+ value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].key],
20275
21593
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20276
21594
  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),
20277
21595
  selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
@@ -20299,7 +21617,7 @@ var CommonGoods = function CommonGoods(props) {
20299
21617
  }));
20300
21618
  };
20301
21619
 
20302
- var componentMap$2 = {
21620
+ var componentMap$3 = {
20303
21621
  WDT_RETURN_GOODS: {
20304
21622
  type: 'wdt',
20305
21623
  valueKey: 'wdtReturnGoods',
@@ -20327,10 +21645,10 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20327
21645
  isSettingConfig = props.isSettingConfig;
20328
21646
  var valueRef = React.useRef({});
20329
21647
  React.useEffect(function () {
20330
- var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
21648
+ var subscription = pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.exchangeCopyGood, function () {
20331
21649
  var _valueRef$current, _valueRef$current2;
20332
- pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.exchangeBackCopyGood, {
20333
- list: lodash.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]) || []),
21650
+ pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, {
21651
+ list: lodash.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]) || []),
20334
21652
  shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
20335
21653
  });
20336
21654
  });
@@ -20339,13 +21657,13 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20339
21657
  };
20340
21658
  }, []);
20341
21659
  React.useEffect(function () {
20342
- var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.returnSelectList, function (_, data) {
21660
+ var subscription = pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.returnSelectList, function (_, data) {
20343
21661
  if (disabled) return;
20344
21662
  var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
20345
21663
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
20346
21664
  });
20347
21665
  if (compType === 'WDT_RETURN_GOODS') {
20348
- newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
21666
+ newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
20349
21667
  if (typeof item.type === 'undefined') {
20350
21668
  item.type = '1';
20351
21669
  }
@@ -20358,7 +21676,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20358
21676
  return item;
20359
21677
  });
20360
21678
  } else {
20361
- newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
21679
+ newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
20362
21680
  }
20363
21681
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20364
21682
  });
@@ -20367,13 +21685,13 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20367
21685
  };
20368
21686
  }, []);
20369
21687
  React.useEffect(function () {
20370
- var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.returnSelectListReturn, function (_, data) {
21688
+ var subscription = pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.returnSelectListReturn, function (_, data) {
20371
21689
  if (disabled) return;
20372
21690
  var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
20373
21691
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
20374
21692
  });
20375
21693
  if (compType === 'WDT_RETURN_GOODS') {
20376
- newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
21694
+ newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
20377
21695
  if (typeof item.type === 'undefined') {
20378
21696
  item.type = '1';
20379
21697
  }
@@ -20386,7 +21704,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20386
21704
  return item;
20387
21705
  });
20388
21706
  } else {
20389
- newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
21707
+ newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
20390
21708
  }
20391
21709
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20392
21710
  });
@@ -20396,17 +21714,17 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20396
21714
  }, []);
20397
21715
  React.useEffect(function () {
20398
21716
  valueRef.current = value;
20399
- pubsub__default['default'].subscribeOnce(componentMap$2[compType].eventNameMap.returnDeleteGood, function (_, data) {
21717
+ pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.returnDeleteGood, function (_, data) {
20400
21718
  if (disabled) return;
20401
21719
  if (value) {
20402
21720
  var newValue = _objectSpread2({}, value);
20403
- newValue[componentMap$2[compType].valueKey] = newValue[componentMap$2[compType].valueKey].filter(function (item) {
21721
+ newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
20404
21722
  return item.sku !== data;
20405
21723
  });
20406
21724
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20407
21725
  }
20408
21726
  });
20409
- pubsub__default['default'].subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
21727
+ pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
20410
21728
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
20411
21729
  shopCode: data.shopCode
20412
21730
  }));
@@ -20414,20 +21732,20 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20414
21732
  }, [value, disabled]);
20415
21733
  var changeTypeHandle = function changeTypeHandle(val) {
20416
21734
  var newValue = _objectSpread2({}, value);
20417
- newValue[componentMap$2[compType].returnTypeKey] = val;
20418
- newValue[componentMap$2[compType].valueKey] = [];
21735
+ newValue[componentMap$3[compType].returnTypeKey] = val;
21736
+ newValue[componentMap$3[compType].valueKey] = [];
20419
21737
  if (isSettingConfig || ['2'].includes(val[0])) {
20420
21738
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20421
21739
  valueRef.current = newValue;
20422
21740
  }
20423
- pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.returnType, {
21741
+ pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.returnType, {
20424
21742
  val: val[0],
20425
21743
  goodValue: newValue
20426
21744
  });
20427
21745
  };
20428
21746
  var changeGoodHandle = function changeGoodHandle(val) {
20429
21747
  var newValue = _objectSpread2({}, value);
20430
- newValue[componentMap$2[compType].valueKey] = val;
21748
+ newValue[componentMap$3[compType].valueKey] = val;
20431
21749
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20432
21750
  };
20433
21751
  //显示选择商品按钮 原单换不显示选择商品
@@ -20441,25 +21759,25 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
20441
21759
  disabled: isSettingConfig ? !isSettingConfig : disabled,
20442
21760
  allowClear: false,
20443
21761
  options: reasonList,
20444
- value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
21762
+ value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].returnTypeKey],
20445
21763
  onChange: function onChange(val) {
20446
21764
  return changeTypeHandle(val);
20447
21765
  }
20448
21766
  }), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
20449
- key: componentMap$2[compType].type
21767
+ key: componentMap$3[compType].type
20450
21768
  }, props), {}, {
20451
21769
  disabled: disabled,
20452
21770
  canUpdateNumber: true,
20453
21771
  showChangeBtn: false,
20454
21772
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20455
- value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].valueKey],
21773
+ value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
20456
21774
  onChange: function onChange(val) {
20457
21775
  return changeGoodHandle(val);
20458
21776
  }
20459
21777
  })));
20460
21778
  };
20461
21779
 
20462
- var componentMap$3 = {
21780
+ var componentMap$4 = {
20463
21781
  WDT_EXCHANGE_GOODS: {
20464
21782
  type: 'wdt',
20465
21783
  valueKey: 'wdtExchangeGoods',
@@ -20499,7 +21817,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
20499
21817
  onChange = props.onChange,
20500
21818
  disabled = props.disabled,
20501
21819
  compType = props.type;
20502
- 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';
21820
+ 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';
20503
21821
  var valueRef = React.useRef({});
20504
21822
  // PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
20505
21823
  var _useState = React.useState(false),
@@ -20511,13 +21829,13 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
20511
21829
  originDataSource = _useState4[0],
20512
21830
  setOriginDataSource = _useState4[1];
20513
21831
  React.useEffect(function () {
20514
- var subscription = componentMap$3[compType].eventNameMap.exchangeBackCopyGood && pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
21832
+ var subscription = componentMap$4[compType].eventNameMap.exchangeBackCopyGood && pubsub__default['default'].subscribe(componentMap$4[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
20515
21833
  if (disabled) return;
20516
21834
  var newValue = {
20517
21835
  shopCode: data === null || data === void 0 ? void 0 : data.shopCode
20518
21836
  };
20519
21837
  if (compType === 'WDT_EXCHANGE_GOODS') {
20520
- newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
21838
+ newValue[componentMap$4[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
20521
21839
  if (typeof item.type === 'undefined') {
20522
21840
  item.type = '1';
20523
21841
  }
@@ -20528,7 +21846,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
20528
21846
  return item;
20529
21847
  });
20530
21848
  } else {
20531
- newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
21849
+ newValue[componentMap$4[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
20532
21850
  }
20533
21851
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20534
21852
  });
@@ -20547,12 +21865,12 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
20547
21865
  return item;
20548
21866
  });
20549
21867
  }
20550
- newValue[componentMap$3[compType].valueKey] = val;
21868
+ newValue[componentMap$4[compType].valueKey] = val;
20551
21869
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20552
21870
  };
20553
21871
  var copyGoods = function copyGoods() {
20554
21872
  var copyHandle = function copyHandle() {
20555
- pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, compType);
21873
+ pubsub__default['default'].publish(componentMap$4[compType].eventNameMap.exchangeCopyGood, compType);
20556
21874
  };
20557
21875
  return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
20558
21876
  type: "link",
@@ -20565,50 +21883,50 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
20565
21883
  // 原订单商品
20566
21884
  var originTradeGoodList = originDataSource || [];
20567
21885
  // 当前选中的所有商品【包含了原订单+商品库】
20568
- 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]) || [];
20569
- 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 = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), uniqueKey)) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
21886
+ 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]) || [];
21887
+ 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 = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), uniqueKey)) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20570
21888
  return skuList.includes(item[uniqueKey]);
20571
21889
  });
20572
21890
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20573
- }, [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]);
21891
+ }, [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]);
20574
21892
  var getGoodDetails = function getGoodDetails(_ref) {
20575
21893
  var _componentMap$compTyp5, _componentMap$compTyp6, _order$componentMap$c, _componentMap$compTyp7;
20576
21894
  var returnGoodsValue = _ref.returnGoodsValue,
20577
21895
  mode = _ref.mode,
20578
21896
  sysOrderNo = _ref.sysOrderNo;
20579
- 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];
20580
- 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];
21897
+ 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];
21898
+ 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];
20581
21899
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20582
- return order[componentMap$3[compType].oIdKey] === systemOrderNo;
21900
+ return order[componentMap$4[compType].oIdKey] === systemOrderNo;
20583
21901
  });
20584
- var goodDetails = kmkfUtils.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) : []);
21902
+ var goodDetails = kmkfUtils.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) : []);
20585
21903
  var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
20586
21904
  return mode ? goodDetails.filter(function (goodItem) {
20587
- return !orderNo || goodItem[componentMap$3[compType].outerOiIdKey] === orderNo;
21905
+ return !orderNo || goodItem[componentMap$4[compType].outerOiIdKey] === orderNo;
20588
21906
  }) : goodDetails;
20589
21907
  };
20590
21908
  var getDataSourceAsync = function getDataSourceAsync() {
20591
21909
  return new Promise(function (resolve) {
20592
- pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
21910
+ pubsub__default['default'].subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
20593
21911
  resolve(data);
20594
21912
  setOriginDataSource(getGoodDetails({
20595
21913
  returnGoodsValue: data,
20596
21914
  mode: isStrict
20597
21915
  }));
20598
21916
  });
20599
- pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.returnGoodsSysorder, compType);
21917
+ pubsub__default['default'].publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
20600
21918
  });
20601
21919
  };
20602
21920
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
20603
- key: componentMap$3[compType].type
21921
+ key: componentMap$4[compType].type
20604
21922
  }, props), {}, {
20605
21923
  disabled: disabled,
20606
21924
  canUpdateNumber: true,
20607
21925
  showChangeBtn: true,
20608
21926
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20609
- value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
21927
+ value: value === null || value === void 0 ? void 0 : value[componentMap$4[compType].valueKey],
20610
21928
  otherOperations: copyGoods(),
20611
- tradeGoods: componentMap$3[compType].showChooseTradeGoodsBtn ? {
21929
+ tradeGoods: componentMap$4[compType].showChooseTradeGoodsBtn ? {
20612
21930
  uniqueKey: uniqueKey,
20613
21931
  originDataSource: originDataSource,
20614
21932
  getDataSourceAsync: getDataSourceAsync,
@@ -20620,7 +21938,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
20620
21938
  })));
20621
21939
  };
20622
21940
 
20623
- var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
21941
+ var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
20624
21942
  var typeMap$1 = {
20625
21943
  WDT_REISSUE_GOODS: {
20626
21944
  key: 'wdtReissueGoods',
@@ -20649,7 +21967,7 @@ var wdtReissue = function wdtReissue(props) {
20649
21967
  disabled = props.disabled,
20650
21968
  type = props.type,
20651
21969
  isSettingConfig = props.isSettingConfig,
20652
- other = _objectWithoutProperties(props, _excluded$i);
21970
+ other = _objectWithoutProperties(props, _excluded$l);
20653
21971
  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) {
20654
21972
  var _order$srcTid;
20655
21973
  return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
@@ -20896,7 +22214,7 @@ var wdtReissue = function wdtReissue(props) {
20896
22214
  })));
20897
22215
  };
20898
22216
 
20899
- var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
22217
+ var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
20900
22218
  var typeMap$2 = {
20901
22219
  JST_REISSUE_GOODS: {
20902
22220
  compType: '补发',
@@ -20964,7 +22282,7 @@ var PublicReissue = function PublicReissue(props) {
20964
22282
  disabled = props.disabled,
20965
22283
  type = props.type,
20966
22284
  isSettingConfig = props.isSettingConfig,
20967
- other = _objectWithoutProperties(props, _excluded$j);
22285
+ other = _objectWithoutProperties(props, _excluded$m);
20968
22286
  var getOrderFlag = React.useRef(false);
20969
22287
  var _useState = React.useState(false),
20970
22288
  _useState2 = _slicedToArray(_useState, 2),
@@ -21234,8 +22552,8 @@ var PublicReissue = function PublicReissue(props) {
21234
22552
  })));
21235
22553
  };
21236
22554
 
21237
- var css_248z$c = ".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";
21238
- styleInject(css_248z$c);
22555
+ var css_248z$e = ".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";
22556
+ styleInject(css_248z$e);
21239
22557
 
21240
22558
  var TabPane$1 = antd.Tabs.TabPane;
21241
22559
  var Option$2 = antd.Select.Option;
@@ -21710,12 +23028,12 @@ var Goods$1 = function Goods(props, ref) {
21710
23028
  };
21711
23029
  var index$3 = /*#__PURE__*/React.forwardRef(Goods$1);
21712
23030
 
21713
- var _excluded$k = ["onChange", "value", "failValue"];
23031
+ var _excluded$n = ["onChange", "value", "failValue"];
21714
23032
  function CommonStatus(props) {
21715
23033
  var onChange = props.onChange,
21716
23034
  value = props.value,
21717
23035
  failValue = props.failValue,
21718
- other = _objectWithoutProperties(props, _excluded$k);
23036
+ other = _objectWithoutProperties(props, _excluded$n);
21719
23037
  var changeHandle = function changeHandle(val) {
21720
23038
  onChange === null || onChange === void 0 ? void 0 : onChange({
21721
23039
  status: val,
@@ -21854,7 +23172,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
21854
23172
  })) : null) : null);
21855
23173
  };
21856
23174
 
21857
- var _excluded$l = ["value", "onChange", "disabled", "failValue", "type"];
23175
+ var _excluded$o = ["value", "onChange", "disabled", "failValue", "type"];
21858
23176
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
21859
23177
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
21860
23178
  var _props$value = props.value,
@@ -21864,7 +23182,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
21864
23182
  failValue = props.failValue,
21865
23183
  _props$type = props.type,
21866
23184
  type = _props$type === void 0 ? 1 : _props$type,
21867
- other = _objectWithoutProperties(props, _excluded$l);
23185
+ other = _objectWithoutProperties(props, _excluded$o);
21868
23186
  var _useState = React.useState(0),
21869
23187
  _useState2 = _slicedToArray(_useState, 2),
21870
23188
  changeIndex = _useState2[0],
@@ -21930,7 +23248,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
21930
23248
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
21931
23249
  };
21932
23250
 
21933
- var _excluded$m = ["value", "onChange", "disabled", "failValue", "type"];
23251
+ var _excluded$p = ["value", "onChange", "disabled", "failValue", "type"];
21934
23252
  var MsgStatus = function MsgStatus(props) {
21935
23253
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
21936
23254
  var _props$value = props.value,
@@ -21940,7 +23258,7 @@ var MsgStatus = function MsgStatus(props) {
21940
23258
  failValue = props.failValue,
21941
23259
  _props$type = props.type,
21942
23260
  type = _props$type === void 0 ? 1 : _props$type,
21943
- other = _objectWithoutProperties(props, _excluded$m);
23261
+ other = _objectWithoutProperties(props, _excluded$p);
21944
23262
  var _useState = React.useState(0),
21945
23263
  _useState2 = _slicedToArray(_useState, 2),
21946
23264
  changeIndex = _useState2[0],
@@ -21991,64 +23309,6 @@ var MsgStatus = function MsgStatus(props) {
21991
23309
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
21992
23310
  };
21993
23311
 
21994
- var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
21995
- var AsyncSelect = function AsyncSelect(props) {
21996
- var mode = props.mode,
21997
- maxSelectCount = props.maxSelectCount,
21998
- _props$showOnly = props.showOnly,
21999
- showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
22000
- getOptionsAsync = props.getOptionsAsync,
22001
- _onChange = props.onChange,
22002
- otherProps = _objectWithoutProperties(props, _excluded$n);
22003
- var _React$useState = React__default['default'].useState([]),
22004
- _React$useState2 = _slicedToArray(_React$useState, 2),
22005
- data = _React$useState2[0],
22006
- setData = _React$useState2[1];
22007
- React__default['default'].useEffect(function () {
22008
- getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
22009
- setData(list);
22010
- });
22011
- }, []);
22012
- var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
22013
- var getValueString = function getValueString(value) {
22014
- var list = options;
22015
- if (mode === 'multiple' && Array.isArray(value)) {
22016
- var _list$filter$map$join;
22017
- return (_list$filter$map$join = list.filter(function (item) {
22018
- return value.includes(item.value);
22019
- }).map(function (item) {
22020
- return item.label;
22021
- }).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
22022
- } else {
22023
- var selectedItem = list.find(function (item) {
22024
- return item.value === value;
22025
- });
22026
- return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
22027
- }
22028
- };
22029
- if (showOnly) {
22030
- return getValueString(props.value);
22031
- }
22032
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
22033
- showArrow: true,
22034
- showSearch: true,
22035
- filterOption: function filterOption(input, option) {
22036
- return option.label.includes(input);
22037
- },
22038
- notFoundContent: null
22039
- }, otherProps), {}, {
22040
- options: options,
22041
- mode: mode,
22042
- onChange: function onChange(value, option) {
22043
- if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
22044
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
22045
- } else {
22046
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
22047
- }
22048
- }
22049
- }));
22050
- };
22051
-
22052
23312
  var CalculationInput = function CalculationInput(props) {
22053
23313
  var _props$config = props.config,
22054
23314
  config = _props$config === void 0 ? {} : _props$config;
@@ -22067,7 +23327,7 @@ var CalculationInput = function CalculationInput(props) {
22067
23327
  }, config === null || config === void 0 ? void 0 : config.unit));
22068
23328
  };
22069
23329
 
22070
- var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
23330
+ var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
22071
23331
  var typeMap$3 = {
22072
23332
  BS_E3_REISSUE_GOODS: {
22073
23333
  key: 'bsE3ReissueGoods',
@@ -22086,7 +23346,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
22086
23346
  disabled = props.disabled,
22087
23347
  type = props.type,
22088
23348
  isSettingConfig = props.isSettingConfig,
22089
- other = _objectWithoutProperties(props, _excluded$o);
23349
+ other = _objectWithoutProperties(props, _excluded$q);
22090
23350
  var getOrderFlag = React.useRef(false);
22091
23351
  var valueRef = React.useRef(null);
22092
23352
  var _useState = React.useState(false),
@@ -22309,11 +23569,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
22309
23569
  })));
22310
23570
  };
22311
23571
 
22312
- var css_248z$d = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
23572
+ var css_248z$f = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
22313
23573
  var styles$6 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
22314
- styleInject(css_248z$d);
23574
+ styleInject(css_248z$f);
22315
23575
 
22316
- var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
23576
+ var _excluded$r = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
22317
23577
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
22318
23578
  var typeMap$4 = {
22319
23579
  GY_REISSUE_GOODS: {
@@ -22343,7 +23603,7 @@ var GyReissue = function GyReissue(props) {
22343
23603
  disabled = props.disabled,
22344
23604
  type = props.type,
22345
23605
  isSettingConfig = props.isSettingConfig,
22346
- other = _objectWithoutProperties(props, _excluded$p);
23606
+ other = _objectWithoutProperties(props, _excluded$r);
22347
23607
  // const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
22348
23608
  // order?.platformCode?.includes(';'),
22349
23609
  // );
@@ -22624,7 +23884,7 @@ var GyReissue = function GyReissue(props) {
22624
23884
  })));
22625
23885
  };
22626
23886
 
22627
- var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
23887
+ var _excluded$s = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
22628
23888
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
22629
23889
  var typeMap$5 = {
22630
23890
  GY_RETURN_GOODS: {
@@ -22654,7 +23914,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
22654
23914
  disabled = props.disabled,
22655
23915
  type = props.type,
22656
23916
  isSettingConfig = props.isSettingConfig,
22657
- other = _objectWithoutProperties(props, _excluded$q);
23917
+ other = _objectWithoutProperties(props, _excluded$s);
22658
23918
  var valueRef = React.useRef({});
22659
23919
  var getOrderFlag = React.useRef(false);
22660
23920
  var _useState = React.useState(false),
@@ -22922,11 +24182,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
22922
24182
  })));
22923
24183
  };
22924
24184
 
22925
- var css_248z$e = ".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";
24185
+ var css_248z$g = ".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";
22926
24186
  var styles$7 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
22927
- styleInject(css_248z$e);
24187
+ styleInject(css_248z$g);
22928
24188
 
22929
- var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
24189
+ var _excluded$t = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
22930
24190
  var Dragger$1 = antd.Upload.Dragger;
22931
24191
  var fn$4 = function fn() {
22932
24192
  return void 0;
@@ -22949,7 +24209,7 @@ var KmVideo = function KmVideo(_ref) {
22949
24209
  canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
22950
24210
  _ref$actionUrl = _ref.actionUrl,
22951
24211
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
22952
- resetProps = _objectWithoutProperties(_ref, _excluded$r);
24212
+ resetProps = _objectWithoutProperties(_ref, _excluded$t);
22953
24213
  var _useState = React.useState(false),
22954
24214
  _useState2 = _slicedToArray(_useState, 2),
22955
24215
  visible = _useState2[0],
@@ -23184,13 +24444,11 @@ var typeMap$6 = {
23184
24444
  }
23185
24445
  },
23186
24446
  asyncGetData: function () {
23187
- var _asyncGetData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(tradeId) {
24447
+ var _asyncGetData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
23188
24448
  return _regeneratorRuntime().wrap(function _callee$(_context) {
23189
24449
  while (1) switch (_context.prev = _context.next) {
23190
24450
  case 0:
23191
- return _context.abrupt("return", kmkfUtils.servers.SKX.querySkxOrderDetailSingleton({
23192
- tid: tradeId
23193
- }).then(function (res) {
24451
+ return _context.abrupt("return", kmkfUtils.servers.SKX.querySkxOrderDetailSingleton(params).then(function (res) {
23194
24452
  var orderDetailInfoList = res.data.orderDetailInfoList || [];
23195
24453
  return orderDetailInfoList;
23196
24454
  }));
@@ -23225,13 +24483,11 @@ var typeMap$6 = {
23225
24483
  }
23226
24484
  },
23227
24485
  asyncGetData: function () {
23228
- var _asyncGetData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(tradeId) {
24486
+ var _asyncGetData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
23229
24487
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
23230
24488
  while (1) switch (_context2.prev = _context2.next) {
23231
24489
  case 0:
23232
- return _context2.abrupt("return", kmkfUtils.servers.SKX.queryReturnOrderDetailSingleton({
23233
- tid: tradeId
23234
- }).then(function (res) {
24490
+ return _context2.abrupt("return", kmkfUtils.servers.SKX.queryReturnOrderDetailSingleton(params).then(function (res) {
23235
24491
  var skqReturnOrderDetailInfoDtos = res.data.skqReturnOrderDetailInfoDtos || [];
23236
24492
  return skqReturnOrderDetailInfoDtos;
23237
24493
  }));
@@ -23296,32 +24552,42 @@ var IdInputSelect = function IdInputSelect(props) {
23296
24552
  }, [value]);
23297
24553
  var asyncQueryData = /*#__PURE__*/function () {
23298
24554
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
23299
- var tradeId;
24555
+ var _form$getFieldValue, _form$getFieldValue$;
24556
+ var tradeId, skxReturnExpressCode, blurFrom;
23300
24557
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
23301
24558
  while (1) switch (_context3.prev = _context3.next) {
23302
24559
  case 0:
23303
24560
  tradeId = form.getFieldValue('m3ap1EvEyd');
24561
+ skxReturnExpressCode = (_form$getFieldValue = form.getFieldValue('4487c6516b')) === null || _form$getFieldValue === void 0 ? void 0 : (_form$getFieldValue$ = _form$getFieldValue[0]) === null || _form$getFieldValue$ === void 0 ? void 0 : _form$getFieldValue$.logisticsCode;
24562
+ blurFrom = form.getFieldValue('skx_return_billNo_blur_from');
23304
24563
  console.log('asyncQueryData---', {
24564
+ skxReturnExpressCode: skxReturnExpressCode,
24565
+ blurFrom: blurFrom,
23305
24566
  tradeId: tradeId,
23306
24567
  tradeIdRef: tradeIdRef.current,
23307
24568
  form: form
23308
24569
  });
23309
- if (tradeId) {
23310
- _context3.next = 5;
24570
+ if (!(type === 'SKX_OUTBOUND_NOTICE_NO' && !tradeId || type === 'SKX_RETURN_BILL_NO' && !tradeId && !skxReturnExpressCode)) {
24571
+ _context3.next = 7;
23311
24572
  break;
23312
24573
  }
23313
24574
  setDataSource([]);
23314
24575
  return _context3.abrupt("return");
23315
- case 5:
24576
+ case 7:
23316
24577
  setSpinning(true);
23317
- typeMap$6[type].asyncGetData(tradeId).then(function (data) {
24578
+ // 判断是从哪个组件失焦,若是从[SKX]退换物流信息(TH)失焦,则根据物流单号查询,若是从订单号组件失焦,则根据订单号查询
24579
+ typeMap$6[type].asyncGetData(type === 'SKX_RETURN_BILL_NO' && blurFrom === '4487c6516b' ? {
24580
+ expressCode: skxReturnExpressCode
24581
+ } : {
24582
+ tid: tradeId
24583
+ }).then(function (data) {
23318
24584
  setDataSource(data);
23319
24585
  }).catch(function () {
23320
24586
  setDataSource([]);
23321
24587
  }).finally(function () {
23322
24588
  setSpinning(false);
23323
24589
  });
23324
- case 7:
24590
+ case 9:
23325
24591
  case "end":
23326
24592
  return _context3.stop();
23327
24593
  }
@@ -23418,7 +24684,14 @@ var IdInputSelect = function IdInputSelect(props) {
23418
24684
  value: value,
23419
24685
  isInput: isInput
23420
24686
  });
23421
- onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && !!isInput);
24687
+ var isReturnBillNoChange = type === 'SKX_RETURN_BILL_NO' && form.getFieldValue('skx_return_billNo_blur_from') === '4487c6516b';
24688
+ onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && (!!isInput || isReturnBillNoChange));
24689
+ // 如果类型是[SKX]退换货单号,则根据blurFrom判断是从[SKX]退换物流信息(TH)失焦,则调用onBlur
24690
+ isReturnBillNoChange && (_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur({
24691
+ target: {
24692
+ value: val
24693
+ }
24694
+ }));
23422
24695
  // 关闭浮窗
23423
24696
  setPopoverVisible(false);
23424
24697
  };