@bit-sun/business-component 3.1.9 → 3.2.0-alpha.1
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/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +3 -0
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.d.ts +2 -0
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +3 -0
- package/dist/index.esm.js +1061 -12
- package/dist/index.js +1062 -10
- package/dist/utils/requestUtils.d.ts +1 -0
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +46 -1
- package/src/components/Business/SearchSelect/index.md +58 -0
- package/src/components/Business/SearchSelect/utils.ts +1 -1
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.tsx +358 -0
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/function.js +255 -0
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/helps.tsx +58 -0
- package/src/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.tsx +129 -0
- package/src/components/Solution/RuleComponent/RenderCompItem.tsx +28 -0
- package/src/components/Solution/RuleComponent/index.js +10 -1
- package/src/components/Solution/RuleComponent/ruleFiled.js +118 -0
- package/src/utils/requestUtils.ts +6 -2
- package/src/utils/utils.ts +22 -0
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ 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, Select, Form, Divider, Spin, Table, TreeSelect, Tag, Typography, Alert, Breadcrumb, Drawer as Drawer$1, List, Radio, Tree, Row, Col, Result, Tabs, Affix, Cascader, DatePicker, TimePicker, Switch } from 'antd';
|
|
5
5
|
import _, { isNil, escapeRegExp, omit, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
|
|
6
6
|
import memoizeOne from 'memoize-one';
|
|
7
|
-
import { formatMessage, history, useLocation, Link, useModel, setLocale, useIntl } from 'umi';
|
|
7
|
+
import { formatMessage, history, useLocation, Link, useModel, setLocale, useIntl, request as request$3 } from 'umi';
|
|
8
8
|
import isEqual from 'lodash/isEqual';
|
|
9
9
|
import React$1, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, Component, useLayoutEffect, createRef } from 'react';
|
|
10
10
|
import moment$1 from 'moment';
|
|
@@ -845,7 +845,10 @@ var handleRequestHeader = function handleRequestHeader(url, options) {
|
|
|
845
845
|
}
|
|
846
846
|
!!!config.headers['x-biz-code'] && handleRequestAuthHeader(config);
|
|
847
847
|
config.headers = _objectSpread2(_objectSpread2({}, commonHeaders), config.headers);
|
|
848
|
-
options
|
|
848
|
+
if (options) {
|
|
849
|
+
options.headers = config.headers;
|
|
850
|
+
}
|
|
851
|
+
return options || config;
|
|
849
852
|
};
|
|
850
853
|
request$1.interceptors.request.use(function (url, options) {
|
|
851
854
|
handleRequestHeader(url, options);
|
|
@@ -1424,6 +1427,21 @@ var randomString = function randomString(len) {
|
|
|
1424
1427
|
var createUniqID = function createUniqID(length) {
|
|
1425
1428
|
return Number(Math.random().toString().substr(3, length) + Date.now()).toString(36);
|
|
1426
1429
|
};
|
|
1430
|
+
// 格式化table响应数据
|
|
1431
|
+
var handleConvertResponse = function handleConvertResponse(items, total) {
|
|
1432
|
+
var result = {
|
|
1433
|
+
list: (items === null || items === void 0 ? void 0 : items.length) && items.map(function (item, index) {
|
|
1434
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
1435
|
+
keyIndex: "".concat(index + 1)
|
|
1436
|
+
});
|
|
1437
|
+
}) || [],
|
|
1438
|
+
total: Number(total) || 0
|
|
1439
|
+
};
|
|
1440
|
+
return result;
|
|
1441
|
+
};
|
|
1442
|
+
var noEmptyArray = function noEmptyArray(targetObj) {
|
|
1443
|
+
return Array.isArray(targetObj) && targetObj.length !== 0;
|
|
1444
|
+
};
|
|
1427
1445
|
|
|
1428
1446
|
// 判断某个按钮/菜单 是否有权限,返回布尔值
|
|
1429
1447
|
var authFunc = function authFunc(code) {
|
|
@@ -5763,7 +5781,7 @@ var setInitialShowColumn = function setInitialShowColumn(tableCode, columns, cal
|
|
|
5763
5781
|
* @param arr 要判断的数据
|
|
5764
5782
|
* @returns boolean
|
|
5765
5783
|
*/
|
|
5766
|
-
var noEmptyArray = function noEmptyArray(arr) {
|
|
5784
|
+
var noEmptyArray$1 = function noEmptyArray(arr) {
|
|
5767
5785
|
return Array.isArray(arr) && arr.length > 0;
|
|
5768
5786
|
};
|
|
5769
5787
|
//设置queryTable默认列宽
|
|
@@ -6938,7 +6956,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
6938
6956
|
var indexArrInside = [].concat(_toConsumableArray(indexArr), [index]).filter(function (i) {
|
|
6939
6957
|
return i || i === 0;
|
|
6940
6958
|
});
|
|
6941
|
-
if (noEmptyArray(item.children)) {
|
|
6959
|
+
if (noEmptyArray$1(item.children)) {
|
|
6942
6960
|
_handleColumns(item.children, indexArrInside);
|
|
6943
6961
|
} else {
|
|
6944
6962
|
item.width = item.width || getItemDefaultWidth$2(item);
|
|
@@ -7990,7 +8008,7 @@ var BillEntry = function BillEntry(_ref3) {
|
|
|
7990
8008
|
var indexArrInside = [].concat(_toConsumableArray(indexArr), [index]).filter(function (i) {
|
|
7991
8009
|
return i || i === 0;
|
|
7992
8010
|
});
|
|
7993
|
-
if (noEmptyArray(item.children)) {
|
|
8011
|
+
if (noEmptyArray$1(item.children)) {
|
|
7994
8012
|
_handleColumns(item.children, indexArrInside);
|
|
7995
8013
|
} else {
|
|
7996
8014
|
item.width = item.width || getItemDefaultWidth$2(item);
|
|
@@ -8234,6 +8252,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
|
|
|
8234
8252
|
break;
|
|
8235
8253
|
case 'deliveryMode':
|
|
8236
8254
|
case 'ruleTemplate':
|
|
8255
|
+
case 'priceItem':
|
|
8237
8256
|
result = '/basic';
|
|
8238
8257
|
break;
|
|
8239
8258
|
default:
|
|
@@ -10614,6 +10633,48 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps, hidde
|
|
|
10614
10633
|
}]
|
|
10615
10634
|
}, modalTableBusProps);
|
|
10616
10635
|
}
|
|
10636
|
+
// 价格项选择器
|
|
10637
|
+
if (type === 'priceItem') {
|
|
10638
|
+
requestConfig = _objectSpread2({
|
|
10639
|
+
url: "".concat(prefixUrl.selectPrefix, "/priceType"),
|
|
10640
|
+
filter: 'qp-code,name-orGroup,like',
|
|
10641
|
+
mappingTextField: 'name',
|
|
10642
|
+
mappingTextShowKeyField: 'code',
|
|
10643
|
+
mappingValueField: 'code',
|
|
10644
|
+
otherParams: {
|
|
10645
|
+
'qp-enabled-eq': true,
|
|
10646
|
+
sorter: 'desc-id'
|
|
10647
|
+
},
|
|
10648
|
+
sourceName: 'priceCode'
|
|
10649
|
+
}, requestConfigProp);
|
|
10650
|
+
tableSearchForm = [{
|
|
10651
|
+
name: 'qp-code-like',
|
|
10652
|
+
label: '代码'
|
|
10653
|
+
}, {
|
|
10654
|
+
name: 'qp-name-like',
|
|
10655
|
+
label: '名称'
|
|
10656
|
+
}];
|
|
10657
|
+
modalTableProps = _objectSpread2({
|
|
10658
|
+
modalTableTitle: '选择价格项',
|
|
10659
|
+
tableSearchForm: tableSearchForm,
|
|
10660
|
+
tableColumns: [{
|
|
10661
|
+
title: '代码',
|
|
10662
|
+
dataIndex: 'code'
|
|
10663
|
+
}, {
|
|
10664
|
+
title: '名称',
|
|
10665
|
+
dataIndex: 'name'
|
|
10666
|
+
}, {
|
|
10667
|
+
title: '创建时间',
|
|
10668
|
+
dataIndex: 'createTime',
|
|
10669
|
+
render: function render(text) {
|
|
10670
|
+
return handleTooltip(text, true);
|
|
10671
|
+
}
|
|
10672
|
+
}, {
|
|
10673
|
+
title: '创建人',
|
|
10674
|
+
dataIndex: 'createUserName'
|
|
10675
|
+
}]
|
|
10676
|
+
}, modalTableBusProps);
|
|
10677
|
+
}
|
|
10617
10678
|
return {
|
|
10618
10679
|
modalTableProps: modalTableProps,
|
|
10619
10680
|
requestConfig: requestConfig,
|
|
@@ -13437,7 +13498,7 @@ var ColumnSettingSulaTable = /*#__PURE__*/function (_React$Component) {
|
|
|
13437
13498
|
var indexArrInside = [].concat(_toConsumableArray(indexArr), [index]).filter(function (i) {
|
|
13438
13499
|
return i || i === 0;
|
|
13439
13500
|
});
|
|
13440
|
-
if (noEmptyArray(item.children)) {
|
|
13501
|
+
if (noEmptyArray$1(item.children)) {
|
|
13441
13502
|
_handleColumns(item.children, indexArrInside);
|
|
13442
13503
|
} else {
|
|
13443
13504
|
item.width = item.width || getItemDefaultWidth$2(item);
|
|
@@ -13671,7 +13732,7 @@ var ColumnSettingTable = /*#__PURE__*/function (_React$Component) {
|
|
|
13671
13732
|
var indexArrInside = [].concat(_toConsumableArray(indexArr), [index]).filter(function (i) {
|
|
13672
13733
|
return i || i === 0;
|
|
13673
13734
|
});
|
|
13674
|
-
if (noEmptyArray(item.children)) {
|
|
13735
|
+
if (noEmptyArray$1(item.children)) {
|
|
13675
13736
|
_handleColumns(item.children, indexArrInside);
|
|
13676
13737
|
} else {
|
|
13677
13738
|
item.width = item.width || getItemDefaultWidth$2(item);
|
|
@@ -29470,6 +29531,807 @@ var isObj = function isObj(object) {
|
|
|
29470
29531
|
var dateFormat = 'YYYY-MM-DD';
|
|
29471
29532
|
var fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
29472
29533
|
|
|
29534
|
+
// 处理表头
|
|
29535
|
+
var getColumnItem = function getColumnItem(_ref) {
|
|
29536
|
+
var item = _ref.item;
|
|
29537
|
+
var ites = {
|
|
29538
|
+
title: item.name,
|
|
29539
|
+
key: item.code,
|
|
29540
|
+
render: function render(_ref2) {
|
|
29541
|
+
var text = _ref2.text,
|
|
29542
|
+
record = _ref2.record;
|
|
29543
|
+
var showText = (record === null || record === void 0 ? void 0 : record["".concat(item.code, "_Name")]) || text;
|
|
29544
|
+
return showText;
|
|
29545
|
+
}
|
|
29546
|
+
};
|
|
29547
|
+
// 处理列展示类型基础数据
|
|
29548
|
+
if (item.choiceType == 20) {
|
|
29549
|
+
// 数据字典
|
|
29550
|
+
var dictionaryCode;
|
|
29551
|
+
try {
|
|
29552
|
+
if (JSON.parse(item.info || '{}').dictionaryCode) {
|
|
29553
|
+
dictionaryCode = JSON.parse(item.info || '{}').dictionaryCode;
|
|
29554
|
+
}
|
|
29555
|
+
} catch (e) {
|
|
29556
|
+
console.log('error', e);
|
|
29557
|
+
}
|
|
29558
|
+
ites.sourceList = dictionaryCode && getDictionarySource(dictionaryCode) || [];
|
|
29559
|
+
}
|
|
29560
|
+
if (item.choiceType == 10) {
|
|
29561
|
+
// 自定义枚举值
|
|
29562
|
+
var enumeration;
|
|
29563
|
+
try {
|
|
29564
|
+
if (JSON.parse(item.info || '{}').enumeration) {
|
|
29565
|
+
enumeration = JSON.parse(item.info || '{}').enumeration;
|
|
29566
|
+
}
|
|
29567
|
+
} catch (e) {
|
|
29568
|
+
console.log('error', e);
|
|
29569
|
+
}
|
|
29570
|
+
ites.sourceList = enumeration && Object.keys(enumeration).map(function (key) {
|
|
29571
|
+
return {
|
|
29572
|
+
value: key,
|
|
29573
|
+
text: enumeration[key]
|
|
29574
|
+
};
|
|
29575
|
+
}) || [];
|
|
29576
|
+
}
|
|
29577
|
+
return ites;
|
|
29578
|
+
};
|
|
29579
|
+
var formatListName = function formatListName(list, columns) {
|
|
29580
|
+
if (!(list === null || list === void 0 ? void 0 : list.length)) return [];
|
|
29581
|
+
if (!(columns === null || columns === void 0 ? void 0 : columns.length)) return list; // 下拉框无需格式化
|
|
29582
|
+
return list.map(function (item) {
|
|
29583
|
+
var resultItem = _objectSpread2({}, item);
|
|
29584
|
+
// 弹窗table编码展示名称
|
|
29585
|
+
var column = columns.filter(function (col) {
|
|
29586
|
+
var _Object$keys, _col$sourceList;
|
|
29587
|
+
return ((_Object$keys = Object.keys(item)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.includes(col.key)) && (col === null || col === void 0 ? void 0 : (_col$sourceList = col.sourceList) === null || _col$sourceList === void 0 ? void 0 : _col$sourceList.length);
|
|
29588
|
+
}) || [];
|
|
29589
|
+
Array.isArray(column) && (column === null || column === void 0 ? void 0 : column.length) && column.forEach(function (element) {
|
|
29590
|
+
if (element === null || element === void 0 ? void 0 : element.sourceList) {
|
|
29591
|
+
var _element$sourceList$f;
|
|
29592
|
+
resultItem["".concat(element.key, "_Name")] = element === null || element === void 0 ? void 0 : (_element$sourceList$f = element.sourceList.find(function (source) {
|
|
29593
|
+
return source.value == item[element.key];
|
|
29594
|
+
})) === null || _element$sourceList$f === void 0 ? void 0 : _element$sourceList$f.text;
|
|
29595
|
+
}
|
|
29596
|
+
});
|
|
29597
|
+
return resultItem;
|
|
29598
|
+
});
|
|
29599
|
+
};
|
|
29600
|
+
|
|
29601
|
+
var _excluded$j = ["sorter"];
|
|
29602
|
+
/**
|
|
29603
|
+
* 删掉查询条件的qp- 和 -eq等
|
|
29604
|
+
* @param {object} data
|
|
29605
|
+
* @return {object}
|
|
29606
|
+
* */
|
|
29607
|
+
function deleteQuerySymbol(data) {
|
|
29608
|
+
var result = {};
|
|
29609
|
+
Object.keys(data).map(function (item) {
|
|
29610
|
+
var newKey = deleteQuerySymbolSingle(item);
|
|
29611
|
+
result[newKey] = data[item];
|
|
29612
|
+
});
|
|
29613
|
+
return result;
|
|
29614
|
+
}
|
|
29615
|
+
function deleteQuerySymbolSingle(key) {
|
|
29616
|
+
return key.replace(/(qp-|-\w+)/g, '');
|
|
29617
|
+
}
|
|
29618
|
+
|
|
29619
|
+
// 把{G1001F1001:123} 换成 {G1001:{F1001: 123}}
|
|
29620
|
+
function convertToMapByKey(data) {
|
|
29621
|
+
var result = {};
|
|
29622
|
+
Object.keys(data).map(function (item) {
|
|
29623
|
+
var groupCode = item.match(/G\d+/);
|
|
29624
|
+
var fieldCode = item.match(/F\d+/);
|
|
29625
|
+
if ((groupCode === null || groupCode === void 0 ? void 0 : groupCode.length) > 0 && (fieldCode === null || fieldCode === void 0 ? void 0 : fieldCode.length) > 0) {
|
|
29626
|
+
if (result[groupCode]) {
|
|
29627
|
+
result[groupCode][fieldCode] = data[item];
|
|
29628
|
+
} else if (!result[groupCode]) {
|
|
29629
|
+
result[groupCode] = _defineProperty({}, fieldCode, data[item]);
|
|
29630
|
+
}
|
|
29631
|
+
}
|
|
29632
|
+
});
|
|
29633
|
+
return result;
|
|
29634
|
+
}
|
|
29635
|
+
|
|
29636
|
+
/**
|
|
29637
|
+
* 去掉查询表格的qp- -eq -in,与普通表格一样的格式
|
|
29638
|
+
* @param{string} prop 键
|
|
29639
|
+
* @param{boolean} flag 是不是查询表格
|
|
29640
|
+
* */
|
|
29641
|
+
function convertProp(prop, flag) {
|
|
29642
|
+
var _prop$replace, _prop$replace$replace, _prop$replace$replace2, _prop$replace$replace3;
|
|
29643
|
+
return flag ? prop === null || prop === void 0 ? void 0 : (_prop$replace = prop.replace(/(G\d+)/, '')) === null || _prop$replace === void 0 ? void 0 : (_prop$replace$replace = _prop$replace.replace('qp-', '')) === null || _prop$replace$replace === void 0 ? void 0 : (_prop$replace$replace2 = _prop$replace$replace.replace('-eq', '')) === null || _prop$replace$replace2 === void 0 ? void 0 : (_prop$replace$replace3 = _prop$replace$replace2.replace('-in', '')) === null || _prop$replace$replace3 === void 0 ? void 0 : _prop$replace$replace3.replace('-like', '') : prop;
|
|
29644
|
+
}
|
|
29645
|
+
// 获取元数据,是表格中列的数据来源
|
|
29646
|
+
function getMetaData(_x) {
|
|
29647
|
+
return _getMetaData.apply(this, arguments);
|
|
29648
|
+
}
|
|
29649
|
+
|
|
29650
|
+
// 获取数据
|
|
29651
|
+
function _getMetaData() {
|
|
29652
|
+
_getMetaData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
|
|
29653
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29654
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29655
|
+
case 0:
|
|
29656
|
+
return _context.abrupt("return", new Promise(function (resolve, reject) {
|
|
29657
|
+
request$3('/basic/entityProperty/listNoPage', {
|
|
29658
|
+
params: {
|
|
29659
|
+
'qp-entityId-eq': id
|
|
29660
|
+
}
|
|
29661
|
+
}).then(function (res) {
|
|
29662
|
+
resolve(res.data);
|
|
29663
|
+
}).catch(function (error) {
|
|
29664
|
+
console.log(error, 'error');
|
|
29665
|
+
reject([]);
|
|
29666
|
+
});
|
|
29667
|
+
}));
|
|
29668
|
+
case 1:
|
|
29669
|
+
case "end":
|
|
29670
|
+
return _context.stop();
|
|
29671
|
+
}
|
|
29672
|
+
}, _callee);
|
|
29673
|
+
}));
|
|
29674
|
+
return _getMetaData.apply(this, arguments);
|
|
29675
|
+
}
|
|
29676
|
+
var remoteFetch = function remoteFetch(requestConfig, coloumns) {
|
|
29677
|
+
return {
|
|
29678
|
+
url: '/basic/function/sendRequest',
|
|
29679
|
+
method: 'post',
|
|
29680
|
+
convertParams: function convertParams(_ref) {
|
|
29681
|
+
var _requestConfig$method;
|
|
29682
|
+
var params = _ref.params;
|
|
29683
|
+
var sorter = params.sorter,
|
|
29684
|
+
paramsTemp = _objectWithoutProperties(params, _excluded$j);
|
|
29685
|
+
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, requestConfig.params), requestConfig.body), _.omit(paramsTemp, ['filters', 'current'])), (paramsTemp === null || paramsTemp === void 0 ? void 0 : paramsTemp.filters) || {}), {
|
|
29686
|
+
currentPage: (paramsTemp === null || paramsTemp === void 0 ? void 0 : paramsTemp.currentPage) || paramsTemp.current || 1
|
|
29687
|
+
});
|
|
29688
|
+
|
|
29689
|
+
// 清除值为空的
|
|
29690
|
+
Object.keys(queryParams).forEach(function (itemKey) {
|
|
29691
|
+
if (judgeIsEmpty(queryParams[itemKey])) {
|
|
29692
|
+
delete queryParams[itemKey];
|
|
29693
|
+
}
|
|
29694
|
+
});
|
|
29695
|
+
return {
|
|
29696
|
+
path: requestConfig.url,
|
|
29697
|
+
httpMethod: requestConfig === null || requestConfig === void 0 ? void 0 : (_requestConfig$method = requestConfig.method) === null || _requestConfig$method === void 0 ? void 0 : _requestConfig$method.toUpperCase(),
|
|
29698
|
+
serviceName: requestConfig.serviceName,
|
|
29699
|
+
requestBody: JSON.stringify(queryParams),
|
|
29700
|
+
header: handleRequestHeader().headers
|
|
29701
|
+
};
|
|
29702
|
+
},
|
|
29703
|
+
converter: function converter(_ref2) {
|
|
29704
|
+
var data = _ref2.data;
|
|
29705
|
+
return _objectSpread2({}, handleConvertResponse(handleList(data, coloumns), handleListToTal(data)));
|
|
29706
|
+
}
|
|
29707
|
+
};
|
|
29708
|
+
};
|
|
29709
|
+
function handleList(data, coloumns) {
|
|
29710
|
+
var resultList = Array.isArray(data) ? data : Array.isArray(data === null || data === void 0 ? void 0 : data.list) ? data.list : Array.isArray(data === null || data === void 0 ? void 0 : data.items) ? data.items : [];
|
|
29711
|
+
return formatListName(resultList, coloumns);
|
|
29712
|
+
}
|
|
29713
|
+
function handleListToTal(data) {
|
|
29714
|
+
return Array.isArray(data) ? data.length : data.total || data.totalCount;
|
|
29715
|
+
}
|
|
29716
|
+
|
|
29717
|
+
// 路径
|
|
29718
|
+
function convertPath(path, formData) {
|
|
29719
|
+
var matchedGF = path.match(/G\d+F\d+/g);
|
|
29720
|
+
var matchedJavaCode = path.match(/{\w+\.\w+}/g);
|
|
29721
|
+
var url = path;
|
|
29722
|
+
if (!matchedGF && !matchedJavaCode) return url;
|
|
29723
|
+
if (matchedGF === null || matchedGF === void 0 ? void 0 : matchedGF.length) {
|
|
29724
|
+
matchedGF.map(function (item) {
|
|
29725
|
+
var _formData$group;
|
|
29726
|
+
var group = item.match(/G\d+/);
|
|
29727
|
+
var field = item.match(/F\d+/);
|
|
29728
|
+
var replaceValue = (formData === null || formData === void 0 ? void 0 : (_formData$group = formData[group]) === null || _formData$group === void 0 ? void 0 : _formData$group[field]) || (formData === null || formData === void 0 ? void 0 : formData[field]);
|
|
29729
|
+
url = url.replace(item, replaceValue);
|
|
29730
|
+
});
|
|
29731
|
+
} else if (matchedJavaCode === null || matchedJavaCode === void 0 ? void 0 : matchedJavaCode.length) {
|
|
29732
|
+
matchedJavaCode.map(function (item) {
|
|
29733
|
+
var group, field;
|
|
29734
|
+
try {
|
|
29735
|
+
var val = item.replace(/[{}]/g, '').split('.');
|
|
29736
|
+
group = val[0];
|
|
29737
|
+
field = val[1];
|
|
29738
|
+
} catch (e) {}
|
|
29739
|
+
if (group && field) {
|
|
29740
|
+
var _formData$group2;
|
|
29741
|
+
var replaceValue = (formData === null || formData === void 0 ? void 0 : (_formData$group2 = formData[group]) === null || _formData$group2 === void 0 ? void 0 : _formData$group2[field]) || (formData === null || formData === void 0 ? void 0 : formData[field]);
|
|
29742
|
+
url = url.replace(item, replaceValue);
|
|
29743
|
+
}
|
|
29744
|
+
});
|
|
29745
|
+
}
|
|
29746
|
+
return url;
|
|
29747
|
+
}
|
|
29748
|
+
|
|
29749
|
+
// 组装数据接口请求
|
|
29750
|
+
function assembleRequest(customSelectorConfig, _ref3) {
|
|
29751
|
+
var _customSelectorConfig, _customSelectorConfig2, _customSelectorConfig3;
|
|
29752
|
+
var isSearchForm = _ref3.isSearchForm,
|
|
29753
|
+
newestFormData = _ref3.newestFormData,
|
|
29754
|
+
searchFormData = _ref3.searchFormData;
|
|
29755
|
+
var functionInfo = customSelectorConfig === null || customSelectorConfig === void 0 ? void 0 : (_customSelectorConfig = customSelectorConfig.businessFunction) === null || _customSelectorConfig === void 0 ? void 0 : (_customSelectorConfig2 = _customSelectorConfig.functionInfo) === null || _customSelectorConfig2 === void 0 ? void 0 : (_customSelectorConfig3 = _customSelectorConfig2.actionList) === null || _customSelectorConfig3 === void 0 ? void 0 : _customSelectorConfig3[0];
|
|
29756
|
+
var requestTemplate = functionInfo === null || functionInfo === void 0 ? void 0 : functionInfo.requestTemplate;
|
|
29757
|
+
if (!functionInfo || !requestTemplate) {
|
|
29758
|
+
return false;
|
|
29759
|
+
}
|
|
29760
|
+
var isGet = requestTemplate.method.toLowerCase() === 'get';
|
|
29761
|
+
var requestBodyName = isGet ? 'params' : 'data';
|
|
29762
|
+
var params = requestTemplate.param;
|
|
29763
|
+
try {
|
|
29764
|
+
params = JSON.parse(requestTemplate.param);
|
|
29765
|
+
} catch (e) {}
|
|
29766
|
+
var path = requestTemplate.path;
|
|
29767
|
+
var requestBody = isGet ? params : requestTemplate.requestBody;
|
|
29768
|
+
if (!isSearchForm) {
|
|
29769
|
+
// 非查询表格,普通表格的数据组装
|
|
29770
|
+
path = convertPath(requestTemplate.path, newestFormData);
|
|
29771
|
+
requestBody = convertBody(requestBody, newestFormData);
|
|
29772
|
+
} else if (isSearchForm) {
|
|
29773
|
+
// 查询表格数据组装,key会带有qp- 和 -eq,并且转换成map的数据格式
|
|
29774
|
+
var newSearchFormData = convertToMapByKey(deleteQuerySymbol(searchFormData));
|
|
29775
|
+
path = convertPath(requestTemplate.path, newSearchFormData);
|
|
29776
|
+
requestBody = convertBody(requestBody, newSearchFormData);
|
|
29777
|
+
}
|
|
29778
|
+
var requestConfig = _defineProperty(_defineProperty({
|
|
29779
|
+
url: path,
|
|
29780
|
+
method: requestTemplate.method,
|
|
29781
|
+
headers: requestTemplate.header
|
|
29782
|
+
}, requestBodyName, requestBody), "serviceName", functionInfo.serviceName || (requestTemplate === null || requestTemplate === void 0 ? void 0 : requestTemplate.serviceName));
|
|
29783
|
+
return requestConfig;
|
|
29784
|
+
}
|
|
29785
|
+
|
|
29786
|
+
// 请求体
|
|
29787
|
+
function convertBody(param, formData) {
|
|
29788
|
+
var keys = Object.keys(param || {});
|
|
29789
|
+
if (!keys.length) return {};
|
|
29790
|
+
var result = {};
|
|
29791
|
+
keys.map(function (key) {
|
|
29792
|
+
var _param$key$match, _param$key$match2;
|
|
29793
|
+
var matchedGF = (_param$key$match = param[key].match(/G\d+F\d+/)) === null || _param$key$match === void 0 ? void 0 : _param$key$match[0];
|
|
29794
|
+
var matchedJavaCode = (_param$key$match2 = param[key].match(/{\w+\.\w+}/)) === null || _param$key$match2 === void 0 ? void 0 : _param$key$match2[0];
|
|
29795
|
+
if (matchedGF) {
|
|
29796
|
+
var _formData$group3;
|
|
29797
|
+
var group = matchedGF.match(/G\d+/);
|
|
29798
|
+
var field = matchedGF.match(/F\d+/);
|
|
29799
|
+
// 有值才赋值 【当formData中的值key是GxxxFxxx形式时】
|
|
29800
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$group3 = formData[group]) === null || _formData$group3 === void 0 ? void 0 : _formData$group3[field]) && formData[group][field] !== '') {
|
|
29801
|
+
if (Array.isArray(formData[group][field])) {
|
|
29802
|
+
result[key] = formData[group][field].join(',');
|
|
29803
|
+
} else {
|
|
29804
|
+
result[key] = formData[group][field];
|
|
29805
|
+
}
|
|
29806
|
+
}
|
|
29807
|
+
// 有值才赋值 【当formData中的值key是Fxxx形式时】
|
|
29808
|
+
if ((formData === null || formData === void 0 ? void 0 : formData[field]) && formData[field] !== '') {
|
|
29809
|
+
if (Array.isArray(formData[field])) {
|
|
29810
|
+
result[key] = formData[field].join(',');
|
|
29811
|
+
} else {
|
|
29812
|
+
result[key] = formData[field];
|
|
29813
|
+
}
|
|
29814
|
+
}
|
|
29815
|
+
} else if (matchedJavaCode) {
|
|
29816
|
+
var _formData$_group;
|
|
29817
|
+
var _group, _field;
|
|
29818
|
+
try {
|
|
29819
|
+
var _matchedJavaCode$repl = matchedJavaCode.replace(/[{}]/g).split('.');
|
|
29820
|
+
var _matchedJavaCode$repl2 = _slicedToArray(_matchedJavaCode$repl, 2);
|
|
29821
|
+
_group = _matchedJavaCode$repl2[0];
|
|
29822
|
+
_field = _matchedJavaCode$repl2[1];
|
|
29823
|
+
} catch (e) {}
|
|
29824
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$_group = formData[_group]) === null || _formData$_group === void 0 ? void 0 : _formData$_group[_field]) && formData[_group][_field] !== '') {
|
|
29825
|
+
if (Array.isArray(formData[_group][_field])) {
|
|
29826
|
+
result[key] = formData[_group][_field].join(',');
|
|
29827
|
+
} else {
|
|
29828
|
+
result[key] = formData[_group][_field];
|
|
29829
|
+
}
|
|
29830
|
+
}
|
|
29831
|
+
} else {
|
|
29832
|
+
if (param[key] !== '') {
|
|
29833
|
+
result[key] = param[key];
|
|
29834
|
+
}
|
|
29835
|
+
}
|
|
29836
|
+
});
|
|
29837
|
+
return result;
|
|
29838
|
+
}
|
|
29839
|
+
|
|
29840
|
+
var CustomSelectorModal = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29841
|
+
var _props$ctx, _props$ctx2, _props$ctx2$form, _Object$keys, _Object$keys2, _props$ctx3, _props$customSelector3, _props$customSelector4, _props$customSelector5, _ref3, _fieldMappingItem$cod, _props$selectProps4;
|
|
29842
|
+
useImperativeHandle(ref, function () {
|
|
29843
|
+
return {
|
|
29844
|
+
handleOk: handleOk,
|
|
29845
|
+
refreshSelectSource: refreshSelectSource
|
|
29846
|
+
};
|
|
29847
|
+
});
|
|
29848
|
+
var prop = convertProp(props === null || props === void 0 ? void 0 : (_props$ctx = props.ctx) === null || _props$ctx === void 0 ? void 0 : _props$ctx.name, props.isSearchForm);
|
|
29849
|
+
var newFormData = (props === null || props === void 0 ? void 0 : (_props$ctx2 = props.ctx) === null || _props$ctx2 === void 0 ? void 0 : (_props$ctx2$form = _props$ctx2.form) === null || _props$ctx2$form === void 0 ? void 0 : _props$ctx2$form.getFieldsValue()) || {};
|
|
29850
|
+
var newestFormData = newFormData && ((_Object$keys = Object.keys(newFormData)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) ? newFormData : (props === null || props === void 0 ? void 0 : props.formData) || {}; // 最新的formData,用来下面监听最新值的改变,做级联效果
|
|
29851
|
+
var searchFormData = newFormData && ((_Object$keys2 = Object.keys(newFormData)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) ? newFormData : (props === null || props === void 0 ? void 0 : props.formData) || {}; // 如果是表格上面的查询表单情况
|
|
29852
|
+
var isView = (props === null || props === void 0 ? void 0 : (_props$ctx3 = props.ctx) === null || _props$ctx3 === void 0 ? void 0 : _props$ctx3.mode) == 'view';
|
|
29853
|
+
var queryTableRef = useRef(null);
|
|
29854
|
+
var _useState = useState({}),
|
|
29855
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29856
|
+
requestConfig = _useState2[0],
|
|
29857
|
+
setRequestConfig = _useState2[1];
|
|
29858
|
+
var _useState3 = useState({
|
|
29859
|
+
pages: {
|
|
29860
|
+
page: 1,
|
|
29861
|
+
limit: 20,
|
|
29862
|
+
total: 0
|
|
29863
|
+
},
|
|
29864
|
+
columns: [],
|
|
29865
|
+
fields: [],
|
|
29866
|
+
dataList: [],
|
|
29867
|
+
currentQuery: {},
|
|
29868
|
+
selectedLine: {}
|
|
29869
|
+
}),
|
|
29870
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29871
|
+
tableState = _useState4[0],
|
|
29872
|
+
setTableState = _useState4[1];
|
|
29873
|
+
var handleOpen = /*#__PURE__*/function () {
|
|
29874
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
29875
|
+
var _props$customSelector, _props$customSelector2, _props$ctx4, _props$value, _props$value$map, _props$ctx5, _props$ctx5$form, _props$selectProps;
|
|
29876
|
+
var requestConfigNew, metaDataId, metaData, realMetaData, columns, fields, initValue, _queryTableRef$curren, _queryTableRef$curren2, _queryTableRef$curren3;
|
|
29877
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29878
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29879
|
+
case 0:
|
|
29880
|
+
requestConfigNew = assembleRequest(props.customSelectorConfig, {
|
|
29881
|
+
isSearchForm: props.isSearchForm,
|
|
29882
|
+
newestFormData: newestFormData,
|
|
29883
|
+
searchFormData: searchFormData
|
|
29884
|
+
});
|
|
29885
|
+
if (requestConfigNew) {
|
|
29886
|
+
_context.next = 3;
|
|
29887
|
+
break;
|
|
29888
|
+
}
|
|
29889
|
+
return _context.abrupt("return");
|
|
29890
|
+
case 3:
|
|
29891
|
+
metaDataId = (_props$customSelector = props.customSelectorConfig) === null || _props$customSelector === void 0 ? void 0 : (_props$customSelector2 = _props$customSelector.targetMetaData) === null || _props$customSelector2 === void 0 ? void 0 : _props$customSelector2.id;
|
|
29892
|
+
_context.next = 6;
|
|
29893
|
+
return getMetaData(metaDataId);
|
|
29894
|
+
case 6:
|
|
29895
|
+
metaData = _context.sent;
|
|
29896
|
+
realMetaData = (metaData === null || metaData === void 0 ? void 0 : metaData.filter(function (item) {
|
|
29897
|
+
return (item === null || item === void 0 ? void 0 : item.inputType) != 1;
|
|
29898
|
+
})) || [];
|
|
29899
|
+
columns = realMetaData.map(function (item) {
|
|
29900
|
+
return getColumnItem({
|
|
29901
|
+
item: item,
|
|
29902
|
+
props: props
|
|
29903
|
+
});
|
|
29904
|
+
}); // tableState.columns = columns
|
|
29905
|
+
fields = realMetaData === null || realMetaData === void 0 ? void 0 : realMetaData.filter(function (item) {
|
|
29906
|
+
var _item$infoVo;
|
|
29907
|
+
return (_item$infoVo = item.infoVo) === null || _item$infoVo === void 0 ? void 0 : _item$infoVo.isQuery;
|
|
29908
|
+
}).map(function (item) {
|
|
29909
|
+
var name = "qp-".concat(item.code, "-eq");
|
|
29910
|
+
try {
|
|
29911
|
+
if (JSON.parse(item.info).isLikeQuery) {
|
|
29912
|
+
name = "qp-".concat(item.code, "-like");
|
|
29913
|
+
}
|
|
29914
|
+
} catch (e) {
|
|
29915
|
+
console.log('error', e);
|
|
29916
|
+
}
|
|
29917
|
+
return {
|
|
29918
|
+
name: name,
|
|
29919
|
+
label: item.name,
|
|
29920
|
+
field: 'input'
|
|
29921
|
+
};
|
|
29922
|
+
});
|
|
29923
|
+
setTableState(_objectSpread2(_objectSpread2({}, tableState), {}, {
|
|
29924
|
+
columns: columns,
|
|
29925
|
+
fields: fields
|
|
29926
|
+
}));
|
|
29927
|
+
setRequestConfig(requestConfigNew);
|
|
29928
|
+
initValue = !(props === null || props === void 0 ? void 0 : (_props$ctx4 = props.ctx) === null || _props$ctx4 === void 0 ? void 0 : _props$ctx4.form) && (props === null || props === void 0 ? void 0 : (_props$value = props.value) === null || _props$value === void 0 ? void 0 : (_props$value$map = _props$value.map) === null || _props$value$map === void 0 ? void 0 : _props$value$map.call(_props$value, function (v) {
|
|
29929
|
+
return v.key || v;
|
|
29930
|
+
})) || (props === null || props === void 0 ? void 0 : (_props$ctx5 = props.ctx) === null || _props$ctx5 === void 0 ? void 0 : (_props$ctx5$form = _props$ctx5.form) === null || _props$ctx5$form === void 0 ? void 0 : _props$ctx5$form.getFieldValue(props.id));
|
|
29931
|
+
if ((props === null || props === void 0 ? void 0 : (_props$selectProps = props.selectProps) === null || _props$selectProps === void 0 ? void 0 : _props$selectProps.multipleForQuery) && !isView && initValue) {
|
|
29932
|
+
// @ts-ignore
|
|
29933
|
+
queryTableRef === null || queryTableRef === void 0 ? void 0 : (_queryTableRef$curren = queryTableRef.current) === null || _queryTableRef$curren === void 0 ? void 0 : (_queryTableRef$curren2 = _queryTableRef$curren.tableRef) === null || _queryTableRef$curren2 === void 0 ? void 0 : (_queryTableRef$curren3 = _queryTableRef$curren2.current) === null || _queryTableRef$curren3 === void 0 ? void 0 : _queryTableRef$curren3.bsSetSelectInfo(initValue);
|
|
29934
|
+
}
|
|
29935
|
+
case 14:
|
|
29936
|
+
case "end":
|
|
29937
|
+
return _context.stop();
|
|
29938
|
+
}
|
|
29939
|
+
}, _callee);
|
|
29940
|
+
}));
|
|
29941
|
+
return function handleOpen() {
|
|
29942
|
+
return _ref.apply(this, arguments);
|
|
29943
|
+
};
|
|
29944
|
+
}();
|
|
29945
|
+
var fieldMapping = ((_props$customSelector3 = props.customSelectorConfig) === null || _props$customSelector3 === void 0 ? void 0 : _props$customSelector3.fieldMapping) || [];
|
|
29946
|
+
var fieldMappingItem = fieldMapping.find(function (item) {
|
|
29947
|
+
return item.codeMappingTo === prop;
|
|
29948
|
+
});
|
|
29949
|
+
var echoLabel = (_props$customSelector4 = props.customSelectorConfig) === null || _props$customSelector4 === void 0 ? void 0 : (_props$customSelector5 = _props$customSelector4.extraData) === null || _props$customSelector5 === void 0 ? void 0 : _props$customSelector5.echoLabel;
|
|
29950
|
+
//初始获取下拉列表
|
|
29951
|
+
var fetchFieldSource = function fetchFieldSource(obj, init) {
|
|
29952
|
+
var _params$path;
|
|
29953
|
+
var url = obj.url,
|
|
29954
|
+
method = obj.method,
|
|
29955
|
+
convertParams = obj.convertParams,
|
|
29956
|
+
converter = obj.converter;
|
|
29957
|
+
var params = convertParams({
|
|
29958
|
+
params: _objectSpread2({
|
|
29959
|
+
pageSize: 20,
|
|
29960
|
+
currentPage: 1
|
|
29961
|
+
}, init)
|
|
29962
|
+
});
|
|
29963
|
+
// 容错处理
|
|
29964
|
+
if (!(params === null || params === void 0 ? void 0 : params.path) || (params === null || params === void 0 ? void 0 : (_params$path = params.path) === null || _params$path === void 0 ? void 0 : _params$path.indexOf('undefined')) > -1) return;
|
|
29965
|
+
request$2({
|
|
29966
|
+
url: url,
|
|
29967
|
+
method: method,
|
|
29968
|
+
params: params
|
|
29969
|
+
}).then(function (res) {
|
|
29970
|
+
var _converter = converter({
|
|
29971
|
+
data: res
|
|
29972
|
+
}),
|
|
29973
|
+
list = _converter.list;
|
|
29974
|
+
var currentField = fieldMappingItem;
|
|
29975
|
+
var sourceList = [];
|
|
29976
|
+
var codeList = [];
|
|
29977
|
+
var options = list.map(function (item) {
|
|
29978
|
+
if (currentField && echoLabel) {
|
|
29979
|
+
return {
|
|
29980
|
+
label: item[echoLabel],
|
|
29981
|
+
value: item[currentField.codeMappingFrom]
|
|
29982
|
+
};
|
|
29983
|
+
}
|
|
29984
|
+
if (echoLabel && !currentField) {
|
|
29985
|
+
return {
|
|
29986
|
+
label: item[echoLabel],
|
|
29987
|
+
value: item[echoLabel]
|
|
29988
|
+
};
|
|
29989
|
+
}
|
|
29990
|
+
return {
|
|
29991
|
+
label: item[currentField.codeMappingTo],
|
|
29992
|
+
value: item[currentField.codeMappingTo]
|
|
29993
|
+
};
|
|
29994
|
+
});
|
|
29995
|
+
options.forEach(function (item) {
|
|
29996
|
+
if (!codeList.includes(item.value)) {
|
|
29997
|
+
codeList.push(item.value);
|
|
29998
|
+
sourceList.push(item);
|
|
29999
|
+
}
|
|
30000
|
+
});
|
|
30001
|
+
props.setFieldSource(sourceList);
|
|
30002
|
+
props.setAllListData(list || []);
|
|
30003
|
+
});
|
|
30004
|
+
};
|
|
30005
|
+
useEffect(function () {
|
|
30006
|
+
if (props.visible) {
|
|
30007
|
+
handleOpen();
|
|
30008
|
+
}
|
|
30009
|
+
}, [props.visible]);
|
|
30010
|
+
var refreshSelectSource = function refreshSelectSource() {
|
|
30011
|
+
var init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
30012
|
+
var requestConfigNew = assembleRequest(props.customSelectorConfig, {
|
|
30013
|
+
isSearchForm: props.isSearchForm,
|
|
30014
|
+
newestFormData: newestFormData,
|
|
30015
|
+
searchFormData: searchFormData
|
|
30016
|
+
});
|
|
30017
|
+
var obj = remoteFetch(requestConfigNew);
|
|
30018
|
+
//初始化请求下拉列表
|
|
30019
|
+
fetchFieldSource(obj, init);
|
|
30020
|
+
};
|
|
30021
|
+
useEffect(function () {
|
|
30022
|
+
var _props$ctx6, _props$ctx7, _props$ctx7$form;
|
|
30023
|
+
var isNeedBack = (props === null || props === void 0 ? void 0 : (_props$ctx6 = props.ctx) === null || _props$ctx6 === void 0 ? void 0 : _props$ctx6.mode) != 'create' || props.disabled;
|
|
30024
|
+
var initValue = props === null || props === void 0 ? void 0 : (_props$ctx7 = props.ctx) === null || _props$ctx7 === void 0 ? void 0 : (_props$ctx7$form = _props$ctx7.form) === null || _props$ctx7$form === void 0 ? void 0 : _props$ctx7$form.getFieldValue(props.id);
|
|
30025
|
+
var formCodeKey = "".concat(fieldMappingItem === null || fieldMappingItem === void 0 ? void 0 : fieldMappingItem.codeMappingFrom);
|
|
30026
|
+
var initKey = Array.isArray(initValue) && (initValue === null || initValue === void 0 ? void 0 : initValue.length) > 1 ? "qp-".concat(formCodeKey, "-in") : "qp-".concat(formCodeKey, "-eq");
|
|
30027
|
+
var initParams = isNeedBack && formCodeKey && initValue ? _defineProperty({}, initKey, Array.isArray(initValue) ? initValue.join(',') : initValue) : {};
|
|
30028
|
+
refreshSelectSource(null, initParams);
|
|
30029
|
+
}, []);
|
|
30030
|
+
var remoteDataSource = useMemo(function () {
|
|
30031
|
+
if (Object.keys(requestConfig).length) {
|
|
30032
|
+
var obj = remoteFetch(requestConfig, tableState.columns);
|
|
30033
|
+
return obj;
|
|
30034
|
+
} else {
|
|
30035
|
+
return {};
|
|
30036
|
+
}
|
|
30037
|
+
}, [requestConfig, tableState.columns]);
|
|
30038
|
+
var rowKey = (_ref3 = (_fieldMappingItem$cod = fieldMappingItem === null || fieldMappingItem === void 0 ? void 0 : fieldMappingItem.codeMappingFrom) !== null && _fieldMappingItem$cod !== void 0 ? _fieldMappingItem$cod : 'id') !== null && _ref3 !== void 0 ? _ref3 : 'code';
|
|
30039
|
+
var handleOk = function handleOk(rowData) {
|
|
30040
|
+
var _props$selectProps2, _props$customSelector6, _props$customSelector7, _queryTableRef$curren13, _queryTableRef$curren14, _queryTableRef$curren15;
|
|
30041
|
+
var setSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
30042
|
+
//多选数据处理
|
|
30043
|
+
if (props === null || props === void 0 ? void 0 : (_props$selectProps2 = props.selectProps) === null || _props$selectProps2 === void 0 ? void 0 : _props$selectProps2.multipleForQuery) {
|
|
30044
|
+
var _queryTableRef$curren4, _queryTableRef$curren5, _queryTableRef$curren6, _queryTableRef$curren7, _queryTableRef$curren8, _queryTableRef$curren9;
|
|
30045
|
+
// @ts-ignore
|
|
30046
|
+
var selectedKesys = (queryTableRef === null || queryTableRef === void 0 ? void 0 : (_queryTableRef$curren4 = queryTableRef.current) === null || _queryTableRef$curren4 === void 0 ? void 0 : (_queryTableRef$curren5 = _queryTableRef$curren4.tableRef) === null || _queryTableRef$curren5 === void 0 ? void 0 : (_queryTableRef$curren6 = _queryTableRef$curren5.current) === null || _queryTableRef$curren6 === void 0 ? void 0 : _queryTableRef$curren6.getSelectedRowKeys()) || [];
|
|
30047
|
+
// @ts-ignore
|
|
30048
|
+
var selectedRows = (queryTableRef === null || queryTableRef === void 0 ? void 0 : (_queryTableRef$curren7 = queryTableRef.current) === null || _queryTableRef$curren7 === void 0 ? void 0 : (_queryTableRef$curren8 = _queryTableRef$curren7.tableRef) === null || _queryTableRef$curren8 === void 0 ? void 0 : (_queryTableRef$curren9 = _queryTableRef$curren8.current) === null || _queryTableRef$curren9 === void 0 ? void 0 : _queryTableRef$curren9.getSelectedRows()) || [];
|
|
30049
|
+
var realSelectedRows = selectedRows;
|
|
30050
|
+
if (!rowData && (selectedKesys === null || selectedKesys === void 0 ? void 0 : selectedKesys.length) !== (selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length)) {
|
|
30051
|
+
var _queryTableRef$curren10, _queryTableRef$curren11, _queryTableRef$curren12;
|
|
30052
|
+
// @ts-ignore
|
|
30053
|
+
var dataSource = (queryTableRef === null || queryTableRef === void 0 ? void 0 : (_queryTableRef$curren10 = queryTableRef.current) === null || _queryTableRef$curren10 === void 0 ? void 0 : (_queryTableRef$curren11 = _queryTableRef$curren10.tableRef) === null || _queryTableRef$curren11 === void 0 ? void 0 : (_queryTableRef$curren12 = _queryTableRef$curren11.current) === null || _queryTableRef$curren12 === void 0 ? void 0 : _queryTableRef$curren12.getDataSource()) || [];
|
|
30054
|
+
realSelectedRows = dataSource === null || dataSource === void 0 ? void 0 : dataSource.filter(function (s) {
|
|
30055
|
+
return selectedKesys.includes(s[rowKey]);
|
|
30056
|
+
});
|
|
30057
|
+
}
|
|
30058
|
+
//@ts-ignore
|
|
30059
|
+
var rowDataList = rowData ? rowData : realSelectedRows;
|
|
30060
|
+
var rowDataTemp = {};
|
|
30061
|
+
rowDataList.forEach(function (item, index) {
|
|
30062
|
+
Object.keys(item).forEach(function (key) {
|
|
30063
|
+
if (!Reflect.has(rowDataTemp, key)) {
|
|
30064
|
+
rowDataTemp[key] = [item[key]];
|
|
30065
|
+
} else {
|
|
30066
|
+
rowDataTemp[key].push(item[key]);
|
|
30067
|
+
//数组去重
|
|
30068
|
+
rowDataTemp[key] = _toConsumableArray(new Set(rowDataTemp[key]));
|
|
30069
|
+
}
|
|
30070
|
+
});
|
|
30071
|
+
});
|
|
30072
|
+
rowData = rowDataTemp;
|
|
30073
|
+
}
|
|
30074
|
+
var mappings = props.customSelectorConfig.fieldMapping;
|
|
30075
|
+
var values = {};
|
|
30076
|
+
//没有映射且有echoLabel的话,默认塞入一条
|
|
30077
|
+
if ((!mappings || Array.isArray(mappings) && !mappings.length) && ((_props$customSelector6 = props.customSelectorConfig) === null || _props$customSelector6 === void 0 ? void 0 : (_props$customSelector7 = _props$customSelector6.extraData) === null || _props$customSelector7 === void 0 ? void 0 : _props$customSelector7.echoLabel)) {
|
|
30078
|
+
var _props$customSelector8, _props$customSelector9;
|
|
30079
|
+
mappings.push({
|
|
30080
|
+
codeMappingFrom: (_props$customSelector8 = props.customSelectorConfig) === null || _props$customSelector8 === void 0 ? void 0 : (_props$customSelector9 = _props$customSelector8.extraData) === null || _props$customSelector9 === void 0 ? void 0 : _props$customSelector9.echoLabel,
|
|
30081
|
+
codeMappingTo: prop,
|
|
30082
|
+
uuid: ''
|
|
30083
|
+
});
|
|
30084
|
+
}
|
|
30085
|
+
mappings.map(function (item) {
|
|
30086
|
+
var _props$customSelector10, _props$customSelector11, _props$customSelector12, _props$customSelector13;
|
|
30087
|
+
if (((_props$customSelector10 = props.customSelectorConfig) === null || _props$customSelector10 === void 0 ? void 0 : (_props$customSelector11 = _props$customSelector10.extraData) === null || _props$customSelector11 === void 0 ? void 0 : _props$customSelector11.echoLabel) && item.codeMappingTo === prop && rowData[(_props$customSelector12 = props.customSelectorConfig) === null || _props$customSelector12 === void 0 ? void 0 : (_props$customSelector13 = _props$customSelector12.extraData) === null || _props$customSelector13 === void 0 ? void 0 : _props$customSelector13.echoLabel]) {
|
|
30088
|
+
var _props$customSelector14, _props$customSelector15;
|
|
30089
|
+
values["".concat(item.codeMappingTo, "Name")] = rowData[(_props$customSelector14 = props.customSelectorConfig) === null || _props$customSelector14 === void 0 ? void 0 : (_props$customSelector15 = _props$customSelector14.extraData) === null || _props$customSelector15 === void 0 ? void 0 : _props$customSelector15.echoLabel];
|
|
30090
|
+
}
|
|
30091
|
+
values[item.codeMappingTo] = rowData[item.codeMappingFrom];
|
|
30092
|
+
});
|
|
30093
|
+
// 表单查询项就不给其他字段赋值
|
|
30094
|
+
if (!props.isSearchForm) {
|
|
30095
|
+
Object.keys(values).map(function (key, index, list) {
|
|
30096
|
+
if (key.includes('Name')) {
|
|
30097
|
+
var valueKey = key.replace('Name', '');
|
|
30098
|
+
if (setSource) {
|
|
30099
|
+
if (Array.isArray(values[valueKey])) {
|
|
30100
|
+
var valueList = [];
|
|
30101
|
+
values[valueKey].forEach(function (item, index) {
|
|
30102
|
+
valueList.push({
|
|
30103
|
+
label: values[key][index],
|
|
30104
|
+
value: values[valueKey][index]
|
|
30105
|
+
});
|
|
30106
|
+
});
|
|
30107
|
+
props.setFieldSource(valueList);
|
|
30108
|
+
} else {
|
|
30109
|
+
props.setFieldSource([{
|
|
30110
|
+
label: values[key],
|
|
30111
|
+
value: values[valueKey]
|
|
30112
|
+
}]);
|
|
30113
|
+
}
|
|
30114
|
+
}
|
|
30115
|
+
} else {
|
|
30116
|
+
var _props$setFieldValue;
|
|
30117
|
+
props === null || props === void 0 ? void 0 : (_props$setFieldValue = props.setFieldValue) === null || _props$setFieldValue === void 0 ? void 0 : _props$setFieldValue.call(props, key, values[key]);
|
|
30118
|
+
}
|
|
30119
|
+
});
|
|
30120
|
+
} else {
|
|
30121
|
+
var _props$ctx8;
|
|
30122
|
+
if (setSource) {
|
|
30123
|
+
if (Array.isArray(values[prop])) {
|
|
30124
|
+
var valueList = [];
|
|
30125
|
+
values[prop].forEach(function (item, index) {
|
|
30126
|
+
valueList.push({
|
|
30127
|
+
label: values["".concat(prop, "Name")][index],
|
|
30128
|
+
value: values[prop][index]
|
|
30129
|
+
});
|
|
30130
|
+
});
|
|
30131
|
+
props.setFieldSource(valueList);
|
|
30132
|
+
} else {
|
|
30133
|
+
props.setFieldSource([{
|
|
30134
|
+
label: values["".concat(prop, "Name")],
|
|
30135
|
+
value: values[prop]
|
|
30136
|
+
}]);
|
|
30137
|
+
}
|
|
30138
|
+
}
|
|
30139
|
+
var fieldKey = (props === null || props === void 0 ? void 0 : (_props$ctx8 = props.ctx) === null || _props$ctx8 === void 0 ? void 0 : _props$ctx8.name) || prop;
|
|
30140
|
+
props.setFieldValue(fieldKey, values[prop], props.fieldSource);
|
|
30141
|
+
}
|
|
30142
|
+
props.onCancel();
|
|
30143
|
+
//@ts-ignore
|
|
30144
|
+
queryTableRef === null || queryTableRef === void 0 ? void 0 : (_queryTableRef$curren13 = queryTableRef.current) === null || _queryTableRef$curren13 === void 0 ? void 0 : (_queryTableRef$curren14 = _queryTableRef$curren13.tableRef) === null || _queryTableRef$curren14 === void 0 ? void 0 : (_queryTableRef$curren15 = _queryTableRef$curren14.current) === null || _queryTableRef$curren15 === void 0 ? void 0 : _queryTableRef$curren15.clearRowSelection();
|
|
30145
|
+
};
|
|
30146
|
+
var config = useMemo(function () {
|
|
30147
|
+
var _props$selectProps3, _props$ctx9, _props$value2, _props$ctx10, _props$ctx10$form;
|
|
30148
|
+
var returnConfig = {
|
|
30149
|
+
size: 'small',
|
|
30150
|
+
needPageHeader: false,
|
|
30151
|
+
tableWrapperStyle: {},
|
|
30152
|
+
isHorizontally: false,
|
|
30153
|
+
rowSelection: (props === null || props === void 0 ? void 0 : (_props$selectProps3 = props.selectProps) === null || _props$selectProps3 === void 0 ? void 0 : _props$selectProps3.multipleForQuery) && !isView ? {
|
|
30154
|
+
selectedRowKeys: !(props === null || props === void 0 ? void 0 : (_props$ctx9 = props.ctx) === null || _props$ctx9 === void 0 ? void 0 : _props$ctx9.form) && (props === null || props === void 0 ? void 0 : (_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.map(function (v) {
|
|
30155
|
+
return v.key || v;
|
|
30156
|
+
})) || (props === null || props === void 0 ? void 0 : (_props$ctx10 = props.ctx) === null || _props$ctx10 === void 0 ? void 0 : (_props$ctx10$form = _props$ctx10.form) === null || _props$ctx10$form === void 0 ? void 0 : _props$ctx10$form.getFieldValue(props.id))
|
|
30157
|
+
} : false,
|
|
30158
|
+
remoteDataSource: remoteDataSource,
|
|
30159
|
+
fields: tableState.fields,
|
|
30160
|
+
columns: tableState.columns,
|
|
30161
|
+
rowKey: rowKey,
|
|
30162
|
+
tableProps: !isView && {
|
|
30163
|
+
rowClassName: function rowClassName(record) {
|
|
30164
|
+
var _props$ctx11, _props$value3, _props$ctx12, _props$ctx12$form;
|
|
30165
|
+
return record[rowKey] == (!(props === null || props === void 0 ? void 0 : (_props$ctx11 = props.ctx) === null || _props$ctx11 === void 0 ? void 0 : _props$ctx11.form) && ((props === null || props === void 0 ? void 0 : (_props$value3 = props.value) === null || _props$value3 === void 0 ? void 0 : _props$value3.key) || (props === null || props === void 0 ? void 0 : props.value)) || (props === null || props === void 0 ? void 0 : (_props$ctx12 = props.ctx) === null || _props$ctx12 === void 0 ? void 0 : (_props$ctx12$form = _props$ctx12.form) === null || _props$ctx12$form === void 0 ? void 0 : _props$ctx12$form.getFieldValue(props.id))) ? 'tableSelectedRow' : '';
|
|
30166
|
+
},
|
|
30167
|
+
onRow: function onRow(record) {
|
|
30168
|
+
return {
|
|
30169
|
+
onDoubleClick: function onDoubleClick() {
|
|
30170
|
+
handleOk(record);
|
|
30171
|
+
} //双击
|
|
30172
|
+
};
|
|
30173
|
+
}
|
|
30174
|
+
} || {}
|
|
30175
|
+
};
|
|
30176
|
+
if (Object.keys(remoteDataSource).length) {
|
|
30177
|
+
return returnConfig;
|
|
30178
|
+
} else {
|
|
30179
|
+
return false;
|
|
30180
|
+
}
|
|
30181
|
+
}, [tableState, remoteDataSource]);
|
|
30182
|
+
return /*#__PURE__*/React$1.createElement(Modal, {
|
|
30183
|
+
title: "",
|
|
30184
|
+
width: 1300,
|
|
30185
|
+
open: props.visible,
|
|
30186
|
+
footer: null,
|
|
30187
|
+
onCancel: function onCancel() {
|
|
30188
|
+
props.onCancel();
|
|
30189
|
+
},
|
|
30190
|
+
destroyOnClose: true
|
|
30191
|
+
}, config && /*#__PURE__*/React$1.createElement(QueryTable, _objectSpread2({
|
|
30192
|
+
ref: queryTableRef
|
|
30193
|
+
}, config)), (props === null || props === void 0 ? void 0 : (_props$selectProps4 = props.selectProps) === null || _props$selectProps4 === void 0 ? void 0 : _props$selectProps4.multipleForQuery) && !isView && ( /*#__PURE__*/React$1.createElement(Row, {
|
|
30194
|
+
justify: "center",
|
|
30195
|
+
style: {
|
|
30196
|
+
marginBottom: 30,
|
|
30197
|
+
marginTop: 10
|
|
30198
|
+
}
|
|
30199
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
30200
|
+
type: "primary",
|
|
30201
|
+
style: {
|
|
30202
|
+
marginRight: 20
|
|
30203
|
+
},
|
|
30204
|
+
onClick: function onClick() {
|
|
30205
|
+
return handleOk();
|
|
30206
|
+
}
|
|
30207
|
+
}, "\u63D0\u4EA4"), /*#__PURE__*/React$1.createElement(Button, {
|
|
30208
|
+
type: "default",
|
|
30209
|
+
onClick: function onClick() {
|
|
30210
|
+
var _queryTableRef$curren16, _queryTableRef$curren17, _queryTableRef$curren18;
|
|
30211
|
+
props.onCancel();
|
|
30212
|
+
//@ts-ignore
|
|
30213
|
+
queryTableRef === null || queryTableRef === void 0 ? void 0 : (_queryTableRef$curren16 = queryTableRef.current) === null || _queryTableRef$curren16 === void 0 ? void 0 : (_queryTableRef$curren17 = _queryTableRef$curren16.tableRef) === null || _queryTableRef$curren17 === void 0 ? void 0 : (_queryTableRef$curren18 = _queryTableRef$curren17.current) === null || _queryTableRef$curren18 === void 0 ? void 0 : _queryTableRef$curren18.clearRowSelection();
|
|
30214
|
+
}
|
|
30215
|
+
}, "\u53D6\u6D88"))));
|
|
30216
|
+
});
|
|
30217
|
+
|
|
30218
|
+
var CustomSelector = (function (props) {
|
|
30219
|
+
var _props$ctx, _props$customSelector3, _props$customSelector4, _props$customSelector5, _props$selectProps2, _props$ctx4, _props$ctx5, _props$ctx6, _props$ctx6$form;
|
|
30220
|
+
var showType = useMemo(function () {
|
|
30221
|
+
var _props$customSelector, _props$customSelector2;
|
|
30222
|
+
return (props === null || props === void 0 ? void 0 : (_props$customSelector = props.customSelectorConfig) === null || _props$customSelector === void 0 ? void 0 : (_props$customSelector2 = _props$customSelector.extraData) === null || _props$customSelector2 === void 0 ? void 0 : _props$customSelector2.showType) || 'modalTable';
|
|
30223
|
+
}, [props]);
|
|
30224
|
+
var _useState = useState({
|
|
30225
|
+
visible: false,
|
|
30226
|
+
onShow: function onShow() {
|
|
30227
|
+
setModalConfig(_objectSpread2(_objectSpread2({}, modalConfig), {}, {
|
|
30228
|
+
visible: true
|
|
30229
|
+
}));
|
|
30230
|
+
},
|
|
30231
|
+
onCancel: function onCancel() {
|
|
30232
|
+
setModalConfig(_objectSpread2(_objectSpread2({}, modalConfig), {}, {
|
|
30233
|
+
visible: false
|
|
30234
|
+
}));
|
|
30235
|
+
}
|
|
30236
|
+
}),
|
|
30237
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30238
|
+
modalConfig = _useState2[0],
|
|
30239
|
+
setModalConfig = _useState2[1];
|
|
30240
|
+
var _useState3 = useState([]),
|
|
30241
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
30242
|
+
fieldSource = _useState4[0],
|
|
30243
|
+
setFieldSource = _useState4[1];
|
|
30244
|
+
var _useState5 = useState([]),
|
|
30245
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
30246
|
+
allListData = _useState6[0],
|
|
30247
|
+
setAllListData = _useState6[1];
|
|
30248
|
+
var customRef = useRef();
|
|
30249
|
+
var prop = convertProp(props === null || props === void 0 ? void 0 : (_props$ctx = props.ctx) === null || _props$ctx === void 0 ? void 0 : _props$ctx.name, props.isSearchForm);
|
|
30250
|
+
var fieldMapping = ((_props$customSelector3 = props.customSelectorConfig) === null || _props$customSelector3 === void 0 ? void 0 : _props$customSelector3.fieldMapping) || [];
|
|
30251
|
+
var fieldMappingItem = fieldMapping.find(function (item) {
|
|
30252
|
+
return item.codeMappingTo === prop;
|
|
30253
|
+
});
|
|
30254
|
+
var echoLabel = (_props$customSelector4 = props.customSelectorConfig) === null || _props$customSelector4 === void 0 ? void 0 : (_props$customSelector5 = _props$customSelector4.extraData) === null || _props$customSelector5 === void 0 ? void 0 : _props$customSelector5.echoLabel;
|
|
30255
|
+
useEffect(function () {
|
|
30256
|
+
if (props.source && noEmptyArray(props.source)) {
|
|
30257
|
+
var source = (props === null || props === void 0 ? void 0 : props.source) || [];
|
|
30258
|
+
if ((source === null || source === void 0 ? void 0 : source[0]) === true) {
|
|
30259
|
+
var _customRef$current;
|
|
30260
|
+
//@ts-ignore
|
|
30261
|
+
customRef === null || customRef === void 0 ? void 0 : (_customRef$current = customRef.current) === null || _customRef$current === void 0 ? void 0 : _customRef$current.refreshSelectSource();
|
|
30262
|
+
} else if ((source === null || source === void 0 ? void 0 : source[0]) === false) {
|
|
30263
|
+
var _customRef$current2;
|
|
30264
|
+
//@ts-ignore
|
|
30265
|
+
customRef === null || customRef === void 0 ? void 0 : (_customRef$current2 = customRef.current) === null || _customRef$current2 === void 0 ? void 0 : _customRef$current2.refreshSelectSource(true);
|
|
30266
|
+
}
|
|
30267
|
+
}
|
|
30268
|
+
}, [props.source]);
|
|
30269
|
+
var setFieldValue = function setFieldValue(key, value, sourceList) {
|
|
30270
|
+
var _props$ctx2, _props$ctx2$form, _props$ctx2$form$setF, _props$onChange;
|
|
30271
|
+
props === null || props === void 0 ? void 0 : (_props$ctx2 = props.ctx) === null || _props$ctx2 === void 0 ? void 0 : (_props$ctx2$form = _props$ctx2.form) === null || _props$ctx2$form === void 0 ? void 0 : (_props$ctx2$form$setF = _props$ctx2$form.setFieldValue) === null || _props$ctx2$form$setF === void 0 ? void 0 : _props$ctx2$form$setF.call(_props$ctx2$form, key, value);
|
|
30272
|
+
props === null || props === void 0 ? void 0 : (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, value, sourceList);
|
|
30273
|
+
};
|
|
30274
|
+
var onChange = function onChange(value) {
|
|
30275
|
+
if (!value) return;
|
|
30276
|
+
var dataItem = allListData.filter(function (item) {
|
|
30277
|
+
return Array.isArray(value) ? value.includes(item === null || item === void 0 ? void 0 : item[(fieldMappingItem === null || fieldMappingItem === void 0 ? void 0 : fieldMappingItem.codeMappingFrom) || echoLabel]) : (item === null || item === void 0 ? void 0 : item[(fieldMappingItem === null || fieldMappingItem === void 0 ? void 0 : fieldMappingItem.codeMappingFrom) || echoLabel]) == value;
|
|
30278
|
+
}) || [];
|
|
30279
|
+
if (showType === 'modalTable') {
|
|
30280
|
+
var _props$selectProps, _customRef$current3;
|
|
30281
|
+
var rowData = (props === null || props === void 0 ? void 0 : (_props$selectProps = props.selectProps) === null || _props$selectProps === void 0 ? void 0 : _props$selectProps.multipleForQuery) ? dataItem : (dataItem === null || dataItem === void 0 ? void 0 : dataItem[0]) || {};
|
|
30282
|
+
//@ts-ignore
|
|
30283
|
+
customRef === null || customRef === void 0 ? void 0 : (_customRef$current3 = customRef.current) === null || _customRef$current3 === void 0 ? void 0 : _customRef$current3.handleOk(rowData, false);
|
|
30284
|
+
} else {
|
|
30285
|
+
var _props$ctx3;
|
|
30286
|
+
setFieldValue((_props$ctx3 = props.ctx) === null || _props$ctx3 === void 0 ? void 0 : _props$ctx3.name, value, fieldSource);
|
|
30287
|
+
}
|
|
30288
|
+
};
|
|
30289
|
+
var multipleForQuery = props === null || props === void 0 ? void 0 : (_props$selectProps2 = props.selectProps) === null || _props$selectProps2 === void 0 ? void 0 : _props$selectProps2.multipleForQuery;
|
|
30290
|
+
var isView = (props === null || props === void 0 ? void 0 : (_props$ctx4 = props.ctx) === null || _props$ctx4 === void 0 ? void 0 : _props$ctx4.mode) == 'view';
|
|
30291
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
30292
|
+
style: {
|
|
30293
|
+
display: 'flex'
|
|
30294
|
+
}
|
|
30295
|
+
}, /*#__PURE__*/React$1.createElement(Select, _objectSpread2(_objectSpread2({}, props === null || props === void 0 ? void 0 : props.selectProps), {}, {
|
|
30296
|
+
showSearch: true,
|
|
30297
|
+
optionFilterProp: 'label',
|
|
30298
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
30299
|
+
onChange: onChange,
|
|
30300
|
+
options: fieldSource,
|
|
30301
|
+
value: !(props === null || props === void 0 ? void 0 : (_props$ctx5 = props.ctx) === null || _props$ctx5 === void 0 ? void 0 : _props$ctx5.form) && (props === null || props === void 0 ? void 0 : props.value) || (props === null || props === void 0 ? void 0 : (_props$ctx6 = props.ctx) === null || _props$ctx6 === void 0 ? void 0 : (_props$ctx6$form = _props$ctx6.form) === null || _props$ctx6$form === void 0 ? void 0 : _props$ctx6$form.getFieldValue(props.id)),
|
|
30302
|
+
disabled: isView || props.disabled,
|
|
30303
|
+
mode: multipleForQuery ? 'multiple' : undefined,
|
|
30304
|
+
allowClear: props === null || props === void 0 ? void 0 : props.allowClear,
|
|
30305
|
+
onClear: function onClear() {
|
|
30306
|
+
var _props$ctx7;
|
|
30307
|
+
return setFieldValue((_props$ctx7 = props.ctx) === null || _props$ctx7 === void 0 ? void 0 : _props$ctx7.name, multipleForQuery ? [] : '', fieldSource);
|
|
30308
|
+
}
|
|
30309
|
+
})), showType === 'modalTable' && ( /*#__PURE__*/React$1.createElement(Button, {
|
|
30310
|
+
type: "primary",
|
|
30311
|
+
style: {
|
|
30312
|
+
width: '30px',
|
|
30313
|
+
display: 'flex',
|
|
30314
|
+
justifyContent: 'center',
|
|
30315
|
+
alignItems: 'center'
|
|
30316
|
+
},
|
|
30317
|
+
onClick: function onClick() {
|
|
30318
|
+
modalConfig.onShow();
|
|
30319
|
+
},
|
|
30320
|
+
disabled: props.disabled
|
|
30321
|
+
}, /*#__PURE__*/React$1.createElement(SearchOutlined, {
|
|
30322
|
+
className: "site-form-item-icon"
|
|
30323
|
+
}))), /*#__PURE__*/React$1.createElement(CustomSelectorModal, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
30324
|
+
ref: customRef
|
|
30325
|
+
}, modalConfig), props), {}, {
|
|
30326
|
+
showType: showType,
|
|
30327
|
+
fieldSource: fieldSource,
|
|
30328
|
+
setFieldSource: setFieldSource,
|
|
30329
|
+
setFieldValue: setFieldValue,
|
|
30330
|
+
setAllListData: setAllListData,
|
|
30331
|
+
ismultiple: multipleForQuery
|
|
30332
|
+
})));
|
|
30333
|
+
});
|
|
30334
|
+
|
|
29473
30335
|
var RangePicker = DatePicker.RangePicker;
|
|
29474
30336
|
var RuleField = /*#__PURE__*/function (_Component) {
|
|
29475
30337
|
function RuleField(props) {
|
|
@@ -29635,7 +30497,12 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
29635
30497
|
callback = _this$props2.callback,
|
|
29636
30498
|
queryIdentify = _this$props2.queryIdentify,
|
|
29637
30499
|
disabled = _this$props2.disabled,
|
|
29638
|
-
customerWidth = _this$props2.customerWidth
|
|
30500
|
+
customerWidth = _this$props2.customerWidth,
|
|
30501
|
+
_this$props2$itemDeta = _this$props2.itemDetail,
|
|
30502
|
+
itemDetail = _this$props2$itemDeta === void 0 ? {} : _this$props2$itemDeta,
|
|
30503
|
+
_this$props2$others = _this$props2.others,
|
|
30504
|
+
others = _this$props2$others === void 0 ? {} : _this$props2$others,
|
|
30505
|
+
propertyCode = _this$props2.propertyCode;
|
|
29639
30506
|
var thresholdList = _this.state.thresholdList;
|
|
29640
30507
|
var styleCommon = {
|
|
29641
30508
|
width: customerWidth || '150px'
|
|
@@ -31866,6 +32733,147 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
31866
32733
|
});
|
|
31867
32734
|
}
|
|
31868
32735
|
}
|
|
32736
|
+
// 自定义选择器
|
|
32737
|
+
if (dataChoiceBusinessType == 40) {
|
|
32738
|
+
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|
|
32739
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(CustomSelector, {
|
|
32740
|
+
selectProps: _objectSpread2(_objectSpread2({
|
|
32741
|
+
style: styleCommon,
|
|
32742
|
+
placeholder: '请选择'
|
|
32743
|
+
}, dataInputBusinessType === 12 ? {
|
|
32744
|
+
mode: 'multiple',
|
|
32745
|
+
maxTagCount: 1,
|
|
32746
|
+
multipleForQuery: true
|
|
32747
|
+
} : {}), {}, {
|
|
32748
|
+
getPopupContainer: function getPopupContainer() {
|
|
32749
|
+
return document.body;
|
|
32750
|
+
}
|
|
32751
|
+
}),
|
|
32752
|
+
ctx: {
|
|
32753
|
+
name: propertyCode || (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.propertyPath)
|
|
32754
|
+
},
|
|
32755
|
+
isSearchForm: true,
|
|
32756
|
+
customSelectorConfig: (others === null || others === void 0 ? void 0 : others.customSelectorConfig) || {},
|
|
32757
|
+
disabled: disabled,
|
|
32758
|
+
value: values[0],
|
|
32759
|
+
onChange: function onChange(value, sourceList) {
|
|
32760
|
+
if (dataInputBusinessType === 12) {
|
|
32761
|
+
var _value$map, _sourceList$filter;
|
|
32762
|
+
values[0] = (value === null || value === void 0 ? void 0 : (_value$map = value.map) === null || _value$map === void 0 ? void 0 : _value$map.call(value, function (i) {
|
|
32763
|
+
return i;
|
|
32764
|
+
})) || [];
|
|
32765
|
+
valueNames[0] = (sourceList === null || sourceList === void 0 ? void 0 : (_sourceList$filter = sourceList.filter(function (s) {
|
|
32766
|
+
return s.value == value;
|
|
32767
|
+
})) === null || _sourceList$filter === void 0 ? void 0 : _sourceList$filter.map(function (i) {
|
|
32768
|
+
return i.label || '';
|
|
32769
|
+
})) || [];
|
|
32770
|
+
} else {
|
|
32771
|
+
var _sourceList$find;
|
|
32772
|
+
var vLabel = sourceList === null || sourceList === void 0 ? void 0 : (_sourceList$find = sourceList.find(function (s) {
|
|
32773
|
+
return s.value == value;
|
|
32774
|
+
})) === null || _sourceList$find === void 0 ? void 0 : _sourceList$find.label;
|
|
32775
|
+
values[0] = value ? [value] : [];
|
|
32776
|
+
valueNames[0] = vLabel ? [vLabel] : [];
|
|
32777
|
+
}
|
|
32778
|
+
callback(values, valueNames);
|
|
32779
|
+
}
|
|
32780
|
+
}), /*#__PURE__*/React$1.createElement("span", null, "~"), /*#__PURE__*/React$1.createElement(CustomSelector, {
|
|
32781
|
+
selectProps: _objectSpread2(_objectSpread2({
|
|
32782
|
+
style: styleCommon,
|
|
32783
|
+
placeholder: '请选择'
|
|
32784
|
+
}, dataInputBusinessType === 12 ? {
|
|
32785
|
+
mode: 'multiple',
|
|
32786
|
+
maxTagCount: 1,
|
|
32787
|
+
multipleForQuery: true
|
|
32788
|
+
} : {}), {}, {
|
|
32789
|
+
getPopupContainer: function getPopupContainer() {
|
|
32790
|
+
return document.body;
|
|
32791
|
+
}
|
|
32792
|
+
}),
|
|
32793
|
+
ctx: {
|
|
32794
|
+
name: propertyCode || (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.propertyPath)
|
|
32795
|
+
},
|
|
32796
|
+
isSearchForm: true,
|
|
32797
|
+
customSelectorConfig: (others === null || others === void 0 ? void 0 : others.customSelectorConfig) || {},
|
|
32798
|
+
disabled: disabled,
|
|
32799
|
+
value: values[1],
|
|
32800
|
+
onChange: function onChange(value, sourceList) {
|
|
32801
|
+
if (dataInputBusinessType === 12) {
|
|
32802
|
+
var _value$map2, _sourceList$filter2;
|
|
32803
|
+
values[1] = (value === null || value === void 0 ? void 0 : (_value$map2 = value.map) === null || _value$map2 === void 0 ? void 0 : _value$map2.call(value, function (i) {
|
|
32804
|
+
return i;
|
|
32805
|
+
})) || [];
|
|
32806
|
+
valueNames[1] = (sourceList === null || sourceList === void 0 ? void 0 : (_sourceList$filter2 = sourceList.filter(function (s) {
|
|
32807
|
+
return s.value == value;
|
|
32808
|
+
})) === null || _sourceList$filter2 === void 0 ? void 0 : _sourceList$filter2.map(function (i) {
|
|
32809
|
+
return i.label || '';
|
|
32810
|
+
})) || [];
|
|
32811
|
+
} else {
|
|
32812
|
+
var _sourceList$find2;
|
|
32813
|
+
var vLabel = sourceList === null || sourceList === void 0 ? void 0 : (_sourceList$find2 = sourceList.find(function (s) {
|
|
32814
|
+
return s.value == value;
|
|
32815
|
+
})) === null || _sourceList$find2 === void 0 ? void 0 : _sourceList$find2.label;
|
|
32816
|
+
values[1] = value ? [value] : [];
|
|
32817
|
+
valueNames[1] = vLabel ? [vLabel] : [];
|
|
32818
|
+
}
|
|
32819
|
+
callback(values, valueNames);
|
|
32820
|
+
}
|
|
32821
|
+
}));
|
|
32822
|
+
} else {
|
|
32823
|
+
var _values14;
|
|
32824
|
+
var _currentValue13 = dataInputBusinessType === 12 ? ((_values14 = values) === null || _values14 === void 0 ? void 0 : _values14.map(function (s, vIndex) {
|
|
32825
|
+
return {
|
|
32826
|
+
key: s,
|
|
32827
|
+
label: valueNames[vIndex]
|
|
32828
|
+
};
|
|
32829
|
+
})) || [] : values[0] && {
|
|
32830
|
+
key: values[0],
|
|
32831
|
+
label: valueNames[0]
|
|
32832
|
+
} || {};
|
|
32833
|
+
return /*#__PURE__*/React$1.createElement(CustomSelector, {
|
|
32834
|
+
selectProps: _objectSpread2(_objectSpread2({
|
|
32835
|
+
style: styleCommon,
|
|
32836
|
+
placeholder: '请选择'
|
|
32837
|
+
}, dataInputBusinessType === 12 ? {
|
|
32838
|
+
mode: 'multiple',
|
|
32839
|
+
maxTagCount: 1,
|
|
32840
|
+
multipleForQuery: true
|
|
32841
|
+
} : {}), {}, {
|
|
32842
|
+
getPopupContainer: function getPopupContainer() {
|
|
32843
|
+
return document.body;
|
|
32844
|
+
}
|
|
32845
|
+
}),
|
|
32846
|
+
ctx: {
|
|
32847
|
+
name: propertyCode || (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.propertyPath)
|
|
32848
|
+
},
|
|
32849
|
+
isSearchForm: true,
|
|
32850
|
+
customSelectorConfig: (others === null || others === void 0 ? void 0 : others.customSelectorConfig) || {},
|
|
32851
|
+
disabled: disabled,
|
|
32852
|
+
value: _currentValue13,
|
|
32853
|
+
onChange: function onChange(value, sourceList) {
|
|
32854
|
+
if (dataInputBusinessType === 12) {
|
|
32855
|
+
var _value$map3, _sourceList$filter3;
|
|
32856
|
+
values = (value === null || value === void 0 ? void 0 : (_value$map3 = value.map) === null || _value$map3 === void 0 ? void 0 : _value$map3.call(value, function (i) {
|
|
32857
|
+
return i;
|
|
32858
|
+
})) || [];
|
|
32859
|
+
valueNames = (sourceList === null || sourceList === void 0 ? void 0 : (_sourceList$filter3 = sourceList.filter(function (s) {
|
|
32860
|
+
return s.value == value;
|
|
32861
|
+
})) === null || _sourceList$filter3 === void 0 ? void 0 : _sourceList$filter3.map(function (i) {
|
|
32862
|
+
return i.label || '';
|
|
32863
|
+
})) || [];
|
|
32864
|
+
} else {
|
|
32865
|
+
var _sourceList$find3;
|
|
32866
|
+
var vLabel = sourceList === null || sourceList === void 0 ? void 0 : (_sourceList$find3 = sourceList.find(function (s) {
|
|
32867
|
+
return s.value == value;
|
|
32868
|
+
})) === null || _sourceList$find3 === void 0 ? void 0 : _sourceList$find3.label;
|
|
32869
|
+
values = value ? [value] : [];
|
|
32870
|
+
valueNames = vLabel ? [vLabel] : [];
|
|
32871
|
+
}
|
|
32872
|
+
callback(values, valueNames);
|
|
32873
|
+
}
|
|
32874
|
+
});
|
|
32875
|
+
}
|
|
32876
|
+
}
|
|
31869
32877
|
} else {
|
|
31870
32878
|
if (dataTypeCode == 22 || dataTypeCode == 21 || dataTypeCode == 24 || dataTypeCode == 23) {
|
|
31871
32879
|
//数值22, 字符串21, 布尔类型24, long23
|
|
@@ -31988,6 +32996,7 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
31988
32996
|
dataTypeCode: '',
|
|
31989
32997
|
dataChoiceBusinessType: '',
|
|
31990
32998
|
dataInputBusinessType: '',
|
|
32999
|
+
others: {},
|
|
31991
33000
|
fieldValues: [],
|
|
31992
33001
|
thresholdQuery: {},
|
|
31993
33002
|
thresholdList: [],
|
|
@@ -32005,6 +33014,7 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
32005
33014
|
dataTypeCode = _this$props3.dataTypeCode,
|
|
32006
33015
|
dataChoiceBusinessType = _this$props3.dataChoiceBusinessType,
|
|
32007
33016
|
dataInputBusinessType = _this$props3.dataInputBusinessType,
|
|
33017
|
+
others = _this$props3.others,
|
|
32008
33018
|
options = _this$props3.options,
|
|
32009
33019
|
values = _this$props3.values,
|
|
32010
33020
|
initialThresholdQuery = _this$props3.initialThresholdQuery,
|
|
@@ -32017,6 +33027,7 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
32017
33027
|
dataTypeCode: dataTypeCode,
|
|
32018
33028
|
dataChoiceBusinessType: dataChoiceBusinessType,
|
|
32019
33029
|
dataInputBusinessType: dataInputBusinessType,
|
|
33030
|
+
others: others,
|
|
32020
33031
|
fieldValues: _toConsumableArray(values),
|
|
32021
33032
|
options: options
|
|
32022
33033
|
}, function () {
|
|
@@ -32053,6 +33064,11 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
32053
33064
|
dataInputBusinessType: nextProps.dataInputBusinessType
|
|
32054
33065
|
});
|
|
32055
33066
|
}
|
|
33067
|
+
if (nextProps.others != this.props.others) {
|
|
33068
|
+
this.setState({
|
|
33069
|
+
others: nextProps.others
|
|
33070
|
+
});
|
|
33071
|
+
}
|
|
32056
33072
|
// if (nextProps.selectOperation != this.props.selectOperation) {
|
|
32057
33073
|
// this.setState({
|
|
32058
33074
|
// options: nextProps.options
|
|
@@ -32599,6 +33615,7 @@ var InnerSelect = (function (props) {
|
|
|
32599
33615
|
|
|
32600
33616
|
var RangePicker$1 = DatePicker.RangePicker;
|
|
32601
33617
|
function RenderCompItem(props) {
|
|
33618
|
+
var _others;
|
|
32602
33619
|
var regularDataList = props.regularDataList,
|
|
32603
33620
|
ites = props.ites,
|
|
32604
33621
|
showValue = props.showValue,
|
|
@@ -33153,6 +34170,29 @@ function RenderCompItem(props) {
|
|
|
33153
34170
|
getPopupContainer: function getPopupContainer() {
|
|
33154
34171
|
return document.body;
|
|
33155
34172
|
}
|
|
34173
|
+
})) || null, ((ites === null || ites === void 0 ? void 0 : ites.inputType) === 20 || (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30) && (ites === null || ites === void 0 ? void 0 : ites.choiceType) === 40 && ( /*#__PURE__*/React$1.createElement(CustomSelector, {
|
|
34174
|
+
selectProps: _objectSpread2(_objectSpread2({
|
|
34175
|
+
style: styleCommon,
|
|
34176
|
+
placeholder: '请选择'
|
|
34177
|
+
}, (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30 ? {
|
|
34178
|
+
mode: 'multiple',
|
|
34179
|
+
maxTagCount: 1,
|
|
34180
|
+
multipleForQuery: true
|
|
34181
|
+
} : {}), {}, {
|
|
34182
|
+
getPopupContainer: function getPopupContainer() {
|
|
34183
|
+
return document.body;
|
|
34184
|
+
}
|
|
34185
|
+
}),
|
|
34186
|
+
ctx: {
|
|
34187
|
+
name: ites.code
|
|
34188
|
+
},
|
|
34189
|
+
isSearchForm: true,
|
|
34190
|
+
customSelectorConfig: ((_others = others) === null || _others === void 0 ? void 0 : _others.customSelectorConfig) || {},
|
|
34191
|
+
disabled: disabled,
|
|
34192
|
+
value: showValue(ites.code),
|
|
34193
|
+
onChange: function onChange(value) {
|
|
34194
|
+
handleEdit(ites.code, value);
|
|
34195
|
+
}
|
|
33156
34196
|
})) || null, (ites === null || ites === void 0 ? void 0 : ites.inputType) === 40 && ( /*#__PURE__*/React$1.createElement("div", {
|
|
33157
34197
|
style: {
|
|
33158
34198
|
display: 'flex'
|
|
@@ -33227,7 +34267,10 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
33227
34267
|
dataTypeCode: element.valueType,
|
|
33228
34268
|
dataChoiceBusinessType: element.choiceType,
|
|
33229
34269
|
dataInputBusinessType: element.inputType,
|
|
33230
|
-
info: element.info
|
|
34270
|
+
info: element.info,
|
|
34271
|
+
otherMainInfo: {
|
|
34272
|
+
customSelectorConfig: element.customSelectorConfig
|
|
34273
|
+
}
|
|
33231
34274
|
};
|
|
33232
34275
|
if (element === null || element === void 0 ? void 0 : (_element$propertyList = element.propertyList) === null || _element$propertyList === void 0 ? void 0 : _element$propertyList.length) {
|
|
33233
34276
|
child.children = _this.parseChildTreeData(element.propertyList, "".concat(element.code), "".concat(item.name, "-").concat(element.name), item.code);
|
|
@@ -33278,7 +34321,10 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
33278
34321
|
dataTypeCode: element.valueType,
|
|
33279
34322
|
dataChoiceBusinessType: element.choiceType,
|
|
33280
34323
|
dataInputBusinessType: element.inputType,
|
|
33281
|
-
info: element.info
|
|
34324
|
+
info: element.info,
|
|
34325
|
+
otherMainInfo: {
|
|
34326
|
+
customSelectorConfig: element.customSelectorConfig
|
|
34327
|
+
}
|
|
33282
34328
|
};
|
|
33283
34329
|
if (element.propertyList) {
|
|
33284
34330
|
child.children = _this.parseChildTreeData(element.propertyList, "".concat(parentKey, ".").concat(element.code), "".concat(parentTitle, "-").concat(element.name), rootObjCode);
|
|
@@ -33677,6 +34723,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
33677
34723
|
alignItems: 'center'
|
|
33678
34724
|
}
|
|
33679
34725
|
}, /*#__PURE__*/React$1.createElement(TreeSelect, {
|
|
34726
|
+
showSearch: true,
|
|
34727
|
+
treeNodeFilterProp: "title",
|
|
33680
34728
|
value: itemDetail.elementId,
|
|
33681
34729
|
disabled: disabled,
|
|
33682
34730
|
onChange: function onChange(value, name, nodeInfo) {
|
|
@@ -33737,6 +34785,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
33737
34785
|
// propertyCode={`${itemDetail.metaObjectCode}.${itemDetail.propertyPath}`}
|
|
33738
34786
|
,
|
|
33739
34787
|
relateDatas: relateDatas,
|
|
34788
|
+
others: currentTreeItem === null || currentTreeItem === void 0 ? void 0 : currentTreeItem.otherMainInfo,
|
|
33740
34789
|
values: itemDetail.params || [],
|
|
33741
34790
|
valueNames: itemDetail.paramNames || [],
|
|
33742
34791
|
callback: function callback(newValues, newValueNames) {
|
|
@@ -34324,12 +35373,12 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
34324
35373
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
34325
35374
|
className: 'base_rule_content'
|
|
34326
35375
|
}, headerButtonComponentFun ? headerButtonComponentFun(this.handleAddRule) : /*#__PURE__*/React$1.createElement("div", {
|
|
34327
|
-
disabled: disabled,
|
|
34328
35376
|
style: {
|
|
34329
35377
|
display: onlyOneRule ? 'none' : 'block'
|
|
34330
35378
|
},
|
|
34331
35379
|
className: 'base_rule_line_title'
|
|
34332
35380
|
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
35381
|
+
disabled: disabled,
|
|
34333
35382
|
onClick: this.handleAddRule,
|
|
34334
35383
|
className: 'base_rule_btn_style',
|
|
34335
35384
|
type: "link"
|
|
@@ -35360,4 +36409,4 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
35360
36409
|
})));
|
|
35361
36410
|
});
|
|
35362
36411
|
|
|
35363
|
-
export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, AuthButton, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, ColumnsEdit, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, HandleTotalCount, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect, authFunc, calculateValidPeriod, checkQuantityAccuracy, createUniqID, downloadExcel, ergodicMenuRoutes, _formatter as formatter, getAccountID, getAccountId, getBreadcrumbNameMap, getCommonInfoKey, getConfigTableColumns, getCurrentTargetBgId, getCurrentTenantId, getDictionarySource, getDictionaryTextByValue, getEmployeeCode, getEmployeeId, getItemDefaultWidth$1 as getItemDefaultWidth, getJoinDictionaryText, getLastKey, getLimitMenuDataKey, getLocalStorageSaveKey, getMenuAuthDataKey, getSessionId, getSkuImg, getTenantList, getUserId, getUserName, go2BackAndClose, handleAntdColumnsSpecialParams, handleBaseUrlPre, handleBeforeUpload, handleBssulaColumnsSpecialParams, handleCommonTimeRender$1 as handleCommonTimeRender, handleError, handleExport, handleExportBarCode, handleJudgeAuthButtons, handleOssUrl, handleRequestAuthHeader, handleRequestUrl, handleStatusBadge, handleTextBreakSpaces, handleTextDouble$1 as handleTextDouble, handleTextDoubleOrId, handleTextLineFeed$1 as handleTextLineFeed, handleTextOverflow$1 as handleTextOverflow, handleTextTooltip, handleTextWarp, handleTextWarpCustom, handleTooltip$1 as handleTooltip, handleTooltipHours$1 as handleTooltipHours, handleUserPhone, judgeIsEmpty, judgeIsRequestError, judgeIsRequestSuccess, keyToWord, memoizeOneFormatter, noEmptyArr, paramsControl, parseWidth, precisionQuantity, randomString, readerXlsxToList, removeCurrentTenantId, removeTenantList, renderFixed2, renderNumberText, saveCurrentTenantId, saveTenantList, setConfigTableColumns, shouldUseAuth, socketFunctions, sulaTableRenderTooltip, tableColumnsImage$1 as tableColumnsImage, textIcon, updateGuanDate, userColumns$1 as userColumns, userInfoCard$1 as userInfoCard, uuid, writeListToXlsx };
|
|
36412
|
+
export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, AuthButton, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, ColumnsEdit, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, HandleTotalCount, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect, authFunc, calculateValidPeriod, checkQuantityAccuracy, createUniqID, downloadExcel, ergodicMenuRoutes, _formatter as formatter, getAccountID, getAccountId, getBreadcrumbNameMap, getCommonInfoKey, getConfigTableColumns, getCurrentTargetBgId, getCurrentTenantId, getDictionarySource, getDictionaryTextByValue, getEmployeeCode, getEmployeeId, getItemDefaultWidth$1 as getItemDefaultWidth, getJoinDictionaryText, getLastKey, getLimitMenuDataKey, getLocalStorageSaveKey, getMenuAuthDataKey, getSessionId, getSkuImg, getTenantList, getUserId, getUserName, go2BackAndClose, handleAntdColumnsSpecialParams, handleBaseUrlPre, handleBeforeUpload, handleBssulaColumnsSpecialParams, handleCommonTimeRender$1 as handleCommonTimeRender, handleConvertResponse, handleError, handleExport, handleExportBarCode, handleJudgeAuthButtons, handleOssUrl, handleRequestAuthHeader, handleRequestHeader, handleRequestUrl, handleStatusBadge, handleTextBreakSpaces, handleTextDouble$1 as handleTextDouble, handleTextDoubleOrId, handleTextLineFeed$1 as handleTextLineFeed, handleTextOverflow$1 as handleTextOverflow, handleTextTooltip, handleTextWarp, handleTextWarpCustom, handleTooltip$1 as handleTooltip, handleTooltipHours$1 as handleTooltipHours, handleUserPhone, judgeIsEmpty, judgeIsRequestError, judgeIsRequestSuccess, keyToWord, memoizeOneFormatter, noEmptyArr, noEmptyArray, paramsControl, parseWidth, precisionQuantity, randomString, readerXlsxToList, removeCurrentTenantId, removeTenantList, renderFixed2, renderNumberText, saveCurrentTenantId, saveTenantList, setConfigTableColumns, shouldUseAuth, socketFunctions, sulaTableRenderTooltip, tableColumnsImage$1 as tableColumnsImage, textIcon, updateGuanDate, userColumns$1 as userColumns, userInfoCard$1 as userInfoCard, uuid, writeListToXlsx };
|