@bit-sun/business-component 3.1.10-alpha.10 → 3.1.10-alpha.12
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
|
@@ -4105,7 +4105,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4105
4105
|
_ref$noNeedSplit = _ref.noNeedSplit,
|
|
4106
4106
|
noNeedSplit = _ref$noNeedSplit === void 0 ? false : _ref$noNeedSplit,
|
|
4107
4107
|
_ref$method = _ref.method,
|
|
4108
|
-
method = _ref$method === void 0 ? 'get' : _ref$method
|
|
4108
|
+
method = _ref$method === void 0 ? 'get' : _ref$method,
|
|
4109
|
+
_ref$onlyOneDateSelec = _ref.onlyOneDateSelected,
|
|
4110
|
+
onlyOneDateSelected = _ref$onlyOneDateSelec === void 0 ? false : _ref$onlyOneDateSelec;
|
|
4109
4111
|
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || (ctx === null || ctx === void 0 ? void 0 : ctx.name) || 'supplierCode');
|
|
4110
4112
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
4111
4113
|
var initVal = value || (selectMode ? [] : null);
|
|
@@ -4466,6 +4468,10 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4466
4468
|
if (type === 1) {
|
|
4467
4469
|
var _ctx$form;
|
|
4468
4470
|
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
|
|
4471
|
+
if (onlyOneDateSelected === true && source.length === 1) {
|
|
4472
|
+
var _ctx$form2;
|
|
4473
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setFieldValue(resultSourceKey, source[0]['value']);
|
|
4474
|
+
}
|
|
4469
4475
|
setItems(source);
|
|
4470
4476
|
setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
|
|
4471
4477
|
} else {
|
|
@@ -4583,10 +4589,10 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4583
4589
|
};
|
|
4584
4590
|
var handleSelectOver = function handleSelectOver(selectedValue) {
|
|
4585
4591
|
if (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) {
|
|
4586
|
-
var _ctx$
|
|
4592
|
+
var _ctx$form3;
|
|
4587
4593
|
// 解决选择最后1页的sku,返回后,不显示名称问题
|
|
4588
4594
|
var source = _.uniqBy(items.concat(selectedValue), 'value');
|
|
4589
|
-
ctx === null || ctx === void 0 ? void 0 : (_ctx$
|
|
4595
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form3 = ctx.form) === null || _ctx$form3 === void 0 ? void 0 : _ctx$form3.setFieldSource(resultSourceKey, source);
|
|
4590
4596
|
setItems(source);
|
|
4591
4597
|
formaData(selectedValue, source);
|
|
4592
4598
|
} else {
|
|
@@ -31654,6 +31660,101 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
31654
31660
|
});
|
|
31655
31661
|
}
|
|
31656
31662
|
}
|
|
31663
|
+
// 行政组织选择器(按登录组织过滤)
|
|
31664
|
+
if (dataChoiceBusinessType == 211) {
|
|
31665
|
+
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|
|
31666
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
|
|
31667
|
+
disabled: disabled,
|
|
31668
|
+
treeCheckable: dataInputBusinessType === 12,
|
|
31669
|
+
businessType: "department",
|
|
31670
|
+
labelInValue: true,
|
|
31671
|
+
value: dataInputBusinessType === 12 ? values[0] : values[0][0],
|
|
31672
|
+
style: styleCommon,
|
|
31673
|
+
treeCheckStrictly: true,
|
|
31674
|
+
onChange: function onChange(value) {
|
|
31675
|
+
if (dataInputBusinessType === 12) {
|
|
31676
|
+
values[0] = value.map(function (i) {
|
|
31677
|
+
return i.key;
|
|
31678
|
+
});
|
|
31679
|
+
valueNames[0] = value.map(function (i) {
|
|
31680
|
+
return i.label || '';
|
|
31681
|
+
});
|
|
31682
|
+
} else {
|
|
31683
|
+
values[0] = [value.key];
|
|
31684
|
+
valueNames[0] = [value.label || ''];
|
|
31685
|
+
}
|
|
31686
|
+
callback(values, valueNames);
|
|
31687
|
+
},
|
|
31688
|
+
requestConfig: {
|
|
31689
|
+
initialParams: {
|
|
31690
|
+
'orgViewCode': 'administrative-organization-view',
|
|
31691
|
+
'qp-idPath-like': getCurrentTargetBgId() || ''
|
|
31692
|
+
}
|
|
31693
|
+
},
|
|
31694
|
+
getPopupContainer: function getPopupContainer() {
|
|
31695
|
+
return document.body;
|
|
31696
|
+
}
|
|
31697
|
+
}), /*#__PURE__*/React$1.createElement("span", null, "~"), /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
|
|
31698
|
+
disabled: disabled,
|
|
31699
|
+
treeCheckable: dataInputBusinessType === 12,
|
|
31700
|
+
businessType: "department",
|
|
31701
|
+
labelInValue: true,
|
|
31702
|
+
value: dataInputBusinessType === 12 ? values[1] : values[1][0],
|
|
31703
|
+
style: styleCommon,
|
|
31704
|
+
treeCheckStrictly: true,
|
|
31705
|
+
onChange: function onChange(value) {
|
|
31706
|
+
if (dataInputBusinessType === 12) {
|
|
31707
|
+
values[1] = value.map(function (i) {
|
|
31708
|
+
return i.key;
|
|
31709
|
+
});
|
|
31710
|
+
valueNames[1] = value.map(function (i) {
|
|
31711
|
+
return i.label || '';
|
|
31712
|
+
});
|
|
31713
|
+
} else {
|
|
31714
|
+
values[1] = [value.key];
|
|
31715
|
+
valueNames[1] = [value.label || ''];
|
|
31716
|
+
}
|
|
31717
|
+
callback(values, valueNames);
|
|
31718
|
+
},
|
|
31719
|
+
requestConfig: {
|
|
31720
|
+
initialParams: {
|
|
31721
|
+
'orgViewCode': 'administrative-organization-view',
|
|
31722
|
+
'qp-idPath-like': getCurrentTargetBgId() || ''
|
|
31723
|
+
}
|
|
31724
|
+
},
|
|
31725
|
+
getPopupContainer: function getPopupContainer() {
|
|
31726
|
+
return document.body;
|
|
31727
|
+
}
|
|
31728
|
+
}));
|
|
31729
|
+
} else {
|
|
31730
|
+
return /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
|
|
31731
|
+
disabled: disabled,
|
|
31732
|
+
treeCheckable: dataInputBusinessType === 12,
|
|
31733
|
+
businessType: "department",
|
|
31734
|
+
labelInValue: true,
|
|
31735
|
+
value: dataInputBusinessType === 12 ? values : values[0],
|
|
31736
|
+
style: styleCommon,
|
|
31737
|
+
treeCheckStrictly: true,
|
|
31738
|
+
onChange: function onChange(value) {
|
|
31739
|
+
if (dataInputBusinessType === 12) {
|
|
31740
|
+
values = value.map(function (i) {
|
|
31741
|
+
return i.key;
|
|
31742
|
+
}) || [];
|
|
31743
|
+
valueNames = value.map(function (i) {
|
|
31744
|
+
return i.label || '';
|
|
31745
|
+
}) || [];
|
|
31746
|
+
} else {
|
|
31747
|
+
values = (value === null || value === void 0 ? void 0 : value.key) ? [value.key] : [];
|
|
31748
|
+
valueNames = (value === null || value === void 0 ? void 0 : value.label) ? [value.label] : [];
|
|
31749
|
+
}
|
|
31750
|
+
callback(values, valueNames);
|
|
31751
|
+
},
|
|
31752
|
+
getPopupContainer: function getPopupContainer() {
|
|
31753
|
+
return document.body;
|
|
31754
|
+
}
|
|
31755
|
+
});
|
|
31756
|
+
}
|
|
31757
|
+
}
|
|
31657
31758
|
// 采购组织选择器
|
|
31658
31759
|
if (dataChoiceBusinessType == 220) {
|
|
31659
31760
|
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|
|
@@ -34204,6 +34305,25 @@ function RenderCompItem(props) {
|
|
|
34204
34305
|
getPopupContainer: function getPopupContainer() {
|
|
34205
34306
|
return document.body;
|
|
34206
34307
|
}
|
|
34308
|
+
})) || 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) === 211 && ( /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
|
|
34309
|
+
disabled: disabled,
|
|
34310
|
+
treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
|
|
34311
|
+
businessType: "department",
|
|
34312
|
+
labelInValue: true,
|
|
34313
|
+
value: showValue(ites.code),
|
|
34314
|
+
style: styleCommon,
|
|
34315
|
+
onChange: function onChange(value) {
|
|
34316
|
+
handleEdit(ites.code, value);
|
|
34317
|
+
},
|
|
34318
|
+
requestConfig: {
|
|
34319
|
+
initialParams: {
|
|
34320
|
+
'orgViewCode': 'administrative-organization-view',
|
|
34321
|
+
'qp-idPath-like': getCurrentTargetBgId() || ''
|
|
34322
|
+
}
|
|
34323
|
+
},
|
|
34324
|
+
getPopupContainer: function getPopupContainer() {
|
|
34325
|
+
return document.body;
|
|
34326
|
+
}
|
|
34207
34327
|
})) || 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) === 220 && ( /*#__PURE__*/React$1.createElement(BusinessTreeSearchSelect$1, {
|
|
34208
34328
|
disabled: disabled,
|
|
34209
34329
|
treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
|
package/dist/index.js
CHANGED
|
@@ -4128,7 +4128,9 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
4128
4128
|
_ref$noNeedSplit = _ref.noNeedSplit,
|
|
4129
4129
|
noNeedSplit = _ref$noNeedSplit === void 0 ? false : _ref$noNeedSplit,
|
|
4130
4130
|
_ref$method = _ref.method,
|
|
4131
|
-
method = _ref$method === void 0 ? 'get' : _ref$method
|
|
4131
|
+
method = _ref$method === void 0 ? 'get' : _ref$method,
|
|
4132
|
+
_ref$onlyOneDateSelec = _ref.onlyOneDateSelected,
|
|
4133
|
+
onlyOneDateSelected = _ref$onlyOneDateSelec === void 0 ? false : _ref$onlyOneDateSelec;
|
|
4132
4134
|
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || (ctx === null || ctx === void 0 ? void 0 : ctx.name) || 'supplierCode');
|
|
4133
4135
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
4134
4136
|
var initVal = value || (selectMode ? [] : null);
|
|
@@ -4489,6 +4491,10 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
4489
4491
|
if (type === 1) {
|
|
4490
4492
|
var _ctx$form;
|
|
4491
4493
|
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
|
|
4494
|
+
if (onlyOneDateSelected === true && source.length === 1) {
|
|
4495
|
+
var _ctx$form2;
|
|
4496
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setFieldValue(resultSourceKey, source[0]['value']);
|
|
4497
|
+
}
|
|
4492
4498
|
setItems(source);
|
|
4493
4499
|
setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
|
|
4494
4500
|
} else {
|
|
@@ -4606,10 +4612,10 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
4606
4612
|
};
|
|
4607
4613
|
var handleSelectOver = function handleSelectOver(selectedValue) {
|
|
4608
4614
|
if (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) {
|
|
4609
|
-
var _ctx$
|
|
4615
|
+
var _ctx$form3;
|
|
4610
4616
|
// 解决选择最后1页的sku,返回后,不显示名称问题
|
|
4611
4617
|
var source = ___default['default'].uniqBy(items.concat(selectedValue), 'value');
|
|
4612
|
-
ctx === null || ctx === void 0 ? void 0 : (_ctx$
|
|
4618
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form3 = ctx.form) === null || _ctx$form3 === void 0 ? void 0 : _ctx$form3.setFieldSource(resultSourceKey, source);
|
|
4613
4619
|
setItems(source);
|
|
4614
4620
|
formaData(selectedValue, source);
|
|
4615
4621
|
} else {
|
|
@@ -31677,6 +31683,101 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
31677
31683
|
});
|
|
31678
31684
|
}
|
|
31679
31685
|
}
|
|
31686
|
+
// 行政组织选择器(按登录组织过滤)
|
|
31687
|
+
if (dataChoiceBusinessType == 211) {
|
|
31688
|
+
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|
|
31689
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
|
|
31690
|
+
disabled: disabled,
|
|
31691
|
+
treeCheckable: dataInputBusinessType === 12,
|
|
31692
|
+
businessType: "department",
|
|
31693
|
+
labelInValue: true,
|
|
31694
|
+
value: dataInputBusinessType === 12 ? values[0] : values[0][0],
|
|
31695
|
+
style: styleCommon,
|
|
31696
|
+
treeCheckStrictly: true,
|
|
31697
|
+
onChange: function onChange(value) {
|
|
31698
|
+
if (dataInputBusinessType === 12) {
|
|
31699
|
+
values[0] = value.map(function (i) {
|
|
31700
|
+
return i.key;
|
|
31701
|
+
});
|
|
31702
|
+
valueNames[0] = value.map(function (i) {
|
|
31703
|
+
return i.label || '';
|
|
31704
|
+
});
|
|
31705
|
+
} else {
|
|
31706
|
+
values[0] = [value.key];
|
|
31707
|
+
valueNames[0] = [value.label || ''];
|
|
31708
|
+
}
|
|
31709
|
+
callback(values, valueNames);
|
|
31710
|
+
},
|
|
31711
|
+
requestConfig: {
|
|
31712
|
+
initialParams: {
|
|
31713
|
+
'orgViewCode': 'administrative-organization-view',
|
|
31714
|
+
'qp-idPath-like': getCurrentTargetBgId() || ''
|
|
31715
|
+
}
|
|
31716
|
+
},
|
|
31717
|
+
getPopupContainer: function getPopupContainer() {
|
|
31718
|
+
return document.body;
|
|
31719
|
+
}
|
|
31720
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", null, "~"), /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
|
|
31721
|
+
disabled: disabled,
|
|
31722
|
+
treeCheckable: dataInputBusinessType === 12,
|
|
31723
|
+
businessType: "department",
|
|
31724
|
+
labelInValue: true,
|
|
31725
|
+
value: dataInputBusinessType === 12 ? values[1] : values[1][0],
|
|
31726
|
+
style: styleCommon,
|
|
31727
|
+
treeCheckStrictly: true,
|
|
31728
|
+
onChange: function onChange(value) {
|
|
31729
|
+
if (dataInputBusinessType === 12) {
|
|
31730
|
+
values[1] = value.map(function (i) {
|
|
31731
|
+
return i.key;
|
|
31732
|
+
});
|
|
31733
|
+
valueNames[1] = value.map(function (i) {
|
|
31734
|
+
return i.label || '';
|
|
31735
|
+
});
|
|
31736
|
+
} else {
|
|
31737
|
+
values[1] = [value.key];
|
|
31738
|
+
valueNames[1] = [value.label || ''];
|
|
31739
|
+
}
|
|
31740
|
+
callback(values, valueNames);
|
|
31741
|
+
},
|
|
31742
|
+
requestConfig: {
|
|
31743
|
+
initialParams: {
|
|
31744
|
+
'orgViewCode': 'administrative-organization-view',
|
|
31745
|
+
'qp-idPath-like': getCurrentTargetBgId() || ''
|
|
31746
|
+
}
|
|
31747
|
+
},
|
|
31748
|
+
getPopupContainer: function getPopupContainer() {
|
|
31749
|
+
return document.body;
|
|
31750
|
+
}
|
|
31751
|
+
}));
|
|
31752
|
+
} else {
|
|
31753
|
+
return /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
|
|
31754
|
+
disabled: disabled,
|
|
31755
|
+
treeCheckable: dataInputBusinessType === 12,
|
|
31756
|
+
businessType: "department",
|
|
31757
|
+
labelInValue: true,
|
|
31758
|
+
value: dataInputBusinessType === 12 ? values : values[0],
|
|
31759
|
+
style: styleCommon,
|
|
31760
|
+
treeCheckStrictly: true,
|
|
31761
|
+
onChange: function onChange(value) {
|
|
31762
|
+
if (dataInputBusinessType === 12) {
|
|
31763
|
+
values = value.map(function (i) {
|
|
31764
|
+
return i.key;
|
|
31765
|
+
}) || [];
|
|
31766
|
+
valueNames = value.map(function (i) {
|
|
31767
|
+
return i.label || '';
|
|
31768
|
+
}) || [];
|
|
31769
|
+
} else {
|
|
31770
|
+
values = (value === null || value === void 0 ? void 0 : value.key) ? [value.key] : [];
|
|
31771
|
+
valueNames = (value === null || value === void 0 ? void 0 : value.label) ? [value.label] : [];
|
|
31772
|
+
}
|
|
31773
|
+
callback(values, valueNames);
|
|
31774
|
+
},
|
|
31775
|
+
getPopupContainer: function getPopupContainer() {
|
|
31776
|
+
return document.body;
|
|
31777
|
+
}
|
|
31778
|
+
});
|
|
31779
|
+
}
|
|
31780
|
+
}
|
|
31680
31781
|
// 采购组织选择器
|
|
31681
31782
|
if (dataChoiceBusinessType == 220) {
|
|
31682
31783
|
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|
|
@@ -34227,6 +34328,25 @@ function RenderCompItem(props) {
|
|
|
34227
34328
|
getPopupContainer: function getPopupContainer() {
|
|
34228
34329
|
return document.body;
|
|
34229
34330
|
}
|
|
34331
|
+
})) || 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) === 211 && ( /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
|
|
34332
|
+
disabled: disabled,
|
|
34333
|
+
treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
|
|
34334
|
+
businessType: "department",
|
|
34335
|
+
labelInValue: true,
|
|
34336
|
+
value: showValue(ites.code),
|
|
34337
|
+
style: styleCommon,
|
|
34338
|
+
onChange: function onChange(value) {
|
|
34339
|
+
handleEdit(ites.code, value);
|
|
34340
|
+
},
|
|
34341
|
+
requestConfig: {
|
|
34342
|
+
initialParams: {
|
|
34343
|
+
'orgViewCode': 'administrative-organization-view',
|
|
34344
|
+
'qp-idPath-like': getCurrentTargetBgId() || ''
|
|
34345
|
+
}
|
|
34346
|
+
},
|
|
34347
|
+
getPopupContainer: function getPopupContainer() {
|
|
34348
|
+
return document.body;
|
|
34349
|
+
}
|
|
34230
34350
|
})) || 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) === 220 && ( /*#__PURE__*/React__default['default'].createElement(BusinessTreeSearchSelect$1, {
|
|
34231
34351
|
disabled: disabled,
|
|
34232
34352
|
treeCheckable: (ites === null || ites === void 0 ? void 0 : ites.inputType) === 30,
|
package/package.json
CHANGED
|
@@ -44,7 +44,8 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
44
44
|
extralHeaders = {},// 额外请求头参数
|
|
45
45
|
specialBracket = false,// 是否使用特殊括弧显示选项 【value】text
|
|
46
46
|
noNeedSplit = false,// label显示不需要任何特殊化
|
|
47
|
-
method = 'get'
|
|
47
|
+
method = 'get',
|
|
48
|
+
onlyOneDateSelected = false,
|
|
48
49
|
} = requestConfig || {};
|
|
49
50
|
const resultSourceKey = handleSourceName(sourceName || requestConfig?.sourceName || ctx?.name || 'supplierCode')
|
|
50
51
|
|
|
@@ -372,6 +373,9 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
372
373
|
} else {
|
|
373
374
|
if (type === 1) {
|
|
374
375
|
ctx?.form?.setFieldSource(resultSourceKey, source)
|
|
376
|
+
if (onlyOneDateSelected === true && source.length === 1) {
|
|
377
|
+
ctx?.form?.setFieldValue(resultSourceKey, source[0]['value']);
|
|
378
|
+
}
|
|
375
379
|
setItems(source)
|
|
376
380
|
setItemsTotal(Number(res?.total || res?.totalCount || source.length))
|
|
377
381
|
} else {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { BsCascader } from '@/components/Functional/BsAntdSula';
|
|
3
3
|
import { BusinessSearchSelect, BusinessTreeSearchSelect } from '@/index';
|
|
4
4
|
import { getDictionarySource, judgeIsEmpty, uuid } from '../../../utils/utils';
|
|
5
|
+
import { getCurrentTargetBgId } from '../../../utils/LocalstorageUtils';
|
|
5
6
|
import { useRequest } from 'ahooks';
|
|
6
7
|
import { Input, InputNumber, DatePicker, Switch, Select } from 'antd';
|
|
7
8
|
import React, { useEffect, useState } from 'react'
|
|
@@ -406,6 +407,29 @@ export default function RenderCompItem(props:any){
|
|
|
406
407
|
/>
|
|
407
408
|
)) ||
|
|
408
409
|
null}
|
|
410
|
+
{/* 单选/多选 行政组织选择器(按登录组织过滤) */}
|
|
411
|
+
{((ites?.inputType === 20 || ites?.inputType === 30) &&
|
|
412
|
+
ites?.choiceType === 211 && (
|
|
413
|
+
<BusinessTreeSearchSelect
|
|
414
|
+
disabled={disabled}
|
|
415
|
+
treeCheckable={ites?.inputType === 30}
|
|
416
|
+
businessType="department"
|
|
417
|
+
labelInValue={true}
|
|
418
|
+
value={showValue(ites.code)}
|
|
419
|
+
style={styleCommon}
|
|
420
|
+
onChange={(value) => {
|
|
421
|
+
handleEdit(ites.code, value);
|
|
422
|
+
}}
|
|
423
|
+
requestConfig={{
|
|
424
|
+
initialParams:{
|
|
425
|
+
'orgViewCode': 'administrative-organization-view',
|
|
426
|
+
'qp-idPath-like': getCurrentTargetBgId() || '',
|
|
427
|
+
}
|
|
428
|
+
}}
|
|
429
|
+
getPopupContainer={() => document.body}
|
|
430
|
+
/>
|
|
431
|
+
)) ||
|
|
432
|
+
null}
|
|
409
433
|
{/* 单选/多选 采购组织选择器 */}
|
|
410
434
|
{((ites?.inputType === 20 || ites?.inputType === 30) &&
|
|
411
435
|
ites?.choiceType === 220 && (
|
|
@@ -4,6 +4,7 @@ import styles from './index.less';
|
|
|
4
4
|
import { getRegularThresholdRange } from './services';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
import { judgeIsEmpty } from '../../../utils/utils';
|
|
7
|
+
import { getCurrentTargetBgId } from '../../../utils/LocalstorageUtils';
|
|
7
8
|
import { handleError } from '../../../utils/requestUtils';
|
|
8
9
|
import { queryIdentityInfo, findChangedThresholdQuery, setParams, dateFormat, fullDateFormat } from './util';
|
|
9
10
|
import { request as SulaRequest } from 'bssula';
|
|
@@ -1218,6 +1219,91 @@ export default class RuleField extends Component {
|
|
|
1218
1219
|
);
|
|
1219
1220
|
}
|
|
1220
1221
|
}
|
|
1222
|
+
// 行政组织选择器(按登录组织过滤)
|
|
1223
|
+
if (dataChoiceBusinessType == 211) {
|
|
1224
|
+
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|
|
1225
|
+
return (
|
|
1226
|
+
<>
|
|
1227
|
+
<BusinessTreeSearchSelect
|
|
1228
|
+
disabled={disabled}
|
|
1229
|
+
treeCheckable={dataInputBusinessType === 12}
|
|
1230
|
+
businessType="department"
|
|
1231
|
+
labelInValue={true}
|
|
1232
|
+
value={dataInputBusinessType === 12 ? values[0] : values[0][0]}
|
|
1233
|
+
style={styleCommon}
|
|
1234
|
+
treeCheckStrictly={true}
|
|
1235
|
+
onChange={(value) => {
|
|
1236
|
+
if (dataInputBusinessType === 12) {
|
|
1237
|
+
values[0] = value.map((i) => i.key);
|
|
1238
|
+
valueNames[0] = value.map((i) => i.label || '');
|
|
1239
|
+
} else {
|
|
1240
|
+
values[0] = [value.key];
|
|
1241
|
+
valueNames[0] = [value.label || ''];
|
|
1242
|
+
}
|
|
1243
|
+
callback(values, valueNames);
|
|
1244
|
+
}}
|
|
1245
|
+
requestConfig={{
|
|
1246
|
+
initialParams:{
|
|
1247
|
+
'orgViewCode': 'administrative-organization-view',
|
|
1248
|
+
'qp-idPath-like': getCurrentTargetBgId() || '',
|
|
1249
|
+
}
|
|
1250
|
+
}}
|
|
1251
|
+
getPopupContainer={() => document.body}
|
|
1252
|
+
/>
|
|
1253
|
+
<span>~</span>
|
|
1254
|
+
<BusinessTreeSearchSelect
|
|
1255
|
+
disabled={disabled}
|
|
1256
|
+
treeCheckable={dataInputBusinessType === 12}
|
|
1257
|
+
businessType="department"
|
|
1258
|
+
labelInValue={true}
|
|
1259
|
+
value={dataInputBusinessType === 12 ? values[1] : values[1][0]}
|
|
1260
|
+
style={styleCommon}
|
|
1261
|
+
treeCheckStrictly={true}
|
|
1262
|
+
onChange={(value) => {
|
|
1263
|
+
if (dataInputBusinessType === 12) {
|
|
1264
|
+
values[1] = value.map((i) => i.key);
|
|
1265
|
+
valueNames[1] = value.map((i) => i.label || '');
|
|
1266
|
+
} else {
|
|
1267
|
+
values[1] = [value.key];
|
|
1268
|
+
valueNames[1] = [value.label || ''];
|
|
1269
|
+
}
|
|
1270
|
+
callback(values, valueNames);
|
|
1271
|
+
}}
|
|
1272
|
+
requestConfig={{
|
|
1273
|
+
initialParams:{
|
|
1274
|
+
'orgViewCode': 'administrative-organization-view',
|
|
1275
|
+
'qp-idPath-like': getCurrentTargetBgId() || '',
|
|
1276
|
+
}
|
|
1277
|
+
}}
|
|
1278
|
+
getPopupContainer={() => document.body}
|
|
1279
|
+
/>
|
|
1280
|
+
</>
|
|
1281
|
+
);
|
|
1282
|
+
} else {
|
|
1283
|
+
return (
|
|
1284
|
+
<BusinessTreeSearchSelect
|
|
1285
|
+
disabled={disabled}
|
|
1286
|
+
treeCheckable={dataInputBusinessType === 12}
|
|
1287
|
+
businessType="department"
|
|
1288
|
+
labelInValue={true}
|
|
1289
|
+
value={dataInputBusinessType === 12 ? values : values[0]}
|
|
1290
|
+
style={styleCommon}
|
|
1291
|
+
treeCheckStrictly={true}
|
|
1292
|
+
onChange={(value) => {
|
|
1293
|
+
if (dataInputBusinessType === 12) {
|
|
1294
|
+
values = value.map((i) => i.key)||[];
|
|
1295
|
+
valueNames = value.map((i) => i.label || '')||[];
|
|
1296
|
+
} else {
|
|
1297
|
+
values = value?.key?[value.key]:[];
|
|
1298
|
+
valueNames = value?.label?[value.label]:[];
|
|
1299
|
+
}
|
|
1300
|
+
callback(values, valueNames);
|
|
1301
|
+
}}
|
|
1302
|
+
getPopupContainer={() => document.body}
|
|
1303
|
+
/>
|
|
1304
|
+
);
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1221
1307
|
// 采购组织选择器
|
|
1222
1308
|
if (dataChoiceBusinessType == 220) {
|
|
1223
1309
|
if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
|