From 23e9a6ba421943a32db5f3b5ff239937ea9161f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 15 Aug 2024 10:28:18 +0800 Subject: [PATCH 1/3] hotfix/2.15.1.2407.01 --- .../components/PersonalScopeModal/index.js | 14 ++++++++-- .../pages/taxAgent/addTaxAgentModal.js | 28 +++++++++++++------ 2 files changed, 31 insertions(+), 11 deletions(-) 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: "" }); } }}/> From f984cd3f59602b32425f37c560d8922db88cd633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 15 Aug 2024 11:01:26 +0800 Subject: [PATCH 2/3] hotfix/2.15.1.2407.01 --- .../components/PersonalScopeModal/index.js | 30 +++++++++++++++++-- .../pages/taxAgent/addTaxAgentModal.js | 19 ++++++++++-- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 4678b86d..6155c670 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -5,13 +5,24 @@ * Date: 2022/11/30 */ import React, { Component } from "react"; -import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaTextarea } from "ecCom"; +import { + WeaBrowser, + WeaDialog, + WeaFormItem, + WeaHelpfulTip, + WeaLocaleProvider, + WeaSearchGroup, + WeaSelect, + WeaTextarea +} from "ecCom"; import { Button, message, Modal } from "antd"; import { getTaxAgentRangeForm } from "../../apis/taxAgent"; import { commonEnumList } from "../../apis/ruleconfig"; import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee"; import "./index.less"; +const getLabel = WeaLocaleProvider.getLabel; + class PersonalScopeModal extends Component { constructor(props) { super(props); @@ -164,8 +175,11 @@ class PersonalScopeModal extends Component { browserType = { ...browserType, type: 278, title: "岗位选择" }; break; case "SQL": - return this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>; + return
+ this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/> + }/> +
; default: break; } @@ -269,3 +283,13 @@ class PersonalScopeModal extends Component { } export default PersonalScopeModal; + +export const SQLHelpTip = () => { + return
+

{getLabel(111, "注意事项:")}

+

{getLabel(111, "1、sql需返回人员id")}

+

{getLabel(111, "2、sql结尾不需要 ; go /等符号")}

+

{getLabel(111, "使用例子:定义获取岗位是开发的人员")}

+

{getLabel(111, "select id from hrmresource where JOBTITLE = 17")}

+
; +}; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js index 8f3ea971..8125cb97 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -1,6 +1,16 @@ import React from "react"; import { Button, Col, Row } from "antd"; -import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom"; +import { + WeaBrowser, + WeaCheckbox, + WeaDialog, + WeaError, + WeaHelpfulTip, + WeaLocaleProvider, + WeaSelect, + WeaTextarea +} from "ecCom"; +import { SQLHelpTip } from "../../components/PersonalScopeModal"; import "../ledger/index.less"; const { getLabel } = WeaLocaleProvider; @@ -188,8 +198,11 @@ export default class AddTaxAgentModal extends React.Component { style={{ width: "100%" }} ref="weaError" error={getLabel(111, "请输入SQL")}> - this.setState({ ids })}/> +
+ this.setState({ ids })}/> + }/> +
)} From 5c9f954adb2977e353aea8dc613ed54d8a340abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 15 Aug 2024 11:04:14 +0800 Subject: [PATCH 3/3] hotfix/2.15.1.2407.01 --- pc4mobx/hrmSalary/components/PersonalScopeModal/index.js | 4 ++-- pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 6155c670..d0718a2f 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -176,9 +176,9 @@ class PersonalScopeModal extends Component { 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 8125cb97..fae1b5c6 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js @@ -201,7 +201,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({ ids })}/> - }/> + }/>
)}