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/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/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/index.js b/pc4mobx/hrmSalary/index.js
index 4b788091..dc875fdd 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -38,6 +38,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";
@@ -87,6 +88,7 @@ const DataAcquisition = (props) => props.children;
// fieldManagement 字段管理
// analysisOfSalaryStatistics 薪酬统计分析
// reportView 薪酬报表查看
+// intelligentCalculateSalarySettings 智能算薪
const Routes = (
+
);
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
new file mode 100644
index 00000000..ed849754
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js
@@ -0,0 +1,150 @@
+/*
+ * Author: 黎永顺
+ * name: 启用设置
+ * Description:
+ * Date: 2023/7/19
+ */
+import React, { Component } from "react";
+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;
+
+class EnableSettings extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ 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.apiflowBillingConfigEnable("ON"));
+ } else {
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(544344, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"),
+ onOk: () => this.apiflowBillingConfigEnable("OFF"),
+ onCancel: () => {
+ this.setState({ enable: this.state.enable });
+ }
+ });
+ }
+ };
+ handleChangeInput = (key, val) => this.setState({ [key]: val });
+
+ render() {
+ const { enable, appKey, appSecret, loading } = this.state;
+ const tipList = [
+ 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)}
+ />
+
+ );
+ };
+ 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..9649f2f2
--- /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;