feature/2.15.1.2407.01-权限

This commit is contained in:
黎永顺 2024-09-27 16:20:28 +08:00
parent ae665fb72d
commit 8996fa8d79
3 changed files with 19 additions and 8 deletions

View File

@ -31,7 +31,6 @@ class Index extends Component {
componentDidMount() {
window.addEventListener("message", this.handleReceive, false);
window.addEventListener("resize", this.handleResize, false);
this.getVariableSalaryList();
}
componentWillUnmount() {
@ -40,9 +39,12 @@ class Index extends Component {
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.taxAgentIds !== this.props.taxAgentIds && nextProps.taxAgentIds) {
this.getVariableSalaryList(nextProps);
}
if (nextProps.isQuery !== this.props.isQuery) this.setState({
pageInfo: { ...this.state.pageInfo, current: 1 }
}, () => this.getVariableSalaryList());
}, () => this.getVariableSalaryList(nextProps));
}
handleReceive = async ({ data }) => {
@ -67,8 +69,8 @@ class Index extends Component {
}
}
};
getVariableSalaryList = () => {
const { baseTableStore: { VSalryForm, getVariableSalaryList }, salaryMonth, taxAgentIds } = this.props;
getVariableSalaryList = (props) => {
const { baseTableStore: { VSalryForm, getVariableSalaryList }, salaryMonth, taxAgentIds } = props || this.props;
const { pageInfo } = this.state;
const { departmentIds } = VSalryForm.getFormParams();
this.setState({ loading: true });

View File

@ -109,15 +109,15 @@ class Index extends Component {
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "导入")}</Button>,
<WeaDatePicker format="YYYY-MM" value={salaryMonth}
onChange={val => this.setState({ salaryMonth: val }, () => this.handleAdvanceSearch())}/>,
<WeaSelect options={taxAgentOption} style={{ width: 200, display: "flex" }} multiple value={taxAgentIds}
onChange={val => this.setState({ taxAgentIds: val }, () => this.handleAdvanceSearch())}/>,
<WeaSelect options={taxAgentOption} style={{ width: 150, display: "flex" }} multiple value={taxAgentIds}
onChange={val => this.setState({ taxAgentIds: val })}/>,
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
onAdvanceSearch={this.handleAdvanceSearch}/>
] : [
<WeaDatePicker format="YYYY-MM" value={salaryMonth}
onChange={val => this.setState({ salaryMonth: val }, () => this.handleAdvanceSearch())}/>,
<WeaSelect options={taxAgentOption} style={{ width: 200, display: "flex" }} multiple value={taxAgentIds}
onChange={val => this.setState({ taxAgentIds: val }, () => this.handleAdvanceSearch())}/>,
<WeaSelect options={taxAgentOption} style={{ width: 150, display: "flex" }} multiple value={taxAgentIds}
onChange={val => this.setState({ taxAgentIds: val })}/>,
<AdvanceInputBtn searchType="advance" onOpenAdvanceSearch={() => this.openAdvanceSearch()}
onAdvanceSearch={this.handleAdvanceSearch}/>
],

View File

@ -1,6 +1,15 @@
.variable_salary_wrapper {
.wea-new-top-req-title > div:last-child {
right: 16px !important;
.ant-calendar-range-picker {
min-width: 100px !important;
width: 100px;
}
.wea-input-focus {
width: 140px;
}
}
.wea-new-top-req-content {