@bit-sun/business-component 4.2.0-alpha.6.2 → 4.2.0-alpha.6.4
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/Business/SystemLog/index.d.ts +78 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +387 -55
- package/dist/index.js +388 -54
- package/dist/utils/utils.d.ts +41 -0
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +121 -25
- package/src/components/Business/SystemLog/index.md +37 -0
- package/src/components/Business/SystemLog/index.tsx +87 -0
- package/src/components/Business/columnSettingTable/index.tsx +7 -6
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +23 -22
- package/src/components/Functional/AddSelect/index.tsx +92 -0
- package/src/index.ts +2 -0
- package/src/utils/utils.ts +41 -1
package/dist/index.js
CHANGED
|
@@ -1477,6 +1477,45 @@ var handleConvertResponse = function handleConvertResponse(items, total) {
|
|
|
1477
1477
|
var noEmptyArray = function noEmptyArray(targetObj) {
|
|
1478
1478
|
return Array.isArray(targetObj) && targetObj.length !== 0;
|
|
1479
1479
|
};
|
|
1480
|
+
var formContainerAndItemLayout = function formContainerAndItemLayout(type, title, name) {
|
|
1481
|
+
return type === 'form' ? {
|
|
1482
|
+
container: {
|
|
1483
|
+
type: 'card',
|
|
1484
|
+
props: {
|
|
1485
|
+
title: title,
|
|
1486
|
+
id: Math.random(),
|
|
1487
|
+
level: 1,
|
|
1488
|
+
name: name
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
itemLayout: {
|
|
1492
|
+
span: 8,
|
|
1493
|
+
labelCol: {
|
|
1494
|
+
span: 8
|
|
1495
|
+
},
|
|
1496
|
+
wrapperCol: {
|
|
1497
|
+
span: 18
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
} : {
|
|
1501
|
+
container: {
|
|
1502
|
+
type: 'card',
|
|
1503
|
+
props: {
|
|
1504
|
+
title: title,
|
|
1505
|
+
id: Math.random(),
|
|
1506
|
+
level: 1,
|
|
1507
|
+
bordered: null,
|
|
1508
|
+
isWhiteCard: true,
|
|
1509
|
+
name: name
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
itemLayout: {
|
|
1513
|
+
wrapperCol: {
|
|
1514
|
+
span: 0
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
};
|
|
1518
|
+
};
|
|
1480
1519
|
|
|
1481
1520
|
// 判断某个按钮/菜单 是否有权限,返回布尔值
|
|
1482
1521
|
var authFunc = function authFunc(code) {
|
|
@@ -7836,6 +7875,116 @@ var AddSelect = function AddSelect(props) {
|
|
|
7836
7875
|
acc[key] = typeof value === 'function' ? value === null || value === void 0 ? void 0 : value(record) : value;
|
|
7837
7876
|
return acc;
|
|
7838
7877
|
}, {});
|
|
7878
|
+
// 可输入非数字字符
|
|
7879
|
+
if (item.canInputString) {
|
|
7880
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
7881
|
+
min: 0,
|
|
7882
|
+
precision: 0,
|
|
7883
|
+
controls: false
|
|
7884
|
+
}, inputProps), {}, {
|
|
7885
|
+
value: text || '',
|
|
7886
|
+
keyboard: false,
|
|
7887
|
+
onPressEnter: function onPressEnter(e) {
|
|
7888
|
+
e.target.blur();
|
|
7889
|
+
},
|
|
7890
|
+
onBlur: function () {
|
|
7891
|
+
var _onBlur = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
|
|
7892
|
+
var value;
|
|
7893
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7894
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
7895
|
+
case 0:
|
|
7896
|
+
value = e.target.value;
|
|
7897
|
+
record[item.dataIndex] = value;
|
|
7898
|
+
editRecord(record);
|
|
7899
|
+
case 3:
|
|
7900
|
+
case "end":
|
|
7901
|
+
return _context2.stop();
|
|
7902
|
+
}
|
|
7903
|
+
}, _callee2);
|
|
7904
|
+
}));
|
|
7905
|
+
function onBlur(_x7) {
|
|
7906
|
+
return _onBlur.apply(this, arguments);
|
|
7907
|
+
}
|
|
7908
|
+
return onBlur;
|
|
7909
|
+
}(),
|
|
7910
|
+
onKeyDown: function onKeyDown(e) {
|
|
7911
|
+
if (e.keyCode === 13 && e.ctrlKey) {
|
|
7912
|
+
var _document$getElementB;
|
|
7913
|
+
handleOk(true);
|
|
7914
|
+
(_document$getElementB = document.getElementById("first-query")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.focus();
|
|
7915
|
+
}
|
|
7916
|
+
if (e.keyCode === 8 && e.ctrlKey) {
|
|
7917
|
+
var _e$nativeEvent$path$;
|
|
7918
|
+
antd.message.success('删除当前行');
|
|
7919
|
+
e.stopPropagation();
|
|
7920
|
+
e.preventDefault();
|
|
7921
|
+
var dom = (_e$nativeEvent$path$ = e.nativeEvent.path[5].children[index + 2]) === null || _e$nativeEvent$path$ === void 0 ? void 0 : _e$nativeEvent$path$.getElementsByTagName('input')[currentIndex];
|
|
7922
|
+
if (dom) {
|
|
7923
|
+
dom.select();
|
|
7924
|
+
dom.focus();
|
|
7925
|
+
dom.scrollIntoView(false);
|
|
7926
|
+
}
|
|
7927
|
+
dom = null;
|
|
7928
|
+
deleteRecord(record);
|
|
7929
|
+
}
|
|
7930
|
+
if (e.keyCode === 37 && e.shiftKey) {
|
|
7931
|
+
var _e$nativeEvent$path$2;
|
|
7932
|
+
// 左滑动
|
|
7933
|
+
e.stopPropagation();
|
|
7934
|
+
e.preventDefault();
|
|
7935
|
+
var _dom = (_e$nativeEvent$path$2 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$2 === void 0 ? void 0 : _e$nativeEvent$path$2.getElementsByTagName('input')[currentIndex - 1];
|
|
7936
|
+
if (_dom) {
|
|
7937
|
+
_dom.select();
|
|
7938
|
+
_dom.focus();
|
|
7939
|
+
_dom.scrollIntoView(false);
|
|
7940
|
+
}
|
|
7941
|
+
_dom = null;
|
|
7942
|
+
}
|
|
7943
|
+
if (e.keyCode === 39 && e.shiftKey) {
|
|
7944
|
+
var _e$nativeEvent$path$3;
|
|
7945
|
+
// 右滑
|
|
7946
|
+
e.stopPropagation();
|
|
7947
|
+
e.preventDefault();
|
|
7948
|
+
var _dom2 = (_e$nativeEvent$path$3 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$3 === void 0 ? void 0 : _e$nativeEvent$path$3.getElementsByTagName('input')[currentIndex + 1];
|
|
7949
|
+
if (_dom2) {
|
|
7950
|
+
_dom2.select();
|
|
7951
|
+
_dom2.focus();
|
|
7952
|
+
_dom2.scrollIntoView(false);
|
|
7953
|
+
}
|
|
7954
|
+
_dom2 = null;
|
|
7955
|
+
}
|
|
7956
|
+
if (e.keyCode === 40) {
|
|
7957
|
+
var _e$nativeEvent$path$4;
|
|
7958
|
+
e.stopPropagation();
|
|
7959
|
+
e.preventDefault();
|
|
7960
|
+
var _dom3 = (_e$nativeEvent$path$4 = e.nativeEvent.path[5].children[index + 2]) === null || _e$nativeEvent$path$4 === void 0 ? void 0 : _e$nativeEvent$path$4.getElementsByTagName('input')[currentIndex];
|
|
7961
|
+
if (_dom3) {
|
|
7962
|
+
_dom3.select();
|
|
7963
|
+
_dom3.focus();
|
|
7964
|
+
_dom3.scrollIntoView(false);
|
|
7965
|
+
}
|
|
7966
|
+
_dom3 = null;
|
|
7967
|
+
} else if (e.keyCode === 38) {
|
|
7968
|
+
var _e$nativeEvent$path$5;
|
|
7969
|
+
e.stopPropagation();
|
|
7970
|
+
e.preventDefault();
|
|
7971
|
+
var dom1 = (_e$nativeEvent$path$5 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$5 === void 0 ? void 0 : _e$nativeEvent$path$5.getElementsByTagName('input')[currentIndex];
|
|
7972
|
+
if (dom1) {
|
|
7973
|
+
// dom1.value=""
|
|
7974
|
+
// dom1.setSelectionRange(100, 0);
|
|
7975
|
+
dom1.select();
|
|
7976
|
+
dom1.focus();
|
|
7977
|
+
dom1.scrollIntoViewIfNeeded(false);
|
|
7978
|
+
// dom1.value=record['count']
|
|
7979
|
+
}
|
|
7980
|
+
dom1 = null;
|
|
7981
|
+
} else if (e.keyCode === 9 && index === selectedRowKeys.length - 1 && currentIndex === inputLength - 1) {
|
|
7982
|
+
e.stopPropagation();
|
|
7983
|
+
e.preventDefault();
|
|
7984
|
+
}
|
|
7985
|
+
}
|
|
7986
|
+
}));
|
|
7987
|
+
}
|
|
7839
7988
|
return /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2(_objectSpread2({}, inputProps), {}, {
|
|
7840
7989
|
value: text || '',
|
|
7841
7990
|
min: 0,
|
|
@@ -7853,16 +8002,16 @@ var AddSelect = function AddSelect(props) {
|
|
|
7853
8002
|
// }}
|
|
7854
8003
|
onKeyDown: function onKeyDown(e) {
|
|
7855
8004
|
if (e.keyCode === 13 && e.ctrlKey) {
|
|
7856
|
-
var _document$
|
|
8005
|
+
var _document$getElementB2;
|
|
7857
8006
|
handleOk(true);
|
|
7858
|
-
(_document$
|
|
8007
|
+
(_document$getElementB2 = document.getElementById("first-query")) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.focus();
|
|
7859
8008
|
}
|
|
7860
8009
|
if (e.keyCode === 8 && e.ctrlKey) {
|
|
7861
|
-
var _e$nativeEvent$path
|
|
8010
|
+
var _e$nativeEvent$path$6;
|
|
7862
8011
|
antd.message.success('删除当前行');
|
|
7863
8012
|
e.stopPropagation();
|
|
7864
8013
|
e.preventDefault();
|
|
7865
|
-
var dom = (_e$nativeEvent$path$ = e.nativeEvent.path[5].children[index + 2]) === null || _e$nativeEvent$path$ === void 0 ? void 0 : _e$nativeEvent$path
|
|
8014
|
+
var dom = (_e$nativeEvent$path$6 = e.nativeEvent.path[5].children[index + 2]) === null || _e$nativeEvent$path$6 === void 0 ? void 0 : _e$nativeEvent$path$6.getElementsByTagName('input')[currentIndex];
|
|
7866
8015
|
if (dom) {
|
|
7867
8016
|
dom.select();
|
|
7868
8017
|
dom.focus();
|
|
@@ -7872,47 +8021,47 @@ var AddSelect = function AddSelect(props) {
|
|
|
7872
8021
|
deleteRecord(record);
|
|
7873
8022
|
}
|
|
7874
8023
|
if (e.keyCode === 37 && e.shiftKey) {
|
|
7875
|
-
var _e$nativeEvent$path$
|
|
8024
|
+
var _e$nativeEvent$path$7;
|
|
7876
8025
|
// 左滑动
|
|
7877
8026
|
e.stopPropagation();
|
|
7878
8027
|
e.preventDefault();
|
|
7879
|
-
var
|
|
7880
|
-
if (
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
8028
|
+
var _dom4 = (_e$nativeEvent$path$7 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$7 === void 0 ? void 0 : _e$nativeEvent$path$7.getElementsByTagName('input')[currentIndex - 1];
|
|
8029
|
+
if (_dom4) {
|
|
8030
|
+
_dom4.select();
|
|
8031
|
+
_dom4.focus();
|
|
8032
|
+
_dom4.scrollIntoView(false);
|
|
7884
8033
|
}
|
|
7885
|
-
|
|
8034
|
+
_dom4 = null;
|
|
7886
8035
|
}
|
|
7887
8036
|
if (e.keyCode === 39 && e.shiftKey) {
|
|
7888
|
-
var _e$nativeEvent$path$
|
|
8037
|
+
var _e$nativeEvent$path$8;
|
|
7889
8038
|
// 右滑
|
|
7890
8039
|
e.stopPropagation();
|
|
7891
8040
|
e.preventDefault();
|
|
7892
|
-
var
|
|
7893
|
-
if (
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
8041
|
+
var _dom5 = (_e$nativeEvent$path$8 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$8 === void 0 ? void 0 : _e$nativeEvent$path$8.getElementsByTagName('input')[currentIndex + 1];
|
|
8042
|
+
if (_dom5) {
|
|
8043
|
+
_dom5.select();
|
|
8044
|
+
_dom5.focus();
|
|
8045
|
+
_dom5.scrollIntoView(false);
|
|
7897
8046
|
}
|
|
7898
|
-
|
|
8047
|
+
_dom5 = null;
|
|
7899
8048
|
}
|
|
7900
8049
|
if (e.keyCode === 40) {
|
|
7901
|
-
var _e$nativeEvent$path$
|
|
8050
|
+
var _e$nativeEvent$path$9;
|
|
7902
8051
|
e.stopPropagation();
|
|
7903
8052
|
e.preventDefault();
|
|
7904
|
-
var
|
|
7905
|
-
if (
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
8053
|
+
var _dom6 = (_e$nativeEvent$path$9 = e.nativeEvent.path[5].children[index + 2]) === null || _e$nativeEvent$path$9 === void 0 ? void 0 : _e$nativeEvent$path$9.getElementsByTagName('input')[currentIndex];
|
|
8054
|
+
if (_dom6) {
|
|
8055
|
+
_dom6.select();
|
|
8056
|
+
_dom6.focus();
|
|
8057
|
+
_dom6.scrollIntoView(false);
|
|
7909
8058
|
}
|
|
7910
|
-
|
|
8059
|
+
_dom6 = null;
|
|
7911
8060
|
} else if (e.keyCode === 38) {
|
|
7912
|
-
var _e$nativeEvent$path$
|
|
8061
|
+
var _e$nativeEvent$path$10;
|
|
7913
8062
|
e.stopPropagation();
|
|
7914
8063
|
e.preventDefault();
|
|
7915
|
-
var dom1 = (_e$nativeEvent$path$
|
|
8064
|
+
var dom1 = (_e$nativeEvent$path$10 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$10 === void 0 ? void 0 : _e$nativeEvent$path$10.getElementsByTagName('input')[currentIndex];
|
|
7916
8065
|
if (dom1) {
|
|
7917
8066
|
// dom1.value=""
|
|
7918
8067
|
// dom1.setSelectionRange(100, 0);
|
|
@@ -7946,19 +8095,19 @@ var AddSelect = function AddSelect(props) {
|
|
|
7946
8095
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, item.selectProps), {}, {
|
|
7947
8096
|
value: text || null,
|
|
7948
8097
|
onChange: function () {
|
|
7949
|
-
var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
8098
|
+
var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(value) {
|
|
7950
8099
|
var dataSourceSelectItem, _item$selectChangeCal, changeValue, isCheckPass, isConformToTheRules;
|
|
7951
|
-
return _regeneratorRuntime().wrap(function
|
|
7952
|
-
while (1) switch (
|
|
8100
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
8101
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
7953
8102
|
case 0:
|
|
7954
8103
|
dataSourceSelectItem = (dataSourceList === null || dataSourceList === void 0 ? void 0 : dataSourceList.find(function (d) {
|
|
7955
8104
|
return d[selectKey] == value;
|
|
7956
8105
|
})) || {};
|
|
7957
8106
|
if (!(item === null || item === void 0 ? void 0 : item.selectChangeCallback)) {
|
|
7958
|
-
|
|
8107
|
+
_context3.next = 6;
|
|
7959
8108
|
break;
|
|
7960
8109
|
}
|
|
7961
|
-
|
|
8110
|
+
_context3.next = 4;
|
|
7962
8111
|
return item === null || item === void 0 ? void 0 : (_item$selectChangeCal = item.selectChangeCallback) === null || _item$selectChangeCal === void 0 ? void 0 : _item$selectChangeCal.call(item, popvalue, setPopValue, {
|
|
7963
8112
|
record: record,
|
|
7964
8113
|
index: index,
|
|
@@ -7969,7 +8118,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
7969
8118
|
editRecord: editRecord
|
|
7970
8119
|
});
|
|
7971
8120
|
case 4:
|
|
7972
|
-
|
|
8121
|
+
_context3.next = 25;
|
|
7973
8122
|
break;
|
|
7974
8123
|
case 6:
|
|
7975
8124
|
// 更新当前行数据函数
|
|
@@ -7984,12 +8133,12 @@ var AddSelect = function AddSelect(props) {
|
|
|
7984
8133
|
}
|
|
7985
8134
|
}; // 处理校验,默认不校验
|
|
7986
8135
|
isCheckPass = true;
|
|
7987
|
-
|
|
8136
|
+
_context3.prev = 8;
|
|
7988
8137
|
if (!(item === null || item === void 0 ? void 0 : item.selectCheckCallback)) {
|
|
7989
|
-
|
|
8138
|
+
_context3.next = 15;
|
|
7990
8139
|
break;
|
|
7991
8140
|
}
|
|
7992
|
-
|
|
8141
|
+
_context3.next = 12;
|
|
7993
8142
|
return item === null || item === void 0 ? void 0 : item.selectCheckCallback(popvalue, {
|
|
7994
8143
|
record: record,
|
|
7995
8144
|
index: index,
|
|
@@ -7999,21 +8148,21 @@ var AddSelect = function AddSelect(props) {
|
|
|
7999
8148
|
dataSourceSelectItem: dataSourceSelectItem
|
|
8000
8149
|
});
|
|
8001
8150
|
case 12:
|
|
8002
|
-
isCheckPass =
|
|
8003
|
-
|
|
8151
|
+
isCheckPass = _context3.sent;
|
|
8152
|
+
_context3.next = 19;
|
|
8004
8153
|
break;
|
|
8005
8154
|
case 15:
|
|
8006
|
-
|
|
8155
|
+
_context3.next = 17;
|
|
8007
8156
|
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
8008
8157
|
case 17:
|
|
8009
|
-
isConformToTheRules =
|
|
8158
|
+
isConformToTheRules = _context3.sent;
|
|
8010
8159
|
isCheckPass = !isConformToTheRules;
|
|
8011
8160
|
case 19:
|
|
8012
|
-
|
|
8161
|
+
_context3.next = 23;
|
|
8013
8162
|
break;
|
|
8014
8163
|
case 21:
|
|
8015
|
-
|
|
8016
|
-
|
|
8164
|
+
_context3.prev = 21;
|
|
8165
|
+
_context3.t0 = _context3["catch"](8);
|
|
8017
8166
|
case 23:
|
|
8018
8167
|
if (isCheckPass) {
|
|
8019
8168
|
changeValue(value, dataSourceSelectItem);
|
|
@@ -8024,11 +8173,11 @@ var AddSelect = function AddSelect(props) {
|
|
|
8024
8173
|
editRecord(record);
|
|
8025
8174
|
case 25:
|
|
8026
8175
|
case "end":
|
|
8027
|
-
return
|
|
8176
|
+
return _context3.stop();
|
|
8028
8177
|
}
|
|
8029
|
-
},
|
|
8178
|
+
}, _callee3, null, [[8, 21]]);
|
|
8030
8179
|
}));
|
|
8031
|
-
function onChange(
|
|
8180
|
+
function onChange(_x8) {
|
|
8032
8181
|
return _onChange.apply(this, arguments);
|
|
8033
8182
|
}
|
|
8034
8183
|
return onChange;
|
|
@@ -8288,8 +8437,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
8288
8437
|
}
|
|
8289
8438
|
}
|
|
8290
8439
|
setTimeout(function () {
|
|
8291
|
-
var _document$
|
|
8292
|
-
(_document$
|
|
8440
|
+
var _document$getElementB3;
|
|
8441
|
+
(_document$getElementB3 = document.getElementById("first-query")) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.focus();
|
|
8293
8442
|
}, 50);
|
|
8294
8443
|
};
|
|
8295
8444
|
// 将格式化完的数据回显到 表格中
|
|
@@ -8319,7 +8468,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8319
8468
|
handleLoading(isContinue, true);
|
|
8320
8469
|
onSaveCallback(popvalue).then(function (res) {
|
|
8321
8470
|
{
|
|
8322
|
-
var _Object$keys2, _document$
|
|
8471
|
+
var _Object$keys2, _document$getElementB4;
|
|
8323
8472
|
// 成功信息可以在调用处处理 即resolve({messageSuccessBackInfo: { needThrowSuccess: false } })、resolve({messageSuccessBackInfo: { needThrowSuccess: true, successMessage: '已保存' } })
|
|
8324
8473
|
var initSuccessMessage = '保存成功';
|
|
8325
8474
|
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
@@ -8329,7 +8478,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8329
8478
|
antd.message.success(initSuccessMessage);
|
|
8330
8479
|
}
|
|
8331
8480
|
deleteSelectRows();
|
|
8332
|
-
(_document$
|
|
8481
|
+
(_document$getElementB4 = document.getElementById('first-query')) === null || _document$getElementB4 === void 0 ? void 0 : _document$getElementB4.focus();
|
|
8333
8482
|
!isContinue && handleCancel();
|
|
8334
8483
|
}
|
|
8335
8484
|
handleLoading(isContinue, false);
|
|
@@ -11413,6 +11562,28 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11413
11562
|
}
|
|
11414
11563
|
}
|
|
11415
11564
|
}
|
|
11565
|
+
}, {
|
|
11566
|
+
name: 'qp-channelCode-in',
|
|
11567
|
+
type: 'treeSelect',
|
|
11568
|
+
label: '销售渠道',
|
|
11569
|
+
field: {
|
|
11570
|
+
type: 'treeSelect',
|
|
11571
|
+
props: {
|
|
11572
|
+
multiple: true,
|
|
11573
|
+
treeData: [],
|
|
11574
|
+
treeCheckable: false,
|
|
11575
|
+
notFoundContent: '暂无数据',
|
|
11576
|
+
allowClear: true,
|
|
11577
|
+
showSearch: true,
|
|
11578
|
+
showArrow: true,
|
|
11579
|
+
maxTagCount: 1,
|
|
11580
|
+
optionFilterProp: 'children',
|
|
11581
|
+
filterOption: function filterOption(input, option) {
|
|
11582
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11583
|
+
},
|
|
11584
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11585
|
+
}
|
|
11586
|
+
}
|
|
11416
11587
|
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
11417
11588
|
name: 'qp-status-eq',
|
|
11418
11589
|
type: 'select',
|
|
@@ -11425,8 +11596,16 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11425
11596
|
});
|
|
11426
11597
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
|
|
11427
11598
|
'qp-status-eq': 1
|
|
11428
|
-
}, getQueryHeadersItem(_queryHeaderParams8, 'qp-groupCode-in'))
|
|
11599
|
+
}, getQueryHeadersItem(_queryHeaderParams8, 'qp-groupCode-in')), loadSelectSource$1("/channel-manage/channelInfo/tree", {
|
|
11600
|
+
'qp-status-eq': 10,
|
|
11601
|
+
'qp-isMain-eq': 1,
|
|
11602
|
+
'qp-type-in': '1,2'
|
|
11603
|
+
}, getQueryHeadersItem(_queryHeaderParams8, 'qp-orgCode-in'))]).then(function (x) {
|
|
11429
11604
|
formatSource(x, 0, 2, tableSearchForm, ['groupCode', 'groupName']);
|
|
11605
|
+
var channelDisabledJude = function channelDisabledJude(data) {
|
|
11606
|
+
return data['parentCode'] === '0';
|
|
11607
|
+
}; // 所属销售渠道 树节点不能点判断
|
|
11608
|
+
formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
11430
11609
|
});
|
|
11431
11610
|
modalTableProps = _objectSpread2({
|
|
11432
11611
|
modalTableTitle: '选择运营仓',
|
|
@@ -11454,7 +11633,12 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11454
11633
|
render: function render(text) {
|
|
11455
11634
|
return getDictionaryTextByValue$1('SC00001', text);
|
|
11456
11635
|
}
|
|
11457
|
-
}] : [])
|
|
11636
|
+
}] : []), [{
|
|
11637
|
+
title: '所属销售渠道',
|
|
11638
|
+
dataIndex: 'channelName',
|
|
11639
|
+
defaultSort: 5,
|
|
11640
|
+
width: 100
|
|
11641
|
+
}])
|
|
11458
11642
|
}, modalTableBusProps);
|
|
11459
11643
|
}
|
|
11460
11644
|
// 仓库选择器(虚拟、渠道仓)(无弹窗)
|
|
@@ -11730,16 +11914,74 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11730
11914
|
}
|
|
11731
11915
|
}
|
|
11732
11916
|
}
|
|
11917
|
+
}, {
|
|
11918
|
+
name: 'qp-saleChannel-in',
|
|
11919
|
+
type: 'treeSelect',
|
|
11920
|
+
label: '销售渠道',
|
|
11921
|
+
field: {
|
|
11922
|
+
type: 'treeSelect',
|
|
11923
|
+
props: {
|
|
11924
|
+
multiple: true,
|
|
11925
|
+
treeData: [],
|
|
11926
|
+
treeCheckable: false,
|
|
11927
|
+
notFoundContent: '暂无数据',
|
|
11928
|
+
allowClear: true,
|
|
11929
|
+
showSearch: true,
|
|
11930
|
+
showArrow: true,
|
|
11931
|
+
maxTagCount: 1,
|
|
11932
|
+
optionFilterProp: 'children',
|
|
11933
|
+
filterOption: function filterOption(input, option) {
|
|
11934
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11935
|
+
},
|
|
11936
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11937
|
+
}
|
|
11938
|
+
}
|
|
11939
|
+
}, {
|
|
11940
|
+
name: 'qp-refCode-in',
|
|
11941
|
+
type: 'treeSelect',
|
|
11942
|
+
label: '营销区域',
|
|
11943
|
+
field: {
|
|
11944
|
+
type: 'treeSelect',
|
|
11945
|
+
props: {
|
|
11946
|
+
multiple: true,
|
|
11947
|
+
treeData: [],
|
|
11948
|
+
treeCheckable: false,
|
|
11949
|
+
notFoundContent: '暂无数据',
|
|
11950
|
+
allowClear: true,
|
|
11951
|
+
showSearch: true,
|
|
11952
|
+
showArrow: true,
|
|
11953
|
+
maxTagCount: 1,
|
|
11954
|
+
optionFilterProp: 'children',
|
|
11955
|
+
filterOption: function filterOption(input, option) {
|
|
11956
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11957
|
+
},
|
|
11958
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11959
|
+
}
|
|
11960
|
+
}
|
|
11733
11961
|
}];
|
|
11734
11962
|
var _queryHeaderParams10 = getQueryHeadersList({
|
|
11735
11963
|
querySelectHeadersList: querySelectHeadersList,
|
|
11736
11964
|
extralHeaders: extralHeaders
|
|
11737
11965
|
});
|
|
11738
|
-
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {}, getQueryHeadersItem(_queryHeaderParams10, 'qp-createOrgCode-eq'))
|
|
11966
|
+
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {}, getQueryHeadersItem(_queryHeaderParams10, 'qp-createOrgCode-eq')), loadSelectSource$1("/channel-manage/channelInfo/tree", {
|
|
11967
|
+
'qp-status-eq': 10,
|
|
11968
|
+
'qp-isMain-eq': 1,
|
|
11969
|
+
'qp-type-in': '1,2'
|
|
11970
|
+
}, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in')), loadSelectSource$1("/channel-manage/tagNode/getTree/10", {
|
|
11971
|
+
'qp-status-eq': 1
|
|
11972
|
+
}, getQueryHeadersItem(_queryHeaderParams10, 'qp-orgCode-in'))]).then(function (x) {
|
|
11739
11973
|
var firstElement = x === null || x === void 0 ? void 0 : x[0];
|
|
11740
11974
|
var allList = firstElement && [firstElement, firstElement];
|
|
11741
11975
|
formatSource(allList, 0, 2, tableSearchForm);
|
|
11742
11976
|
formatSource(allList, 1, 3, tableSearchForm);
|
|
11977
|
+
var channelDisabledJude = function channelDisabledJude(data) {
|
|
11978
|
+
return data['parentCode'] === '0';
|
|
11979
|
+
}; // 所属销售渠道 树节点不能点判断
|
|
11980
|
+
var areaDisabledJude = function areaDisabledJude(data) {
|
|
11981
|
+
return data['parent'] === '0';
|
|
11982
|
+
}; // 所属营销区域 树节点不能点判断
|
|
11983
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
11984
|
+
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude);
|
|
11743
11985
|
});
|
|
11744
11986
|
modalTableProps = _objectSpread2({
|
|
11745
11987
|
modalTableTitle: '选择客户',
|
|
@@ -11763,7 +12005,18 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11763
12005
|
}, {
|
|
11764
12006
|
title: '使用组织',
|
|
11765
12007
|
dataIndex: 'salesOrgName',
|
|
11766
|
-
defaultSort: 4
|
|
12008
|
+
defaultSort: 4,
|
|
12009
|
+
width: 100
|
|
12010
|
+
}, {
|
|
12011
|
+
title: '所属销售渠道',
|
|
12012
|
+
dataIndex: 'channelName',
|
|
12013
|
+
defaultSort: 5,
|
|
12014
|
+
width: 100
|
|
12015
|
+
}, {
|
|
12016
|
+
title: '营销区域',
|
|
12017
|
+
dataIndex: 'commonRelationAreaName',
|
|
12018
|
+
defaultSort: 6,
|
|
12019
|
+
width: 100
|
|
11767
12020
|
}]
|
|
11768
12021
|
}, modalTableBusProps);
|
|
11769
12022
|
}
|
|
@@ -40303,6 +40556,85 @@ var ParagraphCopier = function ParagraphCopier(props) {
|
|
|
40303
40556
|
}, children));
|
|
40304
40557
|
};
|
|
40305
40558
|
|
|
40559
|
+
//操作日志
|
|
40560
|
+
var SystemLog = function SystemLog(_ref) {
|
|
40561
|
+
var modeType = _ref.modeType,
|
|
40562
|
+
code = _ref.code,
|
|
40563
|
+
containerName = _ref.containerName,
|
|
40564
|
+
_ref$renderLogRef = _ref.renderLogRef,
|
|
40565
|
+
renderLogRef = _ref$renderLogRef === void 0 ? {} : _ref$renderLogRef,
|
|
40566
|
+
_ref$extraParams = _ref.extraParams,
|
|
40567
|
+
extraParams = _ref$extraParams === void 0 ? {} : _ref$extraParams;
|
|
40568
|
+
return _objectSpread2(_objectSpread2({}, formContainerAndItemLayout('table', '操作日志', containerName)), {}, {
|
|
40569
|
+
initialVisible: modeType != 'create',
|
|
40570
|
+
fields: [{
|
|
40571
|
+
name: 'table',
|
|
40572
|
+
label: false,
|
|
40573
|
+
itemLayout: {
|
|
40574
|
+
span: 24,
|
|
40575
|
+
labelCol: {
|
|
40576
|
+
span: 0
|
|
40577
|
+
},
|
|
40578
|
+
wrapperCol: {
|
|
40579
|
+
span: 24
|
|
40580
|
+
}
|
|
40581
|
+
},
|
|
40582
|
+
field: function field(ctx) {
|
|
40583
|
+
return code && /*#__PURE__*/React__default['default'].createElement(bssula.Table, {
|
|
40584
|
+
remoteDataSource: {
|
|
40585
|
+
url: "/oms-ops/logInfo?qp-businessCode-eq=".concat(code),
|
|
40586
|
+
convertParams: function convertParams(_ref2) {
|
|
40587
|
+
var params = _ref2.params;
|
|
40588
|
+
return _objectSpread2({
|
|
40589
|
+
pageSize: params.pageSize,
|
|
40590
|
+
currentPage: params.current
|
|
40591
|
+
}, extraParams);
|
|
40592
|
+
},
|
|
40593
|
+
converter: function converter(_ref3) {
|
|
40594
|
+
var data = _ref3.data;
|
|
40595
|
+
return _objectSpread2({}, handleConvertResponse(data.list, data.total || data.totalCount));
|
|
40596
|
+
}
|
|
40597
|
+
},
|
|
40598
|
+
columns: [{
|
|
40599
|
+
title: '操作人',
|
|
40600
|
+
dataIndex: 'handlerName'
|
|
40601
|
+
}, {
|
|
40602
|
+
title: '操作名称',
|
|
40603
|
+
dataIndex: 'handlerType'
|
|
40604
|
+
}, {
|
|
40605
|
+
title: '操作时间',
|
|
40606
|
+
dataIndex: 'handlerTime',
|
|
40607
|
+
render: function render(_ref4) {
|
|
40608
|
+
var text = _ref4.text;
|
|
40609
|
+
return handleCommonTimeRender$1(text);
|
|
40610
|
+
}
|
|
40611
|
+
}, {
|
|
40612
|
+
title: '操作内容',
|
|
40613
|
+
dataIndex: 'logcontent'
|
|
40614
|
+
}],
|
|
40615
|
+
style: {
|
|
40616
|
+
width: '100%',
|
|
40617
|
+
marginTop: '-16px',
|
|
40618
|
+
padding: '0px'
|
|
40619
|
+
},
|
|
40620
|
+
rowKey: "id",
|
|
40621
|
+
scroll: {
|
|
40622
|
+
x: 'max-content'
|
|
40623
|
+
},
|
|
40624
|
+
pagination: {
|
|
40625
|
+
showTotal: function showTotal(total) {
|
|
40626
|
+
return "\u5171 ".concat(total, " \u6761");
|
|
40627
|
+
},
|
|
40628
|
+
showQuickJumper: true,
|
|
40629
|
+
hideOnSinglePage: true
|
|
40630
|
+
},
|
|
40631
|
+
ref: renderLogRef
|
|
40632
|
+
});
|
|
40633
|
+
}
|
|
40634
|
+
}]
|
|
40635
|
+
});
|
|
40636
|
+
};
|
|
40637
|
+
|
|
40306
40638
|
exports.AddSelect = AddSelect;
|
|
40307
40639
|
exports.AddSkcSelect = AddSkcSelect;
|
|
40308
40640
|
exports.AddSkuSelect = AddSkuSelect;
|
|
@@ -40341,6 +40673,7 @@ exports.SearchSelect = SearchSelect;
|
|
|
40341
40673
|
exports.Section = Section;
|
|
40342
40674
|
exports.StateFlow = index$2;
|
|
40343
40675
|
exports.SulaColumnSettingTable = ColumnSettingSulaTable;
|
|
40676
|
+
exports.SystemLog = SystemLog;
|
|
40344
40677
|
exports.TableColumnSetting = TableColumnSetting;
|
|
40345
40678
|
exports.TreeSearchSelect = TreeSearchSelect;
|
|
40346
40679
|
exports.authFunc = authFunc;
|
|
@@ -40350,6 +40683,7 @@ exports.coverToParallel = _coverToParallel;
|
|
|
40350
40683
|
exports.createUniqID = createUniqID;
|
|
40351
40684
|
exports.downloadExcel = downloadExcel;
|
|
40352
40685
|
exports.ergodicMenuRoutes = ergodicMenuRoutes;
|
|
40686
|
+
exports.formContainerAndItemLayout = formContainerAndItemLayout;
|
|
40353
40687
|
exports.formatter = _formatter;
|
|
40354
40688
|
exports.getAccountID = getAccountID;
|
|
40355
40689
|
exports.getAccountId = getAccountId;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -31,3 +31,44 @@ export declare const randomString: (len?: any) => string;
|
|
|
31
31
|
export declare const createUniqID: (length: any) => string;
|
|
32
32
|
export declare const handleConvertResponse: (items: any, total: number) => object;
|
|
33
33
|
export declare const noEmptyArray: (targetObj: any) => boolean;
|
|
34
|
+
export declare const formContainerAndItemLayout: (type: string, title: any, name: string) => {
|
|
35
|
+
container: {
|
|
36
|
+
type: string;
|
|
37
|
+
props: {
|
|
38
|
+
title: any;
|
|
39
|
+
id: number;
|
|
40
|
+
level: number;
|
|
41
|
+
name: string;
|
|
42
|
+
bordered?: undefined;
|
|
43
|
+
isWhiteCard?: undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
itemLayout: {
|
|
47
|
+
span: number;
|
|
48
|
+
labelCol: {
|
|
49
|
+
span: number;
|
|
50
|
+
};
|
|
51
|
+
wrapperCol: {
|
|
52
|
+
span: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
} | {
|
|
56
|
+
container: {
|
|
57
|
+
type: string;
|
|
58
|
+
props: {
|
|
59
|
+
title: any;
|
|
60
|
+
id: number;
|
|
61
|
+
level: number;
|
|
62
|
+
bordered: null;
|
|
63
|
+
isWhiteCard: boolean;
|
|
64
|
+
name: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
itemLayout: {
|
|
68
|
+
wrapperCol: {
|
|
69
|
+
span: number;
|
|
70
|
+
};
|
|
71
|
+
span?: undefined;
|
|
72
|
+
labelCol?: undefined;
|
|
73
|
+
};
|
|
74
|
+
};
|