From aabcbd2519cbec8b47ba08613ced82216d264201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 19 Jul 2023 17:27:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/TipLabel/index.less | 65 +++++++++-------- pc4mobx/hrmSalary/index.js | 4 ++ .../components/enableSettings.js | 69 +++++++++++++++++++ .../components/index.less | 58 ++++++++++++++++ .../components/insufficientTrafficAlert.js | 57 +++++++++++++++ .../index.js | 53 ++++++++++++++ 6 files changed, 276 insertions(+), 30 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js diff --git a/pc4mobx/hrmSalary/components/TipLabel/index.less b/pc4mobx/hrmSalary/components/TipLabel/index.less index addc7741..b88403e9 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.less +++ b/pc4mobx/hrmSalary/components/TipLabel/index.less @@ -1,36 +1,41 @@ .tipLabelWrapper { - border-left: 1px solid #e2ecf2; + border-left: 1px solid #e2ecf2; + border-bottom: 1px solid #e2ecf2; + border-right: 1px solid #e2ecf2; + border-radius: 0px 0px 5px 5px; + width: 100%; + overflow: hidden; + + .titleWrapper { + width: 100%; + line-height: 19.2px; + padding: 10px; border-bottom: 1px solid #e2ecf2; - border-right: 1px solid #e2ecf2; - border-radius: 0px 0px 5px 5px; + background-color: #f7fbfe; + } + + .tipContentWrapper { + padding: 10px; + background: #FFF; + } + + .tipContentItem { + line-height: 20px; + padding: 10px 16px 0px; + color: rgb(153, 153, 153); + } + + .tipContentItem:first-child { + padding-top: 0; + } + + .formLabel { + font-size: 14px; + } + + .contentWrapper { width: 100%; overflow: hidden; - .titleWrapper { - width: 100%; - line-height: 19.2px; - padding: 10px; - border-bottom: 1px solid #e2ecf2; - background-color: #f7fbfe; - } - .tipContentWrapper { - padding: 10px; - } - .tipContentItem { - line-height: 20px; - padding: 0px 16px; - padding-top: 10px; - color: rgb(153, 153, 153); - } - .tipContentItem:first { - padding-top: 0px; - } - - .formLabel { - font-size: 14px; - } - .contentWrapper { - width: 100%; - overflow: hidden; - } + } } diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 6c0597da..8fecd66f 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -37,6 +37,7 @@ import EmployeeList from "./pages/employeeView"; import ReportView from "./pages/reportView"; import MySalaryView from "./pages/mySalary/mySalaryView"; import WatermarkPreview from "./pages/payroll/watermarkPreview"; +import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSalarySettings"; import stores from "./stores"; import "./style/index"; @@ -86,6 +87,7 @@ const DataAcquisition = (props) => props.children; // fieldManagement 字段管理 // analysisOfSalaryStatistics 薪酬统计分析 // reportView 薪酬报表查看 +// intelligentCalculateSalarySettings 智能算薪 const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js new file mode 100644 index 00000000..a6990968 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -0,0 +1,69 @@ +/* + * Author: 黎永顺 + * name: 启用设置 + * Description: + * Date: 2023/7/19 + */ +import React, { Component } from "react"; +import { Button, Col, Row } from "antd"; +import TipLabel from "../../../components/TipLabel"; +import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class EnableSettings extends Component { + render() { + const tipList = [ + getLabel(111, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), + getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况;"), + getLabel(111, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), + getLabel(111, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") + ]; + const Input = label => { + return ( + + + + ); + }; + const InputPassword = label => { + return ( + + + + ); + }; + return ( + + +
+
+
{getLabel(111, "智能算薪")}
+
{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}
+
+
+
+
+
+ +
+
+
+ + + + +
+ ); + } +} + +export default EnableSettings; diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less new file mode 100644 index 00000000..461a27cc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less @@ -0,0 +1,58 @@ +.enable-settings { + .swith-area, .userinfo { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 16px; + background-color: #fff; + box-sizing: border-box; + height: 80px; + border: 2px solid #e5e5e5; + border-left-color: #5d9cec; + + .left { + padding: 10px 0; + display: flex; + flex-direction: column; + justify-content: space-around; + + .title { + font-size: 14px; + margin-bottom: 4px; + } + + .info { + font-size: 12px; + color: #999; + } + } + } + + .userinfo { + margin-top: 16px; + + .left { + flex: 1 !important; + + .wea-search-group, .wea-form-cell { + padding: 0; + } + } + } +} + +.insufficientAlertWrapper { + background: #fff; + padding: 0; + border: 1px solid #f2f2f2; + border-bottom: none; + + .wea-content { + padding: 0; + + .wea-form-item { + padding: 5px 12px; + border-bottom: 1px solid #f2f2f2; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js new file mode 100644 index 00000000..7fde6b18 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js @@ -0,0 +1,57 @@ +/* + * Author: 黎永顺 + * name:流量不足提醒 + * Description: + * Date: 2023/7/19 + */ +import React, { Component } from "react"; +import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class InsufficientTrafficAlert extends Component { + constructor(props) { + super(props); + this.state = { + remind: "0" + }; + } + + render() { + const { remind } = this.state; + return ( + + + this.setState({ remind })}/> + + { + remind === "1" && + + + + + + + + + + } + + ); + } +} + +export default InsufficientTrafficAlert; diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js new file mode 100644 index 00000000..cfd7d7fc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js @@ -0,0 +1,53 @@ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaReqTop } from "ecCom"; +import EnableSettings from "./components/enableSettings"; +import InsufficientTrafficAlert from "./components/insufficientTrafficAlert"; + +const getLabel = WeaLocaleProvider.getLabel; +const tabs = [ + { key: "ENABLE_SETTINGS", title: getLabel(111, "启用设置") }, + { key: "INTERFACE_FLOW_STATISTICS", title: getLabel(111, "接口流量统计") }, + { key: "INSUFFICIENT_TRAFFIC_ALERT", title: getLabel(111, "流量不足提醒") }, + { key: "TRAFFIC_USAGE_RECORD", title: getLabel(111, "流量使用记录") } +]; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "ENABLE_SETTINGS" + }; + } + + renderChildren = () => { + const { selectedKey } = this.state; + let CurrentDom = null; + switch (selectedKey) { + case "ENABLE_SETTINGS": + CurrentDom = ; + break; + case "INSUFFICIENT_TRAFFIC_ALERT": + CurrentDom = ; + break; + default: + CurrentDom = null; + break; + } + return CurrentDom; + }; + + render() { + const { selectedKey } = this.state; + return ( + } iconBgcolor="#F14A2D" + tabDatas={tabs} onChange={selectedKey => this.setState({ selectedKey })} + > +
{this.renderChildren()}
+
+ ); + } +} + +export default Index; From f6db0c18dd16a7b2ff2805ebde60d01e585214f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 21 Jul 2023 15:56:13 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/enableSettings.js | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js index a6990968..93c305f0 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -5,32 +5,43 @@ * Date: 2023/7/19 */ import React, { Component } from "react"; -import { Button, Col, Row } from "antd"; +import { Button, Col, Input, Row } from "antd"; import TipLabel from "../../../components/TipLabel"; -import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; class EnableSettings extends Component { + constructor(props) { + super(props); + this.state = { + enable: "1" + }; + } + + handleEnale = (enable) => { + }; + render() { + const { enable } = this.state; const tipList = [ getLabel(111, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况;"), getLabel(111, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), getLabel(111, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") ]; - const Input = label => { + const InputAccount = label => { return ( - + ); }; const InputPassword = label => { return ( - + ); }; @@ -43,14 +54,14 @@ class EnableSettings extends Component {
{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}
-
+
From 9ae523ad878ead578e04bd506dcaada94971970f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 28 Jul 2023 09:23:35 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/enableSettings.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js index 93c305f0..bc24c71b 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -5,7 +5,7 @@ * Date: 2023/7/19 */ import React, { Component } from "react"; -import { Button, Col, Input, Row } from "antd"; +import { Button, Col, Input, Modal, Row } from "antd"; import TipLabel from "../../../components/TipLabel"; import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import "./index.less"; @@ -21,6 +21,19 @@ class EnableSettings extends Component { } handleEnale = (enable) => { + if (enable === "1") { + this.setState({ enable }); + } else { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"), + onOk: () => { + }, + onCancel: () => { + this.setState({ enable: this.state.enable }); + } + }); + } }; render() { From 3645c524345dc68903c1e33134083d3da9c54cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 9 Aug 2023 10:35:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../intelligentCalculateSalarySettings.js | 15 ++++ .../excelEditor/components/codeAction.js | 20 ++--- .../hrmSalary/components/excelEditor/index.js | 2 +- .../components/conditions.js | 16 ++-- .../components/dimensionSlide.js | 22 ++--- .../components/dimensionTable.js | 22 ++--- .../components/employeeDetails.js | 4 +- .../components/groupIndividualEditTable.js | 2 +- .../components/groupSpacingEditTable.js | 16 ++-- .../components/reportList.js | 16 ++-- .../components/statisticsModal.js | 6 +- .../components/enableSettings.js | 89 +++++++++++++++---- .../components/insufficientTrafficAlert.js | 8 +- 13 files changed, 155 insertions(+), 83 deletions(-) create mode 100644 pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js diff --git a/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js new file mode 100644 index 00000000..9ce1d575 --- /dev/null +++ b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js @@ -0,0 +1,15 @@ +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; + +//智能算薪-计费配置编辑表单 +export const apiflowBillingConfigGet = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/get", "GET", params); +}; +//智能算薪-计费配置保存 +export const apiflowBillingConfigSave = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/save", params); +}; +//智能算薪-计费配置开关 +export const apiflowBillingConfigEnable = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/enable", params); +}; diff --git a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js index bca61000..80d7df91 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js +++ b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js @@ -123,10 +123,10 @@ class CodeAction extends Component {
-
{getLabel(111, "变量")}
+
{getLabel(33748, "变量")}
- this.setState({ variableText })}/> this.setState({ variItemText })} /> } @@ -166,10 +166,10 @@ class CodeAction extends Component {
-
{getLabel(111, "函数")}
+
{getLabel(30686, "函数")}
- this.setState({ funcText })}/>
- {!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(111, "提示")} + {!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(558, "提示")}
@@ -232,12 +232,12 @@ const TipList = (props) => {
:
-
{getLabel(111, "语法")}
+
{getLabel(543403, "语法")}
{formatString}
{description}
-
{getLabel(111, "参数")}
+
{getLabel(561, "参数")}
{ _.map(paramDescs, it => { return
@@ -246,9 +246,9 @@ const TipList = (props) => {
; }) } -
{getLabel(111, "示例")}
+
{getLabel(82159, "示例")}
{example} -
{getLabel(111, "结果")}
+
{getLabel(356, "结果")}
{result}
; diff --git a/pc4mobx/hrmSalary/components/excelEditor/index.js b/pc4mobx/hrmSalary/components/excelEditor/index.js index 8b0fe4ae..c3a8fefc 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/index.js +++ b/pc4mobx/hrmSalary/components/excelEditor/index.js @@ -157,7 +157,7 @@ class ExcelEditor extends Component {
} diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js index a622aefb..3fd68eba 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js @@ -11,7 +11,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["dimType"], fieldcol: 14, - label: getLabel(111, "维度类型"), + label: getLabel(389137, "维度类型"), labelcol: 6, options: [], detailtype: 3, @@ -23,7 +23,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["setting4Qualitative"], fieldcol: 14, - label: getLabel(111, "统计维度"), + label: getLabel(506800, "统计维度"), labelcol: 6, options: [], rules: "required|string", @@ -34,7 +34,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["dimName"], fieldcol: 14, - label: getLabel(111, "统计维度名称"), + label: getLabel(543321, "统计维度名称"), labelcol: 6, value: "", rules: "required|string", @@ -45,7 +45,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["dimCode"], fieldcol: 14, - label: getLabel(111, "分组所属字段"), + label: getLabel(543322, "分组所属字段"), labelcol: 6, options: [], viewAttr: 2, @@ -57,13 +57,13 @@ export const condition = [ conditionType: "TEXTAREA", domkey: ["remark"], fieldcol: 14, - label: getLabel(111, "描述"), + label: getLabel(433, "描述"), labelcol: 6, value: "", viewAttr: 2 } ], - title: getLabel(111, "基础设置"), + title: getLabel(82751, "基础设置"), defaultshow: true } ]; @@ -75,7 +75,7 @@ export const reportCondition = [ conditionType: "INPUT", domkey: ["reportName"], fieldcol: 14, - label: getLabel(111, "报表名称"), + label: getLabel(15517, "报表名称"), labelcol: 6, value: "", rules: "required|string", @@ -86,7 +86,7 @@ export const reportCondition = [ conditionType: "SELECT", domkey: ["dimensionIds"], fieldcol: 14, - label: getLabel(111, "统计维度"), + label: getLabel(506800, "统计维度"), labelcol: 6, options: [], rules: "required|string", diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js index b7bd9c2e..8afc64d6 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js @@ -89,8 +89,8 @@ class DimensionSlide extends Component { if (dimType === "QUALITATIVE") { if (!setting4Qualitative || !extraParams.dimName) { Modal.warning({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "必要信息不完整,红色*为必填项!") + title: getLabel(131329, "信息确认"), + content: getLabel(383779, "必要信息不完整,红色*为必填项!") }); return; } @@ -100,8 +100,8 @@ class DimensionSlide extends Component { } else { if (!extraParams.dimName) { Modal.warning({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "必要信息不完整,红色*为必填项!") + title: getLabel(131329, "信息确认"), + content: getLabel(383779, "必要信息不完整,红色*为必填项!") }); return; } @@ -109,7 +109,7 @@ class DimensionSlide extends Component { const { setting4RationGroupSpacing } = this.state; const bool = _.every(setting4RationGroupSpacing, it => it.startValue !== "" && it.endValue !== "" && it.startValue <= it.endValue); if (_.isEmpty(setting4RationGroupSpacing) || !bool) { - message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!")); + message.warning(getLabel(543318, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!")); return; } else { payload = { @@ -127,7 +127,7 @@ class DimensionSlide extends Component { const { setting4RationGroupIndividual } = this.state; const bool = _.every(setting4RationGroupIndividual, it => it.value !== ""); if (_.isEmpty(setting4RationGroupIndividual) || !bool) { - message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,且数值必填")); + message.warning(getLabel(543319, "请完善分组设置相关数据!分组设置不能为空,且数值必填")); return; } else { payload = { @@ -141,11 +141,11 @@ class DimensionSlide extends Component { dimensionSave(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success(getLabel(111, "保存成功")); + message.success(getLabel(22619, "保存成功")); onCancel(true); this.props.form.resetForm(); } else { - message.error(errormsg || getLabel(111, "保存失败")); + message.error(errormsg || getLabel(22620, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -176,15 +176,15 @@ class DimensionSlide extends Component { className="dimensionSlideWrapper" title={
- {formId ? getLabel(111, "编辑统计维度") : getLabel(111, "新建统计维度")} - + {formId ? getLabel(543407, "编辑统计维度") : getLabel(543314, "新建统计维度")} +
} > {getSearchs(form, condition, 1, false, this.formItemChange)} { dimType !== "QUALITATIVE" && - + { dimType === "RATION_GROUP_SPACING" && { Modal.confirm({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "确认要删除吗?"), + title: getLabel(131329, "信息确认"), + content: getLabel(388758, "确认要删除吗?"), onOk: () => { dimensionDelete(payload).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "删除成功")); + message.success(getLabel(502230, "删除成功")); this.dimensionList(); } else { - message.error(errormsg || getLabel(111, "删除失败")); + message.error(errormsg || getLabel(20462, "删除失败")); } }); } @@ -67,7 +67,7 @@ class DimensionTable extends Component { const { onEdit } = this.props; const pagination = { ...pageInfo, - showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -83,22 +83,22 @@ class DimensionTable extends Component { } }; const columns = [ - { dataIndex: "dimName", title: getLabel(111, "统计维度") }, - { dataIndex: "remark", title: getLabel(111, "描述") }, - { dataIndex: "dimType", title: getLabel(111, "维度类型") }, + { dataIndex: "dimName", title: getLabel(506800, "统计维度") }, + { dataIndex: "remark", title: getLabel(433, "描述") }, + { dataIndex: "dimType", title: getLabel(389137, "维度类型") }, { - dataIndex: "operate", title: getLabel(111, "操作"), + dataIndex: "operate", title: getLabel(30585, "操作"), render: (_, record) => { return ( { record.canEdit && - onEdit(record.id)}>{getLabel(111, "编辑")} + onEdit(record.id)}>{getLabel(501169, "编辑")} } { record.canDelete && this.dimensionDelete([record.id])}>{getLabel(111, "删除")} + onClick={() => this.dimensionDelete([record.id])}>{getLabel(535052, "删除")} } ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js index dc89547d..bbc6d643 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js @@ -55,7 +55,7 @@ class EmployeeDetails extends Component { width: 80, render: (_, record) => { return {getLabel(111, "查看")}; + href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(33564, "查看")}; } }] }); @@ -67,7 +67,7 @@ class EmployeeDetails extends Component { const { dataSource, loading, columns, pageInfo } = this.state; const pagination = { ...pageInfo, - showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js index 1d709bc6..50b864b5 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js @@ -32,7 +32,7 @@ class GroupIndividualEditTable extends Component { const { dataSource } = this.state; const columns = [ { - title: getLabel(111, "分组设置值"), + title: getLabel(543320, "分组设置值"), dataIndex: "value", key: "value", com: [ diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js index c976cd93..3cb29022 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js @@ -39,7 +39,7 @@ class GroupSpacingEditTable extends Component { const { dataSource } = this.state; const columns = [ { - title: getLabel(111, "起始值"), + title: getLabel(541412, "起始值"), dataIndex: "startValue", key: "startValue", com: [ @@ -47,19 +47,19 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "含"), + title: getLabel(33864, "含"), dataIndex: "includeStart", key: "includeStart", com: [ { type: "CHECKBOX", key: "includeStart", - otherParams: { content: getLabel(111, "含") } + otherParams: { content: getLabel(33864, "含") } } ] }, { - title: getLabel(111, "至"), + title: getLabel(15322, "至"), dataIndex: "to", key: "to", com: [ @@ -67,7 +67,7 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "结束值"), + title: getLabel(508931, "结束值"), dataIndex: "endValue", key: "endValue", com: [ @@ -75,14 +75,14 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "含"), + title: getLabel(33864, "含"), dataIndex: "includeEnd", key: "includeEnd", com: [ { type: "CHECKBOX", key: "includeEnd", - otherParams: { content: getLabel(111, "含") } + otherParams: { content: getLabel(33864, "含") } } ] } @@ -90,7 +90,7 @@ class GroupSpacingEditTable extends Component { return ( ({ ...item, to: getLabel(111, "至") }))} + datas={_.map(dataSource, item => ({ ...item, to: getLabel(15322, "至") }))} showCopy={false} onChange={this.handleChangeTableData} /> ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js index 6510d5b1..0345cad3 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js @@ -34,16 +34,16 @@ class ReportList extends Component { }; reportStatisticsReportDelete = (payload) => { Modal.confirm({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "确认删除本条数据吗?"), + title: getLabel(131329, "信息确认"), + content: getLabel(543231, "确认删除本条数据吗?"), onOk: () => { const { reportName = "" } = this.props; reportStatisticsReportDelete(payload).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "删除成功")); + message.success(getLabel(502230, "删除成功")); this.reportStatisticsReportList({ reportName }); } else { - message.error(errormsg || getLabel(111, "删除失败")); + message.error(errormsg || getLabel(20462, "删除失败")); } }); } @@ -71,7 +71,7 @@ class ReportList extends Component { return ( { - _.isEmpty(dataSource) ?
{getLabel(111, "暂无数据")}
: + _.isEmpty(dataSource) ?
{getLabel(83553, "暂无数据")}
: _.map(dataSource, it => { const { reportName, dimension, id, dimensionId } = it; return this.handleGoReportView(id)}> @@ -80,15 +80,15 @@ class ReportList extends Component {
{reportName}
-
{getLabel(111, "统计维度")}:
+
{getLabel(506800, "统计维度")}:
{dimension}
this.handleOptsClick(e, id, dimensionId)}> - {getLabel(111, "编辑")} - {getLabel(111, "删除")} + {getLabel(501169, "编辑")} + {getLabel(535052, "删除")} }> diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js index c8920887..75595c3e 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js @@ -31,15 +31,15 @@ class StatisticsModal extends Component { this.setState({ loading: false }); if (status) { onCancel(true); - message.success(getLabel(111, "保存成功")); + message.success(getLabel(22619, "保存成功")); form.resetForm(); } else { - message.error(errormsg || getLabel(111, "保存失败")); + message.error(errormsg || getLabel(22620, "保存失败")); } }).catch(() => this.setState({ loading: false })); } else { Modal.warning({ - title: getLabel(111, "信息确认"), + title: getLabel(131329, "信息确认"), content: getLabel(111, "必要信息不完整,红色*为必填项!") }); } diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js index bc24c71b..ed849754 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -5,9 +5,14 @@ * Date: 2023/7/19 */ import React, { Component } from "react"; -import { Button, Col, Input, Modal, Row } from "antd"; +import { Button, Col, Input, message, Modal, Row } from "antd"; import TipLabel from "../../../components/TipLabel"; import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { + apiflowBillingConfigEnable, + apiflowBillingConfigGet, + apiflowBillingConfigSave +} from "../../../apis/intelligentCalculateSalarySettings"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -16,45 +21,94 @@ class EnableSettings extends Component { constructor(props) { super(props); this.state = { - enable: "1" + enable: "1", id: "", + appKey: "", appSecret: "", + loading: false }; } + componentDidMount() { + this.apiflowBillingConfigGet(); + } + + apiflowBillingConfigGet = () => { + apiflowBillingConfigGet().then(({ status, data }) => { + if (status) { + const { id, appKey, appSecret, enable } = data; + this.setState({ + appKey, appSecret, enable: enable ? "1" : "0", id + }); + } + }); + }; + apiflowBillingConfigEnable = (enable) => { + apiflowBillingConfigEnable({ enable }).then(({ status, errormsg }) => { + if (status) { + message.success(enable === "OFF" ? getLabel(111, "关闭成功!") : getLabel(111, "开启成功!")); + enable === "OFF" && this.setState({ enable: "0" }); + } else { + message.error(errormsg || (enable === "OFF" ? getLabel(111, "关闭失败!") : getLabel(111, "开启失败!"))); + this.setState({ enable: this.state.enable }); + } + }); + }; + apiflowBillingConfigSave = () => { + const { enable, id, appKey, appSecret } = this.state; + const payload = { + id, appKey, appSecret, + enable: enable === "1" ? "ON" : "OFF" + }; + this.setState({ loading: true }); + apiflowBillingConfigSave(payload).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(384521, "设置成功!")); + } else { + message.error(errormsg || getLabel(384522, "设置失败!")); + } + }).catch(() => this.setState({ loading: false })); + }; handleEnale = (enable) => { if (enable === "1") { - this.setState({ enable }); + this.setState({ enable }, () => this.apiflowBillingConfigEnable("ON")); } else { Modal.confirm({ title: getLabel(131329, "信息确认"), - content: getLabel(111, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"), - onOk: () => { - }, + content: getLabel(544344, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"), + onOk: () => this.apiflowBillingConfigEnable("OFF"), onCancel: () => { this.setState({ enable: this.state.enable }); } }); } }; + handleChangeInput = (key, val) => this.setState({ [key]: val }); render() { - const { enable } = this.state; + const { enable, appKey, appSecret, loading } = this.state; const tipList = [ - getLabel(111, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), - getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况;"), - getLabel(111, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), - getLabel(111, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") + getLabel(544282, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), + getLabel(544283, "2、您可在【接口流量统计】中查看接口流量使用情况;"), + getLabel(544284, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), + getLabel(544285, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") ]; const InputAccount = label => { return ( - + this.handleChangeInput("appKey", e.target.value)} + /> ); }; const InputPassword = label => { return ( - + this.handleChangeInput("appSecret", e.target.value)} + /> ); }; @@ -74,12 +128,15 @@ class EnableSettings extends Component {
-
+
+ +
diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js index 7fde6b18..9649f2f2 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js @@ -22,26 +22,26 @@ class InsufficientTrafficAlert extends Component { const { remind } = this.state; return ( - + this.setState({ remind })}/> { remind === "1" &&