diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.less b/pc4mobx/hrmSalary/pages/taxAgent/index.less index efc466ba..ccff7add 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.less +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.less @@ -82,20 +82,24 @@ .slideWrapper { .slideRefereUser { + .wea-search-tab { + span:first-child { + & > .ant-btn { + margin-left: 10px; + border-radius: 3px; + background: #55a1f8; + border: none; + font-size: 14px; + line-height: 20px; + padding: 1px 4px; + } + } + } + .operateBtn { display: flex; align-items: center; //.addOrDelBtn{ - .ant-btn { - margin-left: 10px; - border-radius: 0; - padding: 0; - background: transparent; - border: none; - font-size: 20px; - line-height: 20px; - } - .ant-btn.ant-btn-primary[disabled] { color: #d8d8d8; } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js index 767822a1..94dbe860 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/personalScope.js @@ -206,10 +206,10 @@ export default class PersonalScope extends Component { targetTypeList={targetTypeList} onDeleteTaxAgent={this.taxAgentRangeDelete} onTaxAgentSave={this.taxAgentRangeSave} - onTaxAngetSearch={({ targetName, tab }) => { + onTaxAngetSearch={({ targetName, targetWorkcode, tab }) => { tab == "1" - ? this.getTaxAgentRangeListInclude({ targetName }) - : this.getTaxAgentRangeListExclude({ targetName }); + ? this.getTaxAgentRangeListInclude({ targetName, targetWorkcode }) + : this.getTaxAgentRangeListExclude({ targetName, targetWorkcode }); }} onChangeTab={(tab) => { tab == "1" diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index b7f3254e..3ea53d0a 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -1,6 +1,6 @@ import React from "react"; import { Button, message } from "antd"; -import { WeaInputSearch, WeaTable } from "ecCom"; +import { WeaButtonIcon, WeaFormItem, WeaInput, WeaSearchGroup, WeaTab, WeaTable } from "ecCom"; import AddTaxAgentModal from "./addTaxAgentModal"; import ImportModal from "../../components/importModal"; import { taxAgentRangeImportData, taxAgentRangePreview } from "../../apis/taxAgent"; @@ -11,10 +11,12 @@ export default class SlideTaxagentUser extends React.Component { constructor(props) { super(props); this.state = { + showSearchAd: false, addTaxagentModalVisible: false, - includeType: 1, + includeType: "1", selectedRowKeys: [], searchValue: "", + targetWorkcode: "", previewDataSource: [], importParams: { visible: false, @@ -50,12 +52,13 @@ export default class SlideTaxagentUser extends React.Component { onDeleteTaxAgent({ ids: this.state.selectedRowKeys, tab: includeType }); }; - handleSearch = value => { - const { includeType } = this.state; + handleSearch = () => { + const { includeType, searchValue, targetWorkcode } = this.state; const { onTaxAngetSearch } = this.props; onTaxAngetSearch({ tab: includeType, - targetName: value + targetName: searchValue, + targetWorkcode }); }; @@ -100,6 +103,16 @@ export default class SlideTaxagentUser extends React.Component { } }); }; + getSearchs = () => { + return + + this.setState({ targetWorkcode: v })} + /> + + ; + }; render() { const { @@ -108,7 +121,8 @@ export default class SlideTaxagentUser extends React.Component { searchValue, addTaxagentModalVisible, importParams, - previewDataSource + previewDataSource, + showSearchAd } = this.state; const { submitLoading, @@ -123,7 +137,8 @@ export default class SlideTaxagentUser extends React.Component { hideIconInTax, showSalaryItemBtn, onTaxAngetSearch, - taxAgentId + taxAgentId, + onChangeTab } = this.props; const rowSelection = { @@ -154,90 +169,119 @@ export default class SlideTaxagentUser extends React.Component { }); } }; - + let btns = [ + { + this.setState({ importParams: { ...importParams, visible: true, step: 0 } }); + }} + >, + , + this.setState({ addTaxagentModalVisible: true })}/> + ]; + includeType === "0" && btns.shift(); return ( - - - { - this.handleTabClick(1); - }}> - 人员范围 - | { - this.handleTabClick(0); - }}> - 从范围中排除 - - - - - { - (hideIconInTax || showSalaryItemBtn) && - { - includeType == "1" && - { - this.setState({ importParams: { ...importParams, visible: true, step: 0 } }); - }} - > - } - - { - this.handleTabDelete(); - }} - > - this.setState({ addTaxagentModalVisible: true })} - > - - - } - - { - this.setState({ searchValue: value }); - }} - onSearch={value => { - this.handleSearch(value); - }} - /> - - + { + this.setState({ showSearchAd }); + }} + buttons={(hideIconInTax || showSalaryItemBtn) ? btns : []} + onAdReset={() => this.setState({ targetWorkcode: "" })} + onAdSearch={this.handleSearch} + onSearch={this.handleSearch} + onSearchChange={searchValue => this.setState({ searchValue })} + onChange={v => this.setState({ includeType: v }, () => onChangeTab && onChangeTab(this.state.includeType))} + /> + {/**/} + {/* */} + {/* {*/} + {/* this.handleTabClick(1);*/} + {/* }}>*/} + {/* 人员范围*/} + {/* | {*/} + {/* this.handleTabClick(0);*/} + {/* }}>*/} + {/* 从范围中排除*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* {*/} + {/* (hideIconInTax || showSalaryItemBtn) && */} + {/* {*/} + {/* includeType == "1" &&*/} + {/* {*/} + {/* this.setState({ importParams: { ...importParams, visible: true, step: 0 } });*/} + {/* }}*/} + {/* >*/} + {/* }*/} + {/* */} + {/* {*/} + {/* this.handleTabDelete();*/} + {/* }}*/} + {/* >*/} + {/* this.setState({ addTaxagentModalVisible: true })}*/} + {/* >*/} + {/* */} + {/* */} + {/* }*/} + {/* */} + {/* {*/} + {/* this.setState({ searchValue: value });*/} + {/* }}*/} + {/* onSearch={value => {*/} + {/* this.handleSearch(value);*/} + {/* }}*/} + {/* />*/} + {/* */} + {/**/} +