From 22ccbc575572e489329cc9fe8938194cda581d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 30 May 2023 15:11:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E=E6=89=A3?= =?UTF-8?q?=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA=E6=B7=BB=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E5=8F=B7=E6=9F=A5=E8=AF=A2=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/taxAgent/index.less | 24 +- .../hrmSalary/pages/taxAgent/personalScope.js | 6 +- .../pages/taxAgent/slideTaxagentUser.js | 222 +++++++++++------- 3 files changed, 150 insertions(+), 102 deletions(-) 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({ addTaxagentModalVisible: true })}/> + ]; + includeType === "0" && btns.shift(); return (
-
-
- { - this.handleTabClick(1); - }}> - 人员范围 - | { - this.handleTabClick(0); - }}> - 从范围中排除 - -
-
-
- { - (hideIconInTax || showSalaryItemBtn) &&
- { - includeType == "1" && - - } -
- - -
-
- } -
- { - 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.setState({ searchValue: value });*/} + {/* }}*/} + {/* onSearch={value => {*/} + {/* this.handleSearch(value);*/} + {/* }}*/} + {/* />*/} + {/* */} + {/**/} +