Merge branch 'feature/2.8.3-2308-智能算薪' into feature/v2-对接e10个税扣缴义务人设置-1121

This commit is contained in:
黎永顺 2023-08-09 11:47:37 +08:00
commit c2eb4400c4
17 changed files with 435 additions and 93 deletions

View File

@ -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);
};

View File

@ -5,6 +5,7 @@
border-radius: 0px 0px 5px 5px; border-radius: 0px 0px 5px 5px;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.titleWrapper { .titleWrapper {
width: 100%; width: 100%;
line-height: 19.2px; line-height: 19.2px;
@ -12,22 +13,26 @@
border-bottom: 1px solid #e2ecf2; border-bottom: 1px solid #e2ecf2;
background-color: #f7fbfe; background-color: #f7fbfe;
} }
.tipContentWrapper { .tipContentWrapper {
padding: 10px; padding: 10px;
background: #FFF;
} }
.tipContentItem { .tipContentItem {
line-height: 20px; line-height: 20px;
padding: 0px 16px; padding: 10px 16px 0px;
padding-top: 10px;
color: rgb(153, 153, 153); color: rgb(153, 153, 153);
} }
.tipContentItem:first {
padding-top: 0px; .tipContentItem:first-child {
padding-top: 0;
} }
.formLabel { .formLabel {
font-size: 14px; font-size: 14px;
} }
.contentWrapper { .contentWrapper {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;

View File

@ -123,10 +123,10 @@ class CodeAction extends Component {
<div className="excel-codeAction"> <div className="excel-codeAction">
<div className="excel-codeAction-item"> <div className="excel-codeAction-item">
<div className="excel-codeAction-header"> <div className="excel-codeAction-header">
<div className="excel-codeAction-header-title">{getLabel(111, "变量")}</div> <div className="excel-codeAction-header-title">{getLabel(33748, "变量")}</div>
</div> </div>
<div className="excel-codeAction-content"> <div className="excel-codeAction-content">
<WeaInputSearch value={variableText} placeholder={getLabel(111, "请输入变量名称")} <WeaInputSearch value={variableText} placeholder={getLabel(125864, "请输入变量名称")}
className="variableOuterInput" className="variableOuterInput"
onChange={variableText => this.setState({ variableText })}/> onChange={variableText => this.setState({ variableText })}/>
<Tree className="variableTree" showLine expandedKeys={variableExpandedKeys} <Tree className="variableTree" showLine expandedKeys={variableExpandedKeys}
@ -146,7 +146,7 @@ class CodeAction extends Component {
title={ title={
<WeaInputSearch <WeaInputSearch
value={variItemText} value={variItemText}
placeholder={getLabel(111, "请输入变量名称")} placeholder={getLabel(125864, "请输入变量名称")}
onChange={variItemText => this.setState({ variItemText })} onChange={variItemText => this.setState({ variItemText })}
/> />
} }
@ -166,10 +166,10 @@ class CodeAction extends Component {
<React.Fragment> <React.Fragment>
<div className="excel-codeAction-item"> <div className="excel-codeAction-item">
<div className="excel-codeAction-header"> <div className="excel-codeAction-header">
<div className="excel-codeAction-header-title">{getLabel(111, "函数")}</div> <div className="excel-codeAction-header-title">{getLabel(30686, "函数")}</div>
</div> </div>
<div className="excel-codeAction-content"> <div className="excel-codeAction-content">
<WeaInputSearch value={funcText} placeholder={getLabel(111, "请输入函数名称")} <WeaInputSearch value={funcText} placeholder={getLabel(543713, "请输入函数名称")}
className="variableOuterInput" className="variableOuterInput"
onChange={funcText => this.setState({ funcText })}/> onChange={funcText => this.setState({ funcText })}/>
<Tree className="variableTree" showLine expandedKeys={funcExpandedKeys} <Tree className="variableTree" showLine expandedKeys={funcExpandedKeys}
@ -207,7 +207,7 @@ class CodeAction extends Component {
<div className="excel-codeAction-item"> <div className="excel-codeAction-item">
<div className="excel-codeAction-header"> <div className="excel-codeAction-header">
<div className="excel-codeAction-header-title"> <div className="excel-codeAction-header-title">
{!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(111, "提示")} {!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(558, "提示")}
</div> </div>
</div> </div>
<div className="excel-codeAction-content"><TipList tips={funcHoverItem}/></div> <div className="excel-codeAction-content"><TipList tips={funcHoverItem}/></div>
@ -232,12 +232,12 @@ const TipList = (props) => {
</div> </div>
</div> : <div className="code-action-list"> </div> : <div className="code-action-list">
<div className="code-action-tips"> <div className="code-action-tips">
<div className="code-action-tips-title">{getLabel(111, "语法")}</div> <div className="code-action-tips-title">{getLabel(543403, "语法")}</div>
<div className="code-action-tips-info"> <div className="code-action-tips-info">
<div>{formatString}</div> <div>{formatString}</div>
<div>{description}</div> <div>{description}</div>
</div> </div>
<div className="code-action-tips-title">{getLabel(111, "参数")}</div> <div className="code-action-tips-title">{getLabel(561, "参数")}</div>
{ {
_.map(paramDescs, it => { _.map(paramDescs, it => {
return <div className="code-action-tips-info"> return <div className="code-action-tips-info">
@ -246,9 +246,9 @@ const TipList = (props) => {
</div>; </div>;
}) })
} }
<div className="code-action-tips-title">{getLabel(111, "示例")}</div> <div className="code-action-tips-title">{getLabel(82159, "示例")}</div>
<span className="code-action-tips-info">{example}</span> <span className="code-action-tips-info">{example}</span>
<div className="code-action-tips-title">{getLabel(111, "结果")}</div> <div className="code-action-tips-title">{getLabel(356, "结果")}</div>
<span className="code-action-tips-info">{result}</span> <span className="code-action-tips-info">{result}</span>
</div> </div>
</div>; </div>;

View File

@ -157,7 +157,7 @@ class ExcelEditor extends Component {
</div> </div>
<Button type="ghost" <Button type="ghost"
onClick={() => this.setState({ isFormter: !isFormter }, () => this.autoFormatSelection())}> onClick={() => this.setState({ isFormter: !isFormter }, () => this.autoFormatSelection())}>
{!isFormter ? getLabel(111, "格式美化") : getLabel(111, "格式还原")} {!isFormter ? getLabel(543711, "格式美化") : getLabel(543712, "格式还原")}
</Button> </Button>
</div> </div>
} }

View File

@ -38,6 +38,7 @@ import EmployeeList from "./pages/employeeView";
import ReportView from "./pages/reportView"; import ReportView from "./pages/reportView";
import MySalaryView from "./pages/mySalary/mySalaryView"; import MySalaryView from "./pages/mySalary/mySalaryView";
import WatermarkPreview from "./pages/payroll/watermarkPreview"; import WatermarkPreview from "./pages/payroll/watermarkPreview";
import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSalarySettings";
import stores from "./stores"; import stores from "./stores";
import "./style/index"; import "./style/index";
@ -87,6 +88,7 @@ const DataAcquisition = (props) => props.children;
// fieldManagement 字段管理 // fieldManagement 字段管理
// analysisOfSalaryStatistics 薪酬统计分析 // analysisOfSalaryStatistics 薪酬统计分析
// reportView 薪酬报表查看 // reportView 薪酬报表查看
// intelligentCalculateSalarySettings 智能算薪
const Routes = ( const Routes = (
<Route <Route
@ -165,6 +167,8 @@ const Routes = (
<Route key="analysisOfSalaryStatistics" path="analysisOfSalaryStatistics" component={AnalysisOfSalaryStatistics}/> <Route key="analysisOfSalaryStatistics" path="analysisOfSalaryStatistics" component={AnalysisOfSalaryStatistics}/>
<Route key="analysisOfSalaryStatisticsId" path="analysisOfSalaryStatistics/:employeeId" component={EmployeeList}/> <Route key="analysisOfSalaryStatisticsId" path="analysisOfSalaryStatistics/:employeeId" component={EmployeeList}/>
<Route key="reportView" path="reportView" component={ReportView}/> <Route key="reportView" path="reportView" component={ReportView}/>
<Route key="intelligentCalculateSalarySettings" path="intelligentCalculateSalarySettings"
component={IntelligentCalculateSalarySettings}/>
</Route> </Route>
); );

View File

@ -11,7 +11,7 @@ export const condition = [
conditionType: "SELECT", conditionType: "SELECT",
domkey: ["dimType"], domkey: ["dimType"],
fieldcol: 14, fieldcol: 14,
label: getLabel(111, "维度类型"), label: getLabel(389137, "维度类型"),
labelcol: 6, labelcol: 6,
options: [], options: [],
detailtype: 3, detailtype: 3,
@ -23,7 +23,7 @@ export const condition = [
conditionType: "SELECT", conditionType: "SELECT",
domkey: ["setting4Qualitative"], domkey: ["setting4Qualitative"],
fieldcol: 14, fieldcol: 14,
label: getLabel(111, "统计维度"), label: getLabel(506800, "统计维度"),
labelcol: 6, labelcol: 6,
options: [], options: [],
rules: "required|string", rules: "required|string",
@ -34,7 +34,7 @@ export const condition = [
conditionType: "INPUT", conditionType: "INPUT",
domkey: ["dimName"], domkey: ["dimName"],
fieldcol: 14, fieldcol: 14,
label: getLabel(111, "统计维度名称"), label: getLabel(543321, "统计维度名称"),
labelcol: 6, labelcol: 6,
value: "", value: "",
rules: "required|string", rules: "required|string",
@ -45,7 +45,7 @@ export const condition = [
conditionType: "SELECT", conditionType: "SELECT",
domkey: ["dimCode"], domkey: ["dimCode"],
fieldcol: 14, fieldcol: 14,
label: getLabel(111, "分组所属字段"), label: getLabel(543322, "分组所属字段"),
labelcol: 6, labelcol: 6,
options: [], options: [],
viewAttr: 2, viewAttr: 2,
@ -57,13 +57,13 @@ export const condition = [
conditionType: "TEXTAREA", conditionType: "TEXTAREA",
domkey: ["remark"], domkey: ["remark"],
fieldcol: 14, fieldcol: 14,
label: getLabel(111, "描述"), label: getLabel(433, "描述"),
labelcol: 6, labelcol: 6,
value: "", value: "",
viewAttr: 2 viewAttr: 2
} }
], ],
title: getLabel(111, "基础设置"), title: getLabel(82751, "基础设置"),
defaultshow: true defaultshow: true
} }
]; ];
@ -75,7 +75,7 @@ export const reportCondition = [
conditionType: "INPUT", conditionType: "INPUT",
domkey: ["reportName"], domkey: ["reportName"],
fieldcol: 14, fieldcol: 14,
label: getLabel(111, "报表名称"), label: getLabel(15517, "报表名称"),
labelcol: 6, labelcol: 6,
value: "", value: "",
rules: "required|string", rules: "required|string",
@ -86,7 +86,7 @@ export const reportCondition = [
conditionType: "SELECT", conditionType: "SELECT",
domkey: ["dimensionIds"], domkey: ["dimensionIds"],
fieldcol: 14, fieldcol: 14,
label: getLabel(111, "统计维度"), label: getLabel(506800, "统计维度"),
labelcol: 6, labelcol: 6,
options: [], options: [],
rules: "required|string", rules: "required|string",

View File

@ -89,8 +89,8 @@ class DimensionSlide extends Component {
if (dimType === "QUALITATIVE") { if (dimType === "QUALITATIVE") {
if (!setting4Qualitative || !extraParams.dimName) { if (!setting4Qualitative || !extraParams.dimName) {
Modal.warning({ Modal.warning({
title: getLabel(111, "信息确认"), title: getLabel(131329, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!") content: getLabel(383779, "必要信息不完整,红色*为必填项!")
}); });
return; return;
} }
@ -100,8 +100,8 @@ class DimensionSlide extends Component {
} else { } else {
if (!extraParams.dimName) { if (!extraParams.dimName) {
Modal.warning({ Modal.warning({
title: getLabel(111, "信息确认"), title: getLabel(131329, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!") content: getLabel(383779, "必要信息不完整,红色*为必填项!")
}); });
return; return;
} }
@ -109,7 +109,7 @@ class DimensionSlide extends Component {
const { setting4RationGroupSpacing } = this.state; const { setting4RationGroupSpacing } = this.state;
const bool = _.every(setting4RationGroupSpacing, it => it.startValue !== "" && it.endValue !== "" && it.startValue <= it.endValue); const bool = _.every(setting4RationGroupSpacing, it => it.startValue !== "" && it.endValue !== "" && it.startValue <= it.endValue);
if (_.isEmpty(setting4RationGroupSpacing) || !bool) { if (_.isEmpty(setting4RationGroupSpacing) || !bool) {
message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!")); message.warning(getLabel(543318, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!"));
return; return;
} else { } else {
payload = { payload = {
@ -127,7 +127,7 @@ class DimensionSlide extends Component {
const { setting4RationGroupIndividual } = this.state; const { setting4RationGroupIndividual } = this.state;
const bool = _.every(setting4RationGroupIndividual, it => it.value !== ""); const bool = _.every(setting4RationGroupIndividual, it => it.value !== "");
if (_.isEmpty(setting4RationGroupIndividual) || !bool) { if (_.isEmpty(setting4RationGroupIndividual) || !bool) {
message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,且数值必填")); message.warning(getLabel(543319, "请完善分组设置相关数据!分组设置不能为空,且数值必填"));
return; return;
} else { } else {
payload = { payload = {
@ -141,11 +141,11 @@ class DimensionSlide extends Component {
dimensionSave(payload).then(({ status, errormsg }) => { dimensionSave(payload).then(({ status, errormsg }) => {
this.setState({ loading: false }); this.setState({ loading: false });
if (status) { if (status) {
message.success(getLabel(111, "保存成功")); message.success(getLabel(22619, "保存成功"));
onCancel(true); onCancel(true);
this.props.form.resetForm(); this.props.form.resetForm();
} else { } else {
message.error(errormsg || getLabel(111, "保存失败")); message.error(errormsg || getLabel(22620, "保存失败"));
} }
}).catch(() => this.setState({ loading: false })); }).catch(() => this.setState({ loading: false }));
}; };
@ -176,15 +176,15 @@ class DimensionSlide extends Component {
className="dimensionSlideWrapper" className="dimensionSlideWrapper"
title={ title={
<div className="dimensionTitle"> <div className="dimensionTitle">
<span>{formId ? getLabel(111, "编辑统计维度") : getLabel(111, "新建统计维度")}</span> <span>{formId ? getLabel(543407, "编辑统计维度") : getLabel(543314, "新建统计维度")}</span>
<Button type="primary" onClick={this.handleSave} loading={loading}>{getLabel(111, "保存")}</Button> <Button type="primary" onClick={this.handleSave} loading={loading}>{getLabel(537558, "保存")}</Button>
</div> </div>
} }
> >
{getSearchs(form, condition, 1, false, this.formItemChange)} {getSearchs(form, condition, 1, false, this.formItemChange)}
{ {
dimType !== "QUALITATIVE" && dimType !== "QUALITATIVE" &&
<WeaSearchGroup title={getLabel(111, "分组设置")} showGroup> <WeaSearchGroup title={getLabel(34105, "分组设置")} showGroup>
{ {
dimType === "RATION_GROUP_SPACING" && dimType === "RATION_GROUP_SPACING" &&
<GroupSpacingEditTable onChange={this.handleConvertGroupDatasource} <GroupSpacingEditTable onChange={this.handleConvertGroupDatasource}

View File

@ -47,15 +47,15 @@ class DimensionTable extends Component {
}; };
dimensionDelete = (payload) => { dimensionDelete = (payload) => {
Modal.confirm({ Modal.confirm({
title: getLabel(111, "信息确认"), title: getLabel(131329, "信息确认"),
content: getLabel(111, "确认要删除吗?"), content: getLabel(388758, "确认要删除吗?"),
onOk: () => { onOk: () => {
dimensionDelete(payload).then(({ status, errormsg }) => { dimensionDelete(payload).then(({ status, errormsg }) => {
if (status) { if (status) {
message.success(getLabel(111, "删除成功")); message.success(getLabel(502230, "删除成功"));
this.dimensionList(); this.dimensionList();
} else { } else {
message.error(errormsg || getLabel(111, "删除失败")); message.error(errormsg || getLabel(20462, "删除失败"));
} }
}); });
} }
@ -67,7 +67,7 @@ class DimensionTable extends Component {
const { onEdit } = this.props; const { onEdit } = this.props;
const pagination = { const pagination = {
...pageInfo, ...pageInfo,
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true, showQuickJumper: true,
showSizeChanger: true, showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"], pageSizeOptions: ["10", "20", "50", "100"],
@ -83,22 +83,22 @@ class DimensionTable extends Component {
} }
}; };
const columns = [ const columns = [
{ dataIndex: "dimName", title: getLabel(111, "统计维度") }, { dataIndex: "dimName", title: getLabel(506800, "统计维度") },
{ dataIndex: "remark", title: getLabel(111, "描述") }, { dataIndex: "remark", title: getLabel(433, "描述") },
{ dataIndex: "dimType", title: getLabel(111, "维度类型") }, { dataIndex: "dimType", title: getLabel(389137, "维度类型") },
{ {
dataIndex: "operate", title: getLabel(111, "操作"), dataIndex: "operate", title: getLabel(30585, "操作"),
render: (_, record) => { render: (_, record) => {
return ( return (
<span className="space10"> <span className="space10">
{ {
record.canEdit && record.canEdit &&
<a href="javascript: void(0);" onClick={() => onEdit(record.id)}>{getLabel(111, "编辑")}</a> <a href="javascript: void(0);" onClick={() => onEdit(record.id)}>{getLabel(501169, "编辑")}</a>
} }
{ {
record.canDelete && record.canDelete &&
<a href="javascript: void(0);" <a href="javascript: void(0);"
onClick={() => this.dimensionDelete([record.id])}>{getLabel(111, "删除")}</a> onClick={() => this.dimensionDelete([record.id])}>{getLabel(535052, "删除")}</a>
} }
</span> </span>
); );

View File

@ -55,7 +55,7 @@ class EmployeeDetails extends Component {
width: 80, width: 80,
render: (_, record) => { render: (_, record) => {
return <a target="_blank" return <a target="_blank"
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(111, "查看")}</a>; href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(33564, "查看")}</a>;
} }
}] }]
}); });
@ -67,7 +67,7 @@ class EmployeeDetails extends Component {
const { dataSource, loading, columns, pageInfo } = this.state; const { dataSource, loading, columns, pageInfo } = this.state;
const pagination = { const pagination = {
...pageInfo, ...pageInfo,
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true, showQuickJumper: true,
showSizeChanger: true, showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"], pageSizeOptions: ["10", "20", "50", "100"],

View File

@ -32,7 +32,7 @@ class GroupIndividualEditTable extends Component {
const { dataSource } = this.state; const { dataSource } = this.state;
const columns = [ const columns = [
{ {
title: getLabel(111, "分组设置值"), title: getLabel(543320, "分组设置值"),
dataIndex: "value", dataIndex: "value",
key: "value", key: "value",
com: [ com: [

View File

@ -39,7 +39,7 @@ class GroupSpacingEditTable extends Component {
const { dataSource } = this.state; const { dataSource } = this.state;
const columns = [ const columns = [
{ {
title: getLabel(111, "起始值"), title: getLabel(541412, "起始值"),
dataIndex: "startValue", dataIndex: "startValue",
key: "startValue", key: "startValue",
com: [ com: [
@ -47,19 +47,19 @@ class GroupSpacingEditTable extends Component {
] ]
}, },
{ {
title: getLabel(111, "含"), title: getLabel(33864, "含"),
dataIndex: "includeStart", dataIndex: "includeStart",
key: "includeStart", key: "includeStart",
com: [ com: [
{ {
type: "CHECKBOX", type: "CHECKBOX",
key: "includeStart", key: "includeStart",
otherParams: { content: getLabel(111, "含") } otherParams: { content: getLabel(33864, "含") }
} }
] ]
}, },
{ {
title: getLabel(111, "至"), title: getLabel(15322, "至"),
dataIndex: "to", dataIndex: "to",
key: "to", key: "to",
com: [ com: [
@ -67,7 +67,7 @@ class GroupSpacingEditTable extends Component {
] ]
}, },
{ {
title: getLabel(111, "结束值"), title: getLabel(508931, "结束值"),
dataIndex: "endValue", dataIndex: "endValue",
key: "endValue", key: "endValue",
com: [ com: [
@ -75,14 +75,14 @@ class GroupSpacingEditTable extends Component {
] ]
}, },
{ {
title: getLabel(111, "含"), title: getLabel(33864, "含"),
dataIndex: "includeEnd", dataIndex: "includeEnd",
key: "includeEnd", key: "includeEnd",
com: [ com: [
{ {
type: "CHECKBOX", type: "CHECKBOX",
key: "includeEnd", key: "includeEnd",
otherParams: { content: getLabel(111, "含") } otherParams: { content: getLabel(33864, "含") }
} }
] ]
} }
@ -90,7 +90,7 @@ class GroupSpacingEditTable extends Component {
return ( return (
<WeaTableEdit <WeaTableEdit
draggable={true} deleteConfirm columns={columns} draggable={true} deleteConfirm columns={columns}
datas={_.map(dataSource, item => ({ ...item, to: getLabel(111, "至") }))} datas={_.map(dataSource, item => ({ ...item, to: getLabel(15322, "至") }))}
showCopy={false} onChange={this.handleChangeTableData} showCopy={false} onChange={this.handleChangeTableData}
/> />
); );

View File

@ -34,16 +34,16 @@ class ReportList extends Component {
}; };
reportStatisticsReportDelete = (payload) => { reportStatisticsReportDelete = (payload) => {
Modal.confirm({ Modal.confirm({
title: getLabel(111, "信息确认"), title: getLabel(131329, "信息确认"),
content: getLabel(111, "确认删除本条数据吗?"), content: getLabel(543231, "确认删除本条数据吗?"),
onOk: () => { onOk: () => {
const { reportName = "" } = this.props; const { reportName = "" } = this.props;
reportStatisticsReportDelete(payload).then(({ status, errormsg }) => { reportStatisticsReportDelete(payload).then(({ status, errormsg }) => {
if (status) { if (status) {
message.success(getLabel(111, "删除成功")); message.success(getLabel(502230, "删除成功"));
this.reportStatisticsReportList({ reportName }); this.reportStatisticsReportList({ reportName });
} else { } else {
message.error(errormsg || getLabel(111, "删除失败")); message.error(errormsg || getLabel(20462, "删除失败"));
} }
}); });
} }
@ -71,7 +71,7 @@ class ReportList extends Component {
return ( return (
<Row gutter={16} className="reportRow"> <Row gutter={16} className="reportRow">
{ {
_.isEmpty(dataSource) ? <div className="empty">{getLabel(111, "暂无数据")}</div> : _.isEmpty(dataSource) ? <div className="empty">{getLabel(83553, "暂无数据")}</div> :
_.map(dataSource, it => { _.map(dataSource, it => {
const { reportName, dimension, id, dimensionId } = it; const { reportName, dimension, id, dimensionId } = it;
return <Col className="gutter-row" span={6} onClick={() => this.handleGoReportView(id)}> return <Col className="gutter-row" span={6} onClick={() => this.handleGoReportView(id)}>
@ -80,15 +80,15 @@ class ReportList extends Component {
<div className="cardCenter"> <div className="cardCenter">
<span className="reportName">{reportName}</span> <span className="reportName">{reportName}</span>
<div className="dimension"> <div className="dimension">
<div className="label">{getLabel(111, "统计维度")}</div> <div className="label">{getLabel(506800, "统计维度")}</div>
<div className="value">{dimension}</div> <div className="value">{dimension}</div>
</div> </div>
</div> </div>
<div className="cardRight"> <div className="cardRight">
<Dropdown overlay={ <Dropdown overlay={
<Menu onClick={e => this.handleOptsClick(e, id, dimensionId)}> <Menu onClick={e => this.handleOptsClick(e, id, dimensionId)}>
<Menu.Item key="edit">{getLabel(111, "编辑")}</Menu.Item> <Menu.Item key="edit">{getLabel(501169, "编辑")}</Menu.Item>
<Menu.Item key="delete">{getLabel(111, "删除")}</Menu.Item> <Menu.Item key="delete">{getLabel(535052, "删除")}</Menu.Item>
</Menu> </Menu>
}> }>
<Button type="ghost"><i className="icon-coms-more"/></Button> <Button type="ghost"><i className="icon-coms-more"/></Button>

View File

@ -31,15 +31,15 @@ class StatisticsModal extends Component {
this.setState({ loading: false }); this.setState({ loading: false });
if (status) { if (status) {
onCancel(true); onCancel(true);
message.success(getLabel(111, "保存成功")); message.success(getLabel(22619, "保存成功"));
form.resetForm(); form.resetForm();
} else { } else {
message.error(errormsg || getLabel(111, "保存失败")); message.error(errormsg || getLabel(22620, "保存失败"));
} }
}).catch(() => this.setState({ loading: false })); }).catch(() => this.setState({ loading: false }));
} else { } else {
Modal.warning({ Modal.warning({
title: getLabel(111, "信息确认"), title: getLabel(131329, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!") content: getLabel(111, "必要信息不完整,红色*为必填项!")
}); });
} }

View File

@ -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 (
<WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Input
value={appKey} autoComplete="new-password" placeholder={getLabel(83869, "请输入")}
onChange={e => this.handleChangeInput("appKey", e.target.value)}
/>
</WeaFormItem>
);
};
const InputPassword = label => {
return (
<WeaFormItem label={label} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Input
value={appSecret} type="password" autoComplete="new-password" placeholder={getLabel(83869, "请输入")}
onChange={e => this.handleChangeInput("appSecret", e.target.value)}
/>
</WeaFormItem>
);
};
return (
<Row className="enable-settings" gutter={16}>
<Col span={16}>
<div className="swith-area">
<div className="left">
<div className="title">{getLabel(111, "智能算薪")}</div>
<div
className="info">{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}</div>
</div>
<div className="right"><WeaCheckbox display="switch" value={enable} onChange={this.handleEnale}/></div>
</div>
<div className="userinfo">
<div className="left">
<WeaSearchGroup
showGroup needTigger={false} col={3}
items={[
{ com: InputAccount(getLabel(83594, "账号")) },
{ com: InputPassword(getLabel(33150, "密码")) }
]}
/>
</div>
<div className="right">
<Button type="primary" onClick={this.apiflowBillingConfigSave}
loading={loading}>{getLabel(725, "提交")}</Button>
</div>
</div>
</Col>
<Col span={8}>
<TipLabel tipList={tipList}/>
</Col>
</Row>
);
}
}
export default EnableSettings;

View File

@ -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;
}
}
}

View File

@ -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 (
<WeaSearchGroup showGroup needTigger={false} className="insufficientAlertWrapper">
<WeaFormItem label={getLabel(501480, "提醒")} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}>
<WeaCheckbox display="switch" value={remind} onChange={remind => this.setState({ remind })}/>
</WeaFormItem>
{
remind === "1" &&
<React.Fragment>
<WeaFormItem
label={getLabel(544288, "提醒规则")}
labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
>
<WeaCheckbox display="switch"/>
</WeaFormItem>
<WeaFormItem
label={getLabel(544287, "提醒推送方式")}
labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
>
<WeaCheckbox display="switch"/>
<WeaHelpfulTip
width={200} style={{ marginLeft: 10 }}
title={getLabel(544286, "使用云桥之前,请先确认企业微信是否绑定云桥。\n" +
"使用邮箱之前,请先确认是否设置邮件提醒账号。\n" +
"使用短信之前,请先确认是否新建签名。")}
placement="topLeft"
/>
</WeaFormItem>
</React.Fragment>
}
</WeaSearchGroup>
);
}
}
export default InsufficientTrafficAlert;

View File

@ -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 = <EnableSettings/>;
break;
case "INSUFFICIENT_TRAFFIC_ALERT":
CurrentDom = <InsufficientTrafficAlert/>;
break;
default:
CurrentDom = null;
break;
}
return CurrentDom;
};
render() {
const { selectedKey } = this.state;
return (
<WeaReqTop
title={getLabel(111, "智能算薪")} selectedKey={selectedKey}
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
tabDatas={tabs} onChange={selectedKey => this.setState({ selectedKey })}
>
<div style={{ height: "100%", background: "#f6f6f6", padding: 16 }}>{this.renderChildren()}</div>
</WeaReqTop>
);
}
}
export default Index;