Merge branch 'feature/V2-系统多语言' into feature/V2-dev合并多语言

# Conflicts:
#	pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js
#	pc4mobx/hrmSalary/pages/calculateDetail/editSalaryDetail.js
#	pc4mobx/hrmSalary/pages/calculateDetail/index.js
#	pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
#	pc4mobx/hrmSalary/pages/calculateDetail/userSure.js
#	pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
#	pc4mobx/hrmSalary/pages/fieldManagement/components/fieldSlide.js
#	pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js
#	pc4mobx/hrmSalary/pages/payrollFiles/index.js
#	pc4mobx/hrmSalary/pages/salaryItem/columns.js
#	pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js
#	pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
#	pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
#	pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regList.js
#	pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regTop.js
#	pc4mobx/hrmSalary/pages/taxAgent/index.js
#	pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
This commit is contained in:
黎永顺 2023-06-02 11:35:39 +08:00
commit c059c013b2
150 changed files with 2819 additions and 2885 deletions

View File

@ -5,12 +5,13 @@
* Date: 2022/11/30
*/
import React, { Component } from "react";
import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect, WeaLocaleProvider } from "ecCom";
import { Button, message, Modal } from "antd";
import { getTaxAgentRangeForm } from "../../apis/taxAgent";
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class PersonalScopeModal extends Component {
constructor(props) {
super(props);
@ -32,33 +33,33 @@ class PersonalScopeModal extends Component {
this.getTaxAgentRangeForm();
} else {
const employeeStatus = [
{ key: "TRIAL", showname: "试用" },
{ key: "FORMAL", showname: "正式" },
{ key: "TEMPORARY", showname: "临时" },
{ key: "DELAY", showname: "试用延期" },
{ key: "FIRE", showname: "解雇" },
{ key: "DEPARTURE", showname: "离职" },
{ key: "RETIRED", showname: "退休" }
{ key: "TRIAL", showname: getLabel(111, "试用") },
{ key: "FORMAL", showname: getLabel(111, "正式") },
{ key: "TEMPORARY", showname: getLabel(111, "临时") },
{ key: "DELAY", showname: getLabel(111, "试用延期") },
{ key: "FIRE", showname: getLabel(111, "解雇") },
{ key: "DEPARTURE", showname: getLabel(111, "离职") },
{ key: "RETIRED", showname: getLabel(111, "退休") }
];
const targetTypeList = [
{
key: "EMPLOYEE",
showname: "人员",
showname: getLabel(111, "人员"),
selected: false
},
{
key: "SUBCOMPANY",
showname: "分部",
showname: getLabel(111, "分部"),
selected: false
},
{
key: "DEPT",
showname: "部门",
showname: getLabel(111, "部门"),
selected: false
},
{
key: "POSITION",
showname: "岗位",
showname: getLabel(111, "岗位"),
selected: false
}
];
@ -82,8 +83,8 @@ class PersonalScopeModal extends Component {
const { includeType, saveKeyVal, onSuccess, onCancel, APISaveFox } = this.props;
if (_.isEmpty(status) || _.isEmpty(targetTypeIds)) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -97,12 +98,12 @@ class PersonalScopeModal extends Component {
APISaveFox["save"](payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
this.handleReset();
onSuccess();
onCancel();
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
}).catch(() => this.setState({ loading: true }));
};
@ -111,16 +112,16 @@ class PersonalScopeModal extends Component {
let browserType = {};
switch (targetType) {
case "EMPLOYEE":
browserType = { ...browserType, type: 17, title: "人员选择" };
browserType = { ...browserType, type: 17, title: getLabel(111, "人员选择") };
break;
case "DEPT":
browserType = { ...browserType, type: 57, title: "部门选择" };
browserType = { ...browserType, type: 57, title: getLabel(111, "部门选择") };
break;
case "SUBCOMPANY":
browserType = { ...browserType, type: 164, title: "分部选择" };
browserType = { ...browserType, type: 164, title: getLabel(111, "分部选择") };
break;
case "POSITION":
browserType = { ...browserType, type: 278, title: "岗位选择" };
browserType = { ...browserType, type: 278, title: getLabel(111, "岗位选择") };
break;
default:
break;
@ -150,8 +151,8 @@ class PersonalScopeModal extends Component {
const { onCancel, title, visible } = this.props;
const { employeeStatus, targetTypeList, targetType, status, statusAll, loading } = this.state;
const buttons = [
<Button type="primary" onClick={this.handleSubmit} loading={loading}>确定</Button>,
<Button type="ghost" onClick={this.handleReset}>重置</Button>
<Button type="primary" onClick={this.handleSubmit} loading={loading}>{getLabel(111, "确定")}</Button>,
<Button type="ghost" onClick={this.handleReset}>{getLabel(111, "重置")}</Button>
];
return (
<WeaDialog
@ -168,7 +169,7 @@ class PersonalScopeModal extends Component {
>
<WeaSearchGroup col={1} needTigger title="" showGroup center>
<WeaFormItem
label="对象类型"
label={getLabel(111, "对象类型")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -184,7 +185,7 @@ class PersonalScopeModal extends Component {
</WeaFormItem>
{
SelectWithAll({
label: "选择员工状态",
label: getLabel(111, "选择员工状态"),
options: employeeStatus,
detailtype: 2,
valueAll: statusAll,

View File

@ -5,10 +5,11 @@
* Date: 2022/11/30
*/
import React, { Component } from "react";
import { WeaTable } from "ecCom";
import { WeaTable, WeaLocaleProvider } from "ecCom";
import { calcPageNo } from "../../util";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class PersonalScopeTable extends Component {
constructor(props) {
super(props);
@ -95,7 +96,7 @@ class PersonalScopeTable extends Component {
const { onChangeSelectKey } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],

View File

@ -1,12 +1,14 @@
import React from "react";
import { WeaLocaleProvider } from "ecCom";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
export default class TipLabel extends React.Component {
render() {
return (
<div className="tipLabelWrapper">
<div className="titleWrapper">
<span className="title">{this.props.title ? this.props.title : "小提示"}</span>
<span className="title">{this.props.title ? this.props.title : getLabel(111, "小提示")}</span>
</div>
<div className="tipContentWrapper">
{this.props.tipList && this.props.tipList.map(item => <div className="tipContentItem">{item}</div>)}

View File

@ -1,6 +1,9 @@
import React, { PureComponent } from "react";
import { WeaLocaleProvider } from "ecCom";
import CustomTable from "../../components/customTable";
const getLabel = WeaLocaleProvider.getLabel;
class CustomPaginationTable extends PureComponent {
shouldComponentUpdate(nextProps, nextState, nextContext) {
return !(nextProps.columnIndex && this.props.columnIndex !== nextProps.columnIndex);
@ -15,7 +18,7 @@ class CustomPaginationTable extends PureComponent {
this.props.onPageChange(value);
},
total: this.props.total,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
current: this.props.current,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],

View File

@ -1,12 +1,14 @@
import React from "react";
import { Button } from "antd";
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export default class HeaderSet extends React.Component {
render() {
return (
<div style={{ display: "inline-block" }}>
<Button type="default" style={{ marginLeft: "10px", marginRight: "10px" }} onClick={this.props.onSetClick}
loading={this.props.loading}>表头设置</Button>
loading={this.props.loading}>{getLabel(111, "表头设置")}</Button>
{/*<WeaCheckbox style={{marginRight: "10px"}}/>*/}
{/*<WeaHelpfulTip*/}
{/* className="headSetTips"*/}

View File

@ -1,5 +1,5 @@
import React from "react";
import { WeaDialog, WeaSteps } from "ecCom";
import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom";
import { Button, message } from "antd";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
@ -9,6 +9,7 @@ import ModalStep1 from "./modalStep1";
import ModalStep2 from "./modalStep2";
import ModalStep3 from "./modalStep3";
const getLabel = WeaLocaleProvider.getLabel;
const Step = WeaSteps.Step;
@inject("taxAgentStore")
@ -45,8 +46,8 @@ export default class ImportModal extends React.Component {
if (this.props.renderFormComponent) {
params && Object.keys(params).forEach((key) => {
if (!params[key] || params[key] == "") {
message.warning("请完善导入选项");
throw new Error("请完善导入选项");
message.warning(getLabel(111, "请完善导入选项"));
throw new Error(getLabel(111, "请完善导入选项"));
}
});
}
@ -64,7 +65,7 @@ export default class ImportModal extends React.Component {
if (this.state.fileId) {
this.props.setStep(1);
} else {
message.warning("请上传文件");
message.warning(getLabel(111, "请上传文件"));
}
}
@ -102,7 +103,7 @@ export default class ImportModal extends React.Component {
const { step, slideDataSource, isInit, isStandingBook, params, needimportSelected } = this.props;
return (
<WeaDialog
title="数据导入" visible={this.props.visiable}
title={getLabel(111, "数据导入")} visible={this.props.visiable}
onCancel={() => {
localStorage.removeItem("fileList");
this.props.onCancel();
@ -113,26 +114,26 @@ export default class ImportModal extends React.Component {
initLoadCss
buttons={
this.props.step === 0 ? [
<Button type="primary" onClick={() => this.handleStep1Next()}>下一步</Button>
<Button type="primary" onClick={() => this.handleStep1Next()}>{getLabel(111, "下一步")}</Button>
] : this.props.step === 1 ? [
<Button type="primary" onClick={() => this.preStep()}>上一步</Button>,
<Button type="primary" onClick={() => this.preStep()}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" onClick={() => {
this.nextStep();
this.hanleImportData();
}}>下一步</Button>
}}>{getLabel(111, "下一步")}</Button>
] : [
<Button type="primary" onClick={() => {
localStorage.removeItem("fileList");
this.props.onFinish();
}}>完成</Button>
}}>{getLabel(111, "完成")}</Button>
]
}
>
<div className="stepWrapper">
<WeaSteps current={step}>
<Step description="上传Excel"/>
<Step description="数据预览"/>
<Step description="导入数据"/>
<Step description={getLabel(111, "数据预览")}/>
<Step description={getLabel(111, "导入数据")}/>
</WeaSteps>
</div>
{

View File

@ -1,9 +1,11 @@
import React from "react";
import { WeaCheckbox,WeaTools } from "ecCom";
import { WeaCheckbox, WeaLocaleProvider, WeaTools } from "ecCom";
import { inject, observer } from "mobx-react";
import { Icon, message, Upload } from "antd";
const Dragger = Upload.Dragger;
const getLabel = WeaLocaleProvider.getLabel;
;
@inject("taxAgentStore")
@observer
@ -14,7 +16,7 @@ export default class ModalStep1 extends React.Component {
datetime: "",
taxAgentId: "",
hasData: "0",
fileList: WeaTools.ls.getJSONObj('fileList') || []
fileList: WeaTools.ls.getJSONObj("fileList") || []
};
}
@ -52,7 +54,7 @@ export default class ModalStep1 extends React.Component {
this.props.onFileIdChange("");
}
this.setState({ fileList },()=>localStorage.setItem("fileList", JSON.stringify(this.state.fileList)));
this.setState({ fileList }, () => localStorage.setItem("fileList", JSON.stringify(this.state.fileList)));
}
render() {
@ -77,7 +79,7 @@ export default class ModalStep1 extends React.Component {
{
this.props.formComponent && <div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
导入选项
{getLabel(111, "导入选项")}
</div>
<div className="formWrapper" style={{ border: "1px solid #eee", borderRadiu: "5px", padding: "10px" }}>
{this.props.formComponent}
@ -87,7 +89,7 @@ export default class ModalStep1 extends React.Component {
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
导入Excel
{getLabel(111, "导入Excel")}
</div>
<div>
<Dragger {...dragger} fileList={this.state.fileList}>
@ -95,8 +97,9 @@ export default class ModalStep1 extends React.Component {
<p className="ant-upload-drag-icon">
<Icon type="inbox"/>
</p>
<p className="ant-upload-text">点击或将文件拖拽到此区域上传</p>
<p className="ant-upload-hint">支持单个或批量上传严禁上传公司内部资料及其他违禁文件</p>
<p className="ant-upload-text">{getLabel(111, "点击或将文件拖拽到此区域上传")}</p>
<p
className="ant-upload-hint">{getLabel(111, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}</p>
</div>
</Dragger>
</div>
@ -105,11 +108,11 @@ export default class ModalStep1 extends React.Component {
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
操作步骤
{getLabel(111, "操作步骤")}
</div>
<div style={{ lineHeight: "30px" }}>
<p>1. 第一步请选择导出的Excel文件或
<p>{`1. ${getLabel(111, "第一步")},${getLabel(111, "请选择导出的Excel文件或")}`}
{
(typeof this.props.templateLink) == "string" ?
<a href="javascript:void(0);" onClick={() => {
@ -118,8 +121,8 @@ export default class ModalStep1 extends React.Component {
try {
params && Object.keys(params).forEach((key) => {
if (!params[key] || params[key] == "") {
message.warning("请完善导入选项,再下载!");
throw new Error("请完善导入选项,再下载!");
message.warning(`${getLabel(111, "请完善导入选项")}, ${getLabel(111, "再下载")}`);
throw new Error(`${getLabel(111, "请完善导入选项")}, ${getLabel(111, "再下载")}`);
} else {
if (url.indexOf("?") > 0) {
url = `${url}&${key}=${params[key]}`;
@ -133,11 +136,11 @@ export default class ModalStep1 extends React.Component {
}
}
window.open(url, "_blank");
}}>点击这里下载模板</a>
}}>{getLabel(111, "点击这里下载模板")}</a>
:
<a onClick={() => {
this.props.templateLink(hasData === "1" ? `true` : `false`);
}}>点击这里下载模板</a>
}}>{getLabel(111, "点击这里下载模板")}</a>
}
{this.props.headerSetCompoent && this.props.headerSetCompoent};
@ -145,31 +148,33 @@ export default class ModalStep1 extends React.Component {
this.props.isInit &&
<WeaCheckbox
value={hasData}
content="导出现有数据"
helpfulTip="提示:建议先导出现有最新数据,修改后再导入"
content={getLabel(111, "导出现有数据")}
helpfulTip={`${getLabel(111, "提示")}:${getLabel(111, "建议先导出现有最新数据")}${getLabel(111, "修改后再导入")}`}
style={{ marginLeft: 10 }}
onChange={(hasData) => this.setState({ hasData })}
/>
}
</p>
<p>2. 第二步请一定要确定Excel文档中的格式是模板中的格式没有被修改掉</p>
<p>3. 第三步选择填写好的Excel文档点击下一步按钮进行数据预览</p>
<p>4. 第四步如果以上步骤和Excel文档正确的话数据会被正确导入导入成功会有提示如果有问题则会提示Excel文档的错误之处</p>
<p>{`2. ${getLabel(111, "第二步")},${getLabel(111, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(111, "没有被修改掉")}`}</p>
<p>{`3. ${getLabel(111, "第三步")},${getLabel(111, "选择填写好的Excel文档")},${getLabel(111, "点击“下一步”按钮进行数据预览")}`}</p>
<p>
{`4. ${getLabel(111, "第四步")},${getLabel(111, "如果以上步骤和Excel文档正确的话")},${getLabel(111, "导入成功会有提示")},${getLabel(111, "数据会被正确导入")}${getLabel(111, "如果有问题")},${getLabel(111, "则会提示Excel文档的错误之处")}`}
</p>
</div>
</div>
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
Excel文件说明
{getLabel(111, "Excel文件说明")}
</div>
<div style={{ lineHeight: "30px" }}>
1. 后缀名为xls或者xlsx<br/>
2. 数据请勿放在合并的单元格中<br/>
{`1. ${getLabel(111, "后缀名为xls或者xlsx")};`}<br/>
{`2. ${getLabel(111, "数据请勿放在合并的单元格中")};`}<br/>
{
this.props.isStandingBook &&
<span>3. 账单月份格式必须为YYYY-MM</span>
<span>{`3. ${getLabel(111, "账单月份格式必须为")}:YYYY-MM`}</span>
}
</div>

View File

@ -1,13 +1,14 @@
import React from "react";
import successImg from "./success.svg";
import { Spin } from "antd";
import { WeaTable } from "ecCom";
import { WeaLocaleProvider, WeaTable } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export default class ModalStep3 extends React.Component {
componentWillMount() {
this.columns = [
{
title: "错误信息",
title: getLabel(111, "错误信息"),
dataIndex: "message",
key: "message"
}
@ -30,21 +31,21 @@ export default class ModalStep3 extends React.Component {
{importResult.successCount === undefined
? <div style={{ textAlign: "center", marginTop: "20px" }}>
<Spin/>
正在导入请稍后...
{`${getLabel(111, "正在导入请稍后")}...`}
</div>
: <div style={{ marginTop: "20px" }}>
<img src={successImg} style={{ marginBottom: "10px" }} alt=""/>
<div style={{ fontSize: "20px", marginBottom: "10px" }}>
数据导入完成
{getLabel(111, "数据导入完成")}
</div>
<div>
已导入
{getLabel(111, "已导入")}
<span style={{ color: "green" }}>
{importResult.successCount}{" "}
</span>
条数据失败<span style={{ color: "red" }}>
{`${getLabel(111, "条数据")},${getLabel(111, "失败")}`}<span style={{ color: "red" }}>
{importResult.errorCount}{" "}
</span>
</span>{getLabel(111, "")}
</div>
</div>}
<div>

View File

@ -1,10 +1,11 @@
import React from "react";
import { Modal } from "antd";
import { WeaProgress } from "ecCom";
import { WeaProgress, WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export default class ProgressModal extends React.Component {
render() {
const { title = "正在核算请稍后" } = this.props;
const { title = getLabel(111, "正在核算请稍后") } = this.props;
return (
<div>
<Modal

View File

@ -5,11 +5,11 @@
* LastEditTime: 2022-06-29 10:06:13
*/
import React from "react";
import { WeaCheckbox, WeaDialog, WeaInputSearch } from "ecCom";
import { WeaCheckbox, WeaDialog, WeaInputSearch, WeaLocaleProvider } from "ecCom";
import { Button } from "antd";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
export default class SelectItemModal extends React.Component {
constructor(props) {
super(props);
@ -31,18 +31,18 @@ export default class SelectItemModal extends React.Component {
title, onSearchItemSet, onShowOnlyChecked, children,
onMoreOpts, onSave, ...extra
} = this.props;
const btns = [<Button type="primary" onClick={onSave}>保存</Button>];
const btns = [<Button type="primary" onClick={onSave}>{getLabel(111, "保存")}</Button>];
const moreBtn = {
datas: [
{
key: "recovery",
content: "恢复默认设置",
content: getLabel(111, "恢复默认设置"),
icon: <i className="icon-coms-Flow-setting"/>,
onClick: key => onMoreOpts(key)
},
{
key: "setting",
content: "设为默认设置",
content: getLabel(111, "设为默认设置"),
icon: <i className="icon-coms-Flow-setting"/>,
onClick: key => onMoreOpts(key)
}
@ -51,11 +51,11 @@ export default class SelectItemModal extends React.Component {
const titleComp = <div className="setHeaderWrapper">
<span>{title}</span>
<WeaInputSearch value={searchValue} onChange={searchValue => this.setState({ searchValue })}
placeholder="请输入关键字" style={{ width: 200 }}
placeholder={getLabel(111, "请输入关键字")} style={{ width: 200 }}
onSearch={onSearchItemSet}
/>
</div>;
const bottomLeft = <WeaCheckbox content="只显示已选中字段" onChange={onShowOnlyChecked}/>;
const bottomLeft = <WeaCheckbox content={getLabel(111, "只显示已选中字段")} onChange={onShowOnlyChecked}/>;
return (
<WeaDialog {...extra} hasScroll title={titleComp}
style={{ width: 592, height: 248 }}

View File

@ -5,7 +5,9 @@
* Date: 2023/3/6
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaSearchGroup } from "ecCom";
import { WeaCheckbox, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class SelectItemsWrapper extends Component {
constructor(props) {
@ -19,7 +21,7 @@ class SelectItemsWrapper extends Component {
}
componentDidMount() {
const { dataSource } = this.props
const { dataSource } = this.props;
this.setState({
selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => {
return [...pre, ...cur.items];
@ -59,7 +61,7 @@ class SelectItemsWrapper extends Component {
const value = _.every(items, it => !!it.checked) ? "1" : "0";
return <div className="setGroupWrapper">
<WeaCheckbox content={groupName} value={value} onChange={(val) => onSelectGroupAll(groupId, val)}/>
<span className="checkedtitle">已选择{number}个字段</span>
<span className="checkedtitle">{`${getLabel(111, "已选择")}${number}${getLabel(111, "个字段")}`}</span>
</div>;
};
@ -94,7 +96,7 @@ class SelectItemsWrapper extends Component {
<div className="itemsWrapper">
{
_.isEmpty(items) ?
<span className="empty">暂无数据</span> :
<span className="empty">{getLabel(111, "暂无数据")}</span> :
<ul className="itemContUl">
{
_.map(items, child => {

View File

@ -1,8 +1,9 @@
import React from "react";
import { Button } from "antd";
import { WeaReqTop } from "ecCom";
import { WeaReqTop, WeaLocaleProvider } from "ecCom";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
export default class SlideModalTitle extends React.Component {
componentWillMount() { // 初始化渲染页面
this.state = {
@ -25,7 +26,7 @@ export default class SlideModalTitle extends React.Component {
icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D"
buttons={(this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1) ? [
<Button type="primary" className="saveBtn" onClick={this.props.onSave} loading={loading}>保存</Button>
<Button type="primary" className="saveBtn" onClick={this.props.onSave} loading={loading}>{getLabel(111, "保存")}</Button>
] : !_.isEmpty(customOperate) ? customOperate : []}
showDropIcon={false}
dropMenuDatas={[]}

View File

@ -40,12 +40,12 @@ import stores from "./stores";
import "./style/index";
// 读取系统多语言配置
let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, "hrmSalary");
let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, "HRM");
// 不需要读取系统多语言
getLocaleLabel = function (nextState, replace, callback) {
callback();
};
// getLocaleLabel = function (nextState, replace, callback) {
// callback();
// };
const Home = (props) => props.children;

View File

@ -5,11 +5,12 @@
* Date: 2022-09-27 18:17:02
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaTop } from "ecCom";
import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaTop } from "ecCom";
import * as API from "../../apis/ruleconfig";
import { Button, message } from "antd";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const Input = (props) => {
const { label, value } = props;
return (
@ -55,10 +56,10 @@ class AppConfig extends Component {
API.appSettingSave({ openAcctResultSum, displayEmpInfoReport }).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("设置成功!");
message.success(getLabel(111, "设置成功"));
this.queryAppsetting();
} else {
message.error(errormsg || "设置失败!");
message.error(errormsg || getLabel(111, "设置失败"));
}
});
};
@ -69,13 +70,13 @@ class AppConfig extends Component {
const items = [
{
com: Input({
label: "版本号",
label: getLabel(111, "版本号"),
value: version
})
},
{
com: CheckBox({
label: "显示薪资核算结果合计列",
label: getLabel(111, "显示薪资核算结果合计列"),
value: openAcctResultSum,
onChange: (openAcctResultSum) => {
this.setState({ openAcctResultSum });
@ -84,7 +85,7 @@ class AppConfig extends Component {
},
{
com: CheckBox({
label: "是否显示脱敏表人员信息",
label: getLabel(111, "是否显示脱敏表人员信息"),
value: displayEmpInfoReport,
onChange: (displayEmpInfoReport) => {
this.setState({ displayEmpInfoReport });
@ -93,14 +94,14 @@ class AppConfig extends Component {
},
{
com: CheckBox({
label: "是否输出日志",
label: getLabel(111, "是否输出日志"),
disabled: true,
value: isLog
})
},
{
com: CheckBox({
label: "是否可编辑系统公式",
label: getLabel(111, "是否可编辑系统公式"),
disabled: true,
value: openFormulaForcedEditing
})
@ -109,7 +110,7 @@ class AppConfig extends Component {
return (
<div className="appConfigWrapper">
<WeaTop
title={<span>应用设置</span>}
title={<span>{getLabel(111, "应用设置")}</span>}
icon={<i className="icon-coms-Flow-setting"/>}
iconBgcolor="#F14A2D"
buttons={btns}

View File

@ -1,11 +1,11 @@
import React from "react";
import { Button, Col, Row } from "antd";
import { inject, observer } from "mobx-react";
import { WeaDatePicker, WeaDialog, WeaError, WeaInput, WeaSelect } from "ecCom";
import { WeaDatePicker, WeaDialog, WeaError, WeaInput, WeaSelect, WeaLocaleProvider } from "ecCom";
import { notNull } from "../../util/validate";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore")
@observer
export default class baseFormModal extends React.Component {
@ -84,7 +84,7 @@ export default class baseFormModal extends React.Component {
const { description, loading } = this.state;
return (
<WeaDialog
title="核算"
title={getLabel(111, "核算")}
initLoadCss
className="dataList-wrapper"
visible={this.props.visible}
@ -99,17 +99,17 @@ export default class baseFormModal extends React.Component {
onClick={() => {
this.handleSave();
}}
>保存</Button>
>{getLabel(111, "保存")}</Button>
]}
>
<Row className="formItem">
<Col span={8}>薪酬所属月</Col>
<Col span={8}>{getLabel(111, "薪酬所属月")}</Col>
<Col span={16}>
<WeaError
style={{ width: "100%" }}
tipPosition="bottom"
ref="weaError"
error="请选择薪酬所属月">
error={getLabel(111, "请选择薪酬所属月")}>
<WeaDatePicker
style={{ width: "100%" }}
format="yyyy-MM"
@ -127,7 +127,7 @@ export default class baseFormModal extends React.Component {
</Row>
<Row className="formItem">
<Col span={8}>核算账套</Col>
<Col span={8}>{getLabel(111, "核算账套")}</Col>
<Col span={16}>
{
this.state.inited &&
@ -135,7 +135,7 @@ export default class baseFormModal extends React.Component {
style={{ width: "100%" }}
tipPosition="bottom"
ref="weaError1"
error="请选择账套">
error={getLabel(111, "请选择账套")}>
<WeaSelect
viewAttr={3}
options={this.state.selectOptions}
@ -150,7 +150,7 @@ export default class baseFormModal extends React.Component {
</Row>
<Row className="formItem">
<Col span={8}>备注</Col>
<Col span={8}>{getLabel(111, "备注")}</Col>
<Col span={16}>
<WeaInput value={description} onChange={(value) => this.setState({ description: value })}/>
</Col>

View File

@ -1,8 +1,8 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { Button, DatePicker, Dropdown, Menu, message, Modal, Tag } from "antd";
import { WeaInputSearch, WeaNewScroll, WeaTop } from "ecCom";
import { renderNoright } from "../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import { WeaInputSearch, WeaNewScroll, WeaTop, WeaLocaleProvider } from "ecCom";
import { renderNoright } from "../../util";
import CustomTab from "../../components/customTab";
import moment from "moment";
import BaseFormModal from "./baseFormModal";
@ -12,6 +12,7 @@ import "./index.less";
const MonthPicker = DatePicker.MonthPicker;
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "taxAgentStore")
@observer
export default class Calculate extends React.Component {
@ -78,8 +79,8 @@ export default class Calculate extends React.Component {
// 列表项删除回调
handleDeleteItem(record) {
Modal.confirm({
title: "信息确认",
content: "确认删除本条数据吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除本条数据吗?"),
onOk: () => {
const { calculateStore: { deleteSalaryacct } } = this.props;
deleteSalaryacct([record.id]).then(() => {
@ -108,7 +109,7 @@ export default class Calculate extends React.Component {
progressVisible: false,
progress: 0
}, () => {
message.success("归档成功");
message.success(getLabel(111, "归档成功"));
this.handleSearch(this.state.searchValue);
});
}
@ -120,7 +121,7 @@ export default class Calculate extends React.Component {
progressVisible: false,
progress: 0
}, () => {
message.success("归档成功");
message.success(getLabel(111, "归档成功"));
this.handleSearch(this.state.searchValue);
});
}).catch(() => {
@ -143,8 +144,8 @@ export default class Calculate extends React.Component {
// 回算
handleBackCalculate = (record) => {
Modal.confirm({
title: "信息确认",
content: "确定回算吗?\n 回算后,正常核算的数据会被覆盖,正常核算的工资单不能继续发放或撤回!",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确定回算吗?\n 回算后,正常核算的数据会被覆盖,正常核算的工资单不能继续发放或撤回!"),
onOk: () => {
const { calculateStore: { backCalculate } } = this.props;
backCalculate(record.id).then(() => {
@ -178,22 +179,22 @@ export default class Calculate extends React.Component {
<div className="salarySobNameTagWrapper">
{
record.backCalcStatus === 1 &&
<i className="icon-coms-Refresh" title="回算"/>
<i className="icon-coms-Refresh" title={getLabel(111, "回算")}/>
}
<Tag color="blue">{`${record.acctTimes}`}</Tag>
<Tag color="blue">{`${getLabel(111, "第")}${record.acctTimes}${getLabel(111, "次")}`}</Tag>
</div>
</div>;
};
}
if (item.title == "操作" && showOperateBtn) {
if (item.title == getLabel(111, "操作") && showOperateBtn) {
item.render = (text, record) => {
const accountBtn = _.filter(
record.operate,
it => it.text == "核算" || it.text == "重新核算"
it => it.text == getLabel(111, "核算") || it.text == getLabel(111, "重新核算")
);
const notAccountBtn = _.filter(
record.operate,
it => it.text != "核算" && it.text != "重新核算"
it => it.text != getLabel(111, "核算") && it.text != getLabel(111, "重新核算")
);
let operateBtn = [];
if (!_.isEmpty(accountBtn)) {
@ -207,8 +208,8 @@ export default class Calculate extends React.Component {
<a
href="javascript:void(0);"
onClick={() => {
if (it.text == "核算" || it.text == "重新核算") {
it.text == "核算"
if (it.text == getLabel(111, "核算") || it.text == getLabel(111, "重新核算")) {
it.text == getLabel(111, "核算")
? this.handleAccount(record)
: this.handleReaccount(record);
}
@ -229,17 +230,17 @@ export default class Calculate extends React.Component {
<Menu.Item>
<a
onClick={() => {
if (cz.text == "核算") {
if (cz.text == getLabel(111, "核算")) {
this.handleAccount(record);
} else if (cz.text == "删除") {
} else if (cz.text == getLabel(111, "删除")) {
this.handleDeleteItem(record);
} else if (cz.text == "归档") {
} else if (cz.text == getLabel(111, "归档")) {
this.handleFile(record);
} else if (cz.text == "重新核算") {
} else if (cz.text == getLabel(111, "重新核算")) {
this.handleReaccount(record);
} else if (cz.text == "查看") {
} else if (cz.text == getLabel(111, "查看")) {
this.handleDetail(record);
} else if (cz.text == "回算") {
} else if (cz.text == getLabel(111, "回算")) {
this.handleBackCalculate(record);
}
}}>
@ -260,7 +261,7 @@ export default class Calculate extends React.Component {
};
}
});
return showOperateBtn ? columns : _.filter(columns, it => it.title != "操作");
return showOperateBtn ? columns : _.filter(columns, it => it.title != getLabel(111, "操作"));
};
// 分页
@ -315,13 +316,13 @@ export default class Calculate extends React.Component {
{
key: "BTN_COLUMN",
icon: <i className="icon-coms-Custom"/>,
content: "显示列定制",
content: getLabel(111, "显示列定制"),
onClick: this.showColumn
}
];
const collectParams = {
// 收藏功能配置
favname: "薪资核算",
favname: getLabel(111, "薪资核算"),
favouritetype: 1,
objid: 0,
link: "wui/index.html#/ns_demo03/index",
@ -330,13 +331,13 @@ export default class Calculate extends React.Component {
const adBtn = [
// 高级搜索内部按钮
<Button type="primary" onClick={doSearch}>
搜索
{getLabel(111, "搜索")}
</Button>,
<Button type="ghost" onClick={() => form.resetForm()}>
重置
{getLabel(111, "重置")}
</Button>,
<Button type="ghost" onClick={() => setShowSearchAd(false)}>
取消
{getLabel(111, "取消")}
</Button>
];
@ -352,7 +353,7 @@ export default class Calculate extends React.Component {
onClick={() => {
this.setState({ baseFormVisible: true });
}}>
核算
{getLabel(111, "核算")}
</Button>}
<div
style={{ display: "inline-block", position: "relative", top: 2 }}>
@ -364,7 +365,7 @@ export default class Calculate extends React.Component {
}}
onChange={(val) => this.handleRangePickerChange("startDate", val)}
/>
<span className="to" style={{ margin: "0 10px" }}></span>
<span className="to" style={{ margin: "0 10px" }}>{getLabel(111, "")}</span>
<MonthPicker
value={endDate}
format="YYYY-MM"
@ -377,7 +378,7 @@ export default class Calculate extends React.Component {
<WeaInputSearch
style={{ marginLeft: "10px" }}
value={this.state.searchValue}
placeholder={"请输入薪资账套名称"}
placeholder={getLabel(111, "请输入薪资账套名称")}
onChange={value => {
this.setState({ searchValue: value });
}}
@ -393,7 +394,7 @@ export default class Calculate extends React.Component {
<div className="mySalaryBenefitsWrapper">
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
<WeaTop
title="薪资核算" // 文字
title={getLabel(111, "薪资核算")} // 文字
icon={<i className="icon-coms-fa"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={false} // 是否显示下拉按钮
@ -425,7 +426,7 @@ export default class Calculate extends React.Component {
{
this.state.progressVisible &&
<ProgressModal
title="正在归档请稍后"
title={getLabel(111, "正在归档请稍后")}
visible={this.state.progressVisible}
onCancel={() => {
this.setState({ progressVisible: false, progress: 0 });

View File

@ -1,12 +1,14 @@
import React from "react";
import ImportModal from "../../../../components/importModal";
import { Badge, Button, message } from "antd";
import { WeaLocaleProvider } from "ecCom";
import { inject, observer } from "mobx-react";
import SelectFieldModal from "./selectFieldModal";
import { getQueryString } from "../../../../util/url";
import AddHeaderFieldsModal from "./addHeaderFieldsModal";
import { cacheImportField } from "../../../../apis/calculate";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "standingBookStore")
@observer
export default class AcctResultImportModal extends React.Component {
@ -67,7 +69,7 @@ export default class AcctResultImportModal extends React.Component {
const { isStandingBook, standingBookTabKey, standingBookType } = this.props;
let url = "";
if (_.isEmpty(this.state.modalParam.salaryItemIds)) {
message.warning("请选择表单字段");
message.warning(getLabel(111, "请选择表单字段"));
return;
}
if (!isStandingBook) {
@ -114,7 +116,7 @@ export default class AcctResultImportModal extends React.Component {
renderFormComponent = () => {
return <Badge
count={!_.isEmpty(this.state.modalParam.salaryItemIds) ? this.state.modalParam.salaryItemIds.split(",").length : 0}>
<Button onClick={this.handleSelectedField}>请选择表单字段</Button>
<Button onClick={this.handleSelectedField}>{getLabel(111, "请选择表单字段")}</Button>
</Badge>;
};

View File

@ -1,9 +1,10 @@
import React from "react";
import { Button, Col, Row } from "antd";
import { inject, observer } from "mobx-react";
import { WeaCheckbox, WeaDialog } from "ecCom";
import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom";
import { cacheImportField } from "../../../../apis/calculate";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "standingBookStore")
@observer
export default class SelectFieldModal extends React.Component {
@ -173,14 +174,14 @@ export default class SelectFieldModal extends React.Component {
const { isStandingBook } = this.props;
return (
<WeaDialog
title="添加表头字段"
title={getLabel(111, "添加表头字段")}
visible={this.props.visible}
style={{ width: 800 }}
onCancel={() => {
this.props.onCancel();
}}
buttons={[
<Button type="primary" onClick={this.handleAddClick}>添加</Button>
<Button type="primary" onClick={this.handleAddClick}>{getLabel(111, "添加")}</Button>
]}
>
<div style={{ minHeight: "20vh", maxHeight: "50vh", overflow: "hidden auto", padding: "16px 20px" }}>
@ -188,7 +189,7 @@ export default class SelectFieldModal extends React.Component {
!_.isEmpty(fieldData.formulaItems) &&
<div>
<div style={{ height: "40px", lineHeight: "40px" }}>
<WeaCheckbox content={!isStandingBook ? "公式项" : "全选"} onChange={(value) => {
<WeaCheckbox content={!isStandingBook ? getLabel(111, "公式项") : getLabel(111, "全选")} onChange={(value) => {
this.handleTitleCheckboxChange(value, "formula");
}}/>
</div>
@ -218,7 +219,7 @@ export default class SelectFieldModal extends React.Component {
!_.isEmpty(fieldData.inputItems) &&
<div style={{ marginTop: "20px" }}>
<div style={{ height: "50px", lineHeight: "50px" }}>
<WeaCheckbox content="输入项" onChange={(value) => {
<WeaCheckbox content={getLabel(111, "输入项")} onChange={(value) => {
this.handleTitleCheckboxChange(value, "input");
}}/>
</div>
@ -248,7 +249,7 @@ export default class SelectFieldModal extends React.Component {
!_.isEmpty(fieldData.sqlItems) &&
<div style={{ marginTop: "20px" }}>
<div style={{ height: "50px", lineHeight: "50px" }}>
<WeaCheckbox content="SQL项" onChange={(value) => {
<WeaCheckbox content={`SQL${getLabel(111, "项")}`} onChange={(value) => {
this.handleTitleCheckboxChange(value, "sql");
}}/>
</div>
@ -275,7 +276,7 @@ export default class SelectFieldModal extends React.Component {
}
<div style={{ marginTop: "20px" }}>
<WeaCheckbox content="只显示已选中" onChange={(value) => {
<WeaCheckbox content={getLabel(111, "只显示已选中")} onChange={(value) => {
this.showSelectedChange(value);
}}/>
</div>

View File

@ -1,331 +1,68 @@
export const userSureColumns = [
{
title: "姓名",
dataIndex: 'title',
key: 'title',
},
{
title: "人员类型",
dataIndex: 'title',
key: 'title',
},
{
title: "个税扣缴义务人",
dataIndex: 'title',
key: 'title',
},
{
title: "部门",
dataIndex: 'title',
key: 'title',
},
{
title: "手机号",
dataIndex: 'title',
key: 'title',
},
{
title: "工号",
dataIndex: 'title',
key: 'title',
},
{
title: "员工状态",
dataIndex: 'title',
key: 'title',
},
{
title: "入职日期",
dataIndex: 'title',
key: 'title',
},
{
title: "离职日期",
dataIndex: 'title',
key: 'title',
},
{
title: "操作",
dataIndex: 'cz',
key: 'cz',
}
]
export const monthOnMonthColumns = [
{
title: "姓名",
dataIndex: 'title',
key: 'title',
},
{
title: "减少类型",
dataIndex: 'title',
key: 'title',
},
{
title: "个税扣缴义务人",
dataIndex: 'title',
key: 'title',
},
{
title: "部门",
dataIndex: 'title',
key: 'title',
},
{
title: "手机号",
dataIndex: 'title',
key: 'title',
},
{
title: "工号",
dataIndex: 'title',
key: 'title',
},
{
title: "员工状态",
dataIndex: 'title',
key: 'title',
},
{
title: "入职日期",
dataIndex: 'title',
key: 'title',
},
{
title: "离职日期",
dataIndex: 'title',
key: 'title',
},
{
title: "操作",
dataIndex: 'cz',
key: 'cz'
},
]
export const salaryDetailColumns = [
{
title: "姓名",
dataIndex: 'title',
key: 'title',
},
{
title: "个税扣缴义务人",
dataIndex: 'title',
key: 'title'
},
{
title: "人员类型",
dataIndex: 'title',
key: 'title'
},
{
title: "部门",
dataIndex: 'title',
key: 'title'
},
{
title: "手机号",
dataIndex: 'title',
key: 'title'
},
{
title: "工号",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目1",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目2",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目3",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目4",
dataIndex: 'title',
key: 'title'
},
{
title: "操作",
dataIndex: 'cz',
key: 'cz'
}
]
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const warningModalColumns = [
{
title: "异常所属规则名称",
dataIndex: 'title',
key: 'title'
},
{
title: "异常人数",
title: getLabel(111, "异常所属规则名称"),
dataIndex: 'title',
key: 'title'
},
{
title: "校验规则",
title: getLabel(111, "异常人数"),
dataIndex: 'title',
key: 'title'
},
{
title: "操作",
title: getLabel(111, "校验规则"),
dataIndex: 'title',
key: 'title'
},
{
title: getLabel(111, "操作"),
dataIndex: 'cz',
key: 'cz'
}
]
export const placeOnFileColumns = [
{
title: "姓名",
dataIndex: 'username',
key: 'username'
},
{
title: "个税扣缴义务人",
dataIndex: 'title',
key: 'title'
},
{
title: "人员类型",
dataIndex: 'title',
key: 'title'
},
{
title: "部门",
dataIndex: 'title',
key: 'title'
},
{
title: "手机号",
dataIndex: 'title',
key: 'title'
},
{
title: "工号",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目1",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目2",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目3",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目4",
dataIndex: 'title',
key: 'title'
}
]
export const mergeDetailColumns = [
{
title: "核算次序",
title: getLabel(111, "核算次序"),
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目1",
title: getLabel(111, "薪资项目1"),
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目2",
title: getLabel(111, "薪资项目2"),
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目3",
title: getLabel(111, "薪资项目3"),
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目4",
title: getLabel(111, "薪资项目4"),
dataIndex: 'title',
key: 'title'
},
]
export const compareColumn = [
{
title: "异常人员",
dataIndex: 'title',
key: 'title'
},
{
title: "个税扣缴义务人",
dataIndex: 'title',
key: 'title'
},
{
title: "人员类型",
dataIndex: 'title',
key: 'title'
},
{
title: "部门",
dataIndex: 'title',
key: 'title'
},
{
title: "手机号",
dataIndex: 'title',
key: 'title'
},
{
title: "工号",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目1",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目2",
dataIndex: 'title',
key: 'title'
},
{
title: "薪资项目3",
dataIndex: 'title',
key: 'title'
}
]
export const dataSource = [
{
title: "测试",
username: "测试"
}
title: getLabel(111, "测试"),
username: getLabel(111, "测试")
}
];

View File

@ -1,12 +1,13 @@
import React from "react";
import { Button } from "antd";
import { WeaCheckbox, WeaInputSearch } from "ecCom";
import { WeaCheckbox, WeaInputSearch, WeaLocaleProvider } from "ecCom";
import { getQueryString } from "../../util/url";
import CustomTab from "../../components/customTab";
import { inject, observer } from "mobx-react";
import CompareDetailImportModal from "./compareDetailImportModal";
import CustomPaginationTable from "../../components/customPaginationTable";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore")
@observer
export default class CompareDetail extends React.Component {
@ -45,12 +46,12 @@ export default class CompareDetail extends React.Component {
const { acctResultValue, excelResultValue } = record[item.dataIndex];
return (
<div>
<div>系统值{acctResultValue}</div>
<div>线下值{excelResultValue}</div>
<div>{getLabel(111, "系统值")}{acctResultValue}</div>
<div>{getLabel(111, "线下值")}{excelResultValue}</div>
{
showDifference &&
<div style={{ color: "red" }}>
差值{calculateCompares(acctResultValue, excelResultValue)}
{getLabel(111, "差值")}{calculateCompares(acctResultValue, excelResultValue)}
</div>
}
</div>
@ -173,9 +174,9 @@ export default class CompareDetail extends React.Component {
const renderRightOperation = () => {
return (
<div style={{ display: "inline-block" }}>
<Button type="primary" style={{ marginRight: "10px" }} onClick={() => this.handleImportClick()}>导入</Button>
<Button type="default" style={{ marginRight: "10px" }} onClick={() => this.handleExportClick()}>导出</Button>
<WeaInputSearch value={searchValue} placeholder="请输入姓名" onChange={(value) => {
<Button type="primary" style={{ marginRight: "10px" }} onClick={() => this.handleImportClick()}>{getLabel(111, "导入")}</Button>
<Button type="default" style={{ marginRight: "10px" }} onClick={() => this.handleExportClick()}>{getLabel(111, "导出")}</Button>
<WeaInputSearch value={searchValue} placeholder={getLabel(111, "请输入姓名")} onChange={(value) => {
this.setState({
searchValue: value
});
@ -189,12 +190,12 @@ export default class CompareDetail extends React.Component {
const renderLeftOperation = () => {
return (
<div>
<WeaCheckbox content="只显示有差异的人员" value={this.state.onlyDiffEmployee ? 1 : 0}
<WeaCheckbox content={getLabel(111, "只显示有差异的人员")} value={this.state.onlyDiffEmployee ? 1 : 0}
onChange={(value) => {
this.onlyDiffEmployeeChange(value);
}}
/>
<WeaCheckbox content="只显示有差异的薪资项目" value={this.state.onlyDiffSalaryItem ? 1 : 0}
<WeaCheckbox content={getLabel(111, "只显示有差异的薪资项目")} value={this.state.onlyDiffSalaryItem ? 1 : 0}
onChange={(value) => {
this.onlyDiffSalaryItemChange(value);
}}
@ -214,8 +215,8 @@ export default class CompareDetail extends React.Component {
/>
<div className="titleBarWrapper">
<div className="titleBar">
<span className="leftTitle">公式=</span>
<span className="rightTitle">系统值线下值<span style={{ color: "red" }}>差值</span></span>
<span className="leftTitle">{getLabel(111, "公式")}=</span>
<span className="rightTitle">{getLabel(111, "系统值")}{getLabel(111, "线下值")}<span style={{ color: "red" }}>{getLabel(111, "差值")}</span></span>
</div>
</div>

View File

@ -1,11 +1,12 @@
import React from "react";
import { WeaHelpfulTip, WeaTab } from "ecCom";
import { WeaHelpfulTip, WeaTab, WeaLocaleProvider } from "ecCom";
import IssuedAndReissueTable from "./issuedAndReissueTable";
import PayrollItemsTable from "./payrollItemsTable";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore")
@observer
export default class EditSalaryDetail extends React.Component {
@ -79,11 +80,11 @@ export default class EditSalaryDetail extends React.Component {
const { itemsByGroup = [] } = toJS(acctresultDetailForm);
const topTab = [
{
title: "正常工资薪金所得",
title: getLabel(111, "正常工资薪金所得"),
viewcondition: "0"
},
{
title: "已发补发",
title: getLabel(111, "已发补发"),
viewcondition: "1"
}
];
@ -91,8 +92,8 @@ export default class EditSalaryDetail extends React.Component {
<div className="editSalaryDetail">
<div className="detailItemWrapper">
<div>
<span className="itemTitle">基本信息</span>
<WeaHelpfulTip style={{ marginLeft: "10px" }} title="提示:基本信息根据账套设置显示" placement="topLeft"/>
<span className="itemTitle">{getLabel(111, "基本信息")}</span>
<WeaHelpfulTip style={{ marginLeft: "10px" }} title={getLabel(111, "根据账套设置显示")} placement="topLeft"/>
</div>
<div className="itemContent">
{

View File

@ -1,28 +1,29 @@
import React from 'react';
import { mergeDetailColumns, dataSource} from './columns'
import { Row, Col, Table } from 'antd'
import { WeaHelpfulTip } from "ecCom"
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom"
const getLabel = WeaLocaleProvider.getLabel;
export default class FileMergeDetail extends React.Component {
render() {
return (
<div className="fileMergeDetail">
<div className="detialItemWrapper">
<div className="titleWrapper">
<span className="itemTitle">基本信息</span>
<span className="itemTitle">{getLabel(111, "基本信息")}</span>
<div className="rightItemWrapper">
<span>薪资所属月2021-11</span>
<span>{getLabel(111, "薪资所属月")}2021-11</span>
<WeaHelpfulTip
style={{marginLeft: "10px"}}
width={200}
title="薪资周期\n
2021-11-01至2021-11-30\n
税款所属期\n
2021-12\n
考勤取值周期\n
2021-11-01至2021-11-30\n
福利台账月份\n
引用2021-11的福利台账数据"
title={`${getLabel(111, "薪资周期")}\\n
2021-11-01${getLabel(111, "")}2021-11-30\\n
${getLabel(111, "税款所属期")}\\n
2021-12\\n
${getLabel(111, "考勤取值周期")}\\n
2021-11-01至2021-11-30\\n
${getLabel(111, "福利台账月份")}\\n
${getLabel(111, "引用")}2021-11${getLabel(111, "的福利台账数据")}`}
placement="topLeft"
/>
</div>
@ -32,66 +33,66 @@ export default class FileMergeDetail extends React.Component {
<Row classsName="itemRow">
<Col span={8}>
<Row>
<Col span={12}>姓名</Col>
<Col span={12}>张三</Col>
</Row>
</Col>
<Col span={8}>
<Row>
<Col span={12}>部门</Col>
<Col span={12}>研发</Col>
</Row>
<Col span={12}>{getLabel(111, "姓名")}</Col>
<Col span={12}>{getLabel(111, "张三")}</Col>
</Row>
</Col>
<Col span={8}>
<Row>
<Col span={12}>岗位</Col>
<Col span={12}>开发</Col>
</Row>
<Col span={12}>{getLabel(111, "部门")}</Col>
<Col span={12}>{getLabel(111, "研发")}</Col>
</Row>
</Col>
<Col span={8}>
<Row>
<Col span={12}>{getLabel(111, "岗位")}</Col>
<Col span={12}>{getLabel(111, "开发")}</Col>
</Row>
</Col>
</Row>
<Row className="itemRow">
<Col span={8}>
<Row>
<Col span={12}>入职日期</Col>
<Col span={12}>{getLabel(111, "入职日期")}</Col>
<Col span={12}>2020-10-20</Col>
</Row>
</Col>
<Col span={8}>
<Row>
<Col span={12}>手机号</Col>
<Col span={12}>18888888888</Col>
</Row>
</Row>
</Col>
<Col span={8}>
<Row>
<Col span={12}>个税扣缴义务人</Col>
<Col span={12}>义务人一</Col>
</Row>
<Col span={12}>{getLabel(111, "手机号")}</Col>
<Col span={12}>18888888888</Col>
</Row>
</Col>
<Col span={8}>
<Row>
<Col span={12}>{getLabel(111, "个税扣缴义务人")}</Col>
<Col span={12}>{getLabel(111, "义务人一")}</Col>
</Row>
</Col>
</Row>
</div>
</div>
<div className="detialItemWrapper">
<div className="titleWrapper">
<span className="itemTitle">合并计税详情</span>
<span className="itemTitle">{getLabel(111, "合并计税详情")}</span>
<WeaHelpfulTip
style={{marginLeft: "10px"}}
width={200}
title="薪资周期\n
2021-11-01至2021-11-30\n
税款所属期\n
2021-12\n
考勤取值周期\n
2021-11-01至2021-11-30\n
福利台账月份\n
引用2021-11的福利台账数据"
title={`${getLabel(111, "薪资周期")}\\n
2021-11-01${getLabel(111, "")}2021-11-30\\n
${getLabel(111, "税款所属期")}\\n
2021-12\\n
${getLabel(111, "考勤取值周期")}\\n
2021-11-01至2021-11-30\\n
${getLabel(111, "福利台账月份")}\\n
${getLabel(111, "引用")}2021-11${getLabel(111, "的福利台账数据")}`}
placement="topLeft"
/>
</div>
@ -102,4 +103,4 @@ export default class FileMergeDetail extends React.Component {
</div>
)
}
}
}

View File

@ -3,14 +3,24 @@ import UserSure from "./userSure";
import { inject, observer } from "mobx-react";
import SalaryDetail from "./salaryDetail";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
import {
WeaBrowser,
WeaCheckbox,
WeaDropdown,
WeaFormItem,
WeaInput,
WeaLocaleProvider,
WeaSearchGroup,
WeaSelect,
WeaTab
} from "ecCom";
import { convertToUrlString, getQueryString } from "../../util/url";
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
import ProgressModal from "../../components/progressModal";
import Authority from "../mySalary/authority";
const { ButtonSelect } = WeaDropdown;
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "salaryFileStore", "taxAgentStore")
@observer
export default class CalculateDetail extends React.Component {
@ -107,8 +117,8 @@ export default class CalculateDetail extends React.Component {
<WeaSelect
value={status}
options={[
{ key: "", showname: "" }, { key: "ALL", showname: "全部" },
{ key: "NORMAL", showname: "在职" }, { key: "UNAVAILABLE", showname: "离职" }
{ key: "", showname: "" }, { key: "ALL", showname: getLabel(111, "全部") },
{ key: "NORMAL", showname: getLabel(111, "在职") }, { key: "UNAVAILABLE", showname: getLabel(111, "离职") }
]}
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
</WeaFormItem>
@ -122,7 +132,7 @@ export default class CalculateDetail extends React.Component {
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
<WeaCheckbox value={consolidatedTaxation} content="是" onChange={(val) => this.setState({
<WeaCheckbox value={consolidatedTaxation} content={getLabel(111, "是")} onChange={(val) => this.setState({
searchItemsValue: {
...this.state.searchItemsValue,
[key]: val
@ -137,12 +147,12 @@ export default class CalculateDetail extends React.Component {
const { calculateStore } = this.props;
const { acctresultAccounting, getCalculateProgress } = calculateStore;
if (key === "SELECT" && _.isEmpty(this.state.accountIds)) {
message.warning("请先选择表格数据");
message.warning(getLabel(111, "请先选择表格数据"));
return;
}
Modal.confirm({
title: "信息确认",
content: "点击核算,公式项将按照公式逻辑核算,核算结果将覆盖原数据",
title: getLabel(111, "信息确认"),
content: getLabel(111, "点击核算,公式项将按照公式逻辑核算,核算结果将覆盖原数据"),
onOk: () => {
this.setState({ progress: 0 });
let payload = { salaryAcctRecordId: this.id };
@ -167,7 +177,7 @@ export default class CalculateDetail extends React.Component {
accountIds: [],
accountExceptInfo: data.message
});
message.success("核算完成");
message.success(getLabel(111, "核算完成"));
// acctResultList({ salaryAcctRecordId: this.id });
const childFrameObj = document.getElementById("atdTable");
const salaryAcctRecordId = getQueryString("id");
@ -257,7 +267,7 @@ export default class CalculateDetail extends React.Component {
const element = document.createElement("a");
const file = new Blob([value], { type: "text/plain" });
element.href = URL.createObjectURL(file);
element.download = "核算异常信息.txt";
element.download = `${getLabel(111,"核算异常信息")}.txt`;
document.body.appendChild(element);
element.click();
};
@ -267,9 +277,9 @@ export default class CalculateDetail extends React.Component {
const { taxAgentStore: { payrollPermission } } = this.props;
const menu = (
<Menu onClick={this.handleMenuClick.bind(this)}>
<Menu.Item key="1">导入</Menu.Item>
<Menu.Item key="2">线下对比</Menu.Item>
<Menu.Item key="3">导出全部</Menu.Item>
<Menu.Item key="1">{getLabel(111, "导入")}</Menu.Item>
<Menu.Item key="2">{getLabel(111, "线下对比")}</Menu.Item>
<Menu.Item key="3">{getLabel(111, "导出全部")}</Menu.Item>
</Menu>
);
@ -278,14 +288,14 @@ export default class CalculateDetail extends React.Component {
let buttons = [
<ButtonSelect
datas={[
{ key: "ALL", show: "核算所有人", selected: true },
{ key: "SELECT", show: "核算所选人员", selected: false }
{ key: "ALL", show: getLabel(111, "核算所有人"), selected: true },
{ key: "SELECT", show: getLabel(111, "核算所选人员"), selected: false }
]}
btnOnClick={this.handleAccount}
menuOnClick={(key) => this.handleAccount(key)}
/>,
<Dropdown.Button overlay={menu}>
更多
{getLabel(111, "更多")}
</Dropdown.Button>
];
accountExceptInfo && buttons.unshift(<Button type="ghost" shape="circle-outline" icon="download"
@ -296,11 +306,11 @@ export default class CalculateDetail extends React.Component {
const topTab = [
{
title: "人员确认",
title: getLabel(111, "人员确认"),
viewcondition: "0"
},
{
title: "薪资核算",
title: getLabel(111, "薪资核算"),
viewcondition: "1"
}
];
@ -312,7 +322,7 @@ export default class CalculateDetail extends React.Component {
this.handleSearch(this.state.searchItemsValue);
});
}}>
搜索
{getLabel(111, "搜索")}
</Button>,
<Button type="ghost" onClick={() => this.setState({
searchItemsValue: {
@ -324,24 +334,24 @@ export default class CalculateDetail extends React.Component {
consolidatedTaxation: "0"
}
})}>
重置
{getLabel(111, "重置")}
</Button>,
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}>
取消
{getLabel(111, "取消")}
</Button>
];
const renderSearch = () => {
const searchItems = [
{ com: this.Input("姓名", "employeeName") },
{ com: this.Input("工号", "workcode") },
{ com: this.Browser("分部", "subcompanyIds") },
{ com: this.Browser("部门", "departmentIds") },
{ com: this.Browser("岗位", "positionIds") },
{ com: this.Select("状态", "status") },
{ com: this.Checkbox("合并计税", "consolidatedTaxation") }
{ com: this.Input(getLabel(111, "姓名"), "employeeName") },
{ com: this.Input(getLabel(111, "工号"), "workcode") },
{ com: this.Browser(getLabel(111, "分部"), "subcompanyIds") },
{ com: this.Browser(getLabel(111, "部门"), "departmentIds") },
{ com: this.Browser(getLabel(111, "岗位"), "positionIds") },
{ com: this.Select(getLabel(111, "状态"), "status") },
{ com: this.Checkbox(getLabel(111, "合并计税"), "consolidatedTaxation") }
];
return <WeaSearchGroup title={"基本信息"} items={searchItems} showGroup/>;
return <WeaSearchGroup title={getLabel(111, "基本信息")} items={searchItems} showGroup/>;
};
return (
@ -360,7 +370,7 @@ export default class CalculateDetail extends React.Component {
buttonsAd={adBtn} // 高级搜索内部按钮
onSearch={() => this.handleSearch(this.state.searchItemsValue)} // 点搜索按钮时的回调
buttons={selectedKey == 1 ? renderRightOperation() : []}
searchsBasePlaceHolder={"请输入姓名"}
searchsBasePlaceHolder={getLabel(111, "请输入姓名")}
onSearchChange={(v) =>
this.setState({
searchItemsValue: {

View File

@ -5,15 +5,16 @@
* Date: 2022/12/14
*/
import React, { Component } from "react";
import { WeaHelpfulTip, WeaInputNumber, WeaTable } from "ecCom";
import { WeaHelpfulTip, WeaInputNumber, WeaTable, WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class IssuedAndReissueTable extends Component {
render() {
const { dataSource, onChangeIssueReissueValue } = this.props;
const columns = [
{
dataIndex: "salaryItemName",
title: "薪资项目",
title: getLabel(111, "薪资项目"),
render: (text) => {
return <span className="tdEllipsis" title={text}>{text}</span>;
}
@ -21,9 +22,9 @@ class IssuedAndReissueTable extends Component {
{
dataIndex: "resultValue",
title: <span>
<span style={{ marginRight: 8 }}>项目值</span>
<span style={{ marginRight: 8 }}>{getLabel(111, "项目值")}</span>
<WeaHelpfulTip
title="若薪资项目有公式,手动编辑项目值后,需点击锁定图标输入值才生效;点击锁定图标,解锁手动编辑的项目值,公式生效,点击保存按照公式重新核算;重新核算后,不显示解锁图标。"
title={getLabel(111, "若薪资项目有公式,手动编辑项目值后,需点击锁定图标输入值才生效;点击锁定图标,解锁手动编辑的项目值,公式生效,点击保存按照公式重新核算;重新核算后,不显示解锁图标。")}
placement="bottom"
width={200}
/>
@ -42,15 +43,15 @@ class IssuedAndReissueTable extends Component {
{
dataIndex: "itemFormulaContent",
title: <span>
<span style={{ marginRight: 8 }}>核算公式</span>
<span style={{ marginRight: 8 }}>{getLabel(111, "核算公式")}</span>
<WeaHelpfulTip
title="若薪资项目有公式,且项目值手动编辑修改过并点击锁定图标,则公式失效;若解除锁定,则项目公式重新生效;"
title={getLabel(111, "若薪资项目有公式,且项目值手动编辑修改过并点击锁定图标,则公式失效;若解除锁定,则项目公式重新生效;")}
placement="bottom"
width={200}
/>
</span>,
render: (text, record) => {
return <span className="tdEllipsis" title={text}>{_.isNil(text) ? "输入" : text}</span>;
return <span className="tdEllipsis" title={text}>{_.isNil(text) ? getLabel(111, "输入") : text}</span>;
}
}
];

View File

@ -2,13 +2,14 @@ import React from "react";
import { toJS } from "mobx";
import CustomTab from "../../components/customTab";
import { Dropdown, Menu, message } from "antd";
import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal } from "ecCom";
import { WeaHelpfulTip, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom";
import SlideModalTitle from "../../components/slideModalTitle";
import FileMergeDetail from "./fileMergeDetail";
import { getQueryString } from "../../util/url";
import { inject, observer } from "mobx-react";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore")
@observer
export default class PlaceOnFileDetail extends React.Component {
@ -99,7 +100,7 @@ export default class PlaceOnFileDetail extends React.Component {
const { calculateStore: { exportAll } } = this.props;
const { selectedRowKeys } = this.state;
if (selectedRowKeys.length === 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
return;
}
exportAll(this.id, selectedRowKeys.join(","));
@ -117,7 +118,7 @@ export default class PlaceOnFileDetail extends React.Component {
const menu = (
<Menu onClick={(e) => this.handleMenuClick(e)}>
<Menu.Item key="3">导出所选</Menu.Item>
<Menu.Item key="3">{getLabel(111, "导出所选")}</Menu.Item>
</Menu>
);
@ -126,8 +127,8 @@ export default class PlaceOnFileDetail extends React.Component {
<div style={{ display: "inline-block" }}>
<Dropdown.Button type="primary" style={{ marginRight: "10px" }} onClick={() => {
this.handleExportAll();
}} overlay={menu}>导出全部</Dropdown.Button>
<WeaInputSearch placeholder="请输入姓名" onChange={(value) => {
}} overlay={menu}>{getLabel(111, "导出全部")}</Dropdown.Button>
<WeaInputSearch placeholder={getLabel(111, "请输入姓名")} onChange={(value) => {
this.setState({ searchValue: value });
}} value={this.state.searchValue} onSearch={(value) => {
this.handleSearch(value);
@ -145,22 +146,22 @@ export default class PlaceOnFileDetail extends React.Component {
}
/>
<div className="tabWrapper" style={{ borderBottom: "none" }}>
<span>薪资所属月{baseSalarySobCycle.salaryMonth}</span>
<span>{getLabel(111, "薪资所属月")}{baseSalarySobCycle.salaryMonth}</span>
<WeaHelpfulTip
width={100}
title={`薪资周期\n
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
税款所属期\n
title={`${getLabel(111, "薪资周期")}\n
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}${getLabel(111, "")}${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
${getLabel(111, "税款所属期")}\n
${baseSalarySobCycle.taxCycle}\n
考勤取值周期\n
${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.endDate}\n
福利台账月份\n
引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
${getLabel(111, "考勤取值周期")}\n
${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.fromDate}${getLabel(111, "")}${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.endDate}\n
${getLabel(111, "福利台账月份")}\n
${getLabel(111, "引用")}${baseSalarySobCycle.socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}
placement="topLeft"
/>
</div>
<div className="tabWrapper">
<span>公式=</span>
<span>{getLabel(111, "公式")}=</span>
<span>{toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}</span>
</div>
<div className="tableWrapper">
@ -182,7 +183,7 @@ export default class PlaceOnFileDetail extends React.Component {
measure={"%"}
title={
<SlideModalTitle
subtitle={"合并计税详情"}
subtitle={getLabel(111, "合并计税详情")}
editable={true}
/>
}

View File

@ -1,5 +1,5 @@
import React from "react";
import { WeaHelpfulTip, WeaSlideModal } from "ecCom";
import { WeaHelpfulTip, WeaSlideModal, WeaLocaleProvider } from "ecCom";
import { message, Modal } from "antd";
import WarningModal from "./warningModal";
import EditSalaryDetail from "./editSalaryDetail";
@ -10,6 +10,7 @@ import { toJS } from "mobx";
import "./index.less";
import ProgressModal from "../../components/progressModal";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "taxAgentStore")
@observer
export default class SalaryDetail extends React.Component {
@ -59,11 +60,11 @@ export default class SalaryDetail extends React.Component {
this.setState({ columnIndex: record });
} else if (extraId === "LOCK") {
Modal.confirm({
title: "信息确认",
title: getLabel(111, "信息确认"),
content: <div>
<div style={{ textAlign: "center" }}>确定要批量锁定项目值吗</div>
<div style={{ textAlign: "center" }}>{getLabel(111, "确定要批量锁定项目值吗?")}</div>
<div
style={{ textAlign: "center" }}>确定后则项目输入值锁定项目公式失效点击核算将按锁定的输入值重新核算!
style={{ textAlign: "center" }}>{getLabel(111, "确定后,则项目输入值锁定,项目公式失效;点击核算将按锁定的输入值重新核算!")}
</div>
</div>,
onOk: () => this.updateLockStatus("LOCK", record),
@ -72,11 +73,11 @@ export default class SalaryDetail extends React.Component {
});
} else if (extraId === "UNLOCK") {
Modal.confirm({
title: "信息确认",
title: getLabel(111, "信息确认"),
content: <div>
<div style={{ textAlign: "center" }}>确定要批量解锁项目值吗</div>
<div style={{ textAlign: "center" }}>{getLabel(111, "确定要批量解锁项目值吗?")}</div>
<div
style={{ textAlign: "center" }}>确定后则项目公式生效页面仍显示手动修改的项目值点击核算将按公式重新核算不再显示解锁标识!
style={{ textAlign: "center" }}>{getLabel(111, "确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!")}
</div>
</div>,
onOk: () => this.updateLockStatus("UNLOCK", record),
@ -138,7 +139,7 @@ export default class SalaryDetail extends React.Component {
progressVisible: false,
progress: 0
}, () => {
message.success("操作成功");
message.success(getLabel(111, "操作成功"));
});
}
}, 500);
@ -163,7 +164,7 @@ export default class SalaryDetail extends React.Component {
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
});
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
};
@ -209,19 +210,19 @@ export default class SalaryDetail extends React.Component {
return (
<div className="salaryDetail">
<div className="salaryBarWrapper">
<span>薪资所属月{baseSalarySobCycle.salaryMonth}</span>
<span>{getLabel(111, "薪资所属月")}{baseSalarySobCycle.salaryMonth}</span>
<WeaHelpfulTip
style={{ marginLeft: "10px" }}
width={200}
title={
`薪资周期\n
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
税款所属期\n
`${getLabel(111, "薪资周期")}\n
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}${getLabel(111, "")}${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
${getLabel(111, "税款所属期")}\n
${baseSalarySobCycle.taxCycle}\n
考勤取值周期\n
${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.endDate}\n
福利台账月份\n
引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
${getLabel(111, "考勤取值周期")}\n
${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.fromDate}${getLabel(111, "")}${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.endDate}\n
${getLabel(111, "福利台账月份")}\n
${getLabel(111, "引用")}${baseSalarySobCycle.socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}
placement="topLeft"
/>
{/*暂时隐藏*/}
@ -230,7 +231,7 @@ export default class SalaryDetail extends React.Component {
{/*}}>校验异常0</span>*/}
</div>
<div className="salaryBarWrapper" style={{ borderBottom: "1px solid #eee" }}>
<span>公式=</span>
<span>{getLabel(111, "公式")}=</span>
<span>{toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}</span>
</div>
<div className="tableWrapper">
@ -248,7 +249,7 @@ export default class SalaryDetail extends React.Component {
{
this.state.progressVisible &&
<ProgressModal
title="正在加锁/解锁请稍后"
title={getLabel(111, "正在加锁/解锁请稍后")}
visible={this.state.progressVisible}
onCancel={() => {
this.setState({ progressVisible: false, progress: 0 });
@ -268,7 +269,7 @@ export default class SalaryDetail extends React.Component {
measure={"%"}
title={
<SlideModalTitle
subtitle="编辑薪资"
subtitle={getLabel(111, "编辑薪资")}
editable={true}
showOperateBtn={showOperateBtn}
onSave={() => this.handleEditSlideSave()}

View File

@ -1,10 +1,20 @@
import React from "react";
import { Button, Col, Icon, message, Modal, Row } from "antd";
import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
import {
WeaBrowser,
WeaFormItem,
WeaHelpfulTip,
WeaInput,
WeaLocaleProvider,
WeaSearchGroup,
WeaSelect,
WeaTab
} from "ecCom";
import { inject, observer } from "mobx-react";
import "./index.less";
import { getQueryString } from "../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore", "salaryFileStore")
@observer
export default class UserSure extends React.Component {
@ -88,8 +98,8 @@ export default class UserSure extends React.Component {
<WeaSelect
value={String(status)}
options={[
{ key: "", showname: "" }, { key: "ALL", showname: "全部" },
{ key: "NORMAL", showname: "在职" }, { key: "UNAVAILABLE", showname: "离职" }
{ key: "", showname: "" }, { key: "ALL", showname: getLabel(111, "全部") },
{ key: "NORMAL", showname: getLabel(111, "在职") }, { key: "UNAVAILABLE", showname: getLabel(111, "离职") }
]}
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
</WeaFormItem>
@ -170,7 +180,7 @@ export default class UserSure extends React.Component {
calculateStore: { saveAcctemployee, checkTaxAgent }
} = this.props;
saveAcctemployee(this.id, idList).then(() => {
message.success("添加成功");
message.success(getLabel(111, "添加成功"));
const payload = {
type: "PC",
listType: "SA",
@ -207,17 +217,17 @@ export default class UserSure extends React.Component {
calculateStore: { deleteAcctemployee }
} = this.props;
if (selectedRowKeys.length == 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
return;
}
Modal.confirm({
title: "信息确认",
content: "确认删除",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除吗?"),
onOk: () => {
const childFrameObj = document.getElementById("atdTable");
const salaryAcctRecordId = getQueryString("id");
deleteAcctemployee(this.id, selectedRowKeys).then(() => {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
const payload = {
type: "PC",
listType: "SA",
@ -243,8 +253,8 @@ export default class UserSure extends React.Component {
calculateStore: { deleteAcctemployee }
} = this.props;
Modal.confirm({
title: "信息确认",
content: "确认删除",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除吗?"),
onOk: () => {
deleteAcctemployee(this.id, [record.id]).then(() => {
const childFrameObj = document.getElementById("atdTable");
@ -335,7 +345,7 @@ export default class UserSure extends React.Component {
this.handleUserListSearch(this.state.searchItemsValue);
});
}}>
搜索
{getLabel(111, "搜索")}
</Button>,
<Button type="ghost" onClick={() => this.setState({
searchItemsValue: {
@ -345,39 +355,39 @@ export default class UserSure extends React.Component {
status: ""
}
})}>
重置
{getLabel(111, "重置")}
</Button>,
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}>
取消
{getLabel(111, "取消")}
</Button>
];
const renderSearch = () => {
const searchItems = [
{ com: this.Input("姓名", "employeeName") },
{ com: this.Input("工号", "workcode") },
{ com: this.Browser("部门", "departmentIds") },
{ com: this.Browser("岗位", "positionIds") },
{ com: this.Select("状态", "status") }
{ com: this.Input(getLabel(111, "姓名"), "employeeName") },
{ com: this.Input(getLabel(111, "工号"), "workcode") },
{ com: this.Browser(getLabel(111, "部门", "departmentIds") },
{ com: this.Browser(getLabel(111, "岗位", "positionIds") },
{ com: this.Select(getLabel(111, "状态"), "status") }
];
return <WeaSearchGroup title={"基本信息"} items={searchItems} showGroup/>;
return <WeaSearchGroup title={getLabel(111, "基本信息")} items={searchItems} showGroup/>;
};
return (
<div className="userSure">
<div className="baseInfo">基本信息</div>
<div className="baseInfo">{getLabel(111, "基本信息")}</div>
<div className="formWrapper">
<Row>
<Col span={12}>
<Row>
<Col span={6}>
薪资所属月<WeaHelpfulTip
{getLabel(111, "薪资所属月:")}<WeaHelpfulTip
width={100}
title={`薪资周期\n${baseSalarySobCycle.salaryCycle &&
baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle &&
baseSalarySobCycle.salaryCycle.endDate}\n税款所属期\n${baseSalarySobCycle.taxCycle}\n考勤取值周期\n${baseSalarySobCycle.attendCycle &&
baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle &&
baseSalarySobCycle.attendCycle.endDate}\n福利台账月份\n引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
title={`${getLabel(111, "薪资周期")}\n${baseSalarySobCycle.salaryCycle &&
baseSalarySobCycle.salaryCycle.fromDate}${getLabel(111, "")}${baseSalarySobCycle.salaryCycle &&
baseSalarySobCycle.salaryCycle.endDate}\n${getLabel(111, "税款所属期")}\n${baseSalarySobCycle.taxCycle}\n${getLabel(111, "考勤取值周期")}\n${baseSalarySobCycle.attendCycle &&
baseSalarySobCycle.attendCycle.fromDate}${getLabel(111, "")}${baseSalarySobCycle.attendCycle &&
baseSalarySobCycle.attendCycle.endDate}\n${getLabel(111, "福利台账月份")}\n${getLabel(111, "引用")}${baseSalarySobCycle.socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}
placement="topLeft"
/>
</Col>
@ -389,7 +399,7 @@ export default class UserSure extends React.Component {
</Col>
<Col span={12}>
<Row>
<Col span={6}>核算账套</Col>
<Col span={6}>{getLabel(111, "核算账套:")}</Col>
<Col span={18}>
{calculateBaseForm.formDTO &&
calculateBaseForm.formDTO.salarySobName}
@ -400,7 +410,7 @@ export default class UserSure extends React.Component {
<Row>
<Col span={12}>
<Row>
<Col span={6}>备注</Col>
<Col span={6}>{getLabel(111, "备注")}</Col>
<Col span={18}>
{calculateBaseForm.formDTO &&
calculateBaseForm.formDTO.description}
@ -433,11 +443,11 @@ export default class UserSure extends React.Component {
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
});
}}>
核算人员范围
{getLabel(111, "核算人员范围")}
</span>
<WeaHelpfulTip
width={200}
title="核算完若薪资档案中个税扣缴义务人发生调整,需先刷新【核算人员范围】再到【薪资核算】中重新核算"
title={getLabel(111, "核算完若薪资档案中个税扣缴义务人发生调整,需先刷新【核算人员范围】再到【薪资核算】中重新核算")}
placement="topLeft"
/>
<span style={{ margin: "0 8px" }}>|</span>
@ -463,11 +473,11 @@ export default class UserSure extends React.Component {
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
});
}}>
环比上月减少人员
{getLabel(111, "环比上月减少人员")}
</span>
<WeaHelpfulTip
width={200}
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下减少的人员"
title={getLabel(111, "提示:环比上期当前选择的账套归档的各个税扣缴义务人下减少的人员")}
placement="topLeft"
/>
<span style={{ margin: "0 8px" }}>|</span>
@ -493,11 +503,11 @@ export default class UserSure extends React.Component {
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
});
}}>
环比上月增加人员
{getLabel(111, "环比上月增加人员")}
</span>
<WeaHelpfulTip
width={200}
title="提示:环比上期当前选择的账套归档的各个税扣缴义务人下增加的人员"
title={getLabel(111, "提示:环比上期当前选择的账套归档的各个税扣缴义务人下增加的人员")}
placement="topLeft"
/>
</div>
@ -517,17 +527,17 @@ export default class UserSure extends React.Component {
onClick={() => {
this.handleBatchDelete();
}}
title="批量删除"
title={getLabel(111, "批量删除")}
/>,
<WeaBrowser
type={17}
title="添加人员"
title={getLabel(111, "添加人员")}
isSingle={false}
customized
onChange={(ids, names, datas) =>
this.handleUserBrowserChange(ids)}>
<Icon
type="plus-square" title="新增"
type="plus-square" title={getLabel(111, "新增")}
className="iconItem"
style={{ fontSize: 16 }}/>
</WeaBrowser>,
@ -537,7 +547,7 @@ export default class UserSure extends React.Component {
this.handleExport();
}}
style={{ fontSize: 20, position: "relative", top: 2 }}
title="导出"
title={getLabel(111, "导出")}
/>
// <i
// className="icon-coms-Synchro iconItem"
@ -554,10 +564,10 @@ export default class UserSure extends React.Component {
this.handleExport();
}}
style={{ fontSize: 20, position: "relative", top: 2 }}
title="导出"
title={getLabel(111, "导出")}
/>
]}
searchsBasePlaceHolder={"请输入姓名"}
searchsBasePlaceHolder={getLabel(111, "请输入姓名")}
onSearchChange={(v) =>
this.setState({
searchItemsValue: {

View File

@ -1,15 +1,16 @@
import React from "react";
import {Button, Dropdown, Menu, Modal, Table} from "antd";
import { WeaLocaleProvider } from "ecCom";
import {dataSource, warningModalColumns} from "./columns";
const getLabel = WeaLocaleProvider.getLabel;
export default class WarningModal extends React.Component {
render() {
const menu = (
<Menu>
<Menu.Item key="1">导出所选</Menu.Item>
<Menu.Item key="1">{getLabel(111, "导出所选")}</Menu.Item>
</Menu>
);
return (
@ -17,10 +18,10 @@ export default class WarningModal extends React.Component {
this.props.onCancel();
}}>
<div style={{borderBottom: "1px solid #eee", height: "47px", lineHeight: "47px"}}>
<span style={{fontSize: "14px", color: "#666"}}>验证结果</span>
<span style={{fontSize: "14px", color: "#666"}}>{getLabel(111, "验证结果")}</span>
<div style={{display: "inline-block", float: "right", marginRight: "40px"}}>
<Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu}>导出全部</Dropdown.Button>
<Button type="default" style={{marginLeft: "10px"}}>忽略所有</Button>
<Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu}>{getLabel(111, "导出全部")}</Dropdown.Button>
<Button type="default" style={{marginLeft: "10px"}}>{getLabel(111, "忽略所有")}</Button>
</div>
</div>
<div style={{minHeight: "400px", marginTop: "10px"}}>
@ -29,4 +30,4 @@ export default class WarningModal extends React.Component {
</Modal>
);
}
}
}

View File

@ -4,12 +4,14 @@
* Description:
*/
import React, { Component } from "react";
import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom";
import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { getSearchs } from "../../util";
import { Select } from "../ruleConfig";
import { PickDate } from "../appConfig";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class AddItems extends Component {
constructor(props) {
super(props);
@ -77,7 +79,7 @@ class AddItems extends Component {
let items = [
{
com: PickDate({
label: "税款所属期",
label: getLabel(111, "税款所属期"),
viewAttr: _.isEmpty(editId) ? 3 : 1,
labelCol: { span: 6 },
wrapperCol: { span: 18 },
@ -90,7 +92,7 @@ class AddItems extends Component {
},
{
com: Select({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
viewAttr: _.isEmpty(editId) ? 3 : 1,
options: taxAgentOption,
value: baseInfo.taxAgentId,
@ -101,7 +103,7 @@ class AddItems extends Component {
},
{
com: Browser({
label: "人员",
label: getLabel(111, "人员"),
viewAttr: _.isEmpty(editId) ? 3 : 1,
value: baseInfo.employeeId,
valueSpan: baseInfo.employeeName,
@ -114,7 +116,7 @@ class AddItems extends Component {
const cumSituationitems = [
{
com: PickDate({
label: "税款所属期",
label: getLabel(111, "税款所属期"),
viewAttr: _.isEmpty(editId) ? 3 : 1,
labelCol: { span: 6 },
wrapperCol: { span: 18 },
@ -127,7 +129,7 @@ class AddItems extends Component {
},
{
com: Select({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
viewAttr: _.isEmpty(editId) ? 3 : 1,
options: taxAgentOption,
value: baseInfo.taxAgentId,
@ -138,11 +140,11 @@ class AddItems extends Component {
},
{
com: Select({
label: "人员范围",
label: getLabel(111, "人员范围"),
viewAttr: _.isEmpty(editId) ? 3 : 1,
options: [
{ key: "ORGANIZATION", showname: "内部人员" }
// { key: "EXT_EMPLOYEE", showname: "非系统人员" }
{ key: "ORGANIZATION", showname: getLabel(111, "内部人员") }
// { key: "EXT_EMPLOYEE", showname: getLabel(111, "非系统人员") }
],
value: baseInfo.personArea,
onChange: (data) => {
@ -153,7 +155,7 @@ class AddItems extends Component {
];
const insider = [{
com: Browser({
label: "人员",
label: getLabel(111, "人员"),
viewAttr: _.isEmpty(editId) ? 3 : 1,
value: baseInfo.employeeId,
valueSpan: baseInfo.employeeName,
@ -165,7 +167,7 @@ class AddItems extends Component {
const noSysPerson = [
{
com: InputCus({
label: "姓名",
label: getLabel(111, "姓名"),
viewAttr: 2,
onChange: (username) => {
this.setState({ baseInfo: { ...baseInfo, username } });
@ -174,7 +176,7 @@ class AddItems extends Component {
},
{
com: InputCus({
label: "身份证号码",
label: getLabel(111, "身份证号码"),
viewAttr: 3,
onChange: (idcard) => {
this.setState({ baseInfo: { ...baseInfo, idcard } });
@ -187,13 +189,13 @@ class AddItems extends Component {
<div className="addItemsWrapper">
<WeaSearchGroup
className="baseForm"
title="基础信息"
title={getLabel(111, "基础信息")}
items={!isCum ? items : baseInfo.personArea === "ORGANIZATION" ? [...cumSituationitems, ...insider] : baseInfo.personArea === "EXT_EMPLOYEE" ? [...cumSituationitems, ...noSysPerson] : cumSituationitems}
needTigger showGroup col={1}/>
{
getSearchs(form, condition, 2)
}
<Tips><span>若此员工数据已存在在同期列表中则当前数据保存后会覆盖列表数据</span></Tips>
<Tips><span>{getLabel(111, "若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据")}</span></Tips>
</div>
);
}
@ -227,7 +229,7 @@ export const Tips = payload => {
const { children } = payload;
return (
<div className="tipWrapper">
<div className="title">小提示</div>
<div className="title">{getLabel(111, "小提示")}</div>
<div className="content">{children}</div>
</div>
);

View File

@ -1,66 +1,69 @@
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const columns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "username",
key: "username"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "ywr",
key: "ywr"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "bm",
key: "title"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "sjh",
key: "sjh"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "gh",
key: "gh"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "sfzh",
key: "sfzh"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "rzrq",
key: "rzrq"
},
{
title: "累计子女教育",
title: getLabel(111, "累计子女教育"),
dataIndex: "ljznjy",
key: "ljznjy"
},
{
title: "累计继续教育",
title: getLabel(111, "累计继续教育"),
dataIndex: "ljjxjy",
key: "ljjxjy"
},
{
title: "累计住房贷款利息",
title: getLabel(111, "累计住房贷款利息"),
dataIndex: "ljzfdklx",
key: "ljfdklx"
},
{
title: "累计住房租金",
title: getLabel(111, "累计住房租金"),
dataIndex: "ljzfzj",
key: "ljzfzj"
},
{
title: "累计赡养老人",
title: getLabel(111, "累计赡养老人"),
dataIndex: "ljsylr",
key: "ljsylr"
},
{
title: "操作",
title: getLabel(111, "操作"),
dataIndex: "cz",
key: "cz",
render: (text, record) => {
@ -76,31 +79,31 @@ export const fieldsColumns = [
display: true
},
{
title: "字段名称",
title: getLabel(111, "字段名称"),
dataIndex: "fieldName",
key: "fieldName",
display: true
},
{
title: "来源",
title: getLabel(111, "来源"),
dataIndex: "sourceType",
key: "sourceType",
display: true
},
{
title: "类型",
title: getLabel(111, "类型"),
dataIndex: "fieldType",
key: "fieldType",
display: true
},
{
title: "是否启用",
title: getLabel(111, "是否启用"),
dataIndex: "enableStatus",
key: "enableStatus",
display: true
},
{
title: "备注",
title: getLabel(111, "备注"),
dataIndex: "description",
key: "description",
display: true
@ -115,7 +118,7 @@ export const conditions = [
domkey: ["fieldName"],
fieldcol: 14,
rules: "required|string",
label: "字段名称",
label: getLabel(111, "字段名称"),
labelcol: 6,
value: "",
viewAttr: 3
@ -126,19 +129,19 @@ export const conditions = [
domkey: ["fieldType"],
fieldcol: 14,
isQuickSearch: false,
label: "类型",
label: getLabel(111, "类型"),
labelcol: 6,
valueList:[],
valueList: [],
options: [
{
key: "NUMBER",
selected: true,
showname: "数值"
showname: getLabel(111, "数值")
},
{
key: "TEXT",
selected: false,
showname: "文本"
showname: getLabel(111, "文本")
}
],
rules: "required|string",
@ -149,7 +152,7 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["enableStatus"],
fieldcol: 14,
label: "是否启用",
label: getLabel(111, "是否启用"),
labelcol: 6,
viewAttr: 3,
rules: "required"
@ -159,7 +162,7 @@ export const conditions = [
conditionType: "INPUT",
domkey: ["description"],
fieldcol: 14,
label: "备注",
label: getLabel(111, "备注"),
labelcol: 6,
value: "",
viewAttr: 2
@ -177,7 +180,7 @@ export const reFrenceConditions = [
domkey: ["salaryYearMonth"],
fieldcol: 18,
rules: "required|string",
label: "薪资所属月",
label: getLabel(111, "薪资所属月"),
labelcol: 6,
value: "",
viewAttr: 3
@ -188,9 +191,9 @@ export const reFrenceConditions = [
domkey: ["salarySobId"],
fieldcol: 18,
isQuickSearch: false,
label: "薪资账套",
label: getLabel(111, "薪资账套"),
labelcol: 6,
valueList:[],
valueList: [],
options: [],
rules: "required|string",
viewAttr: 3
@ -200,7 +203,7 @@ export const reFrenceConditions = [
conditionType: "INPUT",
domkey: ["description"],
fieldcol: 18,
label: "备注",
label: getLabel(111, "备注"),
labelcol: 6,
value: "",
viewAttr: 2

View File

@ -6,13 +6,14 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog } from "ecCom";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { Button, message } from "antd";
import { conditions } from "../columns";
import { getSearchs } from "../../../../util";
import { saveAttendanceField } from "../../../../apis/attendance";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("attendanceStore")
@observer
class AttendanceCustomFieldsModal extends Component {
@ -39,11 +40,11 @@ class AttendanceCustomFieldsModal extends Component {
const payload = form.getFormParams();
saveAttendanceField(payload).then(({ status, errormsg }) => {
if (status) {
message.success("新增成功");
message.success(getLabel(111, "新增成功"));
onCancel();
onRefresh();
} else {
message.error(errormsg || "新增失败");
message.error(errormsg || getLabel(111, "新增失败"));
}
});
} else {
@ -59,7 +60,7 @@ class AttendanceCustomFieldsModal extends Component {
render() {
const { attendanceStore: { form } } = this.props;
const buttons = [
<Button type="primary" onClick={this.handleSubmitFields}>保存</Button>
<Button type="primary" onClick={this.handleSubmitFields}>{getLabel(111, "保存")}</Button>
];
return (
<WeaDialog

View File

@ -5,7 +5,7 @@
* Date: 2023/2/24
*/
import React, { Component } from "react";
import { WeaTable } from "ecCom";
import { WeaTable, WeaLocaleProvider } from "ecCom";
import { message, Modal } from "antd";
import {
deleteAttendance,
@ -28,6 +28,7 @@ import SelectItemsWrapper from "../../../../components/selectItemsModal/selectIt
import AttendanceRefrenceDataModal from "./attendanceRefrenceDataModal";
import AttendanceDataViewSlide from "./attendanceDataViewSlide";
const getLabel = WeaLocaleProvider.getLabel;
class AttendanceDataComp extends Component {
constructor(props) {
super(props);
@ -128,15 +129,15 @@ class AttendanceDataComp extends Component {
};
handleDeleteAttendanceData = ({ id }) => {
Modal.confirm({
title: "信息确认",
content: "确认要删除吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认要删除吗?"),
onOk: () => {
deleteAttendance([id]).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.getAttendanceList();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -206,7 +207,7 @@ class AttendanceDataComp extends Component {
const { importFormPayload } = this.state;
const { salarySobId, salaryYearMonth } = importFormPayload;
if (!salarySobId || !salaryYearMonth) {
message.warning("请完善导入选项,再下载");
message.warning(getLabel(111, "请完善导入选项,再下载"));
return;
}
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
@ -226,7 +227,7 @@ class AttendanceDataComp extends Component {
this.setState({
fieldSetPayload: {
...fieldSetPayload,
visible: true, title: "导入字段设置",
visible: true, title: getLabel(111, "导入字段设置"),
children: <SelectItemsWrapper
ref={dom => this.setItemRef = dom}
dataSource={data}
@ -256,10 +257,10 @@ class AttendanceDataComp extends Component {
case "recovery":
returnToAttendanceFieldSettingDefault({ sourceType: "IMPORT" }).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功");
message.success(getLabel(111, "操作成功"));
this.handleHeaderSettings({ sourceType: "IMPORT" });
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
break;
@ -278,9 +279,9 @@ class AttendanceDataComp extends Component {
const payload = { currentSettingFields, sourceType: "IMPORT" };
saveAttendanceFieldSettingAsDefault(payload).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功");
message.success(getLabel(111, "操作成功"));
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
break;
@ -303,10 +304,10 @@ class AttendanceDataComp extends Component {
const payload = { currentSettingFields, sourceType: "IMPORT" };
saveAttendanceFieldSetting(payload).then(({ status, errormsg }) => {
if (status) {
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
this.handleCloseSettings();
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
});
};
@ -335,7 +336,7 @@ class AttendanceDataComp extends Component {
const { showOperateBtn, salaryYearMonth } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
@ -356,15 +357,15 @@ class AttendanceDataComp extends Component {
columns={[
...columns,
{
title: "操作",
title: getLabel(111, "操作"),
width: 120,
dataIndex: "operate",
render: (_, record) => {
return (
<div className="linkWapper">
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>查看</a>
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>{getLabel(111, "查看")}</a>
{showOperateBtn &&
<a href="javascript: void(0);" onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
<a href="javascript: void(0);" onClick={() => this.handleDeleteAttendanceData(record)}>{getLabel(111, "删除")}</a>
}
</div>
);

View File

@ -5,13 +5,15 @@
* Date: 2023/3/7
*/
import React, { Component } from "react";
import { WeaFormItem, WeaInput, WeaInputSearch, WeaSlideModal } from "ecCom";
import { WeaFormItem, WeaInput, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom";
import { Button } from "antd";
import SlideModalTitle from "../../../../components/slideModalTitle";
import { viewAttendQuote } from "../../../../apis/attendance";
import UnifiedTable from "../../../../components/UnifiedTable";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class AttendanceDataViewSlide extends Component {
constructor(props) {
super(props);
@ -57,7 +59,7 @@ class AttendanceDataViewSlide extends Component {
<WeaInputSearch
value={keyword}
style={{ marginLeft: 10 }}
placeholder="请输入姓名/部门/工号/手机号"
placeholder={getLabel(111, "请输入姓名/部门/工号/手机号")}
onChange={keyword => this.setState({ keyword })}
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
/>
@ -81,7 +83,7 @@ class AttendanceDataViewSlide extends Component {
const { columns, dataSource, loading, pageInfo } = this.state;
const pagination = {
...pageInfo,
showTotal: (total) => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
pageSizeOptions: ["10", "20", "50", "100"],
showSizeChanger: true,
showQuickJumper: true,
@ -109,7 +111,7 @@ class AttendanceDataViewSlide extends Component {
direction="right"
title={
<SlideModalTitle
subtitle="考勤数据"
subtitle={getLabel(111, "考勤数据")}
editable={false}
showOperateBtn={showOperateBtn}
customOperate={this.renderCustomOperate()}
@ -117,7 +119,7 @@ class AttendanceDataViewSlide extends Component {
}
content={
<div>
<WeaFormItem label="考勤周期" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} underline>
<WeaFormItem label={getLabel(111, "考勤周期")} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} underline>
<WeaInput value={salaryYearMonth} viewAttr={1}/>
</WeaFormItem>
<UnifiedTable

View File

@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog } from "ecCom";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { Button, message } from "antd";
import { reFrenceConditions } from "../columns";
import { getSearchs } from "../../../../util";
@ -20,6 +20,7 @@ import SelectItemModal from "../../../../components/selectItemsModal";
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("attendanceStore")
@observer
class AttendanceRefrenceDataModal extends Component {
@ -81,10 +82,10 @@ class AttendanceRefrenceDataModal extends Component {
syncAttendanceRefer(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("同步成功");
message.success(getLabel(111, "同步成功"));
onCancel(true);
} else {
message.error(errormsg || "同步失败");
message.error(errormsg || getLabel(111, "同步失败"));
}
}).catch(() => this.setState({ loading: false }));
} else {
@ -116,7 +117,7 @@ class AttendanceRefrenceDataModal extends Component {
this.setState({
headerSetPayload: {
...headerSetPayload,
visible: true, title: "引用考勤字段设置",
visible: true, title: getLabel(111, "引用考勤字段设置"),
children: <SelectItemsWrapper
ref={dom => this.setItemRef = dom}
dataSource={data}
@ -146,10 +147,10 @@ class AttendanceRefrenceDataModal extends Component {
case "recovery":
returnToAttendanceFieldSettingDefault({ sourceType: "QUOTE" }).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功");
message.success(getLabel(111, "操作成功"));
this.handleHeaderSetting({ sourceType: "QUOTE" });
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
break;
@ -168,9 +169,9 @@ class AttendanceRefrenceDataModal extends Component {
const payload = { currentSettingFields, sourceType: "QUOTE" };
saveAttendanceFieldSettingAsDefault(payload).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功");
message.success(getLabel(111, "操作成功"));
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
break;
@ -193,10 +194,10 @@ class AttendanceRefrenceDataModal extends Component {
const payload = { currentSettingFields, sourceType: "QUOTE" };
saveAttendanceFieldSetting(payload).then(({ status, errormsg }) => {
if (status) {
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
this.handleCloseSettings();
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
});
};
@ -205,8 +206,8 @@ class AttendanceRefrenceDataModal extends Component {
const { condition, loading, headerSetLoading, headerSetPayload } = this.state;
const { attendanceStore: { refenceform } } = this.props;
const buttons = [
<Button type="primary" onClick={this.handleSubmitFields} loading={loading}>同步</Button>,
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
<Button type="primary" onClick={this.handleSubmitFields} loading={loading}>{getLabel(111, "同步")}</Button>,
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>{getLabel(111, "表头设置")}</Button>
];
return (
<WeaDialog

View File

@ -5,13 +5,15 @@
* Date: 2023/2/24
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaTable } from "ecCom";
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
import { Col, message, Row } from "antd";
import AttendanceCustomFieldsModal from "./attendanceCustomFieldsModal";
import { getAttendanceFieldList, updateAttendanceFieldStatus } from "../../../../apis/attendance";
import TipLabel from "../../../../components/TipLabel";
import { fieldsColumns } from "../columns";
const getLabel = WeaLocaleProvider.getLabel;
class FieldMangComp extends Component {
constructor(props) {
super(props);
@ -28,7 +30,7 @@ class FieldMangComp extends Component {
},
addPayload: {
visible: false,
title: "新建考勤自定义字段"
title: getLabel(111, "新建考勤自定义字段")
}
};
}
@ -61,10 +63,10 @@ class FieldMangComp extends Component {
const payload = { id, enableStatus: enableStatus === "1" };
updateAttendanceFieldStatus(payload).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功");
message.success(getLabel(111, "操作成功"));
this.getAttendanceFieldList();
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
};
@ -94,7 +96,7 @@ class FieldMangComp extends Component {
const { fieldName } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
@ -126,8 +128,8 @@ class FieldMangComp extends Component {
<Col xs={24} sm={24} md={8} lg={6}>
<TipLabel
tipList={[
"1、考勤字段包含自定义字段和考勤模块的统计字段,所有字段不可重名;",
"2、停用自定义字段将影响其参与计算的账套核算;"
`1、${getLabel(111, "考勤字段包含自定义字段和考勤模块的统计字段,所有字段不可重名;")}`,
`2、${getLabel(111, "停用自定义字段将影响其参与计算的账套核算;")}`
]}
/>
</Col>

View File

@ -5,10 +5,11 @@
* Date: 2023/3/3
*/
import React, { Component } from "react";
import { WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom";
import { WeaFormItem, WeaInput, WeaSearchGroup, WeaLocaleProvider } from "ecCom";
import { DataCollectionDatePicker, DataCollectionSelect } from "../../cumDeduct";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const Input = (label, value, labelCol = 8, wrapperCol = 16) => {
return (
<WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
@ -28,7 +29,7 @@ class ImportFormOptions extends Component {
const items = [
{
com: DataCollectionDatePicker({
label: "薪资所属月",
label: getLabel(111, "薪资所属月"),
value: salaryYearMonth,
onChange: this.screenChange,
key: "salaryYearMonth",
@ -37,15 +38,15 @@ class ImportFormOptions extends Component {
},
{
com: DataCollectionSelect({
label: "薪资账套",
label: getLabel(111, "薪资账套"),
value: salarySobId || "",
onChange: this.screenChange,
options: [{ key: "", showname: "" }, ...salarySobList],
key: "salarySobId"
})
},
{ com: Input("薪资周期", salaryCycle) },
{ com: Input("考勤周期", attendCycle, 10, 14) }
{ com: Input(getLabel(111, "薪资周期"), salaryCycle) },
{ com: Input(getLabel(111, "考勤周期"), attendCycle, 10, 14) }
];
return (
<WeaSearchGroup className="attendanceFormWrapper" showGroup needTigger={false} items={items}

View File

@ -7,12 +7,13 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { Button, DatePicker } from "antd";
import { WeaFormItem, WeaNewScroll, WeaTab } from "ecCom";
import { WeaFormItem, WeaNewScroll, WeaTab, WeaLocaleProvider } from "ecCom";
import AttendanceDataComp from "./components/attendanceDataComp";
import FieldMangComp from "./components/fieldMangComp";
import moment from "moment";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const { MonthPicker } = DatePicker;
@inject("taxAgentStore")
@ -36,7 +37,7 @@ class Index extends Component {
getAttendanceDataScreen = () => {
const { salaryMonth } = this.state;
const [value1 = "", value2 = ""] = salaryMonth;
return <WeaFormItem label="薪资所属月" labelCol={{ span: 2 }} wrapperCol={{ span: 22 }}>
return <WeaFormItem label={getLabel(111, "薪资所属月")} labelCol={{ span: 2 }} wrapperCol={{ span: 22 }}>
<MonthPicker
value={value1} format="YYYY-MM"
disabledDate={(current) => {
@ -44,7 +45,7 @@ class Index extends Component {
}}
onChange={(val) => this.handleChangeSalaryMonth([val ? moment(val).format("YYYY-MM") : "", value2])}
/>
<span className="to"></span>
<span className="to">{getLabel(111, "")}</span>
<MonthPicker
value={value2} format="YYYY-MM"
disabledDate={(current) => {
@ -64,7 +65,7 @@ class Index extends Component {
};
handleQuoteAttendanceData = () => {
this.attendanceTableRef.handleQuoteAttendanceData({
visible: true, title: "引用考勤数据"
visible: true, title: getLabel(111, "引用考勤数据")
});
};
@ -72,18 +73,18 @@ class Index extends Component {
const { selectedKey, salaryMonth, fieldName } = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
const topTab = [
{ title: "考勤数据", viewcondition: "DATA" },
{ title: "字段管理", viewcondition: "FIELD" }
{ title: getLabel(111, "考勤数据"), viewcondition: "DATA" },
{ title: getLabel(111, "字段管理"), viewcondition: "FIELD" }
];
const buttons = selectedKey === "DATA" ? [
<Button type="primary" onClick={this.handleQuoteAttendanceData}>引用</Button>,
<Button type="ghost" onClick={this.handleImportAttendanceData}>导入</Button>
] : [<Button type="primary" onClick={this.handleAddAttendFileds}>新建</Button>];
<Button type="primary" onClick={this.handleQuoteAttendanceData}>{getLabel(111, "引用")}</Button>,
<Button type="ghost" onClick={this.handleImportAttendanceData}>{getLabel(111, "导入")}</Button>
] : [<Button type="primary" onClick={this.handleAddAttendFileds}>{getLabel(111, "新建")}</Button>];
return (
<div className="attendanceRefWrapper">
<WeaTab
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
searchType={selectedKey === "FIELD" ? ["base"] : []} searchsBasePlaceHolder="请输入字段名称"
searchType={selectedKey === "FIELD" ? ["base"] : []} searchsBasePlaceHolder={getLabel(111, "请输入字段名称")}
onChange={v => this.setState({ selectedKey: v })}
searchsBaseValue={fieldName} onSearchChange={fieldName => this.setState({ fieldName })}
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}

View File

@ -5,12 +5,13 @@
* Date: 2023/2/20
*/
import React, { Component } from "react";
import { WeaSearchGroup } from "ecCom";
import { WeaSearchGroup, WeaLocaleProvider } from "ecCom";
import UnifiedTable from "../../../components/UnifiedTable";
import { getTableRecordDate } from "../../../apis/cumDeduct";
import { DataCollectionDateRangePick, DataCollectionSelect, Input } from "../cumDeduct";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class TableRecord extends Component {
constructor(props) {
super(props);
@ -123,7 +124,7 @@ class TableRecord extends Component {
};
const pagination = {
...pageInfo,
showTotal: (total) => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
pageSizeOptions: ["10", "20", "50", "100"],
showSizeChanger: true,
showQuickJumper: true,
@ -152,7 +153,7 @@ class TableRecord extends Component {
},
{
com: DataCollectionDateRangePick({
label: "税款所属期",
label: getLabel(111, "税款所属期"),
range: recordPayload[screenParams[screenParams.length - 1]] || [],
onChange: this.handleTablerecordScreen,
key: screenParams[screenParams.length - 1]
@ -160,9 +161,9 @@ class TableRecord extends Component {
},
{
com: DataCollectionSelect({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
value: !_.isNil(recordPayload.taxAgentId) ? recordPayload.taxAgentId.toString() : "",
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption],
onChange: this.handleTablerecordScreen,
key: "taxAgentId"
})

View File

@ -1,66 +1,69 @@
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const columns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "title",
key: "title"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "title",
key: "title"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "title",
key: "title"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "title",
key: "title"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "title",
key: "title"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "title",
key: "title"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "title",
key: "title"
},
{
title: "累计子女教育",
title: getLabel(111, "累计子女教育"),
dataIndex: "title",
key: "title"
},
{
title: "累计继续教育",
title: getLabel(111, "累计继续教育"),
dataIndex: "title",
key: "title"
},
{
title: "累计住房贷款利息",
title: getLabel(111, "累计住房贷款利息"),
dataIndex: "title",
key: "title"
},
{
title: "累计住房租金",
title: getLabel(111, "累计住房租金"),
dataIndex: "title",
key: "title"
},
{
title: "累计赡养老人",
title: getLabel(111, "累计赡养老人"),
dataIndex: "title",
key: "title"
},
{
title: "操作",
title: getLabel(111, "操作"),
dataIndex: "title",
key: "title"
}
@ -69,323 +72,323 @@ export const columns = [
export const modalColumns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "username",
key: "username"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "taxAgentName",
key: "taxAgentName"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "departmentName",
key: "departmentName"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "mobile",
key: "mobile"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "jobNum",
key: "jobNum"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "idNo",
key: "idNo"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "hiredate",
key: "hiredate"
},
{
title: "累计子女教育",
title: getLabel(111, "累计子女教育"),
dataIndex: "addUpChildEducation",
key: "addUpChildEducation"
},
{
title: "累计继续教育",
title: getLabel(111, "累计继续教育"),
dataIndex: "addUpContinuingEducation",
key: "addUpContinuingEducation"
},
{
title: "累计住房贷款利息",
title: getLabel(111, "累计住房贷款利息"),
dataIndex: "addUpHousingLoanInterest",
key: "addUpHousingLoanInterest"
},
{
title: "累计住房租金",
title: getLabel(111, "累计住房租金"),
dataIndex: "addUpHousingRent",
key: "addUpHousingRent"
},
{
title: "累计赡养老人",
title: getLabel(111, "累计赡养老人"),
dataIndex: "addUpSupportElderly",
key: "addUpSupportElderly"
},
{
title: "累计婴幼儿照护",
title: getLabel(111, "累计婴幼儿照护"),
dataIndex: "addUpInfantCare",
key: "addUpInfantCare"
},
{
title: "累计大病医疗",
title: getLabel(111, "累计大病医疗"),
dataIndex: "addUpIllnessMedical",
key: "addUpIllnessMedical"
}
];
export const specialModalColumns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "username",
key: "username"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "taxAgentName",
key: "taxAgentName"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "departmentName",
key: "departmentName"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "mobile",
key: "mobile"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "jobNum",
key: "jobNum"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "idNo",
key: "idNo"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "hiredate",
key: "hiredate"
},
{
title: "子女教育",
title: getLabel(111, "子女教育"),
dataIndex: "childrenEducation",
key: "childrenEducation"
},
{
title: "继续教育",
title: getLabel(111, "继续教育"),
dataIndex: "continuingEducation",
key: "continuingEducation"
},
{
title: "住房贷款利息",
title: getLabel(111, "住房贷款利息"),
dataIndex: "housingLoanInterest",
key: "housingLoanInterest"
},
{
title: "住房租金",
title: getLabel(111, "住房租金"),
dataIndex: "housingRent",
key: "housingRent"
},
{
title: "赡养老人",
title: getLabel(111, "赡养老人"),
dataIndex: "supportingElder",
key: "supportingElder"
},
{
title: "婴幼儿照护",
title: getLabel(111, "婴幼儿照护"),
dataIndex: "infantCare",
key: "infantCare"
},
{
title: "大病医疗",
title: getLabel(111, "大病医疗"),
dataIndex: "seriousIllnessTreatment",
key: "seriousIllnessTreatment"
}
];
export const otherModalColumns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "username",
key: "username"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "taxAgentName",
key: "taxAgentName"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "departmentName",
key: "departmentName"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "mobile",
key: "mobile"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "jobNum",
key: "jobNum"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "idNo",
key: "idNo"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "hiredate",
key: "hiredate"
},
{
title: "商业健康保险",
title: getLabel(111, "商业健康保险"),
dataIndex: "businessHealthyInsurance",
key: "businessHealthyInsurance"
},
{
title: "税延养老保险",
title: getLabel(111, "税延养老保险"),
dataIndex: "taxDelayEndowmentInsurance",
key: "taxDelayEndowmentInsurance"
},
{
title: "其他",
title: getLabel(111, "其他"),
dataIndex: "otherDeduction",
key: "otherDeduction"
},
{
title: "准予扣除的捐赠额",
title: getLabel(111, "准予扣除的捐赠额"),
dataIndex: "deductionAllowedDonation",
key: "deductionAllowedDonation"
}
];
export const situationModalColumns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "username",
key: "username"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "taxAgentName",
key: "taxAgentName"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "departmentName",
key: "departmentName"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "mobile",
key: "mobile"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "jobNum",
key: "jobNum"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "idNo",
key: "idNo"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "hiredate",
key: "hiredate"
},
{
title: "累计收入额",
title: getLabel(111, "累计收入额"),
dataIndex: "addUpIncome",
key: "addUpIncome"
},
{
title: "累计减除费用",
title: getLabel(111, "累计减除费用"),
dataIndex: "addUpSubtraction",
key: "addUpSubtraction"
},
{
title: "累计社保个人合计",
title: getLabel(111, "累计社保个人合计"),
dataIndex: "addUpSocialSecurityTotal",
key: "addUpSocialSecurityTotal"
},
{
title: "累计公积金个人合计",
title: getLabel(111, "累计公积金个人合计"),
dataIndex: "addUpAccumulationFundTotal",
key: "addUpAccumulationFundTotal"
},
{
title: "累计子女教育",
title: getLabel(111, "累计子女教育"),
dataIndex: "addUpChildEducation",
key: "addUpChildEducation"
},
{
title: "累计继续教育",
title: getLabel(111, "累计继续教育"),
dataIndex: "addUpContinuingEducation",
key: "addUpContinuingEducation"
},
{
title: "累计住房贷款利息",
title: getLabel(111, "累计住房贷款利息"),
dataIndex: "addUpHousingLoanInterest",
key: "addUpHousingLoanInterest"
},
{
title: "累计住房租金",
title: getLabel(111, "累计住房租金"),
dataIndex: "addUpHousingRent",
key: "addUpHousingRent"
},
{
title: "累计赡养老人",
title: getLabel(111, "累计赡养老人"),
dataIndex: "addUpSupportElderly",
key: "addUpSupportElderly"
},
{
title: "累计企业(职业)年金及其他福利",
title: getLabel(111, "累计企业(职业)年金及其他福利"),
dataIndex: "addUpEnterpriseAndOther",
key: "addUpEnterpriseAndOther"
},
{
title: "累计其他免税扣除",
title: getLabel(111, "累计其他免税扣除"),
dataIndex: "addUpOtherDeduction",
key: "addUpOtherDeduction"
},
{
title: "累计免税收入",
title: getLabel(111, "累计免税收入"),
dataIndex: "addUpTaxExemptIncome",
key: "addUpTaxExemptIncome"
},
{
title: "累计准予扣除的捐赠额",
title: getLabel(111, "累计准予扣除的捐赠额"),
dataIndex: "addUpAllowedDonation",
key: "addUpAllowedDonation"
},
{
title: "累计减免税额",
title: getLabel(111, "累计减免税额"),
dataIndex: "addUpTaxSavings",
key: "addUpTaxSavings"
},
{
title: "累计已预扣预缴税额",
title: getLabel(111, "累计已预扣预缴税额"),
dataIndex: "addUpAdvanceTax",
key: "addUpAdvanceTax"
},
{
title: "累计婴幼儿照护",
title: getLabel(111, "累计婴幼儿照护"),
dataIndex: "addUpInfantCare",
key: "addUpInfantCare"
},
{
title: "累计大病医疗",
title: getLabel(111, "累计大病医疗"),
dataIndex: "addUpIllnessMedical",
key: "addUpIllnessMedical"
}
@ -402,7 +405,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpChildEducation"],
fieldcol: 14,
label: "累计子女教育",
label: getLabel(111, "累计子女教育"),
labelcol: 8,
value: "",
viewAttr: 2
@ -411,7 +414,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpContinuingEducation"],
fieldcol: 14,
label: "累计继续教育",
label: getLabel(111, "累计继续教育"),
labelcol: 8,
value: "",
viewAttr: 2
@ -420,7 +423,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpHousingLoanInterest"],
fieldcol: 14,
label: "累计住房贷款利息",
label: getLabel(111, "累计住房贷款利息"),
labelcol: 8,
value: "",
viewAttr: 2
@ -429,7 +432,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpHousingRent"],
fieldcol: 14,
label: "累计住房租金",
label: getLabel(111, "累计住房租金"),
labelcol: 8,
value: "",
viewAttr: 2
@ -438,7 +441,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpSupportElderly"],
fieldcol: 14,
label: "累计赡养老人",
label: getLabel(111, "累计赡养老人"),
labelcol: 8,
value: "",
viewAttr: 2
@ -447,7 +450,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpIllnessMedical"],
fieldcol: 14,
label: "累计大病医疗",
label: getLabel(111, "累计大病医疗"),
labelcol: 8,
value: "",
viewAttr: 2
@ -456,13 +459,13 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpInfantCare"],
fieldcol: 14,
label: "累计婴幼儿照护",
label: getLabel(111, "累计婴幼儿照护"),
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: '数据采集',
title: getLabel(111, "数据采集"),
defaultshow: true
}
];

View File

@ -5,9 +5,11 @@
* Date: 2023/2/20
*/
import React, { Component } from "react";
import { WeaSearchGroup } from "ecCom";
import { WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { DataCollectionDatePicker, DataCollectionSelect } from "../index";
const getLabel = WeaLocaleProvider.getLabel;
class ImportFormCom extends Component {
screenChange = ({ key, value }) => {
const { onChangeImportForm } = this.props;
@ -19,7 +21,7 @@ class ImportFormCom extends Component {
const items = [
{
com: DataCollectionDatePicker({
label: "税款所属期",
label: getLabel(111, "税款所属期"),
value: declareMonth,
onChange: this.screenChange,
key: "declareMonth",
@ -28,10 +30,10 @@ class ImportFormCom extends Component {
},
{
com: DataCollectionSelect({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
value: taxAgentId || "",
onChange: this.screenChange,
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption],
key: "taxAgentId"
})
}

View File

@ -1,6 +1,14 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDatePicker, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom";
import {
WeaDatePicker,
WeaFormItem,
WeaHelpfulTip,
WeaInput,
WeaLocaleProvider,
WeaSearchGroup,
WeaSelect
} from "ecCom";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import {
autoAddAll,
@ -23,6 +31,8 @@ import { convertToUrlString } from "../../../util/url";
import Layout from "../layout";
import moment from "moment";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore", "cumDeductStore")
@observer
class Index extends Component {
@ -77,10 +87,10 @@ class Index extends Component {
autoAddAll({ yearMonth: declareMonth }).then(({ status, data, errormsg }) => {
this.setState({ addAllLoading: false });
if (status) {
message.success(data || "操作成功");
message.success(data || getLabel(111, "操作成功"));
this.tableRef.getTableDate();
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
}).catch(() => this.setState({ addAllLoading: false }));
};
@ -109,15 +119,15 @@ class Index extends Component {
const { declareMonth, taxAgentId } = this.state;
const payload = { declareMonth, taxAgentId };
Modal.confirm({
title: "信息确认",
content: `确定清空税款所属期为${declareMonth}的所有累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: `${getLabel(111, "确定清空税款所属期为")}${declareMonth}${getLabel(111, "的所有累计专项附加扣除数据吗")}?${getLabel(111, "若数据已参与核算")}${getLabel(111, "已参与核算的数据不会受影响")}${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}`,
onOk: () => {
deleteAllAddUpDeduction(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -134,22 +144,22 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { id, departmentName, username } = record;
if (ids.length === 0 && !id) {
message.warning("请选择表格数据");
message.warning(getLabel(111, "请选择表格数据"));
return;
}
const payload = { declareMonth, ids: !id ? ids : [id] };
Modal.confirm({
title: "信息确认",
content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" :
`确定删除${departmentName}${username}税款所属期:${declareMonth}的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") :
`${getLabel(111, "确定删除")}${departmentName}${username}${getLabel(111, "税款所属期")}:${declareMonth}${getLabel(111, "的累计专项附加扣除数据吗")}?${getLabel(111, "若数据已参与核算")}${getLabel(111, "已参与核算的数据不会受影响")}${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}`,
onOk: () => {
deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
this.tableRef.handleClearRows();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -179,7 +189,7 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
message.warning(getLabel(111, "请选择需要导出的数据"));
return;
}
this.setState({
@ -218,7 +228,7 @@ class Index extends Component {
importPayload: { ...importPayload, slideDataSource: preview }
});
} else {
message.error(errormsg || "预览失败");
message.error(errormsg || getLabel(111, "预览失败"));
}
});
};
@ -237,22 +247,22 @@ class Index extends Component {
editAddUpDeduction({ ...payload, id }).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("编辑成功");
message.success(getLabel(111, "编辑成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "编辑失败");
message.error(errormsg || getLabel(111, "编辑失败"));
}
});
} else {
createAddUpDeduction(payload).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("新增成功");
message.success(getLabel(111, "新增成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "新增失败");
message.error(errormsg || getLabel(111, "新增失败"));
}
});
}
@ -263,8 +273,8 @@ class Index extends Component {
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v);
if (!bool) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -281,7 +291,7 @@ class Index extends Component {
* Params: screenParams规则日期必须放在数组最后一位人员信息必须第一位
* Date: 2023/2/20
*/
handleAddData = (title = "新建", editId = {}) => {
handleAddData = (title = getLabel(111, "新建"), editId = {}) => {
const { taxAgentStore, cumDeductStore: { addForm } } = this.props;
const { slidePayload } = this.state;
const { taxAgentOption } = taxAgentStore;
@ -320,7 +330,7 @@ class Index extends Component {
handleTableOperate = ({ key }, record) => {
const { id } = record;
key === "handleAddData" ? getAddUpDeduction({ id }).then(({ status, data }) => {
if (status) this[key]("编辑", data);
if (status) this[key](getLabel(111, "编辑"), data);
}) : this[key](record);
};
handleCloseSlide = () => {
@ -349,7 +359,7 @@ class Index extends Component {
const items = [
{
com: DataCollectionDatePicker({
label: "税款所属期",
label: getLabel(111, "税款所属期"),
value: declareMonth,
onChange: this.screenChange,
key: "declareMonth"
@ -357,10 +367,10 @@ class Index extends Component {
},
{
com: DataCollectionSelect({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
value: taxAgentId,
onChange: this.screenChange,
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption],
key: "taxAgentId"
})
}
@ -385,20 +395,20 @@ class Index extends Component {
getTopBtns = () => {
const { addAllLoading } = this.state;
return [
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
<Button type="ghost" loading={addAllLoading} onClick={this.autoAddAll}>一键累计</Button>,
<Button type="primary" onClick={this.handleOpenImport}>{getLabel(111, "导入")}</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>{getLabel(111, "新建")}</Button>,
<Button type="ghost" loading={addAllLoading} onClick={this.autoAddAll}>{getLabel(111, "一键累计")}</Button>,
<Dropdown
overlay={
<Menu className="dropdownMenuWrapper" onClick={this.handleDataMenuClick}>
<Menu.Item key="deleteSelectAddUpDeduction">批量删除</Menu.Item>
<Menu.Item key="deleteAllAddUpDeduction">一键清空</Menu.Item>
<Menu.Item key="handleExportSelect">导出选中</Menu.Item>
<Menu.Item key="handleExportAll">导出全部</Menu.Item>
<Menu.Item key="deleteSelectAddUpDeduction">{getLabel(111, "批量删除")}</Menu.Item>
<Menu.Item key="deleteAllAddUpDeduction">{getLabel(111, "一键清空")}</Menu.Item>
<Menu.Item key="handleExportSelect">{getLabel(111, "导出选中")}</Menu.Item>
<Menu.Item key="handleExportAll">{getLabel(111, "导出全部")}</Menu.Item>
</Menu>
}
>
<Button type="ghost">更多</Button>
<Button type="ghost">{getLabel(111, "更多")}</Button>
</Dropdown>
];
};
@ -414,10 +424,10 @@ class Index extends Component {
<Dropdown.Button onClick={this.handleExportAllDetail}
overlay={<Menu
onClick={this.handleExportSelectDetail}>
<Menu.Item key="1">导出选中</Menu.Item>
<Menu.Item key="1">{getLabel(111, "导出选中")}</Menu.Item>
</Menu>}
type="primary">
导出全部
{getLabel(111, "导出全部")}
</Dropdown.Button>
];
};
@ -439,7 +449,7 @@ class Index extends Component {
handleExportSelectDetail = () => {
const { selectedRowKeys: ids, recordPayload } = this.tableRecordRef.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
message.warning(getLabel(111, "请选择需要导出的数据"));
return;
}
const exportParams = _.reduce(_.keys(_.omitBy(recordPayload, it => !it)), (pre, cur) => pre + `${pre && "&"}${cur}=${recordPayload[cur]}`, "");
@ -506,7 +516,7 @@ class Index extends Component {
} = this.state;
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
return (
<Layout title="累计专项附加扣除" btns={this.getTopBtns()} leftComp={this.getScreen()}
<Layout title={getLabel(111, "累计专项附加扣除")} btns={this.getTopBtns()} leftComp={this.getScreen()}
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
@ -523,7 +533,7 @@ class Index extends Component {
payload={tablePayload}
showOperateBtn={showOperateBtn}
onTableOperate={this.handleTableOperate}
onViewDetails={(record) => this.handleAddData("累计专项附加扣除记录", record)}
onViewDetails={(record) => this.handleAddData(getLabel(111, "累计专项附加扣除记录"), record)}
form={form}
/>
</Layout>
@ -536,7 +546,7 @@ export default Index;
export const DataCollectionDatePicker = (props) => {
const {
value, label, onChange, format = "YYYY-MM", key, screen = true,
tip = "提示:默认显示本年截至当前月所有员工申报的累计专项附加及其他扣除额",
tip = getLabel(111, "提示:默认显示本年截至当前月所有员工申报的累计专项附加及其他扣除额"),
labelCol = 8, wrapperCol = 16
} = props;
return <WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
@ -568,7 +578,7 @@ export const DataCollectionDateRangePick = (props) => {
return current && value2 && current.getTime() > new Date(value2).getTime();
}}
/>
<span className="to"></span>
<span className="to">{getLabel(111, "")}</span>
<WeaDatePicker
value={value2} onChange={(val) => onChange({ key, value: [value1, val] })} format={format}
disabledDate={(current) => {

View File

@ -1,66 +1,69 @@
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const columns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "title",
key: "title"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "title",
key: "title"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "title",
key: "title"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "title",
key: "title"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "title",
key: "title"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "title",
key: "title"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "title",
key: "title"
},
{
title: "累计子女教育",
title: getLabel(111, "累计子女教育"),
dataIndex: "title",
key: "title"
},
{
title: "累计继续教育",
title: getLabel(111, "累计继续教育"),
dataIndex: "title",
key: "title"
},
{
title: "累计住房贷款利息",
title: getLabel(111, "累计住房贷款利息"),
dataIndex: "title",
key: "title"
},
{
title: "累计住房租金",
title: getLabel(111, "累计住房租金"),
dataIndex: "title",
key: "title"
},
{
title: "累计赡养老人",
title: getLabel(111, "累计赡养老人"),
dataIndex: "title",
key: "title"
},
{
title: "操作",
title: getLabel(111, "操作"),
dataIndex: "title",
key: "title"
}
@ -72,7 +75,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpIncome"],
fieldcol: 14,
label: "累计收入额",
label: getLabel(111, "累计收入额"),
labelcol: 8,
value: "",
viewAttr: 2
@ -81,7 +84,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpSubtraction"],
fieldcol: 14,
label: "累计减除费用",
label: getLabel(111, "累计减除费用"),
labelcol: 8,
value: "",
viewAttr: 2
@ -90,7 +93,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpSocialSecurityTotal"],
fieldcol: 14,
label: "累计社保个人合计",
label: getLabel(111, "累计社保个人合计"),
labelcol: 8,
value: "",
viewAttr: 2
@ -99,7 +102,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpAccumulationFundTotal"],
fieldcol: 14,
label: "累计公积金个人合计",
label: getLabel(111, "累计公积金个人合计"),
labelcol: 8,
value: "",
viewAttr: 2
@ -108,7 +111,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpChildEducation"],
fieldcol: 14,
label: "累计子女教育",
label: getLabel(111, "累计子女教育"),
labelcol: 8,
value: "",
viewAttr: 2
@ -117,7 +120,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpContinuingEducation"],
fieldcol: 14,
label: "累计继续教育",
label: getLabel(111, "累计继续教育"),
labelcol: 8,
value: "",
viewAttr: 2
@ -126,7 +129,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpHousingLoanInterest"],
fieldcol: 14,
label: "累计住房贷款利息",
label: getLabel(111, "累计住房贷款利息"),
labelcol: 8,
value: "",
viewAttr: 2
@ -135,7 +138,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpHousingRent"],
fieldcol: 14,
label: "累计住房租金",
label: getLabel(111, "累计住房租金"),
labelcol: 8,
value: "",
viewAttr: 2
@ -144,7 +147,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpSupportElderly"],
fieldcol: 14,
label: "累计赡养老人",
label: getLabel(111, "累计赡养老人"),
labelcol: 8,
value: "",
viewAttr: 2
@ -153,7 +156,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpIllnessMedical"],
fieldcol: 14,
label: "累计大病医疗",
label: getLabel(111, "累计大病医疗"),
labelcol: 8,
value: "",
viewAttr: 2
@ -162,7 +165,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpEnterpriseAndOther"],
fieldcol: 14,
label: "累计企业(职业)年金及其他福利",
label: getLabel(111, "累计企业(职业)年金及其他福利"),
labelcol: 8,
value: "",
viewAttr: 2
@ -171,7 +174,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpOtherDeduction"],
fieldcol: 14,
label: "累计其他免税扣除",
label: getLabel(111, "累计其他免税扣除"),
labelcol: 8,
value: "",
viewAttr: 2
@ -180,7 +183,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpTaxExemptIncome"],
fieldcol: 14,
label: "累计免税收入",
label: getLabel(111, "累计免税收入"),
labelcol: 8,
value: "",
viewAttr: 2
@ -189,7 +192,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpAllowedDonation"],
fieldcol: 14,
label: "累计准予扣除的捐赠额",
label: getLabel(111, "累计准予扣除的捐赠额"),
labelcol: 8,
value: "",
viewAttr: 2
@ -198,7 +201,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpTaxSavings"],
fieldcol: 14,
label: "累计减免税额",
label: getLabel(111, "累计减免税额"),
labelcol: 8,
value: "",
viewAttr: 2
@ -207,7 +210,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpAdvanceTax"],
fieldcol: 14,
label: "累计已预扣预缴税额",
label: getLabel(111, "累计已预扣预缴税额"),
labelcol: 8,
value: "",
viewAttr: 2
@ -216,63 +219,63 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["addUpInfantCare"],
fieldcol: 14,
label: "累计婴幼儿照护",
label: getLabel(111, "累计婴幼儿照护"),
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: "数据采集",
title: getLabel(111, "数据采集"),
defaultshow: true
}
];
export const taxOptions = [
{
key: "01",
showname: "一月"
showname: getLabel(111, "一月")
},
{
key: "02",
showname: "二月"
showname: getLabel(111, "二月")
},
{
key: "03",
showname: "三月"
showname: getLabel(111, "三月")
},
{
key: "04",
showname: "四月"
showname: getLabel(111, "四月")
},
{
key: "05",
showname: "五月"
showname: getLabel(111, "五月")
},
{
key: "06",
showname: "六月"
showname: getLabel(111, "六月")
},
{
key: "07",
showname: "七月"
showname: getLabel(111, "七月")
},
{
key: "08",
showname: "八月"
showname: getLabel(111, "八月")
},
{
key: "09",
showname: "九月"
showname: getLabel(111, "九月")
},
{
key: "10",
showname: "十月"
showname: getLabel(111, "十月")
},
{
key: "11",
showname: "十一月"
showname: getLabel(111, "十一月")
},
{
key: "12",
showname: "十二月"
showname: getLabel(111, "十二月")
}
];

View File

@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaSearchGroup } from "ecCom";
import { WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import {
createAddUpSituation,
@ -30,6 +30,8 @@ import TableRecord from "../components/tableRecord";
import { situationModalColumns } from "../cumDeduct/columns";
import { convertToUrlString } from "../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore", "cumSituationStore")
@observer
class Index extends Component {
@ -102,22 +104,22 @@ class Index extends Component {
editAddUpSituation({ ...payload, id }).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("编辑成功");
message.success(getLabel(111, "编辑成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "编辑失败");
message.error(errormsg || getLabel(111, "编辑失败"));
}
});
} else {
createAddUpSituation(payload).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("新增成功");
message.success(getLabel(111, "新增成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "新增失败");
message.error(errormsg || getLabel(111, "新增失败"));
}
});
}
@ -158,7 +160,7 @@ class Index extends Component {
importPayload: { ...importPayload, slideDataSource: preview }
});
} else {
message.error(errormsg || "预览失败");
message.error(errormsg || getLabel(111, "预览失败"));
}
});
};
@ -171,7 +173,7 @@ class Index extends Component {
handleTableOperate = ({ key }, record) => {
const { id } = record;
key === "handleAddData" ? getAddUpSituation({ id }).then(({ status, data }) => {
if (status) this[key]("编辑", data);
if (status) this[key](getLabel(111, "编辑"), data);
}) : this.deleteSelectAddUpSituation(record);
};
/*
@ -180,7 +182,7 @@ class Index extends Component {
* Params: screenParams规则日期必须放在数组最后一位人员信息必须第一位
* Date: 2023/2/20
*/
handleAddData = (title = "新建", editId = {}) => {
handleAddData = (title = getLabel(111, "新建"), editId = {}) => {
const { taxAgentStore, cumSituationStore: { addForm } } = this.props;
const { slidePayload } = this.state;
const { taxAgentOption } = taxAgentStore;
@ -223,15 +225,15 @@ class Index extends Component {
taxYearMonth: year + "-" + declareMonth
};
Modal.confirm({
title: "信息确认",
content: `确定清空税款所属期为${year}-${declareMonth}的所有往期累计情况的数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: `${getLabel(111, "确定清空税款所属期为")}${year}-${declareMonth}${getLabel(111, "的所有往期累计情况的数据吗")}?${declareMonth}${getLabel(111, "若数据已参与核算")}${getLabel(111, "已参与核算的数据不会受影响")}${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}`,
onOk: () => {
deleteAllAddUpSituation(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -248,7 +250,7 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { id, departmentName, username } = record;
if (ids.length === 0 && !id) {
message.warning("请选择表格数据");
message.warning(getLabel(111, "请选择表格数据"));
return;
}
const payload = {
@ -256,17 +258,17 @@ class Index extends Component {
ids: !id ? ids : [id]
};
Modal.confirm({
title: "信息确认",
content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" :
`确定删除${departmentName}${username}税款所属期:${declareMonth}的往期累计情况数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") :
`${getLabel(111, "确定删除")}${departmentName}${username}${getLabel(111, "税款所属期")}:${declareMonth}${getLabel(111, "的往期累计情况数据吗")}?${getLabel(111, "若数据已参与核算")}${getLabel(111, "已参与核算的数据不会受影响")}${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}`,
onOk: () => {
deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
this.tableRef.handleClearRows();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -296,7 +298,7 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { declareMonth, taxAgentId, year, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
message.warning(getLabel(111, "请选择需要导出的数据"));
return;
}
this.setState({
@ -313,19 +315,19 @@ class Index extends Component {
getTopBtns = () => {
const { addAllLoading } = this.state;
return [
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
<Button type="primary" onClick={this.handleOpenImport}>{getLabel(111, "导入")}</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>{getLabel(111, "新建")}</Button>,
<Dropdown
overlay={
<Menu className="dropdownMenuWrapper" onClick={this.handleDataMenuClick}>
<Menu.Item key="deleteSelectAddUpSituation">批量删除</Menu.Item>
<Menu.Item key="deleteAllAddUpSituation">一键清空</Menu.Item>
<Menu.Item key="handleExportSelect">导出选中</Menu.Item>
<Menu.Item key="handleExportAll">导出全部</Menu.Item>
<Menu.Item key="deleteSelectAddUpSituation">{getLabel(111, "批量删除")}</Menu.Item>
<Menu.Item key="deleteAllAddUpSituation">{getLabel(111, "一键清空")}</Menu.Item>
<Menu.Item key="handleExportSelect">{getLabel(111, "导出选中")}</Menu.Item>
<Menu.Item key="handleExportAll">{getLabel(111, "导出全部")}</Menu.Item>
</Menu>
}
>
<Button type="ghost">更多</Button>
<Button type="ghost">{getLabel(111, "更多")}</Button>
</Dropdown>
];
};
@ -342,19 +344,19 @@ class Index extends Component {
const items = [
{
com: DataCollectionDatePicker({
label: "纳税年度",
label: getLabel(111, "纳税年度"),
value: year,
onChange: this.screenChange,
key: "year",
format: "YYYY",
tip: "提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额",
tip: getLabel(111, "提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额"),
labelCol: 11,
wrapperCol: 13
})
},
{
com: DataCollectionSelect({
label: "税款所属期",
label: getLabel(111, "税款所属期"),
value: declareMonth,
onChange: this.screenChange,
options: taxOptions,
@ -365,10 +367,10 @@ class Index extends Component {
},
{
com: DataCollectionSelect({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
value: taxAgentId,
onChange: this.screenChange,
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption],
key: "taxAgentId",
labelCol: 16,
wrapperCol: 8
@ -406,8 +408,8 @@ class Index extends Component {
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v);
if (!bool) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -473,10 +475,10 @@ class Index extends Component {
<Dropdown.Button onClick={this.handleExportAllDetail}
overlay={<Menu
onClick={this.handleExportSelectDetail}>
<Menu.Item key="1">导出选中</Menu.Item>
<Menu.Item key="1">{getLabel(111, "导出选中")}</Menu.Item>
</Menu>}
type="primary">
导出全部
{getLabel(111, "导出全部")}
</Dropdown.Button>
];
};
@ -498,7 +500,7 @@ class Index extends Component {
handleExportSelectDetail = () => {
const { selectedRowKeys: ids, recordPayload } = this.tableRecordRef.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
message.warning(getLabel(111, "请选择需要导出的数据"));
return;
}
const exportParams = _.reduce(_.keys(_.omitBy(recordPayload, it => !it)), (pre, cur) => pre + `${pre && "&"}${cur}=${recordPayload[cur]}`, "");
@ -520,7 +522,7 @@ class Index extends Component {
} = this.state;
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
return (
<Layout title="往期累计情况(工资、薪金)" btns={this.getTopBtns()} leftComp={this.getScreen()}
<Layout title={getLabel(111, "往期累计情况(工资、薪金)")} btns={this.getTopBtns()} leftComp={this.getScreen()}
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
@ -538,7 +540,7 @@ class Index extends Component {
payload={tablePayload}
showOperateBtn={showOperateBtn}
onTableOperate={this.handleTableOperate}
onViewDetails={(record) => this.handleAddData("往期累计情况(工资、薪金)记录", record)}
onViewDetails={(record) => this.handleAddData(getLabel(111, "往期累计情况(工资、薪金)记录"), record)}
form={form}
/>
</Layout>

View File

@ -8,6 +8,9 @@ import React, { Component } from "react";
import UnifiedTable from "../../components/UnifiedTable";
import { getTableDate } from "../../apis/cumDeduct";
import { Menu, Popover } from "antd";
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class DataTables extends Component {
constructor(props) {
@ -63,7 +66,7 @@ class DataTables extends Component {
};
const pagination = {
...pageInfo,
showTotal: (total) => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
pageSizeOptions: ["10", "20", "50", "100"],
showSizeChanger: true,
showQuickJumper: true,
@ -106,15 +109,15 @@ class DataTables extends Component {
{
!isSpecial &&
<React.Fragment>
<a href="javaScript:void(0);" onClick={() => onViewDetails(record)}>查看明细</a>
<a href="javaScript:void(0);" onClick={() => onViewDetails(record)}>{getLabel(111, "查看明细")}</a>
{
showOperateBtn &&
<Popover
overlayClassName="moreIconWrapper"
placement="bottomRight"
content={<Menu onClick={(e) => onTableOperate(e, record)}>
<Menu.Item key="handleAddData">编辑</Menu.Item>
<Menu.Item key="deleteSelectAddUpDeduction">删除</Menu.Item>
<Menu.Item key="handleAddData">{getLabel(111, "编辑")}</Menu.Item>
<Menu.Item key="deleteSelectAddUpDeduction">{getLabel(111, "删除")}</Menu.Item>
</Menu>} title="">
<i className="icon-coms-more"/>
</Popover>
@ -128,9 +131,9 @@ class DataTables extends Component {
showOperateBtn &&
<React.Fragment>
<a href="javaScript:void(0);"
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>{getLabel(111, "编辑")}</a>
<a href="javaScript:void(0);"
onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除</a>
onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>{getLabel(111, "删除")}</a>
</React.Fragment>
}
</React.Fragment>

View File

@ -1,66 +1,69 @@
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const columns = [
{
title: "姓名",
title: getLabel(111, "姓名"),
dataIndex: "title",
key: "title"
},
{
title: "个税扣缴义务人",
title: getLabel(111, "个税扣缴义务人"),
dataIndex: "title",
key: "title"
},
{
title: "部门",
title: getLabel(111, "部门"),
dataIndex: "title",
key: "title"
},
{
title: "手机号",
title: getLabel(111, "手机号"),
dataIndex: "title",
key: "title"
},
{
title: "工号",
title: getLabel(111, "工号"),
dataIndex: "title",
key: "title"
},
{
title: "证件号码",
title: getLabel(111, "证件号码"),
dataIndex: "title",
key: "title"
},
{
title: "入职日期",
title: getLabel(111, "入职日期"),
dataIndex: "title",
key: "title"
},
{
title: "累计子女教育",
title: getLabel(111, "累计子女教育"),
dataIndex: "title",
key: "title"
},
{
title: "累计继续教育",
title: getLabel(111, "累计继续教育"),
dataIndex: "title",
key: "title"
},
{
title: "累计住房贷款利息",
title: getLabel(111, "累计住房贷款利息"),
dataIndex: "title",
key: "title"
},
{
title: "累计住房租金",
title: getLabel(111, "累计住房租金"),
dataIndex: "title",
key: "title"
},
{
title: "累计赡养老人",
title: getLabel(111, "累计赡养老人"),
dataIndex: "title",
key: "title"
},
{
title: "操作",
title: getLabel(111, "操作"),
dataIndex: "title",
key: "title"
}
@ -72,7 +75,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["businessHealthyInsurance"],
fieldcol: 14,
label: "商业健康保险",
label: getLabel(111, "商业健康保险"),
labelcol: 8,
value: "",
viewAttr: 2
@ -81,7 +84,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["taxDelayEndowmentInsurance"],
fieldcol: 14,
label: "税延养老保险",
label: getLabel(111, "税延养老保险"),
labelcol: 8,
value: "",
viewAttr: 2
@ -90,7 +93,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["otherDeduction"],
fieldcol: 14,
label: "其他",
label: getLabel(111, "其他"),
labelcol: 8,
value: "",
viewAttr: 2
@ -99,7 +102,7 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["deductionAllowedDonation"],
fieldcol: 14,
label: "准予扣除的捐赠额",
label: getLabel(111, "准予扣除的捐赠额"),
labelcol: 8,
value: "",
viewAttr: 2
@ -108,13 +111,13 @@ export const dataCollectCondition = [
conditionType: "INPUT",
domkey: ["privatePension"],
fieldcol: 14,
label: "个人养老金",
label: getLabel(111, "个人养老金"),
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: "数据采集",
title: getLabel(111, "数据采集"),
defaultshow: true
}
];

View File

@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaSearchGroup } from "ecCom";
import { WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import {
createData,
@ -31,6 +31,8 @@ import TableRecord from "../components/tableRecord";
import { otherModalColumns } from "../cumDeduct/columns";
import { convertToUrlString } from "../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore", "otherDeductStore")
@observer
class Index extends Component {
@ -100,10 +102,10 @@ class Index extends Component {
extendToLastMonth(payload).then(({ status, data, errormsg }) => {
this.setState({ lastLoading: false });
if (status) {
message.success(data || "操作成功");
message.success(data || getLabel(111, "操作成功"));
this.tableRef.getTableDate();
} else {
message.error(errormsg || "操作失败");
message.error(errormsg || getLabel(111, "操作失败"));
}
}).catch(() => this.setState({ lastLoading: false }));
};
@ -122,22 +124,22 @@ class Index extends Component {
editData({ ...payload, id }).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("编辑成功");
message.success(getLabel(111, "编辑成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "编辑失败");
message.error(errormsg || getLabel(111, "编辑失败"));
}
});
} else {
createData(payload).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("新增成功");
message.success(getLabel(111, "新增成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "新增失败");
message.error(errormsg || getLabel(111, "新增失败"));
}
});
}
@ -173,7 +175,7 @@ class Index extends Component {
importPayload: { ...importPayload, slideDataSource: preview }
});
} else {
message.error(errormsg || "预览失败");
message.error(errormsg || getLabel(111, "预览失败"));
}
});
};
@ -186,7 +188,7 @@ class Index extends Component {
handleTableOperate = ({ key }, record) => {
const { id } = record;
key === "handleAddData" ? getData({ id }).then(({ status, data }) => {
if (status) this[key]("编辑", data);
if (status) this[key](getLabel(111, "编辑"), data);
}) : this.deleteSelectData(record);
};
/*
@ -199,15 +201,15 @@ class Index extends Component {
const { declareMonth, taxAgentId } = this.state;
const payload = { declareMonth, taxAgentId };
Modal.confirm({
title: "信息确认",
content: `确定清空税款所属期为${declareMonth}的所有其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: `${getLabel(111, "确定清空税款所属期为")}${declareMonth}${getLabel(111, "的所有其他免税扣除数据吗")}?${getLabel(111, "若数据已参与核算")}${getLabel(111, "已参与核算的数据不会受影响")}${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}`,
onOk: () => {
deleteAllData(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -224,22 +226,22 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { id, departmentName, username } = record;
if (ids.length === 0 && !id) {
message.warning("请选择表格数据");
message.warning(getLabel(111, "请选择表格数据"));
return;
}
const payload = { declareMonth, ids: !id ? ids : [id] };
Modal.confirm({
title: "信息确认",
content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" :
`确定删除${departmentName}${username}税款所属期:${declareMonth}的其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") :
`${getLabel(111, "确定删除")}${departmentName}${username}${getLabel(111, "税款所属期")}:${declareMonth}${getLabel(111, "的其他免税扣除数据吗")}?${getLabel(111, "若数据已参与核算")}${getLabel(111, "已参与核算的数据不会受影响")}${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}`,
onOk: () => {
deleteSelectData(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
this.tableRef.handleClearRows();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -269,7 +271,7 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
message.warning(getLabel(111, "请选择需要导出的数据"));
return;
}
this.setState({
@ -283,7 +285,7 @@ class Index extends Component {
* Params: screenParams规则日期必须放在数组最后一位人员信息必须第一位
* Date: 2023/2/20
*/
handleAddData = (title = "新建", editId = {}) => {
handleAddData = (title = getLabel(111, "新建"), editId = {}) => {
const { taxAgentStore, otherDeductStore: { addForm } } = this.props;
const { slidePayload } = this.state;
const { taxAgentOption } = taxAgentStore;
@ -322,20 +324,20 @@ class Index extends Component {
getTopBtns = () => {
const { lastLoading } = this.state;
return [
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
<Button type="ghost" loading={lastLoading} onClick={this.extendToLastMonth}>沿用上月</Button>,
<Button type="primary" onClick={this.handleOpenImport}>{getLabel(111, "导入")}</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>{getLabel(111, "新建")}</Button>,
<Button type="ghost" loading={lastLoading} onClick={this.extendToLastMonth}>{getLabel(111, "沿用上月")}</Button>,
<Dropdown
overlay={
<Menu className="dropdownMenuWrapper" onClick={this.handleDataMenuClick}>
<Menu.Item key="deleteSelectData">批量删除</Menu.Item>
<Menu.Item key="deleteAllData">一键清空</Menu.Item>
<Menu.Item key="handleExportSelect">导出选中</Menu.Item>
<Menu.Item key="handleExportAll">导出全部</Menu.Item>
<Menu.Item key="deleteSelectData">{getLabel(111, "批量删除")}</Menu.Item>
<Menu.Item key="deleteAllData">{getLabel(111, "一键清空")}</Menu.Item>
<Menu.Item key="handleExportSelect">{getLabel(111, "导出选中")}</Menu.Item>
<Menu.Item key="handleExportAll">{getLabel(111, "导出全部")}</Menu.Item>
</Menu>
}
>
<Button type="ghost">更多</Button>
<Button type="ghost">{getLabel(111, "更多")}</Button>
</Dropdown>
];
};
@ -352,19 +354,19 @@ class Index extends Component {
const items = [
{
com: DataCollectionDatePicker({
label: "税款所属期",
label: getLabel(111, "税款所属期"),
value: declareMonth,
onChange: this.screenChange,
key: "declareMonth",
tip: "提示:默认显示当前月所有员工申报的其他免税扣除额"
tip: getLabel(111, "提示:默认显示当前月所有员工申报的其他免税扣除额")
})
},
{
com: DataCollectionSelect({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
value: taxAgentId,
onChange: this.screenChange,
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption],
key: "taxAgentId"
})
}
@ -396,8 +398,8 @@ class Index extends Component {
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v);
if (!bool) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -466,10 +468,10 @@ class Index extends Component {
<Dropdown.Button onClick={this.handleExportAllDetail}
overlay={<Menu
onClick={this.handleExportSelectDetail}>
<Menu.Item key="1">导出选中</Menu.Item>
<Menu.Item key="1">{getLabel(111, "导出选中")}</Menu.Item>
</Menu>}
type="primary">
导出全部
{getLabel(111, "导出全部")}
</Dropdown.Button>
];
};
@ -491,7 +493,7 @@ class Index extends Component {
handleExportSelectDetail = () => {
const { selectedRowKeys: ids, recordPayload } = this.tableRecordRef.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
message.warning(getLabel(111, "请选择需要导出的数据"));
return;
}
const exportParams = _.reduce(_.keys(_.omitBy(recordPayload, it => !it)), (pre, cur) => pre + `${pre && "&"}${cur}=${recordPayload[cur]}`, "");
@ -513,7 +515,7 @@ class Index extends Component {
} = this.state;
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
return (
<Layout title="其他免税扣除" btns={this.getTopBtns()} leftComp={this.getScreen()}
<Layout title={getLabel(111, "其他免税扣除")} btns={this.getTopBtns()} leftComp={this.getScreen()}
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
@ -530,7 +532,7 @@ class Index extends Component {
payload={tablePayload}
showOperateBtn={showOperateBtn}
onTableOperate={this.handleTableOperate}
onViewDetails={(record) => this.handleAddData("其他免税扣除记录", record)}
onViewDetails={(record) => this.handleAddData(getLabel(111, "其他免税扣除记录"), record)}
form={form}
/>
</Layout>

View File

@ -1,3 +1,6 @@
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const condition = [
{
items: [
@ -5,7 +8,7 @@ export const condition = [
conditionType: "INPUT",
domkey: ["childrenEducation"],
fieldcol: 14,
label: "子女教育",
label: getLabel(111, "子女教育"),
labelcol: 8,
value: "",
viewAttr: 2
@ -14,7 +17,7 @@ export const condition = [
conditionType: "INPUT",
domkey: ["continuingEducation"],
fieldcol: 14,
label: "继续教育",
label: getLabel(111, "继续教育"),
labelcol: 8,
value: "",
viewAttr: 2
@ -23,7 +26,7 @@ export const condition = [
conditionType: "INPUT",
domkey: ["housingLoanInterest"],
fieldcol: 14,
label: "住房贷款利息",
label: getLabel(111, "住房贷款利息"),
labelcol: 8,
value: "",
viewAttr: 2
@ -32,7 +35,7 @@ export const condition = [
conditionType: "INPUT",
domkey: ["housingRent"],
fieldcol: 14,
label: "住房租金",
label: getLabel(111, "住房租金"),
labelcol: 8,
value: "",
viewAttr: 2
@ -41,7 +44,7 @@ export const condition = [
conditionType: "INPUT",
domkey: ["supportingElder"],
fieldcol: 14,
label: "赡养老人",
label: getLabel(111, "赡养老人"),
labelcol: 8,
value: "",
viewAttr: 2
@ -50,7 +53,7 @@ export const condition = [
conditionType: "INPUT",
domkey: ["seriousIllnessTreatment"],
fieldcol: 14,
label: "大病医疗",
label: getLabel(111, "大病医疗"),
labelcol: 8,
value: "",
viewAttr: 2
@ -59,13 +62,13 @@ export const condition = [
conditionType: "INPUT",
domkey: ["infantCare"],
fieldcol: 14,
label: "婴幼儿照护",
label: getLabel(111, "婴幼儿照护"),
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: "数据采集",
title: getLabel(111, "数据采集"),
defaultshow: true
}
];
@ -77,7 +80,7 @@ export const searchCondition = [
conditionType: "INPUT",
domkey: ["username"],
fieldcol: 16,
label: "姓名",
label: getLabel(111, "姓名"),
labelcol: 8,
value: "",
viewAttr: 2
@ -93,7 +96,7 @@ export const searchCondition = [
dataURL: null,
isSearch: false,
key: "2",
name: "组织结构",
name: getLabel(111, "组织结构"),
selected: false,
showOrder: 0
},
@ -102,12 +105,12 @@ export const searchCondition = [
dataURL: null,
isSearch: true,
key: "1",
name: "按列表",
name: getLabel(111, "按列表"),
selected: false,
showOrder: 0
}
],
title: '部门',
title: getLabel(111, "部门"),
type: "4",
viewAttr: 2,
pageSize: 10,
@ -117,7 +120,7 @@ export const searchCondition = [
iconBgcolor: "#217346"
},
fieldcol: 16,
label: "部门",
label: getLabel(111, "部门"),
labelcol: 8,
value: "",
viewAttr: 2
@ -126,13 +129,13 @@ export const searchCondition = [
conditionType: "INPUT",
domkey: ["jobNum"],
fieldcol: 16,
label: "工号",
label: getLabel(111, "工号"),
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: "常用条件",
title: getLabel(111, "常用条件"),
defaultshow: true
}
];

View File

@ -1,6 +1,6 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaSearchGroup } from "ecCom";
import { WeaSearchGroup, WeaLocaleProvider } from "ecCom";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import DataTables from "../dataTables";
import Layout from "../layout";
@ -23,6 +23,7 @@ import TableRecord from "../components/tableRecord";
import { specialModalColumns } from "../cumDeduct/columns";
import { convertToUrlString } from "../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore", "specialAddStore")
@observer
class Index extends Component {
@ -77,22 +78,22 @@ class Index extends Component {
specialAddDeductionEditData({ ...payload, id }).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("编辑成功");
message.success(getLabel(111, "编辑成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "编辑失败");
message.error(errormsg || getLabel(111, "编辑失败"));
}
});
} else {
specialAddDeductionCreateData(payload).then(({ status, errormsg }) => {
this.setState({ saveLoading: false });
if (status) {
message.success("新增成功");
message.success(getLabel(111, "新增成功"));
this.handleCloseSlide();
this.tableRef.getTableDate();
} else {
message.error(errormsg || "新增失败");
message.error(errormsg || getLabel(111, "新增失败"));
}
});
}
@ -128,7 +129,7 @@ class Index extends Component {
importPayload: { ...importPayload, slideDataSource: preview }
});
} else {
message.error(errormsg || "预览失败");
message.error(errormsg || getLabel(111, "预览失败"));
}
});
};
@ -157,15 +158,15 @@ class Index extends Component {
const { taxAgentId } = this.state;
const payload = { taxAgentId };
Modal.confirm({
title: "信息确认",
content: `确定清空所有专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: getLabel(111, "确定清空所有专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。"),
onOk: () => {
specialAddDeductionDeleteAllData(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -181,22 +182,22 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { id, departmentName, username } = record;
if (ids.length === 0 && !id) {
message.warning("请选择表格数据");
message.warning(getLabel(111, "请选择表格数据"));
return;
}
const payload = { ids: !id ? ids : [id] };
Modal.confirm({
title: "信息确认",
content: !id ? "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。" :
`确定删除${departmentName}${username}的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
title: getLabel(111, "信息确认"),
content: !id ? getLabel(111, "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。") :
`${getLabel(111, "确定删除")}${departmentName}${username}${getLabel(111, "的累计专项附加扣除数据吗")}?${getLabel(111, "若数据已参与核算")}${getLabel(111, "已参与核算的数据不会受影响")}${getLabel(111, "点击核算将会按当前列表最新数据重新核算")}`,
onOk: () => {
specialAddDeductionDeleteSelectData(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.tableRef.getTableDate();
this.tableRef.handleClearRows();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -226,7 +227,7 @@ class Index extends Component {
const { selectedRowKeys: ids } = this.tableRef.state;
const { taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
message.warning(getLabel(111, "请选择需要导出的数据"));
return;
}
this.setState({
@ -246,10 +247,10 @@ class Index extends Component {
const items = [
{
com: DataCollectionSelect({
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
value: taxAgentId,
onChange: this.screenChange,
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
options: [{ key: "", showname: getLabel(111, "全部") }, ...taxAgentOption],
key: "taxAgentId"
})
}
@ -268,19 +269,19 @@ class Index extends Component {
*/
getTopBtns = () => {
return [
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
<Button type="primary" onClick={this.handleOpenImport}>{getLabel(111, "导入")}</Button>,
<Button type="ghost" onClick={() => this.handleAddData()}>{getLabel(111, "新建")}</Button>,
<Dropdown
overlay={
<Menu className="dropdownMenuWrapper" onClick={this.handleDataMenuClick}>
<Menu.Item key="specialAddDeductionDeleteSelectData">批量删除</Menu.Item>
<Menu.Item key="specialAddDeductionDeleteAllData">一键清空</Menu.Item>
<Menu.Item key="handleExportSelect">导出选中</Menu.Item>
<Menu.Item key="handleExportAll">导出全部</Menu.Item>
<Menu.Item key="specialAddDeductionDeleteSelectData">{getLabel(111, "批量删除")}</Menu.Item>
<Menu.Item key="specialAddDeductionDeleteAllData">{getLabel(111, "一键清空")}</Menu.Item>
<Menu.Item key="handleExportSelect">{getLabel(111, "导出选中")}</Menu.Item>
<Menu.Item key="handleExportAll">{getLabel(111, "导出全部")}</Menu.Item>
</Menu>
}
>
<Button type="ghost">更多</Button>
<Button type="ghost">{getLabel(111, "更多")}</Button>
</Dropdown>
];
};
@ -291,7 +292,7 @@ class Index extends Component {
* Params: screenParams规则日期必须放在数组最后一位人员信息必须第一位
* Date: 2023/2/20
*/
handleAddData = (title = "新建", editId = {}) => {
handleAddData = (title = getLabel(111, "新建"), editId = {}) => {
const { taxAgentStore, specialAddStore: { addForm } } = this.props;
const { slidePayload } = this.state;
const { taxAgentOption } = taxAgentStore;
@ -331,7 +332,7 @@ class Index extends Component {
handleTableOperate = ({ key }, record) => {
const { id } = record;
key === "handleAddData" ? getSpecialAddDeduction({ id }).then(({ status, data }) => {
if (status) this[key]("编辑", data);
if (status) this[key](getLabel(111, "编辑"), data);
}) : this.specialAddDeductionDeleteSelectData(record);
};
handleCloseSlide = () => {
@ -354,8 +355,8 @@ class Index extends Component {
const bool = _.every(_.pick(baseInfo, ["taxAgentId", "employeeId"]), v => !!v);
if (!bool) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -424,7 +425,7 @@ class Index extends Component {
} = this.state;
const tablePayload = { taxAgentId };
return (
<Layout title="专项附加扣除" btns={this.getTopBtns()} leftComp={this.getScreen()}
<Layout title={getLabel(111, "专项附加扣除")} btns={this.getTopBtns()} leftComp={this.getScreen()}
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
@ -442,7 +443,7 @@ class Index extends Component {
isSpecial
showOperateBtn={showOperateBtn}
onTableOperate={this.handleTableOperate}
onViewDetails={(record) => this.handleAddData("专项附加扣除记录", record)}
onViewDetails={(record) => this.handleAddData(getLabel(111, "专项附加扣除记录"), record)}
form={advanceForm}
/>
</Layout>

View File

@ -4,9 +4,11 @@ import { inject, observer } from "mobx-react";
import { getQueryString } from "../../util/url";
import * as API from "../../apis/declare";
import { Button } from "antd";
import { WeaLocaleProvider } from "ecCom";
import UnifiedTable from "../../components/UnifiedTable";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
export default class GenerateDeclarationDetail extends React.Component {
@ -86,21 +88,21 @@ export default class GenerateDeclarationDetail extends React.Component {
const renderRightOperation = () => {
return (
<div style={{ display: "inline-block" }}>
<Button type="primary" onClick={this.handleExport}>导出</Button>
<Button type="primary" onClick={this.handleExport}>{getLabel(111, "导出")}</Button>
</div>
);
};
const renderLeftOperation = () => {
return (
<div style={{ display: "inline-block", lineHeight: "47px" }}>
<span>薪资所属月{declareInfo.salaryMonth}</span>
<span style={{ marginLeft: "10px" }}>个税扣缴义务人{declareInfo.taxAgentName}</span>
<span>{getLabel(111, "薪资所属月")}{declareInfo.salaryMonth}</span>
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}{declareInfo.taxAgentName}</span>
</div>
);
};
const pagination = {
...pageInfo,
showTotal: (total) => `${total}`,
showTotal: (total) => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
pageSizeOptions: ["10", "20", "50", "100"],
showSizeChanger: true,
showQuickJumper: true,

View File

@ -1,9 +1,10 @@
import React from "react";
import { WeaDatePicker, WeaDialog, WeaError, WeaFormItem, WeaHelpfulTip, WeaSelect } from "ecCom";
import { WeaDatePicker, WeaDialog, WeaError, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSelect } from "ecCom";
import { Button } from "antd";
import { inject, observer } from "mobx-react";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("declareStore", "taxAgentStore")
@observer
export default class GenerateModal extends React.Component {
@ -55,11 +56,11 @@ export default class GenerateModal extends React.Component {
className="generateWapper"
title={
<span>
<span>申报</span>
<span>{getLabel(111, "申报")}</span>
<WeaHelpfulTip
style={{ marginLeft: 8, position: "relative", top: "-1px" }}
width={200}
title="提示:一个薪资所属月下一个个税扣缴义务人的所有核算数据都归档后才可以申报"
title={getLabel(111, "提示:一个薪资所属月下一个个税扣缴义务人的所有核算数据都归档后才可以申报")}
placement="topLeft"
/>
</span>
@ -69,12 +70,12 @@ export default class GenerateModal extends React.Component {
type="primary"
loading={loading}
onClick={this.handleGenerate}>
生成申报表
{getLabel(111, "生成申报表")}
</Button>]
}>
<div style={{ marginTop: "10px", padding: "20px 20%" }}>
<WeaFormItem
label="薪资所属月"
label={getLabel(111, "薪资所属月")}
style={{ marginBottom: 10 }}
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}>
@ -82,7 +83,7 @@ export default class GenerateModal extends React.Component {
style={{ width: "100%" }}
tipPosition="bottom"
ref="weaError"
error="请选择薪资所属月">
error={getLabel(111, "请选择薪资所属月")}>
<WeaDatePicker
style={{ width: "100%" }}
viewAttr={3}
@ -96,7 +97,7 @@ export default class GenerateModal extends React.Component {
</WeaError>
</WeaFormItem>
<WeaFormItem
label="个税扣缴义务人"
label={getLabel(111, "个税扣缴义务人")}
style={{ marginBottom: 10 }}
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}>
@ -104,7 +105,7 @@ export default class GenerateModal extends React.Component {
style={{ width: "100%" }}
tipPosition="bottom"
ref="weaError1"
error="请选择个税扣缴义务人">
error={getLabel(111, "请选择个税扣缴义务人")}>
<WeaSelect
showSearch // 设置select可搜索
viewAttr={3}
@ -118,7 +119,7 @@ export default class GenerateModal extends React.Component {
<WeaHelpfulTip
style={{ position: "absolute", bottom: "8px", right: 0 }}
width={200}
title="提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;"
title={getLabel(111, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")}
placement="topLeft"
/>
</WeaError>

View File

@ -1,13 +1,14 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { Button, DatePicker } from "antd";
import { WeaNewScroll, WeaTop } from "ecCom";
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
import CustomTab from "../../components/customTab";
import CustomTable from "../../components/customTable";
import GenerateModal from "./generateModal";
import { getDeclareList } from "../../apis/declare";
import moment from "moment";
const getLabel = WeaLocaleProvider.getLabel;
const { MonthPicker } = DatePicker;
@inject("taxAgentStore")
@observer
@ -94,7 +95,7 @@ export default class Declare extends React.Component {
format="YYYY-MM"
onChange={(val) => this.handleRangePickerChange("startDate", val)}
/>
<span className="to" style={{ margin: "0 10px" }}></span>
<span className="to" style={{ margin: "0 10px" }}>{getLabel(111, "")}</span>
<MonthPicker
value={endDate}
disabledDate={(current) => {
@ -111,7 +112,7 @@ export default class Declare extends React.Component {
onClick={() => {
this.setState({ declarationModalVisible: true });
}}>
生成申报单
{getLabel(111, "生成申报单")}
</Button>
}
</div>
@ -120,7 +121,7 @@ export default class Declare extends React.Component {
return (
<div className="mySalaryBenefitsWrapper">
<WeaTop title="个税申报表" icon={<i className="icon-coms-fa"/>}
<WeaTop title={getLabel(111, "个税申报表")} icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D" showDropIcon={false}
>
<CustomTab searchOperationItem={renderRightOperation()}/>
@ -131,7 +132,7 @@ export default class Declare extends React.Component {
columns={[
...columns,
{
title: "操作",
title: getLabel(111, "操作"),
dataIndex: "operate",
render: (text, record) => {
return (
@ -142,7 +143,7 @@ export default class Declare extends React.Component {
record.id
);
}}>
查看
{getLabel(111, "查看")}
</a>
);
}
@ -154,7 +155,7 @@ export default class Declare extends React.Component {
this.handleDataPageChange(value);
},
total: pageInfo.total,
showTotal: (total) => `${total}`,
showTotal: (total) => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
current: pageInfo.current,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],

View File

@ -6,13 +6,14 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaInputNumber } from "ecCom";
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaInputNumber, WeaLocaleProvider } from "ecCom";
import { message, Modal } from "antd";
import SlideModalTitle from "../../../components/slideModalTitle";
import { getSalaryFieldForm, saveSalaryField } from "../../../apis/fieldManage";
import { commonEnumList } from "../../../apis/payrollFiles";
import { dataTypeOptions, patternOptions, roundingModeOptions } from "../../salaryItem/options";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class FieldSlide extends Component {
@ -111,8 +112,8 @@ class FieldSlide extends Component {
saveFieldInfo = () => {
if (_.isEmpty(this.state.name) || (this.state.sharedType === "1" && _.isEmpty(this.state.taxAgentIds))) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return false;
}
@ -148,9 +149,9 @@ class FieldSlide extends Component {
onRefreshList();
onCancel();
this.handleReset();
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
}).catch(() => this.setState({ loading: false }));
};
@ -221,7 +222,7 @@ class FieldSlide extends Component {
}
content={
<div className="wea-form-item-group">
<WeaFormItem label="名称" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaInput viewAttr={3} value={name}
onChange={value => this.handleChangeFields("name", value)}/>
</WeaFormItem>
@ -239,18 +240,18 @@ class FieldSlide extends Component {
{/* />*/}
{/* </WeaFormItem>*/}
{/*}*/}
<WeaFormItem label="默认使用" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "默认使用")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaCheckbox
value={useDefault}
display="switch"
onChange={value => this.handleChangeFields("useDefault", value)}
/>
<WeaHelpfulTip style={{ marginLeft: "10px" }}
title="提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除"
title={getLabel(111, "提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除")}
placement="topLeft"
/>
</WeaFormItem>
<WeaFormItem label="可见性" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "可见性")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaSelect
value={sharedType}
options={shareTypeList}
@ -259,7 +260,7 @@ class FieldSlide extends Component {
</WeaFormItem>
{
sharedType === "1" &&
<WeaFormItem label="可见性范围" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "可见性范围")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaSelect
multiple
viewAttr={3}
@ -269,32 +270,32 @@ class FieldSlide extends Component {
/>
</WeaFormItem>
}
<WeaFormItem label="字段类型" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "字段类型")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaSelect
value={dataType}
options={dataTypeOptions}
onChange={value => this.handleChangeFields("dataType", value)}
/>
</WeaFormItem>
<WeaFormItem label="舍入规则" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "舍入规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaSelect
value={roundingMode}
options={roundingModeOptions}
onChange={value => this.handleChangeFields("roundingMode", value)}
/>
</WeaFormItem>
<WeaFormItem label="保留小数位" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "保留小数位")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaSelect
value={pattern}
options={patternOptions}
onChange={value => this.handleChangeFields("pattern", value)}
/>
</WeaFormItem>
<WeaFormItem label="显示顺序" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "显示顺序")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaInputNumber value={sortedIndex} precision={0}
onChange={value => this.handleChangeFields("sortedIndex", value)}/>
</WeaFormItem>
<WeaFormItem label="备注" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "备注")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaTextarea
value={description}
onChange={value => this.handleChangeFields("description", value)}

View File

@ -5,11 +5,13 @@
* Date: 2023/1/19
*/
import React, { Component } from "react";
import { WeaTable } from "ecCom";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { inject, observer } from "mobx-react";
import { Switch } from "antd";
import { salaryFieldList } from "../../../apis/fieldManage";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class FieldTable extends Component {
@ -60,7 +62,7 @@ class FieldTable extends Component {
dataIndex: "operate",
display: true,
key: "operate",
title: "操作"
title: getLabel(111, "操作")
}], item => {
const { dataIndex } = item;
if (dataIndex === "useDefault") {
@ -70,10 +72,10 @@ class FieldTable extends Component {
item.render = (text, record) => {
return <div className="optWrapper">
<a href="javascript:void(0);" className="mr10"
onClick={() => onEditLedger(record)}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"}</a>
onClick={() => onEditLedger(record)}>{(showSalaryItemBtn || showOperateBtn) ? getLabel(111, "编辑") : getLabel(111, "查看")}</a>
{
record.canDelete && (showSalaryItemBtn || showOperateBtn) &&
<a href="javascript:void(0);" className="mr10" onClick={() => onDeleteLedger(record)}>删除</a>
<a href="javascript:void(0);" className="mr10" onClick={() => onDeleteLedger(record)}>{getLabel(111, "删除")}</a>
}
</div>;
};
@ -90,7 +92,7 @@ class FieldTable extends Component {
const { dataSource, pageInfo, loading } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],

View File

@ -7,12 +7,13 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { Button, message, Modal } from "antd";
import { WeaInputSearch, WeaTop } from "ecCom";
import { WeaInputSearch, WeaTop, WeaLocaleProvider } from "ecCom";
import FieldTable from "./components/fieldTable";
import FieldSlide from "./components/fieldSlide";
import { deleteSalaryField } from "../../apis/fieldManage";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class FieldManagement extends Component {
@ -23,7 +24,7 @@ class FieldManagement extends Component {
doSearch: false,
slideparams: {
visible: false,
title: "新建字段",
title: getLabel(111, "新建字段"),
record: {}
}
};
@ -35,22 +36,22 @@ class FieldManagement extends Component {
slideparams: {
...slideparams,
visible: true,
title: "编辑字段",
title: getLabel(111, "编辑字段"),
record: _.pick(record, ["id"])
}
});
};
handleDeleteField = (filedIds) => {
Modal.confirm({
title: "信息确认",
content: "确认要删除吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认要删除吗?"),
onOk: () => {
deleteSalaryField(filedIds).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.setState({ doSearch: !this.state.doSearch });
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -62,7 +63,7 @@ class FieldManagement extends Component {
slideparams: {
...slideparams,
visible: false,
title: "新建字段",
title: getLabel(111, "新建字段"),
record: {}
}
});
@ -76,16 +77,16 @@ class FieldManagement extends Component {
<Button
type="primary"
onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}
>新建</Button>,
>{getLabel(111, "新建")}</Button>,
<WeaInputSearch
value={searchVal} placeholder="请输入字段名称"
value={searchVal} placeholder={getLabel(111, "请输入字段名称")}
onChange={searchVal => this.setState({ searchVal })}
onSearch={() => this.setState({ doSearch: !doSearch })}
/>
];
return (
<WeaTop
title="字段管理"
title={getLabel(111, "字段管理")}
icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D"
showDropIcon={false}

View File

@ -5,10 +5,12 @@
* Date: 2022/12/13
*/
import React, { Component } from "react";
import { WeaTable } from "ecCom";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { inject, observer } from "mobx-react";
import LedgerBackCalcEditSlide from "./ledgerBackCalcEditSlide";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class LedgerBackCalculatedSalaryItemTable extends Component {
@ -17,7 +19,7 @@ class LedgerBackCalculatedSalaryItemTable extends Component {
this.state = {
backCalcEditSlide: {
visible: false,
title: "编辑薪资项目",
title: getLabel(111, "编辑薪资项目"),
id: "",
salaryItemId: "",
backCalcType: ""
@ -60,26 +62,26 @@ class LedgerBackCalculatedSalaryItemTable extends Component {
const columns = [
{
dataIndex: "name",
title: "薪资项目",
title: getLabel(111, "薪资项目"),
render: (text) => {
return <span className="tdEllipsis" title={text}>{text}</span>;
}
},
{
dataIndex: "formulaContent",
title: "核算公式",
title: getLabel(111, "核算公式"),
render: (text, record) => {
return <span className="tdEllipsis" title={text}>{text}</span>;
}
},
{
dataIndex: "",
title: "操作",
title: getLabel(111, "操作"),
width: 80,
render: (text, record, index) => {
const { canEdit } = record;
return (showOperateBtn && canEdit) ?
<a href="javascript: void(0);" onClick={() => this.handleEditBackCalc(record)}>编辑</a> :
<a href="javascript: void(0);" onClick={() => this.handleEditBackCalc(record)}>{getLabel(111, "编辑")}</a> :
<span></span>;
}
}

View File

@ -7,10 +7,11 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { categoryConditions } from "../config";
import { WeaDialog } from "ecCom";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { Button } from "antd";
import { getSearchs } from "../../../util";
const getLabel = WeaLocaleProvider.getLabel;
@inject("ledgerStore")
@observer
class CategoryAddModal extends Component {
@ -60,8 +61,8 @@ class CategoryAddModal extends Component {
const { loading } = this.state;
const { categoryForm: form } = ledgerStore;
const buttons = [
<Button type="primary" onClick={this.handleSubmit} loading={loading}>保存</Button>,
<Button type="ghost" onClick={onCancel}> 取消 </Button>
<Button type="primary" onClick={this.handleSubmit} loading={loading}>{getLabel(111, "保存")}</Button>,
<Button type="ghost" onClick={onCancel}> {getLabel(111, "取消")} </Button>
];
return (
<WeaDialog

View File

@ -8,11 +8,13 @@ import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { copyConditions } from "../config";
import { duplicateLedger } from "../../../apis/ledger";
import { WeaDialog } from "ecCom";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { Button, message } from "antd";
import { getSearchs } from "../../../util";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("ledgerStore", "taxAgentStore")
@observer
class CopyLedgerModal extends Component {
@ -71,11 +73,11 @@ class CopyLedgerModal extends Component {
duplicateLedger(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(errormsg || "复制成功");
message.success(errormsg || getLabel(111, "复制成功"));
onRefreshList();
onCancel();
} else {
message.error(errormsg || "复制失败");
message.error(errormsg || getLabel(111, "复制失败"));
}
});
} else {
@ -90,8 +92,8 @@ class CopyLedgerModal extends Component {
const { loading } = this.state;
const { copyForm: form } = ledgerStore;
const buttons = [
<Button type="primary" onClick={this.handleSubmit} loading={loading}>保存</Button>,
<Button type="ghost" onClick={onCancel}> 取消 </Button>
<Button type="primary" onClick={this.handleSubmit} loading={loading}>{getLabel(111, "保存")}</Button>,
<Button type="ghost" onClick={onCancel}> {getLabel(111, "取消")} </Button>
];
return (
<WeaDialog

View File

@ -5,12 +5,14 @@
* Date: 2022/12/12
*/
import React, { Component } from "react";
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaSearchGroup, WeaSelect } from "ecCom";
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
import { Button, Modal, Radio } from "antd";
import { monthDays } from "../config";
import { listSalarySobItem } from "../../../apis/ledger";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class LedgerAdjustRuleAddModal extends Component {
constructor(props) {
super(props);
@ -47,8 +49,8 @@ class LedgerAdjustRuleAddModal extends Component {
const { salaryItemOptions, ...extraItems } = this.state;
if (_.isEmpty(extraItems.salaryItemId)) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -89,7 +91,7 @@ class LedgerAdjustRuleAddModal extends Component {
afterAdjustmentType
} = this.state;
const { title, visible } = this.props;
const buttons = [<Button type="primary" onClick={this.handleSave}>保存</Button>];
const buttons = [<Button type="primary" onClick={this.handleSave}>{getLabel(111, "保存")}</Button>];
return (
<WeaDialog
initLoadCss
@ -101,7 +103,7 @@ class LedgerAdjustRuleAddModal extends Component {
onCancel={this.handleReset}
>
<WeaSearchGroup col={1} needTigger title="" showGroup center>
<WeaFormItem label="薪资项目" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
<WeaFormItem label={getLabel(111, "薪资项目")} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
style={{ tableLayout: "fixed" }}>
<WeaSelect
multiple
@ -115,7 +117,7 @@ class LedgerAdjustRuleAddModal extends Component {
<WeaFormItem label={<AdjustTitle/>} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>
<div className="adjustRuleDetailWrapper">
<div className="adjustSalaryFlex">
<span>如果调薪生效日期在</span>
<span>{getLabel(111, "如果:调薪生效日期在")}</span>
<WeaSelect
viewAttr={3}
style={{ width: 60, margin: "0 6px" }}
@ -123,44 +125,44 @@ class LedgerAdjustRuleAddModal extends Component {
options={monthDays}
onChange={(dayOfMonth) => this.setState({ dayOfMonth })}
/>
<span>之前</span>
<span>{getLabel(111, "(含)之前")}</span>
</div>
<div className="adjustSalaryFlex">
<span>计薪规则为</span>
<span>{getLabel(111, "计薪规则为:")}</span>
<Radio.Group onChange={(e) => this.setState({ beforeAdjustmentType: e.target.value })}
value={beforeAdjustmentType}>
<Radio value={2}>取调整后薪资</Radio>
<Radio value={4}>分段计薪<WeaHelpfulTip
<Radio value={2}>{getLabel(111, "取调整后薪资")}</Radio>
<Radio value={4}>{getLabel(111, "分段计薪")}<WeaHelpfulTip
style={{ marginLeft: "10px" }}
width={200}
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
title={getLabel(111, "=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数")}
placement="topLeft"
/></Radio>
<Radio value={3}>取平均<WeaHelpfulTip
<Radio value={3}>{getLabel(111, "取平均")}<WeaHelpfulTip
style={{ marginLeft: "10px" }}
width={200}
title="=(调整前薪资+调整后薪资)/2"
title={`=${getLabel(111, "调整前薪资+调整后薪资")}/2`}
placement="topLeft"
/>
</Radio>
</Radio.Group>
</div>
<div style={{ marginBottom: 10 }}>否则调薪生效日期在{dayOfMonth}号之后</div>
<div style={{ marginBottom: 10 }}>{getLabel(111, "否则:调薪生效日期在")}{dayOfMonth}{getLabel(111, "号之后")}</div>
<div className="adjustSalaryFlex">
<span>计薪规则为</span>
<span>{getLabel(111, "计薪规则为:")}</span>
<Radio.Group onChange={(e) => this.setState({ afterAdjustmentType: e.target.value })}
value={afterAdjustmentType}>
<Radio value={1}>取调整前薪资</Radio>
<Radio value={4}>分段计薪<WeaHelpfulTip
<Radio value={1}>{getLabel(111, "取调整前薪资")}</Radio>
<Radio value={4}>{getLabel(111, "分段计薪")}<WeaHelpfulTip
style={{ marginLeft: "10px" }}
width={200}
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
title={getLabel(111, "=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数")}
placement="topLeft"
/></Radio>
<Radio value={3}>取平均<WeaHelpfulTip
<Radio value={3}>{getLabel(111, "取平均")}<WeaHelpfulTip
style={{ marginLeft: "10px" }}
width={200}
title="=(调整前薪资+调整后薪资)/2"
title={`=${getLabel(111, "调整前薪资+调整后薪资")}/2`}
placement="topLeft"
/>
</Radio>
@ -178,10 +180,10 @@ export default LedgerAdjustRuleAddModal;
const AdjustTitle = () => {
return <div className="titleTipWrapper">
<span className="title">计薪规则</span>
<span className="title">{getLabel(111, "计薪规则")}</span>
<WeaHelpfulTip
width={200}
title="该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算"
title={getLabel(111, "该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算")}
placement="topLeft"
/>
<span className="title">:</span>

View File

@ -7,7 +7,7 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { Button, message, Modal } from "antd";
import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom";
import { WeaButtonIcon, WeaInputSearch, WeaLocaleProvider, WeaTab } from "ecCom";
import PersonalScopeTable from "../../../components/PersonalScopeTable";
import PersonalScopeModal from "../../../components/PersonalScopeModal";
import {
@ -29,6 +29,8 @@ const APISaveFox = {
save: saveLedgerPersonRange
};
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class LedgerAssociatedPersonnel extends Component {
@ -46,7 +48,7 @@ class LedgerAssociatedPersonnel extends Component {
},
personalAddModal: {
visible: false,
title: "关联人员",
title: getLabel(111, "关联人员"),
includeType: ""
}
};
@ -60,17 +62,17 @@ class LedgerAssociatedPersonnel extends Component {
*/
taxAgentRangeDelete = () => {
Modal.confirm({
title: "信息确认",
content: "确认要删除吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认要删除吗?"),
onOk: () => {
deleteLedgerPersonRange(this.state.rowKeys).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.setState({ rowKeys: [] }, () => {
this.personalScopeTableRef.clearRowkeys();
});
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
}
@ -143,11 +145,11 @@ class LedgerAssociatedPersonnel extends Component {
const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props;
const topTab = [
{
title: "关联人员范围",
title: getLabel(111, "关联人员范围"),
viewcondition: "listInclude"
},
{
title: "从范围中排除",
title: getLabel(111, "从范围中排除"),
viewcondition: "listExclude"
}
];
@ -164,7 +166,7 @@ class LedgerAssociatedPersonnel extends Component {
importResult: {}
}
})}
><span className="icon-coms-leading-in" title="导入"></span></Button>,
><span className="icon-coms-leading-in" title={getLabel(111, "导入")}></span></Button>,
<WeaButtonIcon
buttonType="del"
type="primary"
@ -176,14 +178,14 @@ class LedgerAssociatedPersonnel extends Component {
style={{ width: 220 }}
value={searchValue}
onChange={searchValue => this.setState({ searchValue })}
placeholder="请输入对象"
placeholder={getLabel(111, "请输入对象")}
onSearch={() => this.personalScopeTableRef.getPersonalScopeList()}
/>
] : [<WeaInputSearch
style={{ width: 220 }}
value={searchValue}
onChange={searchValue => this.setState({ searchValue })}
placeholder="请输入对象"
placeholder={getLabel(111, "请输入对象")}
onSearch={() => this.personalScopeTableRef.getPersonalScopeList()}
/>];
return (

View File

@ -5,7 +5,7 @@
* Date: 2022/12/13
*/
import React, { Component } from "react";
import { WeaFormItem, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea } from "ecCom";
import { WeaFormItem, WeaInput, WeaSelect, WeaSlideModal, WeaTextarea, WeaLocaleProvider } from "ecCom";
import { Col, message, Modal, Row } from "antd";
import SlideModalTitle from "../../../components/slideModalTitle";
import { getBackitemForm, salarysobBackitemSave } from "../../../apis/ledger";
@ -13,6 +13,7 @@ import { fieldType, keepDecimalPlaces, roundingRules, valueTaking } from "../con
import FormalFormModal from "../../salaryItem/formalFormModal";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class LedgerBackCalcEditSlide extends Component {
constructor(props) {
super(props);
@ -57,8 +58,8 @@ class LedgerBackCalcEditSlide extends Component {
const { salaryItemId, editId: salarySobId, onCancle } = this.props;
if (extra.valueType === "FORMULA" && _.isEmpty(extra.formulaContent)) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -67,10 +68,10 @@ class LedgerBackCalcEditSlide extends Component {
salarysobBackitemSave(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
onCancle(true);
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
}).catch(() => this.setState({ loading: false }));
};
@ -138,15 +139,15 @@ class LedgerBackCalcEditSlide extends Component {
<div className="backCalcSlideContent">
<Row>
<Col span={16} className="backCalcSlideCol">
<WeaFormItem label="薪资项目" labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "薪资项目")} labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<WeaInput value={salaryItemName} viewAttr={1}/>
</WeaFormItem>
<WeaFormItem label="字段类型" labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "字段类型")} labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<WeaSelect options={fieldType} value={dataType} viewAttr={1}/>
</WeaFormItem>
<Row gutter={20}>
<Col span={12}>
<WeaFormItem label="舍入规则" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "舍入规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaSelect
options={roundingRules} value={roundingMode} viewAttr={3}
onChange={(v) => this.handleChange("roundingMode", v)}
@ -154,7 +155,7 @@ class LedgerBackCalcEditSlide extends Component {
</WeaFormItem>
</Col>
<Col span={12}>
<WeaFormItem label="保留小数位" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "保留小数位")} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
<WeaSelect
options={keepDecimalPlaces} value={pattern} viewAttr={3}
onChange={(v) => this.handleChange("pattern", v)}
@ -162,7 +163,7 @@ class LedgerBackCalcEditSlide extends Component {
</WeaFormItem>
</Col>
</Row>
<WeaFormItem label="取值方式" labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "取值方式")} labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<WeaSelect
options={valueTaking} value={valueType} detailtype={3}
viewAttr={3}
@ -171,7 +172,7 @@ class LedgerBackCalcEditSlide extends Component {
</WeaFormItem>
{
valueType === "FORMULA" &&
<WeaFormItem label="公式内容" labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<WeaFormItem label={getLabel(111, "公式内容")} labelCol={{ span: 3 }} wrapperCol={{ span: 12 }}>
<div className="textareaBox" onClick={this.handleEditFormnul}>
<WeaTextarea viewAttr={3} value={formulaContent}/>
</div>

View File

@ -5,11 +5,13 @@
* Date: 2022/12/13
*/
import React, { Component } from "react";
import { WeaHelpfulTip, WeaSearchGroup } from "ecCom";
import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import LedgerBackCalculatedSalaryItemTable from "./LedgerBackCalculatedSalaryItemTable";
import { getAggregate } from "../../../apis/ledger";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class LedgerBackCalculatedSalaryItem extends Component {
constructor(props) {
super(props);
@ -17,20 +19,20 @@ class LedgerBackCalculatedSalaryItem extends Component {
backCalcItems: [
{
key: "issuedItems",
label: "已发项目设置",
label: getLabel(111, "已发项目设置"),
dataSource: [],
helpContent: [
"核算时,已发项目的公式中各项目值均取该项目在该账套核算中的最后一次核算值;",
"已发项目的公式设置,只可在【取最后一次核算值的项目】中选择;"
getLabel(111, "核算时,已发项目的公式中各项目值均取该项目在该账套核算中的最后一次核算值;"),
getLabel(111, "已发项目的公式设置,只可在【取最后一次核算值的项目】中选择;")
]
},
{
key: "reissueItems",
label: "补发项目设置",
label: getLabel(111, "补发项目设置"),
dataSource: [],
helpContent: [
"系统内置补发项目【补发薪资合计】,可新增其他的项目,如【补发备注】等;",
"公式取值为当次回算的核算值。"
getLabel(111, "系统内置补发项目【补发薪资合计】,可新增其他的项目,如【补发备注】等;"),
getLabel(111, "公式取值为当次回算的核算值。")
]
}
]

View File

@ -5,7 +5,7 @@
* Date: 2022/12/9
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaLocaleProvider, WeaSelect, WeaTextarea } from "ecCom";
import { Col, Row } from "antd";
import { inject, observer } from "mobx-react";
import { baseSettingFormItem } from "../config";
@ -22,6 +22,8 @@ import { commonEnumList } from "../../../apis/ruleconfig";
import moment from "moment";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class LedgerBaseSetting extends Component {
@ -184,8 +186,9 @@ class LedgerBaseSetting extends Component {
type === "CHECKBOX" ?
<React.Fragment>
<WeaCheckbox value={true} viewAttr={1}
content="【入职日期≤薪资周期止】且【离职日期≥薪资周期起】"/>
<WeaHelpfulTip width={200} title="提示:最后发薪日期为空,默认为无穷大" placement="topLeft"/>
content={getLabel(111, "【入职日期≤薪资周期止】且【离职日期≥薪资周期起】")}/>
<WeaHelpfulTip width={200} title={getLabel(111, "提示:最后发薪日期为空,默认为无穷大")}
placement="topLeft"/>
</React.Fragment> :
type === "SELECT" ?
<WeaSelect value={settingBaseInfo[key]}
@ -233,27 +236,29 @@ const MonthCycleDesc = (props) => {
const { taxCycleType, socialSecurityCycleType } = props;
const selectInfo = buildEditBasicInfo({ ...props });
return <div className="baseSettingRight">
<div className="title">月份周期说明</div>
<div className="title">{getLabel(111, "月份周期说明")}</div>
<div className="descContent">
<div>
薪资所属月是<span className="notice">{moment().format("YYYY-MM")}</span><span
className="notice">{moment().format("MM")}</span>
{getLabel(111, "例:薪资所属月是")}<span
className="notice">{moment().format("YYYY-MM")}</span>{getLabel(111, "")}<span
className="notice">{moment().format("MM")}</span>{getLabel(111, "")}
</div>
<div>根据您当前的选择相应的周期为</div>
<div className="descTitle">薪资周期</div>
<div>{getLabel(111, "根据您当前的选择,相应的周期为:")}</div>
<div className="descTitle">{getLabel(111, "薪资周期")}</div>
<div>
<span className="notice">{selectInfo.salaryCycleInfo.salaryPeriodStart}</span>
<span className="notice">{selectInfo.salaryCycleInfo.salaryPeriodStart}</span>{getLabel(111, "")}
<span className="notice">{selectInfo.salaryCycleInfo.salaryPeriodEnd}</span>
</div>
<div className="descTitle">税款所属期</div>
<div className="descTitle">{getLabel(111, "税款所属期")}</div>
<div className="notice">{getMonth(taxCycleType)}</div>
<div className="descTitle">考勤取值周期</div>
<div className="descTitle">{getLabel(111, "考勤取值周期")}</div>
<div>
<span className="notice">{selectInfo.attendCycleInfo.attendancePeriodStart}</span>
<span className="notice">{selectInfo.attendCycleInfo.attendancePeriodStart}</span>{getLabel(111, "")}
<span className="notice">{selectInfo.attendCycleInfo.attendancePeriodEnd}</span>
</div>
<div className="descTitle">福利台账月份</div>
<div>引用<span className="notice">{getMonth(socialSecurityCycleType)}</span></div>
<div className="descTitle">{getLabel(111, "福利台账月份")}</div>
<div>{getLabel(111, "引用")}<span
className="notice">{getMonth(socialSecurityCycleType)}</span>{getLabel(111, "")}</div>
</div>
</div>;
};
@ -310,14 +315,14 @@ const buildSalaryInfo = (editBasicInfo, monthCal, nowYear, nowMonth) => {
customInfo.salaryMonth = month;
if (salaryCycleFromDayNum === 1) {
customInfo.salaryPeriodTip = "至" + nowMonthStr + "最后一天";
customInfo.salaryPeriodTip = getLabel(111, "至") + nowMonthStr + getLabel(111, "最后一天");
customInfo.salaryPeriodStart = customInfo.salaryYear + "-"
+ prefixAddZero(customInfo.salaryMonth, 2) + "-01";
customInfo.salaryPeriodEnd = customInfo.salaryYear + "-"
+ prefixAddZero(customInfo.salaryMonth, 2) + "-"
+ prefixAddZero(getMonthDays(customInfo.salaryYear, customInfo.salaryMonth), 2);
} else {
customInfo.salaryPeriodTip = "至" + nextMonthStr + (salaryCycleFromDayNum - 1) + "号";
customInfo.salaryPeriodTip = getLabel(111, "至") + nextMonthStr + (salaryCycleFromDayNum - 1) + "号";
customInfo.salaryPeriodStart = customInfo.salaryYear + "-"
+ prefixAddZero(customInfo.salaryMonth, 2) + "-" + prefixAddZero(salaryCycleFromDayNum, 2);
let year = customInfo.salaryYear;
@ -344,7 +349,7 @@ const buildAttendanceInfo = (editBasicInfo, monthCal, nowYear, nowMonth) => {
let month = basicInfo.month;
if (attendCycleFromDayNum === 1) {
customInfo.attendancePeriodTip = "至" + nowMonthStr + "最后一天";
customInfo.attendancePeriodTip = getLabel(111, "至") + nowMonthStr + getLabel(111, "最后一天");
customInfo.attendancePeriodStart = year + "-"
+ prefixAddZero(month, 2) + "-01";
@ -352,7 +357,7 @@ const buildAttendanceInfo = (editBasicInfo, monthCal, nowYear, nowMonth) => {
+ prefixAddZero(month, 2) + "-"
+ prefixAddZero(getMonthDays(year, month), 2);
} else {
customInfo.attendancePeriodTip = "至" + nextMonthStr + (attendCycleFromDayNum - 1) + "号";
customInfo.attendancePeriodTip = getLabel(111, "至") + nextMonthStr + (attendCycleFromDayNum - 1) + getLabel(111, "号");
customInfo.attendancePeriodStart = year + "-"
+ prefixAddZero(month, 2) + "-" + prefixAddZero(attendCycleFromDayNum, 2);
if (month === "12") {

View File

@ -5,16 +5,18 @@
* Date: 2023/3/8
*/
import React, { Component } from "react";
import { WeaDialog, WeaSearchGroup, WeaSelect } from "ecCom";
import { WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
import { Button } from "antd";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class LedgerMovoTo extends Component {
render() {
const { dataList, value, onChangeMoveVal, onSubmitMoveTo, ...extraProps } = this.props;
const buttons = [
<Button type="primary" onClick={onSubmitMoveTo}>移动</Button>,
<Button type="ghost" onClick={extraProps.onCancel}>取消</Button>
<Button type="primary" onClick={onSubmitMoveTo}>{getLabel(111, "移动")}</Button>,
<Button type="ghost" onClick={extraProps.onCancel}>{getLabel(111, "取消")}</Button>
];
return (
<WeaDialog

View File

@ -6,11 +6,13 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaButtonIcon, WeaTab, WeaTable } from "ecCom";
import { WeaButtonIcon, WeaLocaleProvider, WeaTab, WeaTable } from "ecCom";
import { Modal } from "antd";
import LedgerAdjustRuleAddModal from "./ledgerAdjustRuleAddModal";
import { listAdjustmentRule } from "../../../apis/ledger";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class LedgerSalaryAdjustmentRules extends Component {
@ -20,7 +22,7 @@ class LedgerSalaryAdjustmentRules extends Component {
dataSource: [],
adjustRuleAddModal: {
visible: false,
title: "调薪计薪规则项",
title: getLabel(111, "调薪计薪规则项"),
salarySobId: ""
}
};
@ -68,8 +70,8 @@ class LedgerSalaryAdjustmentRules extends Component {
handleDelete = (index) => {
const { dataSource } = this.state;
Modal.confirm({
title: "信息确认",
content: "确认要删除吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认要删除吗?"),
onOk: () => {
this.setState({
dataSource: _.filter(dataSource, (it, idx) => idx !== index)
@ -83,10 +85,10 @@ class LedgerSalaryAdjustmentRules extends Component {
};
convertAdjustmentType = (index) => {
const nameList = {
1: "取调薪前薪资",
2: "取调薪后薪资",
3: "平均值",
4: "分段计薪"
1: getLabel(111, "取调薪前薪资"),
2: getLabel(111, "取调薪后薪资"),
3: getLabel(111, "平均值"),
4: getLabel(111, "分段计薪")
};
return nameList[Number(index)];
};
@ -101,26 +103,26 @@ class LedgerSalaryAdjustmentRules extends Component {
const columns = [
{
dataIndex: "salaryItemName",
title: "薪资项目",
title: getLabel(111, "薪资项目"),
render: (text) => {
return <span className="tdEllipsis" title={text}>{text}</span>;
}
},
{
dataIndex: "salaryCalculationRules",
title: "计薪规则",
title: getLabel(111, "计薪规则"),
render: (text, record) => {
const salaryCalculationRules = `${record.dayOfMonth}号(含)之前调薪,${this.convertAdjustmentType(record.beforeAdjustmentType)}${record.dayOfMonth}号之后调薪,${this.convertAdjustmentType(record.afterAdjustmentType)}`;
const salaryCalculationRules = `${record.dayOfMonth}${getLabel(111, "号(含)之前调薪,")}${this.convertAdjustmentType(record.beforeAdjustmentType)}${record.dayOfMonth}${getLabel(111, "号之后调薪,")}${this.convertAdjustmentType(record.afterAdjustmentType)}`;
return <span className="tdEllipsis" title={salaryCalculationRules}>{salaryCalculationRules}</span>;
}
},
{
dataIndex: "",
title: "操作",
title: getLabel(111, "操作"),
width: 80,
render: (text, record, index) => {
return showOperateBtn ?
<a href="javascript: void(0);" onClick={() => this.handleDelete(index)}>删除</a> : <span></span>;
<a href="javascript: void(0);" onClick={() => this.handleDelete(index)}>{getLabel(111, "删除")}</a> : <span></span>;
}
}
];

View File

@ -5,12 +5,15 @@
* Date: 2022/12/13
*/
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import LedgerSalaryItemBaseInfo from "./ledgerSalaryItemBaseInfo";
import LedgerSalaryItemNormal from "./ledgerSalaryItemNormal";
import LedgerSalaryItemPreviewModal from "./ledgerSalaryItemPreviewModal";
import { getLedgerItemForm } from "../../../apis/ledger";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class LedgerSalaryItem extends Component {
constructor(props) {
super(props);
@ -41,7 +44,7 @@ class LedgerSalaryItem extends Component {
uuid: itemGroups.length.toString(),
itemHide: null,
items,
name: "未分类",
name: getLabel(111, "未分类"),
salarySobId,
sortedIndex: itemGroups.length
};
@ -309,7 +312,7 @@ class LedgerSalaryItem extends Component {
handleMoveSalaryItem = (moveToItemId, items, titleName) => {
const { itemGroups } = this.state;
const { salaryItemGroupId: deleteItemId, id, key } = items;
if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === "未分类")) return;
if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === getLabel(111, "未分类"))) return;
this.setState({
itemGroups: _.map(itemGroups, it => {
if (moveToItemId === it.uuid) {

View File

@ -1,8 +1,9 @@
import React from "react";
import { Button, Switch } from "antd";
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
import { WeaDialog, WeaInputSearch, WeaTable, WeaLocaleProvider } from "ecCom";
import { listSalaryItem } from "../../../apis/ledger";
const getLabel = WeaLocaleProvider.getLabel;
export default class LedgerSalaryItemAddModal extends React.Component {
constructor(props) {
super(props);
@ -110,7 +111,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
const { name, selectedRowKeys, pageInfo, dataSource, loading } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
pageSizeOptions: ["10", "20", "50", "100"],
onChange: current => {
@ -131,12 +132,12 @@ export default class LedgerSalaryItemAddModal extends React.Component {
return (
<WeaDialog
visible={visible} onCancel={onCancel} hasScroll
title="添加薪资项目" style={{ width: "80vw", height: 400 }}
buttons={[<Button type="primary" onClick={this.handleAdd} disabled={_.isEmpty(selectedRowKeys)}>添加</Button>]}
title={getLabel(111, "添加薪资项目")} style={{ width: "80vw", height: 400 }}
buttons={[<Button type="primary" onClick={this.handleAdd} disabled={_.isEmpty(selectedRowKeys)}>{getLabel(111, "添加")}</Button>]}
>
<div style={{ display: "flex", justifyContent: "flex-end", alignItems: "center", padding: 20 }}>
<WeaInputSearch
placeholder="请输入薪资项目名称"
placeholder={getLabel(111, "请输入薪资项目名称")}
value={name}
onChange={(name) => this.setState({ name })}
onSearch={() => this.listSalaryItem({ current: 1 })}

View File

@ -5,10 +5,11 @@
* Date: 2022/12/13
*/
import React, { Component } from "react";
import { WeaHelpfulTip, WeaSearchGroup, WeaSelect, WeaSortable } from "ecCom";
import { WeaHelpfulTip, WeaSearchGroup, WeaSelect, WeaSortable, WeaLocaleProvider } from "ecCom";
import { Button, Icon } from "antd";
import { empFieldList } from "../../../apis/ledger";
const getLabel = WeaLocaleProvider.getLabel;
class LedgerSalaryItemBaseInfo extends Component {
constructor(props) {
super(props);
@ -92,13 +93,13 @@ const TitleComp = (props) => {
const { onPreview } = props;
return <div className="titleWrapper">
<div className="titleLeft">
<span>员工基本信息</span>
<span>{getLabel(111, "员工基本信息")}</span>
<WeaHelpfulTip
width={300}
title="姓名、部门、个税扣缴义务人为必须项,不可删除"
title={getLabel(111, "姓名、部门、个税扣缴义务人为必须项,不可删除")}
placement="topLeft"
/>
</div>
<Button type="ghost" onClick={onPreview}>预览</Button>
<Button type="ghost" onClick={onPreview}>{getLabel(111, "预览")}</Button>
</div>;
};

View File

@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaButtonIcon, WeaSearchGroup } from "ecCom";
import { WeaButtonIcon, WeaSearchGroup, WeaLocaleProvider } from "ecCom";
import { Button, Modal } from "antd";
import CategoryAddModal from "./categoryAddModal";
import LedgerSalaryItemAddModal from "./ledgerSalaryItemAddModal";
@ -15,6 +15,7 @@ import FormalFormModal from "../../salaryItem/formalFormModal";
import LedgerMovoTo from "./ledgerMovoTo";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("ledgerStore")
@observer
class LedgerSalaryItemNormal extends Component {
@ -24,7 +25,7 @@ class LedgerSalaryItemNormal extends Component {
addCategoryItemsVisible: false,
categoryModal: {
visible: false,
title: "新增分类",
title: getLabel(111, "新增分类"),
name: "",
id: ""
},
@ -80,7 +81,7 @@ class LedgerSalaryItemNormal extends Component {
...categoryModal,
visible: true,
name,
title: name ? "编辑分类" : "新增分类",
title: name ? getLabel(111, "编辑分类") : getLabel(111, "新增分类"),
id
}
});
@ -88,8 +89,8 @@ class LedgerSalaryItemNormal extends Component {
handleDeleteCategory = (id) => {
const { onDeleteCategroy } = this.props;
Modal.confirm({
title: "信息确认",
content: "确认要删除吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认要删除吗?"),
onOk: () => {
onDeleteCategroy(id);
}
@ -98,8 +99,8 @@ class LedgerSalaryItemNormal extends Component {
handleDeleteCategoryItems = (id, selectedRowKeys) => {
const { onDeleteCategroyItems } = this.props;
Modal.confirm({
title: "信息确认",
content: "确认删除所选薪资项目吗?删除后此项目下的进位规则/保留小数位/公式内容会一起被清除!",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除所选薪资项目吗?删除后此项目下的进位规则/保留小数位/公式内容会一起被清除!"),
onOk: () => {
onDeleteCategroyItems(id, selectedRowKeys);
}
@ -121,7 +122,7 @@ class LedgerSalaryItemNormal extends Component {
categoryModal: {
...categoryModal,
visible: false,
title: "新增分类",
title: getLabel(111, "新增分类"),
name: "",
id: ""
}
@ -167,8 +168,8 @@ class LedgerSalaryItemNormal extends Component {
this.setState({
moveModalPayload: {
visible: true,
title: "移动到",
value: salaryItemGroupId !== "0" ? salaryItemGroupId : (_.find(dataSource, it => it.name === "未分类").id || _.find(dataSource, it => it.name === "未分类").uuid),
title: getLabel(111, "移动到"),
value: salaryItemGroupId !== "0" ? salaryItemGroupId : (_.find(dataSource, it => it.name === getLabel(111, "未分类")).id || _.find(dataSource, it => it.name === getLabel(111, "未分类")).uuid),
record,
dataList: _.map(dataSource, item => ({ key: item.id || item.uuid, showname: item.name }))
}
@ -275,20 +276,20 @@ const TitleNormalComp = (props) => {
<div className="titleWrapper">
<span>{name}</span>
{
name !== "未分类" && showOperateBtn &&
<i className="icon-coms-edit" title="编辑" onClick={() => onEditCategory(name, uuid)}/>
name !== getLabel(111, "未分类") && showOperateBtn &&
<i className="icon-coms-edit" title={getLabel(111, "编辑")} onClick={() => onEditCategory(name, uuid)}/>
}
{
name !== "未分类" && _.isEmpty(items) && showOperateBtn &&
<i className="icon-coms-Delete" title="删除" onClick={() => onDeleteCategory(uuid)}/>
name !== getLabel(111, "未分类") && _.isEmpty(items) && showOperateBtn &&
<i className="icon-coms-Delete" title={getLabel(111, "删除")} onClick={() => onDeleteCategory(uuid)}/>
}
{
sortedIndex !== 0 && showOperateBtn &&
<i className="icon-coms-Reverse" title="向上移动" onClick={() => onUpgo(sortedIndex)}/>
<i className="icon-coms-Reverse" title={getLabel(111, "向上移动")} onClick={() => onUpgo(sortedIndex)}/>
}
{
sortedIndex !== dataSourceLen - 1 && showOperateBtn &&
<i className="icon-coms-positive-sequence" title="向下移动" onClick={() => onDowngo(sortedIndex)}/>
<i className="icon-coms-positive-sequence" title={getLabel(111, "向下移动")} onClick={() => onDowngo(sortedIndex)}/>
}
</div>
<div className="titleBtnWrapper">
@ -309,7 +310,7 @@ const TitleComp = (props) => {
<span>{titleName}</span>
{
showOperateBtn &&
<Button type="ghost" onClick={() => onAddCategory()}>新增分类</Button>
<Button type="ghost" onClick={() => onAddCategory()}>{getLabel(111, "新增分类")}</Button>
}
</div>;
};

View File

@ -1,6 +1,7 @@
import React from "react";
import { WeaDialog, WeaTable } from "ecCom";
import { WeaDialog, WeaTable, WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export default class LedgerSalaryItemPreviewModal extends React.Component {
getColumns = () => {
const { empFields, itemGroups } = this.props;
@ -33,7 +34,7 @@ export default class LedgerSalaryItemPreviewModal extends React.Component {
return (
<WeaDialog
visible={visible}
title="预览"
title={getLabel(111, "预览")}
style={{ width: "80vw", height: 200 }}
onCancel={onCancel}
>

View File

@ -5,8 +5,9 @@
* Date: 2022/12/13
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaHelpfulTip, WeaTable } from "ecCom";
import { WeaCheckbox, WeaHelpfulTip, WeaTable, WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
class LedgerSalaryItemTable extends Component {
constructor(props) {
super(props);
@ -68,13 +69,13 @@ class LedgerSalaryItemTable extends Component {
const checkValue = (!_.isEmpty(dataSource) && _.every(dataSource, it => it.itemHide && it.itemHide === "1")) ? "1" : "0";
const columns = [
{
title: "名称",
title: getLabel(111, "名称"),
dataIndex: "name",
key: "name"
},
{
title: <span>
<span style={{ marginRight: 8 }}>核算公式</span>
<span style={{ marginRight: 8 }}>{getLabel(111, "核算公式")}</span>
<WeaHelpfulTip title={<HelpContent/>} placement="bottom" width={200}/>
</span>,
dataIndex: "formulaContent",
@ -92,7 +93,7 @@ class LedgerSalaryItemTable extends Component {
}
},
{
title: "个税申请表对应字段",
title: getLabel(111, "个税申请表对应字段"),
dataIndex: "taxDeclarationColumn",
key: "taxDeclarationColumn"
},
@ -102,7 +103,7 @@ class LedgerSalaryItemTable extends Component {
value={checkValue}
onChange={value => this.handleChangeAllItem(value)}
/>
<span style={{ marginLeft: 8 }}>隐藏</span>
<span style={{ marginLeft: 8 }}>{getLabel(111, "隐藏")}</span>
</span>,
dataIndex: "itemHide",
key: "itemHide",
@ -113,12 +114,12 @@ class LedgerSalaryItemTable extends Component {
/>
},
{
title: "操作",
title: getLabel(111, "操作"),
dataIndex: "operate",
key: "operate",
width: 100,
render: (_, record) => (
<a href="javascript:void(0);" onClick={() => onMoveTo(record)}>移动到</a>
<a href="javascript:void(0);" onClick={() => onMoveTo(record)}>{getLabel(111, "移动到")}</a>
)
}
];
@ -144,8 +145,8 @@ export default LedgerSalaryItemTable;
const HelpContent = () => {
return <span>
<span>1新建薪资账套时核算公式与薪资项目管理菜单一致</span><br/>
<span>2取值方式为公式的薪资项目核算公式显示为具体公式点击公式可编辑公式核算时按照当前薪资项目的公式进行核算</span><br/>
<span>3薪资账套内的薪资项目的公式或SQL的修改或公式的修改都不影响薪资项目管理菜单的薪资项目取值方式或公式只对当前账套生效</span><br/>
<span>{getLabel(111, "1、新建薪资账套时核算公式与【薪资项目管理】菜单一致")}</span><br/>
<span>{getLabel(111, "2、取值方式为公式的薪资项目核算公式显示为具体公式点击公式可编辑公式核算时按照当前薪资项目的公式进行核算")}</span><br/>
<span>{getLabel(111, "3、薪资账套内的薪资项目的公式或SQL的修改或公式的修改都不影响【薪资项目管理】菜单的薪资项目取值方式或公式只对当前账套生效")}</span><br/>
</span>;
};

View File

@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaSlideModal, WeaSteps } from "ecCom";
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
import { Button, message, Modal } from "antd";
import SlideModalTitle from "../../../components/slideModalTitle";
import LedgerBaseSetting from "./ledgerBaseSetting";
@ -17,13 +17,14 @@ import LedgerSalaryItem from "./ledgerSalaryItem";
import { saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const Step = WeaSteps.Step;
const tabs = [
{ key: 0, title: "基础设置" },
{ key: 1, title: "关联人员" },
{ key: 2, title: "薪资项目" },
{ key: 3, title: "回算薪资项目" },
{ key: 4, title: "调薪计薪规则" }
{ key: 0, title: getLabel(111, "基础设置") },
{ key: 1, title: getLabel(111, "关联人员") },
{ key: 2, title: getLabel(111, "薪资项目") },
{ key: 3, title: getLabel(111, "回算薪资项目") },
{ key: 4, title: getLabel(111, "调薪计薪规则") }
];
@inject("taxAgentStore")
@ -60,8 +61,8 @@ class LedgerSlide extends Component {
const bool = _.every(Object.keys(extra), key => !!extra[key]);
if (!bool || _.isEmpty(baseSettingInfo)) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return false;
}
@ -70,11 +71,11 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
const { onRefreshList } = this.props;
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
onRefreshList();
!editId && this.setState({ current: current + 1, saveSalarySobId: data });
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
}).catch(() => this.setState({ loading: false }));
};
@ -94,10 +95,10 @@ class LedgerSlide extends Component {
saveAdjustmentRule(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
this.handleClose();
} else {
message.success(errormsg || "保存失败");
message.success(errormsg || getLabel(111, "保存失败"));
}
}).catch(() => this.setState({ loading: false }));
};
@ -115,7 +116,7 @@ class LedgerSlide extends Component {
if (Object.prototype.toString.call(it.id) === "[object Number]") delete it.id;
return { ...it };
}),
itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => {
itemGroups: _.map(_.filter(itemGroups, it => it.name !== getLabel(111, "未分类")), item => {
return {
...item,
items: _.map(item.items, it => {
@ -125,7 +126,7 @@ class LedgerSlide extends Component {
})
};
}),
items: _.map(_.find(itemGroups, it => it.name === "未分类").items, child => {
items: _.map(_.find(itemGroups, it => it.name === getLabel(111, "未分类")).items, child => {
// if (child.id && child.id.length > 4) delete child.id;
// delete child.formulaContent;
return { ...child };
@ -136,9 +137,9 @@ class LedgerSlide extends Component {
saveLedgerItem(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
}).catch(() => this.setState({ loading: false }));
};
@ -207,20 +208,20 @@ class LedgerSlide extends Component {
type="primary"
loading={loading}
onClick={this.saveLedgerBasic}
>{editId ? "保存" : "保存并进入下一步"}</Button>
>{editId ? getLabel(111, "保存") : getLabel(111, "保存并进入下一步")}</Button>
];
break;
case 1:
CurrentDom = !editId ? [
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
] : [];
break;
case 2:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "下一步")}</Button>,
<Button
type="primary"
loading={loading}
@ -229,26 +230,26 @@ class LedgerSlide extends Component {
this.saveLedgerItem();
});
}}
>保存并进入下一步</Button>
>{getLabel(111, "保存并进入下一步")}</Button>
] : [
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>保存</Button>
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>{getLabel(111, "保存")}</Button>
];
break;
case 3:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
] : [];
break;
case 4:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>完成</Button>
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>{getLabel(111, "完成")}</Button>
] : [
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>保存</Button>
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>{getLabel(111, "保存")}</Button>
];
break;
default:

View File

@ -5,13 +5,15 @@
* Date: 2022/12/7
*/
import React, { Component } from "react";
import { WeaCheckbox, WeaTable } from "ecCom";
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
import { inject, observer } from "mobx-react";
import { Menu, message, Modal, Popover } from "antd";
import { changeLedgerStatus, deleteLedger, getLedgerList } from "../../../apis/ledger";
import CopyLedgerModal from "./copyLedgerModal";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class LedgerTable extends Component {
@ -28,7 +30,7 @@ class LedgerTable extends Component {
},
copyLedgerModal: {
visible: false,
title: "复制账套", id: "", name: "", taxAgenyId: ""
title: getLabel(111, "复制账套"), id: "", name: "", taxAgenyId: ""
}
};
}
@ -38,10 +40,10 @@ class LedgerTable extends Component {
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({current: 1});
if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({ current: 1 });
}
getLedgerList = (extra={}) => {
getLedgerList = (extra = {}) => {
const { name } = this.props;
const { pageInfo } = this.state;
const payload = { name, ...pageInfo, ...extra };
@ -77,15 +79,16 @@ class LedgerTable extends Component {
item.width = 120;
item.render = (text, record) => {
return <div className="optWrapper">
<a href="javascript:void(0);" className="mr10" onClick={()=> onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"}</a>
<a href="javascript:void(0);" className="mr10"
onClick={() => onEditLedger(record)}>{showOperateBtn ? getLabel(111, "编辑") : getLabel(111, "查看")}</a>
{
showOperateBtn &&
<Popover
overlayClassName="moreIconWrapper"
placement="bottomRight"
content={<Menu onClick={(e) => this.handleMenuClick(e, record)}>
<Menu.Item key="copy">复制</Menu.Item>
<Menu.Item key="delete">删除</Menu.Item>
<Menu.Item key="copy">{getLabel(111, "复制")}</Menu.Item>
<Menu.Item key="delete">{getLabel(111, "删除")}</Menu.Item>
</Menu>} title="">
<i className="icon-coms-more"/>
</Popover>
@ -109,10 +112,10 @@ class LedgerTable extends Component {
deleteLedger = (payload) => {
deleteLedger(payload).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.getLedgerList();
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
};
@ -125,10 +128,10 @@ class LedgerTable extends Component {
changeLedgerStatus = (payload) => {
changeLedgerStatus(payload).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功");
message.success(getLabel(111, "操作成功"));
this.getLedgerList();
} else {
message.error(errormsg || "操作成功");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
};
@ -149,8 +152,8 @@ class LedgerTable extends Component {
break;
case "delete":
Modal.confirm({
title: "信息确认",
content: "确认要删除吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认要删除吗?"),
onOk: () => {
this.deleteLedger([id]);
}
@ -165,7 +168,7 @@ class LedgerTable extends Component {
const { dataSource, columns, pageInfo, loading, copyLedgerModal } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],

View File

@ -1,3 +1,6 @@
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const copyConditions = [
{
items: [
@ -7,7 +10,7 @@ export const copyConditions = [
domkey: ["name"],
fieldcol: 14,
rules: "required|string",
label: "账套名称",
label: getLabel(111, "账套名称"),
labelcol: 6,
value: "",
viewAttr: 3
@ -18,7 +21,7 @@ export const copyConditions = [
domkey: ["taxAgentId"],
fieldcol: 14,
rules: "required|string",
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
labelcol: 6,
value: "",
viewAttr: 3
@ -36,7 +39,7 @@ export const categoryConditions = [
domkey: ["name"],
fieldcol: 14,
rules: "required|string",
label: "名称",
label: getLabel(111, "名称"),
labelcol: 6,
value: "",
viewAttr: 3
@ -48,18 +51,18 @@ export const categoryConditions = [
export const baseSettingFormItem = [
{
key: "name",
label: "账套名称",
label: getLabel(111, "账套名称"),
type: "INPUT"
},
{
key: "taxAgentId",
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
type: "SELECT",
options: []
},
{
key: "taxableItems",
label: "薪资类型",
label: getLabel(111, "薪资类型"),
type: "SELECT",
options: [
// {
@ -76,7 +79,7 @@ export const baseSettingFormItem = [
},
{
key: "salaryCycleStrObj",
label: "薪资周期",
label: getLabel(111, "薪资周期"),
type: "CUSTOM",
children: [
{
@ -86,22 +89,22 @@ export const baseSettingFormItem = [
{
key: "1",
selected: false,
showname: "上上月"
showname: getLabel(111, "上上月")
},
{
key: "2",
selected: false,
showname: "上月"
showname: getLabel(111, "上月")
},
{
key: "3",
selected: true,
showname: "本月"
showname: getLabel(111, "本月")
},
{
key: "4",
selected: false,
showname: "下月"
showname: getLabel(111, "下月")
}
]
},
@ -112,157 +115,157 @@ export const baseSettingFormItem = [
{
key: "1",
selected: true,
showname: "1号"
showname: getLabel(111, "1号")
},
{
key: "2",
selected: false,
showname: "2号"
showname: getLabel(111, "2号")
},
{
key: "3",
selected: false,
showname: "3号"
showname: getLabel(111, "3号")
},
{
key: "4",
selected: false,
showname: "4号"
showname: getLabel(111, "4号")
},
{
key: "5",
selected: false,
showname: "5号"
showname: getLabel(111, "5号")
},
{
key: "6",
selected: false,
showname: "6号"
showname: getLabel(111, "6号")
},
{
key: "7",
selected: false,
showname: "7号"
showname: getLabel(111, "7号")
},
{
key: "8",
selected: false,
showname: "8号"
showname: getLabel(111, "8号")
},
{
key: "9",
selected: false,
showname: "9号"
showname: getLabel(111, "9号")
},
{
key: "10",
selected: false,
showname: "10号"
showname: getLabel(111, "10号")
},
{
key: "11",
selected: false,
showname: "11号"
showname: getLabel(111, "11号")
},
{
key: "12",
selected: false,
showname: "12号"
showname: getLabel(111, "12号")
},
{
key: "13",
selected: false,
showname: "13号"
showname: getLabel(111, "13号")
},
{
key: "14",
selected: false,
showname: "14号"
showname: getLabel(111, "14号")
},
{
key: "15",
selected: false,
showname: "15号"
showname: getLabel(111, "15号")
},
{
key: "16",
selected: false,
showname: "16号"
showname: getLabel(111, "16号")
},
{
key: "17",
selected: false,
showname: "17号"
showname: getLabel(111, "17号")
},
{
key: "18",
selected: false,
showname: "18号"
showname: getLabel(111, "18号")
},
{
key: "19",
selected: false,
showname: "19号"
showname: getLabel(111, "19号")
},
{
key: "20",
selected: false,
showname: "20号"
showname: getLabel(111, "20号")
},
{
key: "21",
selected: false,
showname: "21号"
showname: getLabel(111, "21号")
},
{
key: "22",
selected: false,
showname: "22号"
showname: getLabel(111, "22号")
},
{
key: "23",
selected: false,
showname: "23号"
showname: getLabel(111, "23号")
},
{
key: "24",
selected: false,
showname: "24号"
showname: getLabel(111, "24号")
},
{
key: "25",
selected: false,
showname: "25号"
showname: getLabel(111, "25号")
},
{
key: "26",
selected: false,
showname: "26号"
showname: getLabel(111, "26号")
},
{
key: "27",
selected: false,
showname: "27号"
showname: getLabel(111, "27号")
},
{
key: "28",
selected: false,
showname: "28号"
showname: getLabel(111, "28号")
},
{
key: "29",
selected: false,
showname: "29号"
showname: getLabel(111, "29号")
},
{
key: "30",
selected: false,
showname: "30号"
showname: getLabel(111, "30号")
},
{
key: "31",
selected: false,
showname: "31号"
showname: getLabel(111, "31号")
}
]
}
@ -270,34 +273,34 @@ export const baseSettingFormItem = [
},
{
key: "taxCycleType",
label: "税款所属期",
label: getLabel(111, "税款所属期"),
type: "SELECT",
options: [
{
key: "1",
selected: false,
showname: "上上月"
showname: getLabel(111, "上上月"),
},
{
key: "2",
selected: false,
showname: "上月"
showname: getLabel(111, "上月"),
},
{
key: "3",
selected: true,
showname: "本月"
showname: getLabel(111, "本月")
},
{
key: "4",
selected: false,
showname: "下月"
showname: getLabel(111, "下月")
}
]
},
{
key: "attendCycleStrObj",
label: "考勤周期",
label: getLabel(111, "考勤周期"),
type: "CUSTOM",
children: [
{
@ -307,22 +310,22 @@ export const baseSettingFormItem = [
{
key: "1",
selected: false,
showname: "上上月"
showname: getLabel(111, "上上月")
},
{
key: "2",
selected: false,
showname: "上月"
showname: getLabel(111, "上月")
},
{
key: "3",
selected: true,
showname: "本月"
showname: getLabel(111, "本月")
},
{
key: "4",
selected: false,
showname: "下月"
showname: getLabel(111, "下月")
}
]
},
@ -333,157 +336,157 @@ export const baseSettingFormItem = [
{
key: "1",
selected: true,
showname: "1号"
showname: getLabel(111, "1号")
},
{
key: "2",
selected: false,
showname: "2号"
showname: getLabel(111, "2号")
},
{
key: "3",
selected: false,
showname: "3号"
showname: getLabel(111, "3号")
},
{
key: "4",
selected: false,
showname: "4号"
showname: getLabel(111, "4号")
},
{
key: "5",
selected: false,
showname: "5号"
showname: getLabel(111, "5号")
},
{
key: "6",
selected: false,
showname: "6号"
showname: getLabel(111, "6号")
},
{
key: "7",
selected: false,
showname: "7号"
showname: getLabel(111, "7号")
},
{
key: "8",
selected: false,
showname: "8号"
showname: getLabel(111, "8号")
},
{
key: "9",
selected: false,
showname: "9号"
showname: getLabel(111, "9号")
},
{
key: "10",
selected: false,
showname: "10号"
showname: getLabel(111, "10号")
},
{
key: "11",
selected: false,
showname: "11号"
showname: getLabel(111, "11号")
},
{
key: "12",
selected: false,
showname: "12号"
showname: getLabel(111, "12号")
},
{
key: "13",
selected: false,
showname: "13号"
showname: getLabel(111, "13号")
},
{
key: "14",
selected: false,
showname: "14号"
showname: getLabel(111, "14号")
},
{
key: "15",
selected: false,
showname: "15号"
showname: getLabel(111, "15号")
},
{
key: "16",
selected: false,
showname: "16号"
showname: getLabel(111, "16号")
},
{
key: "17",
selected: false,
showname: "17号"
showname: getLabel(111, "17号")
},
{
key: "18",
selected: false,
showname: "18号"
showname: getLabel(111, "18号")
},
{
key: "19",
selected: false,
showname: "19号"
showname: getLabel(111, "19号")
},
{
key: "20",
selected: false,
showname: "20号"
showname: getLabel(111, "20号")
},
{
key: "21",
selected: false,
showname: "21号"
showname: getLabel(111, "21号")
},
{
key: "22",
selected: false,
showname: "22号"
showname: getLabel(111, "22号")
},
{
key: "23",
selected: false,
showname: "23号"
showname: getLabel(111, "23号")
},
{
key: "24",
selected: false,
showname: "24号"
showname: getLabel(111, "24号")
},
{
key: "25",
selected: false,
showname: "25号"
showname: getLabel(111, "25号")
},
{
key: "26",
selected: false,
showname: "26号"
showname: getLabel(111, "26号")
},
{
key: "27",
selected: false,
showname: "27号"
showname: getLabel(111, "27号")
},
{
key: "28",
selected: false,
showname: "28号"
showname: getLabel(111, "28号")
},
{
key: "29",
selected: false,
showname: "29号"
showname: getLabel(111, "29号")
},
{
key: "30",
selected: false,
showname: "30号"
showname: getLabel(111, "30号")
},
{
key: "31",
selected: false,
showname: "31号"
showname: getLabel(111, "31号")
}
]
}
@ -491,39 +494,39 @@ export const baseSettingFormItem = [
},
{
key: "socialSecurityCycleType",
label: "福利台账月份",
label: getLabel(111, "福利台账月份"),
type: "SELECT",
options: [
{
key: "1",
selected: false,
showname: "上上月"
showname: getLabel(111, "上上月")
},
{
key: "2",
selected: false,
showname: "上月"
showname: getLabel(111, "上月")
},
{
key: "3",
selected: true,
showname: "本月"
showname: getLabel(111, "本月")
},
{
key: "4",
selected: false,
showname: "下月"
showname: getLabel(111, "下月")
}
]
},
{
key: "namescpoe",
label: "核算人员范围",
label: getLabel(111, "核算人员范围"),
type: "CHECKBOX"
},
{
key: "description",
label: "备注",
label: getLabel(111, "备注"),
type: "TEXTAREA"
}
];
@ -531,213 +534,213 @@ export const monthDays = [
{
key: "1",
selected: true,
showname: "1号"
showname: getLabel(111, "1号")
},
{
key: "2",
selected: false,
showname: "2号"
showname: getLabel(111, "2号")
},
{
key: "3",
selected: false,
showname: "3号"
showname: getLabel(111, "3号")
},
{
key: "4",
selected: false,
showname: "4号"
showname: getLabel(111, "4号")
},
{
key: "5",
selected: false,
showname: "5号"
showname: getLabel(111, "5号")
},
{
key: "6",
selected: false,
showname: "6号"
showname: getLabel(111, "6号")
},
{
key: "7",
selected: false,
showname: "7号"
showname: getLabel(111, "7号")
},
{
key: "8",
selected: false,
showname: "8号"
showname: getLabel(111, "8号")
},
{
key: "9",
selected: false,
showname: "9号"
showname: getLabel(111, "9号")
},
{
key: "10",
selected: false,
showname: "10号"
showname: getLabel(111, "10号")
},
{
key: "11",
selected: false,
showname: "11号"
showname: getLabel(111, "11号")
},
{
key: "12",
selected: false,
showname: "12号"
showname: getLabel(111, "12号")
},
{
key: "13",
selected: false,
showname: "13号"
showname: getLabel(111, "13号")
},
{
key: "14",
selected: false,
showname: "14号"
showname: getLabel(111, "14号")
},
{
key: "15",
selected: false,
showname: "15号"
showname: getLabel(111, "15号")
},
{
key: "16",
selected: false,
showname: "16号"
showname: getLabel(111, "16号")
},
{
key: "17",
selected: false,
showname: "17号"
showname: getLabel(111, "17号")
},
{
key: "18",
selected: false,
showname: "18号"
showname: getLabel(111, "18号")
},
{
key: "19",
selected: false,
showname: "19号"
showname: getLabel(111, "19号")
},
{
key: "20",
selected: false,
showname: "20号"
showname: getLabel(111, "20号")
},
{
key: "21",
selected: false,
showname: "21号"
showname: getLabel(111, "21号")
},
{
key: "22",
selected: false,
showname: "22号"
showname: getLabel(111, "22号")
},
{
key: "23",
selected: false,
showname: "23号"
showname: getLabel(111, "23号")
},
{
key: "24",
selected: false,
showname: "24号"
showname: getLabel(111, "24号")
},
{
key: "25",
selected: false,
showname: "25号"
showname: getLabel(111, "25号")
},
{
key: "26",
selected: false,
showname: "26号"
showname: getLabel(111, "26号")
},
{
key: "27",
selected: false,
showname: "27号"
showname: getLabel(111, "27号")
},
{
key: "28",
selected: false,
showname: "28号"
showname: getLabel(111, "28号")
},
{
key: "29",
selected: false,
showname: "29号"
showname: getLabel(111, "29号")
},
{
key: "30",
selected: false,
showname: "30号"
showname: getLabel(111, "30号")
},
{
key: "31",
selected: false,
showname: "31号"
showname: getLabel(111, "31号")
}
];
export const fieldType = [
{
key: "STRING",
selected: false,
showname: "字符"
showname: getLabel(111, "字符")
},
{
key: "NUMBER",
selected: false,
showname: "数值"
showname: getLabel(111, "数值")
}
];
export const valueTaking = [
{
key: "INPUT",
selected: false,
showname: "输入"
showname: getLabel(111, "输入")
},
{
key: "FORMULA",
selected: false,
showname: "公式"
showname: getLabel(111, "公式")
}
];
export const roundingRules = [
{
key: "RAW_DATA",
selected: false,
showname: "原始数据"
showname: getLabel(111, "原始数据")
},
{
key: "ROUNDING",
selected: false,
showname: "四舍五入"
showname: getLabel(111, "四舍五入")
},
{
key: "ROUND_UP",
selected: false,
showname: "向上舍入"
showname: getLabel(111, "向上舍入")
},
{
key: "ROUND_DOWN",
selected: false,
showname: "向下舍入"
showname: getLabel(111, "向下舍入")
},
{
key: "CEILING",
selected: false,
showname: "见分进角"
showname: getLabel(111, "见分进角")
},
{
key: "UP_EVEN",
selected: false,
showname: "向上求偶"
showname: getLabel(111, "向上求偶")
}
];
export const keepDecimalPlaces = [

View File

@ -6,11 +6,13 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaInputSearch, WeaTop } from "ecCom";
import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom";
import { Button } from "antd";
import LedgerTable from "./components/ledgerTable";
import LedgerSlide from "./components/ledgerSlide";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class Index extends Component {
@ -21,7 +23,7 @@ class Index extends Component {
doSearch: false,
slideparams: {
visible: false,
title: "新建账套",
title: getLabel(111, "新建账套"),
editId: ""
}
};
@ -36,7 +38,7 @@ class Index extends Component {
handleEditLedger = (record) => {
const { slideparams } = this.state;
const { id } = record;
this.setState({ slideparams: { ...slideparams, visible: true, title: "编辑账套", editId: id } });
this.setState({ slideparams: { ...slideparams, visible: true, title: getLabel(111, "编辑账套"), editId: id } });
};
handleResetLedger = () => {
const { slideparams } = this.state;
@ -44,7 +46,7 @@ class Index extends Component {
slideparams: {
...slideparams,
visible: false,
title: "新建账套",
title: getLabel(111, "新建账套"),
editId: ""
}
});
@ -58,16 +60,16 @@ class Index extends Component {
<Button
type="primary"
onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}
>新建</Button>,
>{getLabel(111, "新建")}</Button>,
<WeaInputSearch
value={searchVal} placeholder="请输入薪资账套名称"
value={searchVal} placeholder={getLabel(111, "请输入薪资账套名称")}
onChange={searchVal => this.setState({ searchVal })}
onSearch={() => this.setState({ doSearch: !doSearch })}
/>
];
return (
<WeaTop
title="薪资账套"
title={getLabel(111, "薪资账套")}
icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D"
showDropIcon={false}

View File

@ -1,7 +1,7 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { DatePicker } from "antd";
import { WeaNewScroll, WeaTop } from "ecCom";
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
import { renderNoright } from "../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import CustomTab from "../../components/customTab";
import moment from "moment";
@ -10,6 +10,7 @@ import Authority from "./authority";
import CustomPaginationTable from "../../components/customPaginationTable";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const { RangePicker } = DatePicker;
@inject("mySalaryStore")
@ -57,13 +58,13 @@ export default class MySalary extends React.Component {
}
});
columns.push({
title: "操作",
title: getLabel(30585, "操作"),
dataIndex: "operate",
render: (text, record) => {
return (
<a onClick={() => {
this.handleView(record);
}}>查看</a>
}}>{getLabel(33564, "查看")}</a>
);
}
});
@ -118,17 +119,17 @@ export default class MySalary extends React.Component {
const topTab = [
{
title: "工资单",
title: getLabel(503, "工资单"),
viewcondition: "0"
},
{
title: "调薪记录",
title: getLabel(111, "调薪记录"),
viewcondition: "2"
}
];
const renderSearchOperationItem = () => {
if (this.state.selectedKey === "0") {
return (<div><span className="tabSearchLabel">薪资所属月</span>
return (<div><span className="tabSearchLabel">{getLabel(111, "薪资所属月:")}</span>
<RangePicker format="YYYY-MM"
value={salaryRange}
@ -143,7 +144,7 @@ export default class MySalary extends React.Component {
<div className="mySalaryBenefitsWrapper">
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`} store={mySalaryStore}>
<WeaTop
title="我的薪资福利" // 文字
title={getLabel(111, "我的薪资福利")} // 文字
icon={<i className="icon-coms-fa"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={false} // 是否显示下拉按钮

View File

@ -1,9 +1,10 @@
import React from "react";
import { WeaDialog } from "ecCom";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import ComputerTemplate from "../payroll/templatePreview/computerTemplate";
import "../payroll/templatePreview/index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("mySalaryStore")
@observer
@ -19,7 +20,7 @@ export default class PayrollModal extends React.Component {
const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups);
return (
<WeaDialog
title="工资单"
title={getLabel(503, "工资单")}
visible={this.props.visible} onCancel={() => {
this.props.onCancel();
}}

View File

@ -1,10 +1,12 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { message, Tag } from "antd";
import { WeaLocaleProvider } from "ecCom";
import moment from "moment";
import CustomPaginationTable from "../../components/customPaginationTable";
import "../calculate/index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore", "taxAgentStore")
@observer
export default class SalarySendList extends React.Component {
@ -40,7 +42,7 @@ export default class SalarySendList extends React.Component {
let templateRecord = {};
templateRecord.id = record.templateId;
if (!record.templateId) {
message.warning("请设置默认模板");
message.warning(getLabel(111, "请设置默认模板"));
return;
}
this.props.onEditTemplate && this.props.onEditTemplate(templateRecord);
@ -77,9 +79,9 @@ export default class SalarySendList extends React.Component {
<div className="salarySobNameTagWrapper">
{
record.salaryAcctType === 1 &&
<Tag color="yellow">补发</Tag>
<Tag color="yellow">{getLabel(111, "补发")}</Tag>
}
<Tag color="blue">{`${record.acctTimes}`}</Tag>
<Tag color="blue">{`${getLabel(111, "第")}${record.acctTimes}${getLabel(111, "次")}`}</Tag>
</div>
</div>;
};
@ -89,7 +91,7 @@ export default class SalarySendList extends React.Component {
?
(result = result.concat([
{
title: "操作",
title: getLabel(111, "操作"),
key: "operate",
render: (text, record) => {
const { sendNum, sendTotal, salaryAcctType, haveBackCalc } = record;
@ -98,15 +100,15 @@ export default class SalarySendList extends React.Component {
return (
<React.Fragment>
<a href="javascript:void(0);" onClick={() => this.handleGrant(record)}
style={{ marginRight: 10 }}>发放</a>
style={{ marginRight: 10 }}>{getLabel(111, "发放")}</a>
{
!showGrant &&
<a href="javascript:void(0);" onClick={() => this.handleShowDetail(record)}
style={{ marginRight: 10 }}>查看详情</a>
style={{ marginRight: 10 }}>{getLabel(111, "查看详情")}</a>
}
{
sendNum !== sendTotal && !showGrant &&
<a href="javascript:void(0);" onClick={() => this.handleUpdateTemplate(record)}>更新模板</a>
<a href="javascript:void(0);" onClick={() => this.handleUpdateTemplate(record)}>{getLabel(111, "更新模板")}</a>
}
</React.Fragment>
);
@ -116,7 +118,7 @@ export default class SalarySendList extends React.Component {
:
(result = result.concat([
{
title: "操作",
title: getLabel(111, "操作"),
key: "operate",
render: (text, record) => {
const { salaryAcctType } = record;
@ -124,7 +126,7 @@ export default class SalarySendList extends React.Component {
<span>
{
salaryAcctType === 0 &&
<a href="javascript:void(0);" onClick={() => this.handleShowDetail(record)}>查看详情</a>
<a href="javascript:void(0);" onClick={() => this.handleShowDetail(record)}>{getLabel(111, "查看详情")}</a>
}
</span>
);

View File

@ -1,7 +1,9 @@
import React from "react";
import { Icon, message, Modal, Upload } from "antd";
import { WeaLocaleProvider } from "ecCom";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
@ -11,11 +13,11 @@ function getBase64(img, callback) {
function beforeUpload(file) {
const isJPG = file.type === "image/jpeg" || file.type === "image/png";
if (!isJPG) {
message.error("只允许上传jpg、png类型的图片!");
message.error(getLabel(111, "只允许上传jpg、png类型的图片!"));
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error("图片大小限制2MB!");
message.error(getLabel(111, "图片大小限制2MB!"));
}
return isJPG && isLt2M;
}

View File

@ -1,8 +1,9 @@
import React from "react";
import { notNull } from "../../util/validate";
import { Button, Col, Row } from "antd";
import { WeaDialog, WeaError, WeaInput } from "ecCom";
import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export default class CopyModal extends React.Component {
constructor(props) {
super(props);
@ -28,7 +29,7 @@ export default class CopyModal extends React.Component {
return (
<WeaDialog
style={{ width: 600 }}
title="复制工资单"
title={getLabel(111, "复制工资单")}
visible={this.props.visible}
onCancel={() => {
this.props.onCancel();
@ -36,16 +37,16 @@ export default class CopyModal extends React.Component {
buttons={[
<Button type="primary" onClick={() => {
this.handleSave();
}}>保存</Button>
}}>{getLabel(111, "保存")}</Button>
]}>
<Row style={{display:"flex",alignItems: "center", padding: "16px 20px"}}>
<Col span={6}>工资单名称</Col>
<Row style={{ display: "flex", alignItems: "center", padding: "16px 20px" }}>
<Col span={6}>{getLabel(111, "工资单名称")}</Col>
<Col span={18}>
<WeaError
style={{ width: "100%" }}
tipPosition="bottom"
ref="weaError"
error="请填写工资单名称">
error={getLabel(111, "请填写工资单名称")}>
<WeaInput
style={{ width: "100%" }}
value={name}

View File

@ -3,8 +3,8 @@ import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { Button, DatePicker, message, Modal } from "antd";
import moment from "moment";
import { WeaHelpfulTip, WeaInputSearch, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
import { renderLoading } from "../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import { WeaHelpfulTip, WeaInputSearch, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop, WeaLocaleProvider } from "ecCom";
import { renderLoading } from "../../util";
import CustomTab from "../../components/customTab";
import StepSlide from "../../components/stepSlide";
import BaseInformForm from "./stepForm/baseInformForm";
@ -18,7 +18,7 @@ import { getReplenishForm } from "../../apis/payroll";
import "../dataAcquisition/cumDeduct/index.less";
const { MonthPicker } = DatePicker;
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore", "taxAgentStore")
@observer
export default class Payroll extends React.Component {
@ -56,8 +56,8 @@ export default class Payroll extends React.Component {
const { templateBaseData, salaryTemplateShowSet, setReplenishSalaryTemplateSalaryItemSet } = payrollStore;
if (!salaryTemplateShowSet.theme && !isEdit) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -150,8 +150,8 @@ export default class Payroll extends React.Component {
handleTemplateListDelete(record) {
const { payrollStore: { deletePayroll } } = this.props;
Modal.confirm({
title: "信息确认",
content: "确认删除",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除吗?"),
onOk: () => {
deletePayroll([record.id]);
}
@ -187,8 +187,8 @@ export default class Payroll extends React.Component {
if (selectedTab === 0) {
if (!this.validateStep1()) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -196,8 +196,8 @@ export default class Payroll extends React.Component {
const { salaryTemplateShowSet } = payrollStore;
if (!salaryTemplateShowSet.theme) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -250,11 +250,11 @@ export default class Payroll extends React.Component {
}
const topTab = [
{
title: "工资单发放",
title: getLabel(111, "工资单发放"),
viewcondition: "0"
},
{
title: "工资单模板设置",
title: getLabel(111, "工资单模板设置"),
viewcondition: "1"
}
];
@ -263,7 +263,7 @@ export default class Payroll extends React.Component {
return <div style={{ display: "inline-block" }}>
<WeaHelpfulTip
width={200}
title="提示:无工资单模板无法发放工资单,请先设置一个默认使用的工资单模板"
title={getLabel(111, "提示:无工资单模板无法发放工资单,请先设置一个默认使用的工资单模板")}
placement="topLeft"
/>
<div style={{ display: "inline-block", marginLeft: "10px" }}>
@ -275,7 +275,7 @@ export default class Payroll extends React.Component {
format="YYYY-MM"
onChange={(val) => this.handleRangePickerChange("startDate", val)}
/>
<span className="to" style={{ margin: "0 10px" }}></span>
<span className="to" style={{ margin: "0 10px" }}>{getLabel(111, "")}</span>
<MonthPicker
value={endDate}
disabledDate={(current) => {
@ -294,7 +294,7 @@ export default class Payroll extends React.Component {
showOperateBtn &&
<Button type="primary" onClick={() => {
this.setState({ stepSlideVisible: true });
}}>新建</Button>
}}>{getLabel(111, "新建")}</Button>
}
{
showOperateBtn &&
@ -304,28 +304,28 @@ export default class Payroll extends React.Component {
onClick={() => {
const selectedRowKeys = toJS(templateStore.selectedRowKeys);
if (!selectedRowKeys.length) {
message.info("未选中任何数据!");
message.info(getLabel(111, "未选中任何数据"));
return;
}
Modal.confirm({
title: "信息确认",
content: `确定要将所选的工资单模板(共${selectedRowKeys.length}条数据)删除吗`,
title: getLabel(111, "信息确认"),
content: `${getLabel(111, "确定要将所选的工资单模板")}${getLabel(111, "共")}${selectedRowKeys.length}${getLabel(111, "条数据")}${getLabel(111, "删除吗")}`,
onOk: () => {
deletePayroll(selectedRowKeys);
}
});
}}
>批量删除工资单模板</Button>
>{getLabel(111, "批量删除工资单模板")}</Button>
}
{
this.state.initSelected && <WeaSelect options={this.state.ledgerOptions}
placeholder="请选择账套"
placeholder={getLabel(111, "请选择账套")}
style={{ width: "200px", marginLeft: "10px", marginRight: "10px" }}
value={templateSelect} onChange={(value) => {
this.handleTemplateSelectChange(value);
}}/>
}
<WeaInputSearch style={{ marginleft: "10px" }} placeholder="请输入工资单名称" value={templateSearchValue}
<WeaInputSearch style={{ marginleft: "10px" }} placeholder={getLabel(111, "请输入工资单名称")} value={templateSearchValue}
onChange={(value) => {
this.setState({ templateSearchValue: value });
}} onSearch={(value) => {
@ -335,17 +335,17 @@ export default class Payroll extends React.Component {
);
}
};
const steps = ["基础设置", "正常核算工资单模板", "补发工资单模版"];
const steps = [getLabel(111, "基础设置"), getLabel(111, "正常核算工资单模板"), getLabel(111, "补发工资单模版")];
const nextStep = () => {
if (!this.validateStep1()) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
if (templateBaseData.replenishName === templateBaseData.name) {
message.error("工资单模板名称和补发工资单模板名称不可相同");
message.error(getLabel(111, "工资单模板名称和补发工资单模板名称不可相同"));
return;
}
this.setState({
@ -362,7 +362,7 @@ export default class Payroll extends React.Component {
return (
<div className="payrollDistributionWrapper">
<WeaTop
title="工资单发放" // 文字
title={getLabel(111, "工资单发放")} // 文字
icon={<i className="icon-coms-fa"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={false} // 是否显示下拉按钮
@ -422,24 +422,24 @@ export default class Payroll extends React.Component {
currentStep === 0 ? [
<Button type="primary" onClick={() => {
nextStep();
}}>下一步</Button>
}}>{getLabel(111, "下一步")}</Button>
] : currentStep === 1 ? [
<Button type="default" onClick={() => {
prevStep();
}}>上一步</Button>,
<Button type="primary" onClick={() => this.getReplenishForm()}>下一步</Button>,
}}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" onClick={() => this.getReplenishForm()}>{getLabel(111, "下一步")}</Button>,
<Button type="default" onClick={() => {
this.handlePreview();
}}>预览</Button>
}}>{getLabel(111, "预览")}</Button>
] : currentStep === 2 ? [
<Button type="default" onClick={() => {
prevStep();
}}>上一步</Button>,
<Button type="primary" onClick={this.handleSave}>保存</Button>
}}>{getLabel(111, "上一步")}</Button>,
<Button type="primary" onClick={this.handleSave}>{getLabel(111, "保存")}</Button>
] :
[]
}
title="新建工资单模板"
title={getLabel(111, "新建工资单模板")}
content={
<div>
{
@ -468,11 +468,11 @@ export default class Payroll extends React.Component {
measure="%"
title={
<SlideModalTitle
subtitle="编辑工资单模板"
subtitle={getLabel(111, "编辑工资单模板")}
tabs={[
{ title: "基础设置", key: 0 },
{ title: "正常核算工资单模板", key: 1 },
{ title: "补发工资单模版", key: 2 }
{ title: getLabel(111, "基础设置"), key: 0 },
{ title: getLabel(111, "正常核算工资单模板"), key: 1 },
{ title: getLabel(111, "补发工资单模版"), key: 2 }
]}
editable={false}
selectedTab={selectedTab}
@ -481,16 +481,16 @@ export default class Payroll extends React.Component {
selectedTab === 0 ? [
<Button type="primary" onClick={() => {
this.handleUpdateSave();
}}>保存</Button>
}}>{getLabel(111, "保存")}</Button>
] : selectedTab === 1 ? [
<Button type="primary" onClick={() => {
this.handleUpdateSave();
}}>保存</Button>,
<Button type="default" onClick={this.handlePreview}>预览</Button>
}}>{getLabel(111, "保存")}</Button>,
<Button type="default" onClick={this.handlePreview}>{getLabel(111, "预览")}</Button>
] : [
<Button type="primary" onClick={() => {
this.handleUpdateSave();
}}>保存</Button>
}}>{getLabel(111, "保存")}</Button>
]
}
subItemChange={(selectedTab) => {

View File

@ -1,6 +1,6 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { WeaHelpfulTip, WeaTab } from "ecCom";
import { WeaHelpfulTip, WeaLocaleProvider, WeaTab } from "ecCom";
import { Button, Spin } from "antd";
import { getQueryString } from "../../../util/url";
import { removePropertyCondition } from "../../../util/response";
@ -8,6 +8,7 @@ import { getSearchs } from "../../../util";
import { getPayrollDetailList, getPayrollDetailSa, getPayrollInfo } from "../../../apis/payroll";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
export default class PayrollDetail extends React.Component {
@ -128,15 +129,15 @@ export default class PayrollDetail extends React.Component {
const { setDetailListShowSearchAd, detailListShowSearchAd, detailListConditionForm } = payrollStore;
const { salaryMonth, template, sendNum, sendTotal } = salarySendDetailBaseInfo;
const adBtn = [
<Button type="primary" onClick={this.handleSearch}>搜索</Button>,
<Button type="ghost" onClick={() => detailListConditionForm.resetForm()}>重置</Button>,
<Button type="ghost" onClick={() => setDetailListShowSearchAd(false)}>取消</Button>
<Button type="primary" onClick={this.handleSearch}>{getLabel(111, "搜索")}</Button>,
<Button type="ghost" onClick={() => detailListConditionForm.resetForm()}>{getLabel(111, "重置")}</Button>,
<Button type="ghost" onClick={() => setDetailListShowSearchAd(false)}>{getLabel(111, "取消")}</Button>
];
return (
<div className="payrollGrant">
<WeaTab
searchType={["base", "advanced"]} searchsBasePlaceHolder="请输入姓名"
buttons={[<Button type="primary" onClick={this.handleExportAll}>导出全部</Button>]}
searchType={["base", "advanced"]} searchsBasePlaceHolder={getLabel(111, "请输入姓名")}
buttons={[<Button type="primary" onClick={this.handleExportAll}>{getLabel(111, "导出全部")}</Button>]}
showSearchAd={detailListShowSearchAd} setShowSearchAd={bool => setDetailListShowSearchAd(bool)}
searchsAd={getSearchs(detailListConditionForm, condition, 2)}
buttonsAd={adBtn} onSearch={this.handleSearch}
@ -145,18 +146,18 @@ export default class PayrollDetail extends React.Component {
/>
<div className="titleBar">
<div className="titleBarLeft">
<span>薪资所属月{salaryMonth}</span>
<span>{getLabel(111, "薪资所属月")}{salaryMonth}</span>
<WeaHelpfulTip
style={{ marginLeft: "10px", marginRight: "10px" }}
width={200}
title={<PayrollTips salarySendDetailBaseInfo={salarySendDetailBaseInfo}/>}
placement="topLeft"
/>
<span>工资单模板{template}</span>
<span>{getLabel(111, "工资单模板")}{template}</span>
</div>
<div className="titleBarRight">
<span>已发放{sendNum}/<span style={{ color: "red" }}>{sendTotal}</span></span>
<span>{getLabel(111, "已发放")}{sendNum}/<span style={{ color: "red" }}>{sendTotal}</span></span>
</div>
</div>
@ -181,13 +182,13 @@ export const PayrollTips = (props) => {
const { fromDate, endDate } = salaryCycle;
const { fromDate: aFromDate, endDate: aEndDate } = attendCycle;
return <div>
<div>薪资周期</div>
<div><span>{fromDate}</span><span></span><span>{endDate}</span></div>
<div>税款所属期</div>
<div>{getLabel(111, "薪资周期")}</div>
<div><span>{fromDate}</span><span>{getLabel(111, "")}</span><span>{endDate}</span></div>
<div>{getLabel(111, "税款所属期")}</div>
<div>{taxCycle}</div>
<div>考勤取值周期</div>
<div><span>{aFromDate}</span><span></span><span>{aEndDate}</span></div>
<div>福利台账月份</div>
<div>{`引用的${socialSecurityCycle}福利台账数据`}</div>
<div>{getLabel(111, "考勤取值周期")}</div>
<div><span>{aFromDate}</span><span>{getLabel(111, "")}</span><span>{aEndDate}</span></div>
<div>{getLabel(111, "福利台账月份")}</div>
<div>{`${getLabel(111, "引用")}${socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}</div>
</div>;
};

View File

@ -1,7 +1,7 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaDropdown, WeaHelpfulTip, WeaTab, WeaTop } from "ecCom";
import { WeaDropdown, WeaHelpfulTip, WeaLocaleProvider, WeaTab, WeaTop } from "ecCom";
import { Button, Dropdown, Menu, message } from "antd";
import "./index.less";
import { getQueryString } from "../../../util/url";
@ -10,7 +10,7 @@ import CustomPaginationTable from "../../../components/customPaginationTable";
import PayrollPartTable from "./payrollPartTable";
const { ButtonSelect } = WeaDropdown;
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
export default class PayrollGrant extends React.Component {
@ -22,7 +22,7 @@ export default class PayrollGrant extends React.Component {
selectedKey: "0",
payrollPartModalParams: {
visible: false,
title: "工资单发放",
title: getLabel(111, "工资单发放"),
grantType: "",
salarySendId: ""
}
@ -98,7 +98,7 @@ export default class PayrollGrant extends React.Component {
break;
case "SELECT":
if (selectedRowKeys.length === 0) {
message.warning("未选择发放条目");
message.warning(getLabel(111, "未选择发放条目"));
return;
}
this.fetchGrantPayRoll({
@ -134,7 +134,7 @@ export default class PayrollGrant extends React.Component {
break;
case "recallSelected":
if (selectedRowKeys.length === 0) {
message.warning("未选择撤回条目");
message.warning(getLabel(111, "未选择撤回条目"));
return;
}
this.fetchWithdrawPayroll({
@ -147,7 +147,7 @@ export default class PayrollGrant extends React.Component {
payrollPartModalParams: {
...payrollPartModalParams,
visible: true,
title: "工资单撤回",
title: getLabel(111, "工资单撤回"),
salarySendId: currentId,
grantType: "withdraw"
}
@ -221,17 +221,17 @@ export default class PayrollGrant extends React.Component {
return [
...toJS(columns),
{
title: "操作",
title: getLabel(111, "操作"),
key: "",
dataIndex: "",
display: true,
render: (text, record) => {
if (record.sendStatus === "已发放" && !notShowGrantOrWithdraw) {
if (record.sendStatus === getLabel(111, "已发放") && !notShowGrantOrWithdraw) {
return (
<a
href="javascript:void(0);"
onClick={() => this.handleWithdraw({ ids: [record.id] })}>
撤回
{getLabel(111, "撤回")}
</a>
);
} else if (!notShowGrantOrWithdraw) {
@ -239,7 +239,7 @@ export default class PayrollGrant extends React.Component {
<a
href="javascript:void(0);"
onClick={() => this.handleGrant({ ids: [record.id] })}>
发放
{getLabel(111, "发放")}
</a>
);
}
@ -267,24 +267,24 @@ export default class PayrollGrant extends React.Component {
};
const menu = (
<Menu onClick={handleMenuClick}>
<Menu.Item key="3">全部导出</Menu.Item>
<Menu.Item key="4">导出选中</Menu.Item>
<Menu.Item key="3">{getLabel(111, "全部导出")}</Menu.Item>
<Menu.Item key="4">{getLabel(111, "导出选中")}</Menu.Item>
</Menu>
);
let btnDom = [
<Dropdown.Button overlay={menu}>
更多
{getLabel(111, "更多")}
</Dropdown.Button>
];
if (selectedKey === "0" && !notShowGrantOrWithdraw) {
btnDom = [
<ButtonSelect
datas={[
{ key: "ALL", show: "全部发放", selected: true },
{ key: "SELECT", show: "发放所选", selected: false },
{ key: "PART", show: "部分发放", selected: false }
{ key: "ALL", show: getLabel(111, "全部发放"), selected: true },
{ key: "SELECT", show: getLabel(111, "发放所选"), selected: false },
{ key: "PART", show: getLabel(111, "部分发放"), selected: false }
]}
btnProps={{loading: btnLoading}}
btnProps={{ loading: btnLoading }}
btnOnClick={this.sendPayroll}
menuOnClick={(key) => this.sendPayroll(key)}
/>,
@ -294,11 +294,11 @@ export default class PayrollGrant extends React.Component {
btnDom = [
<ButtonSelect
datas={[
{ key: "withdrawAll", show: "全部撤回", selected: true },
{ key: "recallSelected", show: "撤回所选", selected: false },
{ key: "partialWithdrawal", show: "部分撤回", selected: false }
{ key: "withdrawAll", show: getLabel(111, "全部撤回"), selected: true },
{ key: "recallSelected", show: getLabel(111, "撤回所选"), selected: false },
{ key: "partialWithdrawal", show: getLabel(111, "部分撤回"), selected: false }
]}
btnProps={{loading: btnLoading}}
btnProps={{ loading: btnLoading }}
btnOnClick={this.withdrawalPayroll}
menuOnClick={(key) => this.withdrawalPayroll(key)}
/>,
@ -320,7 +320,7 @@ export default class PayrollGrant extends React.Component {
const { selectedRowKeys, currentId, selectedKey } = this.state;
const { payrollStore: { exportPayroll } } = this.props;
if (selectedRowKeys.length === 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
return;
}
exportPayroll({
@ -374,7 +374,7 @@ export default class PayrollGrant extends React.Component {
payrollPartModalParams: {
...payrollPartModalParams,
visible: false,
title: "工资单发放",
title: getLabel(111, "工资单发放"),
grantType: "",
salarySendId: ""
}
@ -401,29 +401,29 @@ export default class PayrollGrant extends React.Component {
const adBtn = [
// 高级搜索内部按钮
<Button type="primary" onClick={() => this.handleSearch()}>
搜索
{getLabel(111, "搜索")}
</Button>,
<Button type="ghost" onClick={() => grantListConditionForm.resetForm()}>
重置
{getLabel(111, "重置")}
</Button>,
<Button type="ghost" onClick={() => setGrantListShowSearchAd(false)}>
取消
{getLabel(111, "取消")}
</Button>
];
const topTab = [
{
title: "未发送",
title: getLabel(111, "未发送"),
viewcondition: "0"
},
{
title: "已发送",
title: getLabel(111, "已发送"),
viewcondition: "1"
}
];
return (
<div className="payrollGrant_new">
<WeaTop
title="工资单发放" // 文字
title={getLabel(111, "工资单发放")} // 文字
icon={<i className="icon-coms-meeting"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={true} // 是否显示下拉按钮
@ -443,7 +443,7 @@ export default class PayrollGrant extends React.Component {
})
}
searchType={["base", "advanced"]} // base基础搜索框 advanced显示高级搜索按钮
searchsBasePlaceHolder="请输入姓名"
searchsBasePlaceHolder={getLabel(111, "请输入姓名")}
showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据
@ -455,7 +455,7 @@ export default class PayrollGrant extends React.Component {
<div className="titleBar">
<div className="titleBarLeft">
<span>
薪资所属月{salarySendDetailBaseInfo.salaryMonth}
{getLabel(111, "薪资所属月")}{salarySendDetailBaseInfo.salaryMonth}
</span>
<WeaHelpfulTip
style={{ marginLeft: "1rem", marginRight: "1rem" }}
@ -464,13 +464,13 @@ export default class PayrollGrant extends React.Component {
placement="topLeft"
/>
<span>
工资单模板{salarySendDetailBaseInfo.template}
{getLabel(111, "工资单模板")}{salarySendDetailBaseInfo.template}
</span>
</div>
<div className="titleBarRight">
<span>
已发放{salarySendDetailBaseInfo.sendNum}/<span
{getLabel(111, "已发放")}{salarySendDetailBaseInfo.sendNum}/<span
style={{ color: "red" }}>
{salarySendDetailBaseInfo.sendTotal}
</span>
@ -515,20 +515,20 @@ export const TitleHelp = (props) => {
const { salaryCycle = {}, attendCycle = {} } = salarySobCycle;
return <div>
<div>
<p>薪资周期</p>
<p>{salaryCycle.fromDate}<span style={{ margin: "0 4px" }}></span>{salaryCycle.endDate}</p>
<p>{getLabel(111, "薪资周期")}</p>
<p>{salaryCycle.fromDate}<span style={{ margin: "0 4px" }}>{getLabel(111, "")}</span>{salaryCycle.endDate}</p>
</div>
<div>
<p>税款所属期</p>
<p>{getLabel(111, "税款所属期")}</p>
<p>{salarySobCycle.taxCycle}</p>
</div>
<div>
<p>考勤取值周期</p>
<p>{attendCycle.fromDate}<span style={{ margin: "0 4px" }}></span>{attendCycle.endDate}</p>
<p>{getLabel(111, "考勤取值周期")}</p>
<p>{attendCycle.fromDate}<span style={{ margin: "0 4px" }}>{getLabel(111, "")}</span>{attendCycle.endDate}</p>
</div>
<div>
<p>福利台账月份</p>
<p>{`引用${salarySobCycle.socialSecurityCycle}的福利台账数据`}</p>
<p>{getLabel(111, "福利台账月份")}</p>
<p>{`${getLabel(111, "引用")}${salarySobCycle.socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}</p>
</div>
</div>;
};

View File

@ -6,12 +6,14 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
import { WeaBrowser, WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
import { Button, message, Modal } from "antd";
import { commonEnumList } from "../../../apis/ruleconfig";
import { sendRangeSave } from "../../../apis/payroll";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("taxAgentStore")
@observer
class PayrollPartModal extends Component {
@ -24,7 +26,7 @@ class PayrollPartModal extends Component {
{
viewAttr: 3,
key: "include",
label: "对象",
label: getLabel(111, "对象"),
targetType: "1",
targetTypeIds: "",
targetTypeIdsNames: ""
@ -32,7 +34,7 @@ class PayrollPartModal extends Component {
{
viewAttr: 2,
key: "exclude",
label: "对象中排除",
label: getLabel(111, "对象中排除"),
targetType: "1",
targetTypeIds: "",
targetTypeIdsNames: ""
@ -79,8 +81,8 @@ class PayrollPartModal extends Component {
_.isEmpty(_.find(personalAddItem, item => item.viewAttr === 3).targetTypeIds)
) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -116,11 +118,11 @@ class PayrollPartModal extends Component {
sendRangeSave(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
this.handleReset();
onCancel();
} else {
message.error(errormsg || "保存失败");
message.error(errormsg || getLabel(111, "保存失败"));
}
}).catch(() => this.setState({ loading: false }));
};
@ -170,16 +172,16 @@ class PayrollPartModal extends Component {
} else {
switch (targetType) {
case "1":
browserType = { ...browserType, type: 17, title: "人员选择" };
browserType = { ...browserType, type: 17, title: getLabel(111, "人员选择") };
break;
case "2":
browserType = { ...browserType, type: 57, title: "部门选择" };
browserType = { ...browserType, type: 57, title: getLabel(111, "部门选择") };
break;
case "3":
browserType = { ...browserType, type: 164, title: "分部选择" };
browserType = { ...browserType, type: 164, title: getLabel(111, "分部选择") };
break;
case "4":
browserType = { ...browserType, type: 278, title: "岗位选择" };
browserType = { ...browserType, type: 278, title: getLabel(111, "岗位选择") };
break;
default:
break;
@ -213,7 +215,7 @@ class PayrollPartModal extends Component {
{
viewAttr: 3,
key: "include",
label: "对象",
label: getLabel(111, "对象"),
targetType: "1",
targetTypeIds: "",
targetTypeIdsNames: ""
@ -221,7 +223,7 @@ class PayrollPartModal extends Component {
{
viewAttr: 2,
key: "exclude",
label: "对象中排除",
label: getLabel(111, "对象中排除"),
targetType: "1",
targetTypeIds: "",
targetTypeIdsNames: ""
@ -234,14 +236,14 @@ class PayrollPartModal extends Component {
const { onCancel, visible } = this.props;
const { targetTypeList, personalAddItem, loading } = this.state;
const buttons = [
<Button type="primary" onClick={this.taxAgentRangeSave} loading={loading}>确定</Button>,
<Button type="ghost" onClick={this.handleReset}>重置</Button>
<Button type="primary" onClick={this.taxAgentRangeSave} loading={loading}>{getLabel(111, "确定")}</Button>,
<Button type="ghost" onClick={this.handleReset}>{getLabel(111, "重置")}</Button>
];
return (
<WeaDialog
initLoadCss
className="payrollPartModalWrapper"
title="添加"
title={getLabel(111, "添加")}
visible={visible}
style={{ width: 600 }}
buttons={buttons}

View File

@ -6,11 +6,12 @@
*/
import React, { Component } from "react";
import { Button, message, Modal } from "antd";
import { WeaButtonIcon, WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
import { WeaButtonIcon, WeaDialog, WeaInputSearch, WeaTable, WeaLocaleProvider } from "ecCom";
import { sendRangeDelete, sendRangeList } from "../../../apis/payroll";
import { calcPageNo } from "../../../util";
import PayrollPartModal from "./payrollPartModal";
const getLabel = WeaLocaleProvider.getLabel;
class PayrollPartTable extends Component {
constructor(props) {
super(props);
@ -69,12 +70,12 @@ class PayrollPartTable extends Component {
const { selectedRowKeys, pageInfo } = this.state;
const { grantType, salarySendId } = this.props;
Modal.confirm({
title: "信息确认",
content: "确认要删除吗?",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认要删除吗?"),
onOk: () => {
sendRangeDelete(selectedRowKeys).then(({ status, errormsg }) => {
if (status) {
message.success("刪除成功");
message.success(getLabel(111, "刪除成功"));
this.setState({ selectedRowKeys: [] }, () => {
this.sendRangeList({
grantType, salarySendId,
@ -84,7 +85,7 @@ class PayrollPartTable extends Component {
});
});
} else {
message.error(errormsg || "刪除失败");
message.error(errormsg || getLabel(111, "刪除失败"));
}
});
},
@ -96,12 +97,12 @@ class PayrollPartTable extends Component {
const { grantType, salarySendId, onWithdraw, onGrant } = this.props;
const { selectedRowKeys } = this.state;
if (_.isEmpty(selectedRowKeys)) {
message.warning("您没有需要处理的对象!");
message.warning(getLabel(111, "您没有需要处理的对象!"));
return;
}
Modal.confirm({
title: "信息确认",
content: `您共选择${selectedRowKeys.length}个对象,确定要${grantType === "grant" ? "发放" : "撤回"}`,
title: getLabel(111, "信息确认"),
content: `${getLabel(111, "您共选择")}${selectedRowKeys.length}${getLabel(111, "个对象")}${getLabel(111, "确定要")}${grantType === "grant" ? getLabel(111, "发放") : getLabel(111, "撤回")}`,
onCancel: () => {
},
onOk: () => {
@ -119,7 +120,7 @@ class PayrollPartTable extends Component {
const { onCancel, visible, grantType, salarySendId, title } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
pageSizeOptions: ["10", "20", "50", "100"],
onChange: current => {
@ -157,7 +158,7 @@ class PayrollPartTable extends Component {
searchValue={searchValue}
onChange={(searchValue) => this.setState({ searchValue })}
onSearch={() => this.sendRangeList({ grantType, salarySendId })}
placeholder="请输入方案名称"
placeholder={getLabel(111, "请输入方案名称")}
/>
</div>
<WeaTable

View File

@ -1,9 +1,10 @@
import React from "react";
import { WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom";
import { WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaLocaleProvider } from "ecCom";
import { inject, observer } from "mobx-react";
import { getReplenishRuleSetOptions } from "../../../apis/payroll";
import { toJS } from "mobx";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
export default class BaseInformForm extends React.Component {
@ -73,9 +74,9 @@ export default class BaseInformForm extends React.Component {
const { salarySob, name, description, replenishName, replenishRule, reissueRule } = request;
return (
<WeaSearchGroup title="基础信息" items={[]} needTigger showGroup col={1}>
<WeaSearchGroup title={getLabel(111, "基础信息")} items={[]} needTigger showGroup col={1}>
<WeaFormItem
label="薪资账套"
label={getLabel(111, "薪资账套")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -90,7 +91,7 @@ export default class BaseInformForm extends React.Component {
}
</WeaFormItem>
<WeaFormItem
label="工资单模板名称"
label={getLabel(111, "工资单模板名称")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -101,7 +102,7 @@ export default class BaseInformForm extends React.Component {
/>
</WeaFormItem>
<WeaFormItem
label="补发工资单模板名称"
label={getLabel(111, "补发工资单模板名称")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -112,12 +113,12 @@ export default class BaseInformForm extends React.Component {
/>
</WeaFormItem>
<WeaFormItem
label="补发工资单名单生成规则"
label={getLabel(111, "补发工资单名单生成规则")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
<WeaSelect
options={[{ key: "0", showname: "全部" }, { key: "1", showname: "按规则" }]}
options={[{ key: "0", showname: getLabel(111, "全部") }, { key: "1", showname: getLabel(111, "按规则") }]}
value={reissueRule}
detailtype={3}
viewAttr={3}
@ -127,7 +128,7 @@ export default class BaseInformForm extends React.Component {
{
reissueRule !== "0" &&
<WeaFormItem
label="规则设置"
label={getLabel(111, "规则设置")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -140,7 +141,7 @@ export default class BaseInformForm extends React.Component {
</WeaFormItem>
}
<WeaFormItem
label="备注"
label={getLabel(111, "备注")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>

View File

@ -5,15 +5,17 @@
* Date: 2023/2/2
*/
import React, { Component } from "react";
import { WeaDialog } from "ecCom";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { Button } from "antd";
const getLabel = WeaLocaleProvider.getLabel;
class SalaryItemModal extends Component {
render() {
const { visible, title, onCancel, onConfirm } = this.props;
const buttons = [
<Button type="primary" onClick={onConfirm}>确定</Button>,
<Button type="ghost" onClick={onCancel}>取消</Button>
<Button type="primary" onClick={onConfirm}>{getLabel(111, "确定")}</Button>,
<Button type="ghost" onClick={onCancel}>{getLabel(111, "取消")}</Button>
];
return (
<WeaDialog

View File

@ -6,11 +6,12 @@
*/
import React, { Component } from "react";
import { toJS } from "mobx";
import { WeaFormItem, WeaInput, WeaSortable, WeaTransfer } from "ecCom";
import { WeaFormItem, WeaInput, WeaSortable, WeaTransfer, WeaLocaleProvider } from "ecCom";
import { Icon, Modal } from "antd";
import SalaryItemModal from "./salaryItemModal";
import { getAvailableSalaryGroupSet, getAvailableSalaryItemSet } from "../../../apis/payroll";
const getLabel = WeaLocaleProvider.getLabel;
class SalaryItemSettings extends Component {
constructor(props) {
super(props);
@ -48,8 +49,8 @@ class SalaryItemSettings extends Component {
*/
handleDeleteClick = (group) => {
Modal.confirm({
title: "信息确认",
content: "确认删除",
title: getLabel(111, "信息确认"),
content: getLabel(111, "确认删除吗?"),
onOk: () => {
let resultSalaryItemSet = [...this.state.dataList];
resultSalaryItemSet.map((sourceGroup, index) => {
@ -103,7 +104,7 @@ class SalaryItemSettings extends Component {
});
};
handleOpenModal = (record, title, isItem) => {
if (title === "分类名称编辑") {
if (title === getLabel(111, "分类名称编辑")) {
const { modalPayload } = this.state;
this.setState({
modalPayload: {
@ -226,11 +227,11 @@ class SalaryItemSettings extends Component {
<span className="titleWrapper">
<span className="salaryClassTitle">{item.groupName}</span>
<span className="iconWrapper">
<i className="icon-coms-edit" onClick={() => this.handleOpenModal(item, "分类名称编辑")}/>
<i className="icon-coms-edit" onClick={() => this.handleOpenModal(item, getLabel(111, "分类名称编辑"))}/>
<i className="icon-coms-Delete" onClick={() => this.handleDeleteClick(item)}/>
</span>
</span>
<i className="icon-coms-Add-to" onClick={() => this.handleOpenModal(item, "请选择薪资项目", true)}/>
<i className="icon-coms-Add-to" onClick={() => this.handleOpenModal(item, getLabel(111, "请选择薪资项目"), true)}/>
</div>
<div className="salaryItemContent">
{
@ -255,7 +256,7 @@ class SalaryItemSettings extends Component {
}}
className="wea-sortable-salary-item"
/> :
<div className="empty">暂无数据</div>
<div className="empty">{getLabel(111, "暂无数据")}</div>
}
</div>
</div>;
@ -265,8 +266,8 @@ class SalaryItemSettings extends Component {
<SalaryItemModal {...modalPayload} onCancel={this.handleCloseModal} onConfirm={this.handleConfirm}>
<div className="modalContent">
{
modalPayload.title === "分类名称编辑" ?
<WeaFormItem label="分类名称" labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
modalPayload.title === getLabel(111, "分类名称编辑") ?
<WeaFormItem label={getLabel(111, "分类名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInput value={modalPayload.groupName} onChange={this.handleChangeClassName}/>
</WeaFormItem>
: <WeaTransfer

View File

@ -1,13 +1,13 @@
import React from "react";
import { Radio, Switch } from "antd";
import { WeaButtonIcon, WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom";
import { WeaButtonIcon, WeaFormItem, WeaInput, WeaSearchGroup, WeaLocaleProvider } from "ecCom";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import BackgroundUpload from "../components/backgroundUpload";
import SalaryItemSettings from "./salaryItemSettings";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
export default class ShowSettingForm extends React.Component {
@ -56,10 +56,10 @@ export default class ShowSettingForm extends React.Component {
} = { ...salaryTemplateShowSet, ...JSON.parse(salaryTemplateShowSetStorage) };
return (
<div className="showSettingForm">
<WeaSearchGroup title="主题及其他设置" items={[]} needTigger showGroup>
<WeaSearchGroup title={getLabel(111, "主题及其他设置")} items={[]} needTigger showGroup>
<div className="themeSetting">
<WeaFormItem
label="工资单标题"
label={getLabel(111, "工资单标题")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -67,17 +67,17 @@ export default class ShowSettingForm extends React.Component {
this.handleChange({ theme: value });
}}/>
<span style={{ float: "right" }}>
<span>插入变量</span>
<span>{getLabel(111, "插入变量")}</span>
<a onClick={() => {
this.handleThemeNameCllck("${companyName}");
}} className="themeFormalStr" style={{ marginRight: "10px" }}>公司名称</a>
}} className="themeFormalStr" style={{ marginRight: "10px" }}>{getLabel(111, "公司名称")}</a>
<a onClick={() => {
this.handleThemeNameCllck("${salaryMonth}");
}} className="themeFormalStr">薪资所属月</a>
}} className="themeFormalStr">{getLabel(111, "薪资所属月")}</a>
</span>
</WeaFormItem>
<WeaFormItem
label="工资单图片"
label={getLabel(111, "工资单图片")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -86,7 +86,7 @@ export default class ShowSettingForm extends React.Component {
}}/>
</WeaFormItem>
<WeaFormItem
label="文本内容"
label={getLabel(111, "文本内容")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -95,19 +95,19 @@ export default class ShowSettingForm extends React.Component {
}}/>
</WeaFormItem>
<WeaFormItem
label="文本内容位置"
label={getLabel(111, "文本内容位置")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
<Radio.Group value={textContentPosition} onChange={(e) => {
this.handleChange({ textContentPosition: e.target.value });
}}>
<Radio value={"1"}>薪资项目前</Radio>
<Radio value={"2"}>薪资项目后</Radio>
<Radio value={"1"}>{getLabel(111, "薪资项目前")}</Radio>
<Radio value={"2"}>{getLabel(111, "薪资项目后")}</Radio>
</Radio.Group>
</WeaFormItem>
<WeaFormItem
label="薪资项为空时不显示"
label={getLabel(111, "薪资项为空时不显示")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -116,7 +116,7 @@ export default class ShowSettingForm extends React.Component {
}}/>
</WeaFormItem>
<WeaFormItem
label="薪资项为0时不显示"
label={getLabel(111, "薪资项为0时不显示")}
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
>
@ -130,9 +130,9 @@ export default class ShowSettingForm extends React.Component {
<WeaSearchGroup
title={
<div className="salarySetTitle">
<span>薪资项目设置</span>
<span>{getLabel(111, "薪资项目设置")}</span>
<WeaButtonIcon buttonType="add" type="primary"
onClick={() => this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, "添加分类")}/>
onClick={() => this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, getLabel(111, "添加分类"))}/>
</div>
}
items={[]} needTigger showGroup

View File

@ -1,11 +1,11 @@
import React from "react";
import { WeaButtonIcon, WeaSearchGroup } from "ecCom";
import { WeaButtonIcon, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import "./index.less";
import SalaryItemSettings from "./salaryItemSettings";
const getLabel = WeaLocaleProvider.getLabel;
@inject("payrollStore")
@observer
export default class TemplateSettingForm extends React.Component {
@ -22,9 +22,9 @@ export default class TemplateSettingForm extends React.Component {
<WeaSearchGroup
title={
<div className="salarySetTitle">
<span>薪资项目设置</span>
<span>{getLabel(111, "薪资项目设置")}</span>
<WeaButtonIcon buttonType="add" type="primary"
onClick={() => this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, "添加分类")}/>
onClick={() => this.salaryItemSettingsRef.handleOpenModal(toJS(templateBaseData).salarySob, getLabel(111, "添加分类"))}/>
</div>
}
items={[]} needTigger showGroup>

View File

@ -1,41 +1,44 @@
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import * as API from "../../../apis/payrollFiles";
import { Menu, message, Modal } from "antd";
import "../index.less";
const getLabel = WeaLocaleProvider.getLabel;
class AllWithoutPay extends Component {
handleClick = ({ key }) => {
const { selectedRowKeys = [], refreshList } = this.props;
if (key === "batchWithoutpay") {
if (selectedRowKeys.length === 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
return;
}
API.gotoStop(selectedRowKeys).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
refreshList();
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
}else{
} else {
const { pageInfo } = this.props;
if (pageInfo.total === 0) {
message.warning("您没有需要处理的待停薪人员!");
message.warning(getLabel(111, "您没有需要处理的待停薪人员!"));
return;
}
Modal.warning({
title: "信息确认",
content: `确定要将所有待停薪人员(共${pageInfo.total}条数据)设为停薪人员吗`,
title: getLabel(111, "信息确认"),
content: `${getLabel(111, "确定要将所有待停薪人员")}${getLabel(111, "共")}${pageInfo.total}${getLabel(111, "条数据")}${getLabel(111, "设为停薪人员吗")}`,
onOk: () => {
API.allGotoStop({}).then(({ status, data, errormsg }) => {
if (status) {
const { msg }= data;
message.info(msg || "操作成功!");
const { msg } = data;
message.info(msg || getLabel(111, "操作成功"));
refreshList();
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
}
@ -46,8 +49,8 @@ class AllWithoutPay extends Component {
render() {
return (
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
<Menu.Item key="allWithoutpay">全部停薪</Menu.Item>
<Menu.Item key="batchWithoutpay">批量停薪</Menu.Item>
<Menu.Item key="allWithoutpay">{getLabel(111, "全部停薪")}</Menu.Item>
<Menu.Item key="batchWithoutpay">{getLabel(111, "批量停薪")}</Menu.Item>
</Menu>
);
}

View File

@ -1,21 +1,24 @@
import React, { Component } from "react";
import { Menu, message } from "antd";
import { WeaLocaleProvider } from "ecCom";
import * as API from "../../../apis/payrollFiles";
import "../index.less";
const getLabel = WeaLocaleProvider.getLabel;
class BatchSuspendpay extends Component {
handleClick = ({ key }) => {
const { selectedRowKeys, refreshList } = this.props;
if (selectedRowKeys.length === 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
return;
}
API.cancelStop(selectedRowKeys).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
refreshList();
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
};
@ -23,7 +26,7 @@ class BatchSuspendpay extends Component {
render() {
return (
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
<Menu.Item key="batchSuspendpay">批量取消停薪</Menu.Item>
<Menu.Item key="batchSuspendpay">{getLabel(111, "批量取消停薪")}</Menu.Item>
</Menu>
);
}

View File

@ -1,7 +1,10 @@
import React, { Component } from "react";
import { Menu, message } from "antd";
import { WeaLocaleProvider } from "ecCom";
import "../index.less";
const getLabel = WeaLocaleProvider.getLabel;
class ExportMenu extends Component {
componentDidMount() {
}
@ -37,7 +40,7 @@ class ExportMenu extends Component {
handleExportSelect = () => {
const { selectedRowKeys } = this.props;
if (selectedRowKeys.length === 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
return;
}
const url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=${selectedRowKeys.join(",")}`;
@ -47,8 +50,8 @@ class ExportMenu extends Component {
render() {
return (
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
<Menu.Item key="handleExportAll">导出全部</Menu.Item>
<Menu.Item key="handleExportSelect">导出选中</Menu.Item>
<Menu.Item key="handleExportAll">{getLabel(111, "导出全部")}</Menu.Item>
<Menu.Item key="handleExportSelect">{getLabel(111, "导出选中")}</Menu.Item>
</Menu>
);
}

View File

@ -1,9 +1,12 @@
import React, { Component } from "react";
import { WeaLocaleProvider } from "ecCom";
import ImportModal from "../../../components/importModal";
import * as API from "../../../apis/payrollFiles";
import { Menu, Modal } from "antd";
import "../index.less";
const getLabel = WeaLocaleProvider.getLabel;
class ImportMenu extends Component {
constructor(props) {
super(props);
@ -26,7 +29,7 @@ class ImportMenu extends Component {
params.listType = "FIXED";
} else {
params.listType = this.state.importParams.importType;
params.importType = '';
params.importType = "";
}
API.salaryArchivePreview(params).then(({ status, data }) => {
if (status) {
@ -54,8 +57,8 @@ class ImportMenu extends Component {
const { key } = e;
if (key === "init") {
Modal.confirm({
title: "信息确认",
content: `若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入,点击确定继续导入`,
title: getLabel(111, "信息确认"),
content: getLabel(111, `若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入,点击确定继续导入`),
onOk: () => {
this.setState({
importParams: {
@ -96,7 +99,7 @@ class ImportMenu extends Component {
params.importType = this.state.importParams.importType;
params.listType = "FIXED";
} else {
params.importType = '';
params.importType = "";
params.listType = this.state.importParams.importType;
}
API.importSalaryArchive(params).then(({ status, data }) => {

View File

@ -14,6 +14,7 @@ import {
WeaFormItem,
WeaHelpfulTip,
WeaInput,
WeaLocaleProvider,
WeaPopoverHrm,
WeaSearchGroup,
WeaSelect,
@ -32,6 +33,7 @@ import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide";
import ChangeSalaryModal from "../salaryFile/changeSalaryModal";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const WeaTableComx = WeaTableNew.WeaTable;
@inject("payrollFilesStore", "taxAgentStore", "salaryFileStore")
@ -267,21 +269,21 @@ class Index extends Component {
allGotoFixed = () => {
const { pageInfo } = this.state;
if (pageInfo.total === 0) {
message.warning("您没有需要处理的待定薪人员!");
message.warning(getLabel(111, "您没有需要处理的待定薪人员!"));
return;
}
Modal.warning({
title: "信息确认",
content: `确定要将所有待定薪人员(共${pageInfo.total}条数据)设为发薪人员吗`,
title: getLabel(111, "信息确认"),
content: `${getLabel(111, "确定要将所有待定薪人员")}(${getLabel(111, "共")}${pageInfo.total}${getLabel(111, "条数据")}${getLabel(111, "设为发薪人员吗")}`,
onOk: () => {
API.allGotoFixed({}).then(({ status, data, errormsg }) => {
if (status) {
const { msg } = data;
message.info(msg || "操作成功!");
message.info(msg || getLabel(111, "操作成功"));
this.queryTabTotal();
this.query();
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
}
@ -303,11 +305,11 @@ class Index extends Component {
cancelStop = (id) => {
API.cancelStop([id]).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
this.queryTabTotal();
this.query();
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
};
@ -315,7 +317,7 @@ class Index extends Component {
deletePendingTodo = (params) => {
API.deletePendingTodo(params).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
this.setState({
selectedRowKeys: []
}, () => {
@ -323,7 +325,7 @@ class Index extends Component {
this.query();
});
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
};
@ -331,7 +333,7 @@ class Index extends Component {
deleteSuspendTodo = (params) => {
API.deleteSuspendTodo(params).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
this.setState({
selectedRowKeys: []
}, () => {
@ -339,14 +341,14 @@ class Index extends Component {
this.queryTabTotal();
});
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
};
handleClick = ({ key }) => {
const { selectedRowKeys } = this.state;
if (selectedRowKeys.length === 0) {
message.warning("请选择表格数据");
message.warning(getLabel(111, "请选择表格数据"));
return;
}
if (key === "batchDelete") {
@ -355,7 +357,7 @@ class Index extends Component {
API.gotoFixed(selectedRowKeys).then(({ status, data, errormsg }) => {
if (status) {
if (data.type === "success") {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
this.setState({
selectedRowKeys: []
}, () => {
@ -366,7 +368,7 @@ class Index extends Component {
message.info(data.msg);
}
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
}
@ -378,24 +380,24 @@ class Index extends Component {
return [
<Button type="primary" onClick={() => {
this.importRef.handleMenuClick({ key: "PENDING" });
}}>导入</Button>,
}}>{getLabel(111, "导入")}</Button>,
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
searchItemsValue={searchItemsValue}/>}>
<Button type="primary">导出<i className="icon-coms-down2" style={{
<Button type="primary">{getLabel(111, "导出")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
</Dropdown>,
<Button type="ghost" onClick={this.allGotoFixed}>全部设为发薪人员</Button>,
<Button type="ghost" onClick={this.allGotoFixed}>{getLabel(111, "全部设为发薪人员")}</Button>,
<Dropdown
overlay={
<Menu className="dropdownMenuWrapper" onClick={this.handleClick}>
<Menu.Item key="batchSet">批量设为发薪员工</Menu.Item>
<Menu.Item key="batchDelete">批量删除待办</Menu.Item>
<Menu.Item key="batchSet">{getLabel(111, "批量设为发薪员工")}</Menu.Item>
<Menu.Item key="batchDelete">{getLabel(111, "批量删除待办")}</Menu.Item>
</Menu>
}
>
<Button type="primary">更多<i className="icon-coms-down2" style={{
<Button type="primary">{getLabel(111, "更多")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
@ -416,14 +418,14 @@ class Index extends Component {
this.setState({ selectedRowKeys: [] });
}}/>
}>
<Button type="primary">导入<i className="icon-coms-down2" style={{
<Button type="primary">{getLabel(111, "导入")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
</Dropdown>,
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
searchItemsValue={searchItemsValue}/>}>
<Button type="primary">导出<i className="icon-coms-down2" style={{
<Button type="primary">{getLabel(111, "导出")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
@ -442,7 +444,7 @@ class Index extends Component {
}}
/>
}>
<Button type="primary" style={{ marginLeft: 8 }}>全部停薪<i className="icon-coms-down2" style={{
<Button type="primary" style={{ marginLeft: 8 }}>{getLabel(111, "全部停薪")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
@ -450,17 +452,17 @@ class Index extends Component {
<Button type="ghost" onClick={() => {
const { selectedRowKeys } = this.state;
if (selectedRowKeys.length === 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
return;
}
this.deleteSuspendTodo(selectedRowKeys);
}}>批量删除待办</Button>,
}}>{getLabel(111, "批量删除待办")}</Button>,
<Button type="primary" onClick={() => {
this.importRef.handleMenuClick({ key: "SUSPEND" });
}}>导入</Button>,
}}>{getLabel(111, "导入")}</Button>,
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
searchItemsValue={searchItemsValue}/>}>
<Button type="primary">导出<i className="icon-coms-down2" style={{
<Button type="primary">{getLabel(111, "导出")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
@ -478,14 +480,14 @@ class Index extends Component {
}}
/>
}>
<Button type="primary">批量取消停薪<i className="icon-coms-down2" style={{
<Button type="primary">{getLabel(111, "批量取消停薪")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
</Dropdown>,
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
searchItemsValue={searchItemsValue}/>}>
<Button type="primary">导出<i className="icon-coms-down2" style={{
<Button type="primary">{getLabel(111, "导出")}<i className="icon-coms-down2" style={{
marginLeft: 8,
verticalAlign: "middle"
}}/></Button>
@ -526,20 +528,20 @@ class Index extends Component {
//设为定薪员工
API.gotoFixed([id]).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
this.query();
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
} else if (key === "stopSalary") {
//停薪
API.gotoStop([id]).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
this.query();
} else {
message.error(errormsg || "操作失败!");
message.error(errormsg || getLabel(111, "操作失败"));
}
});
} else if (key === "deletePendingTodo") {
@ -560,14 +562,14 @@ class Index extends Component {
arrList.push(<Button type="primary" onClick={() => {
const linkUrl = url.indexOf("http") !== -1 ? url : `${window.location.origin}${url}`;
window.open(`${linkUrl}&salaryArchiveId=${id}`);
}}>发起调薪</Button>);
}}>{getLabel(111, "发起调薪")}</Button>);
}
if (showOperateBtn && selectedKey === "fixed") {
arrList.push(<Button type="primary" onClick={() => {
this.setState({ changeSalaryVisible: true });
}}>调薪</Button>);
}}>{getLabel(111, "调薪")}</Button>);
}
selectedKey !== "stop" && arrList.push(<Button type="primary" onClick={this.handleSave}>保存</Button>);
selectedKey !== "stop" && arrList.push(<Button type="primary" onClick={this.handleSave}>{getLabel(111, "保存")}</Button>);
return arrList;
};
//切换tab
@ -597,8 +599,8 @@ class Index extends Component {
const { salaryFileStore: { adjustSalaryItems, detailForm } } = this.props;
if ((selectedKey === "pending" && _.isEmpty(paysetParams.payStartDate)) || (selectedKey === "suspend" && _.isEmpty(paysetParams.payEndDate))) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -613,10 +615,10 @@ class Index extends Component {
};
API.savePaySet(payload).then(({ status, errormsg }) => {
if (status) {
message.success("操作成功!");
message.success(getLabel(111, "操作成功"));
this.query();
} else {
message.error(errormsg || "保存失败!");
message.error(errormsg || getLabel(111, "保存失败"));
}
});
};
@ -624,9 +626,9 @@ class Index extends Component {
handleSetpay = (params) => {
const { type, date } = params;
const { paysetParams } = this.state;
if (type === "起始发薪日期") {
if (type === getLabel(111, "起始发薪日期")) {
this.setState({ paysetParams: { ...paysetParams, payStartDate: date } });
} else if (type === "最后发薪日期") {
} else if (type === getLabel(111, "最后发薪日期")) {
this.setState({ paysetParams: { ...paysetParams, payEndDate: date } });
}
};
@ -662,16 +664,16 @@ class Index extends Component {
const { payrollFilesStore: { tableStore } } = this.props;
const renderSearch = () => {
const searchItems = [
{ com: this.Input("姓名", "username") },
{ com: this.Browser("分部", "subcompanyIds") },
{ com: this.Browser("部门", "departmentIds") },
{ com: this.Browser("岗位", "positionIds") },
{ com: this.Select("人员状态", "userstatus") },
// { com: this.Select("档案状态", "archiveStatus") },
{ com: this.Select("个税扣缴义务人", "taxAgentId") },
{ com: this.Input("工号", "workcode") }
{ com: this.Input(getLabel(111, "姓名"), "username") },
{ com: this.Browser(getLabel(111, "分部"), "subcompanyIds") },
{ com: this.Browser(getLabel(111, "部门"), "departmentIds") },
{ com: this.Browser(getLabel(111, "岗位"), "positionIds") },
{ com: this.Select(getLabel(111, "人员状态"), "userstatus") },
// { com: this.Select(getLabel(111, "档案状态"), "archiveStatus") },
{ com: this.Select(getLabel(111, "个税扣缴义务人"), "taxAgentId") },
{ com: this.Input(getLabel(111, "工号"), "workcode") }
];
return <WeaSearchGroup title={"基本信息"} items={searchItems} showGroup/>;
return <WeaSearchGroup title={getLabel(111, "基本信息")} items={searchItems} showGroup/>;
};
const adBtn = [
// 高级搜索内部按钮
@ -684,7 +686,7 @@ class Index extends Component {
pageSize: 10
}
}, () => this.query());
}}> 搜索 </Button>,
}}> {getLabel(111, "搜索")} </Button>,
<Button type="ghost" onClick={() => this.setState({
searchItemsValue: {
username: "",
@ -694,14 +696,14 @@ class Index extends Component {
userstatus: "",
archiveStatus: ""
}
})}> 重置 </Button>,
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}> 取消 </Button>
})}> {getLabel(111, "重置")} </Button>,
<Button type="ghost" onClick={() => this.setState({ showSearchAd: false })}> {getLabel(111, "取消")} </Button>
];
const rightMenu = [
{
key: "BTN_COLUMN",
icon: <i className="icon-coms-Custom"/>,
content: "显示列定制",
content: getLabel(111, "显示列定制"),
onClick: () => {
tableStore.setColSetVisible(true);
tableStore.tableColSet(true);
@ -711,7 +713,7 @@ class Index extends Component {
return (
<div className="payrollFilesWrapper">
<WeaTop
title="薪资档案" icon={<i className="icon-coms-fa"/>}
title={getLabel(111, "薪资档案")} icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D" showDropIcon={true}
dropMenuDatas={rightMenu}
>
@ -741,7 +743,7 @@ class Index extends Component {
this.query();
});
}} // 点搜索按钮时的回调this.handleSearch()
searchsBasePlaceHolder={"请输入姓名"}
searchsBasePlaceHolder={getLabel(111, "请输入姓名")}
onSearchChange={(v) => this.setState({
searchItemsValue: {
...this.state.searchItemsValue,
@ -790,7 +792,7 @@ class Index extends Component {
direction="right"
title={
<SlideModalTitle
subtitle="员工薪资档案"
subtitle={getLabel(111, "员工薪资档案")}
editable={false}
customOperate={this.renderEditSlideOperate()}
/>

View File

@ -5,13 +5,15 @@
* Date: 2022-09-19 18:15:32
*/
import React, { Component } from "react";
import { WeaFormItem, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
import { WeaFormItem, WeaLocaleProvider, WeaNewScroll, WeaSearchGroup, WeaSelect, WeaTop } from "ecCom";
import { CheckBox } from "../appConfig";
import { Button, message, Modal } from "antd";
import * as API from "../../apis/ruleconfig";
import "./index.less";
import ProgressModal from "../../components/progressModal";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
@ -52,7 +54,7 @@ class Index extends Component {
items: [
{
com: Select({
label: "排序字段",
label: getLabel(111, "排序字段"),
onChange: this.handleChane,
value: sysOrderRule.data.orderRule,
options: orderOptions
@ -60,7 +62,7 @@ class Index extends Component {
},
{
com: Select({
label: "正序/倒序",
label: getLabel(111, "正序/倒序"),
onChange: this.handleChane,
value: sysOrderRule.data.ascOrDesc,
options: ascOptions
@ -70,7 +72,7 @@ class Index extends Component {
importItems: [
{
com: Select({
label: "人员字段",
label: getLabel(111, "人员字段"),
onChange: this.handleChane,
value: sysConfCodeRule.data,
options: employeeOptions
@ -80,18 +82,18 @@ class Index extends Component {
enctryItems: queryAppsetting.data.showEncryptOperationButton === "true" ? [
{
com: CheckBox({
label: "加密设置",
label: getLabel(111, "加密设置"),
value: queryAppsetting.data.isOpenEncrypt,
onChange: (data) => this.handleChane({ type: "加密设置", selected: data })
onChange: (data) => this.handleChane({ type: getLabel(111, "加密设置"), selected: data })
})
}
] : [],
declareItems: [
{
com: CheckBox({
label: "个税申报",
label: getLabel(111, "个税申报"),
value: queryAppsetting.data.isOpenTaxDeclaration,
onChange: (data) => this.handleChane({ type: "个税申报", selected: data })
onChange: (data) => this.handleChane({ type: getLabel(111, "个税申报"), selected: data })
})
}
],
@ -138,8 +140,8 @@ class Index extends Component {
if (type === "ORDER") {
if (_.isEmpty(saveParams.orderRule) || _.isEmpty(saveParams.ascOrDesc)) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -147,17 +149,17 @@ class Index extends Component {
API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, order: false } });
if (status) {
message.success("保存成功!");
message.success(getLabel(111, "保存成功"));
let sysSetting = this.getSysSetting();
} else {
message.error(errormsg || "保存失败!");
message.error(errormsg || getLabel(111, "保存失败"));
}
});
} else if (type === "EMPLOYEE") {
if (_.isEmpty(saveParams.rule)) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
title: getLabel(111, "信息确认"),
content: getLabel(111, "必要信息不完整,红色*为必填项!")
});
return;
}
@ -165,16 +167,16 @@ class Index extends Component {
API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, employee: false } });
if (status) {
message.success("保存成功!");
message.success(getLabel(111, "保存成功"));
let sysSetting = this.getSysSetting();
} else {
message.error(errormsg || "保存失败!");
message.error(errormsg || getLabel(111, "保存失败"));
}
});
} else if (type === "ENCRYTION") {
Modal.confirm({
title: "信息确认",
content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!",
title: getLabel(111, "信息确认"),
content: getLabel(111, "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!"),
onOk: () => {
this.setState({ loading: { ...this.state.loading, encry: true } });
API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => {
@ -182,7 +184,7 @@ class Index extends Component {
if (status) {
const { isSuccess, progressId, msg } = data;
if (!isSuccess) {
message.error(errormsg || msg || "保存失败!");
message.error(errormsg || msg || getLabel(111, "保存失败"));
return;
}
this.setState({
@ -205,7 +207,7 @@ class Index extends Component {
progressVisible: false
});
});
message.success("保存成功");
message.success(getLabel(111, "保存成功"));
} else if (progress_statue === "in_progress" && this.timer) {
if (this.state.progress >= 90) {
this.setState({
@ -227,7 +229,7 @@ class Index extends Component {
progressVisible: false
});
});
message.error(errormsg || "保存失败!");
message.error(errormsg || getLabel(111, "保存失败"));
}
});
}, 1000);
@ -243,10 +245,10 @@ class Index extends Component {
API.operateTaxDeclarationFunction(_.pick(saveParams, ["operateTaxDeclaration"])).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, declare: false } });
if (status) {
message.success("保存成功!");
message.success(getLabel(111, "保存成功"));
let sysSetting = this.getSysSetting();
} else {
message.error(errormsg || "保存失败!");
message.error(errormsg || getLabel(111, "保存失败"));
}
});
}
@ -254,23 +256,23 @@ class Index extends Component {
handleChane = (data) => {
const { type, selected } = data;
if (type === "排序字段") {
if (type === getLabel(111, "排序字段")) {
this.setState({
saveParams: { ...this.state.saveParams, orderRule: selected }
});
} else if (type === "正序/倒序") {
} else if (type === getLabel(111, "正序/倒序")) {
this.setState({
saveParams: { ...this.state.saveParams, ascOrDesc: selected }
});
} else if (type === "人员字段") {
} else if (type === getLabel(111, "人员字段")) {
this.setState({
saveParams: { ...this.state.saveParams, rule: selected }
});
} else if (type === "加密设置") {
} else if (type === getLabel(111, "加密设置")) {
this.setState({
saveParams: { ...this.state.saveParams, enctry: selected }
});
} else if (type === "个税申报") {
} else if (type === getLabel(111, "个税申报")) {
this.setState({
saveParams: { ...this.state.saveParams, operateTaxDeclaration: selected }
});
@ -282,7 +284,7 @@ class Index extends Component {
return (
<div className="ruleWrapper">
<WeaTop
title={<span>规则配置</span>}
title={<span>{getLabel(111, "规则配置")}</span>}
icon={<i className="icon-coms-Flow-setting"/>}
iconBgcolor="#F14A2D"
buttons={[]}
@ -291,16 +293,17 @@ class Index extends Component {
<WeaSearchGroup
title={
<div className="titleWrapper">
<span>排序规则</span>
<Button type="primary" onClick={() => this.handleSave("ORDER")} loading={loading.order}>保存</Button>
<span>{getLabel(111, "排序规则")}</span>
<Button type="primary" onClick={() => this.handleSave("ORDER")}
loading={loading.order}>{getLabel(111, "保存")}</Button>
</div>
} showGroup center items={items}/>
<WeaSearchGroup
title={
<div className="titleWrapper">
<span>人员校验规则</span>
<span>{getLabel(111, "人员校验规则")}</span>
<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")}
loading={loading.employee}>保存</Button>
loading={loading.employee}>{getLabel(111, "保存")}</Button>
</div>
} showGroup center items={importItems}/>
{
@ -308,24 +311,24 @@ class Index extends Component {
<WeaSearchGroup
title={
<div className="titleWrapper">
<span>加密规则</span>
<span>{getLabel(111, "加密规则")}</span>
<Button type="primary" onClick={() => this.handleSave("ENCRYTION")}
loading={loading.encry}>保存</Button>
loading={loading.encry}>{getLabel(111, "保存")}</Button>
</div>
} showGroup center items={enctryItems}/>
}
<WeaSearchGroup
title={
<div className="titleWrapper">
<span>报税规则</span>
<span>{getLabel(111, "报税规则")}</span>
<Button type="primary" onClick={() => this.handleSave("DECLARATION")}
loading={loading.declare}>保存</Button>
loading={loading.declare}>{getLabel(111, "保存")}</Button>
</div>
} showGroup center items={declareItems}/>
{
this.state.progressVisible &&
<ProgressModal
title="加密/解密中..."
title={getLabel(111, "加密/解密中...")}
visible={this.state.progressVisible}
onCancel={() => {
this.setState({ progressVisible: false, progress: 0 });

View File

@ -1,10 +1,11 @@
import React from "react";
import { Button, Col, message, Row } from "antd";
import { WeaDatePicker, WeaDialog, WeaInput, WeaSelect, WeaTable } from "ecCom";
import { WeaDatePicker, WeaDialog, WeaInput, WeaLocaleProvider, WeaSelect, WeaTable } from "ecCom";
import { inject, observer } from "mobx-react";
import moment from "moment";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("salaryFileStore")
@observer
export default class ChangeSalaryModal extends React.Component {
@ -165,11 +166,14 @@ export default class ChangeSalaryModal extends React.Component {
// 保存
handleSave() {
const { salaryFileStore: { saveSalaryItem, editSingleSalaryItem, fetchSingleSalaryItemList, getArchiveForm }, recordId } = this.props;
const {
salaryFileStore: { saveSalaryItem, editSingleSalaryItem, fetchSingleSalaryItemList, getArchiveForm },
recordId
} = this.props;
let saveRequest = { ...this.state.request };
const { salaryArchiveItems, canOperator } = this.state;
if (salaryArchiveItems.length === 0) {
message.warning("请添加调薪明细");
message.warning(getLabel(111, "请添加调薪明细"));
return;
}
saveRequest.salaryArchiveItems = salaryArchiveItems.map(item => {
@ -202,7 +206,7 @@ export default class ChangeSalaryModal extends React.Component {
const { selectedRowKeys, salaryArchiveItems } = this.state;
let result = [...salaryArchiveItems];
if (selectedRowKeys.length === 0) {
message.warning("未选择条目");
message.warning(getLabel(111, "未选择条目"));
}
this.setState({
@ -221,7 +225,7 @@ export default class ChangeSalaryModal extends React.Component {
};
return (
<WeaDialog
title="调薪"
title={getLabel(111, "调薪")}
style={{ width: 800 }}
initLoadCss
visible={this.props.visible}
@ -230,12 +234,12 @@ export default class ChangeSalaryModal extends React.Component {
}}
buttons={[<Button type="primary" onClick={() => {
this.handleSave();
}}>保存</Button>]}
}}>{getLabel(111, "保存")}</Button>]}
>
<div className="changeSalaryWrapper">
<div className="changeSalaryModal">
<Row className="itemWrapper" style={{ lineHeight: "47px" }}>
<Col span={6}>生效日期</Col>
<Col span={6}>{getLabel(111, "生效日期")}</Col>
<Col span={18}>
<WeaDatePicker
viewAttr={((recordId && canOperator) || !recordId) ? 3 : 1}
@ -249,7 +253,7 @@ export default class ChangeSalaryModal extends React.Component {
</Col>
</Row>
<Row className="itemWrapper" style={{ lineHeight: "47px" }}>
<Col span={6}>调整原因</Col>
<Col span={6}>{getLabel(111, "调整原因")}</Col>
<Col span={18}>
<WeaSelect
value={adjustReason}
@ -268,7 +272,7 @@ export default class ChangeSalaryModal extends React.Component {
</Row>
<Row className="itemWrapper" style={{ lineHeight: "47px" }}>
<Col span={6}>
说明
{getLabel(111, "说明")}
</Col>
<Col span={18}>
<WeaInput
@ -284,7 +288,7 @@ export default class ChangeSalaryModal extends React.Component {
</div>
<div className="contentWrapper">
<div className="contentTitleWrapper" style={{ height: "40px", lineHeight: "40px" }}>
<span className="contentTitle" style={{ fontSize: "14px", color: "#666" }}>调薪明细</span>
<span className="contentTitle" style={{ fontSize: "14px", color: "#666" }}>{getLabel(111, "调薪明细")}</span>
{
!recordId &&
<div className="rightIconWrapper" style={{ display: "inline-block", float: "right" }}>
@ -295,14 +299,14 @@ export default class ChangeSalaryModal extends React.Component {
onClick={() => {
this.handleRemoveClick();
}}
><span className="icon-coms-form-delete-hot" title="删除"></span></Button>
><span className="icon-coms-form-delete-hot" title={getLabel(111, "删除")}></span></Button>
<Button
type="primary"
size="small"
onClick={() => {
this.handleAddItemClick();
}}
><span className="icon-coms-Add-to-hot" title="添加"></span></Button>
><span className="icon-coms-Add-to-hot" title={getLabel(111, "添加")}></span></Button>
</div>
}
</div>

View File

@ -1,10 +1,12 @@
import React from "react";
import { Menu, message, Modal, Popover } from "antd";
import { WeaLocaleProvider } from "ecCom";
import { inject, observer } from "mobx-react";
import ChangeSalaryModal from "./changeSalaryModal";
import { deleteSalaryItem } from "../../apis/archive";
import UnifiedTable from "../../components/UnifiedTable";
const getLabel = WeaLocaleProvider.getLabel;
@inject("salaryFileStore")
@observer
export default class SalaryItemChangeList extends React.Component {
@ -34,17 +36,17 @@ export default class SalaryItemChangeList extends React.Component {
};
deleteSalaryItem = (salaryArchiveItemId) => {
Modal.confirm({
title: "信息确认",
content: "是否删除该调整数据",
title: getLabel(111, "信息确认"),
content: getLabel(111, "是否删除该调整数据"),
onOk: () => {
const { salaryFileStore: { fetchSingleSalaryItemList } } = this.props;
deleteSalaryItem({ salaryArchiveItemId }).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
message.success(getLabel(111, "删除成功"));
this.searchParams = { salaryArchiveId: this.props.id, current: 1 };
fetchSingleSalaryItemList(this.searchParams);
} else {
message.error(errormsg || "删除失败");
message.error(errormsg || getLabel(111, "删除失败"));
}
});
},
@ -62,15 +64,15 @@ export default class SalaryItemChangeList extends React.Component {
if (selectedKey === "fixed") {
columns = [...columns, {
dataIndex: "operate",
title: "操作",
title: getLabel(111, "操作"),
render: (text, record) => {
return <div className="optWrapper">
<a href="javascript:void(0);" className="mr10" onClick={() => this.handleEdit(record)}>编辑</a>
<a href="javascript:void(0);" className="mr10" onClick={() => this.handleEdit(record)}>{getLabel(111, "编辑")}</a>
<Popover
overlayClassName="moreIconWrapper"
placement="bottomRight"
content={<Menu onClick={(e) => this.deleteSalaryItem(record.id)}>
<Menu.Item key="delete">删除</Menu.Item>
<Menu.Item key="delete">{getLabel(111, "删除")}</Menu.Item>
</Menu>} title="">
<i className="icon-coms-more"/>
</Popover>
@ -114,7 +116,7 @@ export default class SalaryItemChangeList extends React.Component {
this.handlePageChange(value);
},
total: singleSalaryItemList.total,
showTotal: (total) => `${total}`,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
current: singleSalaryItemList.pageNum
}}
xWidth={this.getColumns().length * 100}

View File

@ -1,5 +1,5 @@
import React from "react";
import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaInputNumber, WeaSearchGroup } from "ecCom";
import { WeaFormItem, WeaHelpfulTip, WeaInput, WeaInputNumber, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { inject, observer } from "mobx-react";
import SelectedTab from "../../components/selectedTab";
import SalaryItemChangeList from "./salaryItemChangeList";
@ -7,10 +7,11 @@ import TaxAgentChangeList from "./taxAgentChangeList";
import { PickDate } from "../appConfig";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
const selectedTabItems = [
{
key: "0",
name: "薪资调整记录"
name: getLabel(111, "薪资调整记录")
}
];
const baseInfolist = [
@ -18,15 +19,15 @@ const baseInfolist = [
id: 1,
items: [
{
label: "姓名",
label: getLabel(111, "姓名"),
value: "username"
},
{
label: "部门",
label: getLabel(111, "部门"),
value: "department"
},
{
label: "岗位",
label: getLabel(111, "岗位"),
value: "position"
}
]
@ -35,15 +36,15 @@ const baseInfolist = [
id: 2,
items: [
{
label: "入职时间",
label: getLabel(111, "入职时间"),
value: "hiredate"
},
{
label: "手机号",
label: getLabel(111, "手机号"),
value: "mobile"
},
{
label: "个税扣缴义务人",
label: getLabel(111, "个税扣缴义务人"),
value: "taxAgent"
}
]
@ -86,7 +87,7 @@ export default class SalaryFileViewSlide extends React.Component {
const items = [
{
com: PickDate({
label: "起始发薪日期",
label: getLabel(111, "起始发薪日期"),
viewAttr: selectedKey === "pending" ? 3 : 1,
value: paysetParams.payStartDate,
onChange: handleSetpay
@ -94,7 +95,7 @@ export default class SalaryFileViewSlide extends React.Component {
},
{
com: PickDate({
label: "最后发薪日期",
label: getLabel(111, "最后发薪日期"),
viewAttr: (selectedKey === "pending" || selectedKey === "fixed") ? 2 : selectedKey === "stop" ? 1 : 3,
value: paysetParams.payEndDate,
onChange: handleSetpay
@ -103,7 +104,7 @@ export default class SalaryFileViewSlide extends React.Component {
];
return (
<div className="salaryFileViewSlide">
<WeaSearchGroup title="基本信息" items={[]} needTigger showGroup center>
<WeaSearchGroup title={getLabel(111, "基本信息")} items={[]} needTigger showGroup center>
<table className="baseInfoWrapper">
<tbody>
{
@ -125,15 +126,15 @@ export default class SalaryFileViewSlide extends React.Component {
</tbody>
</table>
</WeaSearchGroup>
<WeaSearchGroup title="发薪设置" items={items} needTigger showGroup center/>
<WeaSearchGroup title={getLabel(111, "发薪设置")} items={items} needTigger showGroup center/>
<WeaSearchGroup
title={
<span>
<span>薪资档案</span>
<span>{getLabel(111, "薪资档案")}</span>
<WeaHelpfulTip
width={200}
title="提示:显示已生效的最新数据"
title={getLabel(111, "提示:显示已生效的最新数据")}
placement="topLeft"
style={{ marginLeft: 8 }}
/>
@ -169,7 +170,7 @@ export default class SalaryFileViewSlide extends React.Component {
/>
}
</WeaFormItem>
)) : <div>暂无数据</div>
)) : <div>{getLabel(111, "暂无数据")}</div>
}
</div>
}

View File

@ -1,81 +1,81 @@
import React from 'react';
import { Table } from 'antd'
import { WeaTable } from 'ecCom'
import { inject, observer } from 'mobx-react';
import EditAgentModal from './editAgentModal'
import React from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { inject, observer } from "mobx-react";
import EditAgentModal from "./editAgentModal";
@inject('salaryFileStore')
const getLabel = WeaLocaleProvider.getLabel;
@inject("salaryFileStore")
@observer
export default class TaxAgentChangeList extends React.Component {
constructor(props) {
super(props)
this.state = {
recordId: '',
editAgentVisible: false
constructor(props) {
super(props);
this.state = {
recordId: "",
editAgentVisible: false
};
this.searchParams = {};
}
componentWillMount() {
const { salaryFileStore: { fetchSingleTaxAgentList } } = this.props;
this.searchParams = { salaryArchiveId: this.props.id, current: 1 };
fetchSingleTaxAgentList(this.searchParams);
}
// 编辑回调
handleEdit(record) {
const { salaryFileStore: { setEditAgentVisible } } = this.props;
this.setState({
recordId: record.id,
editAgentVisible: true
});
}
// 获取Columns
getColumns() {
const { salaryFileStore: { singleTaxAgentList } } = this.props;
let columns = [];
if (singleTaxAgentList.columns) {
columns = [...singleTaxAgentList.columns];
}
return columns;
}
// 页面跳转
handlePageChange(value) {
this.searchParams.current = value;
const { salaryFileStore: { fetchSingleTaxAgentList } } = this.props;
fetchSingleTaxAgentList(this.searchParams);
}
render() {
const { salaryFileStore } = this.props;
const { singleTaxAgentList } = salaryFileStore;
return (
<div>
<WeaTable
dataSource={singleTaxAgentList.list ? singleTaxAgentList.list : []}
columns={this.getColumns()}
pagination={{
onChange: (value) => {
this.handlePageChange(value);
},
total: singleTaxAgentList.total,
showTotal: total => `${getLabel(83698, "共")} ${total} ${getLabel(18256, "条")}`,
current: singleTaxAgentList.pageNum
}}
/>
{
this.state.editAgentVisible && <EditAgentModal
currentId={this.props.id}
recordId={this.state.recordId}
visible={this.state.editAgentVisible}
onCancel={() => {
this.setState({ editAgentVisible: false });
}}
/>
}
this.searchParams = {}
}
componentWillMount() {
const { salaryFileStore: { fetchSingleTaxAgentList }} = this.props;
this.searchParams = {salaryArchiveId: this.props.id, current: 1}
fetchSingleTaxAgentList(this.searchParams)
}
// 编辑回调
handleEdit(record) {
const { salaryFileStore: {setEditAgentVisible} } = this.props;
this.setState({
recordId: record.id,
editAgentVisible: true
})
}
// 获取Columns
getColumns() {
const { salaryFileStore: {singleTaxAgentList} } = this.props;
let columns = []
if(singleTaxAgentList.columns) {
columns = [...singleTaxAgentList.columns]
}
return columns
}
// 页面跳转
handlePageChange(value) {
this.searchParams.current = value
const { salaryFileStore: { fetchSingleTaxAgentList }} = this.props;
fetchSingleTaxAgentList(this.searchParams)
}
render() {
const { salaryFileStore } = this.props;
const { singleTaxAgentList } = salaryFileStore
return (
<div>
<WeaTable
dataSource={singleTaxAgentList.list ? singleTaxAgentList.list: []}
columns={this.getColumns()}
pagination={{
onChange: (value) => {
this.handlePageChange(value)
},
total: singleTaxAgentList.total,
showTotal: (total) => `${total}`,
current: singleTaxAgentList.pageNum
}}
/>
{
this.state.editAgentVisible && <EditAgentModal
currentId={this.props.id}
recordId={this.state.recordId}
visible={this.state.editAgentVisible}
onCancel={() => {
this.setState({editAgentVisible: false})
}}
/>
}
</div>
)
}
}
</div>
);
}
}

View File

@ -1,64 +1,67 @@
import { WeaLocaleProvider } from "ecCom";
import { dataTypeOptions, patternOptions, roundingModeOptions } from "./options";
const getLabel = WeaLocaleProvider.getLabel;
export const columns = [
{
title: "名称",
title: getLabel(111, "名称"),
dataIndex: "title",
key: "title"
},
{
title: "属性",
title: getLabel(111, "属性"),
dataIndex: "title",
key: "title"
},
{
title: "类型",
title: getLabel(111, "类型"),
dataIndex: "title",
key: "title"
},
{
title: "薪资档案引用",
title: getLabel(111, "薪资档案引用"),
dataIndex: "refere",
key: "refere"
},
{
title: "默认使用",
title: getLabel(111, "默认使用"),
dataIndex: "refere",
key: "refere"
},
{
title: "进位规则",
title: getLabel(111, "进位规则"),
dataIndex: "title",
key: "title"
},
{
title: "保留小数位",
title: getLabel(111, "保留小数位"),
dataIndex: "title",
key: "title"
},
{
title: "取值方式",
title: getLabel(111, "取值方式"),
dataIndex: "title",
key: "title"
},
{
title: "备注",
title: getLabel(111, "备注"),
dataIndex: "title",
key: "title"
},
{
title: "操作",
title: getLabel(111, "操作"),
dataIndex: "cz",
key: "cz"
}
];
export const salaryItemFields = [
{
key: 'name',
label: '名称',
type: 'INPUT',
key: "name",
label: getLabel(111, "名称"),
type: "INPUT",
viewAttr: 3,
tip: ''
tip: ""
},
// {
// key: 'useInEmployeeSalary',
@ -68,84 +71,84 @@ export const salaryItemFields = [
// tip: '提示:开启后,该薪资项目不可删除或设为无效,取值方式会默认置为输入'
// },
{
key: 'useDefault',
label: '默认使用',
type: 'SWITCH',
key: "useDefault",
label: getLabel(111, "默认使用"),
type: "SWITCH",
viewAttr: 2,
tip: '提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除'
tip: getLabel(111, "提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除")
},
{
key: 'sharedType',
label: '可见性',
type: 'SELECT',
key: "sharedType",
label: getLabel(111, "可见性"),
type: "SELECT",
viewAttr: 2,
tip: ''
tip: ""
},
{
key: 'taxAgentIds',
label: '可见性范围',
type: 'SELECT',
key: "taxAgentIds",
label: getLabel(111, "可见性范围"),
type: "SELECT",
viewAttr: 3,
tip: ''
tip: ""
},
{
key: 'dataType',
label: '字段类型',
type: 'SELECT',
key: "dataType",
label: getLabel(111, "字段类型"),
type: "SELECT",
viewAttr: 3,
options: dataTypeOptions,
tip: ''
tip: ""
},
{
key: 'roundingMode',
label: '舍入规则',
type: 'SELECT',
key: "roundingMode",
label: getLabel(111, "舍入规则"),
type: "SELECT",
viewAttr: 2,
options: roundingModeOptions,
tip: ''
tip: ""
},
{
key: 'pattern',
label: '保留小数位',
type: 'SELECT',
key: "pattern",
label: getLabel(111, "保留小数位"),
type: "SELECT",
viewAttr: 2,
options: patternOptions,
tip: ''
tip: ""
},
{
key: 'valueType',
label: '取值方式',
type: 'RADIO',
key: "valueType",
label: getLabel(111, "取值方式"),
type: "RADIO",
viewAttr: 2,
tip: ''
tip: ""
},
{
key: 'formulaContent',
label: '公式',
type: 'INPUT',
key: "formulaContent",
label: getLabel(111, "公式"),
type: "INPUT",
viewAttr: 2,
tip: ''
tip: ""
},
{
key: "sortedIndex",
label: "显示顺序",
label: getLabel(111, "显示顺序"),
type: "INPUTNUMBER",
viewAttr: 2,
tip: ""
},
{
key: 'description',
label: '备注',
type: 'TEXTAREA',
key: "description",
label: getLabel(111, "备注"),
type: "TEXTAREA",
viewAttr: 2,
tip: ''
},
tip: ""
}
];
export const valTakeOptions = [
{ key: "1", showname: getLabel(111, "输入") },
{ key: "2", showname: getLabel(111, "公式") },
{ key: "3", showname: "SQL" }
];
export const valTakeOptions=[
{key: "1", showname: '输入'},
{key: "2", showname: '公式'},
{key: "3", showname: 'SQL'},
]

Some files were not shown because too many files have changed in this diff Show More