diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index b6fd6ffb..4678b86d 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -5,7 +5,7 @@ * Date: 2022/11/30 */ import React, { Component } from "react"; -import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaTextarea } from "ecCom"; import { Button, message, Modal } from "antd"; import { getTaxAgentRangeForm } from "../../apis/taxAgent"; import { commonEnumList } from "../../apis/ruleconfig"; @@ -91,6 +91,11 @@ class PersonalScopeModal extends Component { key: "POSITION", showname: "岗位", selected: false + }, + { + key: "SQL", + showname: "SQL", + selected: false } ]; this.setState({ @@ -124,7 +129,9 @@ class PersonalScopeModal extends Component { const payload = { employeeStatus: status.split(","), includeType, - targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })), + targetParams: targetType !== "SQL" ? + _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) : + [{ targetType, targetId: "0", target: targetTypeIds }], [saveKeyVal["key"]]: saveKeyVal["value"] }; this.setState({ loading: true }); @@ -156,6 +163,9 @@ class PersonalScopeModal extends Component { case "POSITION": browserType = { ...browserType, type: 278, title: "岗位选择" }; break; + case "SQL": + return this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>; default: break; } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 23d14a23..8f3ea971 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -1,8 +1,9 @@ import React from "react"; import { Button, Col, Row } from "antd"; -import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom"; +import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom"; import "../ledger/index.less"; +const { getLabel } = WeaLocaleProvider; export default class AddTaxAgentModal extends React.Component { constructor(props) { super(props); @@ -24,7 +25,7 @@ export default class AddTaxAgentModal extends React.Component { this.setState({ checkAll: "1" }); - }else{ + } else { this.setState({ checkAll: "0" }); @@ -38,10 +39,10 @@ export default class AddTaxAgentModal extends React.Component { const { checkboxValue, ids, selectedKey } = this.state; const payload = { employeeStatus: checkboxValue.split(","), - targetParams: _.map(ids.split(","), (it) => ({ - targetType: selectedKey, + targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({ + targetType: selectedKey, target: "", targetId: it - })) + })) : [{ targetType: selectedKey, targetId: "0", target: ids }] }; if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) { this.refs.weaError.showError(); @@ -64,7 +65,7 @@ export default class AddTaxAgentModal extends React.Component { this.setState({ selectedKey: "EMPLOYEE", checkboxValue: "", - checkAll: '0', + checkAll: "0", ids: "" }); }; @@ -182,6 +183,15 @@ export default class AddTaxAgentModal extends React.Component { /> )} + {this.state.selectedKey === "SQL" && ( + + this.setState({ ids })}/> + + )} @@ -197,13 +207,13 @@ export default class AddTaxAgentModal extends React.Component { if (checkAll === "1") { const checked = _.map(employeeStatus, it => it.id); this.setState({ - checkAll: '1', + checkAll: "1", checkboxValue: checked.join(",") }); } else { this.setState({ - checkAll: '0', - checkboxValue: '' + checkAll: "0", + checkboxValue: "" }); } }}/>