Merge branch 'hotfix/2.15.1.2407.01' into release/2.15.1.2407.01
This commit is contained in:
commit
37f7a3bd6b
|
|
@ -5,13 +5,24 @@
|
|||
* Date: 2022/11/30
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import {
|
||||
WeaBrowser,
|
||||
WeaDialog,
|
||||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaTextarea
|
||||
} from "ecCom";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { getTaxAgentRangeForm } from "../../apis/taxAgent";
|
||||
import { commonEnumList } from "../../apis/ruleconfig";
|
||||
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class PersonalScopeModal extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -91,6 +102,11 @@ class PersonalScopeModal extends Component {
|
|||
key: "POSITION",
|
||||
showname: "岗位",
|
||||
selected: false
|
||||
},
|
||||
{
|
||||
key: "SQL",
|
||||
showname: "SQL",
|
||||
selected: false
|
||||
}
|
||||
];
|
||||
this.setState({
|
||||
|
|
@ -124,7 +140,9 @@ class PersonalScopeModal extends Component {
|
|||
const payload = {
|
||||
employeeStatus: status.split(","),
|
||||
includeType,
|
||||
targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })),
|
||||
targetParams: targetType !== "SQL" ?
|
||||
_.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) :
|
||||
[{ targetType, targetId: "0", target: targetTypeIds }],
|
||||
[saveKeyVal["key"]]: saveKeyVal["value"]
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
|
|
@ -156,6 +174,12 @@ class PersonalScopeModal extends Component {
|
|||
case "POSITION":
|
||||
browserType = { ...browserType, type: 278, title: "岗位选择" };
|
||||
break;
|
||||
case "SQL":
|
||||
return <div style={{ display: "flex", alignItems: "center" }}>
|
||||
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={targetTypeIds}
|
||||
onChange={val => this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>
|
||||
<WeaHelpfulTip style={{ marginLeft: 10 }} width={200} placement="topLeft" title={<SQLHelpTip/>}/>
|
||||
</div>;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -259,3 +283,13 @@ class PersonalScopeModal extends Component {
|
|||
}
|
||||
|
||||
export default PersonalScopeModal;
|
||||
|
||||
export const SQLHelpTip = () => {
|
||||
return <div>
|
||||
<p>{getLabel(111, "注意事项:")}</p>
|
||||
<p>{getLabel(111, "1、sql需返回人员id")}</p>
|
||||
<p>{getLabel(111, "2、sql结尾不需要 ; go /等符号")}</p>
|
||||
<p>{getLabel(111, "使用例子:定义获取岗位是开发的人员")}</p>
|
||||
<p>{getLabel(111, "select id from hrmresource where JOBTITLE = 17")}</p>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,19 @@
|
|||
import React from "react";
|
||||
import { Button, Col, Row } from "antd";
|
||||
import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom";
|
||||
import {
|
||||
WeaBrowser,
|
||||
WeaCheckbox,
|
||||
WeaDialog,
|
||||
WeaError,
|
||||
WeaHelpfulTip,
|
||||
WeaLocaleProvider,
|
||||
WeaSelect,
|
||||
WeaTextarea
|
||||
} from "ecCom";
|
||||
import { SQLHelpTip } from "../../components/PersonalScopeModal";
|
||||
import "../ledger/index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
export default class AddTaxAgentModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -24,7 +35,7 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
this.setState({
|
||||
checkAll: "1"
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
this.setState({
|
||||
checkAll: "0"
|
||||
});
|
||||
|
|
@ -38,10 +49,10 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
const { checkboxValue, ids, selectedKey } = this.state;
|
||||
const payload = {
|
||||
employeeStatus: checkboxValue.split(","),
|
||||
targetParams: _.map(ids.split(","), (it) => ({
|
||||
targetType: selectedKey,
|
||||
targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({
|
||||
targetType: selectedKey, target: "",
|
||||
targetId: it
|
||||
}))
|
||||
})) : [{ targetType: selectedKey, targetId: "0", target: ids }]
|
||||
};
|
||||
if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) {
|
||||
this.refs.weaError.showError();
|
||||
|
|
@ -64,7 +75,7 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
this.setState({
|
||||
selectedKey: "EMPLOYEE",
|
||||
checkboxValue: "",
|
||||
checkAll: '0',
|
||||
checkAll: "0",
|
||||
ids: ""
|
||||
});
|
||||
};
|
||||
|
|
@ -182,6 +193,18 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
/>
|
||||
</WeaError>
|
||||
)}
|
||||
{this.state.selectedKey === "SQL" && (
|
||||
<WeaError tipPosition="bottom"
|
||||
style={{ width: "100%" }}
|
||||
ref="weaError"
|
||||
error={getLabel(111, "请输入SQL")}>
|
||||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={this.state.ids}
|
||||
onChange={ids => this.setState({ ids })}/>
|
||||
<WeaHelpfulTip style={{ marginLeft: 10 }} width={280} placement="topLeft" title={<SQLHelpTip/>}/>
|
||||
</div>
|
||||
</WeaError>
|
||||
)}
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
@ -197,13 +220,13 @@ export default class AddTaxAgentModal extends React.Component {
|
|||
if (checkAll === "1") {
|
||||
const checked = _.map(employeeStatus, it => it.id);
|
||||
this.setState({
|
||||
checkAll: '1',
|
||||
checkAll: "1",
|
||||
checkboxValue: checked.join(",")
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
checkAll: '0',
|
||||
checkboxValue: ''
|
||||
checkAll: "0",
|
||||
checkboxValue: ""
|
||||
});
|
||||
}
|
||||
}}/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue