@bit-sun/business-component 4.2.1-alpha.5-aiwei → 4.2.1-alpha.7-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
CHANGED
|
@@ -2,7 +2,7 @@ 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';
|
|
@@ -5514,12 +5514,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5514
5514
|
_useState44 = _slicedToArray(_useState43, 2),
|
|
5515
5515
|
modalSearched = _useState44[0],
|
|
5516
5516
|
setModalSearched = _useState44[1];
|
|
5517
|
-
var _useState45 = useState(undefined),
|
|
5518
|
-
_useState46 = _slicedToArray(_useState45, 2),
|
|
5519
|
-
overScrollY = _useState46[0],
|
|
5520
|
-
setOverScrollY = _useState46[1];
|
|
5521
|
-
var topFormRef = useRef(null);
|
|
5522
|
-
var bottomWrapRef = useRef(null);
|
|
5523
5517
|
var setSelectDataSource = function setSelectDataSource(list, total) {
|
|
5524
5518
|
setItems(list);
|
|
5525
5519
|
setItemsTotal(total);
|
|
@@ -5755,9 +5749,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5755
5749
|
setSearchValue('');
|
|
5756
5750
|
setModalSearched(false);
|
|
5757
5751
|
setIsModalVisible(true);
|
|
5758
|
-
setTimeout(function () {
|
|
5759
|
-
return computeScrollY();
|
|
5760
|
-
}, 0);
|
|
5761
5752
|
// 回显
|
|
5762
5753
|
if (value) {
|
|
5763
5754
|
if (selectMode) {
|
|
@@ -5874,7 +5865,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5874
5865
|
var handleCancel = function handleCancel() {
|
|
5875
5866
|
clearModalTable();
|
|
5876
5867
|
setIsModalVisible(false);
|
|
5877
|
-
setOverScrollY(undefined);
|
|
5878
5868
|
};
|
|
5879
5869
|
var refreshItems = function refreshItems() {
|
|
5880
5870
|
// 查看是否存在关联值 如果有关联值 就查询 没有就不能查询
|
|
@@ -5912,9 +5902,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5912
5902
|
};
|
|
5913
5903
|
var toggleCollapsed = function toggleCollapsed() {
|
|
5914
5904
|
setCollapsed(!collapsed);
|
|
5915
|
-
setTimeout(function () {
|
|
5916
|
-
return computeScrollY();
|
|
5917
|
-
}, 0);
|
|
5918
5905
|
};
|
|
5919
5906
|
var handleTableChange = function handleTableChange(pagination) {
|
|
5920
5907
|
getData(_objectSpread2(_objectSpread2({}, tableFormParams), {}, {
|
|
@@ -6193,13 +6180,32 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6193
6180
|
});
|
|
6194
6181
|
};
|
|
6195
6182
|
var renderShowTable = function renderShowTable(tableList, type) {
|
|
6196
|
-
var
|
|
6197
|
-
var
|
|
6198
|
-
var
|
|
6183
|
+
var _modalTableProps$tabl;
|
|
6184
|
+
var viCount = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.visibleFieldsCount) || defaultVisibleFieldsCount;
|
|
6185
|
+
var canExpand = hasMoreQueryFields(modalTableProps);
|
|
6186
|
+
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);
|
|
6187
|
+
var baseHeight = getTableHeigth(collapsedList);
|
|
6188
|
+
var rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan).totalRows;
|
|
6189
|
+
var rowsExpandedData = getFormRowInfo(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan);
|
|
6190
|
+
var rowsExpanded = rowsExpandedData.totalRows;
|
|
6191
|
+
var isMoreAction = false;
|
|
6192
|
+
if (24 / (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan) - rowsExpandedData.emptyArray.length === 1) {
|
|
6193
|
+
rowsExpanded++;
|
|
6194
|
+
isMoreAction = true;
|
|
6195
|
+
}
|
|
6196
|
+
var extraRows = !collapsed && canExpand ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
|
|
6197
|
+
var tableBoxHeighth = baseHeight;
|
|
6198
|
+
if (isMoreAction && extraRows > 0) {
|
|
6199
|
+
tableBoxHeighth = tableBoxHeighth + (extraRows - 1 ? extraRows - 1 : 0) * 34 + 32;
|
|
6200
|
+
} else {
|
|
6201
|
+
tableBoxHeighth = tableBoxHeighth + extraRows * 34;
|
|
6202
|
+
}
|
|
6203
|
+
var x = (tableList === null || tableList === void 0 ? void 0 : tableList.length) ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
|
|
6204
|
+
var oSY = "calc(100vh - ".concat(tableBoxHeighth, "px - ").concat(x, "px)");
|
|
6199
6205
|
var mTB = "calc(50vh - ".concat(tableBoxHeighth / 2, "px - ").concat(x / 2, "px - 40px)");
|
|
6200
6206
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
6201
6207
|
style: {
|
|
6202
|
-
height:
|
|
6208
|
+
height: "calc(100vh - ".concat(tableBoxHeighth, "px)")
|
|
6203
6209
|
}
|
|
6204
6210
|
}, /*#__PURE__*/React$1.createElement(Table, _objectSpread2(_objectSpread2({
|
|
6205
6211
|
bordered: true,
|
|
@@ -6478,8 +6484,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6478
6484
|
}, (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalProps) || {}), /*#__PURE__*/React$1.createElement("div", {
|
|
6479
6485
|
className: 'search_select_wrapper'
|
|
6480
6486
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
6481
|
-
className: 'search_select_wrapper_topForm'
|
|
6482
|
-
ref: topFormRef
|
|
6487
|
+
className: 'search_select_wrapper_topForm'
|
|
6483
6488
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
6484
6489
|
className: 'select_list_columns'
|
|
6485
6490
|
}, /*#__PURE__*/React$1.createElement(Form, {
|
|
@@ -6516,8 +6521,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6516
6521
|
},
|
|
6517
6522
|
src: zhankaitiaojian
|
|
6518
6523
|
}) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null)))))))), /*#__PURE__*/React$1.createElement("div", {
|
|
6519
|
-
className: 'search_select_wrapper_bottomTable'
|
|
6520
|
-
ref: bottomWrapRef
|
|
6524
|
+
className: 'search_select_wrapper_bottomTable'
|
|
6521
6525
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
6522
6526
|
className: selectMode ? 'search_select_wrapper_bottomTable_wrapLeft2' : 'search_select_wrapper_bottomTable_wrapLeft1'
|
|
6523
6527
|
}, /*#__PURE__*/React$1.createElement(Tabs, {
|
|
@@ -6533,32 +6537,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6533
6537
|
}, "\u6E05\u7A7A\u5DF2\u9009")
|
|
6534
6538
|
})) : null)))));
|
|
6535
6539
|
});
|
|
6536
|
-
var computeScrollY = function computeScrollY() {
|
|
6537
|
-
try {
|
|
6538
|
-
var _topFormRef$current, _bottomWrapRef$curren;
|
|
6539
|
-
var bodyEl = document.querySelector('.search_select_modal_wrapper .ant-modal-body');
|
|
6540
|
-
var bodyH = (bodyEl === null || bodyEl === void 0 ? void 0 : bodyEl.clientHeight) || 0;
|
|
6541
|
-
var topH = ((_topFormRef$current = topFormRef.current) === null || _topFormRef$current === void 0 ? void 0 : _topFormRef$current.clientHeight) || 0;
|
|
6542
|
-
var navEl = (_bottomWrapRef$curren = bottomWrapRef.current) === null || _bottomWrapRef$curren === void 0 ? void 0 : _bottomWrapRef$curren.querySelector('.ant-tabs-nav');
|
|
6543
|
-
var navH = (navEl === null || navEl === void 0 ? void 0 : navEl.offsetHeight) || 0;
|
|
6544
|
-
var extra = 30; // paddings/margins buffer
|
|
6545
|
-
var tableH = Math.max(160, bodyH - topH - navH - extra);
|
|
6546
|
-
setOverScrollY(tableH);
|
|
6547
|
-
} catch (e) {
|
|
6548
|
-
// ignore
|
|
6549
|
-
}
|
|
6550
|
-
};
|
|
6551
|
-
useEffect(function () {
|
|
6552
|
-
if (!isModalVisible) return;
|
|
6553
|
-
computeScrollY();
|
|
6554
|
-
var onResize = function onResize() {
|
|
6555
|
-
return computeScrollY();
|
|
6556
|
-
};
|
|
6557
|
-
window.addEventListener('resize', onResize);
|
|
6558
|
-
return function () {
|
|
6559
|
-
window.removeEventListener('resize', onResize);
|
|
6560
|
-
};
|
|
6561
|
-
}, [isModalVisible, collapsed, tableData, tablePagination]);
|
|
6562
6540
|
|
|
6563
6541
|
var css_248z$8 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_quick_header {\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.add_select_quick_header_title {\n display: flex;\n justify-content: space-between;\n}\n.add_select_quick_header > span {\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 20px;\n}\n.add_select_quick_header > span > span {\n color: #ff0000;\n}\n.add_select_quick_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input,\n.add_select_wrapper_select .ant-input {\n height: auto;\n height: 22px;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select-selection-search-input {\n height: auto;\n height: 22px !important;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select .ant-select-arrow {\n top: 13px;\n}\n.add_select_wrapper_select .ant-select-selector {\n position: relative;\n top: 1px;\n height: 23px !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-select-selector .ant-select-selection-item,\n.add_select_wrapper_select .ant-select-selector ant-select-selection-search {\n height: 23px !important;\n line-height: 23px !important;\n font-size: 12px;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper_select_quick {\n margin: 0;\n}\n.react-resizable {\n position: relative;\n background-clip: padding-box;\n}\n.react-resizable-handle {\n position: absolute;\n width: 10px;\n height: 100%;\n bottom: 0;\n right: -5px;\n cursor: col-resize;\n z-index: 1;\n}\n";
|
|
6564
6542
|
styleInject(css_248z$8);
|
|
@@ -12412,24 +12390,100 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12412
12390
|
}
|
|
12413
12391
|
}, {
|
|
12414
12392
|
name: 'qp-manageSupervisor-like',
|
|
12393
|
+
type: 'select',
|
|
12415
12394
|
label: '管理督导',
|
|
12416
|
-
|
|
12395
|
+
field: {
|
|
12396
|
+
type: 'select',
|
|
12397
|
+
props: {
|
|
12398
|
+
notFoundContent: '暂无数据',
|
|
12399
|
+
allowClear: true,
|
|
12400
|
+
showSearch: true,
|
|
12401
|
+
showArrow: true,
|
|
12402
|
+
maxTagCount: 1,
|
|
12403
|
+
optionFilterProp: 'children',
|
|
12404
|
+
filterOption: function filterOption(input, option) {
|
|
12405
|
+
var _option$value;
|
|
12406
|
+
debugger;
|
|
12407
|
+
return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
|
|
12408
|
+
}
|
|
12409
|
+
}
|
|
12410
|
+
}
|
|
12417
12411
|
}, {
|
|
12418
12412
|
name: 'qp-directSupervisor-like',
|
|
12413
|
+
type: 'select',
|
|
12419
12414
|
label: '直接督导',
|
|
12420
|
-
|
|
12415
|
+
field: {
|
|
12416
|
+
type: 'select',
|
|
12417
|
+
props: {
|
|
12418
|
+
notFoundContent: '暂无数据',
|
|
12419
|
+
allowClear: true,
|
|
12420
|
+
showSearch: true,
|
|
12421
|
+
showArrow: true,
|
|
12422
|
+
maxTagCount: 1,
|
|
12423
|
+
optionFilterProp: 'children',
|
|
12424
|
+
filterOption: function filterOption(input, option) {
|
|
12425
|
+
var _option$value2;
|
|
12426
|
+
return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
|
|
12427
|
+
}
|
|
12428
|
+
}
|
|
12429
|
+
}
|
|
12421
12430
|
}, {
|
|
12422
12431
|
name: 'qp-distributionItem-like',
|
|
12432
|
+
type: 'select',
|
|
12423
12433
|
label: '分销商品',
|
|
12424
|
-
|
|
12434
|
+
field: {
|
|
12435
|
+
type: 'select',
|
|
12436
|
+
props: {
|
|
12437
|
+
notFoundContent: '暂无数据',
|
|
12438
|
+
allowClear: true,
|
|
12439
|
+
showSearch: true,
|
|
12440
|
+
showArrow: true,
|
|
12441
|
+
maxTagCount: 1,
|
|
12442
|
+
optionFilterProp: 'children',
|
|
12443
|
+
filterOption: function filterOption(input, option) {
|
|
12444
|
+
var _option$value3;
|
|
12445
|
+
return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
|
|
12446
|
+
}
|
|
12447
|
+
}
|
|
12448
|
+
}
|
|
12425
12449
|
}, {
|
|
12426
12450
|
name: 'qp-headItem-like',
|
|
12451
|
+
type: 'select',
|
|
12427
12452
|
label: '总部商品',
|
|
12428
|
-
|
|
12453
|
+
field: {
|
|
12454
|
+
type: 'select',
|
|
12455
|
+
props: {
|
|
12456
|
+
notFoundContent: '暂无数据',
|
|
12457
|
+
allowClear: true,
|
|
12458
|
+
showSearch: true,
|
|
12459
|
+
showArrow: true,
|
|
12460
|
+
maxTagCount: 1,
|
|
12461
|
+
optionFilterProp: 'children',
|
|
12462
|
+
filterOption: function filterOption(input, option) {
|
|
12463
|
+
var _option$value4;
|
|
12464
|
+
return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
|
|
12465
|
+
}
|
|
12466
|
+
}
|
|
12467
|
+
}
|
|
12429
12468
|
}, {
|
|
12430
12469
|
name: 'qp-storeChannelName-like',
|
|
12470
|
+
type: 'select',
|
|
12431
12471
|
label: '管理模式',
|
|
12432
|
-
|
|
12472
|
+
field: {
|
|
12473
|
+
type: 'select',
|
|
12474
|
+
props: {
|
|
12475
|
+
notFoundContent: '暂无数据',
|
|
12476
|
+
allowClear: true,
|
|
12477
|
+
showSearch: true,
|
|
12478
|
+
showArrow: true,
|
|
12479
|
+
maxTagCount: 1,
|
|
12480
|
+
optionFilterProp: 'children',
|
|
12481
|
+
filterOption: function filterOption(input, option) {
|
|
12482
|
+
var _option$value5;
|
|
12483
|
+
return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
|
|
12484
|
+
}
|
|
12485
|
+
}
|
|
12486
|
+
}
|
|
12433
12487
|
}];
|
|
12434
12488
|
var _queryHeaderParams10 = getQueryHeadersList({
|
|
12435
12489
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -12449,8 +12503,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12449
12503
|
pageSize: 5000,
|
|
12450
12504
|
currentPage: 1,
|
|
12451
12505
|
'ctl-withAuth': true
|
|
12452
|
-
}, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth'))]).then(function (x) {
|
|
12453
|
-
var _x$3, _x$3$data$, _x$3$data$$channelInf;
|
|
12506
|
+
}, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth')), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in'))]).then(function (x) {
|
|
12507
|
+
var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
|
|
12454
12508
|
var newData1 = [];
|
|
12455
12509
|
(_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) {
|
|
12456
12510
|
newData1.push({
|
|
@@ -12469,6 +12523,46 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12469
12523
|
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
12470
12524
|
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
|
|
12471
12525
|
formatSource(x, 3, 7, tableSearchForm, ['brandCode', 'name']);
|
|
12526
|
+
var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
|
|
12527
|
+
// 新增label属性
|
|
12528
|
+
(_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
|
|
12529
|
+
r.label = r === null || r === void 0 ? void 0 : r.value;
|
|
12530
|
+
});
|
|
12531
|
+
var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
|
|
12532
|
+
if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
|
|
12533
|
+
opList = opList[0];
|
|
12534
|
+
}
|
|
12535
|
+
var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
|
|
12536
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12537
|
+
});
|
|
12538
|
+
var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
|
|
12539
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12540
|
+
});
|
|
12541
|
+
var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
|
|
12542
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12543
|
+
});
|
|
12544
|
+
debugger;
|
|
12545
|
+
var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
|
|
12546
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12547
|
+
});
|
|
12548
|
+
var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
|
|
12549
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12550
|
+
});
|
|
12551
|
+
tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
|
|
12552
|
+
initialSource: m1
|
|
12553
|
+
});
|
|
12554
|
+
tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
|
|
12555
|
+
initialSource: m2
|
|
12556
|
+
});
|
|
12557
|
+
tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
|
|
12558
|
+
initialSource: m3
|
|
12559
|
+
});
|
|
12560
|
+
tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
|
|
12561
|
+
initialSource: m4
|
|
12562
|
+
});
|
|
12563
|
+
tableSearchForm[12] = _objectSpread2(_objectSpread2({}, tableSearchForm[12]), {}, {
|
|
12564
|
+
initialSource: m5
|
|
12565
|
+
});
|
|
12472
12566
|
});
|
|
12473
12567
|
modalTableProps = _objectSpread2({
|
|
12474
12568
|
modalTableTitle: '选择商店',
|
package/dist/index.js
CHANGED
|
@@ -4825,7 +4825,7 @@ function ToCDB$1(selectStr) {
|
|
|
4825
4825
|
return tmp;
|
|
4826
4826
|
}
|
|
4827
4827
|
|
|
4828
|
-
var css_248z$6 = ".search_select .ant-select-selector {\n height: 24px;\n overflow: hidden;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow {\n height: 40px;\n flex-wrap: nowrap;\n overflow-x: auto;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow-item {\n align-self: auto;\n}\n.search_select_show {\n display: flex;\n}\n.search_select_show .ant-select-dropdown {\n top: 24px !important;\n width: calc(141%) !important;\n}\n.search_select_show .ant-select-clear {\n right: 33px;\n}\n.search_select_show .ant-select-multiple.ant-select-show-arrow .ant-select-selector,\n.search_select_show .ant-select-multiple.ant-select-allow-clear .ant-select-selector {\n padding-right: 28px;\n}\n.search_select_show.search_select_show_list .ant-select-dropdown {\n top: 24px !important;\n width: calc(100% + 110px) !important;\n}\n.search_select_expand_button {\n position: relative;\n right: -11px;\n width: 30px;\n border-left: 1px solid #d9d9d9;\n height: 24px;\n cursor: pointer;\n font-size: 14px;\n font-weight: bolder;\n}\n.search_select_expand_button span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.search_select_expand_button:hover {\n background-color: #005cff;\n color: #fff;\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.search_select_expand_button_disabled:hover {\n background-color: transparent;\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table {\n font-family: MiSans-Regular;\n font-weight: 400;\n font-size: 12px;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table thead > tr > th {\n color: #7F7F7F;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table tbody > tr > td {\n color: #333333;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column {\n visibility: hidden;\n padding: 0;\n margin: 0;\n width: 0;\n height: 0;\n min-width: 0;\n min-height: 0;\n border: none;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column .ant-radio-wrapper,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column .ant-radio-wrapper {\n display: none;\n}\n.search_select_modal_wrapper .ant-modal {\n top: 60px;\n}\n.search_select_modal_wrapper .ant-modal-header {\n padding: 6px 0px 6px 16px;\n}\n.search_select_modal_wrapper .ant-modal-header .ant-modal-title {\n height: 20px;\n color: #000000;\n line-height: 20px;\n}\n.search_select_modal_wrapper .ant-modal-close-x {\n width: 32px;\n height: 32px;\n line-height: 32px;\n}\n.search_select_modal_wrapper .ant-modal-body {\n padding: 0px;\n background: #F3F3F3;\n height: calc(100vh - 235px);\n overflow:
|
|
4828
|
+
var css_248z$6 = ".search_select .ant-select-selector {\n height: 24px;\n overflow: hidden;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow {\n height: 40px;\n flex-wrap: nowrap;\n overflow-x: auto;\n}\n.search_select .ant-select-selector .ant-select-selection-overflow-item {\n align-self: auto;\n}\n.search_select_show {\n display: flex;\n}\n.search_select_show .ant-select-dropdown {\n top: 24px !important;\n width: calc(141%) !important;\n}\n.search_select_show .ant-select-clear {\n right: 33px;\n}\n.search_select_show .ant-select-multiple.ant-select-show-arrow .ant-select-selector,\n.search_select_show .ant-select-multiple.ant-select-allow-clear .ant-select-selector {\n padding-right: 28px;\n}\n.search_select_show.search_select_show_list .ant-select-dropdown {\n top: 24px !important;\n width: calc(100% + 110px) !important;\n}\n.search_select_expand_button {\n position: relative;\n right: -11px;\n width: 30px;\n border-left: 1px solid #d9d9d9;\n height: 24px;\n cursor: pointer;\n font-size: 14px;\n font-weight: bolder;\n}\n.search_select_expand_button span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.search_select_expand_button:hover {\n background-color: #005cff;\n color: #fff;\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.search_select_expand_button_disabled:hover {\n background-color: transparent;\n color: rgba(0, 0, 0, 0.25);\n cursor: not-allowed;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table {\n font-family: MiSans-Regular;\n font-weight: 400;\n font-size: 12px;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table thead > tr > th {\n color: #7F7F7F;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_dropdown_table .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table tbody > tr > td {\n color: #333333;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column {\n visibility: hidden;\n padding: 0;\n margin: 0;\n width: 0;\n height: 0;\n min-width: 0;\n min-height: 0;\n border: none;\n}\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-body > table > tbody > tr > td.ant-table-selection-column .ant-radio-wrapper,\n.search_select_dropdown_table1 .ant-table.ant-table-bordered > .ant-table-container .ant-table-header > table > thead > tr > th.ant-table-selection-column .ant-radio-wrapper {\n display: none;\n}\n.search_select_modal_wrapper .ant-modal {\n top: 60px;\n}\n.search_select_modal_wrapper .ant-modal-header {\n padding: 6px 0px 6px 16px;\n}\n.search_select_modal_wrapper .ant-modal-header .ant-modal-title {\n height: 20px;\n color: #000000;\n line-height: 20px;\n}\n.search_select_modal_wrapper .ant-modal-close-x {\n width: 32px;\n height: 32px;\n line-height: 32px;\n}\n.search_select_modal_wrapper .ant-modal-body {\n padding: 0px;\n background: #F3F3F3;\n height: calc(100vh - 235px);\n overflow: hidden;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn.ant-btn-default {\n color: #005cff;\n border-color: #005cff;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary,\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary[disabled] {\n background: #005cff;\n border-color: #005cff;\n}\n.search_select_modal_wrapper .ant-modal-footer .ant-btn-primary[disabled] {\n opacity: 0.5;\n color: #fff;\n}\n.search_select_wrapper {\n position: relative;\n font-size: 14px;\n}\n.search_select_wrapper_topForm .select_list_columns {\n width: 100%;\n padding: 10px 6px 2px 16px;\n background-color: #fff;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form {\n padding: 0;\n display: flex;\n align-items: flex-start;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item,\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-col .ant-space {\n font-size: 12px !important;\n margin-right: 0px !important;\n margin-bottom: 8px !important;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row.ant-form-item-row {\n background-color: #fafafa;\n border: 0.8px solid #D9D9D9;\n border-radius: 2px;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row {\n width: 100%;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-label {\n width: 110px;\n order: 1;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-label label {\n width: 100%;\n text-align: left;\n padding: 0 10px;\n color: #333333;\n font-size: 12px;\n font-family: PingFangSC-Regular;\n font-weight: 400;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control {\n order: 2;\n width: 100px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-input-affix-wrapper {\n border: 0;\n font-size: 12px;\n background-color: #fafafa;\n padding: 0 11px;\n height: 24px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-input-affix-wrapper .ant-input {\n background-color: #fafafa !important;\n border: 0;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .ant-select-selector {\n border: 0 !important;\n background-color: #fafafa !important;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-row .ant-form-item-control .query_input .ant-input {\n background-color: #fafafa !important;\n border: 0;\n font-size: 12px;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form .ant-btn-primary {\n background: #005cff;\n}\n.search_select_wrapper_topForm .select_list_columns .ant-form > .ant-row > .ant-col {\n order: 2;\n padding-right: 10px;\n}\n.search_select_wrapper_topForm .select_list_button_space {\n margin-right: 10px;\n}\n.search_select_wrapper_bottomTable {\n margin: 10px;\n display: flex;\n justify-content: space-between;\n}\n.search_select_wrapper_bottomTable_wrapLeft1,\n.search_select_wrapper_bottomTable_wrapLeft2,\n.search_select_wrapper_bottomTable_wrapRight {\n background: #fff;\n width: calc(50% - 5px);\n}\n.search_select_wrapper_bottomTable_wrapLeft1 .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper,\n.search_select_wrapper_bottomTable_wrapLeft2 .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper,\n.search_select_wrapper_bottomTable_wrapRight .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_wrapper_bottomTable_wrapLeft1 {\n width: 100%;\n}\n.search_select_wrapper_bottomTable_wrapRight {\n margin-left: 10px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav {\n margin: 0;\n padding: 6px 18.5px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-nav-wrap {\n height: 28px;\n font-size: 14px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-tab {\n padding: 4px 0;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-ink-bar {\n left: 3px !important;\n width: 40px !important;\n background: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-tabs-nav .ant-tabs-extra-content > span {\n color: #005cff;\n cursor: pointer;\n}\n.search_select_wrapper_bottomTable .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder {\n padding: 10px 10px 7px;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table-thead > tr > th {\n color: #7F7F7F;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table-thead .ant-table-selection .ant-checkbox-wrapper {\n justify-content: center;\n}\n.search_select_wrapper_bottomTable .ant-tabs-content-holder .ant-tabs-content .ant-table-wrapper .ant-table .ant-table-container .ant-table-content .ant-table.ant-table-small .ant-table-tbody > tr > td {\n color: #333333;\n}\n.search_select_wrapper_bottomTable .ant-checkbox-checked .ant-checkbox-inner {\n color: #005cff;\n background: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-pagination-item-active a {\n color: #005cff;\n}\n.search_select_wrapper_bottomTable .ant-pagination-item-active {\n border-color: #005cff;\n}\n.searchSelectSpin > div {\n height: 300px !important;\n}\n.searchSelectMaxTagToolTip .ant-tooltip-inner {\n max-height: 72px;\n overflow-x: auto;\n padding: 0px;\n}\n";
|
|
4829
4829
|
styleInject(css_248z$6);
|
|
4830
4830
|
|
|
4831
4831
|
var zhankaitiaojian = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3Ezhankaitiaojian-icon%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Crect%20id%3D%22path-1%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2224%22%20height%3D%2224%22%3E%3C%2Frect%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22%E9%A1%B5%E9%9D%A2-1%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22icon%22%20transform%3D%22translate%28-702.000000%2C%20-498.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22zhankaitiaojian-icon%22%20transform%3D%22translate%28702.000000%2C%20498.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmask%20id%3D%22mask-2%22%20fill%3D%22white%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fmask%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20id%3D%22%E8%92%99%E7%89%88%22%20fill%3D%22%23D8D8D8%22%20opacity%3D%220%22%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0142082%2C6%20L18%2C11.9972435%20L12.0142082%2C18%20L11.04209%2C17.0260337%20L16.0562218%2C11.9972435%20L11.04209%2C6.97396631%20L12.0142082%2C6%20Z%20M6.97257658%2C6%20L12.9583683%2C11.9972435%20L6.97257658%2C18%20L6.00091666%2C17.0260337%20L11.0150485%2C11.9972435%20L6%2C6.97396631%20L6.97257658%2C6%20Z%22%20id%3D%22%E5%BD%A2%E7%8A%B6%22%20fill%3D%22%23005CFF%22%20fill-rule%3D%22nonzero%22%20mask%3D%22url%28%23mask-2%29%22%20transform%3D%22translate%2812.000000%2C%2012.000000%29%20rotate%28-270.000000%29%20translate%28-12.000000%2C%20-12.000000%29%20%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
@@ -6203,7 +6203,26 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
6203
6203
|
});
|
|
6204
6204
|
};
|
|
6205
6205
|
var renderShowTable = function renderShowTable(tableList, type) {
|
|
6206
|
-
var
|
|
6206
|
+
var _modalTableProps$tabl;
|
|
6207
|
+
var viCount = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.visibleFieldsCount) || defaultVisibleFieldsCount;
|
|
6208
|
+
var canExpand = hasMoreQueryFields(modalTableProps);
|
|
6209
|
+
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);
|
|
6210
|
+
var baseHeight = getTableHeigth(collapsedList);
|
|
6211
|
+
var rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan).totalRows;
|
|
6212
|
+
var rowsExpandedData = getFormRowInfo(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm, modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan);
|
|
6213
|
+
var rowsExpanded = rowsExpandedData.totalRows;
|
|
6214
|
+
var isMoreAction = false;
|
|
6215
|
+
if (24 / (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchColSpan) - rowsExpandedData.emptyArray.length === 1) {
|
|
6216
|
+
rowsExpanded++;
|
|
6217
|
+
isMoreAction = true;
|
|
6218
|
+
}
|
|
6219
|
+
var extraRows = !collapsed && canExpand ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
|
|
6220
|
+
var tableBoxHeighth = baseHeight;
|
|
6221
|
+
if (isMoreAction && extraRows > 0) {
|
|
6222
|
+
tableBoxHeighth = tableBoxHeighth + (extraRows - 1 ? extraRows - 1 : 0) * 34 + 32;
|
|
6223
|
+
} else {
|
|
6224
|
+
tableBoxHeighth = tableBoxHeighth + extraRows * 34;
|
|
6225
|
+
}
|
|
6207
6226
|
var x = (tableList === null || tableList === void 0 ? void 0 : tableList.length) ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
|
|
6208
6227
|
var oSY = "calc(100vh - ".concat(tableBoxHeighth, "px - ").concat(x, "px)");
|
|
6209
6228
|
var mTB = "calc(50vh - ".concat(tableBoxHeighth / 2, "px - ").concat(x / 2, "px - 40px)");
|
|
@@ -12394,24 +12413,100 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12394
12413
|
}
|
|
12395
12414
|
}, {
|
|
12396
12415
|
name: 'qp-manageSupervisor-like',
|
|
12416
|
+
type: 'select',
|
|
12397
12417
|
label: '管理督导',
|
|
12398
|
-
|
|
12418
|
+
field: {
|
|
12419
|
+
type: 'select',
|
|
12420
|
+
props: {
|
|
12421
|
+
notFoundContent: '暂无数据',
|
|
12422
|
+
allowClear: true,
|
|
12423
|
+
showSearch: true,
|
|
12424
|
+
showArrow: true,
|
|
12425
|
+
maxTagCount: 1,
|
|
12426
|
+
optionFilterProp: 'children',
|
|
12427
|
+
filterOption: function filterOption(input, option) {
|
|
12428
|
+
var _option$value;
|
|
12429
|
+
debugger;
|
|
12430
|
+
return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
|
|
12431
|
+
}
|
|
12432
|
+
}
|
|
12433
|
+
}
|
|
12399
12434
|
}, {
|
|
12400
12435
|
name: 'qp-directSupervisor-like',
|
|
12436
|
+
type: 'select',
|
|
12401
12437
|
label: '直接督导',
|
|
12402
|
-
|
|
12438
|
+
field: {
|
|
12439
|
+
type: 'select',
|
|
12440
|
+
props: {
|
|
12441
|
+
notFoundContent: '暂无数据',
|
|
12442
|
+
allowClear: true,
|
|
12443
|
+
showSearch: true,
|
|
12444
|
+
showArrow: true,
|
|
12445
|
+
maxTagCount: 1,
|
|
12446
|
+
optionFilterProp: 'children',
|
|
12447
|
+
filterOption: function filterOption(input, option) {
|
|
12448
|
+
var _option$value2;
|
|
12449
|
+
return ((_option$value2 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value2 !== void 0 ? _option$value2 : '').toLowerCase().includes(input.toLowerCase());
|
|
12450
|
+
}
|
|
12451
|
+
}
|
|
12452
|
+
}
|
|
12403
12453
|
}, {
|
|
12404
12454
|
name: 'qp-distributionItem-like',
|
|
12455
|
+
type: 'select',
|
|
12405
12456
|
label: '分销商品',
|
|
12406
|
-
|
|
12457
|
+
field: {
|
|
12458
|
+
type: 'select',
|
|
12459
|
+
props: {
|
|
12460
|
+
notFoundContent: '暂无数据',
|
|
12461
|
+
allowClear: true,
|
|
12462
|
+
showSearch: true,
|
|
12463
|
+
showArrow: true,
|
|
12464
|
+
maxTagCount: 1,
|
|
12465
|
+
optionFilterProp: 'children',
|
|
12466
|
+
filterOption: function filterOption(input, option) {
|
|
12467
|
+
var _option$value3;
|
|
12468
|
+
return ((_option$value3 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value3 !== void 0 ? _option$value3 : '').toLowerCase().includes(input.toLowerCase());
|
|
12469
|
+
}
|
|
12470
|
+
}
|
|
12471
|
+
}
|
|
12407
12472
|
}, {
|
|
12408
12473
|
name: 'qp-headItem-like',
|
|
12474
|
+
type: 'select',
|
|
12409
12475
|
label: '总部商品',
|
|
12410
|
-
|
|
12476
|
+
field: {
|
|
12477
|
+
type: 'select',
|
|
12478
|
+
props: {
|
|
12479
|
+
notFoundContent: '暂无数据',
|
|
12480
|
+
allowClear: true,
|
|
12481
|
+
showSearch: true,
|
|
12482
|
+
showArrow: true,
|
|
12483
|
+
maxTagCount: 1,
|
|
12484
|
+
optionFilterProp: 'children',
|
|
12485
|
+
filterOption: function filterOption(input, option) {
|
|
12486
|
+
var _option$value4;
|
|
12487
|
+
return ((_option$value4 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value4 !== void 0 ? _option$value4 : '').toLowerCase().includes(input.toLowerCase());
|
|
12488
|
+
}
|
|
12489
|
+
}
|
|
12490
|
+
}
|
|
12411
12491
|
}, {
|
|
12412
12492
|
name: 'qp-storeChannelName-like',
|
|
12493
|
+
type: 'select',
|
|
12413
12494
|
label: '管理模式',
|
|
12414
|
-
|
|
12495
|
+
field: {
|
|
12496
|
+
type: 'select',
|
|
12497
|
+
props: {
|
|
12498
|
+
notFoundContent: '暂无数据',
|
|
12499
|
+
allowClear: true,
|
|
12500
|
+
showSearch: true,
|
|
12501
|
+
showArrow: true,
|
|
12502
|
+
maxTagCount: 1,
|
|
12503
|
+
optionFilterProp: 'children',
|
|
12504
|
+
filterOption: function filterOption(input, option) {
|
|
12505
|
+
var _option$value5;
|
|
12506
|
+
return ((_option$value5 = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value5 !== void 0 ? _option$value5 : '').toLowerCase().includes(input.toLowerCase());
|
|
12507
|
+
}
|
|
12508
|
+
}
|
|
12509
|
+
}
|
|
12415
12510
|
}];
|
|
12416
12511
|
var _queryHeaderParams10 = getQueryHeadersList({
|
|
12417
12512
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -12431,8 +12526,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12431
12526
|
pageSize: 5000,
|
|
12432
12527
|
currentPage: 1,
|
|
12433
12528
|
'ctl-withAuth': true
|
|
12434
|
-
}, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth'))]).then(function (x) {
|
|
12435
|
-
var _x$3, _x$3$data$, _x$3$data$$channelInf;
|
|
12529
|
+
}, getQueryHeadersItem(_queryHeaderParams10, 'ctl-withAuth')), loadSelectSource$1("/channel-manage/store/selectStoreOperationalInfo", {}, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in'))]).then(function (x) {
|
|
12530
|
+
var _x$3, _x$3$data$, _x$3$data$$channelInf, _x$4, _opList, _opList$, _opList2, _opList3, _opList4, _opList5, _opList6;
|
|
12436
12531
|
var newData1 = [];
|
|
12437
12532
|
(_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) {
|
|
12438
12533
|
newData1.push({
|
|
@@ -12451,6 +12546,46 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
12451
12546
|
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
12452
12547
|
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
|
|
12453
12548
|
formatSource(x, 3, 7, tableSearchForm, ['brandCode', 'name']);
|
|
12549
|
+
var opRaw = (_x$4 = x[4]) === null || _x$4 === void 0 ? void 0 : _x$4.data;
|
|
12550
|
+
// 新增label属性
|
|
12551
|
+
(_opList = opList) === null || _opList === void 0 ? void 0 : _opList.forEach(function (r) {
|
|
12552
|
+
r.label = r === null || r === void 0 ? void 0 : r.value;
|
|
12553
|
+
});
|
|
12554
|
+
var opList = Array.isArray(opRaw) ? opRaw : (opRaw === null || opRaw === void 0 ? void 0 : opRaw.items) || (opRaw === null || opRaw === void 0 ? void 0 : opRaw.list) || [];
|
|
12555
|
+
if (Array.isArray(opList) && Array.isArray(opList[0]) && !((_opList$ = opList[0]) === null || _opList$ === void 0 ? void 0 : _opList$.field)) {
|
|
12556
|
+
opList = opList[0];
|
|
12557
|
+
}
|
|
12558
|
+
var m1 = (_opList2 = opList) === null || _opList2 === void 0 ? void 0 : _opList2.filter(function (r) {
|
|
12559
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'manage_supervisor' && _.trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12560
|
+
});
|
|
12561
|
+
var m2 = (_opList3 = opList) === null || _opList3 === void 0 ? void 0 : _opList3.filter(function (r) {
|
|
12562
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'direct_supervisor' && _.trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12563
|
+
});
|
|
12564
|
+
var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
|
|
12565
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12566
|
+
});
|
|
12567
|
+
debugger;
|
|
12568
|
+
var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
|
|
12569
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12570
|
+
});
|
|
12571
|
+
var m5 = (_opList6 = opList) === null || _opList6 === void 0 ? void 0 : _opList6.filter(function (r) {
|
|
12572
|
+
return (r === null || r === void 0 ? void 0 : r.field) === 'store_channel_name' && _.trim(r === null || r === void 0 ? void 0 : r.value);
|
|
12573
|
+
});
|
|
12574
|
+
tableSearchForm[8] = _objectSpread2(_objectSpread2({}, tableSearchForm[8]), {}, {
|
|
12575
|
+
initialSource: m1
|
|
12576
|
+
});
|
|
12577
|
+
tableSearchForm[9] = _objectSpread2(_objectSpread2({}, tableSearchForm[9]), {}, {
|
|
12578
|
+
initialSource: m2
|
|
12579
|
+
});
|
|
12580
|
+
tableSearchForm[10] = _objectSpread2(_objectSpread2({}, tableSearchForm[10]), {}, {
|
|
12581
|
+
initialSource: m3
|
|
12582
|
+
});
|
|
12583
|
+
tableSearchForm[11] = _objectSpread2(_objectSpread2({}, tableSearchForm[11]), {}, {
|
|
12584
|
+
initialSource: m4
|
|
12585
|
+
});
|
|
12586
|
+
tableSearchForm[12] = _objectSpread2(_objectSpread2({}, tableSearchForm[12]), {}, {
|
|
12587
|
+
initialSource: m5
|
|
12588
|
+
});
|
|
12454
12589
|
});
|
|
12455
12590
|
modalTableProps = _objectSpread2({
|
|
12456
12591
|
modalTableTitle: '选择商店',
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import { handleTextOverflow, tableColumnsImage, handleTooltip } from '@/componen
|
|
|
6
6
|
import { getSkuImg } from '@/utils/TableUtils';
|
|
7
7
|
import { getEmployeeCode, getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
|
|
8
8
|
import { Image } from 'antd';
|
|
9
|
-
import { isBoolean } from 'lodash';
|
|
9
|
+
import { isBoolean, trim } from 'lodash';
|
|
10
10
|
|
|
11
11
|
const hasDictSharingType = getDictionarySource('UC000013')?.length;
|
|
12
12
|
const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
|
|
@@ -2295,11 +2295,74 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2295
2295
|
},
|
|
2296
2296
|
},
|
|
2297
2297
|
},
|
|
2298
|
-
{ name: 'qp-manageSupervisor-like',
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2298
|
+
{ name: 'qp-manageSupervisor-like', type: 'select', label: '管理督导', field: {
|
|
2299
|
+
type: 'select',
|
|
2300
|
+
props: {
|
|
2301
|
+
notFoundContent: '暂无数据',
|
|
2302
|
+
allowClear: true,
|
|
2303
|
+
showSearch: true,
|
|
2304
|
+
showArrow: true,
|
|
2305
|
+
maxTagCount: 1,
|
|
2306
|
+
optionFilterProp: 'children',
|
|
2307
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
2308
|
+
{
|
|
2309
|
+
debugger
|
|
2310
|
+
return (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2313
|
+
} },
|
|
2314
|
+
{ name: 'qp-directSupervisor-like', type: 'select', label: '直接督导', field: {
|
|
2315
|
+
type: 'select',
|
|
2316
|
+
props: {
|
|
2317
|
+
notFoundContent: '暂无数据',
|
|
2318
|
+
allowClear: true,
|
|
2319
|
+
showSearch: true,
|
|
2320
|
+
showArrow: true,
|
|
2321
|
+
maxTagCount: 1,
|
|
2322
|
+
optionFilterProp: 'children',
|
|
2323
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
2324
|
+
(option?.value ?? '').toLowerCase().includes(input.toLowerCase())
|
|
2325
|
+
},
|
|
2326
|
+
} },
|
|
2327
|
+
{ name: 'qp-distributionItem-like', type: 'select', label: '分销商品', field: {
|
|
2328
|
+
type: 'select',
|
|
2329
|
+
props: {
|
|
2330
|
+
notFoundContent: '暂无数据',
|
|
2331
|
+
allowClear: true,
|
|
2332
|
+
showSearch: true,
|
|
2333
|
+
showArrow: true,
|
|
2334
|
+
maxTagCount: 1,
|
|
2335
|
+
optionFilterProp: 'children',
|
|
2336
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
2337
|
+
(option?.value ?? '').toLowerCase().includes(input.toLowerCase())
|
|
2338
|
+
},
|
|
2339
|
+
} },
|
|
2340
|
+
{ name: 'qp-headItem-like', type: 'select', label: '总部商品', field: {
|
|
2341
|
+
type: 'select',
|
|
2342
|
+
props: {
|
|
2343
|
+
notFoundContent: '暂无数据',
|
|
2344
|
+
allowClear: true,
|
|
2345
|
+
showSearch: true,
|
|
2346
|
+
showArrow: true,
|
|
2347
|
+
maxTagCount: 1,
|
|
2348
|
+
optionFilterProp: 'children',
|
|
2349
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
2350
|
+
(option?.value ?? '').toLowerCase().includes(input.toLowerCase())
|
|
2351
|
+
},
|
|
2352
|
+
} },
|
|
2353
|
+
{ name: 'qp-storeChannelName-like', type: 'select', label: '管理模式', field: {
|
|
2354
|
+
type: 'select',
|
|
2355
|
+
props: {
|
|
2356
|
+
notFoundContent: '暂无数据',
|
|
2357
|
+
allowClear: true,
|
|
2358
|
+
showSearch: true,
|
|
2359
|
+
showArrow: true,
|
|
2360
|
+
maxTagCount: 1,
|
|
2361
|
+
optionFilterProp: 'children',
|
|
2362
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
2363
|
+
(option?.value ?? '').toLowerCase().includes(input.toLowerCase())
|
|
2364
|
+
},
|
|
2365
|
+
} },
|
|
2303
2366
|
]
|
|
2304
2367
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
2305
2368
|
Promise.all([
|
|
@@ -2320,7 +2383,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2320
2383
|
pageSize: 5000,
|
|
2321
2384
|
currentPage: 1,
|
|
2322
2385
|
'ctl-withAuth': true,
|
|
2323
|
-
},getQueryHeadersItem(queryHeaderParams,'ctl-withAuth'))
|
|
2386
|
+
},getQueryHeadersItem(queryHeaderParams,'ctl-withAuth')),
|
|
2387
|
+
loadSelectSource(`/channel-manage/store/selectStoreOperationalInfo`, {}, getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in'))
|
|
2324
2388
|
]).then((x: any)=>{
|
|
2325
2389
|
const newData1: any[] = [];
|
|
2326
2390
|
x[1]?.data[0]?.channelInfoSon?.forEach((item: any) => {
|
|
@@ -2333,6 +2397,25 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2333
2397
|
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
2334
2398
|
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
|
|
2335
2399
|
formatSource(x,3, 7, tableSearchForm, ['brandCode', 'name']);
|
|
2400
|
+
|
|
2401
|
+
const opRaw = x[4]?.data;
|
|
2402
|
+
// 新增label属性
|
|
2403
|
+
opList?.forEach((r: any) => {
|
|
2404
|
+
r.label = r?.value;
|
|
2405
|
+
})
|
|
2406
|
+
let opList = Array.isArray(opRaw) ? opRaw : (opRaw?.items || opRaw?.list || []);
|
|
2407
|
+
if (Array.isArray(opList) && Array.isArray(opList[0]) && !opList[0]?.field) { opList = opList[0]; }
|
|
2408
|
+
const m1 = opList?.filter((r: any) => r?.field === 'manage_supervisor' && trim(r?.value));
|
|
2409
|
+
const m2 = opList?.filter((r: any) => r?.field === 'direct_supervisor' && trim(r?.value));
|
|
2410
|
+
const m3 = opList?.filter((r: any) => r?.field === 'distribution_item' && trim(r?.value));
|
|
2411
|
+
debugger
|
|
2412
|
+
const m4 = opList?.filter((r: any) => r?.field === 'head_item' && trim(r?.value));
|
|
2413
|
+
const m5 = opList?.filter((r: any) => r?.field === 'store_channel_name' && trim(r?.value));
|
|
2414
|
+
tableSearchForm[8] = { ...tableSearchForm[8], initialSource: m1 };
|
|
2415
|
+
tableSearchForm[9] = { ...tableSearchForm[9], initialSource: m2 };
|
|
2416
|
+
tableSearchForm[10] = { ...tableSearchForm[10], initialSource: m3 };
|
|
2417
|
+
tableSearchForm[11] = { ...tableSearchForm[11], initialSource: m4 };
|
|
2418
|
+
tableSearchForm[12] = { ...tableSearchForm[12], initialSource: m5 };
|
|
2336
2419
|
})
|
|
2337
2420
|
modalTableProps = {
|
|
2338
2421
|
modalTableTitle: '选择商店',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import React, { useState, useEffect, forwardRef, useImperativeHandle
|
|
2
|
+
import React, { useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
3
3
|
import { useDebounceFn } from 'ahooks';
|
|
4
4
|
import { Input, Button, Modal, Select, Divider, message, Spin, Form, Table, Checkbox, TreeSelect, Tooltip, Tag, Row, Col, Space, Tabs, Empty, DatePicker } from 'antd';
|
|
5
5
|
import { SearchOutlined, CopyOutlined, CaretLeftOutlined } from '@ant-design/icons';
|
|
@@ -148,10 +148,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
148
148
|
const [tableShowColumns, setTabletShowColumns] = useState(handleTableColumns(modalTableProps?.tableColumns)); // 默认展示表头-modalTableProps?.tableColumns
|
|
149
149
|
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
150
150
|
const [modalSearched, setModalSearched]=useState(false);
|
|
151
|
-
const [overScrollY, setOverScrollY] = useState<number | undefined>(undefined);
|
|
152
|
-
|
|
153
|
-
const topFormRef = useRef<HTMLDivElement>(null);
|
|
154
|
-
const bottomWrapRef = useRef<HTMLDivElement>(null);
|
|
155
151
|
|
|
156
152
|
const setSelectDataSource = (list,total: number) => {
|
|
157
153
|
setItems(list);
|
|
@@ -374,7 +370,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
374
370
|
setModalSearched(false);
|
|
375
371
|
|
|
376
372
|
setIsModalVisible(true);
|
|
377
|
-
setTimeout(() => computeScrollY(), 0);
|
|
378
373
|
// 回显
|
|
379
374
|
if (value) {
|
|
380
375
|
if (selectMode) {
|
|
@@ -461,7 +456,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
461
456
|
const handleCancel = () => {
|
|
462
457
|
clearModalTable();
|
|
463
458
|
setIsModalVisible(false);
|
|
464
|
-
setOverScrollY(undefined);
|
|
465
459
|
};
|
|
466
460
|
|
|
467
461
|
const refreshItems = () => {
|
|
@@ -498,7 +492,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
498
492
|
|
|
499
493
|
const toggleCollapsed = () => {
|
|
500
494
|
setCollapsed(!collapsed);
|
|
501
|
-
setTimeout(() => computeScrollY(), 0);
|
|
502
495
|
};
|
|
503
496
|
|
|
504
497
|
const handleTableChange = (pagination) => {
|
|
@@ -718,12 +711,30 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
718
711
|
}
|
|
719
712
|
|
|
720
713
|
const renderShowTable = (tableList, type) => {
|
|
721
|
-
const
|
|
722
|
-
const
|
|
723
|
-
const
|
|
714
|
+
const viCount = modalTableProps?.visibleFieldsCount || defaultVisibleFieldsCount;
|
|
715
|
+
const canExpand = hasMoreQueryFields(modalTableProps);
|
|
716
|
+
const collapsedList = modalTableProps?.tableSearchForm?.slice(0, viCount);
|
|
717
|
+
const baseHeight = getTableHeigth(collapsedList);
|
|
718
|
+
const rowsCollapsed = getFormRowInfo(collapsedList, modalTableProps?.tableSearchColSpan).totalRows;
|
|
719
|
+
const rowsExpandedData = getFormRowInfo(modalTableProps?.tableSearchForm, modalTableProps?.tableSearchColSpan);
|
|
720
|
+
let rowsExpanded = rowsExpandedData.totalRows;
|
|
721
|
+
let isMoreAction = false;
|
|
722
|
+
if(24 / modalTableProps?.tableSearchColSpan - rowsExpandedData.emptyArray.length === 1) {
|
|
723
|
+
rowsExpanded++;
|
|
724
|
+
isMoreAction = true;
|
|
725
|
+
}
|
|
726
|
+
const extraRows = (!collapsed && canExpand) ? Math.max(0, rowsExpanded - rowsCollapsed) : 0;
|
|
727
|
+
let tableBoxHeighth = baseHeight;
|
|
728
|
+
if(isMoreAction && extraRows > 0) {
|
|
729
|
+
tableBoxHeighth = tableBoxHeighth + ((extraRows - 1) ? (extraRows - 1) : 0) * 34 + 32
|
|
730
|
+
} else {
|
|
731
|
+
tableBoxHeighth = tableBoxHeighth + extraRows * 34
|
|
732
|
+
}
|
|
733
|
+
const x = tableList?.length ? 82 : 28; // 无数据没有分页,有数据计算减去:分页 24+16*2+10 「高 + margin * 2 + paddingBottom 10 」
|
|
734
|
+
const oSY = `calc(100vh - ${tableBoxHeighth}px - ${x}px)`;
|
|
724
735
|
const mTB = `calc(50vh - ${tableBoxHeighth/2}px - ${x/2}px - 40px)`
|
|
725
736
|
return (
|
|
726
|
-
<div style={{ height:
|
|
737
|
+
<div style={{ height: `calc(100vh - ${tableBoxHeighth}px)` }}>
|
|
727
738
|
<Table
|
|
728
739
|
bordered
|
|
729
740
|
size="middle"
|
|
@@ -961,7 +972,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
961
972
|
{...(modalTableProps?.modalProps || {})}
|
|
962
973
|
>
|
|
963
974
|
<div className={'search_select_wrapper'}>
|
|
964
|
-
<div className={'search_select_wrapper_topForm'}
|
|
975
|
+
<div className={'search_select_wrapper_topForm'}>
|
|
965
976
|
<div className={'select_list_columns'}>
|
|
966
977
|
<Form form={form} layout={'horizontal'} colon={false} key="modalForm">
|
|
967
978
|
<Row>
|
|
@@ -992,7 +1003,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
992
1003
|
</div>
|
|
993
1004
|
</div>
|
|
994
1005
|
|
|
995
|
-
<div className={'search_select_wrapper_bottomTable'}
|
|
1006
|
+
<div className={'search_select_wrapper_bottomTable'}>
|
|
996
1007
|
<div className={selectMode ?'search_select_wrapper_bottomTable_wrapLeft2':'search_select_wrapper_bottomTable_wrapLeft1'}><Tabs items={tabsItems1} /></div>
|
|
997
1008
|
{selectMode ? <div className={'search_select_wrapper_bottomTable_wrapRight'}><Tabs items={tabsItems2} tabBarExtraContent={<span onClick={()=> onChangeSelectedKeys([], [])}>清空已选</span>} /></div> : null}
|
|
998
1009
|
</div>
|
|
@@ -1004,27 +1015,3 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
1004
1015
|
});
|
|
1005
1016
|
|
|
1006
1017
|
export default SearchSelect;
|
|
1007
|
-
const computeScrollY = () => {
|
|
1008
|
-
try {
|
|
1009
|
-
const bodyEl = document.querySelector('.search_select_modal_wrapper .ant-modal-body') as HTMLElement | null;
|
|
1010
|
-
const bodyH = bodyEl?.clientHeight || 0;
|
|
1011
|
-
const topH = topFormRef.current?.clientHeight || 0;
|
|
1012
|
-
const navEl = bottomWrapRef.current?.querySelector('.ant-tabs-nav') as HTMLElement | null;
|
|
1013
|
-
const navH = navEl?.offsetHeight || 0;
|
|
1014
|
-
const extra = 30; // paddings/margins buffer
|
|
1015
|
-
const tableH = Math.max(160, bodyH - topH - navH - extra);
|
|
1016
|
-
setOverScrollY(tableH);
|
|
1017
|
-
} catch (e) {
|
|
1018
|
-
// ignore
|
|
1019
|
-
}
|
|
1020
|
-
};
|
|
1021
|
-
|
|
1022
|
-
useEffect(() => {
|
|
1023
|
-
if (!isModalVisible) return;
|
|
1024
|
-
computeScrollY();
|
|
1025
|
-
const onResize = () => computeScrollY();
|
|
1026
|
-
window.addEventListener('resize', onResize);
|
|
1027
|
-
return () => {
|
|
1028
|
-
window.removeEventListener('resize', onResize);
|
|
1029
|
-
};
|
|
1030
|
-
}, [isModalVisible, collapsed, tableData, tablePagination]);
|