@kmkf-fe-packages/basic-components 2.2.10 → 2.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1572 -300
- package/dist/index.js +1567 -294
- package/dist/src/bs/component/GoodItem/constants/index.d.ts +2 -1
- 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 +16 -0
- package/dist/src/common/HighPerformanceTable/multiSelect.d.ts +31 -0
- package/dist/src/jst/Goods/index.d.ts +1 -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, Tooltip, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton, Tag } from 'antd';
|
|
3
|
-
import { EyeOutlined, DeleteOutlined, CloseOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, PlusOutlined, 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, Tooltip, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton, Empty, Tag } from 'antd';
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, CloseOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, PlusOutlined, 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, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } 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, intersection, isEmpty } from 'lodash';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, hasAddNullComponent, 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, updateOrderSubFormGoodsHandle, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, formatTrade, updateSkxGoodsHandle, formatReturnTrade, updateSkxReturnGoodsHandle } 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, intersection, isEmpty } 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) {
|
|
@@ -7225,7 +7227,7 @@ var ApaasUploadFile = function ApaasUploadFile(_ref) {
|
|
|
7225
7227
|
var _ref$maxCount = _ref.maxCount,
|
|
7226
7228
|
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
7227
7229
|
_ref$maxSize = _ref.maxSize,
|
|
7228
|
-
maxSize = _ref$maxSize === void 0 ?
|
|
7230
|
+
maxSize = _ref$maxSize === void 0 ? 200 : _ref$maxSize,
|
|
7229
7231
|
_ref$onChange = _ref.onChange,
|
|
7230
7232
|
onChange = _ref$onChange === void 0 ? fn$3 : _ref$onChange,
|
|
7231
7233
|
_ref$value = _ref.value,
|
|
@@ -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);
|
|
@@ -11808,6 +11810,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11808
11810
|
var _props$value = props.value,
|
|
11809
11811
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11810
11812
|
onChange = props.onChange,
|
|
11813
|
+
_onBlur = props.onBlur,
|
|
11811
11814
|
disabled = props.disabled,
|
|
11812
11815
|
_props$type = props.type,
|
|
11813
11816
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
@@ -11937,6 +11940,9 @@ var jstGoods = function jstGoods(props) {
|
|
|
11937
11940
|
onChange: function onChange(e) {
|
|
11938
11941
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11939
11942
|
},
|
|
11943
|
+
onBlur: function onBlur(e) {
|
|
11944
|
+
return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value);
|
|
11945
|
+
},
|
|
11940
11946
|
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.logisticsCode
|
|
11941
11947
|
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11942
11948
|
disabled: disabled,
|
|
@@ -13261,7 +13267,7 @@ var GoodList = function GoodList(props, ref) {
|
|
|
13261
13267
|
setBrandList(list);
|
|
13262
13268
|
}
|
|
13263
13269
|
} else {
|
|
13264
|
-
reject(res);
|
|
13270
|
+
reject$1(res);
|
|
13265
13271
|
}
|
|
13266
13272
|
}).catch(console.error);
|
|
13267
13273
|
};
|
|
@@ -13417,6 +13423,15 @@ var GoodList = function GoodList(props, ref) {
|
|
|
13417
13423
|
};
|
|
13418
13424
|
var WdtGoodList = /*#__PURE__*/forwardRef(GoodList);
|
|
13419
13425
|
|
|
13426
|
+
// interface GoodModelProps {
|
|
13427
|
+
// shopId: number | string;
|
|
13428
|
+
// maxLength: number;
|
|
13429
|
+
// shopList: any[];
|
|
13430
|
+
// width?: string | number;
|
|
13431
|
+
// shopCode?: string;
|
|
13432
|
+
// companyKey: string;
|
|
13433
|
+
// onSubmit: (...args: any[]) => any;
|
|
13434
|
+
// }
|
|
13420
13435
|
var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
13421
13436
|
useImperativeHandle(ref, function () {
|
|
13422
13437
|
return {
|
|
@@ -13899,6 +13914,15 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
13899
13914
|
};
|
|
13900
13915
|
var BsE3GoodList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
13901
13916
|
|
|
13917
|
+
// interface GoodModelProps {
|
|
13918
|
+
// shopId: number | string;
|
|
13919
|
+
// maxLength: number;
|
|
13920
|
+
// shopList: any[];
|
|
13921
|
+
// width?: string | number;
|
|
13922
|
+
// shopCode?: string;
|
|
13923
|
+
// companyKey: string;
|
|
13924
|
+
// onSubmit: (...args: any[]) => any;
|
|
13925
|
+
// }
|
|
13902
13926
|
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
13903
13927
|
useImperativeHandle(ref, function () {
|
|
13904
13928
|
return {
|
|
@@ -14252,62 +14276,1290 @@ var GoodList$4 = function GoodList(props, ref) {
|
|
|
14252
14276
|
return selectList;
|
|
14253
14277
|
}
|
|
14254
14278
|
};
|
|
14255
|
-
});
|
|
14256
|
-
var _Form$useForm = Form.useForm(),
|
|
14257
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
14258
|
-
form = _Form$useForm2[0];
|
|
14259
|
-
var _useAntdTable = useAntdTable(getTableData$4, {
|
|
14260
|
-
defaultPageSize: 10,
|
|
14261
|
-
form: form
|
|
14262
|
-
}),
|
|
14263
|
-
tableProps = _useAntdTable.tableProps,
|
|
14264
|
-
search = _useAntdTable.search,
|
|
14265
|
-
params = _useAntdTable.params;
|
|
14266
|
-
var submit = search.submit,
|
|
14267
|
-
reset = search.reset;
|
|
14268
|
-
var rowSelection = {
|
|
14269
|
-
selectedRowKeys: selectIds,
|
|
14270
|
-
fixed: true,
|
|
14271
|
-
onSelect: function onSelect(record, selected) {
|
|
14272
|
-
if (selected) {
|
|
14273
|
-
setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
|
|
14274
|
-
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
14275
|
-
} else {
|
|
14276
|
-
setSelectIds(selectIds.filter(function (t) {
|
|
14277
|
-
return t !== record.id;
|
|
14278
|
-
}));
|
|
14279
|
-
setSelect(selectList.filter(function (t) {
|
|
14280
|
-
return t.id !== record.id;
|
|
14281
|
-
}));
|
|
14279
|
+
});
|
|
14280
|
+
var _Form$useForm = Form.useForm(),
|
|
14281
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
14282
|
+
form = _Form$useForm2[0];
|
|
14283
|
+
var _useAntdTable = useAntdTable(getTableData$4, {
|
|
14284
|
+
defaultPageSize: 10,
|
|
14285
|
+
form: form
|
|
14286
|
+
}),
|
|
14287
|
+
tableProps = _useAntdTable.tableProps,
|
|
14288
|
+
search = _useAntdTable.search,
|
|
14289
|
+
params = _useAntdTable.params;
|
|
14290
|
+
var submit = search.submit,
|
|
14291
|
+
reset = search.reset;
|
|
14292
|
+
var rowSelection = {
|
|
14293
|
+
selectedRowKeys: selectIds,
|
|
14294
|
+
fixed: true,
|
|
14295
|
+
onSelect: function onSelect(record, selected) {
|
|
14296
|
+
if (selected) {
|
|
14297
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.id]));
|
|
14298
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
14299
|
+
} else {
|
|
14300
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
14301
|
+
return t !== record.id;
|
|
14302
|
+
}));
|
|
14303
|
+
setSelect(selectList.filter(function (t) {
|
|
14304
|
+
return t.id !== record.id;
|
|
14305
|
+
}));
|
|
14306
|
+
}
|
|
14307
|
+
},
|
|
14308
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
14309
|
+
if (selected) {
|
|
14310
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
14311
|
+
return t.id;
|
|
14312
|
+
}))));
|
|
14313
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
14314
|
+
} else {
|
|
14315
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
14316
|
+
return t.id;
|
|
14317
|
+
})));
|
|
14318
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
14319
|
+
return arrVal.id !== othVal.id;
|
|
14320
|
+
});
|
|
14321
|
+
setSelect(list);
|
|
14322
|
+
}
|
|
14323
|
+
}
|
|
14324
|
+
};
|
|
14325
|
+
var showTable = function showTable() {
|
|
14326
|
+
var handleDelete = function handleDelete(record) {
|
|
14327
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
14328
|
+
return t !== record.id;
|
|
14329
|
+
}));
|
|
14330
|
+
setSelect(selectList.filter(function (t) {
|
|
14331
|
+
return t.id !== record.id;
|
|
14332
|
+
}));
|
|
14333
|
+
};
|
|
14334
|
+
var showColumns = [{
|
|
14335
|
+
dataIndex: '',
|
|
14336
|
+
title: "\u64CD\u4F5C",
|
|
14337
|
+
ellipsis: true,
|
|
14338
|
+
width: 100,
|
|
14339
|
+
render: function render(val, record) {
|
|
14340
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
14341
|
+
type: "link",
|
|
14342
|
+
onClick: function onClick() {
|
|
14343
|
+
return handleDelete(record);
|
|
14344
|
+
}
|
|
14345
|
+
}, "\u5220\u9664");
|
|
14346
|
+
}
|
|
14347
|
+
}].concat(takeRight(columns, columns.length - 1));
|
|
14348
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
14349
|
+
style: {
|
|
14350
|
+
width: '100%',
|
|
14351
|
+
maxWidth: '387px'
|
|
14352
|
+
}
|
|
14353
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
14354
|
+
columns: showColumns,
|
|
14355
|
+
rowKey: 'id',
|
|
14356
|
+
dataSource: selectList,
|
|
14357
|
+
scroll: {
|
|
14358
|
+
x: '100%',
|
|
14359
|
+
y: 250
|
|
14360
|
+
},
|
|
14361
|
+
pagination: {
|
|
14362
|
+
size: 'small',
|
|
14363
|
+
total: selectIds.length,
|
|
14364
|
+
pageSize: 10,
|
|
14365
|
+
showSizeChanger: false
|
|
14366
|
+
}
|
|
14367
|
+
})) : null;
|
|
14368
|
+
};
|
|
14369
|
+
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
14370
|
+
active: true,
|
|
14371
|
+
loading: loading
|
|
14372
|
+
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
14373
|
+
searchFormData: searchFormData$3,
|
|
14374
|
+
form: form,
|
|
14375
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
14376
|
+
submit: submit,
|
|
14377
|
+
reset: reset
|
|
14378
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
14379
|
+
style: {
|
|
14380
|
+
marginTop: '4px'
|
|
14381
|
+
}
|
|
14382
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
14383
|
+
rowSelection: rowSelection,
|
|
14384
|
+
rowKey: "id",
|
|
14385
|
+
columns: columns,
|
|
14386
|
+
scroll: {
|
|
14387
|
+
x: '100%',
|
|
14388
|
+
y: 250
|
|
14389
|
+
}
|
|
14390
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
14391
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14392
|
+
return triggerNode.parentElement;
|
|
14393
|
+
},
|
|
14394
|
+
content: showTable(),
|
|
14395
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
14396
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
14397
|
+
danger: true,
|
|
14398
|
+
type: "text"
|
|
14399
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
14400
|
+
};
|
|
14401
|
+
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
|
|
14402
|
+
|
|
14403
|
+
function always(value) {
|
|
14404
|
+
return function () {
|
|
14405
|
+
return value;
|
|
14406
|
+
};
|
|
14407
|
+
}
|
|
14408
|
+
var arrayUtils = {
|
|
14409
|
+
diff: function diff(arr1, arr2) {
|
|
14410
|
+
var set = new Set(arr2);
|
|
14411
|
+
return arr1.filter(function (x) {
|
|
14412
|
+
return !set.has(x);
|
|
14413
|
+
});
|
|
14414
|
+
},
|
|
14415
|
+
merge: function merge(arr1, arr2) {
|
|
14416
|
+
var set = new Set(arr1);
|
|
14417
|
+
return arr1.concat(arr2.filter(function (x) {
|
|
14418
|
+
return !set.has(x);
|
|
14419
|
+
}));
|
|
14420
|
+
}
|
|
14421
|
+
};
|
|
14422
|
+
function multiSelect() {
|
|
14423
|
+
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14424
|
+
return function multiSelectStep(pipeline) {
|
|
14425
|
+
var _opts$isDisabled, _opts$clickArea, _ref, _ref2, _opts$value, _pipeline$getStateAtK, _ref3, _ref4, _opts$lastKey, _pipeline$getStateAtK2, _opts$checkboxPlaceme;
|
|
14426
|
+
var stateKey = 'multiSelect';
|
|
14427
|
+
var Checkbox = pipeline.ctx.components.Checkbox;
|
|
14428
|
+
if (Checkbox == null) {
|
|
14429
|
+
throw new Error('使用 multiSelect 之前需要设置 pipeline.ctx.components.Checkbox');
|
|
14430
|
+
}
|
|
14431
|
+
var primaryKey = pipeline.ensurePrimaryKey('multiSelect');
|
|
14432
|
+
var isDisabled = (_opts$isDisabled = opts.isDisabled) !== null && _opts$isDisabled !== void 0 ? _opts$isDisabled : always(false);
|
|
14433
|
+
var clickArea = (_opts$clickArea = opts.clickArea) !== null && _opts$clickArea !== void 0 ? _opts$clickArea : 'checkbox';
|
|
14434
|
+
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 : [];
|
|
14435
|
+
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 : '';
|
|
14436
|
+
var _onChange = function onChange(nextValue, key, keys, action) {
|
|
14437
|
+
var _opts$onChange;
|
|
14438
|
+
(_opts$onChange = opts.onChange) === null || _opts$onChange === void 0 ? void 0 : _opts$onChange.call(opts, nextValue, key, keys, action);
|
|
14439
|
+
pipeline.setStateAtKey(stateKey, {
|
|
14440
|
+
value: nextValue,
|
|
14441
|
+
lastKey: key
|
|
14442
|
+
}, {
|
|
14443
|
+
keys: keys,
|
|
14444
|
+
action: action
|
|
14445
|
+
});
|
|
14446
|
+
};
|
|
14447
|
+
var dataSource = pipeline.getDataSource();
|
|
14448
|
+
/** dataSource 中包含的所有 keys */
|
|
14449
|
+
var fullKeySet = new Set();
|
|
14450
|
+
/** 所有有效的 keys(disable 状态为 false) */
|
|
14451
|
+
var allKeys = [];
|
|
14452
|
+
var getPrimaryKey = function getPrimaryKey(key) {
|
|
14453
|
+
var _ref5 = (key === null || key === void 0 ? void 0 : key.split('-')) || [],
|
|
14454
|
+
_ref6 = _slicedToArray(_ref5, 1),
|
|
14455
|
+
lastKey = _ref6[0];
|
|
14456
|
+
return lastKey;
|
|
14457
|
+
};
|
|
14458
|
+
dataSource.forEach(function (row, rowIndex) {
|
|
14459
|
+
var rowKey = internals.safeGetRowKey(primaryKey, row, rowIndex);
|
|
14460
|
+
rowKey = getPrimaryKey(rowKey);
|
|
14461
|
+
fullKeySet.add(rowKey);
|
|
14462
|
+
// 在 allKeys 中排除被禁用的 key
|
|
14463
|
+
if (!isDisabled(row, rowIndex) && !allKeys.includes(rowKey)) {
|
|
14464
|
+
allKeys.push(rowKey);
|
|
14465
|
+
}
|
|
14466
|
+
});
|
|
14467
|
+
var set = new Set(value);
|
|
14468
|
+
var isAllChecked = allKeys.length > 0 && allKeys.every(function (key) {
|
|
14469
|
+
return set.has(key);
|
|
14470
|
+
});
|
|
14471
|
+
var isAnyChecked = allKeys.some(function (key) {
|
|
14472
|
+
return set.has(key);
|
|
14473
|
+
});
|
|
14474
|
+
var defaultCheckboxColumnTitle = /*#__PURE__*/React.createElement(Checkbox, {
|
|
14475
|
+
checked: isAllChecked,
|
|
14476
|
+
indeterminate: !isAllChecked && isAnyChecked,
|
|
14477
|
+
onChange: function onChange(_) {
|
|
14478
|
+
if (isAllChecked) {
|
|
14479
|
+
_onChange(arrayUtils.diff(value, allKeys), '', allKeys, 'uncheck-all');
|
|
14480
|
+
} else {
|
|
14481
|
+
_onChange(arrayUtils.merge(value, allKeys), '', allKeys, 'check-all');
|
|
14482
|
+
}
|
|
14483
|
+
}
|
|
14484
|
+
});
|
|
14485
|
+
var checkboxColumn = _objectSpread2(_objectSpread2({
|
|
14486
|
+
name: '是否选中',
|
|
14487
|
+
title: defaultCheckboxColumnTitle,
|
|
14488
|
+
width: 50,
|
|
14489
|
+
align: 'center'
|
|
14490
|
+
}, opts.checkboxColumn), {}, {
|
|
14491
|
+
getCellProps: function getCellProps(value, row, rowIndex) {
|
|
14492
|
+
var rowKey = internals.safeGetRowKey(primaryKey, row, rowIndex);
|
|
14493
|
+
rowKey = getPrimaryKey(rowKey);
|
|
14494
|
+
if (fullKeySet.has(rowKey) && clickArea === 'cell') {
|
|
14495
|
+
var prevChecked = set.has(rowKey);
|
|
14496
|
+
var disabled = isDisabled(row, rowIndex);
|
|
14497
|
+
return {
|
|
14498
|
+
style: {
|
|
14499
|
+
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
14500
|
+
},
|
|
14501
|
+
onClick: disabled ? undefined : function (e) {
|
|
14502
|
+
if (opts.stopClickEventPropagation) {
|
|
14503
|
+
e.stopPropagation();
|
|
14504
|
+
}
|
|
14505
|
+
onCheckboxChange(prevChecked, rowKey, e.shiftKey);
|
|
14506
|
+
}
|
|
14507
|
+
};
|
|
14508
|
+
}
|
|
14509
|
+
return {};
|
|
14510
|
+
},
|
|
14511
|
+
features: {
|
|
14512
|
+
autoRowSpan: function autoRowSpan(prevValue, value, prevRow, row) {
|
|
14513
|
+
var lastKey = getPrimaryKey(prevRow === null || prevRow === void 0 ? void 0 : prevRow.rowKey);
|
|
14514
|
+
var currentKey = getPrimaryKey(row === null || row === void 0 ? void 0 : row.rowKey);
|
|
14515
|
+
return lastKey === currentKey;
|
|
14516
|
+
}
|
|
14517
|
+
},
|
|
14518
|
+
render: function render(_, row, rowIndex) {
|
|
14519
|
+
var key = internals.safeGetRowKey(primaryKey, row, rowIndex);
|
|
14520
|
+
key = getPrimaryKey(key);
|
|
14521
|
+
var checked = set.has(key);
|
|
14522
|
+
return /*#__PURE__*/React.createElement(Checkbox, {
|
|
14523
|
+
checked: checked,
|
|
14524
|
+
disabled: isDisabled(row, rowIndex),
|
|
14525
|
+
onChange: clickArea === 'checkbox' ? function (arg1, arg2) {
|
|
14526
|
+
var _arg2$nativeEvent;
|
|
14527
|
+
// 这里要同时兼容 antd 和 fusion 的用法
|
|
14528
|
+
// fusion: arg2?.nativeEvent
|
|
14529
|
+
// antd: arg1.nativeEvent
|
|
14530
|
+
var nativeEvent = (_arg2$nativeEvent = arg2 === null || arg2 === void 0 ? void 0 : arg2.nativeEvent) !== null && _arg2$nativeEvent !== void 0 ? _arg2$nativeEvent : arg1.nativeEvent;
|
|
14531
|
+
if (nativeEvent) {
|
|
14532
|
+
if (opts.stopClickEventPropagation) {
|
|
14533
|
+
nativeEvent.stopPropagation();
|
|
14534
|
+
}
|
|
14535
|
+
onCheckboxChange(checked, key, nativeEvent.shiftKey);
|
|
14536
|
+
}
|
|
14537
|
+
} : undefined
|
|
14538
|
+
});
|
|
14539
|
+
}
|
|
14540
|
+
});
|
|
14541
|
+
var nextColumns = pipeline.getColumns().slice();
|
|
14542
|
+
var checkboxPlacement = (_opts$checkboxPlaceme = opts.checkboxPlacement) !== null && _opts$checkboxPlaceme !== void 0 ? _opts$checkboxPlaceme : 'start';
|
|
14543
|
+
if (checkboxPlacement === 'start') {
|
|
14544
|
+
nextColumns.unshift(checkboxColumn);
|
|
14545
|
+
} else {
|
|
14546
|
+
nextColumns.push(checkboxColumn);
|
|
14547
|
+
}
|
|
14548
|
+
pipeline.columns(nextColumns);
|
|
14549
|
+
pipeline.appendRowPropsGetter(function (row, rowIndex) {
|
|
14550
|
+
var rowKey = internals.safeGetRowKey(primaryKey, row, rowIndex);
|
|
14551
|
+
rowKey = getPrimaryKey(rowKey);
|
|
14552
|
+
if (!fullKeySet.has(rowKey)) {
|
|
14553
|
+
// rowKey 不在 fullKeySet 中说明这一行是在 multiSelect 之后才生成的,multiSelect 不对之后生成的行进行处理
|
|
14554
|
+
return {};
|
|
14555
|
+
}
|
|
14556
|
+
var style = {};
|
|
14557
|
+
var className = '';
|
|
14558
|
+
var onClick;
|
|
14559
|
+
var checked = set.has(rowKey);
|
|
14560
|
+
if (opts.highlightRowWhenSelected && checked) {
|
|
14561
|
+
className = 'highlight';
|
|
14562
|
+
}
|
|
14563
|
+
if (clickArea === 'row') {
|
|
14564
|
+
var disabled = isDisabled(row, rowIndex);
|
|
14565
|
+
if (!disabled) {
|
|
14566
|
+
style.cursor = 'pointer';
|
|
14567
|
+
onClick = function onClick(e) {
|
|
14568
|
+
if (opts.stopClickEventPropagation) {
|
|
14569
|
+
e.stopPropagation();
|
|
14570
|
+
}
|
|
14571
|
+
onCheckboxChange(checked, rowKey, e.shiftKey);
|
|
14572
|
+
};
|
|
14573
|
+
}
|
|
14574
|
+
}
|
|
14575
|
+
return {
|
|
14576
|
+
className: className,
|
|
14577
|
+
style: style,
|
|
14578
|
+
onClick: onClick
|
|
14579
|
+
};
|
|
14580
|
+
});
|
|
14581
|
+
return pipeline;
|
|
14582
|
+
function onCheckboxChange(prevChecked, key, batch) {
|
|
14583
|
+
var batchKeys = [key];
|
|
14584
|
+
if (batch && lastKey) {
|
|
14585
|
+
var lastIdx = allKeys.indexOf(lastKey);
|
|
14586
|
+
var cntIdx = allKeys.indexOf(key);
|
|
14587
|
+
var _ref7 = lastIdx < cntIdx ? [lastIdx, cntIdx] : [cntIdx, lastIdx],
|
|
14588
|
+
_ref8 = _slicedToArray(_ref7, 2),
|
|
14589
|
+
start = _ref8[0],
|
|
14590
|
+
end = _ref8[1];
|
|
14591
|
+
batchKeys = allKeys.slice(start, end + 1);
|
|
14592
|
+
}
|
|
14593
|
+
if (prevChecked) {
|
|
14594
|
+
_onChange && _onChange(arrayUtils.diff(value, batchKeys), key, batchKeys, 'uncheck');
|
|
14595
|
+
} else {
|
|
14596
|
+
_onChange && _onChange(arrayUtils.merge(value, batchKeys), key, batchKeys, 'check');
|
|
14597
|
+
}
|
|
14598
|
+
}
|
|
14599
|
+
};
|
|
14600
|
+
}
|
|
14601
|
+
|
|
14602
|
+
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";
|
|
14603
|
+
styleInject(css_248z$b);
|
|
14604
|
+
|
|
14605
|
+
var _excluded$e = ["children"];
|
|
14606
|
+
var Cell = function Cell(_ref) {
|
|
14607
|
+
var tdProps = _ref.tdProps;
|
|
14608
|
+
var children = tdProps.children,
|
|
14609
|
+
otherProps = _objectWithoutProperties(tdProps, _excluded$e);
|
|
14610
|
+
return /*#__PURE__*/React.createElement("td", _objectSpread2({}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
14611
|
+
className: "cell-content"
|
|
14612
|
+
}, children));
|
|
14613
|
+
};
|
|
14614
|
+
var HighPerformanceTable = function HighPerformanceTable(_ref2) {
|
|
14615
|
+
var _ref2$disabledIds = _ref2.disabledIds,
|
|
14616
|
+
disabledIds = _ref2$disabledIds === void 0 ? [] : _ref2$disabledIds,
|
|
14617
|
+
_ref2$useSelectCol = _ref2.useSelectCol,
|
|
14618
|
+
useSelectCol = _ref2$useSelectCol === void 0 ? true : _ref2$useSelectCol,
|
|
14619
|
+
selectedKeys = _ref2.selectedKeys,
|
|
14620
|
+
handleChangeSelectedKeys = _ref2.handleChangeSelectedKeys,
|
|
14621
|
+
dataSource = _ref2.dataSource,
|
|
14622
|
+
columns = _ref2.columns,
|
|
14623
|
+
height = _ref2.height,
|
|
14624
|
+
loading = _ref2.loading,
|
|
14625
|
+
className = _ref2.className,
|
|
14626
|
+
onRow = _ref2.onRow;
|
|
14627
|
+
// console.debug('selectedKeys', selectedKeys);
|
|
14628
|
+
var _useState = useState(),
|
|
14629
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14630
|
+
lastClickRowIndex = _useState2[0],
|
|
14631
|
+
setLastClickRowIndex = _useState2[1];
|
|
14632
|
+
var pipeline = useTablePipeline({
|
|
14633
|
+
components: {
|
|
14634
|
+
Checkbox: Checkbox
|
|
14635
|
+
}
|
|
14636
|
+
}).input({
|
|
14637
|
+
dataSource: dataSource,
|
|
14638
|
+
columns: columns
|
|
14639
|
+
}).primaryKey('rowKey').use(features.columnRangeHover()) // 高亮展示
|
|
14640
|
+
.use(features.columnResize({
|
|
14641
|
+
handleHoverBackground: '#aaa',
|
|
14642
|
+
handleActiveBackground: '#89bff7'
|
|
14643
|
+
}));
|
|
14644
|
+
if (useSelectCol) {
|
|
14645
|
+
pipeline.use(multiSelect({
|
|
14646
|
+
value: selectedKeys,
|
|
14647
|
+
isDisabled: function isDisabled(value) {
|
|
14648
|
+
return disabledIds.includes(value === null || value === void 0 ? void 0 : value.id);
|
|
14649
|
+
},
|
|
14650
|
+
onChange: handleChangeSelectedKeys,
|
|
14651
|
+
highlightRowWhenSelected: true,
|
|
14652
|
+
checkboxPlacement: 'start',
|
|
14653
|
+
checkboxColumn: {
|
|
14654
|
+
lock: true
|
|
14655
|
+
},
|
|
14656
|
+
clickArea: 'cell',
|
|
14657
|
+
stopClickEventPropagation: true
|
|
14658
|
+
}));
|
|
14659
|
+
}
|
|
14660
|
+
pipeline.use(features.autoRowSpan());
|
|
14661
|
+
// FIXME: 自定义列头宽度暂时有实现难度,暂缓实现
|
|
14662
|
+
// pipeline.use(
|
|
14663
|
+
// features.columnResize({
|
|
14664
|
+
// onChangeSizes(sizeList) {
|
|
14665
|
+
// console.log('sizeList', sizeList);
|
|
14666
|
+
// },
|
|
14667
|
+
// }),
|
|
14668
|
+
// );
|
|
14669
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BaseTable, _objectSpread2(_objectSpread2({
|
|
14670
|
+
style: {
|
|
14671
|
+
maxHeight: height,
|
|
14672
|
+
overflow: 'auto',
|
|
14673
|
+
'--bgcolor': 'transparent',
|
|
14674
|
+
'--font-size': '13px',
|
|
14675
|
+
'--cell-padding': '0px'
|
|
14676
|
+
},
|
|
14677
|
+
className: "high-performance-table ".concat(className),
|
|
14678
|
+
useOuterBorder: true
|
|
14679
|
+
}, pipeline.getProps()), {}, {
|
|
14680
|
+
components: {
|
|
14681
|
+
EmptyContent: Empty,
|
|
14682
|
+
Cell: Cell
|
|
14683
|
+
},
|
|
14684
|
+
primaryKey: "rowKey",
|
|
14685
|
+
getRowProps: function getRowProps(record, rowIndex) {
|
|
14686
|
+
return {
|
|
14687
|
+
style: (record === null || record === void 0 ? void 0 : record.id) === lastClickRowIndex ? {
|
|
14688
|
+
'--hover-bgcolor': 'transparent',
|
|
14689
|
+
background: 'rgba(196, 197, 199, 0.2)'
|
|
14690
|
+
} : {
|
|
14691
|
+
backgroundColor: 'transparent'
|
|
14692
|
+
},
|
|
14693
|
+
onClick: function onClick() {
|
|
14694
|
+
setLastClickRowIndex(record === null || record === void 0 ? void 0 : record.id); // TODO: 使用id就是强业务相关了,这里要求同一条工单需要id相同,rowKey不同
|
|
14695
|
+
typeof onRow === 'function' && onRow(record, rowIndex);
|
|
14696
|
+
}
|
|
14697
|
+
};
|
|
14698
|
+
},
|
|
14699
|
+
useVirtual: true,
|
|
14700
|
+
isLoading: loading
|
|
14701
|
+
})));
|
|
14702
|
+
};
|
|
14703
|
+
|
|
14704
|
+
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";
|
|
14705
|
+
styleInject(css_248z$c);
|
|
14706
|
+
|
|
14707
|
+
var TrimInput = function TrimInput(props) {
|
|
14708
|
+
var handleBlur = function handleBlur(e) {
|
|
14709
|
+
// 去除头尾空格
|
|
14710
|
+
e.target.value = e.target.value.trim();
|
|
14711
|
+
var onChange = props.onChange,
|
|
14712
|
+
onBlur = props.onBlur;
|
|
14713
|
+
// 主动调 onChange,将数据同步给 Form
|
|
14714
|
+
onChange(e);
|
|
14715
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
14716
|
+
};
|
|
14717
|
+
return /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
14718
|
+
onBlur: handleBlur
|
|
14719
|
+
}));
|
|
14720
|
+
};
|
|
14721
|
+
|
|
14722
|
+
var Rate = function Rate(_ref) {
|
|
14723
|
+
var value = _ref.value,
|
|
14724
|
+
_onChange = _ref.onChange,
|
|
14725
|
+
placeholder = _ref.placeholder,
|
|
14726
|
+
prefix = _ref.prefix;
|
|
14727
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(InputNumber, {
|
|
14728
|
+
prefix: prefix,
|
|
14729
|
+
style: {
|
|
14730
|
+
width: '150px'
|
|
14731
|
+
},
|
|
14732
|
+
value: value === null || value === void 0 ? void 0 : value[0],
|
|
14733
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder[0],
|
|
14734
|
+
onChange: function onChange(val) {
|
|
14735
|
+
_onChange([val ? Number(val) : val, value === null || value === void 0 ? void 0 : value[1]]);
|
|
14736
|
+
}
|
|
14737
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
14738
|
+
style: {
|
|
14739
|
+
padding: '0px 8px'
|
|
14740
|
+
}
|
|
14741
|
+
}, "-"), /*#__PURE__*/React.createElement(InputNumber, {
|
|
14742
|
+
prefix: prefix,
|
|
14743
|
+
style: {
|
|
14744
|
+
width: '150px'
|
|
14745
|
+
},
|
|
14746
|
+
value: value === null || value === void 0 ? void 0 : value[1],
|
|
14747
|
+
placeholder: placeholder === null || placeholder === void 0 ? void 0 : placeholder[1],
|
|
14748
|
+
onChange: function onChange(val) {
|
|
14749
|
+
_onChange([value === null || value === void 0 ? void 0 : value[0], val ? Number(val) : val]);
|
|
14750
|
+
}
|
|
14751
|
+
}));
|
|
14752
|
+
};
|
|
14753
|
+
|
|
14754
|
+
var reject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAA5uSURBVHic7Z1BbBNXGsf/b+zYScckjUGMWTCVanFI1bVPSMgcYCvFFWorEaRWPcSRKi1S6TkcyqVwaQ/k3KBupWpJTq2UIBUpqiMhOOCNlJO9CB+QkUposVnqQDJDYjue2YM9IXHsmTeeeTOONb8LIhmPX/z3+973vu973xAY5Nzss/dqW9UzIOQDQDlBCDmqKMowAI/Re7loUiOErCqK8gdAHkFR7ni8ffcWxo88NHITQnNR4maBh7x5HpznKyjKKQBcR0N2MYsMQpYg174H138rNRGS9F6gK3Dip98/AUe+BfC+JUN0sYoHkJUrqS/e+VXrorYCf/jzSlDZlL+DQv4Jd8Z2KzKI8iPp577+7bNwqdUFLQU+96+nx2o+5RdAOcV2fC7WQJY8FfLpwsVjT/f8pvkHdXHlFIARW8bmYhU5T4VLNIu8y/R++PNKsD5zXXH3ISM1n/LLhz+vBHf+cJfAyqb8nWuW9zPKqbqGb9g20Q1v+RZch2q/I0NWzqveNQEa+1ylsgR3K9QrPADxnUpNhKT6bJU3z8MVt5d4v6Fpwxxznq8cHY6L9TQ0Jedmn71Xq1X/C3ft7TVkj6fv71xtq3oGrri9CFfbqp7h6lkhl56EkA84QDnh9DhcWKGc4AghR50ehgsbCCFHuUay3qUHURRlmINbidHLeFzvucdxBe5xXIF7HFdgRsSPD2Du86P48uTbiIb8jo2DJP79RHHs3XsU3sdh+uMQhMAb/zVbKCNTLGM+tw6pIts2Fi+rG/M+DgEfVVWuZYgVxdCHx/s4Jh92Mja0S1wAiIb8iIb8SMYGkS2UkV7ZQCovMReb2QwejfCYPB3Uv9BC5nPruLH8kuraZGwIYyMBzOVES2eVkb9bqsi4evcFsoWyJe/dip5ag8UK3Xd1bOQAxmOD4H0ckrFBzFw4gvHYEHifuY9DCHhx6eTb1Nen8q+Zigv0mMA0jEZ4fNkkghVC8z4O1xOHqV9bFGuYybwy/D5G6SmBi+KW5u/1zGez0Ea4evbQnnVXi6n0X7Y4Wz0lsBaRYB+1+VSFvnnhb1RbnMnTQUNbofmcyNw0q/SUwO1mRCTYZ8h8qggBD64nDuN64jCEQOsNRzI2hNEIT33PbKGMG8urhsZhhp4SWKy2Fjgq9JtyoKIhP25eOIIvTw7vuk8yNoTx2CD1fYpiDVPplkeImMFsH+wE7dbg+dw60isbSMYGDc22ZsZGAkhE3sJMZg2RYJ+he0kVGdfu/k/XT7AaZvtg3schEuyz7H7x8FsYGwloXjMx9yeKYk3zmmjIj2R0yPbw4bW7L5B+smHrewIMZ7BUkS11JARef6g0++BsoYzLhee2Cn1j+aUj4gL7aA0OUKyhRrYd2UIZl1PPMXW/xHS7MptZw3xundn99dg3Aus5SZ2KtJiXkJx7hpnMmuVCz2bWbAlmaLFvBNZLXNCGKVshVWTMZl7h0u2iZctKN4gL2ORF8z4O8fAAgPqHKVbl+r+NGUOTBaIx0WYpilu4nKqvz1fPHjK3tRL8zLJVRrBF4Jjg182wzGTWMGviG2/V9kMIeDE2csB04iEa8mPmwhFMpUuOOViAjTPYLHpedFEyL7DRwIUevI/DN2cPYT4nYibzypHZ3DWBDidN9GiEb5mkt4qxkQDi4QFMpf+yLQatYovANOKIOgLrWQG917ciGvJjMn6QmbA7UePa8znR1lj0vjHRVnrR0ZAfYyMHth0/OxkbCSAy3IepdMmWsGXXmGi9NVTvS0LzYY1GeCQivOnoVVGsYT63jnh4oKN7RUN+TH8sMC/XAWwSOGTSBJoxoULAi6jgt2yNzRbK27NvPreOsZEDSDbKf4ygVoCw3i93zwzWmIE0a3izBYiHBxA/PmAqe9RMKzHUTNU3Zw91lFwZjw0iKvhx9e4LJl72vliDaV6vfkEiwT5Mxg/iXQszWUWxhsup522/hGqARK3UNEo05Ec8PIDFvG7zWMPYEqoM9NEI1D7NR5NJUsmXqpbVOxXFGm4sv2ykIbXXeKki48byKq51MBNnM2tMxAVsErhduQstVCZ6xxckX6ri6t0Xpt5zMS/hcuq54UxQ+skGLt0uIl+qUr8PyzW4K5INekl6fQ967+uzhTKm7hsvj1HN8dT9zrcxqsmez4ma1+VLVUxTFup3ii1rsJ73qmfSOvXCF/MSQgEvVfhRrVO2ylSqJrsobu2pw1bfrxNzbhTmAtM4SGajWFozTTV/7US2Wthm5nPryK9WdmWn7KzPYm6iaQ6g6QU5QiYTDTOZV3syOkWxhqn7JUzM/clMXJVsoYxLt4vbS8n08kvqNdoszGdwt8Shp9IlTAdDyK9WMJ9btz3or67LrLZD7egSE60dR9Zbw/WcNKBuFifm/tzzc97HISb4ET8+gMiwD5Op56bXxbGRAISAF/lSFdni5vb41OiXnTAXmGYPq7UW0YQXjWaSoiE/okI/YoJ/TyzZ7AyrH3vZfYCtKNaQLW4iX6oiv1pBvlS1LTfcFSZa64+l2UM/Xq1QjWXydBDx8ICmVbkwcsCUwJFg3577CwEPRgM8RiP1/0sVeTsgQ2N9zMDcyaIKM2o4SXT10MZO9WvxbrDPVMF+giL2zfs4CAEvc3EBGwSm2cNqCWQ0iqXFTGaN6rqxkQNU1zWzs7hQj5RNjlZXOFlJjbO4UaFf9/XXE4f3/Cy9srHHoSmKW8gWyro53NEIj5nMmuF9aiLCUydW7HK2mAust4cFYDql10qwdmY/lZeokvTJ2KDhUCeNeQbq+2K7nKyuWINZUGhjthfzEpVJH43whpIk0ZCfOkVp51aJ+advR0GbUbLFTarrkgZKaJNRupYPUkVGpmhfkIWpwE6Kqx2fpnO2aGex2gOLhrmcaGt9NFOB7Thu0glFcYt6r9sqE9SMkdlrdySLqQLvDvtY3t4UtLM4Htau6xo1UKVp9+wFengG62WYjMzidts4NSxJgxOzF2C8TUrlJaRXXmte00k0Jx4ewDf/ONTpsLaZyaxRbdGEgAfJ2NCe0hojpbhOzF6AscBSRYZEFyY2hJEqS71r5nMiVSXkeGwQmeLmdpqxfjqCroLSqdkLdElNlpPM59aprchk/CB4Hwfex2EyfpD6PVh0D6BlXwpMs3WhFa0oblFXNQoBDy6dfBuT8SC1ac4Wym6PDqehjW4Bda85fpz+0NpM1u3RYRi9DFUnjhuLI5129qRsR9ecTdqJEPAiMtyHaMiPyLAPM9lXzD+o9MoGFvOSZWeZ7GoXrIfjAqsd8SLDvm1Bm9e3QK6pQkInQ9WpQzOTWUNU6LckxGpXu2A9bBdYFVEVlSYD0+xU6QVQCh3261AdLrOPIpjNrDlumlWYPpRDFVEIeBAT+js+8de872XVFA2oO1yxkL9jU50tlLvCNKtYLnAyNoR4eMDS45vNTpWeCe2kX8dOppdfdmSqnWgXrIflXjTvI5aKC+xec62os9bjwsiBrsxjd4LlArOoFNy55lIdhenwzI8Q8OJ64nDHvbLUTjpWtlE2i+UC5ylrlGnJFsq4v/LmXFGEIgXZyRocDflxPXHYdIMWVWQrW0eYwfI12Kz3mC2UkV+tIL2y0fIEgNk662aEgNd0J/hmeB+HydNBhAJexx0uJl7041KVah1WK/zTKxvIr1aovhw0ceh2BXfNsO5wpzZYsasnViuYCFyQtloKXBRr9dn5ZAOPG2d0jKIXpqynKLVNtJ0d7tSeWE41JWUicLZQRjw8sG1u6/9WLfkW663BWh406xnbDiebkjIROJWXmKTIeB+na/pbOXlWCavGlzu9l/rUlrmcaKp1shGYCMzqG0qz/VCthOo8WRVbzpequHb3Rf34S7HceFiW8fuqT1VLRHhbus/uqwdEj8eGdIvR0082EAp4LQ22tOpwp+6ZzX55soUy02zZvhJ47vOjth6F0WvQYpXI6nupS5uVFnDfJPybHyvHGrURmlZpbVHcwqXbBUt6bggBD+LhActLjR3NB4/HhpCI8CiKW7uCEzv3sQEfQTz8FtUsyRbKKEpbpoIWRtsqSRUZU/dLyJeqVKcg2pEvVXHZgv4gzTgq8GJeQjI22BDP/BPIMsUyFvNSx46VmW2M2g+rk/01K3EBh020kdMFNPxn5bWhKkmVxbyEiblnuLG8aupDrvfDKhgKaLDueOf4GmxVK4NsobwdGVvMS1ReqSqsmb6UzdS72L1otB/WDplKFVmzTbEVOC6wFafdpYq8J9GulXjf+dxCVh+uOpu1GpJOL79kHqN2vOgOqK9Bnabp2s0C1fyrDpdUkZFe2eio90anqA1J0yuv9zzpdD4n2tLxrisEzhT1G6O0Qq8T+0xmDQLvbRyC23CsyrH5kbaCjWnErgh0GDkt+LjRLS5Fuc52I3Y+07ArBAZoCun0H2DpspeuMNEAm1ouly7wol3YwgFwp07vUuMIIfY9KdHFVgghq5yiKH84PRAXNiiK8gcHkEdOD8SFFeQRB0W54/QwXBihKHc4j7fvHgB3g9l7yB5v3z1uYfzIQxCy5PRoXCyGkKWF8SMP6/tgufa9w8NxsZqGpnWBuf5bAB44OR4XS3nQ0LQucGoiJEFWrsBdi3sBGbJyJTURkoAdocrUF+/8CqL86Ny4XCyBKD+mvnjnV/W/u2LRpJ/7GnAdrv0LWapr+IZdAv/2WbjkqZBPAeRsHZeLFeQ8FfLpb5+Fd9Uq7ckmLVw89tRT4RLuTN5PkCVPhUssXDz2tPk3LdOFCxePPSUD+AhE+QGu49XNyCDKD2QAH7USFwB0O5okfvr9E3DkWwDvWz48FzM8gKxc2elQtUK/ZQ2AxM0CD3nzPDjPV1CUU3ALBZxCBiFLkGvfg+u/pW6FtKASeCfnZp+9V9uqngEhHwDKCULIUUVRhgH0RmOp7qFGCFmtp3PJIyjKHY+3797C+JGHRm7yfxiRDd4QgqAeAAAAAElFTkSuQmCC";
|
|
14755
|
+
|
|
14756
|
+
var reminder = "data:image/png;base64,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";
|
|
14757
|
+
|
|
14758
|
+
var _excluded$f = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
|
|
14759
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
14760
|
+
var mode = props.mode,
|
|
14761
|
+
maxSelectCount = props.maxSelectCount,
|
|
14762
|
+
_props$showOnly = props.showOnly,
|
|
14763
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
14764
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
14765
|
+
_onChange = props.onChange,
|
|
14766
|
+
otherProps = _objectWithoutProperties(props, _excluded$f);
|
|
14767
|
+
var _React$useState = React.useState([]),
|
|
14768
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
14769
|
+
data = _React$useState2[0],
|
|
14770
|
+
setData = _React$useState2[1];
|
|
14771
|
+
React.useEffect(function () {
|
|
14772
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
14773
|
+
setData(list);
|
|
14774
|
+
});
|
|
14775
|
+
}, []);
|
|
14776
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
14777
|
+
var getValueString = function getValueString(value) {
|
|
14778
|
+
var list = options;
|
|
14779
|
+
if (mode === 'multiple' && Array.isArray(value)) {
|
|
14780
|
+
var _list$filter$map$join;
|
|
14781
|
+
return (_list$filter$map$join = list.filter(function (item) {
|
|
14782
|
+
return value.includes(item.value);
|
|
14783
|
+
}).map(function (item) {
|
|
14784
|
+
return item.label;
|
|
14785
|
+
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
14786
|
+
} else {
|
|
14787
|
+
var selectedItem = list.find(function (item) {
|
|
14788
|
+
return item.value === value;
|
|
14789
|
+
});
|
|
14790
|
+
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
14791
|
+
}
|
|
14792
|
+
};
|
|
14793
|
+
if (showOnly) {
|
|
14794
|
+
return getValueString(props.value);
|
|
14795
|
+
}
|
|
14796
|
+
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
|
14797
|
+
showArrow: true,
|
|
14798
|
+
showSearch: true,
|
|
14799
|
+
filterOption: function filterOption(input, option) {
|
|
14800
|
+
return option.label.includes(input);
|
|
14801
|
+
},
|
|
14802
|
+
notFoundContent: null
|
|
14803
|
+
}, otherProps), {}, {
|
|
14804
|
+
options: options,
|
|
14805
|
+
mode: mode,
|
|
14806
|
+
onChange: function onChange(value, option) {
|
|
14807
|
+
if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
|
|
14808
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
|
|
14809
|
+
} else {
|
|
14810
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
|
|
14811
|
+
}
|
|
14812
|
+
}
|
|
14813
|
+
}));
|
|
14814
|
+
};
|
|
14815
|
+
|
|
14816
|
+
var _excluded$g = ["filterComponentType", "searchDefaultConditions", "props", "ShopList"];
|
|
14817
|
+
var RangePicker = DatePicker.RangePicker;
|
|
14818
|
+
var _SelectInput = function SelectInput(props) {
|
|
14819
|
+
var _props$value = props.value,
|
|
14820
|
+
value = _props$value === void 0 ? {
|
|
14821
|
+
type: 'anylike',
|
|
14822
|
+
keywords: ''
|
|
14823
|
+
} : _props$value,
|
|
14824
|
+
onChange = props.onChange,
|
|
14825
|
+
filterOptions = props.filterOptions;
|
|
14826
|
+
var handleSelectChange = function handleSelectChange(val) {
|
|
14827
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
14828
|
+
type: val
|
|
14829
|
+
});
|
|
14830
|
+
if (!['in', 'anylike'].includes(val)) {
|
|
14831
|
+
newValue.keywords = '';
|
|
14832
|
+
}
|
|
14833
|
+
onChange(newValue);
|
|
14834
|
+
};
|
|
14835
|
+
var handleInputChange = function handleInputChange(e) {
|
|
14836
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
14837
|
+
keywords: e.target.value
|
|
14838
|
+
});
|
|
14839
|
+
onChange(newValue);
|
|
14840
|
+
};
|
|
14841
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
14842
|
+
style: {
|
|
14843
|
+
minWidth: '120px',
|
|
14844
|
+
width: '40%'
|
|
14845
|
+
},
|
|
14846
|
+
options: filterOptions,
|
|
14847
|
+
value: value.type,
|
|
14848
|
+
onChange: handleSelectChange
|
|
14849
|
+
}), ['in', 'anylike'].includes(value.type) ? /*#__PURE__*/React.createElement(TrimInput, {
|
|
14850
|
+
style: {
|
|
14851
|
+
width: '60%'
|
|
14852
|
+
},
|
|
14853
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14854
|
+
value: value.keywords,
|
|
14855
|
+
allowClear: true,
|
|
14856
|
+
onChange: handleInputChange
|
|
14857
|
+
}) : null);
|
|
14858
|
+
};
|
|
14859
|
+
var _TradeInput = function TradeInput(props) {
|
|
14860
|
+
// const repeatOrderList = useSelector(selectRepeatOrderList);
|
|
14861
|
+
// const userInfo = useSelector(selectUserInfo);
|
|
14862
|
+
// const isRepeat = repeatOrderList.includes(userInfo?.companyKey || '');
|
|
14863
|
+
// PS: 订单重复的先不做筛选,后续有需求了再补充
|
|
14864
|
+
var isRepeat = false;
|
|
14865
|
+
var _props$value2 = props.value,
|
|
14866
|
+
value = _props$value2 === void 0 ? {
|
|
14867
|
+
tradeIdSearchRepeat: false,
|
|
14868
|
+
value: ''
|
|
14869
|
+
} : _props$value2,
|
|
14870
|
+
onChange = props.onChange;
|
|
14871
|
+
var handleInputChange = function handleInputChange(e) {
|
|
14872
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
14873
|
+
value: e.target.value
|
|
14874
|
+
});
|
|
14875
|
+
onChange(newValue);
|
|
14876
|
+
};
|
|
14877
|
+
return "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
14878
|
+
title: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14879
|
+
key: 'tradeInput'
|
|
14880
|
+
}, /*#__PURE__*/React.createElement(TrimInput, {
|
|
14881
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14882
|
+
allowClear: true,
|
|
14883
|
+
value: value.value,
|
|
14884
|
+
onChange: handleInputChange
|
|
14885
|
+
}), isRepeat ) : /*#__PURE__*/React.createElement("div", {
|
|
14886
|
+
key: 'tradeInput'
|
|
14887
|
+
}, /*#__PURE__*/React.createElement(TrimInput, {
|
|
14888
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14889
|
+
allowClear: true,
|
|
14890
|
+
value: value.value,
|
|
14891
|
+
onChange: handleInputChange
|
|
14892
|
+
}), isRepeat );
|
|
14893
|
+
};
|
|
14894
|
+
var componentMap$1 = {
|
|
14895
|
+
Input: function Input(props) {
|
|
14896
|
+
return "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
14897
|
+
title: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name)
|
|
14898
|
+
}, /*#__PURE__*/React.createElement(TrimInput, _objectSpread2({
|
|
14899
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14900
|
+
allowClear: true
|
|
14901
|
+
}, props))) : /*#__PURE__*/React.createElement(TrimInput, _objectSpread2({
|
|
14902
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14903
|
+
allowClear: true
|
|
14904
|
+
}, props));
|
|
14905
|
+
},
|
|
14906
|
+
MultipleSelect: function MultipleSelect(props) {
|
|
14907
|
+
return "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
14908
|
+
title: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name)
|
|
14909
|
+
}, /*#__PURE__*/React.createElement(Select, _objectSpread2({
|
|
14910
|
+
mode: "multiple",
|
|
14911
|
+
placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14912
|
+
optionFilterProp: "label",
|
|
14913
|
+
allowClear: true,
|
|
14914
|
+
maxTagCount: "responsive"
|
|
14915
|
+
}, props))) : /*#__PURE__*/React.createElement(Select, _objectSpread2({
|
|
14916
|
+
mode: "multiple",
|
|
14917
|
+
placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14918
|
+
optionFilterProp: "label",
|
|
14919
|
+
allowClear: true,
|
|
14920
|
+
maxTagCount: "responsive"
|
|
14921
|
+
}, props));
|
|
14922
|
+
},
|
|
14923
|
+
Date: function Date(props) {
|
|
14924
|
+
return /*#__PURE__*/React.createElement(RangePicker, _objectSpread2({
|
|
14925
|
+
placeholder: ["".concat(props.name, "\u5F00\u59CB\u65F6\u95F4"), "".concat(props.name, "\u7ED3\u675F\u65F6\u95F4")],
|
|
14926
|
+
allowClear: true,
|
|
14927
|
+
showTime: {
|
|
14928
|
+
defaultValue: [hooks().startOf('day'), hooks().endOf('day')]
|
|
14929
|
+
},
|
|
14930
|
+
maxTagCount: "responsive"
|
|
14931
|
+
}, props));
|
|
14932
|
+
},
|
|
14933
|
+
Cascader: function Cascader$1(props) {
|
|
14934
|
+
return "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name).length > 10 ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
14935
|
+
title: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name)
|
|
14936
|
+
}, /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
|
14937
|
+
placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14938
|
+
allowClear: true,
|
|
14939
|
+
showSearch: true,
|
|
14940
|
+
maxTagCount: "responsive",
|
|
14941
|
+
fieldNames: {
|
|
14942
|
+
label: 'label',
|
|
14943
|
+
value: 'actived',
|
|
14944
|
+
children: 'children'
|
|
14945
|
+
}
|
|
14946
|
+
}, props))) : /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
|
14947
|
+
placeholder: "\u8BF7\u9009\u62E9".concat(props === null || props === void 0 ? void 0 : props.name),
|
|
14948
|
+
allowClear: true,
|
|
14949
|
+
showSearch: true,
|
|
14950
|
+
maxTagCount: "responsive",
|
|
14951
|
+
fieldNames: {
|
|
14952
|
+
label: 'label',
|
|
14953
|
+
value: 'actived',
|
|
14954
|
+
children: 'children'
|
|
14955
|
+
}
|
|
14956
|
+
}, props));
|
|
14957
|
+
},
|
|
14958
|
+
// ShopList: (props: any) => (
|
|
14959
|
+
// <ShopList
|
|
14960
|
+
// placeholder="请选择店铺名称"
|
|
14961
|
+
// showSearch
|
|
14962
|
+
// optionFilterProp="label"
|
|
14963
|
+
// allowClear
|
|
14964
|
+
// maxTagCount="responsive"
|
|
14965
|
+
// style={{ width: '220px' }}
|
|
14966
|
+
// {...props}
|
|
14967
|
+
// />
|
|
14968
|
+
// ),
|
|
14969
|
+
Rate: function Rate$1(props) {
|
|
14970
|
+
return /*#__PURE__*/React.createElement(Rate, _objectSpread2({}, props));
|
|
14971
|
+
},
|
|
14972
|
+
SelectInput: function SelectInput(props) {
|
|
14973
|
+
return /*#__PURE__*/React.createElement(_SelectInput, _objectSpread2({}, props));
|
|
14974
|
+
},
|
|
14975
|
+
TradeInput: function TradeInput(props) {
|
|
14976
|
+
return /*#__PURE__*/React.createElement(_TradeInput, _objectSpread2({}, props));
|
|
14977
|
+
},
|
|
14978
|
+
AsyncSelect: function AsyncSelect$1(props) {
|
|
14979
|
+
return /*#__PURE__*/React.createElement(AsyncSelect, _objectSpread2({
|
|
14980
|
+
placeholder: "\u8BF7\u9009\u62E9".concat((props === null || props === void 0 ? void 0 : props.name) || '')
|
|
14981
|
+
}, props));
|
|
14982
|
+
}
|
|
14983
|
+
};
|
|
14984
|
+
var FilterSelectOption = function FilterSelectOption(props) {
|
|
14985
|
+
// otherProps 中存在value和onChange属性
|
|
14986
|
+
var filterComponentType = props.filterComponentType,
|
|
14987
|
+
searchDefaultConditions = props.searchDefaultConditions,
|
|
14988
|
+
componentProps = props.props,
|
|
14989
|
+
ShopList = props.ShopList,
|
|
14990
|
+
otherProps = _objectWithoutProperties(props, _excluded$g);
|
|
14991
|
+
var Comp = filterComponentType === 'ShopList' ? function (props) {
|
|
14992
|
+
return /*#__PURE__*/React.createElement(ShopList, _objectSpread2({
|
|
14993
|
+
placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
|
|
14994
|
+
showSearch: true,
|
|
14995
|
+
optionFilterProp: "label",
|
|
14996
|
+
allowClear: true,
|
|
14997
|
+
maxTagCount: "responsive",
|
|
14998
|
+
valueMapping: "uniqueKey",
|
|
14999
|
+
style: {
|
|
15000
|
+
width: '190px'
|
|
15001
|
+
}
|
|
15002
|
+
}, props));
|
|
15003
|
+
} : componentMap$1[filterComponentType];
|
|
15004
|
+
var newComponentProps = cloneDeep(componentProps);
|
|
15005
|
+
if (hasAddNullComponent.includes(props.type)) {
|
|
15006
|
+
var options = cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
|
|
15007
|
+
var nullList = props.type === 'LOGISTICS_INTERCEPTION' ? props.id.split('_')[1] === 'interceptLogisticsStatus' ? [{
|
|
15008
|
+
label: '为空',
|
|
15009
|
+
value: 'isNull'
|
|
15010
|
+
}] : [] : [{
|
|
15011
|
+
label: '为空',
|
|
15012
|
+
value: 'isNull'
|
|
15013
|
+
}, {
|
|
15014
|
+
label: '不为空',
|
|
15015
|
+
value: 'notNull'
|
|
15016
|
+
}];
|
|
15017
|
+
newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
|
|
15018
|
+
options: [].concat(nullList, _toConsumableArray(options))
|
|
15019
|
+
});
|
|
15020
|
+
}
|
|
15021
|
+
//标记组件渲染图片 无法深拷贝,需要手动映射label
|
|
15022
|
+
if (props.type === 'FLOW_MARK_SELECT') {
|
|
15023
|
+
var MARK_FLAG_MAP = {
|
|
15024
|
+
'1': /*#__PURE__*/React.createElement("svg", {
|
|
15025
|
+
viewBox: "0 0 1024 1024",
|
|
15026
|
+
version: "1.1",
|
|
15027
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15028
|
+
"p-id": "7093",
|
|
15029
|
+
width: "18",
|
|
15030
|
+
height: "18"
|
|
15031
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15032
|
+
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",
|
|
15033
|
+
fill: "#C6C6C6",
|
|
15034
|
+
"p-id": "7094"
|
|
15035
|
+
})),
|
|
15036
|
+
'7': /*#__PURE__*/React.createElement("svg", {
|
|
15037
|
+
viewBox: "0 0 1024 1024",
|
|
15038
|
+
version: "1.1",
|
|
15039
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15040
|
+
"p-id": "7093",
|
|
15041
|
+
width: "18",
|
|
15042
|
+
height: "18"
|
|
15043
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15044
|
+
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",
|
|
15045
|
+
fill: "#8a8a8a",
|
|
15046
|
+
"p-id": "7094"
|
|
15047
|
+
})),
|
|
15048
|
+
'2': /*#__PURE__*/React.createElement("svg", {
|
|
15049
|
+
viewBox: "0 0 1024 1024",
|
|
15050
|
+
version: "1.1",
|
|
15051
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15052
|
+
"p-id": "7093",
|
|
15053
|
+
width: "18",
|
|
15054
|
+
height: "18"
|
|
15055
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15056
|
+
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",
|
|
15057
|
+
fill: "#ff0000",
|
|
15058
|
+
"p-id": "7094"
|
|
15059
|
+
})),
|
|
15060
|
+
'3': /*#__PURE__*/React.createElement("svg", {
|
|
15061
|
+
viewBox: "0 0 1024 1024",
|
|
15062
|
+
version: "1.1",
|
|
15063
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15064
|
+
"p-id": "7093",
|
|
15065
|
+
width: "18",
|
|
15066
|
+
height: "18"
|
|
15067
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15068
|
+
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",
|
|
15069
|
+
fill: "#f6b343",
|
|
15070
|
+
"p-id": "7094"
|
|
15071
|
+
})),
|
|
15072
|
+
'4': /*#__PURE__*/React.createElement("svg", {
|
|
15073
|
+
viewBox: "0 0 1024 1024",
|
|
15074
|
+
version: "1.1",
|
|
15075
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15076
|
+
"p-id": "7093",
|
|
15077
|
+
width: "18",
|
|
15078
|
+
height: "18"
|
|
15079
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15080
|
+
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",
|
|
15081
|
+
fill: "#4d90f7",
|
|
15082
|
+
"p-id": "7094"
|
|
15083
|
+
})),
|
|
15084
|
+
'5': /*#__PURE__*/React.createElement("svg", {
|
|
15085
|
+
viewBox: "0 0 1024 1024",
|
|
15086
|
+
version: "1.1",
|
|
15087
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15088
|
+
"p-id": "7093",
|
|
15089
|
+
width: "18",
|
|
15090
|
+
height: "18"
|
|
15091
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15092
|
+
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",
|
|
15093
|
+
fill: "#6ed86c",
|
|
15094
|
+
"p-id": "7094"
|
|
15095
|
+
})),
|
|
15096
|
+
'6': /*#__PURE__*/React.createElement("svg", {
|
|
15097
|
+
viewBox: "0 0 1024 1024",
|
|
15098
|
+
version: "1.1",
|
|
15099
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15100
|
+
"p-id": "7093",
|
|
15101
|
+
width: "18",
|
|
15102
|
+
height: "18"
|
|
15103
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15104
|
+
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",
|
|
15105
|
+
fill: "#be4ed1",
|
|
15106
|
+
"p-id": "7094"
|
|
15107
|
+
}))
|
|
15108
|
+
};
|
|
15109
|
+
var markOptions = cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
|
|
15110
|
+
newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
|
|
15111
|
+
options: markOptions.map(function (t) {
|
|
15112
|
+
return {
|
|
15113
|
+
label: MARK_FLAG_MAP[t.value],
|
|
15114
|
+
value: t.value
|
|
15115
|
+
};
|
|
15116
|
+
})
|
|
15117
|
+
});
|
|
15118
|
+
} else if (props.type === 'FLOW_TAG') {
|
|
15119
|
+
newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
|
|
15120
|
+
options: [{
|
|
15121
|
+
label: '为空',
|
|
15122
|
+
value: 'isNull'
|
|
15123
|
+
}, {
|
|
15124
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
15125
|
+
src: reminder,
|
|
15126
|
+
style: {
|
|
15127
|
+
width: '16px'
|
|
15128
|
+
}
|
|
15129
|
+
}),
|
|
15130
|
+
value: 'REMINDER'
|
|
15131
|
+
}, {
|
|
15132
|
+
label: /*#__PURE__*/React.createElement("img", {
|
|
15133
|
+
src: reject,
|
|
15134
|
+
style: {
|
|
15135
|
+
width: '16px'
|
|
15136
|
+
}
|
|
15137
|
+
}),
|
|
15138
|
+
value: 'REJECT'
|
|
15139
|
+
}]
|
|
15140
|
+
});
|
|
15141
|
+
} else if (props.type === 'HANDLER_INPUT') {
|
|
15142
|
+
var _options = cloneDeep(componentProps === null || componentProps === void 0 ? void 0 : componentProps.options) || [];
|
|
15143
|
+
newComponentProps = _objectSpread2(_objectSpread2({}, newComponentProps), {}, {
|
|
15144
|
+
options: _options.map(function (item) {
|
|
15145
|
+
var _item$value$split = item.value.split(':'),
|
|
15146
|
+
_item$value$split2 = _slicedToArray(_item$value$split, 2),
|
|
15147
|
+
val = _item$value$split2[0],
|
|
15148
|
+
groupText = _item$value$split2[1];
|
|
15149
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
15150
|
+
label: groupText ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
15151
|
+
style: {
|
|
15152
|
+
marginRight: '8px',
|
|
15153
|
+
backgroundColor: '#d6e7ff',
|
|
15154
|
+
padding: '3px 7px',
|
|
15155
|
+
borderRadius: '4px',
|
|
15156
|
+
color: '#3a75ed',
|
|
15157
|
+
fontWeight: 400,
|
|
15158
|
+
lineHeight: '13px',
|
|
15159
|
+
display: 'inline-block'
|
|
15160
|
+
}
|
|
15161
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
15162
|
+
viewBox: "0 0 1024 1024",
|
|
15163
|
+
version: "1.1",
|
|
15164
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15165
|
+
"p-id": "6771",
|
|
15166
|
+
width: "13",
|
|
15167
|
+
height: "13"
|
|
15168
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
15169
|
+
d: "M452.267 171.042a196.13 196.13 0 0 0-46.2-14.455 165.376 165.376 0 0 0-27.306-2.987h-8.397a165.376 165.376 0 0 0-27.648 2.987c-19.951 3.686-38.93 10.154-56.389 19.524-55.842 29.986-86.357 84.002-86.357 156.399v8.072c-0.051 6.861 0.29 15.838 1.024 25.6 1.348 18.091 3.823 35.277 7.475 51.2 7.202 31.284 18.5 55.706 35.328 73.216 1.844 1.912 4.71 5.53 7.305 9.472 3.14 4.796 4.898 8.739 5.222 10.462 0 2.919 0.188 2.338-1.416 3.823-5.103 4.71-16.691 11.503-39.731 22.835-119.638 58.846-159.71 92.16-160.154 149.504l-3.72 53.214a41.677 41.677 0 0 0 38.57 44.527c3.243 0.222 49.732 0.393 114.961 0.512-0.205-19.114 0.546-36.096 2.082-51.2a25724.587 25724.587 0 0 1-103.833-0.273l3.072-44.049 0.068-1.792c0-29.696 29.303-54.187 131.55-104.5 55.091-27.101 69.751-40.669 69.751-73.044a45.49 45.49 0 0 0-0.392-5.888c-1.349-10.445-6.059-21.3-13.244-32.24a122.487 122.487 0 0 0-13.175-16.844c-9.507-9.882-17.05-26.198-22.358-49.238a292.386 292.386 0 0 1-6.314-43.52 288.444 288.444 0 0 1-0.888-21.64v-8.192c0-54.033 20.6-90.488 59.392-111.309a141.892 141.892 0 0 1 41.472-14.285 116.463 116.463 0 0 1 18.552-2.133h7.953c3.976 0.034 10.632 0.734 18.227 2.133a154.902 154.902 0 0 1 17.8 4.386 165.598 165.598 0 0 1 37.718-40.277zM806.4 599.092c-43.588-21.505-47.428-24.901-47.497-32.769 0.342-2.355 2.475-7.253 6.315-13.107 2.987-4.574 6.298-8.772 8.448-11.008 18.347-19.132 30.72-45.943 38.622-80.435a381.44 381.44 0 0 0 8.277-56.781c0.802-10.803 1.178-20.753 1.144-28.399v-8.465c0-80.333-33.434-139.674-94.686-172.646a211.695 211.695 0 0 0-61.97-21.504 181.01 181.01 0 0 0-29.934-3.311h-9.336c-8.345 0.068-18.841 1.177-30.31 3.294a211.678 211.678 0 0 0-61.969 21.504c-61.27 32.99-94.686 92.33-94.686 172.151v9.028c-0.034 7.595 0.341 17.545 1.144 28.365 1.501 20.07 4.232 39.134 8.277 56.747 7.902 34.509 20.275 61.32 38.605 80.435 2.167 2.253 5.461 6.451 8.465 11.025 3.84 5.854 5.973 10.752 6.314 13.09-0.068 7.885-3.925 11.264-47.496 32.785-132.318 65.28-176.35 102.008-176.794 164.489l-4.164 59.562a43.537 43.537 0 0 0 40.26 46.558c12.613 0.888 627.15 1.024 637.782-0.17a43.554 43.554 0 0 0 38.4-48.043l-6.452-59.563c-1.194-61.474-45.602-98.116-176.742-162.833z m151.194 165.426l25.565-1.382-0.102-1.963-25.566 1.383-18.108 1.962h18.21z m-25.566 0.785l5.802 53.487c-67.157 0.598-545.62 0.512-613.034-0.05l3.67-52.447c0.067-36.659 33.313-64.546 148.308-121.292 60.416-29.816 76.05-44.323 76.05-78.934 0-2.048-0.137-4.096-0.41-6.178-1.417-11.127-6.485-22.87-14.268-34.73a133.888 133.888 0 0 0-14.336-18.398c-11.025-11.486-19.644-30.208-25.668-56.44a330.77 330.77 0 0 1-7.117-49.1 326.349 326.349 0 0 1-1.007-24.457v-9.148c0-61.474 23.552-103.253 67.755-127.061a160.649 160.649 0 0 1 47.036-16.248c8.652-1.604 16.213-2.39 21.196-2.44h8.892c4.608 0.034 12.203 0.853 20.821 2.44 16.862 3.123 32.7 8.534 47.036 16.248 44.203 23.808 67.755 65.587 67.755 127.061v9.233c0.034 6.23-0.29 14.848-1.007 24.354-1.314 17.596-3.67 34.134-7.117 49.118-6.024 26.232-14.643 44.954-25.668 56.44a133.87 133.87 0 0 0-14.336 18.397c-7.766 11.862-12.851 23.604-14.268 34.731a48.589 48.589 0 0 0-0.41 6.178c0 34.611 15.634 49.118 76.05 78.934 115.012 56.763 148.24 84.65 148.24 119.517h7.39l-7.338 0.785z",
|
|
15170
|
+
fill: "#3a75ed",
|
|
15171
|
+
"p-id": "6772"
|
|
15172
|
+
}))), /*#__PURE__*/React.createElement("span", null, item.label)) : item.label
|
|
15173
|
+
});
|
|
15174
|
+
})
|
|
15175
|
+
});
|
|
15176
|
+
}
|
|
15177
|
+
if (Comp) return /*#__PURE__*/React.createElement(Comp, _objectSpread2(_objectSpread2({}, newComponentProps), otherProps));
|
|
15178
|
+
return null;
|
|
15179
|
+
};
|
|
15180
|
+
|
|
15181
|
+
var RangePicker$1 = DatePicker.RangePicker;
|
|
15182
|
+
var defaultTimeOptions = [{
|
|
15183
|
+
label: '提交时间',
|
|
15184
|
+
value: SUBMIT_TIME_ID
|
|
15185
|
+
}, {
|
|
15186
|
+
label: '修改时间',
|
|
15187
|
+
value: UPGRADE_TIME_ID
|
|
15188
|
+
}, {
|
|
15189
|
+
label: '完成时间',
|
|
15190
|
+
value: FINAL_TIME_ID
|
|
15191
|
+
}];
|
|
15192
|
+
var timeCustomOptions = [{
|
|
15193
|
+
label: '自定义时间',
|
|
15194
|
+
value: CUSTOM_TIME_ID
|
|
15195
|
+
}, {
|
|
15196
|
+
label: '今天',
|
|
15197
|
+
value: 1
|
|
15198
|
+
}, {
|
|
15199
|
+
label: '近7天',
|
|
15200
|
+
value: 7
|
|
15201
|
+
}, {
|
|
15202
|
+
label: '近30天',
|
|
15203
|
+
value: 30
|
|
15204
|
+
}];
|
|
15205
|
+
var SearchHeader = function SearchHeader(_ref) {
|
|
15206
|
+
var allFields = _ref.allFields,
|
|
15207
|
+
children = _ref.children,
|
|
15208
|
+
status = _ref.status,
|
|
15209
|
+
_ref$layout = _ref.layout,
|
|
15210
|
+
layout = _ref$layout === void 0 ? 'block' : _ref$layout,
|
|
15211
|
+
_ref$isShowTime = _ref.isShowTime,
|
|
15212
|
+
isShowTime = _ref$isShowTime === void 0 ? true : _ref$isShowTime,
|
|
15213
|
+
timeOptions = _ref.timeOptions,
|
|
15214
|
+
ShopList = _ref.ShopList;
|
|
15215
|
+
// const fixedFieldsOptions = useMemo(() => {
|
|
15216
|
+
// return allFields.filter(item => fixedFields?.includes(item.id));
|
|
15217
|
+
// }, [fixedFields, allFields]);
|
|
15218
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15219
|
+
className: 'search-header-wrap'
|
|
15220
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15221
|
+
className: "".concat(status ? 'is-open' : 'not-open')
|
|
15222
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15223
|
+
style: {
|
|
15224
|
+
display: 'flex',
|
|
15225
|
+
alignItems: 'center',
|
|
15226
|
+
flexWrap: 'wrap'
|
|
15227
|
+
}
|
|
15228
|
+
}, isShowTime && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
15229
|
+
name: "timeType"
|
|
15230
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
15231
|
+
options: timeOptions !== null && timeOptions !== void 0 ? timeOptions : defaultTimeOptions,
|
|
15232
|
+
style: {
|
|
15233
|
+
width: '120px',
|
|
15234
|
+
marginRight: '8px'
|
|
15235
|
+
},
|
|
15236
|
+
showSearch: true,
|
|
15237
|
+
optionFilterProp: "label"
|
|
15238
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
15239
|
+
name: "customTime"
|
|
15240
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
15241
|
+
options: timeCustomOptions,
|
|
15242
|
+
style: {
|
|
15243
|
+
width: '120px',
|
|
15244
|
+
marginRight: '8px'
|
|
15245
|
+
},
|
|
15246
|
+
showSearch: true,
|
|
15247
|
+
optionFilterProp: "label"
|
|
15248
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
15249
|
+
name: "time",
|
|
15250
|
+
style: {
|
|
15251
|
+
marginRight: '4px'
|
|
15252
|
+
}
|
|
15253
|
+
}, /*#__PURE__*/React.createElement(RangePicker$1, {
|
|
15254
|
+
showTime: {
|
|
15255
|
+
defaultValue: [hooks().startOf('day'), hooks().endOf('day')]
|
|
15256
|
+
},
|
|
15257
|
+
allowClear: true
|
|
15258
|
+
}))), allFields === null || allFields === void 0 ? void 0 : allFields.map(function (item) {
|
|
15259
|
+
// const show = fixedFieldsOptions?.map(i => i?.id)?.includes(item.id);
|
|
15260
|
+
var show = true;
|
|
15261
|
+
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
15262
|
+
name: item.id,
|
|
15263
|
+
rules: item.rules || [],
|
|
15264
|
+
hidden: !show,
|
|
15265
|
+
style: {
|
|
15266
|
+
marginRight: '4px',
|
|
15267
|
+
minWidth: '190px'
|
|
15268
|
+
},
|
|
15269
|
+
key: item.id
|
|
15270
|
+
}, /*#__PURE__*/React.createElement(FilterSelectOption, _objectSpread2({
|
|
15271
|
+
ShopList: ShopList
|
|
15272
|
+
}, item)));
|
|
15273
|
+
}), /*#__PURE__*/React.createElement(Form.Item, null, layout === 'inner' && /*#__PURE__*/React.createElement(React.Fragment, null, children)))), layout === 'block' && /*#__PURE__*/React.createElement(React.Fragment, null, children));
|
|
15274
|
+
};
|
|
15275
|
+
|
|
15276
|
+
var initStatus = {
|
|
15277
|
+
batchAuditDialogVisible: false,
|
|
15278
|
+
exportVisible: false,
|
|
15279
|
+
filterListVisible: false,
|
|
15280
|
+
exportLoading: false,
|
|
15281
|
+
open: false,
|
|
15282
|
+
visible: false,
|
|
15283
|
+
batchVisible: false,
|
|
15284
|
+
batchSubmitVisible: false,
|
|
15285
|
+
importVisible: false,
|
|
15286
|
+
smartWorkOrderStatusVisible: false
|
|
15287
|
+
};
|
|
15288
|
+
var SearchForm$1 = function SearchForm(props) {
|
|
15289
|
+
var submit = props.submit,
|
|
15290
|
+
reset = props.reset,
|
|
15291
|
+
filterItems = props.filterItems,
|
|
15292
|
+
form = props.form;
|
|
15293
|
+
var _useStatus = useStatus(initStatus),
|
|
15294
|
+
_useStatus2 = _slicedToArray(_useStatus, 2),
|
|
15295
|
+
status = _useStatus2[0],
|
|
15296
|
+
changeStatus = _useStatus2[1];
|
|
15297
|
+
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
15298
|
+
locale: zh_CN
|
|
15299
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15300
|
+
id: "table-resizable"
|
|
15301
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
15302
|
+
layout: "inline",
|
|
15303
|
+
form: form
|
|
15304
|
+
}, !!(filterItems === null || filterItems === void 0 ? void 0 : filterItems.length) && /*#__PURE__*/React.createElement(SearchHeader, {
|
|
15305
|
+
isShowTime: false,
|
|
15306
|
+
ShopList: props.ShopList,
|
|
15307
|
+
fixedFields: filterItems || [],
|
|
15308
|
+
allFields: filterItems || [],
|
|
15309
|
+
status: status === null || status === void 0 ? void 0 : status.open
|
|
15310
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
15311
|
+
type: "primary",
|
|
15312
|
+
onClick: submit
|
|
15313
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
15314
|
+
onClick: reset
|
|
15315
|
+
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
|
|
15316
|
+
type: "link",
|
|
15317
|
+
onClick: function onClick() {
|
|
15318
|
+
return changeStatus({
|
|
15319
|
+
open: !(status === null || status === void 0 ? void 0 : status.open)
|
|
15320
|
+
});
|
|
15321
|
+
},
|
|
15322
|
+
icon: (status === null || status === void 0 ? void 0 : status.open) ? /*#__PURE__*/React.createElement(UpOutlined, null) : /*#__PURE__*/React.createElement(DownOutlined, null)
|
|
15323
|
+
}, (status === null || status === void 0 ? void 0 : status.open) ? '收起' : '展开'))))));
|
|
15324
|
+
};
|
|
15325
|
+
|
|
15326
|
+
var queryWorkOrderList = function queryWorkOrderList(params) {
|
|
15327
|
+
return servers.singletonWrap(function () {
|
|
15328
|
+
return servers.queryWorkOrderList(params);
|
|
15329
|
+
}, {
|
|
15330
|
+
name: 'queryWorkOrderList',
|
|
15331
|
+
key: 'queryWorkOrderList',
|
|
15332
|
+
cacheTime: 60
|
|
15333
|
+
});
|
|
15334
|
+
};
|
|
15335
|
+
var WorkorderList = function WorkorderList(props, ref) {
|
|
15336
|
+
// console.log('**** 调用 useGoodsSourceFormat 开始, goodsSource:', props);
|
|
15337
|
+
var _Form$useForm = Form.useForm(),
|
|
15338
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
15339
|
+
form = _Form$useForm2[0];
|
|
15340
|
+
var _React$useState = React.useState([]),
|
|
15341
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
15342
|
+
selectedKeys = _React$useState2[0],
|
|
15343
|
+
setSelectedKeys = _React$useState2[1];
|
|
15344
|
+
var _React$useState3 = React.useState([]),
|
|
15345
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
15346
|
+
selectedList = _React$useState4[0],
|
|
15347
|
+
setSelectedList = _React$useState4[1];
|
|
15348
|
+
var goodsSourceFormat = props.useGoodsSourceFormat(props.goodsSource);
|
|
15349
|
+
var _React$useState5 = React.useState([]),
|
|
15350
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
15351
|
+
workOrderList = _React$useState6[0],
|
|
15352
|
+
setWorkOrderList = _React$useState6[1];
|
|
15353
|
+
var _React$useState7 = React.useState({
|
|
15354
|
+
loading: false,
|
|
15355
|
+
total: 0,
|
|
15356
|
+
current: 1,
|
|
15357
|
+
pageSize: 10
|
|
15358
|
+
}),
|
|
15359
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
15360
|
+
paginationData = _React$useState8[0],
|
|
15361
|
+
setPaginationData = _React$useState8[1];
|
|
15362
|
+
var disabledIds = (props.seletedGooods || []).map(function (goods) {
|
|
15363
|
+
return goods.id;
|
|
15364
|
+
}).filter(function (key) {
|
|
15365
|
+
return key;
|
|
15366
|
+
});
|
|
15367
|
+
useImperativeHandle(ref, function () {
|
|
15368
|
+
return {
|
|
15369
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
15370
|
+
return selectedList.map(function (workOrderData) {
|
|
15371
|
+
return goodsSourceFormat.workOrderDataToGoods(workOrderData, props.erp);
|
|
15372
|
+
});
|
|
15373
|
+
}
|
|
15374
|
+
};
|
|
15375
|
+
});
|
|
15376
|
+
// console.log('**** 调用 useGoodsSourceFormat 结束:', {
|
|
15377
|
+
// goodsSourceFormat,
|
|
15378
|
+
// goodsSource: props.goodsSource,
|
|
15379
|
+
// });
|
|
15380
|
+
var paginationChange = function paginationChange(current, pageSize) {
|
|
15381
|
+
setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
|
|
15382
|
+
current: current,
|
|
15383
|
+
pageSize: pageSize
|
|
15384
|
+
}));
|
|
15385
|
+
};
|
|
15386
|
+
var fecthTableData = /*#__PURE__*/function () {
|
|
15387
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
15388
|
+
var current,
|
|
15389
|
+
pageSize,
|
|
15390
|
+
_ref2,
|
|
15391
|
+
flowTemplateKey,
|
|
15392
|
+
flowNodeId,
|
|
15393
|
+
templateKey,
|
|
15394
|
+
_ref2$tableColumns,
|
|
15395
|
+
tableColumns,
|
|
15396
|
+
formData,
|
|
15397
|
+
params,
|
|
15398
|
+
fields,
|
|
15399
|
+
uniqueKeys,
|
|
15400
|
+
_args = arguments;
|
|
15401
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15402
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15403
|
+
case 0:
|
|
15404
|
+
current = _args.length > 0 && _args[0] !== undefined ? _args[0] : paginationData.current;
|
|
15405
|
+
pageSize = _args.length > 1 && _args[1] !== undefined ? _args[1] : paginationData.pageSize;
|
|
15406
|
+
_ref2 = goodsSourceFormat || {}, flowTemplateKey = _ref2.flowTemplateKey, flowNodeId = _ref2.flowNodeId, templateKey = _ref2.templateKey, _ref2$tableColumns = _ref2.tableColumns, tableColumns = _ref2$tableColumns === void 0 ? [] : _ref2$tableColumns;
|
|
15407
|
+
_context.next = 5;
|
|
15408
|
+
return form.validateFields();
|
|
15409
|
+
case 5:
|
|
15410
|
+
formData = _context.sent;
|
|
15411
|
+
if (templateKey) {
|
|
15412
|
+
_context.next = 10;
|
|
15413
|
+
break;
|
|
15414
|
+
}
|
|
15415
|
+
setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
|
|
15416
|
+
total: 0
|
|
15417
|
+
}));
|
|
15418
|
+
setWorkOrderList([]);
|
|
15419
|
+
return _context.abrupt("return");
|
|
15420
|
+
case 10:
|
|
15421
|
+
params = finalFormData({
|
|
15422
|
+
options: goodsSourceFormat.filterItems || [],
|
|
15423
|
+
formData: formData,
|
|
15424
|
+
current: current,
|
|
15425
|
+
pageSize: pageSize
|
|
15426
|
+
});
|
|
15427
|
+
params.flowTemplateKey = flowTemplateKey;
|
|
15428
|
+
params.flowNodeId = flowNodeId;
|
|
15429
|
+
params.templateKey = templateKey;
|
|
15430
|
+
// params.returnRepeatValueKeys = returnRepeatValueKeys;
|
|
15431
|
+
// 不对店铺数据进行过滤,
|
|
15432
|
+
// true表示不过滤拿到所有数据,false表示按照权限过滤,名字相当奇怪
|
|
15433
|
+
params.needFilterShopByPermission = true;
|
|
15434
|
+
fields = tableColumns === null || tableColumns === void 0 ? void 0 : tableColumns.reduce(function (cur, nxt) {
|
|
15435
|
+
if (DATA_SPLIT_COMPONENT_FIELDS_MAP === null || DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]) {
|
|
15436
|
+
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]);
|
|
15437
|
+
}
|
|
15438
|
+
return cur;
|
|
15439
|
+
}, []);
|
|
15440
|
+
uniqueKeys = tableColumns === null || tableColumns === void 0 ? void 0 : tableColumns.reduce(function (cur, nxt) {
|
|
15441
|
+
if (DATA_SPLIT_COMPONENT_FIELDS_MAP === null || DATA_SPLIT_COMPONENT_FIELDS_MAP === void 0 ? void 0 : DATA_SPLIT_COMPONENT_FIELDS_MAP[nxt.type]) {
|
|
15442
|
+
return cur.concat(nxt.id);
|
|
15443
|
+
}
|
|
15444
|
+
return cur;
|
|
15445
|
+
}, []);
|
|
15446
|
+
setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
|
|
15447
|
+
loading: true
|
|
15448
|
+
}));
|
|
15449
|
+
// console.log('**** 搜索条件 params: ', {
|
|
15450
|
+
// params,
|
|
15451
|
+
// goodsSourceFormat,
|
|
15452
|
+
// goodsSource: props.goodsSource,
|
|
15453
|
+
// });
|
|
15454
|
+
return _context.abrupt("return", queryWorkOrderList(_objectSpread2(_objectSpread2({}, params), goodsSourceFormat.queryComponentsConfig)).then(function (res) {
|
|
15455
|
+
var _res$data, _res$data2;
|
|
15456
|
+
var curryTransformList = transformList(fields, uniqueKeys);
|
|
15457
|
+
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) || []));
|
|
15458
|
+
// console.log(`数据转换 1:`, newDataSource);
|
|
15459
|
+
setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
|
|
15460
|
+
total: res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.total,
|
|
15461
|
+
loading: false
|
|
15462
|
+
}));
|
|
15463
|
+
setWorkOrderList(newDataSource);
|
|
15464
|
+
}).catch(function (error) {
|
|
15465
|
+
console.log('**** 获取表格数据错误', error);
|
|
15466
|
+
}));
|
|
15467
|
+
case 19:
|
|
15468
|
+
case "end":
|
|
15469
|
+
return _context.stop();
|
|
15470
|
+
}
|
|
15471
|
+
}, _callee);
|
|
15472
|
+
}));
|
|
15473
|
+
return function fecthTableData() {
|
|
15474
|
+
return _ref.apply(this, arguments);
|
|
15475
|
+
};
|
|
15476
|
+
}();
|
|
15477
|
+
// console.log(`🚀 ~ index.tsx:51 ~ WorkorderList ~ columns:`, {
|
|
15478
|
+
// columns,
|
|
15479
|
+
// selectedKeys,
|
|
15480
|
+
// selectedList,
|
|
15481
|
+
// seletedGooods: props.seletedGooods,
|
|
15482
|
+
// disabledIds,
|
|
15483
|
+
// });
|
|
15484
|
+
var reset = function reset() {
|
|
15485
|
+
var current = 1;
|
|
15486
|
+
form.resetFields();
|
|
15487
|
+
if (paginationData.current !== current) {
|
|
15488
|
+
setPaginationData(_objectSpread2(_objectSpread2({}, paginationData), {}, {
|
|
15489
|
+
current: current
|
|
15490
|
+
}));
|
|
15491
|
+
} else {
|
|
15492
|
+
fecthTableData();
|
|
15493
|
+
}
|
|
15494
|
+
};
|
|
15495
|
+
var handleSelect = function handleSelect(keys) {
|
|
15496
|
+
var deletedKeys = selectedKeys.filter(function (key) {
|
|
15497
|
+
return !keys.includes(key);
|
|
15498
|
+
});
|
|
15499
|
+
setSelectedKeys(keys);
|
|
15500
|
+
// console.log(
|
|
15501
|
+
// '**** in handleChangeSelectedKeys',
|
|
15502
|
+
// keys,
|
|
15503
|
+
// '删除的keys: ',
|
|
15504
|
+
// deletedKeys,
|
|
15505
|
+
// );
|
|
15506
|
+
var newList = _toConsumableArray(selectedList);
|
|
15507
|
+
deletedKeys.forEach(function (key) {
|
|
15508
|
+
var deletedItemIndex = newList.findIndex(function (item) {
|
|
15509
|
+
return item.id === key;
|
|
15510
|
+
});
|
|
15511
|
+
if (deletedItemIndex > -1) {
|
|
15512
|
+
newList.splice(deletedItemIndex, 1);
|
|
14282
15513
|
}
|
|
14283
|
-
}
|
|
14284
|
-
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
14292
|
-
return t.id;
|
|
14293
|
-
})));
|
|
14294
|
-
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
14295
|
-
return arrVal.id !== othVal.id;
|
|
15514
|
+
});
|
|
15515
|
+
keys.forEach(function (key) {
|
|
15516
|
+
var selectedItem = newList.find(function (item) {
|
|
15517
|
+
return item.id === key;
|
|
15518
|
+
});
|
|
15519
|
+
if (!selectedItem) {
|
|
15520
|
+
var workOrderData = workOrderList.find(function (item) {
|
|
15521
|
+
return item.id === key;
|
|
14296
15522
|
});
|
|
14297
|
-
|
|
15523
|
+
// const goods = goodsSourceFormat.workOrderDataToGoods(
|
|
15524
|
+
// workOrderData,
|
|
15525
|
+
// props.erp,
|
|
15526
|
+
// );
|
|
15527
|
+
newList.push(workOrderData);
|
|
14298
15528
|
}
|
|
14299
|
-
}
|
|
15529
|
+
});
|
|
15530
|
+
setSelectedList(newList);
|
|
14300
15531
|
};
|
|
15532
|
+
React.useEffect(function () {
|
|
15533
|
+
// console.log('**** templateKey 变化', goodsSourceFormat.templateKey);
|
|
15534
|
+
if (goodsSourceFormat.templateKey) {
|
|
15535
|
+
fecthTableData();
|
|
15536
|
+
}
|
|
15537
|
+
}, [goodsSourceFormat.templateKey]);
|
|
14301
15538
|
var showTable = function showTable() {
|
|
14302
15539
|
var handleDelete = function handleDelete(record) {
|
|
14303
|
-
|
|
15540
|
+
setSelectedKeys(selectedKeys.filter(function (t) {
|
|
14304
15541
|
return t !== record.id;
|
|
14305
15542
|
}));
|
|
14306
|
-
|
|
15543
|
+
setSelectedList(selectedList.filter(function (t) {
|
|
14307
15544
|
return t.id !== record.id;
|
|
14308
15545
|
}));
|
|
14309
15546
|
};
|
|
14310
|
-
var
|
|
15547
|
+
var _React$useState9 = React.useState({
|
|
15548
|
+
current: 1,
|
|
15549
|
+
pageSize: 1
|
|
15550
|
+
}),
|
|
15551
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
15552
|
+
showPaginationData = _React$useState10[0],
|
|
15553
|
+
setShowPaginationData = _React$useState10[1];
|
|
15554
|
+
var pointer = (showPaginationData.current - 1) * showPaginationData.pageSize;
|
|
15555
|
+
var showList = selectedList.slice(pointer, pointer + showPaginationData.pageSize);
|
|
15556
|
+
var showPaginationChange = function showPaginationChange(current, pageSize) {
|
|
15557
|
+
setShowPaginationData(_objectSpread2(_objectSpread2({}, showPaginationData), {}, {
|
|
15558
|
+
current: current,
|
|
15559
|
+
pageSize: pageSize
|
|
15560
|
+
}));
|
|
15561
|
+
};
|
|
15562
|
+
var operationCol = {
|
|
14311
15563
|
dataIndex: '',
|
|
14312
15564
|
title: "\u64CD\u4F5C",
|
|
14313
15565
|
ellipsis: true,
|
|
@@ -14320,83 +15572,118 @@ var GoodList$4 = function GoodList(props, ref) {
|
|
|
14320
15572
|
}
|
|
14321
15573
|
}, "\u5220\u9664");
|
|
14322
15574
|
}
|
|
14323
|
-
}
|
|
14324
|
-
return
|
|
15575
|
+
};
|
|
15576
|
+
return selectedKeys.length ? /*#__PURE__*/React.createElement("div", {
|
|
14325
15577
|
style: {
|
|
14326
15578
|
width: '100%',
|
|
14327
15579
|
maxWidth: '387px'
|
|
14328
15580
|
}
|
|
14329
|
-
}, /*#__PURE__*/React.createElement(
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
15581
|
+
}, /*#__PURE__*/React.createElement(HighPerformanceTable, {
|
|
15582
|
+
useSelectCol: false,
|
|
15583
|
+
columns: [operationCol].concat(_toConsumableArray(goodsSourceFormat.tableColumns)),
|
|
15584
|
+
height: 250,
|
|
15585
|
+
dataSource: showList,
|
|
15586
|
+
loading: false
|
|
15587
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
15588
|
+
disabled: false,
|
|
15589
|
+
current: showPaginationData.current,
|
|
15590
|
+
pageSize: showPaginationData.pageSize,
|
|
15591
|
+
total: selectedList.length,
|
|
15592
|
+
onChange: showPaginationChange,
|
|
15593
|
+
showSizeChanger: true,
|
|
15594
|
+
style: {
|
|
15595
|
+
marginTop: 8,
|
|
15596
|
+
textAlign: 'right'
|
|
14336
15597
|
},
|
|
14337
|
-
|
|
14338
|
-
|
|
14339
|
-
total: selectIds.length,
|
|
14340
|
-
pageSize: 10,
|
|
14341
|
-
showSizeChanger: false
|
|
14342
|
-
}
|
|
15598
|
+
size: "small",
|
|
15599
|
+
pageSizeOptions: [10, 20, 50, 100, 500, 1000]
|
|
14343
15600
|
})) : null;
|
|
14344
15601
|
};
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14348
|
-
|
|
14349
|
-
searchFormData: searchFormData$3,
|
|
15602
|
+
React.useEffect(function () {
|
|
15603
|
+
fecthTableData();
|
|
15604
|
+
}, [paginationData.current, paginationData.pageSize]);
|
|
15605
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SearchForm$1, {
|
|
14350
15606
|
form: form,
|
|
14351
|
-
|
|
14352
|
-
|
|
14353
|
-
|
|
15607
|
+
submit: function submit() {
|
|
15608
|
+
return fecthTableData();
|
|
15609
|
+
},
|
|
15610
|
+
reset: reset,
|
|
15611
|
+
filterItems: goodsSourceFormat.filterItems,
|
|
15612
|
+
ShopList: goodsSourceFormat.ShopList
|
|
14354
15613
|
}), /*#__PURE__*/React.createElement("div", {
|
|
14355
15614
|
style: {
|
|
14356
15615
|
marginTop: '4px'
|
|
14357
15616
|
}
|
|
14358
|
-
}, /*#__PURE__*/React.createElement(
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14362
|
-
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
}
|
|
15617
|
+
}, /*#__PURE__*/React.createElement(HighPerformanceTable, {
|
|
15618
|
+
disabledIds: disabledIds,
|
|
15619
|
+
columns: goodsSourceFormat.tableColumns,
|
|
15620
|
+
selectedKeys: selectedKeys,
|
|
15621
|
+
handleChangeSelectedKeys: handleSelect,
|
|
15622
|
+
height: 350,
|
|
15623
|
+
dataSource: workOrderList,
|
|
15624
|
+
loading: paginationData.loading
|
|
15625
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
15626
|
+
disabled: paginationData.loading,
|
|
15627
|
+
current: paginationData.current,
|
|
15628
|
+
pageSize: paginationData.pageSize,
|
|
15629
|
+
total: paginationData.total,
|
|
15630
|
+
onChange: paginationChange,
|
|
15631
|
+
showSizeChanger: true,
|
|
15632
|
+
style: {
|
|
15633
|
+
marginTop: 8,
|
|
15634
|
+
textAlign: 'right'
|
|
15635
|
+
},
|
|
15636
|
+
size: "small",
|
|
15637
|
+
pageSizeOptions: [10, 20, 50, 100, 500, 1000]
|
|
15638
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
14367
15639
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14368
15640
|
return triggerNode.parentElement;
|
|
14369
15641
|
},
|
|
14370
15642
|
content: showTable(),
|
|
14371
|
-
title: "\u5DF2\u9009\u62E9".concat(
|
|
15643
|
+
title: "\u5DF2\u9009\u62E9".concat(selectedKeys.length, "\u4E2A\u5546\u54C1")
|
|
14372
15644
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
14373
15645
|
danger: true,
|
|
14374
15646
|
type: "text"
|
|
14375
|
-
}, "\u5DF2\u9009".concat(
|
|
15647
|
+
}, "\u5DF2\u9009".concat(selectedKeys.length > 99 ? '99+' : selectedKeys.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
14376
15648
|
};
|
|
14377
|
-
var
|
|
14378
|
-
|
|
15649
|
+
var WorkorderList$1 = /*#__PURE__*/forwardRef(WorkorderList);
|
|
15650
|
+
|
|
15651
|
+
// interface GoodModelProps {
|
|
15652
|
+
// shopId: number | string;
|
|
15653
|
+
// maxLength: number;
|
|
15654
|
+
// shopList: any[];
|
|
15655
|
+
// width?: string | number;
|
|
15656
|
+
// shopCode?: string;
|
|
15657
|
+
// companyKey: string;
|
|
15658
|
+
// onSubmit: (...args: any[]) => any;
|
|
15659
|
+
// }
|
|
14379
15660
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
15661
|
+
var _props$goodsSource;
|
|
15662
|
+
var _useState = useState(),
|
|
15663
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15664
|
+
seletedGooods = _useState2[0],
|
|
15665
|
+
setSeletedGooods = _useState2[1];
|
|
14380
15666
|
useImperativeHandle(ref, function () {
|
|
14381
15667
|
return {
|
|
14382
|
-
open: function open() {
|
|
15668
|
+
open: function open(shopCode, options) {
|
|
15669
|
+
setSeletedGooods((options === null || options === void 0 ? void 0 : options.value) || []);
|
|
14383
15670
|
setVisible(true);
|
|
14384
15671
|
}
|
|
14385
15672
|
};
|
|
14386
15673
|
});
|
|
14387
15674
|
var onSubmit = props.onSubmit,
|
|
14388
15675
|
width = props.width;
|
|
14389
|
-
var
|
|
14390
|
-
|
|
14391
|
-
visible =
|
|
14392
|
-
setVisible =
|
|
14393
|
-
var
|
|
15676
|
+
var _useState3 = useState(false),
|
|
15677
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
15678
|
+
visible = _useState4[0],
|
|
15679
|
+
setVisible = _useState4[1];
|
|
15680
|
+
var goodsListRef = useRef(null);
|
|
14394
15681
|
var _onCancel = function onCancel() {
|
|
14395
15682
|
setVisible(false);
|
|
14396
15683
|
};
|
|
14397
15684
|
var onOk = function onOk() {
|
|
14398
|
-
var
|
|
14399
|
-
var selectedList = ((
|
|
15685
|
+
var _goodsListRef$current;
|
|
15686
|
+
var selectedList = ((_goodsListRef$current = goodsListRef.current) === null || _goodsListRef$current === void 0 ? void 0 : _goodsListRef$current.getSelectGoodList()) || [];
|
|
14400
15687
|
onSubmit(selectedList);
|
|
14401
15688
|
_onCancel();
|
|
14402
15689
|
};
|
|
@@ -14411,8 +15698,14 @@ var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
|
14411
15698
|
},
|
|
14412
15699
|
onOk: onOk,
|
|
14413
15700
|
wrapClassName: "goodModal"
|
|
14414
|
-
}, /*#__PURE__*/React.createElement(
|
|
14415
|
-
|
|
15701
|
+
}, ((_props$goodsSource = props.goodsSource) === null || _props$goodsSource === void 0 ? void 0 : _props$goodsSource.source) === 'workOrder' ? /*#__PURE__*/React.createElement(WorkorderList$1, {
|
|
15702
|
+
erp: "gy",
|
|
15703
|
+
goodsSource: props.goodsSource,
|
|
15704
|
+
seletedGooods: seletedGooods,
|
|
15705
|
+
useGoodsSourceFormat: props.useGoodsSourceFormat,
|
|
15706
|
+
ref: goodsListRef
|
|
15707
|
+
}) : /*#__PURE__*/React.createElement(GyGoodsList$1, {
|
|
15708
|
+
ref: goodsListRef
|
|
14416
15709
|
})));
|
|
14417
15710
|
};
|
|
14418
15711
|
var GyGoodsModal$2 = /*#__PURE__*/forwardRef(GyGoodsModal$1);
|
|
@@ -16659,7 +17952,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
16659
17952
|
SKX_GOODS: [{
|
|
16660
17953
|
dataIndex: 'skuEcode',
|
|
16661
17954
|
title: "[SKX]\u53D1\u8D27\u5355\u660E\u7EC6-skuEcode",
|
|
16662
|
-
width:
|
|
17955
|
+
width: 250
|
|
16663
17956
|
}, {
|
|
16664
17957
|
dataIndex: 'subOrderId',
|
|
16665
17958
|
title: "[SKX]\u53D1\u8D27\u5355-\u5B50\u8BA2\u5355\u53F7",
|
|
@@ -16678,7 +17971,7 @@ var getColumns$7 = function getColumns(_ref) {
|
|
|
16678
17971
|
SKX_RETURN_GOODS: [{
|
|
16679
17972
|
dataIndex: 'returnSkuEcode',
|
|
16680
17973
|
title: "[SKX]\u9000\u8D27\u5355\u660E\u7EC6-returnSkuEcode",
|
|
16681
|
-
width:
|
|
17974
|
+
width: 300
|
|
16682
17975
|
}, {
|
|
16683
17976
|
dataIndex: 'returnSubOrderId',
|
|
16684
17977
|
title: "[SKX]\u9000\u8D27\u5355-\u5B50\u8BA2\u5355\u53F7",
|
|
@@ -16987,44 +18280,52 @@ var isErpType = {
|
|
|
16987
18280
|
var processGoods = function processGoods(_ref) {
|
|
16988
18281
|
var list = _ref.list,
|
|
16989
18282
|
type = _ref.type,
|
|
16990
|
-
canUpdateNumber = _ref.canUpdateNumber
|
|
18283
|
+
canUpdateNumber = _ref.canUpdateNumber,
|
|
18284
|
+
_ref$source = _ref.source,
|
|
18285
|
+
source = _ref$source === void 0 ? 'erp' : _ref$source;
|
|
16991
18286
|
var newList = [];
|
|
16992
18287
|
// 根据商品类型处理数据
|
|
16993
18288
|
if (isErpType.isWdt(type)) {
|
|
16994
18289
|
newList = processWdtGoods({
|
|
16995
18290
|
list: list,
|
|
16996
18291
|
type: type,
|
|
16997
|
-
canUpdateNumber: canUpdateNumber
|
|
18292
|
+
canUpdateNumber: canUpdateNumber,
|
|
18293
|
+
source: source
|
|
16998
18294
|
});
|
|
16999
18295
|
} else if (isErpType.isBsE3(type)) {
|
|
17000
18296
|
newList = processBsE3Goods({
|
|
17001
18297
|
list: list,
|
|
17002
18298
|
type: type,
|
|
17003
|
-
canUpdateNumber: canUpdateNumber
|
|
18299
|
+
canUpdateNumber: canUpdateNumber,
|
|
18300
|
+
source: source
|
|
17004
18301
|
});
|
|
17005
18302
|
} else if (isErpType.isGy(type)) {
|
|
17006
18303
|
newList = processGyGoods({
|
|
17007
18304
|
list: list,
|
|
17008
18305
|
type: type,
|
|
17009
|
-
canUpdateNumber: canUpdateNumber
|
|
18306
|
+
canUpdateNumber: canUpdateNumber,
|
|
18307
|
+
source: source
|
|
17010
18308
|
});
|
|
17011
18309
|
} else if (isErpType.isJst(type)) {
|
|
17012
18310
|
newList = processJstGoods({
|
|
17013
18311
|
list: list,
|
|
17014
18312
|
type: type,
|
|
17015
|
-
canUpdateNumber: canUpdateNumber
|
|
18313
|
+
canUpdateNumber: canUpdateNumber,
|
|
18314
|
+
source: source
|
|
17016
18315
|
});
|
|
17017
18316
|
} else if (isErpType.isKm(type)) {
|
|
17018
18317
|
newList = processKmGoods({
|
|
17019
18318
|
list: list,
|
|
17020
18319
|
type: type,
|
|
17021
|
-
canUpdateNumber: canUpdateNumber
|
|
18320
|
+
canUpdateNumber: canUpdateNumber,
|
|
18321
|
+
source: source
|
|
17022
18322
|
});
|
|
17023
18323
|
} else {
|
|
17024
18324
|
newList = processDefaultGoods({
|
|
17025
18325
|
list: list,
|
|
17026
18326
|
type: type,
|
|
17027
|
-
canUpdateNumber: canUpdateNumber
|
|
18327
|
+
canUpdateNumber: canUpdateNumber,
|
|
18328
|
+
source: source
|
|
17028
18329
|
});
|
|
17029
18330
|
}
|
|
17030
18331
|
return newList;
|
|
@@ -17089,26 +18390,31 @@ var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
|
17089
18390
|
});
|
|
17090
18391
|
};
|
|
17091
18392
|
var processGyGoods = function processGyGoods(_ref4) {
|
|
17092
|
-
var list = _ref4.list
|
|
18393
|
+
var list = _ref4.list,
|
|
18394
|
+
source = _ref4.source;
|
|
18395
|
+
var isFormWorkOrder = source === 'workOrder';
|
|
17093
18396
|
return list.map(function (item) {
|
|
17094
18397
|
var goodName = item.goodName,
|
|
17095
18398
|
goodShortName = item.goodShortName,
|
|
17096
18399
|
goodNo = item.goodNo,
|
|
17097
18400
|
specName = item.specName,
|
|
17098
18401
|
specNo = item.specNo,
|
|
17099
|
-
retailPrice = item.retailPrice
|
|
18402
|
+
retailPrice = item.retailPrice,
|
|
18403
|
+
qty = item.qty,
|
|
18404
|
+
originPrice = item.originPrice,
|
|
18405
|
+
originAmount = item.originAmount;
|
|
17100
18406
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17101
18407
|
uuid: uuid(),
|
|
17102
18408
|
canDelete: true,
|
|
17103
18409
|
canEdit: true,
|
|
17104
|
-
qty: 1,
|
|
18410
|
+
qty: isFormWorkOrder ? qty : 1,
|
|
17105
18411
|
goodName: goodName,
|
|
17106
18412
|
goodShortName: goodShortName,
|
|
17107
18413
|
goodNo: goodNo,
|
|
17108
18414
|
specName: specName,
|
|
17109
18415
|
specNo: specNo,
|
|
17110
|
-
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
17111
|
-
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
18416
|
+
originPrice: isFormWorkOrder ? originPrice : !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
18417
|
+
originAmount: isFormWorkOrder ? originAmount : !isNull(retailPrice) ? Number(retailPrice) : null
|
|
17112
18418
|
});
|
|
17113
18419
|
});
|
|
17114
18420
|
};
|
|
@@ -17351,7 +18657,9 @@ var getButtonText = function getButtonText() {
|
|
|
17351
18657
|
return '选择商品';
|
|
17352
18658
|
};
|
|
17353
18659
|
var GoodItem$1 = function GoodItem(props) {
|
|
17354
|
-
var
|
|
18660
|
+
var useGoodsSourceFormat = props.useGoodsSourceFormat,
|
|
18661
|
+
goodsSource = props.goodsSource,
|
|
18662
|
+
_props$value = props.value,
|
|
17355
18663
|
value = _props$value === void 0 ? [] : _props$value,
|
|
17356
18664
|
type = props.type,
|
|
17357
18665
|
onChange = props.onChange,
|
|
@@ -17622,7 +18930,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
17622
18930
|
var newList = processGoods({
|
|
17623
18931
|
list: list,
|
|
17624
18932
|
canUpdateNumber: canUpdateNumber,
|
|
17625
|
-
type: type
|
|
18933
|
+
type: type,
|
|
18934
|
+
source: (goodsSource === null || goodsSource === void 0 ? void 0 : goodsSource.source) || 'erp'
|
|
17626
18935
|
});
|
|
17627
18936
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
17628
18937
|
};
|
|
@@ -17711,7 +19020,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
17711
19020
|
shopList: shopList,
|
|
17712
19021
|
shopId: shopId,
|
|
17713
19022
|
maxLength: maxLength,
|
|
17714
|
-
companyKey: companyKey
|
|
19023
|
+
companyKey: companyKey,
|
|
19024
|
+
goodsSource: goodsSource,
|
|
19025
|
+
useGoodsSourceFormat: useGoodsSourceFormat
|
|
17715
19026
|
}));
|
|
17716
19027
|
};
|
|
17717
19028
|
|
|
@@ -17850,7 +19161,7 @@ var BsGoods = function BsGoods(props) {
|
|
|
17850
19161
|
}));
|
|
17851
19162
|
};
|
|
17852
19163
|
|
|
17853
|
-
var _excluded$
|
|
19164
|
+
var _excluded$h = ["value", "onChange", "reasonList", "disabled"];
|
|
17854
19165
|
var BsExchange = function BsExchange(props) {
|
|
17855
19166
|
var _value$bsExchangeType4, _value$bsExchangeType5, _value$bsExchangeType6;
|
|
17856
19167
|
var value = props.value,
|
|
@@ -17858,7 +19169,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
17858
19169
|
_props$reasonList = props.reasonList,
|
|
17859
19170
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17860
19171
|
disabled = props.disabled,
|
|
17861
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
19172
|
+
other = _objectWithoutProperties(props, _excluded$h);
|
|
17862
19173
|
var valueRef = useRef({});
|
|
17863
19174
|
useEffect(function () {
|
|
17864
19175
|
valueRef.current = value;
|
|
@@ -18085,7 +19396,7 @@ var BsExchange = function BsExchange(props) {
|
|
|
18085
19396
|
}))) : null);
|
|
18086
19397
|
};
|
|
18087
19398
|
|
|
18088
|
-
var _excluded$
|
|
19399
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
18089
19400
|
var typeMap = {
|
|
18090
19401
|
BS_REISSUE_GOODS: {
|
|
18091
19402
|
key: 'bsReissueGoods',
|
|
@@ -18110,7 +19421,7 @@ var BsReissue = function BsReissue(props) {
|
|
|
18110
19421
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18111
19422
|
disabled = props.disabled,
|
|
18112
19423
|
type = props.type,
|
|
18113
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
19424
|
+
other = _objectWithoutProperties(props, _excluded$i);
|
|
18114
19425
|
var valueRef = useRef({});
|
|
18115
19426
|
useEffect(function () {
|
|
18116
19427
|
var _typeMap$type;
|
|
@@ -18226,14 +19537,14 @@ var BsReissue = function BsReissue(props) {
|
|
|
18226
19537
|
})));
|
|
18227
19538
|
};
|
|
18228
19539
|
|
|
18229
|
-
var _excluded$
|
|
19540
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled"];
|
|
18230
19541
|
var BsReturnGoods = function BsReturnGoods(props) {
|
|
18231
19542
|
var value = props.value,
|
|
18232
19543
|
onChange = props.onChange,
|
|
18233
19544
|
_props$reasonList = props.reasonList,
|
|
18234
19545
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18235
19546
|
disabled = props.disabled,
|
|
18236
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
19547
|
+
other = _objectWithoutProperties(props, _excluded$j);
|
|
18237
19548
|
var valueRef = useRef({});
|
|
18238
19549
|
useEffect(function () {
|
|
18239
19550
|
pubsub.subscribe('returnSelectList', function (_, data) {
|
|
@@ -18375,7 +19686,7 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
18375
19686
|
var p = new Promise(function (resolve, reject) {
|
|
18376
19687
|
var doReject = function doReject(err) {
|
|
18377
19688
|
// 清空掉错误的请求记录
|
|
18378
|
-
|
|
19689
|
+
singletonMap$1.delete(orderNo);
|
|
18379
19690
|
reject(err);
|
|
18380
19691
|
};
|
|
18381
19692
|
extendRequest('/qy/gdfw/order/bse3OrderDetail', {
|
|
@@ -18463,7 +19774,7 @@ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
|
18463
19774
|
var p = new Promise(function (resolve, reject) {
|
|
18464
19775
|
var doReject = function doReject(err) {
|
|
18465
19776
|
// 清空掉错误的请求记录
|
|
18466
|
-
|
|
19777
|
+
singletonMap$3.delete(orderNo);
|
|
18467
19778
|
reject(err);
|
|
18468
19779
|
};
|
|
18469
19780
|
servers.JST.jstOrderDetailWrap(orderNo).then(function (data) {
|
|
@@ -18625,7 +19936,7 @@ var kmUtils = {
|
|
|
18625
19936
|
getOrderListSingleton: getOrderListSingleton$2
|
|
18626
19937
|
};
|
|
18627
19938
|
|
|
18628
|
-
var _excluded$
|
|
19939
|
+
var _excluded$k = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
|
|
18629
19940
|
var columnsMap = {
|
|
18630
19941
|
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
18631
19942
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -18879,7 +20190,7 @@ var index$2 = (function (props) {
|
|
|
18879
20190
|
vipCode = _ref10.vipCode,
|
|
18880
20191
|
shopCode = _ref10.shopCode,
|
|
18881
20192
|
cancel = _ref10.cancel,
|
|
18882
|
-
rest = _objectWithoutProperties(_ref10, _excluded$
|
|
20193
|
+
rest = _objectWithoutProperties(_ref10, _excluded$k);
|
|
18883
20194
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
18884
20195
|
billNo: billNo,
|
|
18885
20196
|
billType: billType,
|
|
@@ -18954,9 +20265,9 @@ var index$2 = (function (props) {
|
|
|
18954
20265
|
}));
|
|
18955
20266
|
});
|
|
18956
20267
|
|
|
18957
|
-
var css_248z$
|
|
20268
|
+
var css_248z$d = ".customizeUpload-module_customizeUpload__2tG-4 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n width: 100%;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj {\n display: flex !important;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:hover:not(:disabled) {\n color: #40a9ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 {\n position: relative;\n width: 24px;\n height: 24px;\n overflow: hidden;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_image__3hOnT {\n width: 100%;\n height: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: white;\n font-size: 10px;\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl:hover {\n background-color: rgba(255, 0, 0, 0.8);\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1:hover .customizeUpload-module_deleteBtn__85Jsl {\n opacity: 1;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_uploadContainer__rUcw7 {\n margin-top: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq {\n width: 280px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverTitle__3Qw2t {\n margin-bottom: 4px;\n color: #262626;\n font-weight: 500;\n font-size: 16px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverSubtitle__1NA3m {\n margin-bottom: 16px;\n color: #8c8c8c;\n font-size: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G {\n display: flex;\n gap: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J {\n display: flex;\n flex: 1;\n gap: 6px;\n align-items: center;\n justify-content: center;\n height: 40px;\n background-color: #fafafa;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:hover:not(:disabled) {\n color: #40a9ff;\n background-color: #f0f8ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n";
|
|
18958
20269
|
var styles$5 = {"customizeUpload":"customizeUpload-module_customizeUpload__2tG-4","addButton":"customizeUpload-module_addButton__2w8Jj","imageItem":"customizeUpload-module_imageItem__yn6H1","image":"customizeUpload-module_image__3hOnT","deleteBtn":"customizeUpload-module_deleteBtn__85Jsl","uploadContainer":"customizeUpload-module_uploadContainer__rUcw7","popoverContent":"customizeUpload-module_popoverContent__FrAiq","popoverTitle":"customizeUpload-module_popoverTitle__3Qw2t","popoverSubtitle":"customizeUpload-module_popoverSubtitle__1NA3m","actionButtons":"customizeUpload-module_actionButtons__2la0G","actionButton":"customizeUpload-module_actionButton__1Wr1J"};
|
|
18959
|
-
styleInject(css_248z$
|
|
20270
|
+
styleInject(css_248z$d);
|
|
18960
20271
|
|
|
18961
20272
|
var CustomizeUpload = function CustomizeUpload(_ref) {
|
|
18962
20273
|
var _ref$value = _ref.value,
|
|
@@ -19515,6 +20826,7 @@ var OrderSubForm = function OrderSubForm(props) {
|
|
|
19515
20826
|
manual = props.manual,
|
|
19516
20827
|
correlationList = props.subConfig.correlationList,
|
|
19517
20828
|
effects = props.effects;
|
|
20829
|
+
console.log('effects', effects);
|
|
19518
20830
|
var valueRef = useRef(value);
|
|
19519
20831
|
useEffect(function () {
|
|
19520
20832
|
valueRef.current = value;
|
|
@@ -19694,11 +21006,16 @@ var OrderSubForm = function OrderSubForm(props) {
|
|
|
19694
21006
|
}));
|
|
19695
21007
|
};
|
|
19696
21008
|
var getDataSourceAsync = function getDataSourceAsync() {
|
|
19697
|
-
var
|
|
19698
|
-
|
|
19699
|
-
|
|
19700
|
-
|
|
19701
|
-
|
|
21009
|
+
var _ref = effects || {},
|
|
21010
|
+
shopList = _ref.shopList,
|
|
21011
|
+
form = _ref.form;
|
|
21012
|
+
var _ref2 = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {},
|
|
21013
|
+
_ref2$shopId = _ref2.shopId,
|
|
21014
|
+
shopId = _ref2$shopId === void 0 ? '' : _ref2$shopId;
|
|
21015
|
+
var JOIN_SHOP = shopList === null || shopList === void 0 ? void 0 : shopList.find(function (item) {
|
|
21016
|
+
return !item.notJoin && item.shopId == shopId;
|
|
21017
|
+
});
|
|
21018
|
+
return (value === null || value === void 0 ? void 0 : value.orderNo) && shopId && JOIN_SHOP ? getOrderListSingleton$4({
|
|
19702
21019
|
orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
|
|
19703
21020
|
shopId: shopId
|
|
19704
21021
|
}).then(function (data) {
|
|
@@ -19706,7 +21023,7 @@ var OrderSubForm = function OrderSubForm(props) {
|
|
|
19706
21023
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
19707
21024
|
allOrders: allOrders
|
|
19708
21025
|
}));
|
|
19709
|
-
}) : Promise.resolve();
|
|
21026
|
+
}).catch(console.debug) : Promise.resolve();
|
|
19710
21027
|
};
|
|
19711
21028
|
var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
|
|
19712
21029
|
var goodDetails = (value === null || value === void 0 ? void 0 : value.allOrders) || [];
|
|
@@ -19913,7 +21230,7 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
19913
21230
|
}));
|
|
19914
21231
|
};
|
|
19915
21232
|
|
|
19916
|
-
var componentMap$
|
|
21233
|
+
var componentMap$2 = {
|
|
19917
21234
|
WDT_GOODS: {
|
|
19918
21235
|
type: 'wdt',
|
|
19919
21236
|
key: 'wdtGoods',
|
|
@@ -20055,7 +21372,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20055
21372
|
// 合并单订单会包含","
|
|
20056
21373
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
20057
21374
|
var _order$componentMap$c;
|
|
20058
|
-
return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$
|
|
21375
|
+
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(',');
|
|
20059
21376
|
});
|
|
20060
21377
|
var getOrderFlag = useRef(false);
|
|
20061
21378
|
var _useState = useState(false),
|
|
@@ -20098,7 +21415,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20098
21415
|
};
|
|
20099
21416
|
}();
|
|
20100
21417
|
useEffect(function () {
|
|
20101
|
-
tokens.current = [pubsub.subscribe(componentMap$
|
|
21418
|
+
tokens.current = [pubsub.subscribe(componentMap$2[compType].eventNameMap.type, function (type, data) {
|
|
20102
21419
|
if (disabled) return;
|
|
20103
21420
|
// console.log(type, data);
|
|
20104
21421
|
withInfo.current = {
|
|
@@ -20109,13 +21426,13 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20109
21426
|
setTableSelect(['2', '4'].includes(data.val));
|
|
20110
21427
|
if (['1', '3'].includes(data.val)) {
|
|
20111
21428
|
var _valueRef$current2, _valueRef$current3;
|
|
20112
|
-
pubsub.publish(componentMap$
|
|
20113
|
-
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2[componentMap$
|
|
21429
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.selectListReturn, {
|
|
21430
|
+
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]) || []),
|
|
20114
21431
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : _valueRef$current3.shopCode,
|
|
20115
21432
|
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
20116
21433
|
});
|
|
20117
21434
|
}
|
|
20118
|
-
}), pubsub.subscribe(componentMap$
|
|
21435
|
+
}), pubsub.subscribe(componentMap$2[compType].eventNameMap.reissueType, function (type, data) {
|
|
20119
21436
|
if (disabled) return;
|
|
20120
21437
|
withInfo.current = {
|
|
20121
21438
|
type: type,
|
|
@@ -20125,13 +21442,13 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20125
21442
|
setTableSelect(['2', '4'].includes(data.val));
|
|
20126
21443
|
if (['1', '3'].includes(data.val)) {
|
|
20127
21444
|
var _valueRef$current4, _valueRef$current5;
|
|
20128
|
-
pubsub.publish(componentMap$
|
|
20129
|
-
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : _valueRef$current4[componentMap$
|
|
21445
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.reissueSelectListReturn, {
|
|
21446
|
+
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]) || []),
|
|
20130
21447
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5.shopCode,
|
|
20131
21448
|
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
20132
21449
|
});
|
|
20133
21450
|
}
|
|
20134
|
-
}), pubsub.subscribe(componentMap$
|
|
21451
|
+
}), pubsub.subscribe(componentMap$2[compType].eventNameMap.returnType, function (type, data) {
|
|
20135
21452
|
if (disabled) return;
|
|
20136
21453
|
withInfo.current = {
|
|
20137
21454
|
type: type,
|
|
@@ -20141,13 +21458,13 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20141
21458
|
setTableSelect(['2', '4'].includes(data.val));
|
|
20142
21459
|
if (['1', '3'].includes(data.val)) {
|
|
20143
21460
|
var _valueRef$current6, _valueRef$current7;
|
|
20144
|
-
pubsub.publish(componentMap$
|
|
20145
|
-
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6[componentMap$
|
|
21461
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.returnSelectListReturn, {
|
|
21462
|
+
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]) || []),
|
|
20146
21463
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.shopCode,
|
|
20147
21464
|
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
20148
21465
|
});
|
|
20149
21466
|
}
|
|
20150
|
-
}), pubsub.subscribeOnce(componentMap$
|
|
21467
|
+
}), pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
20151
21468
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
20152
21469
|
shopCode: data.shopCode
|
|
20153
21470
|
}));
|
|
@@ -20168,8 +21485,8 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20168
21485
|
// type: componentMap[compType].eventNameMap.selectList,
|
|
20169
21486
|
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
20170
21487
|
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
20171
|
-
type: componentMap$
|
|
20172
|
-
}, _defineProperty(_typeMap, "".concat(componentMap$
|
|
21488
|
+
type: componentMap$2[compType].eventNameMap.selectList
|
|
21489
|
+
}, _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);
|
|
20173
21490
|
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
20174
21491
|
// console.log('onSelect', type, withInfo.current, newList);
|
|
20175
21492
|
pubsub.publish(type, {
|
|
@@ -20184,38 +21501,38 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20184
21501
|
};
|
|
20185
21502
|
var _onDelete = function onDelete(item) {
|
|
20186
21503
|
var deleteId = item === null || item === void 0 ? void 0 : item.specId;
|
|
20187
|
-
pubsub.publish(componentMap$
|
|
20188
|
-
pubsub.publish(componentMap$
|
|
20189
|
-
pubsub.publish(componentMap$
|
|
20190
|
-
pubsub.publish(componentMap$
|
|
21504
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.deleteGood, deleteId);
|
|
21505
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
21506
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
21507
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.exchangeDeleteGood, deleteId);
|
|
20191
21508
|
};
|
|
20192
21509
|
var changeHandle = function changeHandle(list) {
|
|
20193
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$
|
|
21510
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$2[compType].key, list)));
|
|
20194
21511
|
};
|
|
20195
21512
|
var handleModeChange = function handleModeChange(isStrict) {
|
|
20196
21513
|
// isStrict 是否只展示当前平台订单商品
|
|
20197
21514
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({
|
|
20198
21515
|
isStrict: isStrict
|
|
20199
|
-
}, componentMap$
|
|
21516
|
+
}, componentMap$2[compType].key, getGoodDetails({
|
|
20200
21517
|
mode: isStrict
|
|
20201
21518
|
}))));
|
|
20202
21519
|
};
|
|
20203
21520
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
20204
21521
|
var mode = _ref2.mode;
|
|
20205
|
-
var updateHandle = componentMap$
|
|
21522
|
+
var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
|
|
20206
21523
|
var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.orders) || [], {
|
|
20207
21524
|
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
20208
21525
|
});
|
|
20209
21526
|
var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
|
|
20210
21527
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
20211
21528
|
var _componentMap$compTyp;
|
|
20212
|
-
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp = componentMap$
|
|
21529
|
+
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;
|
|
20213
21530
|
}) : goodDetails;
|
|
20214
21531
|
};
|
|
20215
21532
|
// 找到该订单号下所有商品
|
|
20216
21533
|
var getAllTradeGoodsDetails = function getAllTradeGoodsDetails(_ref3) {
|
|
20217
21534
|
var mode = _ref3.mode;
|
|
20218
|
-
var updateHandle = componentMap$
|
|
21535
|
+
var updateHandle = componentMap$2[compType].eventNameMap['updateGoodsHandle'];
|
|
20219
21536
|
console.log('value?.allOrders', value, (value === null || value === void 0 ? void 0 : value.allOrders) || []);
|
|
20220
21537
|
var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.allOrders) || [], {
|
|
20221
21538
|
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
@@ -20223,7 +21540,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20223
21540
|
var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
|
|
20224
21541
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
20225
21542
|
var _componentMap$compTyp2;
|
|
20226
|
-
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp2 = componentMap$
|
|
21543
|
+
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;
|
|
20227
21544
|
}) : goodDetails;
|
|
20228
21545
|
};
|
|
20229
21546
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
@@ -20235,16 +21552,16 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20235
21552
|
mode: isStrict
|
|
20236
21553
|
}) || [];
|
|
20237
21554
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20238
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(componentMap$
|
|
20239
|
-
newValue["".concat(componentMap$
|
|
21555
|
+
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)]) || [];
|
|
21556
|
+
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) {
|
|
20240
21557
|
return skuList.includes(item.uuid);
|
|
20241
21558
|
});
|
|
20242
21559
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20243
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(componentMap$
|
|
21560
|
+
}, [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]);
|
|
20244
21561
|
// 商品信息组件暂存后 重新编辑,此时需要重新获取订单下所有系统自订单的商品信息
|
|
20245
21562
|
var getDataSourceAsync = function getDataSourceAsync() {
|
|
20246
21563
|
var _componentMap$compTyp6;
|
|
20247
|
-
return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$compTyp6 = componentMap$
|
|
21564
|
+
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) {
|
|
20248
21565
|
var list = processAllOrders({
|
|
20249
21566
|
data: data,
|
|
20250
21567
|
orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
|
|
@@ -20256,10 +21573,10 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20256
21573
|
}) : Promise.resolve();
|
|
20257
21574
|
};
|
|
20258
21575
|
return /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
20259
|
-
key: componentMap$
|
|
21576
|
+
key: componentMap$2[compType].key
|
|
20260
21577
|
}, props), {}, {
|
|
20261
21578
|
disabled: disabled,
|
|
20262
|
-
value: value === null || value === void 0 ? void 0 : value[componentMap$
|
|
21579
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].key],
|
|
20263
21580
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20264
21581
|
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),
|
|
20265
21582
|
selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
|
|
@@ -20287,7 +21604,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
20287
21604
|
}));
|
|
20288
21605
|
};
|
|
20289
21606
|
|
|
20290
|
-
var componentMap$
|
|
21607
|
+
var componentMap$3 = {
|
|
20291
21608
|
WDT_RETURN_GOODS: {
|
|
20292
21609
|
type: 'wdt',
|
|
20293
21610
|
valueKey: 'wdtReturnGoods',
|
|
@@ -20315,10 +21632,10 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20315
21632
|
isSettingConfig = props.isSettingConfig;
|
|
20316
21633
|
var valueRef = useRef({});
|
|
20317
21634
|
useEffect(function () {
|
|
20318
|
-
var subscription = pubsub.subscribe(componentMap$
|
|
21635
|
+
var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.exchangeCopyGood, function () {
|
|
20319
21636
|
var _valueRef$current, _valueRef$current2;
|
|
20320
|
-
pubsub.publish(componentMap$
|
|
20321
|
-
list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[componentMap$
|
|
21637
|
+
pubsub.publish(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, {
|
|
21638
|
+
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]) || []),
|
|
20322
21639
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
|
|
20323
21640
|
});
|
|
20324
21641
|
});
|
|
@@ -20327,13 +21644,13 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20327
21644
|
};
|
|
20328
21645
|
}, []);
|
|
20329
21646
|
useEffect(function () {
|
|
20330
|
-
var subscription = pubsub.subscribe(componentMap$
|
|
21647
|
+
var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.returnSelectList, function (_, data) {
|
|
20331
21648
|
if (disabled) return;
|
|
20332
21649
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
20333
21650
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
20334
21651
|
});
|
|
20335
21652
|
if (compType === 'WDT_RETURN_GOODS') {
|
|
20336
|
-
newValue[componentMap$
|
|
21653
|
+
newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
20337
21654
|
if (typeof item.type === 'undefined') {
|
|
20338
21655
|
item.type = '1';
|
|
20339
21656
|
}
|
|
@@ -20346,7 +21663,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20346
21663
|
return item;
|
|
20347
21664
|
});
|
|
20348
21665
|
} else {
|
|
20349
|
-
newValue[componentMap$
|
|
21666
|
+
newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
20350
21667
|
}
|
|
20351
21668
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20352
21669
|
});
|
|
@@ -20355,13 +21672,13 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20355
21672
|
};
|
|
20356
21673
|
}, []);
|
|
20357
21674
|
useEffect(function () {
|
|
20358
|
-
var subscription = pubsub.subscribe(componentMap$
|
|
21675
|
+
var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.returnSelectListReturn, function (_, data) {
|
|
20359
21676
|
if (disabled) return;
|
|
20360
21677
|
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
20361
21678
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
20362
21679
|
});
|
|
20363
21680
|
if (compType === 'WDT_RETURN_GOODS') {
|
|
20364
|
-
newValue[componentMap$
|
|
21681
|
+
newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
20365
21682
|
if (typeof item.type === 'undefined') {
|
|
20366
21683
|
item.type = '1';
|
|
20367
21684
|
}
|
|
@@ -20374,7 +21691,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20374
21691
|
return item;
|
|
20375
21692
|
});
|
|
20376
21693
|
} else {
|
|
20377
|
-
newValue[componentMap$
|
|
21694
|
+
newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
20378
21695
|
}
|
|
20379
21696
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20380
21697
|
});
|
|
@@ -20384,17 +21701,17 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20384
21701
|
}, []);
|
|
20385
21702
|
useEffect(function () {
|
|
20386
21703
|
valueRef.current = value;
|
|
20387
|
-
pubsub.subscribeOnce(componentMap$
|
|
21704
|
+
pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.returnDeleteGood, function (_, data) {
|
|
20388
21705
|
if (disabled) return;
|
|
20389
21706
|
if (value) {
|
|
20390
21707
|
var newValue = _objectSpread2({}, value);
|
|
20391
|
-
newValue[componentMap$
|
|
21708
|
+
newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
|
|
20392
21709
|
return item.sku !== data;
|
|
20393
21710
|
});
|
|
20394
21711
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20395
21712
|
}
|
|
20396
21713
|
});
|
|
20397
|
-
pubsub.subscribeOnce(componentMap$
|
|
21714
|
+
pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
20398
21715
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
20399
21716
|
shopCode: data.shopCode
|
|
20400
21717
|
}));
|
|
@@ -20402,20 +21719,20 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20402
21719
|
}, [value, disabled]);
|
|
20403
21720
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20404
21721
|
var newValue = _objectSpread2({}, value);
|
|
20405
|
-
newValue[componentMap$
|
|
20406
|
-
newValue[componentMap$
|
|
21722
|
+
newValue[componentMap$3[compType].returnTypeKey] = val;
|
|
21723
|
+
newValue[componentMap$3[compType].valueKey] = [];
|
|
20407
21724
|
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
20408
21725
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20409
21726
|
valueRef.current = newValue;
|
|
20410
21727
|
}
|
|
20411
|
-
pubsub.publish(componentMap$
|
|
21728
|
+
pubsub.publish(componentMap$3[compType].eventNameMap.returnType, {
|
|
20412
21729
|
val: val[0],
|
|
20413
21730
|
goodValue: newValue
|
|
20414
21731
|
});
|
|
20415
21732
|
};
|
|
20416
21733
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20417
21734
|
var newValue = _objectSpread2({}, value);
|
|
20418
|
-
newValue[componentMap$
|
|
21735
|
+
newValue[componentMap$3[compType].valueKey] = val;
|
|
20419
21736
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20420
21737
|
};
|
|
20421
21738
|
//显示选择商品按钮 原单换不显示选择商品
|
|
@@ -20429,25 +21746,25 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
20429
21746
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20430
21747
|
allowClear: false,
|
|
20431
21748
|
options: reasonList,
|
|
20432
|
-
value: value === null || value === void 0 ? void 0 : value[componentMap$
|
|
21749
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].returnTypeKey],
|
|
20433
21750
|
onChange: function onChange(val) {
|
|
20434
21751
|
return changeTypeHandle(val);
|
|
20435
21752
|
}
|
|
20436
21753
|
}), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
20437
|
-
key: componentMap$
|
|
21754
|
+
key: componentMap$3[compType].type
|
|
20438
21755
|
}, props), {}, {
|
|
20439
21756
|
disabled: disabled,
|
|
20440
21757
|
canUpdateNumber: true,
|
|
20441
21758
|
showChangeBtn: false,
|
|
20442
21759
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20443
|
-
value: value === null || value === void 0 ? void 0 : value[componentMap$
|
|
21760
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
|
|
20444
21761
|
onChange: function onChange(val) {
|
|
20445
21762
|
return changeGoodHandle(val);
|
|
20446
21763
|
}
|
|
20447
21764
|
})));
|
|
20448
21765
|
};
|
|
20449
21766
|
|
|
20450
|
-
var componentMap$
|
|
21767
|
+
var componentMap$4 = {
|
|
20451
21768
|
WDT_EXCHANGE_GOODS: {
|
|
20452
21769
|
type: 'wdt',
|
|
20453
21770
|
valueKey: 'wdtExchangeGoods',
|
|
@@ -20487,7 +21804,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
20487
21804
|
onChange = props.onChange,
|
|
20488
21805
|
disabled = props.disabled,
|
|
20489
21806
|
compType = props.type;
|
|
20490
|
-
var uniqueKey = (componentMap$
|
|
21807
|
+
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';
|
|
20491
21808
|
var valueRef = useRef({});
|
|
20492
21809
|
// PS: 目前选择订单商品,只有聚水潭换出商品,而且聚水潭不用考虑合并单,所以这个值一直是 false
|
|
20493
21810
|
var _useState = useState(false),
|
|
@@ -20499,13 +21816,13 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
20499
21816
|
originDataSource = _useState4[0],
|
|
20500
21817
|
setOriginDataSource = _useState4[1];
|
|
20501
21818
|
useEffect(function () {
|
|
20502
|
-
var subscription = componentMap$
|
|
21819
|
+
var subscription = componentMap$4[compType].eventNameMap.exchangeBackCopyGood && pubsub.subscribe(componentMap$4[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
|
|
20503
21820
|
if (disabled) return;
|
|
20504
21821
|
var newValue = {
|
|
20505
21822
|
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
20506
21823
|
};
|
|
20507
21824
|
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
20508
|
-
newValue[componentMap$
|
|
21825
|
+
newValue[componentMap$4[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
20509
21826
|
if (typeof item.type === 'undefined') {
|
|
20510
21827
|
item.type = '1';
|
|
20511
21828
|
}
|
|
@@ -20516,7 +21833,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
20516
21833
|
return item;
|
|
20517
21834
|
});
|
|
20518
21835
|
} else {
|
|
20519
|
-
newValue[componentMap$
|
|
21836
|
+
newValue[componentMap$4[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
20520
21837
|
}
|
|
20521
21838
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20522
21839
|
});
|
|
@@ -20535,12 +21852,12 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
20535
21852
|
return item;
|
|
20536
21853
|
});
|
|
20537
21854
|
}
|
|
20538
|
-
newValue[componentMap$
|
|
21855
|
+
newValue[componentMap$4[compType].valueKey] = val;
|
|
20539
21856
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20540
21857
|
};
|
|
20541
21858
|
var copyGoods = function copyGoods() {
|
|
20542
21859
|
var copyHandle = function copyHandle() {
|
|
20543
|
-
pubsub.publish(componentMap$
|
|
21860
|
+
pubsub.publish(componentMap$4[compType].eventNameMap.exchangeCopyGood, compType);
|
|
20544
21861
|
};
|
|
20545
21862
|
return /*#__PURE__*/React.createElement(Button, {
|
|
20546
21863
|
type: "link",
|
|
@@ -20553,50 +21870,50 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
20553
21870
|
// 原订单商品
|
|
20554
21871
|
var originTradeGoodList = originDataSource || [];
|
|
20555
21872
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20556
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value[componentMap$
|
|
20557
|
-
newValue[componentMap$
|
|
21873
|
+
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]) || [];
|
|
21874
|
+
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) {
|
|
20558
21875
|
return skuList.includes(item[uniqueKey]);
|
|
20559
21876
|
});
|
|
20560
21877
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20561
|
-
}, [value === null || value === void 0 ? void 0 : value[componentMap$
|
|
21878
|
+
}, [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]);
|
|
20562
21879
|
var getGoodDetails = function getGoodDetails(_ref) {
|
|
20563
21880
|
var _componentMap$compTyp5, _componentMap$compTyp6, _order$componentMap$c, _componentMap$compTyp7;
|
|
20564
21881
|
var returnGoodsValue = _ref.returnGoodsValue,
|
|
20565
21882
|
mode = _ref.mode,
|
|
20566
21883
|
sysOrderNo = _ref.sysOrderNo;
|
|
20567
|
-
var systemOrder = returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp5 = componentMap$
|
|
20568
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : returnGoodsValue === null || returnGoodsValue === void 0 ? void 0 : returnGoodsValue[(_componentMap$compTyp6 = componentMap$
|
|
21884
|
+
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];
|
|
21885
|
+
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];
|
|
20569
21886
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20570
|
-
return order[componentMap$
|
|
21887
|
+
return order[componentMap$4[compType].oIdKey] === systemOrderNo;
|
|
20571
21888
|
});
|
|
20572
|
-
var goodDetails = jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$
|
|
21889
|
+
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) : []);
|
|
20573
21890
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
20574
21891
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
20575
|
-
return !orderNo || goodItem[componentMap$
|
|
21892
|
+
return !orderNo || goodItem[componentMap$4[compType].outerOiIdKey] === orderNo;
|
|
20576
21893
|
}) : goodDetails;
|
|
20577
21894
|
};
|
|
20578
21895
|
var getDataSourceAsync = function getDataSourceAsync() {
|
|
20579
21896
|
return new Promise(function (resolve) {
|
|
20580
|
-
pubsub.subscribeOnce(componentMap$
|
|
21897
|
+
pubsub.subscribeOnce(componentMap$4[compType].eventNameMap.returnGoodsSysorderBack, function (_, data) {
|
|
20581
21898
|
resolve(data);
|
|
20582
21899
|
setOriginDataSource(getGoodDetails({
|
|
20583
21900
|
returnGoodsValue: data,
|
|
20584
21901
|
mode: isStrict
|
|
20585
21902
|
}));
|
|
20586
21903
|
});
|
|
20587
|
-
pubsub.publish(componentMap$
|
|
21904
|
+
pubsub.publish(componentMap$4[compType].eventNameMap.returnGoodsSysorder, compType);
|
|
20588
21905
|
});
|
|
20589
21906
|
};
|
|
20590
21907
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
20591
|
-
key: componentMap$
|
|
21908
|
+
key: componentMap$4[compType].type
|
|
20592
21909
|
}, props), {}, {
|
|
20593
21910
|
disabled: disabled,
|
|
20594
21911
|
canUpdateNumber: true,
|
|
20595
21912
|
showChangeBtn: true,
|
|
20596
21913
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20597
|
-
value: value === null || value === void 0 ? void 0 : value[componentMap$
|
|
21914
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$4[compType].valueKey],
|
|
20598
21915
|
otherOperations: copyGoods(),
|
|
20599
|
-
tradeGoods: componentMap$
|
|
21916
|
+
tradeGoods: componentMap$4[compType].showChooseTradeGoodsBtn ? {
|
|
20600
21917
|
uniqueKey: uniqueKey,
|
|
20601
21918
|
originDataSource: originDataSource,
|
|
20602
21919
|
getDataSourceAsync: getDataSourceAsync,
|
|
@@ -20608,7 +21925,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
20608
21925
|
})));
|
|
20609
21926
|
};
|
|
20610
21927
|
|
|
20611
|
-
var _excluded$
|
|
21928
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
20612
21929
|
var typeMap$1 = {
|
|
20613
21930
|
WDT_REISSUE_GOODS: {
|
|
20614
21931
|
key: 'wdtReissueGoods',
|
|
@@ -20637,7 +21954,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
20637
21954
|
disabled = props.disabled,
|
|
20638
21955
|
type = props.type,
|
|
20639
21956
|
isSettingConfig = props.isSettingConfig,
|
|
20640
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
21957
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
20641
21958
|
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) {
|
|
20642
21959
|
var _order$srcTid;
|
|
20643
21960
|
return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
|
|
@@ -20884,7 +22201,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
20884
22201
|
})));
|
|
20885
22202
|
};
|
|
20886
22203
|
|
|
20887
|
-
var _excluded$
|
|
22204
|
+
var _excluded$m = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
20888
22205
|
var typeMap$2 = {
|
|
20889
22206
|
JST_REISSUE_GOODS: {
|
|
20890
22207
|
compType: '补发',
|
|
@@ -20952,7 +22269,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
20952
22269
|
disabled = props.disabled,
|
|
20953
22270
|
type = props.type,
|
|
20954
22271
|
isSettingConfig = props.isSettingConfig,
|
|
20955
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
22272
|
+
other = _objectWithoutProperties(props, _excluded$m);
|
|
20956
22273
|
var getOrderFlag = useRef(false);
|
|
20957
22274
|
var _useState = useState(false),
|
|
20958
22275
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -21222,8 +22539,8 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
21222
22539
|
})));
|
|
21223
22540
|
};
|
|
21224
22541
|
|
|
21225
|
-
var css_248z$
|
|
21226
|
-
styleInject(css_248z$
|
|
22542
|
+
var css_248z$e = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
|
|
22543
|
+
styleInject(css_248z$e);
|
|
21227
22544
|
|
|
21228
22545
|
var TabPane$1 = Tabs.TabPane;
|
|
21229
22546
|
var Option$2 = Select.Option;
|
|
@@ -21698,12 +23015,12 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
21698
23015
|
};
|
|
21699
23016
|
var index$3 = /*#__PURE__*/forwardRef(Goods$1);
|
|
21700
23017
|
|
|
21701
|
-
var _excluded$
|
|
23018
|
+
var _excluded$n = ["onChange", "value", "failValue"];
|
|
21702
23019
|
function CommonStatus(props) {
|
|
21703
23020
|
var onChange = props.onChange,
|
|
21704
23021
|
value = props.value,
|
|
21705
23022
|
failValue = props.failValue,
|
|
21706
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
23023
|
+
other = _objectWithoutProperties(props, _excluded$n);
|
|
21707
23024
|
var changeHandle = function changeHandle(val) {
|
|
21708
23025
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
21709
23026
|
status: val,
|
|
@@ -21842,7 +23159,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
21842
23159
|
})) : null) : null);
|
|
21843
23160
|
};
|
|
21844
23161
|
|
|
21845
|
-
var _excluded$
|
|
23162
|
+
var _excluded$o = ["value", "onChange", "disabled", "failValue", "type"];
|
|
21846
23163
|
var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
21847
23164
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
21848
23165
|
var _props$value = props.value,
|
|
@@ -21852,7 +23169,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
21852
23169
|
failValue = props.failValue,
|
|
21853
23170
|
_props$type = props.type,
|
|
21854
23171
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
21855
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
23172
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
21856
23173
|
var _useState = useState(0),
|
|
21857
23174
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21858
23175
|
changeIndex = _useState2[0],
|
|
@@ -21918,7 +23235,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
21918
23235
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
21919
23236
|
};
|
|
21920
23237
|
|
|
21921
|
-
var _excluded$
|
|
23238
|
+
var _excluded$p = ["value", "onChange", "disabled", "failValue", "type"];
|
|
21922
23239
|
var MsgStatus = function MsgStatus(props) {
|
|
21923
23240
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
21924
23241
|
var _props$value = props.value,
|
|
@@ -21928,7 +23245,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
21928
23245
|
failValue = props.failValue,
|
|
21929
23246
|
_props$type = props.type,
|
|
21930
23247
|
type = _props$type === void 0 ? 1 : _props$type,
|
|
21931
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
23248
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
21932
23249
|
var _useState = useState(0),
|
|
21933
23250
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21934
23251
|
changeIndex = _useState2[0],
|
|
@@ -21979,64 +23296,6 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
21979
23296
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
21980
23297
|
};
|
|
21981
23298
|
|
|
21982
|
-
var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
|
|
21983
|
-
var AsyncSelect = function AsyncSelect(props) {
|
|
21984
|
-
var mode = props.mode,
|
|
21985
|
-
maxSelectCount = props.maxSelectCount,
|
|
21986
|
-
_props$showOnly = props.showOnly,
|
|
21987
|
-
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
21988
|
-
getOptionsAsync = props.getOptionsAsync,
|
|
21989
|
-
_onChange = props.onChange,
|
|
21990
|
-
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
21991
|
-
var _React$useState = React.useState([]),
|
|
21992
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
21993
|
-
data = _React$useState2[0],
|
|
21994
|
-
setData = _React$useState2[1];
|
|
21995
|
-
React.useEffect(function () {
|
|
21996
|
-
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
21997
|
-
setData(list);
|
|
21998
|
-
});
|
|
21999
|
-
}, []);
|
|
22000
|
-
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
22001
|
-
var getValueString = function getValueString(value) {
|
|
22002
|
-
var list = options;
|
|
22003
|
-
if (mode === 'multiple' && Array.isArray(value)) {
|
|
22004
|
-
var _list$filter$map$join;
|
|
22005
|
-
return (_list$filter$map$join = list.filter(function (item) {
|
|
22006
|
-
return value.includes(item.value);
|
|
22007
|
-
}).map(function (item) {
|
|
22008
|
-
return item.label;
|
|
22009
|
-
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
22010
|
-
} else {
|
|
22011
|
-
var selectedItem = list.find(function (item) {
|
|
22012
|
-
return item.value === value;
|
|
22013
|
-
});
|
|
22014
|
-
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
22015
|
-
}
|
|
22016
|
-
};
|
|
22017
|
-
if (showOnly) {
|
|
22018
|
-
return getValueString(props.value);
|
|
22019
|
-
}
|
|
22020
|
-
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
|
22021
|
-
showArrow: true,
|
|
22022
|
-
showSearch: true,
|
|
22023
|
-
filterOption: function filterOption(input, option) {
|
|
22024
|
-
return option.label.includes(input);
|
|
22025
|
-
},
|
|
22026
|
-
notFoundContent: null
|
|
22027
|
-
}, otherProps), {}, {
|
|
22028
|
-
options: options,
|
|
22029
|
-
mode: mode,
|
|
22030
|
-
onChange: function onChange(value, option) {
|
|
22031
|
-
if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
|
|
22032
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
|
|
22033
|
-
} else {
|
|
22034
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
|
|
22035
|
-
}
|
|
22036
|
-
}
|
|
22037
|
-
}));
|
|
22038
|
-
};
|
|
22039
|
-
|
|
22040
23299
|
var CalculationInput = function CalculationInput(props) {
|
|
22041
23300
|
var _props$config = props.config,
|
|
22042
23301
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -22055,7 +23314,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
22055
23314
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
22056
23315
|
};
|
|
22057
23316
|
|
|
22058
|
-
var _excluded$
|
|
23317
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
22059
23318
|
var typeMap$3 = {
|
|
22060
23319
|
BS_E3_REISSUE_GOODS: {
|
|
22061
23320
|
key: 'bsE3ReissueGoods',
|
|
@@ -22074,7 +23333,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
22074
23333
|
disabled = props.disabled,
|
|
22075
23334
|
type = props.type,
|
|
22076
23335
|
isSettingConfig = props.isSettingConfig,
|
|
22077
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
23336
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
22078
23337
|
var getOrderFlag = useRef(false);
|
|
22079
23338
|
var valueRef = useRef(null);
|
|
22080
23339
|
var _useState = useState(false),
|
|
@@ -22297,11 +23556,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
22297
23556
|
})));
|
|
22298
23557
|
};
|
|
22299
23558
|
|
|
22300
|
-
var css_248z$
|
|
23559
|
+
var css_248z$f = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
|
|
22301
23560
|
var styles$6 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
22302
|
-
styleInject(css_248z$
|
|
23561
|
+
styleInject(css_248z$f);
|
|
22303
23562
|
|
|
22304
|
-
var _excluded$
|
|
23563
|
+
var _excluded$r = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
22305
23564
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
22306
23565
|
var typeMap$4 = {
|
|
22307
23566
|
GY_REISSUE_GOODS: {
|
|
@@ -22331,7 +23590,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
22331
23590
|
disabled = props.disabled,
|
|
22332
23591
|
type = props.type,
|
|
22333
23592
|
isSettingConfig = props.isSettingConfig,
|
|
22334
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
23593
|
+
other = _objectWithoutProperties(props, _excluded$r);
|
|
22335
23594
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
22336
23595
|
// order?.platformCode?.includes(';'),
|
|
22337
23596
|
// );
|
|
@@ -22612,7 +23871,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
22612
23871
|
})));
|
|
22613
23872
|
};
|
|
22614
23873
|
|
|
22615
|
-
var _excluded$
|
|
23874
|
+
var _excluded$s = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
22616
23875
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
22617
23876
|
var typeMap$5 = {
|
|
22618
23877
|
GY_RETURN_GOODS: {
|
|
@@ -22642,7 +23901,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
22642
23901
|
disabled = props.disabled,
|
|
22643
23902
|
type = props.type,
|
|
22644
23903
|
isSettingConfig = props.isSettingConfig,
|
|
22645
|
-
other = _objectWithoutProperties(props, _excluded$
|
|
23904
|
+
other = _objectWithoutProperties(props, _excluded$s);
|
|
22646
23905
|
var valueRef = useRef({});
|
|
22647
23906
|
var getOrderFlag = useRef(false);
|
|
22648
23907
|
var _useState = useState(false),
|
|
@@ -22910,11 +24169,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
22910
24169
|
})));
|
|
22911
24170
|
};
|
|
22912
24171
|
|
|
22913
|
-
var css_248z$
|
|
24172
|
+
var css_248z$g = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
22914
24173
|
var styles$7 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
|
|
22915
|
-
styleInject(css_248z$
|
|
24174
|
+
styleInject(css_248z$g);
|
|
22916
24175
|
|
|
22917
|
-
var _excluded$
|
|
24176
|
+
var _excluded$t = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
|
|
22918
24177
|
var Dragger$1 = Upload.Dragger;
|
|
22919
24178
|
var fn$4 = function fn() {
|
|
22920
24179
|
return void 0;
|
|
@@ -22937,7 +24196,7 @@ var KmVideo = function KmVideo(_ref) {
|
|
|
22937
24196
|
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
22938
24197
|
_ref$actionUrl = _ref.actionUrl,
|
|
22939
24198
|
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
22940
|
-
resetProps = _objectWithoutProperties(_ref, _excluded$
|
|
24199
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$t);
|
|
22941
24200
|
var _useState = useState(false),
|
|
22942
24201
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22943
24202
|
visible = _useState2[0],
|
|
@@ -23172,13 +24431,11 @@ var typeMap$6 = {
|
|
|
23172
24431
|
}
|
|
23173
24432
|
},
|
|
23174
24433
|
asyncGetData: function () {
|
|
23175
|
-
var _asyncGetData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(
|
|
24434
|
+
var _asyncGetData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
23176
24435
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
23177
24436
|
while (1) switch (_context.prev = _context.next) {
|
|
23178
24437
|
case 0:
|
|
23179
|
-
return _context.abrupt("return", servers.SKX.querySkxOrderDetailSingleton({
|
|
23180
|
-
tid: tradeId
|
|
23181
|
-
}).then(function (res) {
|
|
24438
|
+
return _context.abrupt("return", servers.SKX.querySkxOrderDetailSingleton(params).then(function (res) {
|
|
23182
24439
|
var orderDetailInfoList = res.data.orderDetailInfoList || [];
|
|
23183
24440
|
return orderDetailInfoList;
|
|
23184
24441
|
}));
|
|
@@ -23213,13 +24470,11 @@ var typeMap$6 = {
|
|
|
23213
24470
|
}
|
|
23214
24471
|
},
|
|
23215
24472
|
asyncGetData: function () {
|
|
23216
|
-
var _asyncGetData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(
|
|
24473
|
+
var _asyncGetData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
23217
24474
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
23218
24475
|
while (1) switch (_context2.prev = _context2.next) {
|
|
23219
24476
|
case 0:
|
|
23220
|
-
return _context2.abrupt("return", servers.SKX.queryReturnOrderDetailSingleton({
|
|
23221
|
-
tid: tradeId
|
|
23222
|
-
}).then(function (res) {
|
|
24477
|
+
return _context2.abrupt("return", servers.SKX.queryReturnOrderDetailSingleton(params).then(function (res) {
|
|
23223
24478
|
var skqReturnOrderDetailInfoDtos = res.data.skqReturnOrderDetailInfoDtos || [];
|
|
23224
24479
|
return skqReturnOrderDetailInfoDtos;
|
|
23225
24480
|
}));
|
|
@@ -23284,32 +24539,42 @@ var IdInputSelect = function IdInputSelect(props) {
|
|
|
23284
24539
|
}, [value]);
|
|
23285
24540
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
23286
24541
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
23287
|
-
var
|
|
24542
|
+
var _form$getFieldValue, _form$getFieldValue$;
|
|
24543
|
+
var tradeId, skxReturnExpressCode, blurFrom;
|
|
23288
24544
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
23289
24545
|
while (1) switch (_context3.prev = _context3.next) {
|
|
23290
24546
|
case 0:
|
|
23291
24547
|
tradeId = form.getFieldValue('m3ap1EvEyd');
|
|
24548
|
+
skxReturnExpressCode = (_form$getFieldValue = form.getFieldValue('4487c6516b')) === null || _form$getFieldValue === void 0 ? void 0 : (_form$getFieldValue$ = _form$getFieldValue[0]) === null || _form$getFieldValue$ === void 0 ? void 0 : _form$getFieldValue$.logisticsCode;
|
|
24549
|
+
blurFrom = form.getFieldValue('skx_return_billNo_blur_from');
|
|
23292
24550
|
console.log('asyncQueryData---', {
|
|
24551
|
+
skxReturnExpressCode: skxReturnExpressCode,
|
|
24552
|
+
blurFrom: blurFrom,
|
|
23293
24553
|
tradeId: tradeId,
|
|
23294
24554
|
tradeIdRef: tradeIdRef.current,
|
|
23295
24555
|
form: form
|
|
23296
24556
|
});
|
|
23297
|
-
if (tradeId) {
|
|
23298
|
-
_context3.next =
|
|
24557
|
+
if (!(type === 'SKX_OUTBOUND_NOTICE_NO' && !tradeId || type === 'SKX_RETURN_BILL_NO' && !tradeId && !skxReturnExpressCode)) {
|
|
24558
|
+
_context3.next = 7;
|
|
23299
24559
|
break;
|
|
23300
24560
|
}
|
|
23301
24561
|
setDataSource([]);
|
|
23302
24562
|
return _context3.abrupt("return");
|
|
23303
|
-
case
|
|
24563
|
+
case 7:
|
|
23304
24564
|
setSpinning(true);
|
|
23305
|
-
|
|
24565
|
+
// 判断是从哪个组件失焦,若是从[SKX]退换物流信息(TH)失焦,则根据物流单号查询,若是从订单号组件失焦,则根据订单号查询
|
|
24566
|
+
typeMap$6[type].asyncGetData(type === 'SKX_RETURN_BILL_NO' && blurFrom === '4487c6516b' ? {
|
|
24567
|
+
expressCode: skxReturnExpressCode
|
|
24568
|
+
} : {
|
|
24569
|
+
tid: tradeId
|
|
24570
|
+
}).then(function (data) {
|
|
23306
24571
|
setDataSource(data);
|
|
23307
24572
|
}).catch(function () {
|
|
23308
24573
|
setDataSource([]);
|
|
23309
24574
|
}).finally(function () {
|
|
23310
24575
|
setSpinning(false);
|
|
23311
24576
|
});
|
|
23312
|
-
case
|
|
24577
|
+
case 9:
|
|
23313
24578
|
case "end":
|
|
23314
24579
|
return _context3.stop();
|
|
23315
24580
|
}
|
|
@@ -23406,7 +24671,14 @@ var IdInputSelect = function IdInputSelect(props) {
|
|
|
23406
24671
|
value: value,
|
|
23407
24672
|
isInput: isInput
|
|
23408
24673
|
});
|
|
23409
|
-
|
|
24674
|
+
var isReturnBillNoChange = type === 'SKX_RETURN_BILL_NO' && form.getFieldValue('skx_return_billNo_blur_from') === '4487c6516b';
|
|
24675
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && (!!isInput || isReturnBillNoChange));
|
|
24676
|
+
// 如果类型是[SKX]退换货单号,则根据blurFrom判断是从[SKX]退换物流信息(TH)失焦,则调用onBlur
|
|
24677
|
+
isReturnBillNoChange && (_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur({
|
|
24678
|
+
target: {
|
|
24679
|
+
value: val
|
|
24680
|
+
}
|
|
24681
|
+
}));
|
|
23410
24682
|
// 关闭浮窗
|
|
23411
24683
|
setPopoverVisible(false);
|
|
23412
24684
|
};
|