diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index bd5f39fa..25b9dcc3 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -20,6 +20,7 @@ export default class CalculateDetail extends React.Component { showSearchAd: false, searchItemsValue: { employeeName: "", + workcode: "", departmentIds: "", positionIds: "", subcompanyIds: "", @@ -50,19 +51,20 @@ export default class CalculateDetail extends React.Component { } Input = (value, key) => { - const { employeeName } = this.state.searchItemsValue; + const { employeeName, workcode } = this.state.searchItemsValue; return ( - this.setState({ - searchItemsValue: { - ...this.state.searchItemsValue, - [key]: val - } - })}/> + this.setState({ + searchItemsValue: { + ...this.state.searchItemsValue, + [key]: val + } + })}/> ); }; @@ -315,6 +317,7 @@ export default class CalculateDetail extends React.Component { this.setState({ searchItemsValue: { employeeName: "", + workcode: "", departmentIds: "", positionIds: "", status: "", @@ -331,6 +334,7 @@ export default class CalculateDetail extends React.Component { const renderSearch = () => { const searchItems = [ { com: this.Input("姓名", "employeeName") }, + { com: this.Input("工号", "workcode") }, { com: this.Browser("分部", "subcompanyIds") }, { com: this.Browser("部门", "departmentIds") }, { com: this.Browser("岗位", "positionIds") }, diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index e74a8d8a..b67558e1 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -14,6 +14,7 @@ export default class UserSure extends React.Component { showSearchAd: false, searchItemsValue: { employeeName: "", + workcode: "", departmentIds: "", positionIds: "", status: "" @@ -41,19 +42,20 @@ export default class UserSure extends React.Component { } Input = (value, key) => { - const { employeeName } = this.state.searchItemsValue; + const { employeeName, workcode } = this.state.searchItemsValue; return ( - this.setState({ - searchItemsValue: { - ...this.state.searchItemsValue, - [key]: val - } - })}/> + this.setState({ + searchItemsValue: { + ...this.state.searchItemsValue, + [key]: val + } + })}/> ); }; @@ -353,6 +355,7 @@ export default class UserSure extends React.Component { const renderSearch = () => { const searchItems = [ { com: this.Input("姓名", "employeeName") }, + { com: this.Input("工号", "workcode") }, { com: this.Browser("部门", "departmentIds") }, { com: this.Browser("岗位", "positionIds") }, { com: this.Select("状态", "status") } diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 2c470e37..49b2c419 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -65,6 +65,7 @@ class Index extends Component { }, searchItemsValue: { username: "", + workcode: "", departmentIds: "", positionIds: "", userstatus: "", @@ -87,19 +88,20 @@ class Index extends Component { } Input = (value, key) => { - const { username } = this.state.searchItemsValue; + const { username, workcode } = this.state.searchItemsValue; return ( - this.setState({ - searchItemsValue: { - ...this.state.searchItemsValue, - [key]: val - } - })}/> + this.setState({ + searchItemsValue: { + ...this.state.searchItemsValue, + [key]: val + } + })}/> ); }; @@ -666,7 +668,8 @@ class Index extends Component { { com: this.Browser("岗位", "positionIds") }, { com: this.Select("人员状态", "userstatus") }, // { com: this.Select("档案状态", "archiveStatus") }, - { com: this.Select("个税扣缴义务人", "taxAgentId") } + { com: this.Select("个税扣缴义务人", "taxAgentId") }, + { com: this.Input("工号", "workcode") } ]; return ; }; @@ -685,6 +688,7 @@ class Index extends Component { this.setState({ searchItemsValue: { username: "", + workcode: "", departmentIds: "", positionIds: "", userstatus: "", diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js index 055007b9..c616f946 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/makeupDifference.js @@ -56,6 +56,7 @@ class MakeupDifference extends Component { handleChangeOpt = (key) => { const { importDiffModal } = this.state; const name = this.regTopRef.state.name; + const workcode = this.regTopRef.state.workcode; const billMonth = getQueryString("billMonth"); const paymentOrganization = getQueryString("paymentOrganization"); switch (key) { @@ -74,7 +75,7 @@ class MakeupDifference extends Component { window.open(url, "_self"); break; case "search": - this.diffListRef.recessionList({ userName: name, current: 1 }); + this.diffListRef.recessionList({ userName: name, workcode, current: 1 }); break; default: break; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index f0a6cf0e..c078312f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -7,7 +7,7 @@ import React, { Component } from "react"; import { Button, Icon, message, Modal, Spin, Tooltip } from "antd"; import { inject, observer } from "mobx-react"; -import { WeaInputSearch } from "ecCom"; +import { WeaFormItem, WeaInput, WeaSearchGroup, WeaTab } from "ecCom"; import { calcPageNo } from "../../../../util"; import { getQueryString } from "../../../../util/url"; import ProgressModal from "../../../../components/progressModal"; @@ -43,6 +43,7 @@ export default class NormalIndex extends Component { total: 0 }, searchValue: "", + workcode: "", progressVisible: false, progress: 0, fieldData: {}, //选中的表单头信息 @@ -55,7 +56,8 @@ export default class NormalIndex extends Component { visible: false }, showSum: false, - siaccountSum: {} + siaccountSum: {}, + showSearchAd: false }; this.timer = null; this.timerDelete = null; @@ -138,22 +140,24 @@ export default class NormalIndex extends Component { }), "*"); }; - handleSearch(value) { + handleSearch = () => { const { billMonth, selectedKey, paymentOrganization } = this.props; selectedKey === "1" ? this.getNormalList({ billMonth, current: 1, paymentOrganization, - userName: value + userName: this.state.searchValue, + workcode: this.state.workcode }) : this.getSupplementaryList({ billMonth, current: 1, paymentOrganization, - userName: value + userName: this.state.searchValue, + workcode: this.state.workcode }); - } + }; handleSave = () => { const { @@ -339,7 +343,7 @@ export default class NormalIndex extends Component { }); }; - handleCommonAccountClick() { + handleCommonAccountClick = () => { const { billMonth, selectedKey, paymentOrganization } = this.props; const { commonAccount } = this.props.standingBookStore; commonAccount({ billMonth, paymentOrganization, includes: [] }); @@ -397,7 +401,7 @@ export default class NormalIndex extends Component { }); }, 600); }); - } + }; handleExport = () => { const { billMonth, selectedKey, paymentOrganization } = this.props; @@ -438,11 +442,48 @@ export default class NormalIndex extends Component { } }); }; + getSearchs = () => { + return + + this.setState({ workcode: v })} + /> + + ; + }; render() { const { remarks, billMonth, selectedKey, paymentOrganization, standingBookStore } = this.props; - const { addProps, adjustSlide, importParams, returnEditPersonSlide } = this.state; + const { addProps, adjustSlide, importParams, returnEditPersonSlide, showSearchAd } = this.state; const { loading } = standingBookStore; + const btn1 = [ + 批量删除, + 添加该月正常缴纳人员 + ]; + const btn2 = [ + 核算, + this.setState({ adjustSlide: { ...adjustSlide, visible: true } })}>调差 + ]; + const btn3 = [ + { + window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`); + }}>线下对比 + ]; + const btn4 = [ + this.setState({ importParams: { ...importParams, visible: true } })}>导入数据 + ]; + const btn5 = [ + 导出全部 + ]; + let btn = []; + (this.props.type !== "detail" && this.props.selectedKey == "3") && (btn = [...btn, ...btn1]); + (selectedKey === "1" && this.props.type !== "detail") && (btn = [...btn, ...btn2]); + selectedKey === "1" && (btn = [...btn, ...btn3]); + this.props.type !== "detail" && (btn = [...btn, ...btn4]); + btn = [...btn, ...btn5]; return ( { @@ -467,125 +508,65 @@ export default class NormalIndex extends Component { } - - {this.props.type !== "detail" && this.props.selectedKey == "3" - ? - - - - - - - - : } - { + this.setState({ showSearchAd: bool })} + onSearchChange={searchValue => this.setState({ searchValue })} + buttons={btn} onSearch={this.handleSearch} onAdSearch={this.handleSearch} + onAdReset={() => this.setState({ workcode: "" })} searchsBasePlaceHolder="请输入员工姓名" + /> + { + this.setState({ + addProps: { + ...addProps, + visible: false + } + }, () => { + isRefresh && this.getSupplementaryList({ + billMonth, + current: this.state.current, + paymentOrganization + }); + }); + }} + /> + {/*核算进度条*/} + { + this.setState({ progressVisible: false, progress: 0 }); + }} + progress={this.state.progress} + /> + {/*导入弹框*/} + { + importParams.visible && + { this.setState({ - addProps: { - ...addProps, - visible: false - } - }, () => { - isRefresh && this.getSupplementaryList({ - billMonth, - current: this.state.current, - paymentOrganization - }); + fieldData }); }} - /> - { - selectedKey === "1" && this.props.type !== "detail" && - - { - this.handleCommonAccountClick(); - }}>核算 - { - this.setState({ - adjustSlide: { - ...adjustSlide, - visible: true - } - }); - }}>调差 - - } - { - selectedKey === "1" && - - { - window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`); - }}>线下对比 - - } - {/*核算进度条*/} - { - this.setState({ progressVisible: false, progress: 0 }); + this.setState({ importParams: { ...importParams, visible: false }, fieldData: {} }, () => { + const { billMonth, selectedKey, paymentOrganization } = this.props; + const { current } = this.state; + selectedKey === "1" + ? this.getNormalList({ billMonth, current, paymentOrganization }) + : this.getSupplementaryList({ billMonth, current, paymentOrganization }); + }); }} - progress={this.state.progress} + isStandingBook + standingBookTabKey={selectedKey} /> - { - this.props.type !== "detail" && - - this.setState({ importParams: { ...importParams, visible: true } })} - /> - - } - {/*导入弹框*/} - { - importParams.visible && - { - this.setState({ - fieldData - }); - }} - onCancel={() => { - this.setState({ importParams: { ...importParams, visible: false }, fieldData: {} }, () => { - const { billMonth, selectedKey, paymentOrganization } = this.props; - const { current } = this.state; - selectedKey === "1" - ? this.getNormalList({ billMonth, current, paymentOrganization }) - : this.getSupplementaryList({ billMonth, current, paymentOrganization }); - }); - }} - isStandingBook - standingBookTabKey={selectedKey} - /> - } - - - - - { - this.setState({ searchValue: value }); - }} - placeholder={"请输入姓名"} - onSearch={value => { - this.handleSearch(value); - }} - /> - + } {/* table */} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js index 78a837b9..8971946d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js @@ -1,13 +1,15 @@ import React, { Component } from "react"; import { Button } from "antd"; -import { WeaHelpfulTip, WeaInputSearch, WeaTop } from "ecCom"; +import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaTab } from "ecCom"; import { getQueryString } from "../../../../util/url"; class RegTop extends Component { constructor(props) { super(props); this.state = { - name: "" + name: "", + workcode: "", + showSearchAd: false }; } @@ -31,43 +33,55 @@ class RegTop extends Component { placement="bottomRight" width={250} />, - onChange("export")}> - - , - this.setState({ name })} - onSearch={() => onChange("search")} - /> + onChange("export")}>导出全部 ]; if (!type) { const [dom1, ...extra] = dom; const domBtn = regtopType === "regression" ? - onChange("add")}> - - : - onChange("import")}> - - ; + onChange("add")}>添加 : + onChange("import")}>导入; dom = [ dom1, - onChange("delete")}> - + onChange("delete")}> + 删除 , domBtn, ...extra ]; } return dom; }; + getSearchs = () => { + return + + this.setState({ workcode: v })} + /> + + ; + }; render() { - const { billMonth } = this.props; + const { showSearchAd } = this.state; + const { billMonth, onChange } = this.props; return ( - 账单月份{billMonth}} - buttons={this.renderTopBtns()} + this.setState({ showSearchAd: bool })} + onSearchChange={name => this.setState({ name })} + buttons={this.renderTopBtns()} onSearch={() => onChange("search")} onAdSearch={() => onChange("search")} + onAdReset={() => this.setState({ workcode: "" })} searchsBasePlaceHolder="请输入员工姓名" /> + // 账单月份{billMonth}} + // buttons={this.renderTopBtns()} + // /> ); } } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js index e525dd28..4b4e790d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regression.js @@ -74,6 +74,7 @@ class Regression extends Component { handleChangeOpt = (key) => { const { returnPersonModal } = this.state; const name = this.regTopRef.state.name; + const workcode = this.regTopRef.state.workcode; const billMonth = getQueryString("billMonth"); const creator = Number(getQueryString("creator")); const paymentOrganization = getQueryString("paymentOrganization"); @@ -97,7 +98,7 @@ class Regression extends Component { window.open(url, "_self"); break; case "search": - this.regListRef.recessionList({ userName: name, current: 1 }); + this.regListRef.recessionList({ userName: name, workcode, current: 1 }); break; default: break;