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