产品-个税扣缴义务人添加工号查询的功能

This commit is contained in:
黎永顺 2023-05-30 15:11:16 +08:00
parent cc17ae7b09
commit 22ccbc5755
3 changed files with 150 additions and 102 deletions

View File

@ -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;
}

View File

@ -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"

View File

@ -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 <WeaSearchGroup center needTigger showGroup title="其他条件">
<WeaFormItem label="工号" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInput
value={this.state.targetWorkcode}
onChange={v => this.setState({ targetWorkcode: v })}
/>
</WeaFormItem>
</WeaSearchGroup>;
};
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 = [
<Button type="primary" size="small"
onClick={() => {
this.setState({ importParams: { ...importParams, visible: true, step: 0 } });
}}
><span className="icon-coms-leading-in" title="导入"></span></Button>,
<WeaButtonIcon buttonType="del" type="primary" disabled={_.isEmpty(selectedRowKeys)}
onClick={this.handleTabDelete}/>,
<WeaButtonIcon buttonType="add" type="primary" onClick={() => this.setState({ addTaxagentModalVisible: true })}/>
];
includeType === "0" && btns.shift();
return (
<div className="slideRefereUser">
<div
style={{
height: "47px",
lineHeight: "47px",
paddingLeft: "10px",
paddingRight: "10px",
display: "flex",
justifyContent: "space-between"
}}>
<div
style={{
display: "inlineBlock",
color: "#666"
}}>
<span
style={{
cursor: "pointer",
color: includeType == 1 ? "#4ba9f2" : "#000"
}}
onClick={() => {
this.handleTabClick(1);
}}>
人员范围
</span>|<span
style={{
cursor: "pointer",
color: includeType == 0 ? "#4ba9f2" : "#000"
}}
onClick={() => {
this.handleTabClick(0);
}}>
从范围中排除
</span>
</div>
<div>
<div
style={{
color: "#4ba9f2",
display: "inlineBlock",
float: "left"
}}>
{
(hideIconInTax || showSalaryItemBtn) && <div className="operateBtn">
{
includeType == "1" &&
<Button
type="primary"
size="small"
onClick={() => {
this.setState({ importParams: { ...importParams, visible: true, step: 0 } });
}}
><span className="icon-coms-leading-in" title="导入"></span></Button>
}
<div className="addOrDelBtn">
<Button type="primary"
size="small"
onClick={() => {
this.handleTabDelete();
}}
><span className="icon-coms-form-delete-hot" title="删除"></span></Button>
<Button type="primary"
size="small"
style={{ marginRight: 10 }}
onClick={() => this.setState({ addTaxagentModalVisible: true })}
><span className="icon-coms-Add-to-hot" title="添加"></span></Button>
</div>
</div>
}
</div>
<WeaInputSearch
style={{ marginTop: "8px", float: "right" }}
value={searchValue}
onChange={value => {
this.setState({ searchValue: value });
}}
onSearch={value => {
this.handleSearch(value);
}}
/>
</div>
</div>
<WeaTab
datas={[
{ title: "人员范围", viewcondition: "1" },
{ title: "从范围中排除", viewcondition: "0" }
]}
keyParam="viewcondition" selectedKey={includeType}
searchType={["base", "advanced"]} advanceHeight={200}
showSearchAd={showSearchAd} searchsAd={this.getSearchs()}
setShowSearchAd={showSearchAd => {
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))}
/>
{/*<div*/}
{/* style={{*/}
{/* height: "47px",*/}
{/* lineHeight: "47px",*/}
{/* paddingLeft: "10px",*/}
{/* paddingRight: "10px",*/}
{/* display: "flex",*/}
{/* justifyContent: "space-between"*/}
{/* }}>*/}
{/* <div*/}
{/* style={{*/}
{/* display: "inlineBlock",*/}
{/* color: "#666"*/}
{/* }}>*/}
{/* <span*/}
{/* style={{*/}
{/* cursor: "pointer",*/}
{/* color: includeType == 1 ? "#4ba9f2" : "#000"*/}
{/* }}*/}
{/* onClick={() => {*/}
{/* this.handleTabClick(1);*/}
{/* }}>*/}
{/* 人员范围*/}
{/* </span>|<span*/}
{/* style={{*/}
{/* cursor: "pointer",*/}
{/* color: includeType == 0 ? "#4ba9f2" : "#000"*/}
{/* }}*/}
{/* onClick={() => {*/}
{/* this.handleTabClick(0);*/}
{/* }}>*/}
{/* 从范围中排除*/}
{/* </span>*/}
{/* </div>*/}
{/* <div>*/}
{/* <div*/}
{/* style={{*/}
{/* color: "#4ba9f2",*/}
{/* display: "inlineBlock",*/}
{/* float: "left"*/}
{/* }}>*/}
{/* {*/}
{/* (hideIconInTax || showSalaryItemBtn) && <div className="operateBtn">*/}
{/* {*/}
{/* includeType == "1" &&*/}
{/* <Button*/}
{/* type="primary"*/}
{/* size="small"*/}
{/* onClick={() => {*/}
{/* this.setState({ importParams: { ...importParams, visible: true, step: 0 } });*/}
{/* }}*/}
{/* ><span className="icon-coms-leading-in" title="导入"></span></Button>*/}
{/* }*/}
{/* <div className="addOrDelBtn">*/}
{/* <Button type="primary"*/}
{/* size="small"*/}
{/* onClick={() => {*/}
{/* this.handleTabDelete();*/}
{/* }}*/}
{/* ><span className="icon-coms-form-delete-hot" title="删除"></span></Button>*/}
{/* <Button type="primary"*/}
{/* size="small"*/}
{/* style={{ marginRight: 10 }}*/}
{/* onClick={() => this.setState({ addTaxagentModalVisible: true })}*/}
{/* ><span className="icon-coms-Add-to-hot" title="添加"></span></Button>*/}
{/* </div>*/}
{/* </div>*/}
{/* }*/}
{/* </div>*/}
{/* <WeaInputSearch*/}
{/* style={{ marginTop: "8px", float: "right" }}*/}
{/* value={searchValue}*/}
{/* onChange={value => {*/}
{/* this.setState({ searchValue: value });*/}
{/* }}*/}
{/* onSearch={value => {*/}
{/* this.handleSearch(value);*/}
{/* }}*/}
{/* />*/}
{/* </div>*/}
{/*</div>*/}
<div style={{ maxHeight: "500px", scrollY: "scroll" }}>
<WeaTable
rowKey="id"