From 85441a1f69c312880839d22a99ec9813be281bcc Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 19 Sep 2022 13:36:36 +0800 Subject: [PATCH] 1 --- pc4mobx/hrmSalary/pages/ledger/index.less | 4 + .../pages/taxAgent/addTaxAgentModal.js | 190 +++++++++++------- 2 files changed, 120 insertions(+), 74 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledger/index.less b/pc4mobx/hrmSalary/pages/ledger/index.less index 7c0f3808..3ccbd3b0 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.less +++ b/pc4mobx/hrmSalary/pages/ledger/index.less @@ -309,6 +309,10 @@ .wea-select{ display: inline-block; position: relative; + .wea-required-e9{ + top: 0; + right: 0; + } } .ant-select-selection{ height: 30px; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 025b7911..770ddcae 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -1,6 +1,6 @@ import React from "react"; import { Button, Col, Row } from "antd"; -import { WeaBrowser, WeaDialog, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaDialog, WeaError, WeaSelect } from "ecCom"; import "../ledger/index.less"; export default class AddTaxAgentModal extends React.Component { @@ -28,6 +28,19 @@ export default class AddTaxAgentModal extends React.Component { targetId: it })) }; + if(_.isEmpty(ids) && _.isEmpty(checkboxValue)){ + this.refs.weaError.showError(); + this.refs.weaError1.showError(); + return + } + if(_.isEmpty(ids)){ + this.refs.weaError.showError(); + return + } + if(_.isEmpty(checkboxValue)){ + this.refs.weaError1.showError(); + return + } onTaxAgentSave && onTaxAgentSave(payload); }; @@ -46,7 +59,7 @@ export default class AddTaxAgentModal extends React.Component { return ( { + onCancel={() => { this.handleReset(); onCancel(); }} @@ -68,7 +81,7 @@ export default class AddTaxAgentModal extends React.Component {
({ ...it, key: it.id, @@ -81,75 +94,98 @@ export default class AddTaxAgentModal extends React.Component { }} />
-
+
{this.state.selectedKey == "EMPLOYEE" && ( - { - this.setState({ ids }); - }} - /> + + { + this.setState({ ids }); + }} + /> + )} {this.state.selectedKey == "DEPT" && ( - { - this.setState({ ids }); - }} - /> + + { + this.setState({ ids }); + }} + /> + )} {this.state.selectedKey == "SUBCOMPANY" && ( - { - this.setState({ ids }); - }} - /> + + { + this.setState({ ids }); + }} + /> + )} {this.state.selectedKey == "POSITION" && ( - { - this.setState({ ids }); - }} - /> + + { + this.setState({ ids }); + }} + /> + )}
@@ -157,15 +193,21 @@ export default class AddTaxAgentModal extends React.Component { 选择员工状态 - ({ - showname: it.name, - key: it.id - }))} - value={this.state.checkboxValue} - onChange={(value) => this.onCheckboxChange(value)} - /> + + ({ + showname: it.name, + key: it.id + }))} + value={this.state.checkboxValue} + onChange={(value) => this.onCheckboxChange(value)} + /> +