@bit-sun/business-component 4.2.1-alpha.3-aiwei → 4.2.1-alpha.30-aiwei
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 +967 -244
- package/dist/index.js +965 -242
- package/package.json +1 -1
- package/src/components/Business/AddSelectBusiness/index.tsx +3 -2
- package/src/components/Business/BsSulaQueryTable/index.tsx +61 -42
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +337 -72
- package/src/components/Business/SearchSelect/index.md +30 -10
- package/src/components/Functional/AddSelect/index.tsx +3 -1
- package/src/components/Functional/BillEntry/index.tsx +0 -1
- package/src/components/Functional/DataValidation/index.tsx +9 -6
- package/src/components/Functional/SearchSelect/index.md +145 -117
- package/src/components/Functional/SearchSelect/index.tsx +223 -34
- package/src/components/Solution/RuleComponent/README.md +187 -0
- package/src/components/Solution/RuleComponent/RuleField.md +63 -0
- package/src/components/Solution/RuleComponent/index.js +233 -8
- package/src/components/Solution/RuleComponent/ruleFiled.js +22 -9
- package/src/components/Solution/RuleSetter/README.md +97 -0
package/dist/index.esm.js
CHANGED
|
@@ -2,11 +2,11 @@ import axios from 'axios';
|
|
|
2
2
|
import request$1 from 'umi-request';
|
|
3
3
|
import cookie from 'js-cookie';
|
|
4
4
|
import { message as message$1, Tooltip, Image, Popover, Card, Avatar, Badge, Menu, Input, InputNumber, Space, Button, Dropdown, Upload, Checkbox, Modal, ConfigProvider, Tag, Select, Spin, Form, Table, Empty, Row, Col, Tabs, TreeSelect, DatePicker, Typography, Alert, Breadcrumb, Drawer as Drawer$1, List, Radio, Tree, Result, Affix, Cascader, TimePicker, Divider, Switch, Collapse } from 'antd';
|
|
5
|
-
import _, { omit, uniqBy, escapeRegExp, isNil, isBoolean, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
|
|
5
|
+
import _, { omit, uniqBy, escapeRegExp, isNil, trim, isBoolean, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
|
|
6
6
|
import memoizeOne from 'memoize-one';
|
|
7
7
|
import { formatMessage, history, useLocation, Link, useModel, setLocale, useIntl, request as request$3 } from 'umi';
|
|
8
8
|
import isEqual from 'lodash/isEqual';
|
|
9
|
-
import React$1, { useState, useEffect, useRef, forwardRef,
|
|
9
|
+
import React$1, { useState, useEffect, useRef, forwardRef, useMemo, useImperativeHandle, Component, Fragment, useCallback, useLayoutEffect, createRef } from 'react';
|
|
10
10
|
import { renderToString as renderToString$1 } from 'react-dom/server';
|
|
11
11
|
import moment$1 from 'moment';
|
|
12
12
|
import { EyeOutlined, DeleteOutlined, EditOutlined, CopyOutlined, CloseSquareOutlined, WarningOutlined, SendOutlined, ProfileTwoTone, ExclamationCircleOutlined, DownOutlined, UnorderedListOutlined, DashOutlined, CaretUpOutlined, CaretDownOutlined, SearchOutlined, CloseCircleOutlined, DownCircleFilled, ArrowLeftOutlined, FolderOutlined, EllipsisOutlined, HomeOutlined, DoubleLeftOutlined, DoubleRightOutlined, MenuUnfoldOutlined, CaretLeftOutlined, SettingOutlined, BulbOutlined, PlayCircleOutlined, SaveOutlined, FullscreenExitOutlined, MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons';
|
|
@@ -2561,11 +2561,9 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2561
2561
|
cell.v = cell.m;
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
2564
|
-
// console.log(postion);
|
|
2565
2564
|
},
|
|
2566
2565
|
cellAllRenderBefore: function cellAllRenderBefore(data, sheetFile, ctx) {
|
|
2567
2566
|
sheetFile.config.borderInfo = [];
|
|
2568
|
-
// console.info(data,sheetFile,ctx)
|
|
2569
2567
|
}
|
|
2570
2568
|
},
|
|
2571
2569
|
showtoolbarConfig: {
|
|
@@ -2733,14 +2731,21 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2733
2731
|
};
|
|
2734
2732
|
};
|
|
2735
2733
|
_this.getData = function () {
|
|
2736
|
-
|
|
2734
|
+
// 是否使用字符串值 默认为false
|
|
2735
|
+
var useStringValue = _this.props.useStringValue || false;
|
|
2737
2736
|
var sheetData = luckysheet.getSheetData();
|
|
2738
2737
|
var data = JSON.parse(JSON.stringify(sheetData)).filter(function (item) {
|
|
2739
2738
|
return item[0];
|
|
2740
2739
|
}).map(function (item) {
|
|
2741
2740
|
var obj = {};
|
|
2742
2741
|
item.slice(0, itemsTemp.length).map(function (innerItem, index) {
|
|
2743
|
-
|
|
2742
|
+
// 如果使用字符串值,直接赋值字符串
|
|
2743
|
+
if (useStringValue) {
|
|
2744
|
+
obj[_this.state.items[index].code] = innerItem && innerItem.m;
|
|
2745
|
+
} else {
|
|
2746
|
+
// 否则根据值是否相等来判断是否使用字符串值
|
|
2747
|
+
obj[_this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
|
|
2748
|
+
}
|
|
2744
2749
|
});
|
|
2745
2750
|
return obj;
|
|
2746
2751
|
});
|
|
@@ -2881,7 +2886,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2881
2886
|
errorListCheck: false,
|
|
2882
2887
|
resultData: res
|
|
2883
2888
|
});
|
|
2884
|
-
console.log(setExportData);
|
|
2885
2889
|
setExportData([123123]);
|
|
2886
2890
|
}).catch(function (err) {});
|
|
2887
2891
|
case 3:
|
|
@@ -3177,7 +3181,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
3177
3181
|
left: '0px',
|
|
3178
3182
|
top: '0px'
|
|
3179
3183
|
};
|
|
3180
|
-
console.log('itemsTemp', itemsTemp);
|
|
3181
3184
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
|
|
3182
3185
|
className: "sheet_table_top"
|
|
3183
3186
|
}, /*#__PURE__*/React$1.createElement(Space, null, /*#__PURE__*/React$1.createElement("span", null, "\u6392\u5E8F\u5217"), /*#__PURE__*/React$1.createElement(Dropdown, {
|
|
@@ -5323,7 +5326,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5323
5326
|
viewShowValueStr = _ref.viewShowValueStr,
|
|
5324
5327
|
searchStartLength = _ref.searchStartLength,
|
|
5325
5328
|
_ref$isQuery = _ref.isQuery,
|
|
5326
|
-
isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery
|
|
5329
|
+
isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery,
|
|
5330
|
+
_ref$requireSearchCon = _ref.requireSearchCondition,
|
|
5331
|
+
requireSearchCondition = _ref$requireSearchCon === void 0 ? false : _ref$requireSearchCon;
|
|
5327
5332
|
var requestConfig = _objectSpread2({
|
|
5328
5333
|
url: url,
|
|
5329
5334
|
method: method,
|
|
@@ -5345,10 +5350,17 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5345
5350
|
searchStartLength: searchStartLength
|
|
5346
5351
|
}, rCTemp);
|
|
5347
5352
|
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || (ctx === null || ctx === void 0 ? void 0 : ctx.name) || 'supplierCode');
|
|
5353
|
+
var TABLE_PAGE_SIZE_OPTIONS = [10, 20, 50, 100, 200, 500, 1000, 2000, 3000];
|
|
5354
|
+
var resolveTablePageSize = function resolveTablePageSize(pageSize) {
|
|
5355
|
+
if (TABLE_PAGE_SIZE_OPTIONS.includes(Number(pageSize))) {
|
|
5356
|
+
return Number(pageSize);
|
|
5357
|
+
}
|
|
5358
|
+
return 20;
|
|
5359
|
+
};
|
|
5348
5360
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
5349
5361
|
var initVal = value || (selectMode ? [] : null);
|
|
5350
5362
|
var pageSize = 100; // 下拉框默认分页 条数
|
|
5351
|
-
var tableInitPageSize =
|
|
5363
|
+
var tableInitPageSize = resolveTablePageSize((props === null || props === void 0 ? void 0 : props.pageSize) || null); // 弹框默认分页 条数
|
|
5352
5364
|
var currentPage = 1;
|
|
5353
5365
|
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
5354
5366
|
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
@@ -5376,11 +5388,20 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5376
5388
|
},
|
|
5377
5389
|
pageSize: tableInitPageSize
|
|
5378
5390
|
};
|
|
5391
|
+
var selectedInitPagination = _objectSpread2(_objectSpread2({}, initPagination), {}, {
|
|
5392
|
+
current: 1,
|
|
5393
|
+
pageSize: resolveTablePageSize((modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.selectedTablePageSize) || 20),
|
|
5394
|
+
total: 0
|
|
5395
|
+
});
|
|
5379
5396
|
var tableInitPagination = _objectSpread2(_objectSpread2({}, initPagination), {}, {
|
|
5380
5397
|
total: 0,
|
|
5381
5398
|
current: 1,
|
|
5382
|
-
pageSizeOptions:
|
|
5399
|
+
pageSizeOptions: TABLE_PAGE_SIZE_OPTIONS.map(String)
|
|
5383
5400
|
});
|
|
5401
|
+
/**
|
|
5402
|
+
* 左侧弹窗表格大分页时的实际渲染上限;全选仍基于完整当前页 tableData。
|
|
5403
|
+
*/
|
|
5404
|
+
var tableRenderPageSize = 200;
|
|
5384
5405
|
var disabled = !!noOperate || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled);
|
|
5385
5406
|
var isHaveDependency = fixedparameter && fieldValToParam && ctx;
|
|
5386
5407
|
var isHaveDValue = function isHaveDValue() {
|
|
@@ -5434,6 +5455,10 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5434
5455
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
5435
5456
|
uniqueValue = _useState18[0],
|
|
5436
5457
|
setUniqueValue = _useState18[1];
|
|
5458
|
+
var _useState19 = useState({}),
|
|
5459
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
5460
|
+
selectToggleMap = _useState20[0],
|
|
5461
|
+
setSelectToggleMap = _useState20[1];
|
|
5437
5462
|
var _useDebounceFn = useDebounceFn(function (v) {
|
|
5438
5463
|
// 优化搜索参数 支持传多个
|
|
5439
5464
|
var searchParams = {};
|
|
@@ -5462,38 +5487,34 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5462
5487
|
var _Form$useForm = Form.useForm(),
|
|
5463
5488
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
5464
5489
|
form = _Form$useForm2[0];
|
|
5465
|
-
var _useState19 = useState(true),
|
|
5466
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
5467
|
-
collapsed = _useState20[0],
|
|
5468
|
-
setCollapsed = _useState20[1];
|
|
5469
5490
|
var _useState21 = useState(true),
|
|
5470
5491
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
var _useState23 = useState(
|
|
5492
|
+
collapsed = _useState22[0],
|
|
5493
|
+
setCollapsed = _useState22[1];
|
|
5494
|
+
var _useState23 = useState(true),
|
|
5474
5495
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
var _useState25 = useState(
|
|
5496
|
+
caretLeftFlag = _useState24[0],
|
|
5497
|
+
setCaretLeftFlag = _useState24[1];
|
|
5498
|
+
var _useState25 = useState([]),
|
|
5478
5499
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
var _useState27 = useState(
|
|
5500
|
+
tableData = _useState26[0],
|
|
5501
|
+
setTableData = _useState26[1];
|
|
5502
|
+
var _useState27 = useState(tableInitPagination),
|
|
5482
5503
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
5483
|
-
|
|
5484
|
-
|
|
5504
|
+
tablePagination = _useState28[0],
|
|
5505
|
+
setTablePagination = _useState28[1];
|
|
5485
5506
|
var _useState29 = useState([]),
|
|
5486
5507
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
var _useState31 = useState(
|
|
5508
|
+
selectedRowKeys = _useState30[0],
|
|
5509
|
+
setSelectedRowKeys = _useState30[1];
|
|
5510
|
+
var _useState31 = useState([]),
|
|
5490
5511
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
var _useState33 = useState(
|
|
5512
|
+
selectedRows = _useState32[0],
|
|
5513
|
+
setSelectedRows = _useState32[1];
|
|
5514
|
+
var _useState33 = useState(selectedInitPagination),
|
|
5494
5515
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
5495
|
-
|
|
5496
|
-
|
|
5516
|
+
selectedTablePagination = _useState34[0],
|
|
5517
|
+
setSelectedTablePagination = _useState34[1];
|
|
5497
5518
|
var _useState35 = useState({}),
|
|
5498
5519
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
5499
5520
|
tableFormParams = _useState36[0],
|
|
@@ -5514,6 +5535,24 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5514
5535
|
_useState44 = _slicedToArray(_useState43, 2),
|
|
5515
5536
|
modalSearched = _useState44[0],
|
|
5516
5537
|
setModalSearched = _useState44[1];
|
|
5538
|
+
var selectAllTableRef = useRef(false);
|
|
5539
|
+
var getRecordKey = function getRecordKey(record) {
|
|
5540
|
+
var _record$mappingValueF;
|
|
5541
|
+
return (_record$mappingValueF = record === null || record === void 0 ? void 0 : record[mappingValueField]) !== null && _record$mappingValueF !== void 0 ? _record$mappingValueF : record === null || record === void 0 ? void 0 : record.value;
|
|
5542
|
+
};
|
|
5543
|
+
/**
|
|
5544
|
+
* 已选表格只向 Table 传入当前页数据,避免全选 1000 条时右侧表格同步处理全部数据。
|
|
5545
|
+
*/
|
|
5546
|
+
var selectedTablePageRows = useMemo(function () {
|
|
5547
|
+
var current = Number((selectedTablePagination === null || selectedTablePagination === void 0 ? void 0 : selectedTablePagination.current) || 1);
|
|
5548
|
+
var pageSize = Number((selectedTablePagination === null || selectedTablePagination === void 0 ? void 0 : selectedTablePagination.pageSize) || selectedInitPagination.pageSize);
|
|
5549
|
+
var start = (current - 1) * pageSize;
|
|
5550
|
+
return (selectedRows || []).slice(start, start + pageSize).map(function (s, index) {
|
|
5551
|
+
return _objectSpread2(_objectSpread2({}, s), {}, {
|
|
5552
|
+
keyIndex: start + index + 1
|
|
5553
|
+
});
|
|
5554
|
+
});
|
|
5555
|
+
}, [selectedRows, selectedTablePagination === null || selectedTablePagination === void 0 ? void 0 : selectedTablePagination.current, selectedTablePagination === null || selectedTablePagination === void 0 ? void 0 : selectedTablePagination.pageSize, selectedInitPagination.pageSize]);
|
|
5517
5556
|
var setSelectDataSource = function setSelectDataSource(list, total) {
|
|
5518
5557
|
setItems(list);
|
|
5519
5558
|
setItemsTotal(total);
|
|
@@ -5521,6 +5560,20 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5521
5560
|
var clearSelectDataSource = function clearSelectDataSource() {
|
|
5522
5561
|
setSelectDataSource([], 0);
|
|
5523
5562
|
};
|
|
5563
|
+
/**
|
|
5564
|
+
* 清空弹窗已选数据。
|
|
5565
|
+
*/
|
|
5566
|
+
var clearSelectedRows = function clearSelectedRows() {
|
|
5567
|
+
setSelectedRows([]);
|
|
5568
|
+
setPopValue([]);
|
|
5569
|
+
setSelectedTablePagination(function (prev) {
|
|
5570
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
5571
|
+
total: 0,
|
|
5572
|
+
current: 1
|
|
5573
|
+
});
|
|
5574
|
+
});
|
|
5575
|
+
setSelectedRowKeys([]);
|
|
5576
|
+
};
|
|
5524
5577
|
useImperativeHandle(ref, function () {
|
|
5525
5578
|
return {
|
|
5526
5579
|
refreshDataSource: function refreshDataSource() {
|
|
@@ -5713,6 +5766,18 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5713
5766
|
setUniqueValue(makeUniqueValue());
|
|
5714
5767
|
setTabletShowColumns(handleTableColumns(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableColumns));
|
|
5715
5768
|
}, [resultSourceKey]);
|
|
5769
|
+
useEffect(function () {
|
|
5770
|
+
setSelectedTablePagination(function (prev) {
|
|
5771
|
+
var pageSize = (prev === null || prev === void 0 ? void 0 : prev.pageSize) || selectedInitPagination.pageSize;
|
|
5772
|
+
var maxCurrent = Math.ceil(selectedRows.length / pageSize) || 1;
|
|
5773
|
+
var current = selectedRows.length ? Math.min((prev === null || prev === void 0 ? void 0 : prev.current) || 1, maxCurrent) : 1;
|
|
5774
|
+
if ((prev === null || prev === void 0 ? void 0 : prev.total) === selectedRows.length && (prev === null || prev === void 0 ? void 0 : prev.current) === current) return prev;
|
|
5775
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
5776
|
+
total: selectedRows.length,
|
|
5777
|
+
current: current
|
|
5778
|
+
});
|
|
5779
|
+
});
|
|
5780
|
+
}, [selectedRows.length, selectedInitPagination.pageSize]);
|
|
5716
5781
|
useEffect(function () {
|
|
5717
5782
|
if (init) {
|
|
5718
5783
|
clearSelectDataSource();
|
|
@@ -5770,8 +5835,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5770
5835
|
value: i
|
|
5771
5836
|
};
|
|
5772
5837
|
}));
|
|
5773
|
-
setIndeterminate(!!value.length && value.length < itemsTotal);
|
|
5774
|
-
setCheckedAll(itemsTotal && value.length === itemsTotal);
|
|
5775
5838
|
} else {
|
|
5776
5839
|
setSelectedRowKeys(labelInValue ? [value.key] : [value]);
|
|
5777
5840
|
setSelectedRows(labelInValue ? [_defineProperty(_defineProperty(_defineProperty({}, mappingValueField, value.key), "value", value.key), "text", value.label)] : [_defineProperty(_defineProperty({}, mappingValueField, value), "value", value)]);
|
|
@@ -5859,8 +5922,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5859
5922
|
setTablePagination(tableInitPagination);
|
|
5860
5923
|
setSelectedRowKeys([]);
|
|
5861
5924
|
setSelectedRows([]);
|
|
5862
|
-
setCheckedAll(false);
|
|
5863
|
-
setIndeterminate(false);
|
|
5864
5925
|
};
|
|
5865
5926
|
var handleCancel = function handleCancel() {
|
|
5866
5927
|
clearModalTable();
|
|
@@ -5886,6 +5947,16 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5886
5947
|
};
|
|
5887
5948
|
var onSearchTable = function onSearchTable() {
|
|
5888
5949
|
var params = form.getFieldsValue();
|
|
5950
|
+
// 必须选择一个值
|
|
5951
|
+
if (requireSearchCondition) {
|
|
5952
|
+
var hasValidValue = Object.values(params).some(function (value) {
|
|
5953
|
+
return Array.isArray(value) && value.length > 0 || typeof value === 'string' && value.trim().length > 0;
|
|
5954
|
+
});
|
|
5955
|
+
if (!hasValidValue) {
|
|
5956
|
+
message$1.warning('请至少选择一个搜索条件');
|
|
5957
|
+
return;
|
|
5958
|
+
}
|
|
5959
|
+
}
|
|
5889
5960
|
setModalSearched(true);
|
|
5890
5961
|
setTableFormParams(params);
|
|
5891
5962
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
@@ -5909,9 +5980,17 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5909
5980
|
currentPage: pagination.current
|
|
5910
5981
|
}), 2);
|
|
5911
5982
|
};
|
|
5983
|
+
var handleSelectedTableChange = function handleSelectedTableChange(pagination) {
|
|
5984
|
+
setSelectedTablePagination(function (prev) {
|
|
5985
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
5986
|
+
current: pagination.current,
|
|
5987
|
+
pageSize: pagination.pageSize
|
|
5988
|
+
});
|
|
5989
|
+
});
|
|
5990
|
+
};
|
|
5912
5991
|
var onChangeSelectedKeys = function onChangeSelectedKeys(selectKeys, selectRows) {
|
|
5913
|
-
var sksResult = (selectRows === null || selectRows === void 0 ? void 0 : selectRows.map(function (i) {
|
|
5914
|
-
return i
|
|
5992
|
+
var sksResult = (selectKeys === null || selectKeys === void 0 ? void 0 : selectKeys.length) ? selectKeys : (selectRows === null || selectRows === void 0 ? void 0 : selectRows.map(function (i) {
|
|
5993
|
+
return getRecordKey(i);
|
|
5915
5994
|
})) || [];
|
|
5916
5995
|
// 单选 默认直接选中 不需要确定 配置了modalRadioNeedFooter就需要确定
|
|
5917
5996
|
if (!selectMode && !(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalRadioNeedFooter)) {
|
|
@@ -5921,33 +6000,96 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5921
6000
|
setSelectedRowKeys(sksResult);
|
|
5922
6001
|
setSelectedRows(selectRows);
|
|
5923
6002
|
setPopValue(selectRows);
|
|
5924
|
-
setIndeterminate(!!selectRows.length && selectRows.length < (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total));
|
|
5925
|
-
setCheckedAll(selectRows.length === (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total));
|
|
5926
6003
|
};
|
|
5927
|
-
var
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
6004
|
+
var getRowSelection = function getRowSelection() {
|
|
6005
|
+
var visibleRows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
6006
|
+
var type = arguments.length > 1 ? arguments[1] : undefined;
|
|
6007
|
+
return {
|
|
6008
|
+
type: selectMode ? 'checkbox' : 'radio',
|
|
6009
|
+
selectedRowKeys: selectedRowKeys,
|
|
6010
|
+
preserveSelectedRowKeys: true,
|
|
6011
|
+
onSelectAll: function onSelectAll(selected) {
|
|
6012
|
+
selectAllTableRef.current = true;
|
|
6013
|
+
setTimeout(function () {
|
|
6014
|
+
selectAllTableRef.current = false;
|
|
6015
|
+
}, 0);
|
|
6016
|
+
var targetRows = type === 'noPage' ? visibleRows : tableData;
|
|
6017
|
+
var targetKeys = (targetRows || []).map(function (item) {
|
|
6018
|
+
return getRecordKey(item);
|
|
6019
|
+
});
|
|
6020
|
+
if (!selected) {
|
|
6021
|
+
var selectedKeySet = new Set((selectedRows || []).map(function (item) {
|
|
6022
|
+
return getRecordKey(item);
|
|
6023
|
+
}));
|
|
6024
|
+
if ((selectedRows || []).length === (targetRows || []).length && targetKeys.every(function (key) {
|
|
6025
|
+
return selectedKeySet.has(key);
|
|
6026
|
+
})) {
|
|
6027
|
+
clearSelectedRows();
|
|
6028
|
+
return;
|
|
6029
|
+
}
|
|
6030
|
+
var targetKeySet = new Set(targetKeys);
|
|
6031
|
+
var _nextSelectedRows = (selectedRows || []).filter(function (item) {
|
|
6032
|
+
return !targetKeySet.has(getRecordKey(item));
|
|
6033
|
+
});
|
|
6034
|
+
var _nextSelectedKeys = _nextSelectedRows.map(function (item) {
|
|
6035
|
+
return getRecordKey(item);
|
|
6036
|
+
});
|
|
6037
|
+
onChangeSelectedKeys(_nextSelectedKeys, _nextSelectedRows);
|
|
6038
|
+
return;
|
|
6039
|
+
}
|
|
6040
|
+
if (!(selectedRows || []).length) {
|
|
6041
|
+
onChangeSelectedKeys(targetKeys, targetRows || []);
|
|
6042
|
+
return;
|
|
6043
|
+
}
|
|
6044
|
+
var selectedRowMap = new Map();
|
|
6045
|
+
(selectedRows || []).forEach(function (item) {
|
|
6046
|
+
selectedRowMap.set(getRecordKey(item), item);
|
|
6047
|
+
});
|
|
6048
|
+
(targetRows || []).forEach(function (item) {
|
|
6049
|
+
selectedRowMap.set(getRecordKey(item), item);
|
|
6050
|
+
});
|
|
6051
|
+
var nextSelectedRows = Array.from(selectedRowMap.values()).filter(Boolean);
|
|
6052
|
+
var nextSelectedKeys = nextSelectedRows.map(function (item) {
|
|
6053
|
+
return getRecordKey(item);
|
|
6054
|
+
});
|
|
6055
|
+
onChangeSelectedKeys(nextSelectedKeys, nextSelectedRows);
|
|
6056
|
+
},
|
|
6057
|
+
onChange: function onChange(sks, srs) {
|
|
6058
|
+
if (selectAllTableRef.current) {
|
|
6059
|
+
selectAllTableRef.current = false;
|
|
6060
|
+
return;
|
|
6061
|
+
}
|
|
6062
|
+
if (!(sks === null || sks === void 0 ? void 0 : sks.length)) {
|
|
6063
|
+
clearSelectedRows();
|
|
6064
|
+
return;
|
|
6065
|
+
}
|
|
6066
|
+
// 处理翻页后,之前存储的selectedRows变为undefined
|
|
6067
|
+
// selectedRows合并新数组,过滤undefined,过滤留下对应selectedRowKeys的集合
|
|
6068
|
+
var visibleKeySet = new Set((visibleRows || []).map(function (item) {
|
|
6069
|
+
return getRecordKey(item);
|
|
6070
|
+
}));
|
|
6071
|
+
var selectedRowMap = new Map();
|
|
6072
|
+
(selectedRows || []).forEach(function (item) {
|
|
6073
|
+
var key = getRecordKey(item);
|
|
6074
|
+
if (!visibleKeySet.has(key)) {
|
|
6075
|
+
selectedRowMap.set(key, item);
|
|
6076
|
+
}
|
|
6077
|
+
});
|
|
6078
|
+
(srs || []).filter(Boolean).forEach(function (item) {
|
|
6079
|
+
selectedRowMap.set(getRecordKey(item), item);
|
|
6080
|
+
});
|
|
6081
|
+
var totalSelectedRows = Array.from(selectedRowMap.values()).filter(Boolean);
|
|
6082
|
+
var totalSelectedKeys = totalSelectedRows.map(function (item) {
|
|
6083
|
+
return getRecordKey(item);
|
|
6084
|
+
});
|
|
6085
|
+
onChangeSelectedKeys(totalSelectedKeys, totalSelectedRows);
|
|
6086
|
+
},
|
|
6087
|
+
getCheckboxProps: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.getCheckboxProps) ? selectProps === null || selectProps === void 0 ? void 0 : selectProps.getCheckboxProps : function () {
|
|
6088
|
+
return {
|
|
6089
|
+
disabled: disabled || !items.length && !tableData.length
|
|
6090
|
+
};
|
|
6091
|
+
}
|
|
6092
|
+
};
|
|
5951
6093
|
};
|
|
5952
6094
|
var onRowClickSelect = function onRowClickSelect(e, record, type) {
|
|
5953
6095
|
if (selectMode && !(disabled || !items.length && !tableData.length)) {
|
|
@@ -5955,7 +6097,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5955
6097
|
var newSelect = [JSON.parse(JSON.stringify(record))];
|
|
5956
6098
|
var srs = getRealStr(oldSelect, newSelect, record);
|
|
5957
6099
|
var sks = srs.map(function (i) {
|
|
5958
|
-
return i
|
|
6100
|
+
return getRecordKey(i);
|
|
5959
6101
|
});
|
|
5960
6102
|
onChangeSelectedKeys(sks, srs);
|
|
5961
6103
|
}
|
|
@@ -5964,14 +6106,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5964
6106
|
if (!selectMode && !(disabled || !items.length && !tableData.length)) {
|
|
5965
6107
|
var srs = [JSON.parse(JSON.stringify(record))];
|
|
5966
6108
|
var sks = srs.map(function (i) {
|
|
5967
|
-
return i
|
|
6109
|
+
return getRecordKey(i);
|
|
5968
6110
|
});
|
|
5969
6111
|
onChangeSelectedKeys(sks, srs);
|
|
5970
6112
|
}
|
|
5971
6113
|
};
|
|
5972
6114
|
var formItem = function formItem(list) {
|
|
5973
6115
|
if (isModalVisible && (list === null || list === void 0 ? void 0 : list.length)) {
|
|
5974
|
-
debugger;
|
|
5975
6116
|
var setDisabled = function setDisabled(name) {
|
|
5976
6117
|
if (fixedparamsDisabled && (fixedparameter === null || fixedparameter === void 0 ? void 0 : fixedparameter.length) && fixedparameter.find(function (item) {
|
|
5977
6118
|
return item === name;
|
|
@@ -5991,13 +6132,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5991
6132
|
})) || [];
|
|
5992
6133
|
var searchList = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.noEmptySearchField) ? list : list === null || list === void 0 ? void 0 : list.concat(addKong);
|
|
5993
6134
|
return searchList.map(function (i, index) {
|
|
5994
|
-
var _i$field, _i$
|
|
6135
|
+
var _i$field, _i$field6, _i$field8, _i$field0, _i$field10, _i$field11, _i$field12, _i$field13, _i$field15, _i$field16;
|
|
5995
6136
|
if ((i === null || i === void 0 ? void 0 : i.type) === 'kong') return /*#__PURE__*/React$1.createElement(Col, {
|
|
5996
6137
|
span: ColSpan,
|
|
5997
6138
|
key: i
|
|
5998
6139
|
});
|
|
5999
6140
|
if ((i === null || i === void 0 ? void 0 : i.type) === 'select' || (i === null || i === void 0 ? void 0 : (_i$field = i.field) === null || _i$field === void 0 ? void 0 : _i$field.type) === 'select') {
|
|
6000
|
-
var _i$field2, _i$initialSource;
|
|
6141
|
+
var _i$field2, _i$field3, _i$field3$props, _i$initialSource;
|
|
6001
6142
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6002
6143
|
span: ColSpan,
|
|
6003
6144
|
key: i.name
|
|
@@ -6014,7 +6155,63 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6014
6155
|
return onSearchTable();
|
|
6015
6156
|
}
|
|
6016
6157
|
}, i === null || i === void 0 ? void 0 : (_i$field2 = i.field) === null || _i$field2 === void 0 ? void 0 : _i$field2.props), {}, {
|
|
6017
|
-
disabled: setDisabled(i.name)
|
|
6158
|
+
disabled: setDisabled(i.name),
|
|
6159
|
+
mode: i === null || i === void 0 ? void 0 : (_i$field3 = i.field) === null || _i$field3 === void 0 ? void 0 : (_i$field3$props = _i$field3.props) === null || _i$field3$props === void 0 ? void 0 : _i$field3$props.mode,
|
|
6160
|
+
dropdownRender: function dropdownRender(menu) {
|
|
6161
|
+
var _i$field4, _i$field4$props, _i$field5, _i$field5$props;
|
|
6162
|
+
// 候选项数组(去重)
|
|
6163
|
+
var allValues = Array.isArray(i === null || i === void 0 ? void 0 : i.initialSource) ? Array.from(new Set(i.initialSource.map(function (s) {
|
|
6164
|
+
return s.value;
|
|
6165
|
+
}).filter(function (v) {
|
|
6166
|
+
return v !== undefined && v !== null;
|
|
6167
|
+
}))) : [];
|
|
6168
|
+
var isMulti = (i === null || i === void 0 ? void 0 : (_i$field4 = i.field) === null || _i$field4 === void 0 ? void 0 : (_i$field4$props = _i$field4.props) === null || _i$field4$props === void 0 ? void 0 : _i$field4$props.mode) === 'multiple' || (i === null || i === void 0 ? void 0 : (_i$field5 = i.field) === null || _i$field5 === void 0 ? void 0 : (_i$field5$props = _i$field5.props) === null || _i$field5$props === void 0 ? void 0 : _i$field5$props.mode) === 'tags';
|
|
6169
|
+
// 当前 toggle 状态(true 表示下一次点击是反选 -> 显示为“反选”)
|
|
6170
|
+
var toggled = !!selectToggleMap[i.name];
|
|
6171
|
+
var label = toggled ? '反选' : '全选';
|
|
6172
|
+
// 通过 props.allSelectValues 控制按钮是否显示
|
|
6173
|
+
var showSelectAllButton = props.showAllSelectBtn && isMulti && allValues.length > 0;
|
|
6174
|
+
return /*#__PURE__*/React$1.createElement("div", null, showSelectAllButton && (/*#__PURE__*/React$1.createElement("div", {
|
|
6175
|
+
style: {
|
|
6176
|
+
padding: 6,
|
|
6177
|
+
display: 'flex',
|
|
6178
|
+
justifyContent: 'flex-end',
|
|
6179
|
+
alignItems: 'center'
|
|
6180
|
+
}
|
|
6181
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
6182
|
+
type: "link",
|
|
6183
|
+
size: "small",
|
|
6184
|
+
onMouseDown: function onMouseDown(e) {
|
|
6185
|
+
return e.preventDefault();
|
|
6186
|
+
},
|
|
6187
|
+
onClick: function onClick(e) {
|
|
6188
|
+
e.stopPropagation();
|
|
6189
|
+
var cur = form.getFieldValue(i.name) || [];
|
|
6190
|
+
var curArr = Array.isArray(cur) ? cur : [cur].filter(Boolean);
|
|
6191
|
+
if (!toggled) {
|
|
6192
|
+
// 全选:把所有候选值写入表单
|
|
6193
|
+
form.setFieldsValue(_defineProperty({}, i.name, allValues));
|
|
6194
|
+
setSelectToggleMap(function (prev) {
|
|
6195
|
+
return _objectSpread2(_objectSpread2({}, prev || {}), {}, _defineProperty({}, i.name, true));
|
|
6196
|
+
});
|
|
6197
|
+
} else {
|
|
6198
|
+
// 反选:当前实现为“把候选项中未被选中的项选上”(基于当前值取补集)
|
|
6199
|
+
var newVals = allValues.filter(function (v) {
|
|
6200
|
+
return !curArr.includes(v);
|
|
6201
|
+
});
|
|
6202
|
+
form.setFieldsValue(_defineProperty({}, i.name, newVals));
|
|
6203
|
+
setSelectToggleMap(function (prev) {
|
|
6204
|
+
return _objectSpread2(_objectSpread2({}, prev || {}), {}, _defineProperty({}, i.name, false));
|
|
6205
|
+
});
|
|
6206
|
+
}
|
|
6207
|
+
},
|
|
6208
|
+
style: {
|
|
6209
|
+
padding: '0 6px',
|
|
6210
|
+
height: 20,
|
|
6211
|
+
lineHeight: '20px'
|
|
6212
|
+
}
|
|
6213
|
+
}, label))), /*#__PURE__*/React$1.createElement("div", null, menu));
|
|
6214
|
+
}
|
|
6018
6215
|
}), (i === null || i === void 0 ? void 0 : (_i$initialSource = i.initialSource) === null || _i$initialSource === void 0 ? void 0 : _i$initialSource.length) && (i === null || i === void 0 ? void 0 : i.initialSource.map(function (m) {
|
|
6019
6216
|
return /*#__PURE__*/React$1.createElement(Option$1, {
|
|
6020
6217
|
value: m.value,
|
|
@@ -6022,8 +6219,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6022
6219
|
}, m.text);
|
|
6023
6220
|
})))));
|
|
6024
6221
|
}
|
|
6025
|
-
if ((i === null || i === void 0 ? void 0 : i.type) === 'treeSelect' || (i === null || i === void 0 ? void 0 : (_i$
|
|
6026
|
-
var _i$
|
|
6222
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'treeSelect' || (i === null || i === void 0 ? void 0 : (_i$field6 = i.field) === null || _i$field6 === void 0 ? void 0 : _i$field6.type) === 'treeSelect') {
|
|
6223
|
+
var _i$field7;
|
|
6027
6224
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6028
6225
|
span: ColSpan,
|
|
6029
6226
|
key: i.name
|
|
@@ -6036,12 +6233,12 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6036
6233
|
width: '100%'
|
|
6037
6234
|
},
|
|
6038
6235
|
placeholder: "\u8BF7\u9009\u62E9"
|
|
6039
|
-
}, i === null || i === void 0 ? void 0 : (_i$
|
|
6236
|
+
}, i === null || i === void 0 ? void 0 : (_i$field7 = i.field) === null || _i$field7 === void 0 ? void 0 : _i$field7.props), {}, {
|
|
6040
6237
|
disabled: setDisabled(i.name)
|
|
6041
6238
|
}))));
|
|
6042
6239
|
}
|
|
6043
|
-
if ((i === null || i === void 0 ? void 0 : i.type) === 'rangepicker' || (i === null || i === void 0 ? void 0 : (_i$
|
|
6044
|
-
var _i$initialValue, _i$
|
|
6240
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'rangepicker' || (i === null || i === void 0 ? void 0 : (_i$field8 = i.field) === null || _i$field8 === void 0 ? void 0 : _i$field8.type) === 'rangepicker') {
|
|
6241
|
+
var _i$initialValue, _i$field9;
|
|
6045
6242
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6046
6243
|
span: ColSpan,
|
|
6047
6244
|
key: i.name
|
|
@@ -6055,12 +6252,12 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6055
6252
|
width: '100%'
|
|
6056
6253
|
},
|
|
6057
6254
|
placeholder: "\u8BF7\u9009\u62E9"
|
|
6058
|
-
}, i === null || i === void 0 ? void 0 : (_i$
|
|
6255
|
+
}, i === null || i === void 0 ? void 0 : (_i$field9 = i.field) === null || _i$field9 === void 0 ? void 0 : _i$field9.props), {}, {
|
|
6059
6256
|
disabled: setDisabled(i.name)
|
|
6060
6257
|
}))));
|
|
6061
6258
|
}
|
|
6062
|
-
if ((i === null || i === void 0 ? void 0 : i.type) === 'datepicker' || (i === null || i === void 0 ? void 0 : (_i$
|
|
6063
|
-
var _i$
|
|
6259
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'datepicker' || (i === null || i === void 0 ? void 0 : (_i$field0 = i.field) === null || _i$field0 === void 0 ? void 0 : _i$field0.type) === 'datepicker') {
|
|
6260
|
+
var _i$field1;
|
|
6064
6261
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6065
6262
|
span: ColSpan,
|
|
6066
6263
|
key: i.name
|
|
@@ -6073,11 +6270,11 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6073
6270
|
width: '100%'
|
|
6074
6271
|
},
|
|
6075
6272
|
placeholder: "\u8BF7\u9009\u62E9"
|
|
6076
|
-
}, i === null || i === void 0 ? void 0 : (_i$
|
|
6273
|
+
}, i === null || i === void 0 ? void 0 : (_i$field1 = i.field) === null || _i$field1 === void 0 ? void 0 : _i$field1.props), {}, {
|
|
6077
6274
|
disabled: setDisabled(i.name)
|
|
6078
6275
|
}))));
|
|
6079
6276
|
}
|
|
6080
|
-
if ((i === null || i === void 0 ? void 0 : i.type) === 'businessSearchSelect' || (i === null || i === void 0 ? void 0 : (_i$
|
|
6277
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'businessSearchSelect' || (i === null || i === void 0 ? void 0 : (_i$field10 = i.field) === null || _i$field10 === void 0 ? void 0 : _i$field10.type) === 'businessSearchSelect') {
|
|
6081
6278
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6082
6279
|
span: ColSpan,
|
|
6083
6280
|
key: i.name
|
|
@@ -6089,7 +6286,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6089
6286
|
disabled: setDisabled(i.name)
|
|
6090
6287
|
}))));
|
|
6091
6288
|
}
|
|
6092
|
-
if ((i === null || i === void 0 ? void 0 : i.type) === 'multipleQueryInput' || (i === null || i === void 0 ? void 0 : (_i$
|
|
6289
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'multipleQueryInput' || (i === null || i === void 0 ? void 0 : (_i$field11 = i.field) === null || _i$field11 === void 0 ? void 0 : _i$field11.type) === 'multipleQueryInput') {
|
|
6093
6290
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6094
6291
|
span: ColSpan,
|
|
6095
6292
|
key: i.name
|
|
@@ -6103,7 +6300,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6103
6300
|
}
|
|
6104
6301
|
})));
|
|
6105
6302
|
}
|
|
6106
|
-
if ((i === null || i === void 0 ? void 0 : (_i$
|
|
6303
|
+
if ((i === null || i === void 0 ? void 0 : (_i$field12 = i.field) === null || _i$field12 === void 0 ? void 0 : _i$field12.type) === 'proppertySelector') {
|
|
6107
6304
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6108
6305
|
span: ColSpan,
|
|
6109
6306
|
key: i.name
|
|
@@ -6113,8 +6310,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6113
6310
|
key: i.name
|
|
6114
6311
|
}, /*#__PURE__*/React$1.createElement(PropertySelector, null)));
|
|
6115
6312
|
}
|
|
6116
|
-
if ((i === null || i === void 0 ? void 0 : i.type) === 'itemPropertySelector' || (i === null || i === void 0 ? void 0 : (_i$
|
|
6117
|
-
var _i$
|
|
6313
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'itemPropertySelector' || (i === null || i === void 0 ? void 0 : (_i$field13 = i.field) === null || _i$field13 === void 0 ? void 0 : _i$field13.type) === 'itemPropertySelector') {
|
|
6314
|
+
var _i$field14;
|
|
6118
6315
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6119
6316
|
span: ColSpan,
|
|
6120
6317
|
key: i.name
|
|
@@ -6127,9 +6324,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6127
6324
|
width: '100%'
|
|
6128
6325
|
},
|
|
6129
6326
|
placeholder: "\u8BF7\u9009\u62E9"
|
|
6130
|
-
}, i === null || i === void 0 ? void 0 : (_i$
|
|
6327
|
+
}, i === null || i === void 0 ? void 0 : (_i$field14 = i.field) === null || _i$field14 === void 0 ? void 0 : _i$field14.props))));
|
|
6131
6328
|
}
|
|
6132
|
-
if ((i === null || i === void 0 ? void 0 : (_i$
|
|
6329
|
+
if ((i === null || i === void 0 ? void 0 : (_i$field15 = i.field) === null || _i$field15 === void 0 ? void 0 : _i$field15.type) === 'multipleQuerySearchSelect') {
|
|
6133
6330
|
return /*#__PURE__*/React$1.createElement(Col, {
|
|
6134
6331
|
span: ColSpan,
|
|
6135
6332
|
key: i.name
|
|
@@ -6158,7 +6355,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6158
6355
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
6159
6356
|
allowClear: true,
|
|
6160
6357
|
maxLength: 100
|
|
6161
|
-
}, i === null || i === void 0 ? void 0 : (_i$
|
|
6358
|
+
}, i === null || i === void 0 ? void 0 : (_i$field16 = i.field) === null || _i$field16 === void 0 ? void 0 : _i$field16.props), {}, {
|
|
6162
6359
|
disabled: setDisabled(i.name)
|
|
6163
6360
|
}))));
|
|
6164
6361
|
});
|
|
@@ -6180,7 +6377,30 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6180
6377
|
});
|
|
6181
6378
|
};
|
|
6182
6379
|
var renderShowTable = function renderShowTable(tableList, type) {
|
|
6183
|
-
var
|
|
6380
|
+
var _modalTableProps$tabl;
|
|
6381
|
+
var currentPageSize = Number((tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize) || tableInitPageSize);
|
|
6382
|
+
var needLimitRenderRows = type !== 'noPage' && currentPageSize >= tableRenderPageSize && (tableList === null || tableList === void 0 ? void 0 : tableList.length) > tableRenderPageSize;
|
|
6383
|
+
var currentTableList = needLimitRenderRows ? tableList.slice(0, tableRenderPageSize) : tableList;
|
|
6384
|
+
var currentDataSource = type == 'noPage' ? selectedTablePageRows : currentTableList;
|
|
6385
|
+
var viCount = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.visibleFieldsCount) || defaultVisibleFieldsCount;
|
|
6386
|
+
var canExpand = hasMoreQueryFields(modalTableProps);
|
|
6387
|
+
var collapsedList = modalTableProps === null || modalTableProps === void 0 ? void 0 : (_modalTableProps$tabl = modalTableProps.tableSearchForm) === null || _modalTableProps$tabl === void 0 ? void 0 : _modalTableProps$tabl.slice(0, viCount);
|
|
6388
|
+
var baseHeight = getTableHeigth(collapsedList);
|
|
6389
|
+
var rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan).totalRows;
|
|
6390
|
+
var rowsExpandedData = getFormRowInfo(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan);
|
|
6391
|
+
var rowsExpanded = rowsExpandedData.totalRows;
|
|
6392
|
+
var isMoreAction = false;
|
|
6393
|
+
if (24 / (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan) - rowsExpandedData.emptyArray.length === 1) {
|
|
6394
|
+
rowsExpanded++;
|
|
6395
|
+
isMoreAction = true;
|
|
6396
|
+
}
|
|
6397
|
+
var extraRows = !collapsed && canExpand ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
|
|
6398
|
+
var tableBoxHeighth = baseHeight;
|
|
6399
|
+
if (isMoreAction && extraRows > 0) {
|
|
6400
|
+
tableBoxHeighth = tableBoxHeighth + (extraRows - 1 ? extraRows - 1 : 0) * 34 + 32;
|
|
6401
|
+
} else {
|
|
6402
|
+
tableBoxHeighth = tableBoxHeighth + extraRows * 34;
|
|
6403
|
+
}
|
|
6184
6404
|
var x = (tableList === null || tableList === void 0 ? void 0 : tableList.length) ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
|
|
6185
6405
|
var oSY = "calc(100vh - ".concat(tableBoxHeighth, "px - ").concat(x, "px)");
|
|
6186
6406
|
var mTB = "calc(50vh - ".concat(tableBoxHeighth / 2, "px - ").concat(x / 2, "px - 40px)");
|
|
@@ -6191,13 +6411,14 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6191
6411
|
}, /*#__PURE__*/React$1.createElement(Table, _objectSpread2(_objectSpread2({
|
|
6192
6412
|
bordered: true,
|
|
6193
6413
|
size: "middle",
|
|
6194
|
-
rowSelection:
|
|
6414
|
+
rowSelection: getRowSelection(currentDataSource, type),
|
|
6195
6415
|
columns: tableShowColumns,
|
|
6196
|
-
dataSource:
|
|
6416
|
+
dataSource: currentDataSource
|
|
6197
6417
|
}, type == 'noPage' ? {
|
|
6198
|
-
pagination: _objectSpread2(_objectSpread2({},
|
|
6418
|
+
pagination: _objectSpread2(_objectSpread2({}, selectedTablePagination), {}, {
|
|
6199
6419
|
showSizeChanger: false
|
|
6200
6420
|
}),
|
|
6421
|
+
onChange: handleSelectedTableChange,
|
|
6201
6422
|
locale: {
|
|
6202
6423
|
emptyText: renderEmptyText('暂无已选结果', mTB)
|
|
6203
6424
|
}
|
|
@@ -6233,13 +6454,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6233
6454
|
} // 务必填写 key
|
|
6234
6455
|
];
|
|
6235
6456
|
var tabsItems2 = [{
|
|
6236
|
-
label: "\u5DF2\u9009\uFF08".concat((
|
|
6457
|
+
label: "\u5DF2\u9009\uFF08".concat((selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length) || 0, "\uFF09"),
|
|
6237
6458
|
key: 'selected',
|
|
6238
|
-
children: renderShowTable(
|
|
6239
|
-
return _objectSpread2(_objectSpread2({}, s), {}, {
|
|
6240
|
-
keyIndex: index + 1
|
|
6241
|
-
});
|
|
6242
|
-
})) || [], 'noPage')
|
|
6459
|
+
children: renderShowTable(selectedRows, 'noPage')
|
|
6243
6460
|
}];
|
|
6244
6461
|
var resetSelectDataSource = function resetSelectDataSource() {
|
|
6245
6462
|
var isClear = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -6255,7 +6472,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6255
6472
|
props === null || props === void 0 ? void 0 : (_props$onClear = props.onClear) === null || _props$onClear === void 0 ? void 0 : _props$onClear.call(props);
|
|
6256
6473
|
// 清空下拉框 / 弹窗 选中数据
|
|
6257
6474
|
formaData([], items);
|
|
6258
|
-
|
|
6475
|
+
clearSelectedRows();
|
|
6259
6476
|
// 重置下拉框数据源
|
|
6260
6477
|
resetSelectDataSource(true);
|
|
6261
6478
|
};
|
|
@@ -6512,9 +6729,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6512
6729
|
}, /*#__PURE__*/React$1.createElement(Tabs, {
|
|
6513
6730
|
items: tabsItems2,
|
|
6514
6731
|
tabBarExtraContent: /*#__PURE__*/React$1.createElement("span", {
|
|
6515
|
-
onClick:
|
|
6516
|
-
return onChangeSelectedKeys([], []);
|
|
6517
|
-
}
|
|
6732
|
+
onClick: clearSelectedRows
|
|
6518
6733
|
}, "\u6E05\u7A7A\u5DF2\u9009")
|
|
6519
6734
|
})) : null)))));
|
|
6520
6735
|
});
|
|
@@ -8330,6 +8545,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
8330
8545
|
});
|
|
8331
8546
|
};
|
|
8332
8547
|
var handleTableChange = function handleTableChange(pagination) {
|
|
8548
|
+
// 设置分页tablePagination
|
|
8549
|
+
setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), pagination));
|
|
8333
8550
|
getData(_objectSpread2(_objectSpread2({}, tableFormParams), {}, {
|
|
8334
8551
|
pageSize: pagination.pageSize,
|
|
8335
8552
|
currentPage: pagination.current
|
|
@@ -8922,7 +9139,6 @@ var InputElement = function InputElement(_ref) {
|
|
|
8922
9139
|
// {
|
|
8923
9140
|
// body: {
|
|
8924
9141
|
// cell: ({index, record, ...props}) => {
|
|
8925
|
-
// debugger
|
|
8926
9142
|
// return <td {...props} style={selectIndex === record?.index ? {background: '#005CFF30'} : {} } />
|
|
8927
9143
|
// }
|
|
8928
9144
|
// }
|
|
@@ -10455,7 +10671,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10455
10671
|
}, {
|
|
10456
10672
|
name: 'qp-zzdlbm-in',
|
|
10457
10673
|
type: 'select',
|
|
10458
|
-
label: '
|
|
10674
|
+
label: '品类',
|
|
10459
10675
|
field: {
|
|
10460
10676
|
type: 'select',
|
|
10461
10677
|
props: {
|
|
@@ -10474,7 +10690,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10474
10690
|
}, {
|
|
10475
10691
|
name: 'qp-zzzlbm-in',
|
|
10476
10692
|
type: 'select',
|
|
10477
|
-
label: '
|
|
10693
|
+
label: '大类',
|
|
10478
10694
|
field: {
|
|
10479
10695
|
type: 'select',
|
|
10480
10696
|
props: {
|
|
@@ -10493,7 +10709,26 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10493
10709
|
}, {
|
|
10494
10710
|
name: 'qp-zzxlbm-in',
|
|
10495
10711
|
type: 'select',
|
|
10496
|
-
label: '
|
|
10712
|
+
label: '中类',
|
|
10713
|
+
field: {
|
|
10714
|
+
type: 'select',
|
|
10715
|
+
props: {
|
|
10716
|
+
mode: 'multiple',
|
|
10717
|
+
notFoundContent: '暂无数据',
|
|
10718
|
+
allowClear: true,
|
|
10719
|
+
showSearch: true,
|
|
10720
|
+
showArrow: true,
|
|
10721
|
+
maxTagCount: 1,
|
|
10722
|
+
optionFilterProp: 'children',
|
|
10723
|
+
filterOption: function filterOption(input, option) {
|
|
10724
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10725
|
+
}
|
|
10726
|
+
}
|
|
10727
|
+
}
|
|
10728
|
+
}, {
|
|
10729
|
+
name: 'qp-brandYearSeason-in',
|
|
10730
|
+
type: 'select',
|
|
10731
|
+
label: '产品季',
|
|
10497
10732
|
field: {
|
|
10498
10733
|
type: 'select',
|
|
10499
10734
|
props: {
|
|
@@ -10538,6 +10773,9 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10538
10773
|
}, {
|
|
10539
10774
|
isOpen: true,
|
|
10540
10775
|
queryKey: 'qp-zzxlbm-in'
|
|
10776
|
+
}, {
|
|
10777
|
+
isOpen: true,
|
|
10778
|
+
queryKey: 'qp-brandYearSeason-in'
|
|
10541
10779
|
}];
|
|
10542
10780
|
var _queryHeaderParams2 = getQueryHeadersList({
|
|
10543
10781
|
defaultQSHL: defaultQSHL,
|
|
@@ -10566,7 +10804,10 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10566
10804
|
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-zzzlbm-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/item/propertyValue"), {
|
|
10567
10805
|
'qp-propertyCode-eq': 'PROP_SUBCATEORY',
|
|
10568
10806
|
pageSize: 999
|
|
10569
|
-
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-zzxlbm-in'))
|
|
10807
|
+
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-zzxlbm-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/item/propertyValue"), {
|
|
10808
|
+
'qp-propertyCode-eq': 'PROP_ITEM_PRODUCTSEASON',
|
|
10809
|
+
pageSize: 999
|
|
10810
|
+
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-brandYearSeason-in'))]).then(function (x) {
|
|
10570
10811
|
formatSource(x, 0, 3, tableSearchForm, ['id', 'name']);
|
|
10571
10812
|
formatTreeDataSource(x, 1, 4, tableSearchForm);
|
|
10572
10813
|
formatSource(x, 0, getFieldIndex(tableSearchForm, 'qp-brandId-in'), tableSearchForm, ['id', 'name']);
|
|
@@ -10577,6 +10818,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10577
10818
|
formatSource(x, 5, getFieldIndex(tableSearchForm, 'qp-zzdlbm-in'), tableSearchForm, ['value', 'value']);
|
|
10578
10819
|
formatSource(x, 6, getFieldIndex(tableSearchForm, 'qp-zzzlbm-in'), tableSearchForm, ['value', 'value']);
|
|
10579
10820
|
formatSource(x, 7, getFieldIndex(tableSearchForm, 'qp-zzxlbm-in'), tableSearchForm, ['value', 'value']);
|
|
10821
|
+
formatSource(x, 8, getFieldIndex(tableSearchForm, 'qp-brandYearSeason-in'), tableSearchForm, ['value', 'value']);
|
|
10580
10822
|
});
|
|
10581
10823
|
modalTableProps = _objectSpread2({
|
|
10582
10824
|
modalTableTitle: '选择SKU',
|
|
@@ -10989,8 +11231,9 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10989
11231
|
}]
|
|
10990
11232
|
}, selectConfigProps);
|
|
10991
11233
|
var _tableSearchForm = handleHiddenFields([{
|
|
10992
|
-
name: 'qp-code-
|
|
10993
|
-
label: 'SKC编码'
|
|
11234
|
+
name: 'qp-code-in',
|
|
11235
|
+
label: 'SKC编码',
|
|
11236
|
+
type: 'multipleQueryInput'
|
|
10994
11237
|
}, {
|
|
10995
11238
|
name: 'qp-skcName-like',
|
|
10996
11239
|
label: 'SKC名称'
|
|
@@ -11042,10 +11285,25 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11042
11285
|
}
|
|
11043
11286
|
}
|
|
11044
11287
|
}
|
|
11045
|
-
},
|
|
11046
|
-
|
|
11288
|
+
},
|
|
11289
|
+
// { name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
11290
|
+
// type: 'select',
|
|
11291
|
+
// props: {
|
|
11292
|
+
// mode: 'multiple',
|
|
11293
|
+
// notFoundContent: '暂无数据',
|
|
11294
|
+
// allowClear: true,
|
|
11295
|
+
// showSearch: true,
|
|
11296
|
+
// showArrow: true,
|
|
11297
|
+
// maxTagCount: 1,
|
|
11298
|
+
// optionFilterProp: 'children',
|
|
11299
|
+
// filterOption: (input: string, option: { props: { children: string } }) =>
|
|
11300
|
+
// option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
11301
|
+
// },
|
|
11302
|
+
// } },
|
|
11303
|
+
{
|
|
11304
|
+
name: 'qp-brandId-in',
|
|
11047
11305
|
type: 'select',
|
|
11048
|
-
label: '
|
|
11306
|
+
label: '品牌',
|
|
11049
11307
|
field: {
|
|
11050
11308
|
type: 'select',
|
|
11051
11309
|
props: {
|
|
@@ -11061,12 +11319,53 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11061
11319
|
}
|
|
11062
11320
|
}
|
|
11063
11321
|
}
|
|
11064
|
-
},
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11322
|
+
},
|
|
11323
|
+
// 商品属性 品类 == MAT_CATA (zzdlbm)
|
|
11324
|
+
{
|
|
11325
|
+
name: "qp-zzdlbm-in",
|
|
11326
|
+
label: "品类",
|
|
11068
11327
|
field: {
|
|
11069
|
-
type:
|
|
11328
|
+
type: "select",
|
|
11329
|
+
props: {
|
|
11330
|
+
mode: 'multiple',
|
|
11331
|
+
notFoundContent: '暂无数据',
|
|
11332
|
+
allowClear: true,
|
|
11333
|
+
showSearch: true,
|
|
11334
|
+
showArrow: true,
|
|
11335
|
+
maxTagCount: 1,
|
|
11336
|
+
optionFilterProp: 'children',
|
|
11337
|
+
filterOption: function filterOption(input, option) {
|
|
11338
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11339
|
+
}
|
|
11340
|
+
}
|
|
11341
|
+
}
|
|
11342
|
+
},
|
|
11343
|
+
// 商品属性 大类 == MID_CATA (zzzlbm)
|
|
11344
|
+
{
|
|
11345
|
+
name: "qp-zzzlbm-in",
|
|
11346
|
+
label: "大类",
|
|
11347
|
+
field: {
|
|
11348
|
+
type: "select",
|
|
11349
|
+
props: {
|
|
11350
|
+
mode: 'multiple',
|
|
11351
|
+
notFoundContent: '暂无数据',
|
|
11352
|
+
allowClear: true,
|
|
11353
|
+
showSearch: true,
|
|
11354
|
+
showArrow: true,
|
|
11355
|
+
maxTagCount: 1,
|
|
11356
|
+
optionFilterProp: 'children',
|
|
11357
|
+
filterOption: function filterOption(input, option) {
|
|
11358
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11359
|
+
}
|
|
11360
|
+
}
|
|
11361
|
+
}
|
|
11362
|
+
},
|
|
11363
|
+
// 商品属性 中类 == PROP_SUBCATEORY (zzxlbm)
|
|
11364
|
+
{
|
|
11365
|
+
name: "qp-zzxlbm-in",
|
|
11366
|
+
label: "中类",
|
|
11367
|
+
field: {
|
|
11368
|
+
type: "select",
|
|
11070
11369
|
props: {
|
|
11071
11370
|
mode: 'multiple',
|
|
11072
11371
|
notFoundContent: '暂无数据',
|
|
@@ -11100,22 +11399,48 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11100
11399
|
currentPage: 1
|
|
11101
11400
|
},
|
|
11102
11401
|
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-categoryId-in')
|
|
11402
|
+
},
|
|
11403
|
+
// {
|
|
11404
|
+
// url: `${prefixUrl.formSelectFix}/class/withProperty`,
|
|
11405
|
+
// params: {
|
|
11406
|
+
// pageSize: 5000,
|
|
11407
|
+
// currentPage: 1,
|
|
11408
|
+
// },
|
|
11409
|
+
// options: getQueryHeadersItem(queryHeaderParams,'qp-classId-in')
|
|
11410
|
+
// },
|
|
11411
|
+
{
|
|
11412
|
+
url: "".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"),
|
|
11413
|
+
params: {
|
|
11414
|
+
pageSize: 5000,
|
|
11415
|
+
currentPage: 1,
|
|
11416
|
+
'ctl-withAuth': true
|
|
11417
|
+
},
|
|
11418
|
+
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
|
|
11103
11419
|
}, {
|
|
11104
|
-
url: "".concat(prefixUrl.formSelectFix, "/
|
|
11420
|
+
url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
|
|
11105
11421
|
params: {
|
|
11106
11422
|
pageSize: 5000,
|
|
11107
|
-
currentPage: 1
|
|
11423
|
+
currentPage: 1,
|
|
11424
|
+
'qp-propertyCode-eq': 'MAT_CATA'
|
|
11108
11425
|
},
|
|
11109
|
-
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-
|
|
11426
|
+
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzdlbm-in')
|
|
11110
11427
|
}, {
|
|
11111
|
-
url: "".concat(prefixUrl.formSelectFix, "/
|
|
11428
|
+
url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
|
|
11112
11429
|
params: {
|
|
11113
11430
|
pageSize: 5000,
|
|
11114
11431
|
currentPage: 1,
|
|
11115
|
-
'
|
|
11432
|
+
'qp-propertyCode-eq': 'MID_CATA'
|
|
11116
11433
|
},
|
|
11117
|
-
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-
|
|
11118
|
-
}
|
|
11434
|
+
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzzlbm-in')
|
|
11435
|
+
}, {
|
|
11436
|
+
url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
|
|
11437
|
+
params: {
|
|
11438
|
+
pageSize: 5000,
|
|
11439
|
+
currentPage: 1,
|
|
11440
|
+
'qp-propertyCode-eq': 'PROP_SUBCATEORY'
|
|
11441
|
+
},
|
|
11442
|
+
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzxlbm-in')
|
|
11443
|
+
}], ['colorName', 'categoryId', 'brandId', 'zzdlbm', 'zzzlbm', 'zzxlbm'], hiddenFields);
|
|
11119
11444
|
var fieldLoadSource = fieldsRequest.map(function (i) {
|
|
11120
11445
|
return loadSelectSource$1(i.url, i.params, i.options);
|
|
11121
11446
|
});
|
|
@@ -11132,8 +11457,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11132
11457
|
Promise.all(fieldLoadSource).then(function (x) {
|
|
11133
11458
|
formatSource(x, 0, getFieldIndex(_tableSearchForm, 'colorName'), _tableSearchForm, ['value', 'value']);
|
|
11134
11459
|
formatTreeDataSource(x, 1, getFieldIndex(_tableSearchForm, 'categoryId'), _tableSearchForm);
|
|
11135
|
-
formatSource(x,
|
|
11136
|
-
formatSource(x,
|
|
11460
|
+
// formatSource(x,2, getFieldIndex(tableSearchForm, 'classId'), tableSearchForm,['id','name']);
|
|
11461
|
+
formatSource(x, 2, getFieldIndex(_tableSearchForm, 'brandId'), _tableSearchForm, ['id', 'name']);
|
|
11462
|
+
formatSource(x, 3, getFieldIndex(_tableSearchForm, 'zzdlbm'), _tableSearchForm, ['value', 'value']);
|
|
11463
|
+
formatSource(x, 4, getFieldIndex(_tableSearchForm, 'zzzlbm'), _tableSearchForm, ['value', 'value']);
|
|
11464
|
+
formatSource(x, 5, getFieldIndex(_tableSearchForm, 'zzxlbm'), _tableSearchForm, ['value', 'value']);
|
|
11137
11465
|
});
|
|
11138
11466
|
modalTableProps = _objectSpread2({
|
|
11139
11467
|
modalTableTitle: '选择SKC',
|
|
@@ -11152,21 +11480,37 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11152
11480
|
defaultSort: 2
|
|
11153
11481
|
}, {
|
|
11154
11482
|
title: '商品名称',
|
|
11155
|
-
dataIndex: 'itemName'
|
|
11483
|
+
dataIndex: 'itemName',
|
|
11484
|
+
defaultSort: 3
|
|
11156
11485
|
}, {
|
|
11157
11486
|
title: '颜色',
|
|
11158
11487
|
dataIndex: 'colorName',
|
|
11159
|
-
defaultSort:
|
|
11488
|
+
defaultSort: 4
|
|
11160
11489
|
}, {
|
|
11161
11490
|
title: '类目',
|
|
11162
|
-
dataIndex: 'categoryText'
|
|
11491
|
+
dataIndex: 'categoryText',
|
|
11492
|
+
defaultSort: 5
|
|
11493
|
+
},
|
|
11494
|
+
// {
|
|
11495
|
+
// title: '品类',
|
|
11496
|
+
// dataIndex: 'className',
|
|
11497
|
+
// },
|
|
11498
|
+
{
|
|
11499
|
+
title: '品牌',
|
|
11500
|
+
dataIndex: 'brandName',
|
|
11501
|
+
defaultSort: 6
|
|
11163
11502
|
}, {
|
|
11164
11503
|
title: '品类',
|
|
11165
|
-
dataIndex: '
|
|
11504
|
+
dataIndex: 'zzdlbm',
|
|
11505
|
+
defaultSort: 7
|
|
11166
11506
|
}, {
|
|
11167
|
-
title: '
|
|
11168
|
-
dataIndex: '
|
|
11169
|
-
defaultSort:
|
|
11507
|
+
title: '大类',
|
|
11508
|
+
dataIndex: 'zzzlbm',
|
|
11509
|
+
defaultSort: 8
|
|
11510
|
+
}, {
|
|
11511
|
+
title: '中类',
|
|
11512
|
+
dataIndex: 'zzxlbm',
|
|
11513
|
+
defaultSort: 9
|
|
11170
11514
|
}], hiddenFields)
|
|
11171
11515
|
}, modalTableBusProps);
|
|
11172
11516
|
}
|
|
@@ -11337,19 +11681,33 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11337
11681
|
});
|
|
11338
11682
|
Promise.all([loadSelectSource$1("/channel-manage/channelInfo/tree", {
|
|
11339
11683
|
'qp-status-eq': 10,
|
|
11340
|
-
'qp-isMain-eq': 1,
|
|
11684
|
+
// 'qp-isMain-eq': 1,
|
|
11341
11685
|
'qp-type-in': '1,2'
|
|
11342
|
-
},
|
|
11686
|
+
}, {
|
|
11687
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
11688
|
+
}), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
|
|
11343
11689
|
'qp-status-eq': 1
|
|
11344
|
-
},
|
|
11690
|
+
}, {
|
|
11691
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
11692
|
+
})]).then(function (x) {
|
|
11693
|
+
var _x$, _x$$data$, _x$$data$$channelInfo;
|
|
11694
|
+
// 战区限制一级数据
|
|
11695
|
+
var newData1 = [];
|
|
11696
|
+
(_x$ = x[0]) === null || _x$ === void 0 ? void 0 : (_x$$data$ = _x$.data[0]) === null || _x$$data$ === void 0 ? void 0 : (_x$$data$$channelInfo = _x$$data$.channelInfoSon) === null || _x$$data$$channelInfo === void 0 ? void 0 : _x$$data$$channelInfo.forEach(function (item) {
|
|
11697
|
+
newData1.push({
|
|
11698
|
+
code: item.code,
|
|
11699
|
+
name: item.name
|
|
11700
|
+
});
|
|
11701
|
+
});
|
|
11702
|
+
x[0].data = newData1;
|
|
11345
11703
|
var channelDisabledJude = function channelDisabledJude(data) {
|
|
11346
11704
|
return data['parentCode'] === '0';
|
|
11347
11705
|
}; // 所属销售渠道 树节点不能点判断
|
|
11348
11706
|
var areaDisabledJude = function areaDisabledJude(data) {
|
|
11349
11707
|
return data['parent'] === '0';
|
|
11350
11708
|
}; // 所属营销区域 树节点不能点判断
|
|
11351
|
-
formatTreeDataSource(x, 0,
|
|
11352
|
-
formatTreeDataSource(x, 1,
|
|
11709
|
+
formatTreeDataSource(x, 0, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
11710
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
|
|
11353
11711
|
});
|
|
11354
11712
|
tableSearchForm = [{
|
|
11355
11713
|
name: 'realWarehouseName*multiInput',
|
|
@@ -11467,7 +11825,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11467
11825
|
},
|
|
11468
11826
|
width: 100
|
|
11469
11827
|
}, {
|
|
11470
|
-
title: '
|
|
11828
|
+
title: '战区',
|
|
11471
11829
|
dataIndex: 'channelName',
|
|
11472
11830
|
defaultSort: 4,
|
|
11473
11831
|
width: 100
|
|
@@ -11548,11 +11906,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11548
11906
|
}
|
|
11549
11907
|
}
|
|
11550
11908
|
}, {
|
|
11551
|
-
name: 'qp-
|
|
11552
|
-
type: '
|
|
11553
|
-
label: '
|
|
11909
|
+
name: 'qp-operationWarehouseClassification-in',
|
|
11910
|
+
type: 'select',
|
|
11911
|
+
label: '分类',
|
|
11554
11912
|
field: {
|
|
11555
|
-
type: '
|
|
11913
|
+
type: 'select',
|
|
11556
11914
|
props: {
|
|
11557
11915
|
multiple: true,
|
|
11558
11916
|
treeData: [],
|
|
@@ -11581,16 +11939,28 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11581
11939
|
});
|
|
11582
11940
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
|
|
11583
11941
|
'qp-status-eq': 1
|
|
11584
|
-
},
|
|
11942
|
+
}, {
|
|
11943
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
11944
|
+
}), loadSelectSource$1("/channel-manage/channelInfo/tree", {
|
|
11585
11945
|
'qp-status-eq': 10,
|
|
11586
11946
|
'qp-isMain-eq': 1,
|
|
11587
11947
|
'qp-type-in': '1,2'
|
|
11588
|
-
},
|
|
11948
|
+
}, {
|
|
11949
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
11950
|
+
}), loadSelectSource$1("/stock/ownerWarehouse/operationWarehouseClassificationList", {}, {
|
|
11951
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
11952
|
+
})]).then(function (x) {
|
|
11953
|
+
var _x$2, _x$2$data$, _x$2$data$$channelInf;
|
|
11589
11954
|
formatSource(x, 0, 2, tableSearchForm, ['groupCode', 'groupName']);
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11955
|
+
formatSource(x, 2, 3, tableSearchForm, ['operationWarehouseClassification', 'operationWarehouseClassificationName']);
|
|
11956
|
+
var newData1 = [];
|
|
11957
|
+
(_x$2 = x[1]) === null || _x$2 === void 0 ? void 0 : (_x$2$data$ = _x$2.data[0]) === null || _x$2$data$ === void 0 ? void 0 : (_x$2$data$$channelInf = _x$2$data$.channelInfoSon) === null || _x$2$data$$channelInf === void 0 ? void 0 : _x$2$data$$channelInf.forEach(function (item) {
|
|
11958
|
+
newData1.push({
|
|
11959
|
+
code: item.code,
|
|
11960
|
+
name: item.name
|
|
11961
|
+
});
|
|
11962
|
+
});
|
|
11963
|
+
x[1].data = newData1;
|
|
11594
11964
|
});
|
|
11595
11965
|
modalTableProps = _objectSpread2({
|
|
11596
11966
|
modalTableTitle: '选择运营仓',
|
|
@@ -11704,11 +12074,13 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11704
12074
|
sourceName: 'customCode'
|
|
11705
12075
|
}, requestConfigProp);
|
|
11706
12076
|
tableSearchForm = [{
|
|
11707
|
-
name: '
|
|
11708
|
-
label: '客户名称'
|
|
12077
|
+
name: 'name*multiInput',
|
|
12078
|
+
label: '客户名称',
|
|
12079
|
+
type: 'multipleQueryInput'
|
|
11709
12080
|
}, {
|
|
11710
|
-
name: '
|
|
11711
|
-
label: '客户编码'
|
|
12081
|
+
name: 'code*multiInput',
|
|
12082
|
+
label: '客户编码',
|
|
12083
|
+
type: 'multipleQueryInput'
|
|
11712
12084
|
}, {
|
|
11713
12085
|
name: 'qp-conglomerateCode-in',
|
|
11714
12086
|
type: 'select',
|
|
@@ -11856,24 +12228,26 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11856
12228
|
sourceName: 'customCode'
|
|
11857
12229
|
}, requestConfigProp);
|
|
11858
12230
|
tableSearchForm = [{
|
|
11859
|
-
name: '
|
|
11860
|
-
label: '客户名称'
|
|
12231
|
+
name: 'name*multiInput',
|
|
12232
|
+
label: '客户名称',
|
|
12233
|
+
type: 'multipleQueryInput'
|
|
11861
12234
|
}, {
|
|
11862
|
-
name: '
|
|
11863
|
-
label: '客户编码'
|
|
12235
|
+
name: 'code*multiInput',
|
|
12236
|
+
label: '客户编码',
|
|
12237
|
+
type: 'multipleQueryInput'
|
|
11864
12238
|
}, {
|
|
11865
|
-
name: 'qp-createOrgCode-
|
|
12239
|
+
name: 'qp-createOrgCode-in',
|
|
11866
12240
|
type: 'select',
|
|
11867
12241
|
label: '创建组织',
|
|
11868
12242
|
field: {
|
|
11869
12243
|
type: 'select',
|
|
11870
12244
|
props: {
|
|
11871
|
-
|
|
12245
|
+
mode: 'multiple',
|
|
11872
12246
|
notFoundContent: '暂无数据',
|
|
11873
12247
|
allowClear: true,
|
|
11874
12248
|
showSearch: true,
|
|
11875
12249
|
showArrow: true,
|
|
11876
|
-
|
|
12250
|
+
maxTagCount: 1,
|
|
11877
12251
|
optionFilterProp: 'children',
|
|
11878
12252
|
filterOption: function filterOption(input, option) {
|
|
11879
12253
|
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
@@ -12248,26 +12622,21 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12248
12622
|
initialSource: shopFile2Type
|
|
12249
12623
|
},
|
|
12250
12624
|
// { name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
|
|
12625
|
+
// { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
|
|
12626
|
+
// type: 'select',
|
|
12627
|
+
// props: {
|
|
12628
|
+
// mode: 'multiple',
|
|
12629
|
+
// notFoundContent: '暂无数据',
|
|
12630
|
+
// allowClear: true,
|
|
12631
|
+
// showSearch: true,
|
|
12632
|
+
// showArrow: true,
|
|
12633
|
+
// maxTagCount: 1,
|
|
12634
|
+
// optionFilterProp: 'children',
|
|
12635
|
+
// filterOption: (input: string, option: { props: { children: string } }) =>
|
|
12636
|
+
// option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
12637
|
+
// },
|
|
12638
|
+
// } },
|
|
12251
12639
|
{
|
|
12252
|
-
name: 'qp-orgCode-in',
|
|
12253
|
-
type: 'select',
|
|
12254
|
-
label: '所属销售组织',
|
|
12255
|
-
field: {
|
|
12256
|
-
type: 'select',
|
|
12257
|
-
props: {
|
|
12258
|
-
mode: 'multiple',
|
|
12259
|
-
notFoundContent: '暂无数据',
|
|
12260
|
-
allowClear: true,
|
|
12261
|
-
showSearch: true,
|
|
12262
|
-
showArrow: true,
|
|
12263
|
-
maxTagCount: 1,
|
|
12264
|
-
optionFilterProp: 'children',
|
|
12265
|
-
filterOption: function filterOption(input, option) {
|
|
12266
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
12267
|
-
}
|
|
12268
|
-
}
|
|
12269
|
-
}
|
|
12270
|
-
}, {
|
|
12271
12640
|
name: 'qp-channelCode-in',
|
|
12272
12641
|
type: 'treeSelect',
|
|
12273
12642
|
label: '战区',
|
|
@@ -12351,24 +12720,99 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12351
12720
|
}
|
|
12352
12721
|
}, {
|
|
12353
12722
|
name: 'qp-manageSupervisor-like',
|
|
12723
|
+
type: 'select',
|
|
12354
12724
|
label: '管理督导',
|
|
12355
|
-
|
|
12725
|
+
field: {
|
|
12726
|
+
type: 'select',
|
|
12727
|
+
props: {
|
|
12728
|
+
notFoundContent: '暂无数据',
|
|
12729
|
+
allowClear: true,
|
|
12730
|
+
showSearch: true,
|
|
12731
|
+
showArrow: true,
|
|
12732
|
+
maxTagCount: 1,
|
|
12733
|
+
optionFilterProp: 'children',
|
|
12734
|
+
filterOption: function filterOption(input, option) {
|
|
12735
|
+
var _option$value;
|
|
12736
|
+
return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
|
|
12737
|
+
}
|
|
12738
|
+
}
|
|
12739
|
+
}
|
|
12356
12740
|
}, {
|
|
12357
12741
|
name: 'qp-directSupervisor-like',
|
|
12742
|
+
type: 'select',
|
|
12358
12743
|
label: '直接督导',
|
|
12359
|
-
|
|
12744
|
+
field: {
|
|
12745
|
+
type: 'select',
|
|
12746
|
+
props: {
|
|
12747
|
+
notFoundContent: '暂无数据',
|
|
12748
|
+
allowClear: true,
|
|
12749
|
+
showSearch: true,
|
|
12750
|
+
showArrow: true,
|
|
12751
|
+
maxTagCount: 1,
|
|
12752
|
+
optionFilterProp: 'children',
|
|
12753
|
+
filterOption: function filterOption(input, option) {
|
|
12754
|
+
var _option$value2;
|
|
12755
|
+
return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
|
|
12756
|
+
}
|
|
12757
|
+
}
|
|
12758
|
+
}
|
|
12360
12759
|
}, {
|
|
12361
12760
|
name: 'qp-distributionItem-like',
|
|
12761
|
+
type: 'select',
|
|
12362
12762
|
label: '分销商品',
|
|
12363
|
-
|
|
12763
|
+
field: {
|
|
12764
|
+
type: 'select',
|
|
12765
|
+
props: {
|
|
12766
|
+
notFoundContent: '暂无数据',
|
|
12767
|
+
allowClear: true,
|
|
12768
|
+
showSearch: true,
|
|
12769
|
+
showArrow: true,
|
|
12770
|
+
maxTagCount: 1,
|
|
12771
|
+
optionFilterProp: 'children',
|
|
12772
|
+
filterOption: function filterOption(input, option) {
|
|
12773
|
+
var _option$value3;
|
|
12774
|
+
return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
|
|
12775
|
+
}
|
|
12776
|
+
}
|
|
12777
|
+
}
|
|
12364
12778
|
}, {
|
|
12365
12779
|
name: 'qp-headItem-like',
|
|
12780
|
+
type: 'select',
|
|
12366
12781
|
label: '总部商品',
|
|
12367
|
-
|
|
12782
|
+
field: {
|
|
12783
|
+
type: 'select',
|
|
12784
|
+
props: {
|
|
12785
|
+
notFoundContent: '暂无数据',
|
|
12786
|
+
allowClear: true,
|
|
12787
|
+
showSearch: true,
|
|
12788
|
+
showArrow: true,
|
|
12789
|
+
maxTagCount: 1,
|
|
12790
|
+
optionFilterProp: 'children',
|
|
12791
|
+
filterOption: function filterOption(input, option) {
|
|
12792
|
+
var _option$value4;
|
|
12793
|
+
return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
|
|
12794
|
+
}
|
|
12795
|
+
}
|
|
12796
|
+
}
|
|
12368
12797
|
}, {
|
|
12369
12798
|
name: 'qp-storeChannelName-like',
|
|
12799
|
+
type: 'select',
|
|
12370
12800
|
label: '管理模式',
|
|
12371
|
-
|
|
12801
|
+
field: {
|
|
12802
|
+
type: 'select',
|
|
12803
|
+
props: {
|
|
12804
|
+
notFoundContent: '暂无数据',
|
|
12805
|
+
allowClear: true,
|
|
12806
|
+
showSearch: true,
|
|
12807
|
+
showArrow: true,
|
|
12808
|
+
maxTagCount: 1,
|
|
12809
|
+
optionFilterProp: 'children',
|
|
12810
|
+
filterOption: function filterOption(input, option) {
|
|
12811
|
+
var _option$value5;
|
|
12812
|
+
return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
|
|
12813
|
+
}
|
|
12814
|
+
}
|
|
12815
|
+
}
|
|
12372
12816
|
}];
|
|
12373
12817
|
var _queryHeaderParams10 = getQueryHeadersList({
|
|
12374
12818
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -12378,27 +12822,85 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12378
12822
|
'qp-employeeCode-eq': getEmployeeCode(),
|
|
12379
12823
|
'qp-realOrg-eq': true,
|
|
12380
12824
|
'qp-status-eq': 10
|
|
12381
|
-
},
|
|
12825
|
+
}, {
|
|
12826
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
12827
|
+
}), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/channelInfo/tree"), {
|
|
12382
12828
|
'qp-status-eq': 10,
|
|
12383
12829
|
'qp-isMain-eq': 1,
|
|
12384
12830
|
'qp-type-in': '1,2'
|
|
12385
|
-
},
|
|
12831
|
+
}, {
|
|
12832
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
12833
|
+
}), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/tagNode/getTree/10"), {
|
|
12386
12834
|
'qp-status-eq': 1
|
|
12387
|
-
},
|
|
12835
|
+
}, {
|
|
12836
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
12837
|
+
}), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
|
|
12388
12838
|
pageSize: 5000,
|
|
12389
12839
|
currentPage: 1,
|
|
12390
12840
|
'ctl-withAuth': true
|
|
12391
|
-
},
|
|
12841
|
+
}, {
|
|
12842
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
12843
|
+
}), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, {
|
|
12844
|
+
headers: _objectSpread2({}, extralHeaders)
|
|
12845
|
+
})]).then(function (x) {
|
|
12846
|
+
var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
|
|
12847
|
+
var newData1 = [];
|
|
12848
|
+
(_x$3 = x[1]) === null || _x$3 === void 0 ? void 0 : (_x$3$data$ = _x$3.data[0]) === null || _x$3$data$ === void 0 ? void 0 : (_x$3$data$$channelInf = _x$3$data$.channelInfoSon) === null || _x$3$data$$channelInf === void 0 ? void 0 : _x$3$data$$channelInf.forEach(function (item) {
|
|
12849
|
+
newData1.push({
|
|
12850
|
+
code: item.code,
|
|
12851
|
+
name: item.name
|
|
12852
|
+
});
|
|
12853
|
+
});
|
|
12854
|
+
x[1].data = newData1;
|
|
12392
12855
|
var channelDisabledJude = function channelDisabledJude(data) {
|
|
12393
12856
|
return data['parentCode'] === '0';
|
|
12394
12857
|
}; // 所属销售渠道 树节点不能点判断
|
|
12395
12858
|
var areaDisabledJude = function areaDisabledJude(data) {
|
|
12396
12859
|
return data['parent'] === '0';
|
|
12397
12860
|
}; // 所属营销区域 树节点不能点判断
|
|
12398
|
-
formatSource(x,
|
|
12399
|
-
formatTreeDataSource(x, 1,
|
|
12400
|
-
formatTreeDataSource(x, 2,
|
|
12401
|
-
formatSource(x, 3,
|
|
12861
|
+
// formatSource(x,0, 3, tableSearchForm);
|
|
12862
|
+
formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
12863
|
+
formatTreeDataSource(x, 2, 4, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
|
|
12864
|
+
formatSource(x, 3, 6, tableSearchForm, ['brandCode', 'name']);
|
|
12865
|
+
var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
|
|
12866
|
+
// 新增label属性
|
|
12867
|
+
(_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
|
|
12868
|
+
r.label = r === null || r === void 0 ? void 0 : r.value;
|
|
12869
|
+
});
|
|
12870
|
+
var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
|
|
12871
|
+
if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
|
|
12872
|
+
opList = opList[0];
|
|
12873
|
+
}
|
|
12874
|
+
var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
|
|
12875
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12876
|
+
});
|
|
12877
|
+
var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
|
|
12878
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12879
|
+
});
|
|
12880
|
+
var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
|
|
12881
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12882
|
+
});
|
|
12883
|
+
var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
|
|
12884
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12885
|
+
});
|
|
12886
|
+
var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
|
|
12887
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12888
|
+
});
|
|
12889
|
+
tableSearchForm[7] = _objectSpread2(_objectSpread2({}, tableSearchForm[7]), {}, {
|
|
12890
|
+
initialSource: m1
|
|
12891
|
+
});
|
|
12892
|
+
tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
|
|
12893
|
+
initialSource: m2
|
|
12894
|
+
});
|
|
12895
|
+
tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
|
|
12896
|
+
initialSource: m3
|
|
12897
|
+
});
|
|
12898
|
+
tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
|
|
12899
|
+
initialSource: m4
|
|
12900
|
+
});
|
|
12901
|
+
tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
|
|
12902
|
+
initialSource: m5
|
|
12903
|
+
});
|
|
12402
12904
|
});
|
|
12403
12905
|
modalTableProps = _objectSpread2({
|
|
12404
12906
|
modalTableTitle: '选择商店',
|
|
@@ -14224,7 +14726,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14224
14726
|
'ctl-withAuth': true
|
|
14225
14727
|
},
|
|
14226
14728
|
resType: 'list',
|
|
14227
|
-
resPosition: isNoUseItemBarcode ?
|
|
14729
|
+
resPosition: isNoUseItemBarcode ? 4 : 5,
|
|
14228
14730
|
resKeyValue: ['id', 'name']
|
|
14229
14731
|
}, {
|
|
14230
14732
|
url: "/items/category/queryCategoryTree",
|
|
@@ -14233,7 +14735,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14233
14735
|
currentPage: 1
|
|
14234
14736
|
},
|
|
14235
14737
|
resType: 'treeList',
|
|
14236
|
-
resPosition: isNoUseItemBarcode ?
|
|
14738
|
+
resPosition: isNoUseItemBarcode ? 5 : 6
|
|
14237
14739
|
}];
|
|
14238
14740
|
var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
14239
14741
|
var props = {
|
|
@@ -14270,7 +14772,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14270
14772
|
tableSearchForm: mTpTableSearchForm,
|
|
14271
14773
|
tableColumns: mTpTableColumn,
|
|
14272
14774
|
selectColumn: mTpSelectColumn,
|
|
14273
|
-
promiseLoadList: mTpPromiseLoadList
|
|
14775
|
+
promiseLoadList: mTpPromiseLoadList,
|
|
14776
|
+
topTablePagination: (parProps === null || parProps === void 0 ? void 0 : parProps.pagination) || {}
|
|
14274
14777
|
};
|
|
14275
14778
|
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
14276
14779
|
modalTableProps: modalTableProps
|
|
@@ -19281,6 +19784,13 @@ var css_248z$j = "#bs-sula-query-table .ant-table-title + .ant-table-container t
|
|
|
19281
19784
|
styleInject(css_248z$j);
|
|
19282
19785
|
|
|
19283
19786
|
var _excluded$i = ["onResize", "width"];
|
|
19787
|
+
/**
|
|
19788
|
+
* 获取列或搜索字段的稳定标识,用于过滤已经从最新配置中删除的项目。
|
|
19789
|
+
*/
|
|
19790
|
+
var getConfigItemKey = function getConfigItemKey(item, type) {
|
|
19791
|
+
var value = type === 'columns' ? (item === null || item === void 0 ? void 0 : item.key) || (item === null || item === void 0 ? void 0 : item.dataIndex) : item === null || item === void 0 ? void 0 : item.name;
|
|
19792
|
+
return Array.isArray(value) ? JSON.stringify(value) : value || '';
|
|
19793
|
+
};
|
|
19284
19794
|
var MemoQueryTable = /*#__PURE__*/React$1.memo(QueryTable);
|
|
19285
19795
|
var Text$2 = Typography.Text;
|
|
19286
19796
|
var ResizeableTitle$2 = function ResizeableTitle(props) {
|
|
@@ -19485,7 +19995,8 @@ var BsSulaQueryTable = (function (props) {
|
|
|
19485
19995
|
setPagePath = _useState0[1];
|
|
19486
19996
|
var _useLocation = useLocation(),
|
|
19487
19997
|
pathname = _useLocation.pathname,
|
|
19488
|
-
_useLocation$state = _useLocation.state
|
|
19998
|
+
_useLocation$state = _useLocation.state,
|
|
19999
|
+
state = _useLocation$state === void 0 ? {} : _useLocation$state;
|
|
19489
20000
|
var _useState1 = useState(false),
|
|
19490
20001
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
19491
20002
|
isFullScreen = _useState10[0],
|
|
@@ -19494,6 +20005,12 @@ var BsSulaQueryTable = (function (props) {
|
|
|
19494
20005
|
var value = props;
|
|
19495
20006
|
var _props$fields = props.fields,
|
|
19496
20007
|
fields = _props$fields === void 0 ? [] : _props$fields;
|
|
20008
|
+
var columnsStructureKey = JSON.stringify((props.columns || []).map(function (item) {
|
|
20009
|
+
return getConfigItemKey(item, 'columns');
|
|
20010
|
+
}));
|
|
20011
|
+
var fieldsStructureKey = JSON.stringify((props.fields || []).map(function (item) {
|
|
20012
|
+
return getConfigItemKey(item, 'searchFields');
|
|
20013
|
+
}));
|
|
19497
20014
|
var _useState11 = useState([]),
|
|
19498
20015
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
19499
20016
|
showColumn = _useState12[0],
|
|
@@ -19612,35 +20129,21 @@ var BsSulaQueryTable = (function (props) {
|
|
|
19612
20129
|
//组件初始挂载
|
|
19613
20130
|
useEffect(function () {
|
|
19614
20131
|
// getTableHeight();
|
|
19615
|
-
setInitialTableInfo();
|
|
19616
|
-
setInitialSearchFieldsInfo();
|
|
19617
20132
|
window.addEventListener('resize', function (e) {
|
|
19618
20133
|
watchWinResize();
|
|
19619
20134
|
});
|
|
19620
20135
|
setPagePath(pathname); // 做处理,记录当前页面渲染的初始pathname,用于进行判断当前列表页面数据是否需要重新渲染
|
|
19621
20136
|
}, []);
|
|
19622
20137
|
useEffect(function () {
|
|
19623
|
-
if (
|
|
19624
|
-
|
|
19625
|
-
return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
|
|
19626
|
-
});
|
|
19627
|
-
var oldKeys = value.columns.map(function (d) {
|
|
19628
|
-
return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
|
|
19629
|
-
});
|
|
19630
|
-
JSON.stringify(newKeys) !== JSON.stringify(oldKeys) && setInitialTableInfo();
|
|
20138
|
+
if (props === null || props === void 0 ? void 0 : props.columns) {
|
|
20139
|
+
setInitialTableInfo();
|
|
19631
20140
|
}
|
|
19632
|
-
}, [
|
|
20141
|
+
}, [columnsStructureKey]);
|
|
19633
20142
|
useEffect(function () {
|
|
19634
|
-
if (
|
|
19635
|
-
|
|
19636
|
-
return Array.isArray(d.name) ? JSON.stringify(d.name) : d.name;
|
|
19637
|
-
});
|
|
19638
|
-
var oldKeys = value.fields.map(function (d) {
|
|
19639
|
-
return Array.isArray(d.name) ? JSON.stringify(d.name) : d.name;
|
|
19640
|
-
});
|
|
19641
|
-
JSON.stringify(newKeys) !== JSON.stringify(oldKeys) && setInitialSearchFieldsInfo();
|
|
20143
|
+
if (props === null || props === void 0 ? void 0 : props.fields) {
|
|
20144
|
+
setInitialSearchFieldsInfo();
|
|
19642
20145
|
}
|
|
19643
|
-
}, [
|
|
20146
|
+
}, [fieldsStructureKey]);
|
|
19644
20147
|
useEffect(function () {
|
|
19645
20148
|
setInitialTableInfo();
|
|
19646
20149
|
}, [props === null || props === void 0 ? void 0 : props.refreshColumns]);
|
|
@@ -19883,9 +20386,15 @@ var BsSulaQueryTable = (function (props) {
|
|
|
19883
20386
|
};
|
|
19884
20387
|
var getColumns = function getColumns() {
|
|
19885
20388
|
// 优化一下 减少复杂度
|
|
19886
|
-
var
|
|
20389
|
+
var currentColumns = value.columns || [];
|
|
20390
|
+
var currentColumnKeys = new Set(currentColumns.map(function (item) {
|
|
20391
|
+
return getConfigItemKey(item, 'columns');
|
|
20392
|
+
}));
|
|
20393
|
+
var titleMap = toMapByKey(currentColumns, 'title');
|
|
19887
20394
|
// 加上排序
|
|
19888
|
-
var cols = showColumn.
|
|
20395
|
+
var cols = showColumn.filter(function (i) {
|
|
20396
|
+
return currentColumnKeys.has(getConfigItemKey(i, 'columns'));
|
|
20397
|
+
}).map(function (i) {
|
|
19889
20398
|
var _titleMap$renderToStr, _titleMap$renderToStr2;
|
|
19890
20399
|
return _objectSpread2(_objectSpread2({}, i), {}, {
|
|
19891
20400
|
isPermissionColumn: (_titleMap$renderToStr = titleMap[renderToString(i.title)]) === null || _titleMap$renderToStr === void 0 ? void 0 : _titleMap$renderToStr.isPermissionColumn,
|
|
@@ -19956,21 +20465,26 @@ var BsSulaQueryTable = (function (props) {
|
|
|
19956
20465
|
}
|
|
19957
20466
|
}) : false,
|
|
19958
20467
|
columns: _toConsumableArray(getColumns()),
|
|
19959
|
-
fields: _toConsumableArray(showSearchFields)
|
|
20468
|
+
fields: _toConsumableArray(showSearchFields.filter(function (item) {
|
|
20469
|
+
return new Set((value.fields || []).map(function (field) {
|
|
20470
|
+
return getConfigItemKey(field, 'searchFields');
|
|
20471
|
+
})).has(getConfigItemKey(item, 'searchFields'));
|
|
20472
|
+
})),
|
|
19960
20473
|
ref: props.forwardedRef || refs,
|
|
19961
20474
|
isFullScreen: isFullScreen
|
|
19962
20475
|
});
|
|
19963
20476
|
useEffect(function () {
|
|
19964
|
-
|
|
19965
|
-
|
|
19966
|
-
|
|
19967
|
-
|
|
19968
|
-
|
|
19969
|
-
|
|
19970
|
-
|
|
19971
|
-
|
|
19972
|
-
|
|
19973
|
-
|
|
20477
|
+
if (!localStorage.getItem('isTabChange') || (state === null || state === void 0 ? void 0 : state.updateCurrentPage)) {
|
|
20478
|
+
if (pagePath === pathname) {
|
|
20479
|
+
var _config$ref, _config$ref$current, _config$ref$current$t, _config$ref$current$t2;
|
|
20480
|
+
// @ts-ignore
|
|
20481
|
+
(_config$ref = config.ref) === null || _config$ref === void 0 ? void 0 : (_config$ref$current = _config$ref.current) === null || _config$ref$current === void 0 ? void 0 : (_config$ref$current$t = _config$ref$current.tableRef) === null || _config$ref$current$t === void 0 ? void 0 : (_config$ref$current$t2 = _config$ref$current$t.current) === null || _config$ref$current$t2 === void 0 ? void 0 : _config$ref$current$t2.refreshTable();
|
|
20482
|
+
}
|
|
20483
|
+
}
|
|
20484
|
+
setTimeout(function () {
|
|
20485
|
+
// 处理页面刷新两面
|
|
20486
|
+
localStorage.removeItem('isTabChange');
|
|
20487
|
+
}, 0);
|
|
19974
20488
|
}, [pathname]);
|
|
19975
20489
|
var expandedRowKeys = props === null || props === void 0 ? void 0 : (_props$expandable = props.expandable) === null || _props$expandable === void 0 ? void 0 : _props$expandable.expandedRowKeys;
|
|
19976
20490
|
//todo summary属性已经被使用,为了兼容之前的,现在使用 summaryList
|
|
@@ -20023,9 +20537,16 @@ var BsSulaQueryTable = (function (props) {
|
|
|
20023
20537
|
}
|
|
20024
20538
|
}));
|
|
20025
20539
|
}));
|
|
20026
|
-
} else {
|
|
20027
|
-
return undefined;
|
|
20028
20540
|
}
|
|
20541
|
+
// 判断summaryList 是否为reactNode
|
|
20542
|
+
if (/*#__PURE__*/React$1.isValidElement(summaryList)) {
|
|
20543
|
+
return summaryList;
|
|
20544
|
+
}
|
|
20545
|
+
// 判断summaryList 是否为函数
|
|
20546
|
+
if (Object.prototype.toString.call(summaryList) === '[object Function]') {
|
|
20547
|
+
return summaryList();
|
|
20548
|
+
}
|
|
20549
|
+
return undefined;
|
|
20029
20550
|
};
|
|
20030
20551
|
var columnsDom = /*#__PURE__*/React$1.createElement("span", {
|
|
20031
20552
|
className: "ant-dropdown-link"
|
|
@@ -34395,11 +34916,24 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
34395
34916
|
itemDetail = _this$props2$itemDeta === void 0 ? {} : _this$props2$itemDeta,
|
|
34396
34917
|
_this$props2$others = _this$props2.others,
|
|
34397
34918
|
others = _this$props2$others === void 0 ? {} : _this$props2$others,
|
|
34398
|
-
propertyCode = _this$props2.propertyCode
|
|
34919
|
+
propertyCode = _this$props2.propertyCode,
|
|
34920
|
+
isQueryParams = _this$props2.isQueryParams;
|
|
34399
34921
|
var thresholdList = _this.state.thresholdList;
|
|
34400
34922
|
var styleCommon = {
|
|
34401
34923
|
width: customerWidth || '180px'
|
|
34402
34924
|
};
|
|
34925
|
+
if (isQueryParams) {
|
|
34926
|
+
return /*#__PURE__*/React$1.createElement(Input, {
|
|
34927
|
+
defaultValue: values.join(','),
|
|
34928
|
+
disabled: disabled,
|
|
34929
|
+
style: styleCommon,
|
|
34930
|
+
onBlur: function onBlur(e) {
|
|
34931
|
+
values = e.target.value.split(',');
|
|
34932
|
+
valueNames = e.target.value.split(',');
|
|
34933
|
+
callback(values, valueNames);
|
|
34934
|
+
}
|
|
34935
|
+
});
|
|
34936
|
+
}
|
|
34403
34937
|
if (!selectOperation) return /*#__PURE__*/React$1.createElement(Input, {
|
|
34404
34938
|
disabled: true,
|
|
34405
34939
|
style: styleCommon
|
|
@@ -36052,7 +36586,7 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
36052
36586
|
});
|
|
36053
36587
|
}
|
|
36054
36588
|
}
|
|
36055
|
-
//
|
|
36589
|
+
// 库存组织选择器(与结算组织 290 对齐:不加 treeCheckStrictly,避免 labelInValue 回传结构异常导致 params 为空)
|
|
36056
36590
|
if (dataChoiceBusinessType == 280) {
|
|
36057
36591
|
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|
|
36058
36592
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
|
|
@@ -36062,7 +36596,6 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
36062
36596
|
labelInValue: true,
|
|
36063
36597
|
value: dataInputBusinessType === 12 ? values : values[0],
|
|
36064
36598
|
style: styleCommon,
|
|
36065
|
-
treeCheckStrictly: true,
|
|
36066
36599
|
onChange: function onChange(value) {
|
|
36067
36600
|
if (dataInputBusinessType === 12) {
|
|
36068
36601
|
values[0] = value.map(function (i) {
|
|
@@ -36087,7 +36620,6 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
36087
36620
|
labelInValue: true,
|
|
36088
36621
|
value: dataInputBusinessType === 12 ? values : values[0],
|
|
36089
36622
|
style: styleCommon,
|
|
36090
|
-
treeCheckStrictly: true,
|
|
36091
36623
|
onChange: function onChange(value) {
|
|
36092
36624
|
if (dataInputBusinessType === 12) {
|
|
36093
36625
|
values[1] = value.map(function (i) {
|
|
@@ -36114,7 +36646,6 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
36114
36646
|
labelInValue: true,
|
|
36115
36647
|
value: dataInputBusinessType === 12 ? values : values[0],
|
|
36116
36648
|
style: styleCommon,
|
|
36117
|
-
treeCheckStrictly: true,
|
|
36118
36649
|
onChange: function onChange(value) {
|
|
36119
36650
|
if (dataInputBusinessType === 12) {
|
|
36120
36651
|
values = value.map(function (i) {
|
|
@@ -36925,7 +37456,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
36925
37456
|
fieldValues: [],
|
|
36926
37457
|
thresholdQuery: {},
|
|
36927
37458
|
thresholdList: [],
|
|
36928
|
-
options: []
|
|
37459
|
+
options: [],
|
|
37460
|
+
isQueryParams: false
|
|
36929
37461
|
};
|
|
36930
37462
|
return _this;
|
|
36931
37463
|
}
|
|
@@ -36945,13 +37477,15 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
36945
37477
|
initialThresholdQuery = _this$props3.initialThresholdQuery,
|
|
36946
37478
|
queryIdentify = _this$props3.queryIdentify,
|
|
36947
37479
|
propertyCode = _this$props3.propertyCode,
|
|
36948
|
-
queryIdentifyType = _this$props3.queryIdentifyType
|
|
37480
|
+
queryIdentifyType = _this$props3.queryIdentifyType,
|
|
37481
|
+
isQueryParams = _this$props3.isQueryParams;
|
|
36949
37482
|
this.setState({
|
|
36950
37483
|
selectOperation: selectOperation,
|
|
36951
37484
|
thresholdQuery: initialThresholdQuery ? _objectSpread2({}, initialThresholdQuery) : {},
|
|
36952
37485
|
dataTypeCode: dataTypeCode,
|
|
36953
37486
|
dataChoiceBusinessType: dataChoiceBusinessType,
|
|
36954
37487
|
dataInputBusinessType: dataInputBusinessType,
|
|
37488
|
+
isQueryParams: isQueryParams,
|
|
36955
37489
|
others: others,
|
|
36956
37490
|
fieldValues: _toConsumableArray(values),
|
|
36957
37491
|
options: options
|
|
@@ -38158,6 +38692,18 @@ function RenderCompItem(props) {
|
|
|
38158
38692
|
}
|
|
38159
38693
|
|
|
38160
38694
|
var RangePicker$2 = DatePicker.RangePicker;
|
|
38695
|
+
var FIXED_DATA_TYPES = {
|
|
38696
|
+
10: '字符串',
|
|
38697
|
+
20: '短整数',
|
|
38698
|
+
21: '长整数',
|
|
38699
|
+
22: '小数',
|
|
38700
|
+
40: '数组',
|
|
38701
|
+
41: '布尔值',
|
|
38702
|
+
12: '富文本',
|
|
38703
|
+
30: '日期',
|
|
38704
|
+
31: '时间',
|
|
38705
|
+
32: '日期时间'
|
|
38706
|
+
};
|
|
38161
38707
|
var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
38162
38708
|
function RuleObjectComponent(props) {
|
|
38163
38709
|
var _this;
|
|
@@ -38201,6 +38747,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38201
38747
|
value: element.id,
|
|
38202
38748
|
id: element.id,
|
|
38203
38749
|
dataTypeCode: element.valueType,
|
|
38750
|
+
entityValueType: element.entityValueType,
|
|
38751
|
+
entityInputType: element.entityInputType,
|
|
38204
38752
|
dataChoiceBusinessType: element.choiceType,
|
|
38205
38753
|
dataInputBusinessType: element.inputType,
|
|
38206
38754
|
info: element.info,
|
|
@@ -38222,6 +38770,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38222
38770
|
metaObjectCode: _this.props.metaObjectCode || item.code
|
|
38223
38771
|
}, item), {}, {
|
|
38224
38772
|
dataTypeCode: item.valueType,
|
|
38773
|
+
entityValueType: item.entityValueType,
|
|
38774
|
+
entityInputType: item.entityInputType,
|
|
38225
38775
|
dataChoiceBusinessType: item.choiceType,
|
|
38226
38776
|
dataInputBusinessType: item.inputType
|
|
38227
38777
|
}));
|
|
@@ -38255,6 +38805,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38255
38805
|
value: element.id,
|
|
38256
38806
|
id: element.id,
|
|
38257
38807
|
dataTypeCode: element.valueType,
|
|
38808
|
+
entityValueType: element.entityValueType,
|
|
38809
|
+
entityInputType: element.entityInputType,
|
|
38258
38810
|
dataChoiceBusinessType: element.choiceType,
|
|
38259
38811
|
dataInputBusinessType: element.inputType,
|
|
38260
38812
|
info: element.info,
|
|
@@ -38616,7 +39168,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38616
39168
|
});
|
|
38617
39169
|
};
|
|
38618
39170
|
_this.renderRuleItem = function (itemDetail, parentDetail, floorIndex, classDataIndex, relateDatas) {
|
|
38619
|
-
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2;
|
|
39171
|
+
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2, _itemDetail$reqCondit, _itemDetail$reqCondit2, _itemDetail$reqCondit3, _itemDetail$reqCondit4;
|
|
38620
39172
|
var ruleTreeData = _this.state.ruleTreeData;
|
|
38621
39173
|
var _this$props3 = _this.props,
|
|
38622
39174
|
callBack = _this$props3.callBack,
|
|
@@ -38624,7 +39176,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38624
39176
|
initialThresholdQuery = _this$props3$initialT === void 0 ? {} : _this$props3$initialT,
|
|
38625
39177
|
disabled = _this$props3.disabled,
|
|
38626
39178
|
systemVariableList = _this$props3.systemVariableList,
|
|
38627
|
-
needShowInsertSQL = _this$props3.needShowInsertSQL
|
|
39179
|
+
needShowInsertSQL = _this$props3.needShowInsertSQL,
|
|
39180
|
+
needShowReqCondition = _this$props3.needShowReqCondition;
|
|
38628
39181
|
var thresholdQuery = _objectSpread2(_objectSpread2({}, initialThresholdQuery), relateDatas);
|
|
38629
39182
|
var finalIndex = floorIndex + 1;
|
|
38630
39183
|
var queryIdentify = '';
|
|
@@ -38715,6 +39268,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38715
39268
|
itemDetail.elementId = nodeInfo.triggerNode.props.id;
|
|
38716
39269
|
itemDetail.elementName = nodeInfo.triggerNode.props.title;
|
|
38717
39270
|
itemDetail.dataTypeCode = nodeInfo.triggerNode.props.dataTypeCode;
|
|
39271
|
+
itemDetail.entityValueType = nodeInfo.triggerNode.props.entityValueType;
|
|
39272
|
+
itemDetail.entityInputType = nodeInfo.triggerNode.props.entityInputType;
|
|
38718
39273
|
itemDetail.metaObjectCode = nodeInfo.triggerNode.props.metaObjectCode;
|
|
38719
39274
|
itemDetail.isInsertParam = false;
|
|
38720
39275
|
if (needShowInsertSQL) {
|
|
@@ -38884,12 +39439,13 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38884
39439
|
}
|
|
38885
39440
|
}, (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.isInsertSQL) ? '取消插入SQL' : '插入SQL')), /*#__PURE__*/React$1.createElement("div", {
|
|
38886
39441
|
style: {
|
|
38887
|
-
display: itemDetail.operationType == 'logic' && !disabled ? 'block' : 'none'
|
|
39442
|
+
display: itemDetail.operationType == 'logic' && (!disabled || itemDetail.reqConditionData && itemDetail.reqConditionData.reqParamName && ((_itemDetail$reqCondit = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit === void 0 ? void 0 : _itemDetail$reqCondit.length)) ? 'block' : 'none'
|
|
38888
39443
|
}
|
|
38889
39444
|
}, /*#__PURE__*/React$1.createElement("span", {
|
|
38890
39445
|
style: {
|
|
38891
39446
|
color: '#008fe0',
|
|
38892
|
-
cursor: 'pointer'
|
|
39447
|
+
cursor: 'pointer',
|
|
39448
|
+
display: disabled ? 'none' : 'inline'
|
|
38893
39449
|
},
|
|
38894
39450
|
type: "link",
|
|
38895
39451
|
onClick: function onClick() {
|
|
@@ -38901,7 +39457,119 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38901
39457
|
fontSize: '14px',
|
|
38902
39458
|
marginRight: '5px'
|
|
38903
39459
|
}
|
|
38904
|
-
}), "\u6DFB\u52A0\u6761\u4EF6")
|
|
39460
|
+
}), "\u6DFB\u52A0\u6761\u4EF6"), needShowReqCondition && /*#__PURE__*/React$1.createElement("span", {
|
|
39461
|
+
style: {
|
|
39462
|
+
marginLeft: 10,
|
|
39463
|
+
display: disabled ? 'none' : 'inline'
|
|
39464
|
+
}
|
|
39465
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
39466
|
+
type: "link",
|
|
39467
|
+
disabled: disabled && (!itemDetail.reqConditionData || !itemDetail.reqConditionData.reqParamName || !((_itemDetail$reqCondit2 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit2 === void 0 ? void 0 : _itemDetail$reqCondit2.length)),
|
|
39468
|
+
style: {
|
|
39469
|
+
padding: 0,
|
|
39470
|
+
height: 'auto'
|
|
39471
|
+
},
|
|
39472
|
+
onClick: function onClick() {
|
|
39473
|
+
return _this.handleReqConditionToggle(itemDetail);
|
|
39474
|
+
}
|
|
39475
|
+
}, itemDetail.isReqCondition ? '取消参数条件控制' : '参数条件控制')), (itemDetail.isReqCondition || disabled && itemDetail.reqConditionData && itemDetail.reqConditionData.reqParamName && ((_itemDetail$reqCondit3 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit3 === void 0 ? void 0 : _itemDetail$reqCondit3.length)) && itemDetail.reqConditionData && /*#__PURE__*/React$1.createElement("div", {
|
|
39476
|
+
style: {
|
|
39477
|
+
marginTop: 10,
|
|
39478
|
+
display: disabled && (!itemDetail.reqConditionData.reqParamName || !((_itemDetail$reqCondit4 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit4 === void 0 ? void 0 : _itemDetail$reqCondit4.length)) ? 'none' : 'flex',
|
|
39479
|
+
alignItems: 'center',
|
|
39480
|
+
background: '#f5f5f5',
|
|
39481
|
+
padding: '10px',
|
|
39482
|
+
borderRadius: '4px'
|
|
39483
|
+
}
|
|
39484
|
+
}, /*#__PURE__*/React$1.createElement(Select, {
|
|
39485
|
+
disabled: disabled,
|
|
39486
|
+
style: {
|
|
39487
|
+
width: 150,
|
|
39488
|
+
marginRight: 10
|
|
39489
|
+
},
|
|
39490
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
39491
|
+
value: String(itemDetail.reqConditionData.reqParamType || '10'),
|
|
39492
|
+
onChange: function onChange(val) {
|
|
39493
|
+
return _this.handleReqDataChange(itemDetail, 'reqParamType', val);
|
|
39494
|
+
}
|
|
39495
|
+
}, /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
39496
|
+
value: "10"
|
|
39497
|
+
}, "\u8BF7\u6C42\u53C2\u6570\u540D\u79F0"), /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
39498
|
+
value: "20"
|
|
39499
|
+
}, "\u8BF7\u6C42\u5934\u53C2\u6570\u540D\u79F0"), /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
39500
|
+
value: "40"
|
|
39501
|
+
}, "\u6E90\u8BF7\u6C42\u5730\u5740")), String(itemDetail.reqConditionData.reqParamType || '10') !== '40' && /*#__PURE__*/React$1.createElement(Input, {
|
|
39502
|
+
disabled: disabled,
|
|
39503
|
+
style: {
|
|
39504
|
+
width: 150,
|
|
39505
|
+
marginRight: 10
|
|
39506
|
+
},
|
|
39507
|
+
value: itemDetail.reqConditionData.reqParamName,
|
|
39508
|
+
onChange: function onChange(e) {
|
|
39509
|
+
return _this.handleReqDataChange(itemDetail, 'reqParamName', e.target.value);
|
|
39510
|
+
}
|
|
39511
|
+
}), /*#__PURE__*/React$1.createElement("span", {
|
|
39512
|
+
style: {
|
|
39513
|
+
marginRight: 8,
|
|
39514
|
+
flexShrink: 0
|
|
39515
|
+
}
|
|
39516
|
+
}, "\u7C7B\u578B:"), /*#__PURE__*/React$1.createElement(Select, {
|
|
39517
|
+
disabled: disabled,
|
|
39518
|
+
style: {
|
|
39519
|
+
width: 120,
|
|
39520
|
+
marginRight: 10
|
|
39521
|
+
},
|
|
39522
|
+
value: itemDetail.reqConditionData.dataTypeCode,
|
|
39523
|
+
onChange: function onChange(val) {
|
|
39524
|
+
return _this.handleReqDataChange(itemDetail, 'dataTypeCode', val);
|
|
39525
|
+
}
|
|
39526
|
+
}, Object.keys(FIXED_DATA_TYPES).map(function (code) {
|
|
39527
|
+
return /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
39528
|
+
key: code,
|
|
39529
|
+
value: code
|
|
39530
|
+
}, FIXED_DATA_TYPES[code]);
|
|
39531
|
+
})), /*#__PURE__*/React$1.createElement(Select, {
|
|
39532
|
+
disabled: disabled,
|
|
39533
|
+
style: {
|
|
39534
|
+
width: 120,
|
|
39535
|
+
marginRight: 10
|
|
39536
|
+
},
|
|
39537
|
+
value: itemDetail.reqConditionData.operationCode,
|
|
39538
|
+
onChange: function onChange(val) {
|
|
39539
|
+
return _this.handleReqDataChange(itemDetail, 'operationCode', val);
|
|
39540
|
+
}
|
|
39541
|
+
}, [{
|
|
39542
|
+
'code': '1',
|
|
39543
|
+
'name': '在集合'
|
|
39544
|
+
}, {
|
|
39545
|
+
'code': '2',
|
|
39546
|
+
'name': '不等于'
|
|
39547
|
+
}, {
|
|
39548
|
+
code: '3',
|
|
39549
|
+
name: '小于'
|
|
39550
|
+
}, {
|
|
39551
|
+
code: '4',
|
|
39552
|
+
name: '大于'
|
|
39553
|
+
}, {
|
|
39554
|
+
code: '5',
|
|
39555
|
+
name: '等于'
|
|
39556
|
+
}].map(function (op) {
|
|
39557
|
+
return /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
39558
|
+
key: op.code,
|
|
39559
|
+
value: op.code
|
|
39560
|
+
}, op.name);
|
|
39561
|
+
})), /*#__PURE__*/React$1.createElement(RuleField, {
|
|
39562
|
+
customerWidth: '180px',
|
|
39563
|
+
isQueryParams: true,
|
|
39564
|
+
selectOperation: itemDetail.reqConditionData.operationCode,
|
|
39565
|
+
dataTypeCode: itemDetail.reqConditionData.dataTypeCode,
|
|
39566
|
+
values: itemDetail.reqConditionData.params || [],
|
|
39567
|
+
valueNames: itemDetail.reqConditionData.paramNames || [],
|
|
39568
|
+
callback: function callback(newValues, newValueNames) {
|
|
39569
|
+
return _this.handleReqDataChange(itemDetail, 'params', newValues, newValueNames);
|
|
39570
|
+
},
|
|
39571
|
+
disabled: disabled
|
|
39572
|
+
})))));
|
|
38905
39573
|
};
|
|
38906
39574
|
_this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex, key) {
|
|
38907
39575
|
var ruleClassData = _this.state.ruleClassData;
|
|
@@ -39217,6 +39885,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39217
39885
|
delete itemDetail.params;
|
|
39218
39886
|
delete itemDetail.paramNames;
|
|
39219
39887
|
delete itemDetail.dataTypeCode;
|
|
39888
|
+
delete itemDetail.entityValueType;
|
|
39889
|
+
delete itemDetail.entityInputType;
|
|
39220
39890
|
delete itemDetail.elementId;
|
|
39221
39891
|
delete itemDetail.elementName;
|
|
39222
39892
|
delete itemDetail.metaObjectCode;
|
|
@@ -39267,6 +39937,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39267
39937
|
parentDetail.elementId = parentDetail.subExpression[0].elementId;
|
|
39268
39938
|
parentDetail.elementName = parentDetail.subExpression[0].elementName;
|
|
39269
39939
|
parentDetail.dataTypeCode = parentDetail.subExpression[0].dataTypeCode;
|
|
39940
|
+
parentDetail.entityValueType = parentDetail.subExpression[0].entityValueType;
|
|
39941
|
+
parentDetail.entityInputType = parentDetail.subExpression[0].entityInputType;
|
|
39270
39942
|
delete parentDetail.subExpression;
|
|
39271
39943
|
}
|
|
39272
39944
|
}
|
|
@@ -39340,6 +40012,57 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39340
40012
|
callBack(ruleClassData);
|
|
39341
40013
|
});
|
|
39342
40014
|
};
|
|
40015
|
+
_this.handleReqConditionToggle = function (itemDetail) {
|
|
40016
|
+
var ruleClassData = _this.state.ruleClassData;
|
|
40017
|
+
var callBack = _this.props.callBack;
|
|
40018
|
+
itemDetail.isReqCondition = !itemDetail.isReqCondition;
|
|
40019
|
+
if (itemDetail.isReqCondition && !itemDetail.reqConditionData) {
|
|
40020
|
+
itemDetail.reqConditionData = {
|
|
40021
|
+
operationType: 'relation',
|
|
40022
|
+
dataTypeCode: '10',
|
|
40023
|
+
entityInputType: '10',
|
|
40024
|
+
entityValueType: '10',
|
|
40025
|
+
operationCode: '',
|
|
40026
|
+
reqParamName: '',
|
|
40027
|
+
params: [],
|
|
40028
|
+
paramNames: []
|
|
40029
|
+
};
|
|
40030
|
+
}
|
|
40031
|
+
_this.setState({
|
|
40032
|
+
ruleClassData: ruleClassData
|
|
40033
|
+
}, function () {
|
|
40034
|
+
callBack(ruleClassData);
|
|
40035
|
+
});
|
|
40036
|
+
};
|
|
40037
|
+
_this.handleReqDataChange = function (itemDetail, field, value, valueNames) {
|
|
40038
|
+
var ruleClassData = _this.state.ruleClassData;
|
|
40039
|
+
var callBack = _this.props.callBack;
|
|
40040
|
+
if (!itemDetail.reqConditionData) return;
|
|
40041
|
+
if (field === 'dataTypeCode') {
|
|
40042
|
+
itemDetail.reqConditionData.dataTypeCode = value;
|
|
40043
|
+
itemDetail.reqConditionData.entityInputType = value;
|
|
40044
|
+
itemDetail.reqConditionData.entityValueType = value;
|
|
40045
|
+
itemDetail.reqConditionData.operationCode = '';
|
|
40046
|
+
itemDetail.reqConditionData.params = [];
|
|
40047
|
+
itemDetail.reqConditionData.paramNames = [];
|
|
40048
|
+
} else if (field === 'operationCode') {
|
|
40049
|
+
itemDetail.reqConditionData.operationCode = value;
|
|
40050
|
+
} else if (field === 'reqParamName') {
|
|
40051
|
+
itemDetail.reqConditionData.reqParamName = value;
|
|
40052
|
+
} else if (field === 'params') {
|
|
40053
|
+
itemDetail.reqConditionData.params = value;
|
|
40054
|
+
if (valueNames) {
|
|
40055
|
+
itemDetail.reqConditionData.paramNames = valueNames;
|
|
40056
|
+
}
|
|
40057
|
+
} else if (field === 'reqParamType') {
|
|
40058
|
+
itemDetail.reqConditionData.reqParamType = value;
|
|
40059
|
+
}
|
|
40060
|
+
_this.setState({
|
|
40061
|
+
ruleClassData: ruleClassData
|
|
40062
|
+
}, function () {
|
|
40063
|
+
callBack(ruleClassData);
|
|
40064
|
+
});
|
|
40065
|
+
};
|
|
39343
40066
|
_this.state = {
|
|
39344
40067
|
editNameIndex: 0,
|
|
39345
40068
|
isEdit: false,
|