@bit-sun/business-component 4.2.0-alpha.6.6 → 4.2.0-alpha.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -5472,8 +5472,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5472
5472
|
highestPopContainer = _props$highestPopCont === void 0 ? undefined : _props$highestPopCont,
|
|
5473
5473
|
fieldComponent = props.fieldComponent,
|
|
5474
5474
|
onSaveCallback = props.onSaveCallback,
|
|
5475
|
-
_props$returnFormat = props.returnFormat,
|
|
5476
|
-
returnFormat = _props$returnFormat === void 0 ? [] : _props$returnFormat,
|
|
5477
5475
|
selectBusinessType = props.selectBusinessType;
|
|
5478
5476
|
var _ref = rCTemp || {},
|
|
5479
5477
|
url = _ref.url,
|
|
@@ -5532,16 +5530,14 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5532
5530
|
var currentPage = 1;
|
|
5533
5531
|
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
5534
5532
|
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
5535
|
-
var currentSelectProps = _objectSpread2(_objectSpread2({
|
|
5536
|
-
// 回显字段可自定义
|
|
5537
|
-
optionLabelProp: "label"
|
|
5538
|
-
}, selectProps), {}, {
|
|
5533
|
+
var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
|
|
5539
5534
|
// 以下属性不可更改----设计配置项
|
|
5540
5535
|
showArrow: true,
|
|
5541
5536
|
showSearch: true,
|
|
5542
5537
|
filterOption: false,
|
|
5543
5538
|
allowClear: true,
|
|
5544
5539
|
listHeight: 160,
|
|
5540
|
+
optionLabelProp: "label",
|
|
5545
5541
|
autoClearSearchValue: false,
|
|
5546
5542
|
placement: 'bottomRight'
|
|
5547
5543
|
});
|
|
@@ -6010,19 +6006,12 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6010
6006
|
};
|
|
6011
6007
|
var formaData = function formaData(value, source) {
|
|
6012
6008
|
if (labelInValue) {
|
|
6013
|
-
var getFromat = function getFromat(format, val) {
|
|
6014
|
-
return format.map(function (_ref8) {
|
|
6015
|
-
var key = _ref8.key,
|
|
6016
|
-
value = _ref8.value;
|
|
6017
|
-
return _defineProperty({}, key, val[value]);
|
|
6018
|
-
});
|
|
6019
|
-
};
|
|
6020
6009
|
var formatResult = value.map(function (i) {
|
|
6021
|
-
return
|
|
6010
|
+
return {
|
|
6022
6011
|
key: i[mappingValueField] || i.key,
|
|
6023
6012
|
label: i[mappingTextField] || i.label,
|
|
6024
6013
|
value: i[mappingValueField] || i.value
|
|
6025
|
-
}
|
|
6014
|
+
};
|
|
6026
6015
|
});
|
|
6027
6016
|
onChange(selectMode ? formatResult : formatResult[0], value, source);
|
|
6028
6017
|
} else {
|
|
@@ -7863,116 +7852,6 @@ var AddSelect = function AddSelect(props) {
|
|
|
7863
7852
|
acc[key] = typeof value === 'function' ? value === null || value === void 0 ? void 0 : value(record) : value;
|
|
7864
7853
|
return acc;
|
|
7865
7854
|
}, {});
|
|
7866
|
-
// 可输入非数字字符
|
|
7867
|
-
if (item.canInputString) {
|
|
7868
|
-
return /*#__PURE__*/React$1.createElement(InputNumber, _objectSpread2(_objectSpread2({
|
|
7869
|
-
min: 0,
|
|
7870
|
-
precision: 0,
|
|
7871
|
-
controls: false
|
|
7872
|
-
}, inputProps), {}, {
|
|
7873
|
-
value: text || '',
|
|
7874
|
-
keyboard: false,
|
|
7875
|
-
onPressEnter: function onPressEnter(e) {
|
|
7876
|
-
e.target.blur();
|
|
7877
|
-
},
|
|
7878
|
-
onBlur: function () {
|
|
7879
|
-
var _onBlur = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
|
|
7880
|
-
var value;
|
|
7881
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7882
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
7883
|
-
case 0:
|
|
7884
|
-
value = e.target.value;
|
|
7885
|
-
record[item.dataIndex] = value;
|
|
7886
|
-
editRecord(record);
|
|
7887
|
-
case 3:
|
|
7888
|
-
case "end":
|
|
7889
|
-
return _context2.stop();
|
|
7890
|
-
}
|
|
7891
|
-
}, _callee2);
|
|
7892
|
-
}));
|
|
7893
|
-
function onBlur(_x7) {
|
|
7894
|
-
return _onBlur.apply(this, arguments);
|
|
7895
|
-
}
|
|
7896
|
-
return onBlur;
|
|
7897
|
-
}(),
|
|
7898
|
-
onKeyDown: function onKeyDown(e) {
|
|
7899
|
-
if (e.keyCode === 13 && e.ctrlKey) {
|
|
7900
|
-
var _document$getElementB;
|
|
7901
|
-
handleOk(true);
|
|
7902
|
-
(_document$getElementB = document.getElementById("first-query")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.focus();
|
|
7903
|
-
}
|
|
7904
|
-
if (e.keyCode === 8 && e.ctrlKey) {
|
|
7905
|
-
var _e$nativeEvent$path$;
|
|
7906
|
-
message$1.success('删除当前行');
|
|
7907
|
-
e.stopPropagation();
|
|
7908
|
-
e.preventDefault();
|
|
7909
|
-
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];
|
|
7910
|
-
if (dom) {
|
|
7911
|
-
dom.select();
|
|
7912
|
-
dom.focus();
|
|
7913
|
-
dom.scrollIntoView(false);
|
|
7914
|
-
}
|
|
7915
|
-
dom = null;
|
|
7916
|
-
deleteRecord(record);
|
|
7917
|
-
}
|
|
7918
|
-
if (e.keyCode === 37 && e.shiftKey) {
|
|
7919
|
-
var _e$nativeEvent$path$2;
|
|
7920
|
-
// 左滑动
|
|
7921
|
-
e.stopPropagation();
|
|
7922
|
-
e.preventDefault();
|
|
7923
|
-
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];
|
|
7924
|
-
if (_dom) {
|
|
7925
|
-
_dom.select();
|
|
7926
|
-
_dom.focus();
|
|
7927
|
-
_dom.scrollIntoView(false);
|
|
7928
|
-
}
|
|
7929
|
-
_dom = null;
|
|
7930
|
-
}
|
|
7931
|
-
if (e.keyCode === 39 && e.shiftKey) {
|
|
7932
|
-
var _e$nativeEvent$path$3;
|
|
7933
|
-
// 右滑
|
|
7934
|
-
e.stopPropagation();
|
|
7935
|
-
e.preventDefault();
|
|
7936
|
-
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];
|
|
7937
|
-
if (_dom2) {
|
|
7938
|
-
_dom2.select();
|
|
7939
|
-
_dom2.focus();
|
|
7940
|
-
_dom2.scrollIntoView(false);
|
|
7941
|
-
}
|
|
7942
|
-
_dom2 = null;
|
|
7943
|
-
}
|
|
7944
|
-
if (e.keyCode === 40) {
|
|
7945
|
-
var _e$nativeEvent$path$4;
|
|
7946
|
-
e.stopPropagation();
|
|
7947
|
-
e.preventDefault();
|
|
7948
|
-
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];
|
|
7949
|
-
if (_dom3) {
|
|
7950
|
-
_dom3.select();
|
|
7951
|
-
_dom3.focus();
|
|
7952
|
-
_dom3.scrollIntoView(false);
|
|
7953
|
-
}
|
|
7954
|
-
_dom3 = null;
|
|
7955
|
-
} else if (e.keyCode === 38) {
|
|
7956
|
-
var _e$nativeEvent$path$5;
|
|
7957
|
-
e.stopPropagation();
|
|
7958
|
-
e.preventDefault();
|
|
7959
|
-
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];
|
|
7960
|
-
if (dom1) {
|
|
7961
|
-
// dom1.value=""
|
|
7962
|
-
// dom1.setSelectionRange(100, 0);
|
|
7963
|
-
dom1.select();
|
|
7964
|
-
dom1.focus();
|
|
7965
|
-
dom1.scrollIntoViewIfNeeded(false);
|
|
7966
|
-
// dom1.value=record['count']
|
|
7967
|
-
}
|
|
7968
|
-
dom1 = null;
|
|
7969
|
-
} else if (e.keyCode === 9 && index === selectedRowKeys.length - 1 && currentIndex === inputLength - 1) {
|
|
7970
|
-
e.stopPropagation();
|
|
7971
|
-
e.preventDefault();
|
|
7972
|
-
}
|
|
7973
|
-
}
|
|
7974
|
-
}));
|
|
7975
|
-
}
|
|
7976
7855
|
return /*#__PURE__*/React$1.createElement(InputNumber, _objectSpread2(_objectSpread2(_objectSpread2({}, inputProps), {}, {
|
|
7977
7856
|
value: text || '',
|
|
7978
7857
|
min: 0,
|
|
@@ -7990,16 +7869,16 @@ var AddSelect = function AddSelect(props) {
|
|
|
7990
7869
|
// }}
|
|
7991
7870
|
onKeyDown: function onKeyDown(e) {
|
|
7992
7871
|
if (e.keyCode === 13 && e.ctrlKey) {
|
|
7993
|
-
var _document$
|
|
7872
|
+
var _document$getElementB;
|
|
7994
7873
|
handleOk(true);
|
|
7995
|
-
(_document$
|
|
7874
|
+
(_document$getElementB = document.getElementById("first-query")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.focus();
|
|
7996
7875
|
}
|
|
7997
7876
|
if (e.keyCode === 8 && e.ctrlKey) {
|
|
7998
|
-
var _e$nativeEvent$path
|
|
7877
|
+
var _e$nativeEvent$path$;
|
|
7999
7878
|
message$1.success('删除当前行');
|
|
8000
7879
|
e.stopPropagation();
|
|
8001
7880
|
e.preventDefault();
|
|
8002
|
-
var dom = (_e$nativeEvent$path$
|
|
7881
|
+
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];
|
|
8003
7882
|
if (dom) {
|
|
8004
7883
|
dom.select();
|
|
8005
7884
|
dom.focus();
|
|
@@ -8009,47 +7888,47 @@ var AddSelect = function AddSelect(props) {
|
|
|
8009
7888
|
deleteRecord(record);
|
|
8010
7889
|
}
|
|
8011
7890
|
if (e.keyCode === 37 && e.shiftKey) {
|
|
8012
|
-
var _e$nativeEvent$path$
|
|
7891
|
+
var _e$nativeEvent$path$2;
|
|
8013
7892
|
// 左滑动
|
|
8014
7893
|
e.stopPropagation();
|
|
8015
7894
|
e.preventDefault();
|
|
8016
|
-
var
|
|
8017
|
-
if (
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
7895
|
+
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];
|
|
7896
|
+
if (_dom) {
|
|
7897
|
+
_dom.select();
|
|
7898
|
+
_dom.focus();
|
|
7899
|
+
_dom.scrollIntoView(false);
|
|
8021
7900
|
}
|
|
8022
|
-
|
|
7901
|
+
_dom = null;
|
|
8023
7902
|
}
|
|
8024
7903
|
if (e.keyCode === 39 && e.shiftKey) {
|
|
8025
|
-
var _e$nativeEvent$path$
|
|
7904
|
+
var _e$nativeEvent$path$3;
|
|
8026
7905
|
// 右滑
|
|
8027
7906
|
e.stopPropagation();
|
|
8028
7907
|
e.preventDefault();
|
|
8029
|
-
var
|
|
8030
|
-
if (
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
7908
|
+
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];
|
|
7909
|
+
if (_dom2) {
|
|
7910
|
+
_dom2.select();
|
|
7911
|
+
_dom2.focus();
|
|
7912
|
+
_dom2.scrollIntoView(false);
|
|
8034
7913
|
}
|
|
8035
|
-
|
|
7914
|
+
_dom2 = null;
|
|
8036
7915
|
}
|
|
8037
7916
|
if (e.keyCode === 40) {
|
|
8038
|
-
var _e$nativeEvent$path$
|
|
7917
|
+
var _e$nativeEvent$path$4;
|
|
8039
7918
|
e.stopPropagation();
|
|
8040
7919
|
e.preventDefault();
|
|
8041
|
-
var
|
|
8042
|
-
if (
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
7920
|
+
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];
|
|
7921
|
+
if (_dom3) {
|
|
7922
|
+
_dom3.select();
|
|
7923
|
+
_dom3.focus();
|
|
7924
|
+
_dom3.scrollIntoView(false);
|
|
8046
7925
|
}
|
|
8047
|
-
|
|
7926
|
+
_dom3 = null;
|
|
8048
7927
|
} else if (e.keyCode === 38) {
|
|
8049
|
-
var _e$nativeEvent$path$
|
|
7928
|
+
var _e$nativeEvent$path$5;
|
|
8050
7929
|
e.stopPropagation();
|
|
8051
7930
|
e.preventDefault();
|
|
8052
|
-
var dom1 = (_e$nativeEvent$path$
|
|
7931
|
+
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];
|
|
8053
7932
|
if (dom1) {
|
|
8054
7933
|
// dom1.value=""
|
|
8055
7934
|
// dom1.setSelectionRange(100, 0);
|
|
@@ -8083,19 +7962,19 @@ var AddSelect = function AddSelect(props) {
|
|
|
8083
7962
|
return /*#__PURE__*/React$1.createElement(Select, _objectSpread2(_objectSpread2({}, item.selectProps), {}, {
|
|
8084
7963
|
value: text || null,
|
|
8085
7964
|
onChange: function () {
|
|
8086
|
-
var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
7965
|
+
var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
8087
7966
|
var dataSourceSelectItem, _item$selectChangeCal, changeValue, isCheckPass, isConformToTheRules;
|
|
8088
|
-
return _regeneratorRuntime().wrap(function
|
|
8089
|
-
while (1) switch (
|
|
7967
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7968
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
8090
7969
|
case 0:
|
|
8091
7970
|
dataSourceSelectItem = (dataSourceList === null || dataSourceList === void 0 ? void 0 : dataSourceList.find(function (d) {
|
|
8092
7971
|
return d[selectKey] == value;
|
|
8093
7972
|
})) || {};
|
|
8094
7973
|
if (!(item === null || item === void 0 ? void 0 : item.selectChangeCallback)) {
|
|
8095
|
-
|
|
7974
|
+
_context2.next = 6;
|
|
8096
7975
|
break;
|
|
8097
7976
|
}
|
|
8098
|
-
|
|
7977
|
+
_context2.next = 4;
|
|
8099
7978
|
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, {
|
|
8100
7979
|
record: record,
|
|
8101
7980
|
index: index,
|
|
@@ -8106,7 +7985,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8106
7985
|
editRecord: editRecord
|
|
8107
7986
|
});
|
|
8108
7987
|
case 4:
|
|
8109
|
-
|
|
7988
|
+
_context2.next = 25;
|
|
8110
7989
|
break;
|
|
8111
7990
|
case 6:
|
|
8112
7991
|
// 更新当前行数据函数
|
|
@@ -8121,12 +8000,12 @@ var AddSelect = function AddSelect(props) {
|
|
|
8121
8000
|
}
|
|
8122
8001
|
}; // 处理校验,默认不校验
|
|
8123
8002
|
isCheckPass = true;
|
|
8124
|
-
|
|
8003
|
+
_context2.prev = 8;
|
|
8125
8004
|
if (!(item === null || item === void 0 ? void 0 : item.selectCheckCallback)) {
|
|
8126
|
-
|
|
8005
|
+
_context2.next = 15;
|
|
8127
8006
|
break;
|
|
8128
8007
|
}
|
|
8129
|
-
|
|
8008
|
+
_context2.next = 12;
|
|
8130
8009
|
return item === null || item === void 0 ? void 0 : item.selectCheckCallback(popvalue, {
|
|
8131
8010
|
record: record,
|
|
8132
8011
|
index: index,
|
|
@@ -8136,21 +8015,21 @@ var AddSelect = function AddSelect(props) {
|
|
|
8136
8015
|
dataSourceSelectItem: dataSourceSelectItem
|
|
8137
8016
|
});
|
|
8138
8017
|
case 12:
|
|
8139
|
-
isCheckPass =
|
|
8140
|
-
|
|
8018
|
+
isCheckPass = _context2.sent;
|
|
8019
|
+
_context2.next = 19;
|
|
8141
8020
|
break;
|
|
8142
8021
|
case 15:
|
|
8143
|
-
|
|
8022
|
+
_context2.next = 17;
|
|
8144
8023
|
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
8145
8024
|
case 17:
|
|
8146
|
-
isConformToTheRules =
|
|
8025
|
+
isConformToTheRules = _context2.sent;
|
|
8147
8026
|
isCheckPass = !isConformToTheRules;
|
|
8148
8027
|
case 19:
|
|
8149
|
-
|
|
8028
|
+
_context2.next = 23;
|
|
8150
8029
|
break;
|
|
8151
8030
|
case 21:
|
|
8152
|
-
|
|
8153
|
-
|
|
8031
|
+
_context2.prev = 21;
|
|
8032
|
+
_context2.t0 = _context2["catch"](8);
|
|
8154
8033
|
case 23:
|
|
8155
8034
|
if (isCheckPass) {
|
|
8156
8035
|
changeValue(value, dataSourceSelectItem);
|
|
@@ -8161,11 +8040,11 @@ var AddSelect = function AddSelect(props) {
|
|
|
8161
8040
|
editRecord(record);
|
|
8162
8041
|
case 25:
|
|
8163
8042
|
case "end":
|
|
8164
|
-
return
|
|
8043
|
+
return _context2.stop();
|
|
8165
8044
|
}
|
|
8166
|
-
},
|
|
8045
|
+
}, _callee2, null, [[8, 21]]);
|
|
8167
8046
|
}));
|
|
8168
|
-
function onChange(
|
|
8047
|
+
function onChange(_x7) {
|
|
8169
8048
|
return _onChange.apply(this, arguments);
|
|
8170
8049
|
}
|
|
8171
8050
|
return onChange;
|
|
@@ -8425,8 +8304,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
8425
8304
|
}
|
|
8426
8305
|
}
|
|
8427
8306
|
setTimeout(function () {
|
|
8428
|
-
var _document$
|
|
8429
|
-
(_document$
|
|
8307
|
+
var _document$getElementB2;
|
|
8308
|
+
(_document$getElementB2 = document.getElementById("first-query")) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.focus();
|
|
8430
8309
|
}, 50);
|
|
8431
8310
|
};
|
|
8432
8311
|
// 将格式化完的数据回显到 表格中
|
|
@@ -8456,7 +8335,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8456
8335
|
handleLoading(isContinue, true);
|
|
8457
8336
|
onSaveCallback(popvalue).then(function (res) {
|
|
8458
8337
|
{
|
|
8459
|
-
var _Object$keys2, _document$
|
|
8338
|
+
var _Object$keys2, _document$getElementB3;
|
|
8460
8339
|
// 成功信息可以在调用处处理 即resolve({messageSuccessBackInfo: { needThrowSuccess: false } })、resolve({messageSuccessBackInfo: { needThrowSuccess: true, successMessage: '已保存' } })
|
|
8461
8340
|
var initSuccessMessage = '保存成功';
|
|
8462
8341
|
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
@@ -8466,7 +8345,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8466
8345
|
message$1.success(initSuccessMessage);
|
|
8467
8346
|
}
|
|
8468
8347
|
deleteSelectRows();
|
|
8469
|
-
(_document$
|
|
8348
|
+
(_document$getElementB3 = document.getElementById('first-query')) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.focus();
|
|
8470
8349
|
!isContinue && handleCancel();
|
|
8471
8350
|
}
|
|
8472
8351
|
handleLoading(isContinue, false);
|
|
@@ -10644,10 +10523,10 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10644
10523
|
selectProps = _objectSpread2({
|
|
10645
10524
|
placeholder: '输入商品(SPU)编码或名称',
|
|
10646
10525
|
renderTableColumns: [{
|
|
10647
|
-
title: 'SPU
|
|
10526
|
+
title: '商品编码(SPU)',
|
|
10648
10527
|
dataIndex: 'itemCode'
|
|
10649
10528
|
}, {
|
|
10650
|
-
title: 'SPU
|
|
10529
|
+
title: '商品名称(SPU)',
|
|
10651
10530
|
dataIndex: 'name'
|
|
10652
10531
|
}]
|
|
10653
10532
|
}, selectConfigProps);
|
|
@@ -10664,11 +10543,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10664
10543
|
}, requestConfigProp);
|
|
10665
10544
|
tableSearchForm = [{
|
|
10666
10545
|
name: 'itemCode*multiInput',
|
|
10667
|
-
label: 'SPU
|
|
10546
|
+
label: '商品编码(SPU)',
|
|
10668
10547
|
type: 'multipleQueryInput'
|
|
10669
10548
|
}, {
|
|
10670
10549
|
name: 'name*multiInput',
|
|
10671
|
-
label: 'SPU
|
|
10550
|
+
label: '商品名称(SPU)',
|
|
10672
10551
|
type: 'multipleQueryInput'
|
|
10673
10552
|
}, {
|
|
10674
10553
|
name: 'qp-brandId-in',
|
|
@@ -10762,11 +10641,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10762
10641
|
dataIndex: 'keyIndex',
|
|
10763
10642
|
defaultSort: 0
|
|
10764
10643
|
}, {
|
|
10765
|
-
title: 'SPU
|
|
10644
|
+
title: '商品编码(SPU)',
|
|
10766
10645
|
dataIndex: 'itemCode',
|
|
10767
10646
|
defaultSort: 1
|
|
10768
10647
|
}, {
|
|
10769
|
-
title: 'SPU
|
|
10648
|
+
title: '商品名称(SPU) ',
|
|
10770
10649
|
dataIndex: 'name',
|
|
10771
10650
|
defaultSort: 2
|
|
10772
10651
|
}, {
|
|
@@ -11120,7 +10999,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11120
10999
|
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
|
|
11121
11000
|
}], ['colorName', 'categoryId', 'classId', 'brandId'], hiddenFields);
|
|
11122
11001
|
var fieldLoadSource = fieldsRequest.map(function (i) {
|
|
11123
|
-
return loadSelectSource$1(i.url, i.params,
|
|
11002
|
+
return loadSelectSource$1(i.url, i.params, options);
|
|
11124
11003
|
});
|
|
11125
11004
|
requestConfig = _objectSpread2({
|
|
11126
11005
|
url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
|
package/dist/index.js
CHANGED
|
@@ -5495,8 +5495,6 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5495
5495
|
highestPopContainer = _props$highestPopCont === void 0 ? undefined : _props$highestPopCont,
|
|
5496
5496
|
fieldComponent = props.fieldComponent,
|
|
5497
5497
|
onSaveCallback = props.onSaveCallback,
|
|
5498
|
-
_props$returnFormat = props.returnFormat,
|
|
5499
|
-
returnFormat = _props$returnFormat === void 0 ? [] : _props$returnFormat,
|
|
5500
5498
|
selectBusinessType = props.selectBusinessType;
|
|
5501
5499
|
var _ref = rCTemp || {},
|
|
5502
5500
|
url = _ref.url,
|
|
@@ -5555,16 +5553,14 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5555
5553
|
var currentPage = 1;
|
|
5556
5554
|
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
5557
5555
|
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
5558
|
-
var currentSelectProps = _objectSpread2(_objectSpread2({
|
|
5559
|
-
// 回显字段可自定义
|
|
5560
|
-
optionLabelProp: "label"
|
|
5561
|
-
}, selectProps), {}, {
|
|
5556
|
+
var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
|
|
5562
5557
|
// 以下属性不可更改----设计配置项
|
|
5563
5558
|
showArrow: true,
|
|
5564
5559
|
showSearch: true,
|
|
5565
5560
|
filterOption: false,
|
|
5566
5561
|
allowClear: true,
|
|
5567
5562
|
listHeight: 160,
|
|
5563
|
+
optionLabelProp: "label",
|
|
5568
5564
|
autoClearSearchValue: false,
|
|
5569
5565
|
placement: 'bottomRight'
|
|
5570
5566
|
});
|
|
@@ -6033,19 +6029,12 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
6033
6029
|
};
|
|
6034
6030
|
var formaData = function formaData(value, source) {
|
|
6035
6031
|
if (labelInValue) {
|
|
6036
|
-
var getFromat = function getFromat(format, val) {
|
|
6037
|
-
return format.map(function (_ref8) {
|
|
6038
|
-
var key = _ref8.key,
|
|
6039
|
-
value = _ref8.value;
|
|
6040
|
-
return _defineProperty({}, key, val[value]);
|
|
6041
|
-
});
|
|
6042
|
-
};
|
|
6043
6032
|
var formatResult = value.map(function (i) {
|
|
6044
|
-
return
|
|
6033
|
+
return {
|
|
6045
6034
|
key: i[mappingValueField] || i.key,
|
|
6046
6035
|
label: i[mappingTextField] || i.label,
|
|
6047
6036
|
value: i[mappingValueField] || i.value
|
|
6048
|
-
}
|
|
6037
|
+
};
|
|
6049
6038
|
});
|
|
6050
6039
|
onChange(selectMode ? formatResult : formatResult[0], value, source);
|
|
6051
6040
|
} else {
|
|
@@ -7886,116 +7875,6 @@ var AddSelect = function AddSelect(props) {
|
|
|
7886
7875
|
acc[key] = typeof value === 'function' ? value === null || value === void 0 ? void 0 : value(record) : value;
|
|
7887
7876
|
return acc;
|
|
7888
7877
|
}, {});
|
|
7889
|
-
// 可输入非数字字符
|
|
7890
|
-
if (item.canInputString) {
|
|
7891
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2({
|
|
7892
|
-
min: 0,
|
|
7893
|
-
precision: 0,
|
|
7894
|
-
controls: false
|
|
7895
|
-
}, inputProps), {}, {
|
|
7896
|
-
value: text || '',
|
|
7897
|
-
keyboard: false,
|
|
7898
|
-
onPressEnter: function onPressEnter(e) {
|
|
7899
|
-
e.target.blur();
|
|
7900
|
-
},
|
|
7901
|
-
onBlur: function () {
|
|
7902
|
-
var _onBlur = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
|
|
7903
|
-
var value;
|
|
7904
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7905
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
7906
|
-
case 0:
|
|
7907
|
-
value = e.target.value;
|
|
7908
|
-
record[item.dataIndex] = value;
|
|
7909
|
-
editRecord(record);
|
|
7910
|
-
case 3:
|
|
7911
|
-
case "end":
|
|
7912
|
-
return _context2.stop();
|
|
7913
|
-
}
|
|
7914
|
-
}, _callee2);
|
|
7915
|
-
}));
|
|
7916
|
-
function onBlur(_x7) {
|
|
7917
|
-
return _onBlur.apply(this, arguments);
|
|
7918
|
-
}
|
|
7919
|
-
return onBlur;
|
|
7920
|
-
}(),
|
|
7921
|
-
onKeyDown: function onKeyDown(e) {
|
|
7922
|
-
if (e.keyCode === 13 && e.ctrlKey) {
|
|
7923
|
-
var _document$getElementB;
|
|
7924
|
-
handleOk(true);
|
|
7925
|
-
(_document$getElementB = document.getElementById("first-query")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.focus();
|
|
7926
|
-
}
|
|
7927
|
-
if (e.keyCode === 8 && e.ctrlKey) {
|
|
7928
|
-
var _e$nativeEvent$path$;
|
|
7929
|
-
antd.message.success('删除当前行');
|
|
7930
|
-
e.stopPropagation();
|
|
7931
|
-
e.preventDefault();
|
|
7932
|
-
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];
|
|
7933
|
-
if (dom) {
|
|
7934
|
-
dom.select();
|
|
7935
|
-
dom.focus();
|
|
7936
|
-
dom.scrollIntoView(false);
|
|
7937
|
-
}
|
|
7938
|
-
dom = null;
|
|
7939
|
-
deleteRecord(record);
|
|
7940
|
-
}
|
|
7941
|
-
if (e.keyCode === 37 && e.shiftKey) {
|
|
7942
|
-
var _e$nativeEvent$path$2;
|
|
7943
|
-
// 左滑动
|
|
7944
|
-
e.stopPropagation();
|
|
7945
|
-
e.preventDefault();
|
|
7946
|
-
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];
|
|
7947
|
-
if (_dom) {
|
|
7948
|
-
_dom.select();
|
|
7949
|
-
_dom.focus();
|
|
7950
|
-
_dom.scrollIntoView(false);
|
|
7951
|
-
}
|
|
7952
|
-
_dom = null;
|
|
7953
|
-
}
|
|
7954
|
-
if (e.keyCode === 39 && e.shiftKey) {
|
|
7955
|
-
var _e$nativeEvent$path$3;
|
|
7956
|
-
// 右滑
|
|
7957
|
-
e.stopPropagation();
|
|
7958
|
-
e.preventDefault();
|
|
7959
|
-
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];
|
|
7960
|
-
if (_dom2) {
|
|
7961
|
-
_dom2.select();
|
|
7962
|
-
_dom2.focus();
|
|
7963
|
-
_dom2.scrollIntoView(false);
|
|
7964
|
-
}
|
|
7965
|
-
_dom2 = null;
|
|
7966
|
-
}
|
|
7967
|
-
if (e.keyCode === 40) {
|
|
7968
|
-
var _e$nativeEvent$path$4;
|
|
7969
|
-
e.stopPropagation();
|
|
7970
|
-
e.preventDefault();
|
|
7971
|
-
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];
|
|
7972
|
-
if (_dom3) {
|
|
7973
|
-
_dom3.select();
|
|
7974
|
-
_dom3.focus();
|
|
7975
|
-
_dom3.scrollIntoView(false);
|
|
7976
|
-
}
|
|
7977
|
-
_dom3 = null;
|
|
7978
|
-
} else if (e.keyCode === 38) {
|
|
7979
|
-
var _e$nativeEvent$path$5;
|
|
7980
|
-
e.stopPropagation();
|
|
7981
|
-
e.preventDefault();
|
|
7982
|
-
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];
|
|
7983
|
-
if (dom1) {
|
|
7984
|
-
// dom1.value=""
|
|
7985
|
-
// dom1.setSelectionRange(100, 0);
|
|
7986
|
-
dom1.select();
|
|
7987
|
-
dom1.focus();
|
|
7988
|
-
dom1.scrollIntoViewIfNeeded(false);
|
|
7989
|
-
// dom1.value=record['count']
|
|
7990
|
-
}
|
|
7991
|
-
dom1 = null;
|
|
7992
|
-
} else if (e.keyCode === 9 && index === selectedRowKeys.length - 1 && currentIndex === inputLength - 1) {
|
|
7993
|
-
e.stopPropagation();
|
|
7994
|
-
e.preventDefault();
|
|
7995
|
-
}
|
|
7996
|
-
}
|
|
7997
|
-
}));
|
|
7998
|
-
}
|
|
7999
7878
|
return /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2(_objectSpread2({}, inputProps), {}, {
|
|
8000
7879
|
value: text || '',
|
|
8001
7880
|
min: 0,
|
|
@@ -8013,16 +7892,16 @@ var AddSelect = function AddSelect(props) {
|
|
|
8013
7892
|
// }}
|
|
8014
7893
|
onKeyDown: function onKeyDown(e) {
|
|
8015
7894
|
if (e.keyCode === 13 && e.ctrlKey) {
|
|
8016
|
-
var _document$
|
|
7895
|
+
var _document$getElementB;
|
|
8017
7896
|
handleOk(true);
|
|
8018
|
-
(_document$
|
|
7897
|
+
(_document$getElementB = document.getElementById("first-query")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.focus();
|
|
8019
7898
|
}
|
|
8020
7899
|
if (e.keyCode === 8 && e.ctrlKey) {
|
|
8021
|
-
var _e$nativeEvent$path
|
|
7900
|
+
var _e$nativeEvent$path$;
|
|
8022
7901
|
antd.message.success('删除当前行');
|
|
8023
7902
|
e.stopPropagation();
|
|
8024
7903
|
e.preventDefault();
|
|
8025
|
-
var dom = (_e$nativeEvent$path$
|
|
7904
|
+
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];
|
|
8026
7905
|
if (dom) {
|
|
8027
7906
|
dom.select();
|
|
8028
7907
|
dom.focus();
|
|
@@ -8032,47 +7911,47 @@ var AddSelect = function AddSelect(props) {
|
|
|
8032
7911
|
deleteRecord(record);
|
|
8033
7912
|
}
|
|
8034
7913
|
if (e.keyCode === 37 && e.shiftKey) {
|
|
8035
|
-
var _e$nativeEvent$path$
|
|
7914
|
+
var _e$nativeEvent$path$2;
|
|
8036
7915
|
// 左滑动
|
|
8037
7916
|
e.stopPropagation();
|
|
8038
7917
|
e.preventDefault();
|
|
8039
|
-
var
|
|
8040
|
-
if (
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
7918
|
+
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];
|
|
7919
|
+
if (_dom) {
|
|
7920
|
+
_dom.select();
|
|
7921
|
+
_dom.focus();
|
|
7922
|
+
_dom.scrollIntoView(false);
|
|
8044
7923
|
}
|
|
8045
|
-
|
|
7924
|
+
_dom = null;
|
|
8046
7925
|
}
|
|
8047
7926
|
if (e.keyCode === 39 && e.shiftKey) {
|
|
8048
|
-
var _e$nativeEvent$path$
|
|
7927
|
+
var _e$nativeEvent$path$3;
|
|
8049
7928
|
// 右滑
|
|
8050
7929
|
e.stopPropagation();
|
|
8051
7930
|
e.preventDefault();
|
|
8052
|
-
var
|
|
8053
|
-
if (
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
7931
|
+
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];
|
|
7932
|
+
if (_dom2) {
|
|
7933
|
+
_dom2.select();
|
|
7934
|
+
_dom2.focus();
|
|
7935
|
+
_dom2.scrollIntoView(false);
|
|
8057
7936
|
}
|
|
8058
|
-
|
|
7937
|
+
_dom2 = null;
|
|
8059
7938
|
}
|
|
8060
7939
|
if (e.keyCode === 40) {
|
|
8061
|
-
var _e$nativeEvent$path$
|
|
7940
|
+
var _e$nativeEvent$path$4;
|
|
8062
7941
|
e.stopPropagation();
|
|
8063
7942
|
e.preventDefault();
|
|
8064
|
-
var
|
|
8065
|
-
if (
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
7943
|
+
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];
|
|
7944
|
+
if (_dom3) {
|
|
7945
|
+
_dom3.select();
|
|
7946
|
+
_dom3.focus();
|
|
7947
|
+
_dom3.scrollIntoView(false);
|
|
8069
7948
|
}
|
|
8070
|
-
|
|
7949
|
+
_dom3 = null;
|
|
8071
7950
|
} else if (e.keyCode === 38) {
|
|
8072
|
-
var _e$nativeEvent$path$
|
|
7951
|
+
var _e$nativeEvent$path$5;
|
|
8073
7952
|
e.stopPropagation();
|
|
8074
7953
|
e.preventDefault();
|
|
8075
|
-
var dom1 = (_e$nativeEvent$path$
|
|
7954
|
+
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];
|
|
8076
7955
|
if (dom1) {
|
|
8077
7956
|
// dom1.value=""
|
|
8078
7957
|
// dom1.setSelectionRange(100, 0);
|
|
@@ -8106,19 +7985,19 @@ var AddSelect = function AddSelect(props) {
|
|
|
8106
7985
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, item.selectProps), {}, {
|
|
8107
7986
|
value: text || null,
|
|
8108
7987
|
onChange: function () {
|
|
8109
|
-
var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
7988
|
+
var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
8110
7989
|
var dataSourceSelectItem, _item$selectChangeCal, changeValue, isCheckPass, isConformToTheRules;
|
|
8111
|
-
return _regeneratorRuntime().wrap(function
|
|
8112
|
-
while (1) switch (
|
|
7990
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7991
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
8113
7992
|
case 0:
|
|
8114
7993
|
dataSourceSelectItem = (dataSourceList === null || dataSourceList === void 0 ? void 0 : dataSourceList.find(function (d) {
|
|
8115
7994
|
return d[selectKey] == value;
|
|
8116
7995
|
})) || {};
|
|
8117
7996
|
if (!(item === null || item === void 0 ? void 0 : item.selectChangeCallback)) {
|
|
8118
|
-
|
|
7997
|
+
_context2.next = 6;
|
|
8119
7998
|
break;
|
|
8120
7999
|
}
|
|
8121
|
-
|
|
8000
|
+
_context2.next = 4;
|
|
8122
8001
|
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, {
|
|
8123
8002
|
record: record,
|
|
8124
8003
|
index: index,
|
|
@@ -8129,7 +8008,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8129
8008
|
editRecord: editRecord
|
|
8130
8009
|
});
|
|
8131
8010
|
case 4:
|
|
8132
|
-
|
|
8011
|
+
_context2.next = 25;
|
|
8133
8012
|
break;
|
|
8134
8013
|
case 6:
|
|
8135
8014
|
// 更新当前行数据函数
|
|
@@ -8144,12 +8023,12 @@ var AddSelect = function AddSelect(props) {
|
|
|
8144
8023
|
}
|
|
8145
8024
|
}; // 处理校验,默认不校验
|
|
8146
8025
|
isCheckPass = true;
|
|
8147
|
-
|
|
8026
|
+
_context2.prev = 8;
|
|
8148
8027
|
if (!(item === null || item === void 0 ? void 0 : item.selectCheckCallback)) {
|
|
8149
|
-
|
|
8028
|
+
_context2.next = 15;
|
|
8150
8029
|
break;
|
|
8151
8030
|
}
|
|
8152
|
-
|
|
8031
|
+
_context2.next = 12;
|
|
8153
8032
|
return item === null || item === void 0 ? void 0 : item.selectCheckCallback(popvalue, {
|
|
8154
8033
|
record: record,
|
|
8155
8034
|
index: index,
|
|
@@ -8159,21 +8038,21 @@ var AddSelect = function AddSelect(props) {
|
|
|
8159
8038
|
dataSourceSelectItem: dataSourceSelectItem
|
|
8160
8039
|
});
|
|
8161
8040
|
case 12:
|
|
8162
|
-
isCheckPass =
|
|
8163
|
-
|
|
8041
|
+
isCheckPass = _context2.sent;
|
|
8042
|
+
_context2.next = 19;
|
|
8164
8043
|
break;
|
|
8165
8044
|
case 15:
|
|
8166
|
-
|
|
8045
|
+
_context2.next = 17;
|
|
8167
8046
|
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
8168
8047
|
case 17:
|
|
8169
|
-
isConformToTheRules =
|
|
8048
|
+
isConformToTheRules = _context2.sent;
|
|
8170
8049
|
isCheckPass = !isConformToTheRules;
|
|
8171
8050
|
case 19:
|
|
8172
|
-
|
|
8051
|
+
_context2.next = 23;
|
|
8173
8052
|
break;
|
|
8174
8053
|
case 21:
|
|
8175
|
-
|
|
8176
|
-
|
|
8054
|
+
_context2.prev = 21;
|
|
8055
|
+
_context2.t0 = _context2["catch"](8);
|
|
8177
8056
|
case 23:
|
|
8178
8057
|
if (isCheckPass) {
|
|
8179
8058
|
changeValue(value, dataSourceSelectItem);
|
|
@@ -8184,11 +8063,11 @@ var AddSelect = function AddSelect(props) {
|
|
|
8184
8063
|
editRecord(record);
|
|
8185
8064
|
case 25:
|
|
8186
8065
|
case "end":
|
|
8187
|
-
return
|
|
8066
|
+
return _context2.stop();
|
|
8188
8067
|
}
|
|
8189
|
-
},
|
|
8068
|
+
}, _callee2, null, [[8, 21]]);
|
|
8190
8069
|
}));
|
|
8191
|
-
function onChange(
|
|
8070
|
+
function onChange(_x7) {
|
|
8192
8071
|
return _onChange.apply(this, arguments);
|
|
8193
8072
|
}
|
|
8194
8073
|
return onChange;
|
|
@@ -8448,8 +8327,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
8448
8327
|
}
|
|
8449
8328
|
}
|
|
8450
8329
|
setTimeout(function () {
|
|
8451
|
-
var _document$
|
|
8452
|
-
(_document$
|
|
8330
|
+
var _document$getElementB2;
|
|
8331
|
+
(_document$getElementB2 = document.getElementById("first-query")) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.focus();
|
|
8453
8332
|
}, 50);
|
|
8454
8333
|
};
|
|
8455
8334
|
// 将格式化完的数据回显到 表格中
|
|
@@ -8479,7 +8358,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8479
8358
|
handleLoading(isContinue, true);
|
|
8480
8359
|
onSaveCallback(popvalue).then(function (res) {
|
|
8481
8360
|
{
|
|
8482
|
-
var _Object$keys2, _document$
|
|
8361
|
+
var _Object$keys2, _document$getElementB3;
|
|
8483
8362
|
// 成功信息可以在调用处处理 即resolve({messageSuccessBackInfo: { needThrowSuccess: false } })、resolve({messageSuccessBackInfo: { needThrowSuccess: true, successMessage: '已保存' } })
|
|
8484
8363
|
var initSuccessMessage = '保存成功';
|
|
8485
8364
|
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
@@ -8489,7 +8368,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
8489
8368
|
antd.message.success(initSuccessMessage);
|
|
8490
8369
|
}
|
|
8491
8370
|
deleteSelectRows();
|
|
8492
|
-
(_document$
|
|
8371
|
+
(_document$getElementB3 = document.getElementById('first-query')) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.focus();
|
|
8493
8372
|
!isContinue && handleCancel();
|
|
8494
8373
|
}
|
|
8495
8374
|
handleLoading(isContinue, false);
|
|
@@ -10667,10 +10546,10 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10667
10546
|
selectProps = _objectSpread2({
|
|
10668
10547
|
placeholder: '输入商品(SPU)编码或名称',
|
|
10669
10548
|
renderTableColumns: [{
|
|
10670
|
-
title: 'SPU
|
|
10549
|
+
title: '商品编码(SPU)',
|
|
10671
10550
|
dataIndex: 'itemCode'
|
|
10672
10551
|
}, {
|
|
10673
|
-
title: 'SPU
|
|
10552
|
+
title: '商品名称(SPU)',
|
|
10674
10553
|
dataIndex: 'name'
|
|
10675
10554
|
}]
|
|
10676
10555
|
}, selectConfigProps);
|
|
@@ -10687,11 +10566,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10687
10566
|
}, requestConfigProp);
|
|
10688
10567
|
tableSearchForm = [{
|
|
10689
10568
|
name: 'itemCode*multiInput',
|
|
10690
|
-
label: 'SPU
|
|
10569
|
+
label: '商品编码(SPU)',
|
|
10691
10570
|
type: 'multipleQueryInput'
|
|
10692
10571
|
}, {
|
|
10693
10572
|
name: 'name*multiInput',
|
|
10694
|
-
label: 'SPU
|
|
10573
|
+
label: '商品名称(SPU)',
|
|
10695
10574
|
type: 'multipleQueryInput'
|
|
10696
10575
|
}, {
|
|
10697
10576
|
name: 'qp-brandId-in',
|
|
@@ -10785,11 +10664,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10785
10664
|
dataIndex: 'keyIndex',
|
|
10786
10665
|
defaultSort: 0
|
|
10787
10666
|
}, {
|
|
10788
|
-
title: 'SPU
|
|
10667
|
+
title: '商品编码(SPU)',
|
|
10789
10668
|
dataIndex: 'itemCode',
|
|
10790
10669
|
defaultSort: 1
|
|
10791
10670
|
}, {
|
|
10792
|
-
title: 'SPU
|
|
10671
|
+
title: '商品名称(SPU) ',
|
|
10793
10672
|
dataIndex: 'name',
|
|
10794
10673
|
defaultSort: 2
|
|
10795
10674
|
}, {
|
|
@@ -11143,7 +11022,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11143
11022
|
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
|
|
11144
11023
|
}], ['colorName', 'categoryId', 'classId', 'brandId'], hiddenFields);
|
|
11145
11024
|
var fieldLoadSource = fieldsRequest.map(function (i) {
|
|
11146
|
-
return loadSelectSource$1(i.url, i.params,
|
|
11025
|
+
return loadSelectSource$1(i.url, i.params, options);
|
|
11147
11026
|
});
|
|
11148
11027
|
requestConfig = _objectSpread2({
|
|
11149
11028
|
url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
|
package/package.json
CHANGED
|
@@ -523,11 +523,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
523
523
|
placeholder: '输入商品(SPU)编码或名称',
|
|
524
524
|
renderTableColumns: [
|
|
525
525
|
{
|
|
526
|
-
title: 'SPU
|
|
526
|
+
title: '商品编码(SPU)',
|
|
527
527
|
dataIndex: 'itemCode',
|
|
528
528
|
},
|
|
529
529
|
{
|
|
530
|
-
title: 'SPU
|
|
530
|
+
title: '商品名称(SPU)',
|
|
531
531
|
dataIndex: 'name',
|
|
532
532
|
},
|
|
533
533
|
],
|
|
@@ -547,8 +547,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
547
547
|
...requestConfigProp,
|
|
548
548
|
}
|
|
549
549
|
tableSearchForm = [
|
|
550
|
-
{ name: 'itemCode*multiInput', label: 'SPU
|
|
551
|
-
{ name: 'name*multiInput', label: 'SPU
|
|
550
|
+
{ name: 'itemCode*multiInput', label: '商品编码(SPU)', type: 'multipleQueryInput' },
|
|
551
|
+
{ name: 'name*multiInput', label: '商品名称(SPU)', type: 'multipleQueryInput' },
|
|
552
552
|
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
553
553
|
type: 'select',
|
|
554
554
|
props: {
|
|
@@ -626,12 +626,12 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
626
626
|
defaultSort: 0,
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
|
-
title: 'SPU
|
|
629
|
+
title: '商品编码(SPU)',
|
|
630
630
|
dataIndex: 'itemCode',
|
|
631
631
|
defaultSort: 1,
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
|
-
title: 'SPU
|
|
634
|
+
title: '商品名称(SPU) ',
|
|
635
635
|
dataIndex: 'name',
|
|
636
636
|
defaultSort: 2,
|
|
637
637
|
},
|
|
@@ -970,7 +970,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
970
970
|
['colorName', 'categoryId', 'classId', 'brandId'],
|
|
971
971
|
hiddenFields,
|
|
972
972
|
);
|
|
973
|
-
const fieldLoadSource = fieldsRequest.map((i: any) => loadSelectSource(i.url, i.params,
|
|
973
|
+
const fieldLoadSource = fieldsRequest.map((i: any) => loadSelectSource(i.url, i.params,options));
|
|
974
974
|
requestConfig = {
|
|
975
975
|
url: `${prefixUrl.selectPrefix}/skc/skcSelect`,
|
|
976
976
|
filter: 'qp-code,name-orGroup,like', // 过滤参数
|
|
@@ -222,98 +222,6 @@ const AddSelect = (props: any) => {
|
|
|
222
222
|
acc[key] = typeof value === 'function' ? value?.(record) : value;
|
|
223
223
|
return acc;
|
|
224
224
|
}, {});
|
|
225
|
-
|
|
226
|
-
// 可输入非数字字符
|
|
227
|
-
if(item.canInputString) {
|
|
228
|
-
return (
|
|
229
|
-
<InputNumber
|
|
230
|
-
min={0}
|
|
231
|
-
precision={0}
|
|
232
|
-
controls={false}
|
|
233
|
-
{...inputProps}
|
|
234
|
-
value={text || ''}
|
|
235
|
-
keyboard={false}
|
|
236
|
-
onPressEnter={(e: any) => {
|
|
237
|
-
e.target.blur();
|
|
238
|
-
}}
|
|
239
|
-
onBlur={async (e: any) => {
|
|
240
|
-
const {
|
|
241
|
-
target: { value },
|
|
242
|
-
} = e;
|
|
243
|
-
record[item.dataIndex] = value
|
|
244
|
-
editRecord(record)
|
|
245
|
-
}}
|
|
246
|
-
onKeyDown={(e) => {
|
|
247
|
-
if(e.keyCode === 13 && e.ctrlKey) {
|
|
248
|
-
handleOk(true)
|
|
249
|
-
document.getElementById("first-query")?.focus()
|
|
250
|
-
}
|
|
251
|
-
if(e.keyCode === 8 && e.ctrlKey) {
|
|
252
|
-
message.success('删除当前行')
|
|
253
|
-
e.stopPropagation();
|
|
254
|
-
e.preventDefault();
|
|
255
|
-
let dom = e.nativeEvent.path[5].children[index + 2]?.getElementsByTagName('input')[currentIndex]
|
|
256
|
-
if (dom) {
|
|
257
|
-
dom.select();
|
|
258
|
-
dom.focus();
|
|
259
|
-
dom.scrollIntoView(false)
|
|
260
|
-
}
|
|
261
|
-
dom = null
|
|
262
|
-
deleteRecord(record, popvalue);
|
|
263
|
-
}
|
|
264
|
-
if (e.keyCode === 37 && e.shiftKey) { // 左滑动
|
|
265
|
-
e.stopPropagation();
|
|
266
|
-
e.preventDefault();
|
|
267
|
-
let dom = e.nativeEvent.path[5].children[index + 1]?.getElementsByTagName('input')[currentIndex - 1]
|
|
268
|
-
if (dom) {
|
|
269
|
-
dom.select();
|
|
270
|
-
dom.focus();
|
|
271
|
-
dom.scrollIntoView(false)
|
|
272
|
-
}
|
|
273
|
-
dom = null
|
|
274
|
-
}
|
|
275
|
-
if (e.keyCode === 39 && e.shiftKey) { // 右滑
|
|
276
|
-
e.stopPropagation();
|
|
277
|
-
e.preventDefault();
|
|
278
|
-
let dom = e.nativeEvent.path[5].children[index + 1]?.getElementsByTagName('input')[currentIndex + 1]
|
|
279
|
-
if (dom) {
|
|
280
|
-
dom.select();
|
|
281
|
-
dom.focus();
|
|
282
|
-
dom.scrollIntoView(false)
|
|
283
|
-
}
|
|
284
|
-
dom = null
|
|
285
|
-
}
|
|
286
|
-
if (e.keyCode === 40) {
|
|
287
|
-
e.stopPropagation();
|
|
288
|
-
e.preventDefault();
|
|
289
|
-
let dom = e.nativeEvent.path[5].children[index + 2]?.getElementsByTagName('input')[currentIndex]
|
|
290
|
-
if (dom) {
|
|
291
|
-
dom.select();
|
|
292
|
-
dom.focus();
|
|
293
|
-
dom.scrollIntoView(false)
|
|
294
|
-
}
|
|
295
|
-
dom = null
|
|
296
|
-
} else if (e.keyCode === 38) {
|
|
297
|
-
e.stopPropagation();
|
|
298
|
-
e.preventDefault();
|
|
299
|
-
let dom1 = e.nativeEvent.path[5].children[index]?.getElementsByTagName('input')[currentIndex]
|
|
300
|
-
if (dom1) {
|
|
301
|
-
// dom1.value=""
|
|
302
|
-
// dom1.setSelectionRange(100, 0);
|
|
303
|
-
dom1.select();
|
|
304
|
-
dom1.focus();
|
|
305
|
-
dom1.scrollIntoViewIfNeeded(false)
|
|
306
|
-
// dom1.value=record['count']
|
|
307
|
-
}
|
|
308
|
-
dom1 = null
|
|
309
|
-
} else if (e.keyCode === 9 && index === selectedRowKeys.length - 1 && currentIndex === inputLength - 1) {
|
|
310
|
-
e.stopPropagation();
|
|
311
|
-
e.preventDefault();
|
|
312
|
-
}
|
|
313
|
-
}}
|
|
314
|
-
/>
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
225
|
|
|
318
226
|
return (
|
|
319
227
|
<InputNumber
|
|
@@ -32,7 +32,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
32
32
|
highestPopContainer = undefined,
|
|
33
33
|
fieldComponent,
|
|
34
34
|
onSaveCallback,
|
|
35
|
-
returnFormat = [],
|
|
36
35
|
selectBusinessType,
|
|
37
36
|
} = props;
|
|
38
37
|
const {
|
|
@@ -67,8 +66,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
67
66
|
const selectParamsKey = requestConfig?.filter || 'qp-codeAndName-like'
|
|
68
67
|
const selectParamsInitKey = requestConfig?.filterInit || selectParamsKey
|
|
69
68
|
const currentSelectProps = {
|
|
70
|
-
// 回显字段可自定义
|
|
71
|
-
optionLabelProp: "label",
|
|
72
69
|
...selectProps,
|
|
73
70
|
// 以下属性不可更改----设计配置项
|
|
74
71
|
showArrow: true,
|
|
@@ -76,6 +73,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
76
73
|
filterOption: false,
|
|
77
74
|
allowClear: true,
|
|
78
75
|
listHeight: 160,
|
|
76
|
+
optionLabelProp: "label",
|
|
79
77
|
autoClearSearchValue: false,
|
|
80
78
|
placement: 'bottomRight'
|
|
81
79
|
}
|
|
@@ -433,8 +431,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
433
431
|
|
|
434
432
|
const formaData = (value: any, source: any) => {
|
|
435
433
|
if (labelInValue) {
|
|
436
|
-
const
|
|
437
|
-
const formatResult = value.map((i: any) => (Object.assign({ key: i[mappingValueField] || i.key, label: i[mappingTextField] || i.label, value: i[mappingValueField] || i.value }, ...getFromat(returnFormat, i))))
|
|
434
|
+
const formatResult = value.map((i: any) => ({ key: i[mappingValueField] || i.key, label: i[mappingTextField] || i.label, value: i[mappingValueField] || i.value }))
|
|
438
435
|
onChange(selectMode ? formatResult : formatResult[0], value,source)
|
|
439
436
|
} else {
|
|
440
437
|
const formatResult = selectMode ? value.map((i: any) => i.value) : _.get(value[0], 'value')
|