Merge branch 'release/2.14.5.2406.03' into custom/陕西万众-薪资账套薪资核算配置
# Conflicts: # pc4mobx/hrmSalary/apis/calculate.js # pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js # pc4mobx/hrmSalary/stores/calculate.js
This commit is contained in:
commit
4f5aa85c73
|
|
@ -228,6 +228,10 @@ export const getColumnDesc = (params) => {
|
|||
export const updateLockStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", params);
|
||||
};
|
||||
// 更新薪资核算结果的锁定状态
|
||||
export const updateLockEmpStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/lockEmp", params);
|
||||
};
|
||||
// 导入薪资核算添加表头字段缓存
|
||||
export const cacheImportField = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", params);
|
||||
|
|
@ -250,6 +254,32 @@ export const customCacheExportField = (params) => {
|
|||
export const salaryacctBatchUpdate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/batchUpdate", params);
|
||||
};
|
||||
//薪资核算-自定义导出模板保存新建
|
||||
export const saveExportTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/saveExportTemplate", params);
|
||||
};
|
||||
//薪资核算-获取自定义导出模板列表
|
||||
export const getExportTemplateList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/exportTemplateList", params);
|
||||
};
|
||||
//薪资核算-删除自定义导出模板列表
|
||||
export const deleteExportTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/deleteExportTemplate", params);
|
||||
};
|
||||
//薪资核算-获取导出模板详细信息
|
||||
export const getExportTemplateForm = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/getExportTemplateForm", params);
|
||||
};
|
||||
//薪资核算-薪资项目改变否
|
||||
export const getCompareSobConfig = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/compareSobConfig", "GET", params);
|
||||
};
|
||||
//薪资核算-更新薪资账套
|
||||
export const updateSobConfig = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params);
|
||||
};
|
||||
|
||||
|
||||
//陕西万众-保存或新建模板
|
||||
export const saveTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/saveTemplate", params);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
// form基础数据
|
||||
export const getBaseForm = (params) => {
|
||||
|
|
@ -19,3 +20,26 @@ export const getCondition = (params) => {
|
|||
export const getTableDatas = (params) => {
|
||||
return WeaTools.callApi("/api/demo03/weatableDemo", "GET", params);
|
||||
};
|
||||
//获取日志列表
|
||||
export const getLogs = params => {
|
||||
const payload = {
|
||||
...params, module: "hrsa", dataset: "dataset", authParams: "{}", transMethod: "hrsa",
|
||||
showColums: "[{\"columName\":\"操作时间\",\"columIndex\":\"createdate\",\"width\":\"5%\"},{\"columName\":\"操作人\",\"columIndex\":\"operatorname\",\"width\":\"2%\"},{\"columName\":\"操作类型\",\"columIndex\":\"operatetypename\",\"width\":\"5%\"},{\"columName\":\"对象\",\"columIndex\":\"targetname\",\"width\":\"4%\"},{\"columName\":\"客户端IP\",\"columIndex\":\"clientip\",\"width\":\"5%\"},{\"columName\":\"修改详情\",\"columIndex\":\"operatedesc\",\"width\":\"2%\"}]"
|
||||
};
|
||||
return postFetch("/api/bs/hrmelog/elog/getLogs", payload);
|
||||
};
|
||||
//获取单条操作记录的更新明细
|
||||
export const getDetailChanges = params => {
|
||||
const payload = {
|
||||
...params, module: "hrsa", detailTransMethod: "elogDemoDetail"
|
||||
};
|
||||
return postFetch("/api/bs/hrmelog/elog/getDetailChanges", payload);
|
||||
};
|
||||
//获取薪资账套全列表
|
||||
export const getSalarysobListAll = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/listAll", params);
|
||||
};
|
||||
//补算
|
||||
export const supplementAcctRecord = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/supplementAcctRecord", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ export const doSecondAuth = (params, headers) => {
|
|||
return formHeaderPost("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params, headers);
|
||||
// return WeaTools.callApi("/api/encrypt/secondauthsetting/doSecondAuth", "POST", params);
|
||||
};
|
||||
export const getPasswordForm = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
|
||||
};
|
||||
export const checkPassword = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -240,3 +240,11 @@ export const salaryBillBaseSetPreviewWaterMark = (params) => {
|
|||
export const getSmsSalaryItemSet = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/template/getSmsSalaryItemSet", "GET", params);
|
||||
};
|
||||
// 工资单导出PDF-检查
|
||||
export const genPdfBeforeExport = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/genPdfBeforeExport", "GET", params);
|
||||
};
|
||||
//工资单预览
|
||||
export const salaryBillPreview = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/preview", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
|
||||
//获取薪资档案各tab的人数
|
||||
export const queryTabTotal = (params) => {
|
||||
|
|
@ -11,65 +11,69 @@ export const queryList = ({ url, ...params }) => {
|
|||
};
|
||||
// 导入档案
|
||||
export const importSalaryArchive = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/importSalaryArchive', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/importSalaryArchive", params);
|
||||
};
|
||||
// 薪资档案预览
|
||||
export const salaryArchivePreview = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/preview', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/preview", params);
|
||||
};
|
||||
// 公共枚举接口
|
||||
export const commonEnumList = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
|
||||
};
|
||||
// 获取导入类型
|
||||
export const getImportTypes = () => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getImportTypes', 'GET', {});
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/getImportTypes", "GET", {});
|
||||
};
|
||||
// 发起调薪地址
|
||||
export const salaryAdjustmentInfo = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/process/salaryAdjustmentInfo", "GET", params);
|
||||
};
|
||||
// 停薪
|
||||
export const stopSalary = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/stopSalary', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/stopSalary", params);
|
||||
};
|
||||
// 一键全部设为定薪员工
|
||||
export const allGotoFixed = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoFixed', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoFixed", params);
|
||||
};
|
||||
// 设为定薪员工
|
||||
export const gotoFixed = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/gotoFixed', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/gotoFixed", params);
|
||||
};
|
||||
// 停薪
|
||||
export const gotoStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/gotoStop', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/gotoStop", params);
|
||||
};
|
||||
//全部停薪
|
||||
export const allGotoStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoStop', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/allGotoStop", params);
|
||||
};
|
||||
// 取消停薪
|
||||
export const cancelStop = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/cancelStop', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/cancelStop", params);
|
||||
};
|
||||
// 保存发薪设置
|
||||
export const savePaySet = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/savePaySet', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/savePaySet", params);
|
||||
};
|
||||
// 待定薪删除待办
|
||||
export const deletePendingTodo = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/deletePendingTodo', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/deletePendingTodo", params);
|
||||
};
|
||||
// 待停薪删除待办
|
||||
export const deleteSuspendTodo = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSuspendTodo", params);
|
||||
};
|
||||
// 待定薪、停薪员工 是否允许删除薪资档案
|
||||
export const salaryArchiveDelete = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=salaryArchiveDelete", "GET", params);
|
||||
};
|
||||
// 删除薪资档案
|
||||
export const deleteSalaryArchive = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive', params);
|
||||
}
|
||||
return postFetch("/api/bs/hrmsalary/salaryArchive/deleteSalaryArchive", params);
|
||||
};
|
||||
// 数据透视列表导出
|
||||
export const exportDataPerspective = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportDataPerspective", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export const inspectList = (params) => {
|
|||
};
|
||||
//社会福利台账-删除正常缴纳人员
|
||||
export const siaccountCommonDelete = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/common/delete", params);
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/supplementary/delete", params);
|
||||
};
|
||||
//社会福利台账-添加正常缴纳人员
|
||||
export const siaccountCommonSave = (params) => {
|
||||
|
|
@ -197,3 +197,11 @@ export const getBalancePaymentGroup = params => {
|
|||
export const addNewBalance = params => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/addNewBalance", params);
|
||||
};
|
||||
// 导入社保台账添加表头字段缓存-正常缴纳以及补缴
|
||||
export const cacheWelfareListField = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/cacheWelfareList", params);
|
||||
};
|
||||
// 导入社保台账添加表头字段缓存-补差缓存
|
||||
export const cacheBalanceWelfareList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
|
||||
//薪酬统计维度下拉列表
|
||||
export const dimensionGetForm = (params) => {
|
||||
|
|
@ -122,3 +122,15 @@ export const getExpandFieldSettings = (params) => {
|
|||
export const statisticsReportDuplicate = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/duplicate", "GET", params);
|
||||
};
|
||||
//薪酬统计报表-薪资明细列表
|
||||
export const getSalaryList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryList", params);
|
||||
};
|
||||
//薪酬统计报表-薪资明细列表总计行
|
||||
export const getSalaryListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/report/statistics/employee/salaryListSum", params);
|
||||
};
|
||||
// 薪酬统计报表-薪资明细导出
|
||||
export const exportSalaryList = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
export const logColumns = [
|
||||
{
|
||||
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: "客户端IP",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
}
|
||||
]
|
||||
|
||||
export const testColumns = [
|
||||
{
|
||||
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',
|
||||
},
|
||||
]
|
||||
|
||||
export const dataSource = [];
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
//薪资核算-自定义导出-模板设置
|
||||
export const tempConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["templateName"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "导出模板名称"),
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: ""
|
||||
}
|
||||
];
|
||||
|
|
@ -36,7 +36,6 @@ class Index extends Component {
|
|||
handleSendCaptcha = () => {
|
||||
sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
console.log(data);
|
||||
this.timeRef = setInterval(() => {
|
||||
const { time } = this.state;
|
||||
this.setState({ time: time - 1 }, () => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaTop title={getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" {...this.props}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -5,9 +5,11 @@
|
|||
* Date: 2023/9/5
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { postFetch } from "../../../util/request";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class ImpStep2 extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -41,9 +43,15 @@ class ImpStep2 extends Component {
|
|||
render() {
|
||||
const { dataSource, columns, loading } = this.state;
|
||||
const { scrollHeight } = this.props;
|
||||
const pagination = {
|
||||
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`,
|
||||
total: dataSource.length,
|
||||
showSizeChanger: true
|
||||
};
|
||||
return (
|
||||
<WeaTable
|
||||
dataSource={dataSource} columns={columns} loading={loading} scroll={{ x: 800, y: `${scrollHeight}px` }}
|
||||
pagination={pagination}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,6 +120,58 @@
|
|||
}
|
||||
}
|
||||
|
||||
.import-option {
|
||||
.screenWrapper {
|
||||
padding: 0;
|
||||
margin: 10px;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0 16px;
|
||||
|
||||
.wea-date-picker {
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-helpful-tip {
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.attendanceFormWrapper {
|
||||
padding: 0 10px;
|
||||
margin: 10px 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
width: 200px !important;
|
||||
}
|
||||
|
||||
.ant-select-selection, .ant-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ant-select-selection {
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 日志查看-详情
|
||||
* Description:
|
||||
* Date: 2024/1/25
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
|
||||
import * as API from "../../../../apis";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const WeaTransferList = WeaTransfer.list;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getDetailChanges(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
dataSource: [],
|
||||
loading: false
|
||||
});
|
||||
}
|
||||
|
||||
getDetailChanges = (props) => {
|
||||
const { mainid, logFunction } = props;
|
||||
const payload = { function: logFunction, mainid };
|
||||
this.setState({ loading: true });
|
||||
API.getDetailChanges(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
this.setState({
|
||||
dataSource: _.map(data, (o, i) => ({
|
||||
...o, index: i + 1,
|
||||
valueschanges: _.map(o.valueschanges, (g, gi) => ({ id: gi + 1, name: g }))
|
||||
}))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource } = this.state;
|
||||
const scrollHeight = this.logDetailRef ? this.logDetailRef.state.height - 32 : 606.6;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll className="logDialog" initLoadCss ref={dom => this.logDetailRef = dom}
|
||||
style={{
|
||||
width: 750,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="logDialogContent">
|
||||
{
|
||||
_.map(dataSource, item => (!_.isEmpty(item.valueschanges) ? <WeaTransferList
|
||||
data={item.valueschanges} renderItem={(it) => (<div className="detailBox">
|
||||
<div className="order">{it.id}</div>
|
||||
<div className="content" title={it.name}>{it.name}</div>
|
||||
</div>)}
|
||||
height={scrollHeight} checkedCb={() => ({})} checkedKeys={[]}
|
||||
/> : <div className="empty">{getLabel(111, "无数据变更记录")}</div>))
|
||||
}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
import React from "react";
|
||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { Button } from "antd";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
export const logConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["date"],
|
||||
fieldcol: 18,
|
||||
label: "操作时间",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["operator"],
|
||||
fieldcol: 18,
|
||||
label: "操作人",
|
||||
lanId: 17482,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["targetname"],
|
||||
fieldcol: 18,
|
||||
label: "对象",
|
||||
lanId: 106,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["operatetypename"],
|
||||
fieldcol: 18,
|
||||
label: "操作类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: ""
|
||||
}
|
||||
];
|
||||
|
||||
export const renderLogSearchsForm = (form, condition, onSearch = () => void (0), onReset = () => void (0)) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && condition && condition.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom"
|
||||
>
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||
{
|
||||
getKey(fields) === "operatetypename" &&
|
||||
<div style={{ position: "absolute", right: "-148px", top: "0" }}>
|
||||
<Button type="ghost" onClick={onReset} style={{ marginRight: 10 }}>{getLabel(2022, "重置")}</Button>
|
||||
<Button type="primary" onClick={onSearch}>{getLabel(388113, "搜索")}</Button>
|
||||
</div>
|
||||
}
|
||||
</WeaFormItem>),
|
||||
colSpan: 1
|
||||
});
|
||||
});
|
||||
group.push(
|
||||
<WeaSearchGroup col={3} needTigger={true} title={c.title} showGroup={c.defaultshow} items={items} center={false}
|
||||
/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
|
|
@ -1,99 +1,130 @@
|
|||
import React from 'react'
|
||||
import { Button, Modal } from 'antd';
|
||||
import { WeaInput, WeaRangePicker, WeaTable} from 'ecCom'
|
||||
import { logColumns, dataSource } from "../../common/columns"
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪酬日志查看
|
||||
* Description:
|
||||
* Date: 2024/1/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import DetailLogView from "./components/detailLogView";
|
||||
import { logConditions, renderLogSearchsForm } from "./config";
|
||||
import * as API from "../../apis/index";
|
||||
import "./index.less";
|
||||
|
||||
export default class LogViewModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state ={
|
||||
value: ""
|
||||
}
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("baseFormStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false, conditions: [], logDetailDialog: { visible: false, title: "", logFunction: "", mainid: "" }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
this.setState({
|
||||
conditions: _.map(logConditions, it => ({
|
||||
...it, items: _.map(it.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
|
||||
}))
|
||||
}, () => form.initFormFields(this.state.conditions));
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getLogs({}, nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({
|
||||
dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
});
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<Modal title="操作日志" visible={this.props.visible}
|
||||
onOk={() => alert("ok")} onCancel={this.props.onCancel}
|
||||
className="logViewModal"
|
||||
style={{ top: 150 }}
|
||||
width={'80%'} height={'50%'}
|
||||
>
|
||||
<div className="searchBar">
|
||||
<div className="searchBarItem searchDateRange">
|
||||
<div className="searchBarLabel">操作时间</div>
|
||||
<div>
|
||||
<WeaRangePicker
|
||||
value={["2019-02-03", "2019-03-08"]}
|
||||
onChange={v => this.setState({ value: v })}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="searchBarItem">
|
||||
<div className="searchBarLabel">操作人</div>
|
||||
<div>
|
||||
<WeaInput
|
||||
id="test"
|
||||
style={{ width: 200 }}
|
||||
value={this.state.value}
|
||||
onChange={value => {
|
||||
console.log(value);
|
||||
this.setState({ value });
|
||||
}}
|
||||
customBlur={v => {
|
||||
console.log("custom blur", v);
|
||||
}}
|
||||
onFocus={v => console.log("focus", v)}
|
||||
onBlur={v => console.log("blur", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div className="searchBarItem">
|
||||
<div className='searchBarLabel'>对象</div>
|
||||
<div>
|
||||
<WeaInput
|
||||
id="test"
|
||||
style={{ width: 200 }}
|
||||
value={this.state.value}
|
||||
onChange={value => {
|
||||
console.log(value);
|
||||
this.setState({ value });
|
||||
}}
|
||||
customBlur={v => {
|
||||
console.log("custom blur", v);
|
||||
}}
|
||||
onFocus={v => console.log("focus", v)}
|
||||
onBlur={v => console.log("blur", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
getLogs = (extra = {}, props) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { baseFormStore: { form }, logFunction, filterConditions } = props;
|
||||
const payload = {
|
||||
...pageInfo, ...extra, searchMap: { ...form.getFormParams() },
|
||||
function: logFunction, showColums: "", filterConditions
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getLogs(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource, columns: _.map(columns, it => {
|
||||
if (it.dataIndex === "operatedesc") {
|
||||
return {
|
||||
...it, render: (__, record) => (<a href="javascript:void(0);" onClick={() => {
|
||||
const { operatedesc: title, uuid: mainid } = record;
|
||||
this.setState({ logDetailDialog: { visible: true, title, logFunction, mainid } });
|
||||
}}>{getLabel(33564, "查看")}</a>)
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
<div className="searchBarItem">
|
||||
<div className='searchBarLabel'>操作类型</div>
|
||||
<div>
|
||||
<WeaInput
|
||||
id="test"
|
||||
style={{ width: 200 }}
|
||||
value={this.state.value}
|
||||
onChange={value => {
|
||||
console.log(value);
|
||||
this.setState({ value });
|
||||
}}
|
||||
customBlur={v => {
|
||||
console.log("custom blur", v);
|
||||
}}
|
||||
onFocus={v => console.log("focus", v)}
|
||||
onBlur={v => console.log("blur", v)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="searchBarItem">
|
||||
<Button type="primary" className="searchBtn">搜索</Button>
|
||||
</div>
|
||||
</div>
|
||||
<WeaTable columns={logColumns} dataSource={dataSource} />
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { loading, dataSource, columns, pageInfo, conditions, logDetailDialog } = this.state;
|
||||
const { baseFormStore: { form } } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.getLogs({}, this.props));
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getLogs({}, this.props));
|
||||
}
|
||||
};
|
||||
const scrollHeight = this.logRef ? this.logRef.state.height - 254 : 606.6;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} title={getLabel(111, "操作日志")}
|
||||
ref={dom => this.logRef = dom} className="logDialog" initLoadCss
|
||||
style={{
|
||||
width: 1150,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="logDialogContent">
|
||||
{renderLogSearchsForm(form, conditions, () => this.getLogs({ current: 1 }, this.props), () => {
|
||||
form.resetForm();
|
||||
this.getLogs({ current: 1 }, this.props);
|
||||
})}
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource} loading={loading} className="logTable"
|
||||
pagination={pagination} scroll={{ y: `${scrollHeight}px` }}
|
||||
/>
|
||||
<DetailLogView {...logDetailDialog}
|
||||
onCancel={() => this.setState({ logDetailDialog: { ...logDetailDialog, visible: false } })}/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
.logDialog {
|
||||
.wea-dialog-body {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.logDialogContent {
|
||||
background: #F6F6F6;
|
||||
padding: 16px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #ffff;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
background: #FFF;
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logTable {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.wea-transfer-list-wrapper {
|
||||
border: none;
|
||||
|
||||
.ant-tree-switcher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.transfer-tree {
|
||||
background: #FFF;
|
||||
border: 1px solid #dadada;
|
||||
padding: 0;
|
||||
|
||||
& > li:not(:last-child) {
|
||||
.detailBox .content {
|
||||
border-bottom: 1px solid #dadada;
|
||||
}
|
||||
}
|
||||
|
||||
& > li {
|
||||
margin: 0 !important;
|
||||
|
||||
.detailBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.order {
|
||||
width: 35px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-height: 40px;
|
||||
line-height: 40px;
|
||||
color: #000;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Index extends Component {
|
||||
render() {
|
||||
const { theme, background, tip, tipPosi, itemTypeList, title } = this.props;
|
||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "mobile");
|
||||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "mobile");
|
||||
return (
|
||||
<React.Fragment>
|
||||
{/*<div className="pbmc-head">{title || getLabel(111, "薪酬预览")}</div>*/}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 更多菜单列表
|
||||
* Description:
|
||||
* Date: 2023/12/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Menu } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showDrop: false
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const { showDrop } = this.state;
|
||||
const { dropMenuDatas } = this.props;
|
||||
const menu = dropMenuDatas ?
|
||||
<Menu mode="vertical" onClick={(o) => {
|
||||
dropMenuDatas.forEach(d => d.key === o.key && typeof d.onClick === "function" && d.onClick(o.key));
|
||||
}}>
|
||||
{
|
||||
dropMenuDatas && dropMenuDatas.map((d, i) => {
|
||||
return (
|
||||
<Menu.Item disabled={d.disabled} key={d.key || i}>
|
||||
<span className="menu-icon">{d.icon}</span>
|
||||
{d.content}
|
||||
</Menu.Item>
|
||||
);
|
||||
})}
|
||||
</Menu> : "";
|
||||
return (
|
||||
<div className="more-btn-menu-wrapper">
|
||||
{
|
||||
!_.isEmpty(dropMenuDatas) &&
|
||||
<span className="more-btn" onClick={() => this.setState({ showDrop: true })}>
|
||||
<i className="more-btn-icon icon-New-Flow-menu"/>
|
||||
</span>
|
||||
}
|
||||
<div className="more-btn-menu"
|
||||
onMouseLeave={() => this.setState({ showDrop: false })}
|
||||
style={{ display: showDrop ? "block" : "none" }}>
|
||||
<span className="more-btn"
|
||||
onClick={() => this.setState({ showDrop: false })}>
|
||||
<i className="more-btn-icon icon-New-Flow-menu"/>
|
||||
</span>
|
||||
<div className="more-btn-menu-icon-background"></div>
|
||||
{menu}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
.more-btn-menu-wrapper {
|
||||
position: relative;
|
||||
|
||||
.more-btn {
|
||||
display: inline-block;
|
||||
padding-left: 20px;
|
||||
line-height: 40px;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
||||
.more-btn-icon {
|
||||
font-size: 16px;
|
||||
color: #484848;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.more-btn-menu {
|
||||
max-width: 200px;
|
||||
position: absolute;
|
||||
right: -14px;
|
||||
top: 45px;
|
||||
border: 1px solid #dadada;
|
||||
-webkit-box-shadow: 0 0 2px #dadada;
|
||||
box-shadow: 0 0 2px #dadada;
|
||||
z-index: 99;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
background: #FFF;
|
||||
|
||||
.more-btn {
|
||||
display: block;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
height: 44px;
|
||||
line-height: 35px;
|
||||
position: absolute;
|
||||
right: -1px;
|
||||
top: -44px;
|
||||
padding: 0 13px;
|
||||
border: 1px solid #dadada;
|
||||
border-bottom: 0;
|
||||
-webkit-box-shadow: 0 -1px 2px -1px #dadada;
|
||||
box-shadow: 0 -1px 2px -1px #dadada;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.more-btn-menu-icon-background {
|
||||
width: 36px;
|
||||
height: 100%;
|
||||
background-color: #f2f5f7;
|
||||
border: 1px solid #dadada;
|
||||
border-right: 0;
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
left: -1px;
|
||||
z-index: 0;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.ant-menu {
|
||||
margin: 10px 0;
|
||||
border: 0;
|
||||
text-align: left;
|
||||
min-width: 120px;
|
||||
|
||||
.ant-menu-item {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0 5px 0 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.menu-icon {
|
||||
display: inline-block;
|
||||
width: 36px;
|
||||
margin-right: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Content extends Component {
|
||||
render() {
|
||||
const { theme, background, tip, tipPosi, itemTypeList, sendTime = new Date() } = this.props;
|
||||
const { onlyOneGrup, showData } = dealTemplate(itemTypeList, "pc");
|
||||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
||||
return (
|
||||
<div className="salary-preview-container">
|
||||
<div style={{ border: "10px solid #F3F9FF" }}>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export const dealTemplate = (itemTypeList, type) => {
|
|||
const { items, groupName, groupId } = group;
|
||||
if (items.length !== 0) {
|
||||
items.forEach((item) => {
|
||||
item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : "100";
|
||||
item.salaryItemValue = !_.isNil(item.salaryItemValue) ? item.salaryItemValue : "";
|
||||
});
|
||||
if (items.length % 2 && type === "pc") items.push({});
|
||||
// 未分类不展示标题
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import { WeaCheckbox, WeaDialog, WeaInputSearch } from "ecCom";
|
|||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
export default class SelectItemModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -58,10 +57,19 @@ export default class SelectItemModal extends React.Component {
|
|||
const bottomLeft = <WeaCheckbox content="只显示已选中字段" onChange={onShowOnlyChecked}/>;
|
||||
return (
|
||||
<WeaDialog {...extra} hasScroll title={titleComp}
|
||||
style={{ width: 592, height: 248 }}
|
||||
buttons={btns} moreBtn={moreBtn}
|
||||
initLoadCss className="setWrapper"
|
||||
bottomLeft={bottomLeft}
|
||||
style={{
|
||||
width: 800,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</WeaDialog>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
flex-wrap: wrap;
|
||||
|
||||
li {
|
||||
width: 124px;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
padding: 4px 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,21 +11,22 @@ class SelectItemsWrapper extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchVal: "",
|
||||
selectItem: [],
|
||||
groupItem: [],
|
||||
showOnlyChecked: false
|
||||
searchVal: "", selectItem: [], groupItem: [], showOnlyChecked: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { dataSource } = this.props
|
||||
this.initSelectItem();
|
||||
}
|
||||
|
||||
initSelectItem = () => {
|
||||
const { dataSource } = this.props;
|
||||
this.setState({
|
||||
selectItem: _.map(_.filter(_.reduce(dataSource, (pre, cur) => {
|
||||
return [...pre, ...cur.items];
|
||||
}, []), item => !!item.checked), it => it.id)
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleSearchItemSet = (searchVal) => this.setState({ searchVal });
|
||||
handleShowOnlyChecked = (showOnlyChecked) => this.setState({ showOnlyChecked: !!Number(showOnlyChecked) });
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import TemplatePreview from "./pages/payroll/templatePreview";
|
|||
import PayrollTemplatePreview from "./pages/payroll/templatePreview/tmpPreview"; //重构的工资单模板预览页面
|
||||
import MobilePayroll from "./pages/mobilePayroll";
|
||||
import SysConfig from "./pages/sysConfig";
|
||||
import RuleConfig from "./pages/ruleConfig";
|
||||
import RuleConfig from "./pages/ruleConfig/ruleConfig";
|
||||
import Appconfig from "./pages/appConfig";
|
||||
import FieldManagement from "./pages/fieldManagement";
|
||||
import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics";
|
||||
|
|
@ -51,6 +51,7 @@ import WatermarkPreview from "./pages/payroll/watermarkPreview";
|
|||
import ExternalPersonManage from "./pages/externalPersonManage";
|
||||
import AdjustSalaryManage from "./pages/adjustSalaryManage";
|
||||
import TopologyMap from "./pages/topologyMap";
|
||||
import SupplementaryCalc from "./pages/supplementaryCalc";
|
||||
|
||||
import stores from "./stores";
|
||||
import "./style/index";
|
||||
|
|
@ -110,43 +111,26 @@ const DataAcquisition = (props) => props.children;
|
|||
// reportView 薪酬报表查看
|
||||
// externalPersonManage 非系统人员管理
|
||||
// adjustSalaryManage 档案管理
|
||||
// supplementaryCalc 补算
|
||||
|
||||
const Routes = (
|
||||
<Route
|
||||
key="hrmSalary"
|
||||
path="hrmSalary"
|
||||
onEnter={getLocaleLabel}
|
||||
component={Home}>
|
||||
<Route key="hrmSalary" path="hrmSalary" onEnter={getLocaleLabel} component={Home}>
|
||||
<Route key="historicalPayroll" path="historicalPayroll" component={HistoricalPayroll}/>
|
||||
<Route key="salaryAdjustmentRecords" path="salaryAdjustmentRecords" component={SalaryAdjustmentRecords}/>
|
||||
<Route key="mySalaryMobile" path="mySalaryMobile" component={MySalaryMobile}/>
|
||||
<Route key="mySalary" path="mySalary" component={MySalary}/>
|
||||
<Route key="mySalaryView" path="mySalary/:salaryInfoId" component={MySalaryView}/>
|
||||
<Route
|
||||
key="socialSecurityBenefits"
|
||||
path="socialSecurityBenefits"
|
||||
component={SocialSecurityBenefits}>
|
||||
<Route key="socialSecurityBenefits" path="socialSecurityBenefits" component={SocialSecurityBenefits}>
|
||||
<Route key="programme" path="programme" component={Programme}/>
|
||||
<Route key="archives" path="archives" component={Archives}/>
|
||||
<Route key="standingBook" path="standingBook" component={StandingBook}/>
|
||||
<Route
|
||||
key="standingBookDetail"
|
||||
path="standingBookDetail"
|
||||
component={StandingBookDetail}
|
||||
/>
|
||||
<Route
|
||||
key="sbofflineComparison"
|
||||
path="sbofflineComparison"
|
||||
component={StandingBookOfflineComparison}
|
||||
/>
|
||||
<Route key="standingBookDetail" path="standingBookDetail" component={StandingBookDetail} />
|
||||
<Route key="sbofflineComparison" path="sbofflineComparison" component={StandingBookOfflineComparison} />
|
||||
</Route>
|
||||
<Route key="salaryItem" path="salaryItem" component={SalaryItem}/>
|
||||
<Route key="salaryFile" path="salaryFile" component={SalaryFiles}/>
|
||||
<Route key="adjustSalaryManage" path="adjustSalaryManage" component={AdjustSalaryManage}/>
|
||||
<Route
|
||||
key="dataAcquisition"
|
||||
path="dataAcquisition"
|
||||
component={DataAcquisition}>
|
||||
<Route key="dataAcquisition" path="dataAcquisition" component={DataAcquisition}>
|
||||
<Route key="cumDeduct" path="cumDeduct" component={CumDeduct}/>
|
||||
<Route key="otherDeduct" path="otherDeduct" component={OtherDeduct}/>
|
||||
<Route key="cumSituation" path="cumSituation" component={CumSituation}/>
|
||||
|
|
@ -168,11 +152,7 @@ const Routes = (
|
|||
<Route key="templatePreview" path="templatePreview" component={TemplatePreview}/>
|
||||
<Route key="payrollinfo" path="payrollinfo" component={PayrollTemplatePreview}/>
|
||||
<Route key="declare" path="declare" component={Declare}/>
|
||||
<Route
|
||||
key="generateDeclarationDetail"
|
||||
path="generateDeclarationDetail"
|
||||
component={GenerateDeclarationDetail}
|
||||
/>
|
||||
<Route key="generateDeclarationDetail" path="generateDeclarationDetail" component={GenerateDeclarationDetail} />
|
||||
<Route key="taxRate" path="taxRate" component={TaxRate}/>
|
||||
<Route key="taxAgent" path="taxAgent" component={TaxAgent}/>
|
||||
<Route key="mobilepayroll" path="mobilepayroll" component={MobilePayroll}/>
|
||||
|
|
@ -185,6 +165,7 @@ const Routes = (
|
|||
<Route key="reportView" path="reportView" component={ReportView}/>
|
||||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
||||
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import { adjustRecordItemList } from "../../apis/adjustManage";
|
|||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import AdjustAdvanceSearchPannel from "./components/adjustAdvanceSearchPannel";
|
||||
import cs from "classnames";
|
||||
import { Button } from "antd";
|
||||
import "./index.less";
|
||||
import { Button, Dropdown, Menu } from "antd";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -25,7 +25,8 @@ class Index extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
loading: false, columns: [], dataSource: [], showSearchAd: false,
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, logDialogVisible: false,
|
||||
filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -50,19 +51,33 @@ class Index extends Component {
|
|||
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
||||
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
this.setState({ loading: true, showSearchAd: false });
|
||||
adjustRecordItemList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||
columns: _.map(columns, o => {
|
||||
columns: [..._.map(columns, o => {
|
||||
if (o.dataIndex === "username") {
|
||||
return { ...o, width: 150, fixed: "left" };
|
||||
}
|
||||
return { ...o, width: 150 };
|
||||
})
|
||||
}), {
|
||||
dataIndex: "options", title: getLabel(30585, "操作"),
|
||||
width: 120, render: (_, record) => (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.onDropMenuClick("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
|
|
@ -88,9 +103,21 @@ class Index extends Component {
|
|||
}
|
||||
this.handleDebounce();
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource, columns, pageInfo, showSearchAd } = this.state;
|
||||
const { loading, dataSource, columns, pageInfo, showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
|
|
@ -111,11 +138,17 @@ class Index extends Component {
|
|||
return (
|
||||
<WeaTop
|
||||
title={getLabel(111, "调薪管理")} buttonSpace={10} className="adjustManageLayout"
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D" showDropIcon
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.adjustExport}>{getLabel(17416, "导出")}</Button>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.openAdvanceSearch()}
|
||||
onAdvanceSearch={this.adjustRecordItemList}/>
|
||||
]} onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
|
|
@ -129,6 +162,9 @@ class Index extends Component {
|
|||
dataSource={dataSource} loading={loading}
|
||||
pagination={pagination} columns={columns}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarcitemadj" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:薪酬统计报表-高级搜索
|
||||
* Description:
|
||||
* Date: 2024/3/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
render() {
|
||||
const { attendanceStore: { salaryDetailSearchForm } } = this.props;
|
||||
return (
|
||||
<div className="achrive-advance-search">
|
||||
<WeaInputSearch value={salaryDetailSearchForm.getFormParams().keyword}
|
||||
onChange={v => salaryDetailSearchForm.updateFields({ keyword: v })}
|
||||
onSearch={this.props.onAdvanceSearch}
|
||||
/>
|
||||
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||
onClick={this.props.onOpenAdvanceSearch}>{getLabel(545754, "高级搜索")}</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
.achrive-advance-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: -1.5px;
|
||||
|
||||
.wea-advanced-search {
|
||||
top: 2px;
|
||||
left: -1px;
|
||||
height: 28px;
|
||||
line-height: 1;
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
}
|
||||
|
||||
.wea-advanced-search:hover {
|
||||
border: 1px solid #dadada;
|
||||
color: #474747;
|
||||
}
|
||||
|
||||
.text-elli {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
top: 1px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -27,7 +28,10 @@ export const condition = [
|
|||
labelcol: 6,
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
viewAttr: 3,
|
||||
otherParams: {
|
||||
showSearch: true, optionFilterProp: "children"
|
||||
}
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -128,3 +132,90 @@ export const extensionCondition = [
|
|||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const salaryDetailSearchConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["keyword"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "姓名/工号"),
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(537996, "个税扣缴义务人"),
|
||||
labelcol: 8,
|
||||
options: [],
|
||||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "164",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["subcompanyIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(33553, "分部"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "57",
|
||||
viewAttr: 2
|
||||
},
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["departmentIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(27511, "部门"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true,
|
||||
title: getLabel(1361, "基本信息"),
|
||||
col: 2
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu } from "antd";
|
||||
import { statisticsEmployeeList } from "../../../apis/statistics";
|
||||
import "../index.less";
|
||||
|
||||
|
|
@ -52,10 +53,23 @@ class EmployeeDetails extends Component {
|
|||
columns: [...columns, {
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
width: 80,
|
||||
width: 120,
|
||||
render: (_, record) => {
|
||||
return <a target="_blank"
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(111, "查看")}</a>;
|
||||
return <React.Fragment>
|
||||
<a target="_blank" style={{ marginRight: 10 }}
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(111, "查看")}</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>;
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ class ReportList extends Component {
|
|||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
} else if (key === "log") {
|
||||
this.props.onFilterLog(key, id);
|
||||
}
|
||||
};
|
||||
reportStatisticsReportDelete = (payload) => {
|
||||
|
|
@ -106,6 +108,7 @@ class ReportList extends Component {
|
|||
<Menu.Item key="edit">{getLabel(111, "编辑")}</Menu.Item>
|
||||
<Menu.Item key="copy">{getLabel(77, "复制")}</Menu.Item>
|
||||
<Menu.Item key="delete">{getLabel(111, "删除")}</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<Button type="ghost"><i className="icon-coms-more"/></Button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,159 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:薪资明细列表
|
||||
* Description:
|
||||
* Date: 2024/3/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { message, Spin } from "antd";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import { getIframeParentHeight } from "../../../util";
|
||||
import { sysConfCodeRule } from "../../../apis/ruleconfig";
|
||||
import "../index.less";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@observer
|
||||
class SalaryDetails extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, dataSource: [], columns: [], selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
|
||||
showTotalCell: false, updateSum: true
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSalaryList(this.props);
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }, updateSum: true
|
||||
}, () => this.getSalaryList(nextProps));
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
this.setState(({ selectedRowKeys: [] }));
|
||||
}
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
const { pageInfo } = this.state;
|
||||
if (type === "init") {
|
||||
this.getColumns();
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize },
|
||||
updateSum: false
|
||||
}, () => this.getSalaryList(this.props));
|
||||
} else if (id === "CHECKBOX") {
|
||||
const { selectedRowKeys: checkBox } = params;
|
||||
this.setState({ selectedRowKeys: checkBox, updateSum: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getSalaryList = (props) => {
|
||||
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props;
|
||||
const [startDateStr, endDateStr] = dateRange;
|
||||
const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams();
|
||||
const { pageInfo } = this.state;
|
||||
const payload = {
|
||||
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
...extra, ...pageInfo, startDateStr, endDateStr
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getSalaryList(payload).then(async ({ status, data }) => {
|
||||
// API.getSalaryListSum(payload),
|
||||
const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { dataKey, pageInfo: pageparams } = data;
|
||||
const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload,
|
||||
showTotalCell: confCode === "1"
|
||||
}, () => tableStore.getDatas(dataKey.datas));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleExportSalaryList = (key) => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
let { selectedRowKeys, payload } = this.state;
|
||||
if (key === "SELECTED" && selectedRowKeys.length === 0) {
|
||||
message.warning(getLabel(543345, "请选择需要导出的数据!"));
|
||||
return;
|
||||
}
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportSalaryList({
|
||||
...payload, ids: key === "SELECTED" ? selectedRowKeys : [],
|
||||
columns: _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"), o => o.dataIndex)
|
||||
});
|
||||
};
|
||||
getColumns = () => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state;
|
||||
const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
|
||||
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : "";
|
||||
if (!_.isEmpty(columns)) {
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
|
||||
sumRowlistUrl, payload: { ...payload, updateSum },
|
||||
columns: _.map(columns, (it, idx) => ({
|
||||
...it,
|
||||
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
|
||||
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||
ellipsis: true
|
||||
}))
|
||||
});
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
return (
|
||||
<div className="table-layout"
|
||||
style={{ height: getIframeParentHeight(".wea-new-top-req-content", dataSource.length, 0) + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/calcTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
comsWeaTableStore={tableStore}
|
||||
needScroll={true}
|
||||
columns={this.getColumns()}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryDetails;
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:薪酬统计报薪资明细-高级查询
|
||||
* Description:
|
||||
* Date: 2024/3/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { salaryDetailSearchConditions } from "../conditions";
|
||||
import { getTaxAgentSelectList } from "../../../../apis/taxAgent";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@observer
|
||||
class SalaryDetailAdvanceSearchPannel extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchConditions: []
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const [{ data: taxAgentList }] = await Promise.all([getTaxAgentSelectList()]);
|
||||
this.setState({
|
||||
searchConditions: _.map(salaryDetailSearchConditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, child => {
|
||||
if (getKey(child) === "taxAgentIds") {
|
||||
return {
|
||||
...child, options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
}
|
||||
return { ...child };
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const { attendanceStore: { salaryDetailSearchForm } } = this.props;
|
||||
salaryDetailSearchForm.initFormFields(this.state.searchConditions);
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { searchConditions } = this.state;
|
||||
const { attendanceStore: { salaryDetailSearchForm } } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="wea-advanced-searchsAd">
|
||||
{getSearchs(salaryDetailSearchForm, searchConditions, 2, false)}
|
||||
</div>
|
||||
<div className="wea-search-buttons">
|
||||
<div style={{ textAlign: "center" }}>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={() => salaryDetailSearchForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryDetailAdvanceSearchPannel;
|
||||
|
||||
|
|
@ -20,6 +20,14 @@ class StatisticsModal extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".xc_tj_fx_wrapper").classList.add("zIndex0-statistics");
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
document.querySelector(".xc_tj_fx_wrapper").classList.remove("zIndex0-statistics");
|
||||
}
|
||||
}
|
||||
|
||||
handleSaveReportList = () => {
|
||||
const { form, id, onCancel } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
|
|
|
|||
|
|
@ -7,17 +7,23 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { Button, Dropdown, Menu } from "antd";
|
||||
import { condition, reportCondition } from "./components/conditions";
|
||||
import { commonEnumList, reportGetForm } from "../../apis/ruleconfig";
|
||||
import { dimensionGetForm } from "../../apis/statistics";
|
||||
import EmployeeDetails from "./components/employeeDetails";
|
||||
import SalaryDetails from "./components/salaryDetails";
|
||||
import StatisticsModal from "./components/statisticsModal";
|
||||
import DimensionSlide from "./components/dimensionSlide";
|
||||
import DimensionTable from "./components/dimensionTable";
|
||||
import ReportList from "./components/reportList";
|
||||
import ReportForm from "./components/reportForm";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import SearchPannel from "./components/searchPannel";
|
||||
import moment from "moment";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -35,13 +41,20 @@ class Index extends Component {
|
|||
reportName: "",
|
||||
keyword: "",
|
||||
year: moment().format("YYYY"),
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(6, "months").format("YYYY-MM"),
|
||||
moment(new Date()).format("YYYY-MM")
|
||||
],
|
||||
showSearchAd: false,
|
||||
isQuery: false,
|
||||
slideReq: {
|
||||
visible: false, formId: ""
|
||||
},
|
||||
modalReq: {
|
||||
title: "", visible: false,
|
||||
typeKey: "", id: ""
|
||||
}
|
||||
},
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -243,10 +256,33 @@ class Index extends Component {
|
|||
initTable && this.dimensionTableRef.dimensionList();
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
onAdSearch = () => this.setState({ showSearchAd: false, isQuery: !this.state.isQuery });
|
||||
handleExportSalaryList = (key) => this.salaryRef.wrappedInstance.handleExportSalaryList(key);
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { statisticsReportBtn }, attendanceStore: { statisticsForm, reportForm } } = this.props;
|
||||
const { selectedKey, modalReq, slideReq, conditions, reportConditions, reportName, keyword, year } = this.state;
|
||||
const {
|
||||
taxAgentStore: { statisticsReportBtn },
|
||||
attendanceStore: { statisticsForm, reportForm, tableStore }
|
||||
} = this.props;
|
||||
const {
|
||||
selectedKey, modalReq, slideReq, conditions, reportConditions,
|
||||
reportName, keyword, year, logDialogVisible, filterConditions,
|
||||
dateRange, showSearchAd, isQuery
|
||||
} = this.state;
|
||||
const buttons = selectedKey === "statistics" ? [
|
||||
<Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>,
|
||||
<Button type="ghost"
|
||||
|
|
@ -255,7 +291,7 @@ class Index extends Component {
|
|||
value={reportName}
|
||||
onChange={reportName => this.setState({ reportName })}
|
||||
onSearch={() => this.handleReqBtnsClick("search")}/>
|
||||
] : [
|
||||
] : selectedKey === "detail" ? [
|
||||
<span className="employeeYearWrapper">
|
||||
<span>{getLabel(111, "年薪资核算人员明细:")}</span>
|
||||
<WeaDatePicker value={year} format="YYYY" onChange={year => this.setState({ year })}/>
|
||||
|
|
@ -264,28 +300,63 @@ class Index extends Component {
|
|||
value={keyword}
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.employeeListRef.statisticsEmployeeList()}/>
|
||||
] : [
|
||||
<Dropdown.Button type="primary"
|
||||
onClick={() => this.handleExportSalaryList("ALL")}
|
||||
overlay={<Menu
|
||||
onClick={({ key }) => this.handleExportSalaryList(key)}>
|
||||
<Menu.Item
|
||||
key="SELECTED">{getLabel(543715, "导出所选")}</Menu.Item>
|
||||
</Menu>}>{getLabel(81272, "导出全部")}</Dropdown.Button>,
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.setState({ dateRange: v }, () => this.handleAdvanceSearch())}/>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={this.handleOpenAdvanceSearch}
|
||||
onAdvanceSearch={this.handleAdvanceSearch}/>
|
||||
];
|
||||
const dropMenuDatas = [
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
},
|
||||
{
|
||||
key: "BTN_COLUMN",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(111, "显示列定制"),
|
||||
onClick: () => {
|
||||
tableStore.setColSetVisible(true);
|
||||
tableStore.tableColSet(true);
|
||||
}
|
||||
}
|
||||
];
|
||||
const tabs = [
|
||||
{ key: "statistics", title: getLabel(111, "统计表") },
|
||||
{ key: "detail", title: getLabel(111, "员工明细") }
|
||||
{ key: "detail", title: getLabel(111, "员工明细") },
|
||||
{ key: "salaryDetail", title: getLabel(111, "薪资明细") }
|
||||
];
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper" showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper"
|
||||
buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10}
|
||||
onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())}
|
||||
showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1)}
|
||||
>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.onAdSearch}/>
|
||||
</div>
|
||||
{
|
||||
selectedKey === "statistics" ?
|
||||
<ReportList
|
||||
ref={dom => this.reportListRef = dom}
|
||||
reportName={reportName}
|
||||
onEdit={this.handleReqBtnsClick}
|
||||
/> : <EmployeeDetails
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> : selectedKey === "detail" ? <EmployeeDetails
|
||||
ref={dom => this.employeeListRef = dom}
|
||||
keyword={keyword} year={year}
|
||||
/>
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> : <SalaryDetails ref={dom => this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery}/>
|
||||
}
|
||||
<StatisticsModal {...modalReq} onCancel={this.handleCancel} form={reportForm} onClose={this.handleCancel}
|
||||
onAddDimension={this.handleAddDimension}
|
||||
|
|
@ -306,6 +377,9 @@ class Index extends Component {
|
|||
form={statisticsForm} condition={conditions}
|
||||
initCondition={this.initCondition} onChangeCondition={this.handleChangeCondition}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="statreport" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaReqTop>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
.xc_tj_fx_wrapper {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.search {
|
||||
top: -3px;
|
||||
margin-right: 10px;
|
||||
|
|
@ -19,10 +15,13 @@
|
|||
}
|
||||
|
||||
.wea-new-top-req-content {
|
||||
background: #FFF;
|
||||
padding: 16px;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.reportRow {
|
||||
padding: 16px;
|
||||
|
||||
.gutter-row {
|
||||
margin-bottom: 16px;
|
||||
|
|
@ -36,6 +35,7 @@
|
|||
padding: 22px 0 22px 16px;
|
||||
border: 1px solid #e5e5e5;
|
||||
position: relative;
|
||||
background: #FFF;
|
||||
|
||||
.ant-ribbon {
|
||||
padding: 0 8px;
|
||||
|
|
@ -165,8 +165,63 @@
|
|||
margin-top: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
.searchAdvanced-condition-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchAdvanced-condition-container {
|
||||
background: #FFF;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-search-buttons {
|
||||
border-top: 1px solid #dadada;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.wea-advanced-searchsAd {
|
||||
height: 155px;
|
||||
overflow: hidden auto;
|
||||
|
||||
.formItem-delete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -40px;
|
||||
}
|
||||
|
||||
.searchAdvanced-commonSelect {
|
||||
border-top: 1px solid #ebebeb;
|
||||
margin: 0 25px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.custom-advance-largeSpacing {
|
||||
padding-left: 26px;
|
||||
|
||||
.link {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 12px 10px 12px 26px;
|
||||
color: #2db7f5
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.table-layout {
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zIndex0-statistics {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
//统计维度弹框
|
||||
.dimensionModalWrapper, .dimensionSlideWrapper {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ class SalaryCalcOcImport extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false, importResult: {}, imageId: "",
|
||||
link: "/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=",
|
||||
visible: false, title: "", nextloading: false, importResult: {}, imageId: "", link: "",
|
||||
previewUrl: "/api/bs/hrmsalary/salaryacct/comparisonresult/preview",
|
||||
extraPreview: { salaryAcctRecordId: "" }
|
||||
}
|
||||
|
|
@ -30,7 +29,7 @@ class SalaryCalcOcImport extends Component {
|
|||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog,
|
||||
link: `${importDialog.link}${nextProps.salaryAcctRecordId}`,
|
||||
link: `/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=${nextProps.salaryAcctRecordId}`,
|
||||
visible: nextProps.visible, importResult: {},
|
||||
title: nextProps.title, imageId: "",
|
||||
extraPreview: { salaryAcctRecordId: nextProps.salaryAcctRecordId }
|
||||
|
|
|
|||
|
|
@ -12,9 +12,10 @@ import moment from "moment";
|
|||
import CalculateQuery from "./components/calculateQuery";
|
||||
import CalculateTablelist from "./components/calculateTablelist";
|
||||
import CalculateDialog from "./components/calculateDialog";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
||||
import "./index.less";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -27,10 +28,10 @@ class Calculate extends Component {
|
|||
queryParams: {
|
||||
name: "",
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}, isRefresh: false,
|
||||
}, isRefresh: false, logDialogVisible: false,
|
||||
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||
calcDaialog: { visible: false, title: "" }
|
||||
};
|
||||
|
|
@ -165,16 +166,39 @@ class Calculate extends Component {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
//操作日志
|
||||
this.onDropMenuClick(key, record.id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { queryParams, isRefresh, calcDaialog, progressModule } = this.state;
|
||||
const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state;
|
||||
return (
|
||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout"
|
||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
|
||||
onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="calculate-body">
|
||||
<CalculateTablelist queryParams={queryParams} isRefresh={isRefresh} onCalcOpts={this.handleCalcOpts}/>
|
||||
|
|
@ -184,6 +208,9 @@ class Calculate extends Component {
|
|||
isRefresh: bool === "refresh" ? !isRefresh : isRefresh
|
||||
}, () => bool === "refresh" && window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calculate/${id}`))}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="acctrecord" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
{/* 归档进度条*/}
|
||||
{
|
||||
progressModule.visible &&
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ export const calculateConditions = [
|
|||
lanId: 519146,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
otherParams: {
|
||||
showSearch: true, optionFilterProp: "children"
|
||||
},
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ class Index extends Component {
|
|||
/>
|
||||
</span>,
|
||||
render: (__, record) => {
|
||||
const { operate = [] } = record;
|
||||
const { operate: opts = [] } = record;
|
||||
const operate = [...opts, { index: "log", text: getLabel(30586, "查看日志") }];
|
||||
return <React.Fragment>
|
||||
{
|
||||
_.map(operate.slice(0, 2), f => (
|
||||
|
|
|
|||
|
|
@ -8,10 +8,17 @@
|
|||
import React, { Component } from "react";
|
||||
import { Button, Col, message, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { customCacheExportField } from "../../../../../apis/calculate";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import ExpTempManagementDialog from "../expTempManagementDialog";
|
||||
import {
|
||||
customCacheExportField,
|
||||
getExportField,
|
||||
getExportTemplateForm,
|
||||
getExportTemplateList
|
||||
} from "../../../../../apis/calculate";
|
||||
import { convertToUrlString } from "../../../../../util/url";
|
||||
import "./index.less";
|
||||
import TempDialog from "../expFieldsSetDialog/tempDialog";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
|
|
@ -21,19 +28,44 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
itemsCheckeds: [],
|
||||
showOnlyChecked: false
|
||||
itemsCheckeds: [], showOnlyChecked: false, tempMangeDialog: { visible: false, salaryAcctRecordId: "" },
|
||||
tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
async componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
itemsCheckeds: !_.isEmpty(nextProps.checkItems) ? nextProps.checkItems : []
|
||||
}, () => this.getExportTemplateList(nextProps));
|
||||
} else {
|
||||
this.setState({
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getExportTemplateList = (props) => {
|
||||
const { salaryAcctRecordId } = props;
|
||||
getExportTemplateList({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { pageInfo: { list } } = data;
|
||||
this.setState({
|
||||
tempOptions: [
|
||||
...this.state.tempOptions, ..._.map(list, o => ({ key: String(o.id), showname: o.templateName }))
|
||||
]
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
customExportClick = () => {
|
||||
const { calculateStore: { ECSearchForm }, salaryAcctRecordId } = this.props;
|
||||
const { itemsCheckeds } = this.state;
|
||||
|
|
@ -67,10 +99,26 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleChangeExpTemp = async (id) => {
|
||||
switch (id) {
|
||||
case "system":
|
||||
const { salaryAcctRecordId } = this.props;
|
||||
const { data: { checkItems: checkeds } } = await getExportField({ salaryAcctRecordId });
|
||||
this.setState({ itemsCheckeds: checkeds });
|
||||
break;
|
||||
case "NULL":
|
||||
this.setState({ itemsCheckeds: [] });
|
||||
break;
|
||||
default:
|
||||
const { data: { checkItems } } = await getExportTemplateForm({ id });
|
||||
this.setState({ itemsCheckeds: _.map(checkItems, o => parseInt(o)) });
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showOnlyChecked, itemsCheckeds } = this.state;
|
||||
const { itemsByGroup } = this.props;
|
||||
const { showOnlyChecked, itemsCheckeds, tempMangeDialog, tempDialog, tempOptions } = this.state;
|
||||
const { itemsByGroup, salaryAcctRecordId } = this.props;
|
||||
let dataSource = _.map(itemsByGroup, item => {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -84,10 +132,15 @@ class Index extends Component {
|
|||
return { ...item, salaryItems: _.filter(item.salaryItems, it => !!it.checked) };
|
||||
});
|
||||
}
|
||||
const titleComp = <div className="setHeaderWrapper">
|
||||
<span>{getLabel(111, "选择字段")}</span>
|
||||
<WeaSelect options={tempOptions} style={{ width: 200 }}
|
||||
onChange={this.handleChangeExpTemp}/>
|
||||
</div>;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll initLoadCss className="customEpDialogLayout"
|
||||
scalable title={getLabel(111, "选择字段")}
|
||||
scalable title={titleComp}
|
||||
style={{
|
||||
width: 700,
|
||||
height: 606.6,
|
||||
|
|
@ -100,6 +153,21 @@ class Index extends Component {
|
|||
}}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.customExportClick}>{getLabel(17416, "导出")}</Button>,
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
tempDialog: { visible: true, salaryAcctRecordId, id: "", salaryItemIds: itemsCheckeds },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
})}>{getLabel(111, "存为模板")}</Button>,
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({
|
||||
tempMangeDialog: { visible: true, salaryAcctRecordId },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", selected: true, showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
})}>{getLabel(111, "模板管理")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
]}
|
||||
bottomLeft={<WeaCheckbox content={getLabel(543378, "只显示已选中字段")}
|
||||
|
|
@ -131,6 +199,15 @@ class Index extends Component {
|
|||
</WeaSearchGroup>;
|
||||
})
|
||||
}
|
||||
<ExpTempManagementDialog {...tempMangeDialog}
|
||||
onCancel={() => this.setState({
|
||||
tempMangeDialog: { ...tempMangeDialog, visible: false }
|
||||
}, () => this.getExportTemplateList(this.props))}
|
||||
/>
|
||||
{/*模板保存*/}
|
||||
<TempDialog {...tempDialog} onCancel={() => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false }
|
||||
}, () => this.getExportTemplateList(this.props))}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,15 @@
|
|||
.customEpDialogLayout {
|
||||
.text-elli {
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.setHeaderWrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
.wea-title {
|
||||
padding-left: 0 !important;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:自定义导出-导出字段设置
|
||||
* Description:
|
||||
* Date: 2024/3/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { Button, Col, message, Row } from "antd";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
import TempDialog from "./tempDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
itemsCheckeds: [], itemsByGroup: [],
|
||||
tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getExportField(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
itemsCheckeds: [], itemsByGroup: []
|
||||
});
|
||||
}
|
||||
|
||||
getExportField = (props) => {
|
||||
const { salaryAcctRecordId, checkItems } = props;
|
||||
API.getExportField({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { itemsByGroup } = data;
|
||||
this.setState({ itemsByGroup, itemsCheckeds: checkItems });
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSelectGroupAll = (groupId, checked) => {
|
||||
const { itemsCheckeds, itemsByGroup } = this.state;
|
||||
_.map(itemsByGroup, item => {
|
||||
if (item.salarySobItemGroupId === groupId) {
|
||||
if (!!Number(checked)) {
|
||||
this.setState({
|
||||
itemsCheckeds: [...itemsCheckeds, ..._.map(item.salaryItems, child => String(child.salaryItemId))]
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
itemsCheckeds: _.differenceWith(itemsCheckeds, _.map(item.salaryItems, child => String(child.salaryItemId)), _.isEqual)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
save = () => {
|
||||
const { itemsCheckeds } = this.state;
|
||||
const { salaryAcctRecordId, tempId: id, templateName } = this.props;
|
||||
if (!id) {
|
||||
this.setState({
|
||||
tempDialog: {
|
||||
visible: true, salaryAcctRecordId, id, salaryItemIds: itemsCheckeds
|
||||
}
|
||||
});
|
||||
} else {
|
||||
API.saveExportTemplate({ templateName, salaryAcctRecordId, id, salaryItemIds: itemsCheckeds })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { itemsCheckeds, itemsByGroup, tempDialog } = this.state;
|
||||
let dataSource = _.map(itemsByGroup, item => {
|
||||
return {
|
||||
...item, salaryItems: _.map(item.salaryItems, child => {
|
||||
return { ...child, checked: itemsCheckeds.includes(String(child.salaryItemId)) };
|
||||
})
|
||||
};
|
||||
});
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll scalable title={getLabel(111, "导出字段设置")}
|
||||
initLoadCss className="customEpDialogLayout"
|
||||
style={{
|
||||
width: 700, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "70%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}
|
||||
buttons={[<Button type="primary" onClick={this.save}>{getLabel(111, "保存")}</Button>]}
|
||||
>
|
||||
{
|
||||
_.map(dataSource, item => {
|
||||
const { salarySobItemGroupName, salaryItems, salarySobItemGroupId } = item;
|
||||
const value = _.every(salaryItems, it => !!it.checked) ? "1" : "0";
|
||||
return <WeaSearchGroup showGroup needTigger
|
||||
title={<WeaCheckbox content={salarySobItemGroupName} value={value}
|
||||
onChange={(val) => this.handleSelectGroupAll(salarySobItemGroupId, val)}
|
||||
/>}>
|
||||
<Row gutter={16}>
|
||||
{
|
||||
!_.isEmpty(salaryItems) ?
|
||||
_.map(salaryItems, it => {
|
||||
const { salaryItemId, salaryItemName, checked } = it;
|
||||
return <Col span={8} style={{ marginBottom: 16 }}>
|
||||
<WeaCheckbox content={salaryItemName} value={checked ? "1" : "0"}
|
||||
onChange={() => this.setState({ itemsCheckeds: _.xorWith(itemsCheckeds, [String(salaryItemId)], _.isEqual) })}
|
||||
/>
|
||||
</Col>;
|
||||
}) : <Col span={24} style={{
|
||||
minHeight: 20,
|
||||
padding: "5%",
|
||||
textAlign: "center"
|
||||
}}>{getLabel(83553, "暂无数据")}</Col>
|
||||
}
|
||||
</Row>
|
||||
</WeaSearchGroup>;
|
||||
})
|
||||
}
|
||||
<TempDialog {...tempDialog} onCancel={(isRefresh) => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false }
|
||||
}, () => isRefresh && this.props.onCancel(true))}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 导出模板保存框
|
||||
* Description:
|
||||
* Date: 2024/3/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../../../util";
|
||||
import { tempConditions } from "../../../../../common/conditions";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("calculateStore")
|
||||
@observer
|
||||
class TempDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
nextProps.calculateStore.tempForm.initFormFields(tempConditions);
|
||||
} else {
|
||||
nextProps.calculateStore.initTempForm();
|
||||
}
|
||||
}
|
||||
|
||||
save = () => {
|
||||
const { calculateStore: { tempForm }, salaryAcctRecordId, id, salaryItemIds } = this.props;
|
||||
tempForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = tempForm.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
API.saveExportTemplate({ ...payload, salaryAcctRecordId, id, salaryItemIds })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(true);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
const { calculateStore: { tempForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 400, height: 80 }} initLoadCss title={getLabel(111, "存为模板")}
|
||||
buttons={[
|
||||
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(111, "保存")}</Button>
|
||||
]}
|
||||
>
|
||||
<div className="form-dialog-layout">{getSearchs(tempForm, tempConditions, 1, false)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TempDialog;
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 自定义导出-导出模板管理
|
||||
* Description:
|
||||
* Date: 2024/3/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTab, WeaTable } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import ExpFieldsSetDialog from "../expFieldsSetDialog";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, dataSource: [], columns: [], loading: false,
|
||||
fieldsSetDialog: { visible: false, salaryAcctRecordId: "", tempId: "", templateName: "", checkItems: [] },
|
||||
query: { templateName: "" }, selectedRowKeys: []
|
||||
};
|
||||
this.dialogRef = null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getExportTemplateList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ selectedRowKeys: [] });
|
||||
}
|
||||
|
||||
getExportTemplateList = (props) => {
|
||||
const { pageInfo, query } = this.state;
|
||||
const { salaryAcctRecordId } = props;
|
||||
const payload = { ...pageInfo, ...query, salaryAcctRecordId };
|
||||
this.setState({ loading: true });
|
||||
API.getExportTemplateList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: { columns, list: dataSource, pageNum: current, pageSize, total } } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: [...columns, {
|
||||
dataIndex: "operate", title: getLabel(111, "操作"), width: 120,
|
||||
render: (__, record) => (<React.Fragment>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.getExportTemplateForm(record)}>{getLabel(111, "编辑")}</a>
|
||||
<a href="javascript:void(0);" style={{ marginLeft: 10 }}
|
||||
onClick={() => this.deleteExportTemplate([record.id])}>{getLabel(111, "删除")}</a>
|
||||
</React.Fragment>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
getExportTemplateForm = (record) => {
|
||||
const { id, templateName } = record;
|
||||
const { fieldsSetDialog } = this.state;
|
||||
const { salaryAcctRecordId } = this.props;
|
||||
API.getExportTemplateForm({ id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { checkItems } = data;
|
||||
this.setState({
|
||||
fieldsSetDialog: {
|
||||
...fieldsSetDialog, tempId: id, templateName, visible: true, salaryAcctRecordId, checkItems
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
fieldsSetDialog: {
|
||||
...fieldsSetDialog, tempId: id, templateName, visible: true, salaryAcctRecordId, checkItems: []
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
deleteExportTemplate = (ids) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确定要删除吗?"),
|
||||
onOk: () => {
|
||||
API.deleteExportTemplate({ ids }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ selectedRowKeys: [] }, () => this.getExportTemplateList(this.props));
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fieldsSetDialog, query, pageInfo, selectedRowKeys, dataSource, columns } = this.state;
|
||||
const { salaryAcctRecordId } = this.props;
|
||||
const dialogBodyHeight = this.dialogRef ? this.dialogRef.state.height : 600;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.getExportTemplateList(this.props));
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getExportTemplateList(this.props));
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: selectedRowKeys => this.setState({ selectedRowKeys })
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} hasScroll scalable title={getLabel(111, "导出模板管理")}
|
||||
ref={dom => this.dialogRef = dom} initLoadCss className="tempManageDialogLayout"
|
||||
style={{
|
||||
width: 700, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "70%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<WeaTab datas={[]} buttons={[
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({
|
||||
fieldsSetDialog: {
|
||||
...fieldsSetDialog, visible: true, tempId: "", templateName: "",
|
||||
salaryAcctRecordId, checkItems: []
|
||||
}
|
||||
})}/>,
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
|
||||
disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={() => this.deleteExportTemplate(selectedRowKeys)}/>,
|
||||
<WeaInputSearch value={query.templateName}
|
||||
onChange={val => this.setState({ query: { ...query, templateName: val } })}
|
||||
onSearch={() => this.setState({
|
||||
pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.getExportTemplateList(this.props))}/>
|
||||
]}/>
|
||||
<WeaTable dataSource={dataSource} columns={columns} pagination={pagination} rowSelection={rowSelection}
|
||||
scroll={{ y: `calc(${dialogBodyHeight}px - 148px)` }}/>
|
||||
<ExpFieldsSetDialog {...fieldsSetDialog}
|
||||
onCancel={(isRefresh) => this.setState({
|
||||
fieldsSetDialog: { ...fieldsSetDialog, visible: false, checkItems: [] }
|
||||
}, () => isRefresh && this.getExportTemplateList(this.props))}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -173,10 +173,10 @@ class Index extends Component {
|
|||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
saveAcctemployee({ salaryAcctRecordId, employeeIds }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(541531, "添加成功!"));
|
||||
message.success(getLabel(26712, "添加成功!"));
|
||||
this.queryPCList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(111, "添加失败!"));
|
||||
message.error(errormsg || getLabel(545246, "添加失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { acctResultList, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import { acctResultList, updateLockEmpStatus, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import ProgressModal from "../../../../../components/progressModal";
|
||||
import BatchUpdateSalaryItemValDialog from "./batchUpdateSalaryItemValDialog";
|
||||
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
|
||||
|
|
@ -57,12 +57,15 @@ class EditCalcTable extends Component {
|
|||
this.props.onShowFormulaTd(dataIndex);
|
||||
break;
|
||||
case "LOCKING":
|
||||
const { salaryItemId, lockType: lockStatus } = params;
|
||||
if (lockStatus === "BATCHUPDATE") {
|
||||
const { salaryItemId, lockType } = params;
|
||||
if (lockType === "BATCHUPDATE") {
|
||||
this.batchUpdateSalaryItemVal(params);
|
||||
return;
|
||||
}
|
||||
this.updateLockStatus({ lockStatus, salaryItemId });
|
||||
this.updateLockStatus({ lockStatus: lockType, salaryItemId });
|
||||
break;
|
||||
case "LOCKEMP":
|
||||
this.updateEmpLockStatus({ ...params });
|
||||
break;
|
||||
case "EDIT":
|
||||
const { id: salaryCalcId } = params;
|
||||
|
|
@ -131,6 +134,52 @@ class EditCalcTable extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
updateEmpLockStatus = (payload) => {
|
||||
const { lockStatus } = payload;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: <div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(111, "确定要锁定该人员核算数据吗?") : getLabel(111, "确定要解锁该人员核算数据吗?")}
|
||||
</div>
|
||||
<div style={{ textAlign: "center" }}>
|
||||
{lockStatus === "LOCK" ? getLabel(111, "确定后,核算数据锁定,项目公式失效;点击核算将跳过该人员已核算的项目!") :
|
||||
getLabel(111, "确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!")}
|
||||
</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timerLock = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 1
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
updateLockEmpStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
batchUpdateSalaryItemVal = (payload) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
|
|
@ -180,7 +229,8 @@ class EditCalcTable extends Component {
|
|||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
||||
"批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图")
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图"), "锁定": getLabel(111, "锁定"),
|
||||
"解锁": getLabel(111, "解锁")
|
||||
};
|
||||
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import { sysConfCodeRule } from "../../../../../apis/ruleconfig";
|
|||
import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
|
||||
import EditCalcTable from "./editCalcTable";
|
||||
import SalaryMonthTip from "../salaryMonthTip";
|
||||
import SalaryCalcLayout from "./salaryCalcLayout";
|
||||
import SxwzEstablishTempDialog from "./sxwzEstablishTempDialog";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
|
@ -31,10 +32,6 @@ class Index extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const promise = this.init();
|
||||
}
|
||||
|
||||
openAdvanceSearch = () => this.setState({ showSearchAd: !this.state.showSearchAd });
|
||||
onAdSearch = (bool = true) => {
|
||||
this.calcTableRef.wrappedInstance.queryCalcResultList();
|
||||
|
|
@ -111,7 +108,7 @@ class Index extends Component {
|
|||
} = this.state;
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
|
||||
return (
|
||||
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
|
||||
<div className="salary-edit-calc-content">
|
||||
<div className="sxwz-tab-edit-wrapper">
|
||||
<WeaTab
|
||||
|
|
@ -161,7 +158,7 @@ class Index extends Component {
|
|||
!_.isNil(isRefresh) && this.init(isRefresh);
|
||||
})}/>
|
||||
</div>
|
||||
);
|
||||
</SalaryCalcLayout>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -213,3 +213,39 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infoConfirmDialog {
|
||||
.confirm-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.contract {
|
||||
text-align: center;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.confirm-container {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
margin-top: 8px;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loadingLayout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
padding: 30px 50px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资核算-layout
|
||||
* Description:
|
||||
* Date: 2024/4/26
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message, Spin } from "antd";
|
||||
import * as API from "../../../../../apis/calculate";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SalaryCalcLayout extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldInformationConfirm: { visible: false, data: {} }, userConfirmed: "0", show: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getCompareSobConfig();
|
||||
}
|
||||
|
||||
getCompareSobConfig = () => {
|
||||
const { fieldInformationConfirm } = this.state;
|
||||
const { routeParams: { salaryAcctRecordId: id } } = this.props;
|
||||
API.getCompareSobConfig({ id }).then(({ status, data }) => {
|
||||
if (status && data) {
|
||||
this.setState({
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: data }
|
||||
});
|
||||
} else {
|
||||
this.setState({ show: true }, () => this.props.init());
|
||||
}
|
||||
}).catch(() => this.setState({ show: true }, () => this.props.init()));
|
||||
};
|
||||
onOk = () => {
|
||||
const { fieldInformationConfirm } = this.state;
|
||||
const { routeParams: { salaryAcctRecordId: id } } = this.props;
|
||||
API.updateSobConfig({ id }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.setState({
|
||||
show: true,
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||
}, () => {
|
||||
this.props.init();
|
||||
this.props.onConfirm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fieldInformationConfirm, userConfirmed, show } = this.state;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.onOk}
|
||||
disabled={userConfirmed === "0"}>{getLabel(111, "是,更新账套设置")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({
|
||||
show: true,
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||
}, () => this.props.init())}>{getLabel(111, "否,忽略该提示")}</Button>
|
||||
];
|
||||
return (
|
||||
<React.Fragment>
|
||||
{
|
||||
show ? this.props.children : <div className="loadingLayout"><Spin/></div>
|
||||
}
|
||||
<WeaDialog
|
||||
title={getLabel(131329, "信息确认")} visible={fieldInformationConfirm.visible} initLoadCss hasScroll
|
||||
style={{ width: 380 }} className="infoConfirmDialog" buttons={buttons} onCancel={() =>
|
||||
this.setState({
|
||||
show: true,
|
||||
fieldInformationConfirm: { ...fieldInformationConfirm, visible: false }
|
||||
}, () => this.props.init())}>
|
||||
<div className="confirm-content">
|
||||
<div className="contract">
|
||||
{getLabel("111", "账套发生变更,是否需要更新账套设置?更新后核算将按照最新的账套进行核算,请谨慎操作。")}
|
||||
</div>
|
||||
<div className="confirm-container">
|
||||
<WeaCheckbox value={userConfirmed} content={getLabel("111", "已认真阅读,知晓风险")}
|
||||
onChange={v => this.setState({ userConfirmed: v })}/>
|
||||
</div>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryCalcLayout;
|
||||
|
|
@ -63,7 +63,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
importDialog: {
|
||||
...this.state.importDialog, link: this.handleExportTemp,
|
||||
visible: nextProps.visible, title: nextProps.title
|
||||
visible: nextProps.visible, title: nextProps.title, importResult: {}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,23 +215,17 @@ class Index extends Component {
|
|||
/>
|
||||
}
|
||||
{/* 薪资核算-自定义导出*/}
|
||||
<CustomCalcExportDialog
|
||||
{...customExpDialog}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
customExpDialog: { ...customExpDialog, visible: false }
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<CustomCalcExportDialog {...customExpDialog} onCancel={() => {
|
||||
this.setState({
|
||||
customExpDialog: { ...customExpDialog, visible: false }
|
||||
});
|
||||
}}/>
|
||||
{/* 薪资核算-导入*/}
|
||||
<SalaryEditCalcImport
|
||||
{...salaryImpDialog}
|
||||
onCancel={(isFresh) => {
|
||||
this.setState({
|
||||
salaryImpDialog: { ...salaryImpDialog, visible: false }
|
||||
}, () => isFresh && this.calc.onAdSearch(false));
|
||||
}}
|
||||
/>
|
||||
<SalaryEditCalcImport {...salaryImpDialog} onCancel={(isFresh) => {
|
||||
this.setState({
|
||||
salaryImpDialog: { ...salaryImpDialog, visible: false }
|
||||
}, () => isFresh && this.calc.onAdSearch(false));
|
||||
}}/>
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
</Layout>
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@
|
|||
|
||||
.ant-table-tbody {
|
||||
.ant-table-row-indent {
|
||||
display: none;
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
td {
|
||||
td:not(.ant-table-selection-column) {
|
||||
span {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ export default class SelectFieldModal extends React.Component {
|
|||
this.props.onAdd(this.fieldData);
|
||||
this.props.onCancel();
|
||||
};
|
||||
//薪资核算导入缓存字段
|
||||
cacheImportField = () => {
|
||||
const salaryItemList = _.reduce(_.keys(this.fieldData), (pre, cur) => ([...pre, ...this.fieldData[cur]]), []);
|
||||
const salaryItems = _.map(_.filter(salaryItemList, it => !!it.checked), item => item.salaryItemId);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ class AttendanceCustomFieldsModal extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { attendanceStore: { initForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.handleResetForm();
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) initForm();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -62,12 +64,8 @@ class AttendanceCustomFieldsModal extends Component {
|
|||
<Button type="primary" onClick={this.handleSubmitFields}>保存</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 440, height: 202 }}
|
||||
buttons={buttons} hasScroll initLoadCss
|
||||
className="modalWrapper"
|
||||
>
|
||||
{getSearchs(form, conditions, 1)}
|
||||
<WeaDialog {...this.props} style={{ width: 480, height: 202 }} buttons={buttons} initLoadCss>
|
||||
<div className="form-dialog-layout"> {getSearchs(form, conditions, 1)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
* Date: 2023/2/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu, message, Modal } from "antd";
|
||||
import {
|
||||
deleteAttendance,
|
||||
getAttendanceFieldSettingList,
|
||||
|
|
@ -14,20 +14,21 @@ import {
|
|||
getLedgerList,
|
||||
getSalaryCycleAndAttendCycle,
|
||||
importAttendQuoteData,
|
||||
previewAttendQuote,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
saveAttendanceFieldSetting,
|
||||
saveAttendanceFieldSettingAsDefault
|
||||
} from "../../../../apis/attendance";
|
||||
import ImportModal from "../../../../components/importModal";
|
||||
import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
import ImportFormOptions from "./importFormOptions";
|
||||
import ImportModal from "./importDialog";
|
||||
// import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
// import ImportFormOptions from "./importFormOptions";
|
||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||
import moment from "moment";
|
||||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||
import AttendanceRefrenceDataModal from "./attendanceRefrenceDataModal";
|
||||
import AttendanceDataViewSlide from "./attendanceDataViewSlide";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class AttendanceDataComp extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -43,10 +44,7 @@ class AttendanceDataComp extends Component {
|
|||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
importData: {
|
||||
visiable: false, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
},
|
||||
importData: { visible: false, params: {} },
|
||||
importFormPayload: {
|
||||
salaryYearMonth: moment().format("YYYY-MM"), salarySobList: [],
|
||||
salarySobId: "", salaryCycle: "", attendCycle: ""
|
||||
|
|
@ -85,15 +83,24 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
getLedgerList = () => {
|
||||
getLedgerList = (importData) => {
|
||||
const { importFormPayload } = this.state;
|
||||
getLedgerList().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importFormPayload: {
|
||||
...importFormPayload,
|
||||
...importFormPayload, salarySobId: _.head(data).id,
|
||||
salarySobList: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||
}
|
||||
}, async () => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||
const payload = { salaryYearMonthStr: salaryYearMonth, salarySobId };
|
||||
const { data } = await getSalaryCycleAndAttendCycle(payload);
|
||||
this.setState({
|
||||
importData: { ...importData, params: { salaryYearMonth, salarySobId } },
|
||||
importFormPayload: { ...importFormPayload, ...data }
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -152,64 +159,12 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleImportAttendanceData = (importData) => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salaryYearMonth, salarySobId } = importFormPayload;
|
||||
this.getLedgerList();
|
||||
this.setState({ importData: { ...importData, params: { salaryYearMonth, salarySobId } } });
|
||||
};
|
||||
setStep = step => this.setState({ importData: { ...this.state.importData, step } });
|
||||
handleFinish = () => {
|
||||
handleImportAttendanceData = (importData) => this.getLedgerList(importData);
|
||||
handleFinish = (isFresh) => {
|
||||
const { importData } = this.state;
|
||||
const { step } = importData;
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData, visiable: false, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
}
|
||||
});
|
||||
step === 2 && this.getAttendanceList();
|
||||
};
|
||||
handlePreviewImport = (params) => {
|
||||
const { importData } = this.state;
|
||||
previewAttendQuote(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { headers, list } = data;
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData,
|
||||
columns: _.map(headers, (it, dataIndex) => ({ title: it, dataIndex })),
|
||||
slideDataSource: _.map(list, item => {
|
||||
return _.reduce(item, (pre, cur, key) => (_.assign(pre, { [key]: cur })), {});
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleImport = (params) => {
|
||||
const { importData } = this.state;
|
||||
const { step } = importData;
|
||||
importAttendQuoteData(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importData: {
|
||||
...importData,
|
||||
step: step + 1,
|
||||
importResult: data
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleTemplateLinkClick = () => {
|
||||
const { importFormPayload } = this.state;
|
||||
const { salarySobId, salaryYearMonth } = importFormPayload;
|
||||
if (!salarySobId || !salaryYearMonth) {
|
||||
message.warning("请完善导入选项,再下载");
|
||||
return;
|
||||
}
|
||||
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
||||
importData: { ...importData, visible: false, params: {} }
|
||||
}, () => isFresh && this.getAttendanceList());
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -234,7 +189,7 @@ class AttendanceDataComp extends Component {
|
|||
onSelectItem={this.handleSelectItem}
|
||||
/>
|
||||
}
|
||||
});
|
||||
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, headset: false } }));
|
||||
};
|
||||
|
|
@ -364,53 +319,56 @@ class AttendanceDataComp extends Component {
|
|||
<div className="linkWapper">
|
||||
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
||||
{showOperateBtn &&
|
||||
<a href="javascript: void(0);" onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
!showOperateBtn &&
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
/>
|
||||
dataSource={dataSource} pagination={pagination} loading={loading.query}/>
|
||||
{/* 考勤引用导入 */}
|
||||
<ImportModal {...importData} setStep={this.setStep} onFinish={this.handleFinish}
|
||||
previewImport={this.handlePreviewImport} importFile={this.handleImport}
|
||||
templateLink={this.handleTemplateLinkClick} onCancel={this.handleFinish}
|
||||
headerSetCompoent={<HeaderSet
|
||||
loading={loading.headset}
|
||||
onSetClick={() => this.handleHeaderSettings({ sourceType: "IMPORT" })}/>}
|
||||
renderFormComponent={() => <ImportFormOptions
|
||||
{...importFormPayload}
|
||||
onChangeImportForm={this.handleChangeImportPayload}/>
|
||||
}
|
||||
<ImportModal {...importData} importFormPayload={importFormPayload} onCancel={this.handleFinish}
|
||||
onChangeImportForm={this.handleChangeImportPayload} onHeaderSettings={this.handleHeaderSettings}
|
||||
loading={loading.headset} previewUrl="/api/bs/hrmsalary/attendQuote/preview"
|
||||
importAttendQuoteData={importAttendQuoteData}
|
||||
/>
|
||||
{/* 表头设置 */}
|
||||
<SelectItemModal {...fieldSetPayload}
|
||||
onCancel={this.handleCloseSettings}
|
||||
onSearchItemSet={this.handleSearchItemSet}
|
||||
onShowOnlyChecked={this.handleShowOnlyChecked}
|
||||
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}
|
||||
/>
|
||||
onMoreOpts={this.handleMoreOpts} onSave={this.handleSave}/>
|
||||
{/* 考勤数据引用 */}
|
||||
<AttendanceRefrenceDataModal
|
||||
{...attendanceReferencePayload}
|
||||
onCancel={this.handleCloseQuoteModal}
|
||||
/>
|
||||
<AttendanceRefrenceDataModal {...attendanceReferencePayload} onCancel={this.handleCloseQuoteModal}/>
|
||||
{/* 考勤数据查看 */}
|
||||
<AttendanceDataViewSlide
|
||||
{...attendanceViewPayload}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onClose={() => this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: false,
|
||||
attendQuoteId: ""
|
||||
}
|
||||
})}
|
||||
/>
|
||||
<AttendanceDataViewSlide {...attendanceViewPayload} showOperateBtn={showOperateBtn}
|
||||
onClose={() => this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: false,
|
||||
attendQuoteId: ""
|
||||
}
|
||||
})}/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,31 +5,29 @@
|
|||
* Date: 2023/3/7
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaFormItem, WeaInput, WeaInputSearch, WeaSlideModal } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } 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;
|
||||
|
||||
class AttendanceDataViewSlide extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
keyword: "",
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
pageInfo: {
|
||||
current: 1, pageSize: 10, total: 0
|
||||
}
|
||||
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.viewAttendQuote({}, nextProps);
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
||||
this.viewAttendQuote({}, nextProps);
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
document.querySelector(".attendanceRefWrapper").classList.remove("zIndex0-attendance");
|
||||
}
|
||||
}
|
||||
|
||||
viewAttendQuote = (extraPayload = {}, props) => {
|
||||
|
|
@ -41,29 +39,13 @@ class AttendanceDataViewSlide extends Component {
|
|||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
// o.dataIndex === "username" ? "left" :
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
renderCustomOperate = () => {
|
||||
const { keyword } = this.state;
|
||||
const { showOperateBtn } = this.props;
|
||||
return ([
|
||||
<div style={{ display: "inline-block" }}>
|
||||
{showOperateBtn && <Button type="primary" onClick={this.handleExportAttendQuote}>导出全部</Button>}
|
||||
<WeaInputSearch
|
||||
value={keyword}
|
||||
style={{ marginLeft: 10 }}
|
||||
placeholder="请输入姓名/部门/工号/手机号"
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
|
||||
/>
|
||||
</div>
|
||||
]);
|
||||
};
|
||||
handleExportAttendQuote = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
|
|
@ -78,7 +60,7 @@ class AttendanceDataViewSlide extends Component {
|
|||
|
||||
render() {
|
||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||
const { columns, dataSource, loading, pageInfo } = this.state;
|
||||
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
|
|
@ -96,45 +78,33 @@ class AttendanceDataViewSlide extends Component {
|
|||
}, () => this.viewAttendQuote({}, this.props));
|
||||
}
|
||||
};
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||
<WeaInputSearch
|
||||
value={keyword} placeholder={getLabel(543380, "请输入姓名/部门/工号/手机号")}
|
||||
onChange={keyword => this.setState({ keyword })}
|
||||
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
|
||||
/>
|
||||
];
|
||||
return (
|
||||
<WeaSlideModal
|
||||
{...extra}
|
||||
className="attendanceSlideWrapper"
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={80}
|
||||
measureX="%"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction="right"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle="考勤数据"
|
||||
editable={false}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={this.renderCustomOperate()}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<div>
|
||||
<WeaFormItem label="考勤周期" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} underline>
|
||||
<WeaInput value={salaryYearMonth} viewAttr={1}/>
|
||||
</WeaFormItem>
|
||||
<UnifiedTable
|
||||
rowKey="id"
|
||||
columns={_.map(columns, item => ({
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}> {text} </span>;
|
||||
}
|
||||
}))}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={columns.length * 180}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
<WeaSlideModal {...extra} className="attendanceSlideWrapper"
|
||||
top={0} height={100} width={800} measureT="%" measureX="px" measureY="%" direction="right"
|
||||
title={
|
||||
<WeaTop title={getLabel(525196, "考勤数据")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(1)}/>
|
||||
}
|
||||
content={
|
||||
<div className="attendance-slide-body">
|
||||
<div className="attendance-tb-tip">
|
||||
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 225px)` }}/>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ import { getSearchs } from "../../../../util";
|
|||
import {
|
||||
checkOperation,
|
||||
getAttendanceFieldSettingList,
|
||||
getLedgerList, returnToAttendanceFieldSettingDefault, saveAttendanceFieldSetting, saveAttendanceFieldSettingAsDefault,
|
||||
getLedgerList,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
saveAttendanceFieldSetting,
|
||||
saveAttendanceFieldSettingAsDefault,
|
||||
syncAttendanceRefer
|
||||
} from "../../../../apis/attendance";
|
||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||
|
|
@ -124,7 +127,7 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
onSelectItem={this.handleSelectItem}
|
||||
/>
|
||||
}
|
||||
});
|
||||
}, () => this.setItemRef && this.setItemRef.initSelectItem());
|
||||
}
|
||||
}).catch(() => this.setState({ headerSetLoading: false }));
|
||||
};
|
||||
|
|
@ -209,12 +212,10 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 440, height: 156 }}
|
||||
buttons={buttons} hasScroll initLoadCss
|
||||
className="modalWrapper"
|
||||
>
|
||||
{getSearchs(refenceform, condition, 1)}
|
||||
<WeaDialog {...this.props} style={{ width: 480, height: 174 }} buttons={buttons} initLoadCss>
|
||||
<div className="form-dialog-layout">
|
||||
{getSearchs(refenceform, condition, 1)}
|
||||
</div>
|
||||
{/* 表头设置 */}
|
||||
<SelectItemModal {...headerSetPayload}
|
||||
onCancel={this.handleCloseSettings}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
* Date: 2023/2/24
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaTable } from "ecCom";
|
||||
import { Col, message, Row } from "antd";
|
||||
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Col, Dropdown, Menu, 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);
|
||||
|
|
@ -71,7 +73,7 @@ class FieldMangComp extends Component {
|
|||
getColumns = () => {
|
||||
const { columns } = this.state;
|
||||
const { showOperateBtn } = this.props;
|
||||
return _.map(_.filter(columns, item => !!item.display), child => ({
|
||||
return [..._.map(_.filter(columns, item => !!item.display), child => ({
|
||||
...child,
|
||||
render: (text, record) => {
|
||||
switch (child.dataIndex) {
|
||||
|
|
@ -86,7 +88,23 @@ class FieldMangComp extends Component {
|
|||
return <div dangerouslySetInnerHTML={{ __html: text }}/>;
|
||||
}
|
||||
}
|
||||
}));
|
||||
})), {
|
||||
dataIndex: "options",
|
||||
title: getLabel(30585, "操作"),
|
||||
width: 120,
|
||||
render: (_, record) => (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>)
|
||||
}];
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:考勤数据-导入
|
||||
* Description:
|
||||
* Date: 2024/3/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Modal } from "antd";
|
||||
import ImportDialog from "../../../../components/importDialog";
|
||||
import HeaderSet from "../../../../components/importModal/headerSet";
|
||||
import ImportFormOptions from "./importFormOptions";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hasData: false,
|
||||
importDialog: {
|
||||
nextloading: false, link: null, importResult: {}, imageId: "", params: {},
|
||||
previewUrl: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { hasData, importDialog } = this.state;
|
||||
const { params, previewUrl } = nextProps;
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, importResult: {}, link: this.handleExportTemp,
|
||||
params, previewUrl, extraPreview: params
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
handleExportTemp = () => {
|
||||
const { hasData } = this.state;
|
||||
const { importFormPayload } = this.props;
|
||||
const { salarySobId, salaryYearMonth } = importFormPayload;
|
||||
if (!salarySobId || !salaryYearMonth) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
window.open(`/api/bs/hrmsalary/attendQuote/downloadTemplate?salaryYearMonth=${salaryYearMonth}&salarySobId=${salarySobId}`);
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state, { importAttendQuoteData, params } = this.props;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
importAttendQuoteData({ ...payload, ...params }).then(({ data, status }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog } = this.state;
|
||||
const {
|
||||
visible, onCancel, importFormPayload, onChangeImportForm, onHeaderSettings, loading
|
||||
} = this.props;
|
||||
return (
|
||||
<ImportDialog
|
||||
visible={visible} onCancel={onCancel} {...importDialog} title={getLabel(24023, "数据导入")}
|
||||
onResetImportResult={() => this.setState({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" }
|
||||
})}
|
||||
importParams={<ImportFormOptions {...importFormPayload} onChangeImportForm={onChangeImportForm}/>}
|
||||
exportDataDom={<HeaderSet loading={loading} onSetClick={() => onHeaderSettings({ sourceType: "IMPORT" })}/>}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -40,8 +40,9 @@ class ImportFormOptions extends Component {
|
|||
label: "薪资账套",
|
||||
value: salarySobId || "",
|
||||
onChange: this.screenChange,
|
||||
options: [{ key: "", showname: "" }, ...salarySobList],
|
||||
key: "salarySobId"
|
||||
options: salarySobList,
|
||||
key: "salarySobId",
|
||||
viewAttr: 3
|
||||
})
|
||||
},
|
||||
{ com: Input("薪资周期", salaryCycle) },
|
||||
|
|
|
|||
|
|
@ -18,15 +18,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
.attendanceFormWrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.attendanceSlideWrapper {
|
||||
.wea-slide-modal-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
|
||||
.wea-new-top > div:last-child {
|
||||
padding-right: 50px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rodal-close {
|
||||
|
|
@ -34,6 +38,28 @@
|
|||
top: 10px !important;
|
||||
}
|
||||
|
||||
.attendance-slide-body {
|
||||
background: #f6f6f6;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
|
||||
.attendance-tb-tip {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 4px 0;
|
||||
min-height: 32px;
|
||||
line-height: 18px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px) {
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker } from "antd";
|
||||
import { WeaFormItem, WeaNewScroll, WeaTab } from "ecCom";
|
||||
import { WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaReqTop } from "ecCom";
|
||||
import AttendanceDataComp from "./components/attendanceDataComp";
|
||||
import FieldMangComp from "./components/fieldMangComp";
|
||||
import LogDialog from "../../../components/logViewModal";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
|
|
@ -21,9 +23,8 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldName: "",
|
||||
selectedKey: "DATA",
|
||||
salaryMonth: []
|
||||
fieldName: "", selectedKey: "DATA", salaryMonth: [],
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -56,58 +57,81 @@ class Index extends Component {
|
|||
};
|
||||
handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) }));
|
||||
handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds();
|
||||
handleImportAttendanceData = () => {
|
||||
this.attendanceTableRef.handleImportAttendanceData({
|
||||
visiable: true, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
});
|
||||
};
|
||||
handleImportAttendanceData = () => this.attendanceTableRef.handleImportAttendanceData({ visible: true, params: {} });
|
||||
handleQuoteAttendanceData = () => {
|
||||
this.attendanceTableRef.handleQuoteAttendanceData({
|
||||
visible: true, title: "引用考勤数据"
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, salaryMonth, fieldName } = this.state;
|
||||
const { selectedKey, salaryMonth, fieldName, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const topTab = [
|
||||
{ title: "考勤数据", viewcondition: "DATA" },
|
||||
{ title: "字段管理", viewcondition: "FIELD" }
|
||||
{ title: "考勤数据", key: "DATA" },
|
||||
{ title: "字段管理", key: "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.handleAddAttendFileds}>新建</Button>,
|
||||
<WeaInputSearch placeholder={getLabel(511723, "请输入字段名称")}
|
||||
value={fieldName} onChange={fieldName => this.setState({ fieldName })}
|
||||
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}/>
|
||||
];
|
||||
return (
|
||||
<div className="attendanceRefWrapper">
|
||||
<WeaTab
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
|
||||
searchType={selectedKey === "FIELD" ? ["base"] : []} searchsBasePlaceHolder="请输入字段名称"
|
||||
onChange={v => this.setState({ selectedKey: v })}
|
||||
searchsBaseValue={fieldName} onSearchChange={fieldName => this.setState({ fieldName })}
|
||||
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}
|
||||
/>
|
||||
{
|
||||
selectedKey === "DATA" && this.getAttendanceDataScreen()
|
||||
}
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
<WeaReqTop
|
||||
buttonSpace={10} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
tabDatas={topTab} selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
|
||||
onChange={v => this.setState({ selectedKey: v })} title={getLabel(525196, "考勤数据")}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
salaryYearMonth={salaryMonth}
|
||||
/> :
|
||||
<FieldMangComp
|
||||
ref={dom => this.fieldMangRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
fieldName={fieldName}
|
||||
/>
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
]}
|
||||
>
|
||||
{
|
||||
selectedKey === "DATA" && this.getAttendanceDataScreen()
|
||||
}
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
{
|
||||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
salaryYearMonth={salaryMonth}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> :
|
||||
<FieldMangComp
|
||||
ref={dom => this.fieldMangRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
fieldName={fieldName}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
}
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={selectedKey === "DATA" ? "attendquote" : "attendfield"}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })} filterConditions={filterConditions}/>
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
flex-direction: column;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 8px 16px;
|
||||
padding: 8px 16px 0 16px;
|
||||
|
||||
.to {
|
||||
padding: 0 10px
|
||||
|
|
@ -14,6 +14,8 @@
|
|||
.tableWrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
background: #FFF;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.linkWapper {
|
||||
|
|
@ -23,6 +25,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.zIndex0-attendance {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.attendenceImportWrapper {
|
||||
.wea-dialog-body {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class ImportFormCom extends Component {
|
|||
value: taxAgentId || "",
|
||||
onChange: this.screenChange,
|
||||
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
|
||||
key: "taxAgentId"
|
||||
key: "taxAgentId", viewAttr: 3
|
||||
})
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -19,14 +19,13 @@ import {
|
|||
editAddUpDeduction,
|
||||
getAddUpDeduction,
|
||||
getCumDeductSaCondition,
|
||||
importCumDeductParam,
|
||||
importCumDeductPreview
|
||||
importCumDeductParam
|
||||
} from "../../../apis/cumDeduct";
|
||||
import DataTables from "../dataTables";
|
||||
import AddItems from "../addItems";
|
||||
import ImportFormCom from "./components/importFormCom";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { dataCollectCondition, modalColumns } from "./columns";
|
||||
import { dataCollectCondition } from "./columns";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import Layout from "../layout";
|
||||
|
|
@ -59,14 +58,14 @@ class Index extends Component {
|
|||
taxAgentId: ""
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/addUpDeduction/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/addUpDeduction/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -84,17 +83,18 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
autoAddAll = () => {
|
||||
const { declareMonth } = this.state;
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
this.setState({ addAllLoading: true });
|
||||
autoAddAll({ yearMonth: declareMonth }).then(({ status, data, errormsg }) => {
|
||||
this.setState({ addAllLoading: false });
|
||||
if (status) {
|
||||
message.success(data || "操作成功");
|
||||
this.tableRef.getTableDate();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
}).catch(() => this.setState({ addAllLoading: false }));
|
||||
autoAddAll({ yearMonth: declareMonth, taxAgentIds: taxAgentId ? taxAgentId.split(",") : [] })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
this.setState({ addAllLoading: false });
|
||||
if (status) {
|
||||
message.success(data || "操作成功");
|
||||
this.tableRef.getTableDate();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
}).catch(() => this.setState({ addAllLoading: false }));
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -199,41 +199,6 @@ class Index extends Component {
|
|||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
importCumDeductParam(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handlePreviewImport = (params) => {
|
||||
importCumDeductPreview(params).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { preview = [] } = data;
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, slideDataSource: preview }
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "预览失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 数据采集-信息保存
|
||||
|
|
@ -358,7 +323,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getAddUpDeduction({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this[key](record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this[key](record);
|
||||
};
|
||||
handleCloseSlide = () => {
|
||||
const { slidePayload } = this.state;
|
||||
|
|
@ -398,8 +363,8 @@ class Index extends Component {
|
|||
label: "个税扣缴义务人",
|
||||
value: taxAgentId,
|
||||
onChange: this.screenChange,
|
||||
options: [{ key: "", showname: "全部" }, ...taxAgentOption],
|
||||
key: "taxAgentId"
|
||||
options: taxAgentOption,
|
||||
key: "taxAgentId", multiple: true
|
||||
})
|
||||
}
|
||||
];
|
||||
|
|
@ -529,31 +494,24 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType
|
||||
importPayload, exportPayloadType, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentIds: taxAgentId ? taxAgentId.split(",") : [] };
|
||||
return (
|
||||
<Layout title="累计专项附加扣除" btns={this.getTopBtns()} leftComp={this.getScreen()}
|
||||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
columns={modalColumns}
|
||||
onCancel={this.handleCloseImport} onImportFile={importCumDeductParam}
|
||||
importPayload={importPayload} detailOptBtns={this.getDetailOptBtns()}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
@ -586,9 +544,13 @@ export const DataCollectionDatePicker = (props) => {
|
|||
</WeaFormItem>;
|
||||
};
|
||||
export const DataCollectionSelect = (props) => {
|
||||
const { value, label, onChange, options, key, labelCol = 10, wrapperCol = 14 } = props;
|
||||
const {
|
||||
value, label, onChange, options, key, labelCol = 10,
|
||||
wrapperCol = 14, viewAttr = 2, multiple = false
|
||||
} = props;
|
||||
return <WeaFormItem label={label} labelCol={{ span: labelCol }} wrapperCol={{ span: wrapperCol }}>
|
||||
<WeaSelect value={value} onChange={(val) => onChange({ key, value: val })} options={options}/>
|
||||
<WeaSelect value={value} onChange={(val) => onChange({ key, value: val })} options={options}
|
||||
viewAttr={viewAttr} multiple={multiple}/>
|
||||
</WeaFormItem>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ import {
|
|||
editAddUpSituation,
|
||||
getAddUpSituation,
|
||||
getCumSituationSaCondition,
|
||||
importCumSituationParam,
|
||||
importCumSituationPreview
|
||||
importCumSituationParam
|
||||
} from "../../../apis/cumSituation";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import DataTables from "../dataTables";
|
||||
|
|
@ -27,7 +26,6 @@ import moment from "moment";
|
|||
import { dataCollectCondition, taxOptions } from "./columns";
|
||||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { situationModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -57,14 +55,14 @@ class Index extends Component {
|
|||
declareMonth: moment(new Date()).format("YYYY-MM")
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/addUpSituation/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/addUpSituation/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -125,46 +123,6 @@ class Index extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
const { declareMonth, ...extra } = params;
|
||||
const payload = {
|
||||
taxYearMonth: declareMonth,
|
||||
...extra
|
||||
};
|
||||
importCumSituationParam(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handlePreviewImport = (params) => {
|
||||
importCumSituationPreview(params).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { preview = [] } = data;
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, slideDataSource: preview }
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "预览失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:列表操作
|
||||
|
|
@ -175,7 +133,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getAddUpSituation({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this.deleteSelectAddUpSituation(record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this.deleteSelectAddUpSituation(record);
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -484,12 +442,6 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:详情页面-操作按钮
|
||||
|
|
@ -544,7 +496,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, year, exportPayloadType
|
||||
importPayload, year, exportPayloadType, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
|
||||
return (
|
||||
|
|
@ -552,13 +504,12 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="addupsituation"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
onCancel={this.handleCloseImport} onImportFile={importCumSituationParam}
|
||||
detailOptBtns={this.getDetailOptBtns()}
|
||||
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
||||
onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
columns={situationModalColumns}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
@ -32,7 +35,10 @@ class DataTables extends Component {
|
|||
getTableDate = (extraPayload = {}) => {
|
||||
const { loading, pageInfo } = this.state;
|
||||
const { url, payload } = this.props;
|
||||
const module = { ...pageInfo, url, ...payload, ...extraPayload };
|
||||
const module = {
|
||||
...pageInfo, url, ...payload, ...extraPayload,
|
||||
departmentIds: extraPayload.departmentIds ? extraPayload.departmentIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
getTableDate(module).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
|
|
@ -118,6 +124,7 @@ class DataTables extends Component {
|
|||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="deleteSelectAddUpDeduction">删除</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
|
|
@ -132,8 +139,19 @@ class DataTables extends Component {
|
|||
<React.Fragment>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);"
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</React.Fragment>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:数据采集四个基础项-导入
|
||||
* Description:
|
||||
* Date: 2024/3/14
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||
import ImportDialog from "../../components/importDialog";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
hasData: false,
|
||||
importDialog: {
|
||||
nextloading: false, link: "", importResult: {}, imageId: "", params: {},
|
||||
previewUrl: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { hasData, importDialog } = this.state;
|
||||
const { templateLink, importOpts, importResult, previewUrl } = nextProps;
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog, link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData })}`,
|
||||
importResult, params: importOpts, previewUrl, extraPreview: importOpts
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
handleExportTemp = () => {
|
||||
const { hasData } = this.state;
|
||||
const { templateLink, importOpts } = this.props;
|
||||
if (!Object.values(importOpts).every(o => !!o)) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = { ...importOpts, hasData };
|
||||
window.open(`${templateLink}?${convertToUrlString(payload)}`, "_blank");
|
||||
};
|
||||
handleImport = (payload) => {
|
||||
const { importDialog } = this.state, { onImportFile, importOpts } = this.props;
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: true } });
|
||||
onImportFile({ ...payload, ...importOpts }).then(({ data, status }) => {
|
||||
this.setState({ importDialog: { ...importDialog, nextloading: false } });
|
||||
if (status) {
|
||||
this.setState({
|
||||
importDialog: { ...importDialog, ...payload, importResult: data }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { importDialog, hasData } = this.state;
|
||||
const { visible, onCancel, importParams, templateLink, importOpts } = this.props;
|
||||
return (
|
||||
<ImportDialog
|
||||
visible={visible} onCancel={onCancel} {...importDialog} title={getLabel(24023, "数据导入")}
|
||||
importParams={importParams} onResetImportResult={() => this.setState({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "", link: "" }
|
||||
})}
|
||||
exportDataDom={
|
||||
<WeaCheckbox
|
||||
value={hasData ? "1" : "0"}
|
||||
content={getLabel(543208, "导出现有数据")}
|
||||
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||
onChange={val => this.setState({ hasData: val === "1" }, () => {
|
||||
this.setState({
|
||||
importDialog: {
|
||||
...importDialog,
|
||||
link: `${templateLink}?${convertToUrlString({ ...importOpts, hasData: this.state.hasData })}`
|
||||
}
|
||||
});
|
||||
})}
|
||||
/>
|
||||
}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -81,6 +81,10 @@
|
|||
.wea-helpful-tip {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.screenSituationWrapper {
|
||||
|
|
|
|||
|
|
@ -7,19 +7,22 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import ImportModal from "../../components/importModal";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import ImportModal from "./importDialog";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import { getSearchs } from "../../util";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class Layout extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
showSearchAd: false
|
||||
showSearchAd: false, logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -39,6 +42,15 @@ class Layout extends Component {
|
|||
*/
|
||||
window.open(nextProps.exportPayloadUrl, "_self");
|
||||
}
|
||||
if (nextProps.targetid !== this.props.targetid && nextProps.targetid) {
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:操作日志
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
this.onDropMenuClick("log", nextProps.targetid);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
@ -49,25 +61,42 @@ class Layout extends Component {
|
|||
const { onResizeWindowInnerWidth } = this.props;
|
||||
onResizeWindowInnerWidth(window.innerWidth);
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showSearchAd } = this.state;
|
||||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||
slidePayload, onClose, onSave, slideLoading, form, condition,
|
||||
onAdSearch, onCancel, importPayload, onImportSetStep, onImportFile,
|
||||
onPreviewImport, detailOptBtns, columns
|
||||
slidePayload, onClose, onSave, slideLoading, form, condition, onImportFile,
|
||||
onAdSearch, onCancel, importPayload, detailOptBtns, logFunction, onClearTargrtid
|
||||
} = this.props;
|
||||
const { visible, title: subtitle, children: slideChildren } = slidePayload;
|
||||
const {
|
||||
visible: importVisiable, step, importFormComponent, importOpts,
|
||||
importResult, slideDataSource, templateLink
|
||||
visible: importVisiable, importFormComponent, importOpts,
|
||||
importResult, templateLink, previewUrl
|
||||
} = importPayload;
|
||||
return (
|
||||
<div className="layoutWrapper">
|
||||
<WeaTop title={title} buttons={showOperateBtn ? btns : []}
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false}
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
/>
|
||||
<WeaTab
|
||||
searchType={["base", "advanced"]}
|
||||
|
|
@ -85,20 +114,9 @@ class Layout extends Component {
|
|||
<WeaNewScroll height="100%">{children}</WeaNewScroll>
|
||||
{/*导入弹框*/}
|
||||
<ImportModal
|
||||
needimportSelected //下载模板需要带上导入所选项
|
||||
columns={columns}
|
||||
params={importOpts}
|
||||
step={step}
|
||||
setStep={onImportSetStep}
|
||||
importResult={importResult}
|
||||
onFinish={() => onCancel(true)}
|
||||
slideDataSource={slideDataSource}
|
||||
previewImport={onPreviewImport}
|
||||
importFile={onImportFile}
|
||||
templateLink={templateLink}
|
||||
renderFormComponent={() => importFormComponent}
|
||||
visiable={importVisiable}
|
||||
onCancel={onCancel}
|
||||
visible={importVisiable} onCancel={onCancel} importParams={importFormComponent}
|
||||
importOpts={importOpts} importResult={importResult} templateLink={templateLink}
|
||||
previewUrl={previewUrl} onImportFile={onImportFile}
|
||||
/>
|
||||
{/* 新增-编辑-详情弹框 */}
|
||||
<WeaSlideModal
|
||||
|
|
@ -124,6 +142,9 @@ class Layout extends Component {
|
|||
content={slideChildren}
|
||||
onClose={onClose}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={logFunction} filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false }, () => onClearTargrtid())}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import { DataCollectionDatePicker, DataCollectionSelect } from "../cumDeduct";
|
|||
import { dataCollectCondition } from "./columns";
|
||||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { otherModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -57,14 +56,14 @@ class Index extends Component {
|
|||
declareMonth: moment(new Date()).format("YYYY-MM")
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/otherDeduction/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/otherDeduction/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -145,22 +144,6 @@ class Index extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
importOtherDeductionParam(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
|
|
@ -190,7 +173,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getData({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this.deleteSelectData(record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this.deleteSelectData(record);
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -478,12 +461,6 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:详情页面-操作按钮
|
||||
|
|
@ -538,7 +515,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType
|
||||
importPayload, exportPayloadType, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -546,12 +523,11 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="otherdeduction"
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
columns={otherModalColumns}
|
||||
onCancel={this.handleCloseImport} importPayload={importPayload}
|
||||
detailOptBtns={this.getDetailOptBtns()} onImportFile={importOtherDeductionParam}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ import {
|
|||
specialAddDeductionDeleteAllData,
|
||||
specialAddDeductionDeleteSelectData,
|
||||
specialAddDeductionEditData,
|
||||
specialAddDeductionImportData,
|
||||
specialAddDeductionPreview
|
||||
specialAddDeductionImportData
|
||||
} from "../../../apis/special";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { DataCollectionSelect } from "../cumDeduct";
|
||||
|
|
@ -20,7 +19,6 @@ import ImportFormCom from "../cumDeduct/components/importFormCom";
|
|||
import { condition } from "./components/condition";
|
||||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { specialModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -47,14 +45,14 @@ class Index extends Component {
|
|||
taxAgentId: ""
|
||||
},
|
||||
importFormComponent: null,
|
||||
step: 0,
|
||||
templateLink: "/api/bs/hrmsalary/specialAddDeduction/downloadTemplate",
|
||||
importResult: {},
|
||||
slideDataSource: []
|
||||
previewUrl: "/api/bs/hrmsalary/specialAddDeduction/preview"
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -100,41 +98,6 @@ class Index extends Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集数据
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleImportFile = (params) => {
|
||||
specialAddDeductionImportData(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, importResult: data }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 导入数据采集-数据查看
|
||||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handlePreviewImport = (params) => {
|
||||
specialAddDeductionPreview(params).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { preview = [] } = data;
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, slideDataSource: preview }
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "预览失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 高级搜素框-表单项
|
||||
|
|
@ -360,7 +323,7 @@ class Index extends Component {
|
|||
const { id } = record;
|
||||
key === "handleAddData" ? getSpecialAddDeduction({ id }).then(({ status, data }) => {
|
||||
if (status) this[key]("编辑", data);
|
||||
}) : this.specialAddDeductionDeleteSelectData(record);
|
||||
}) : key === "log" ? this.setState({ targetid: id }) : this.specialAddDeductionDeleteSelectData(record);
|
||||
};
|
||||
handleCloseSlide = () => {
|
||||
const { slidePayload } = this.state;
|
||||
|
|
@ -438,18 +401,12 @@ class Index extends Component {
|
|||
importPayload: { ...importPayload, importOpts: { ...importOpts, [key]: value } }
|
||||
});
|
||||
};
|
||||
handleImportSetStep = (step) => {
|
||||
const { importPayload } = this.state;
|
||||
this.setState({
|
||||
importPayload: { ...importPayload, step }
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
||||
const {
|
||||
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
|
||||
exportPayloadType
|
||||
exportPayloadType, targetid
|
||||
} = this.state;
|
||||
const tablePayload = { taxAgentId };
|
||||
return (
|
||||
|
|
@ -457,12 +414,11 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
exportPayloadType={exportPayloadType} logFunction="specialAddDeduction"
|
||||
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={[]}
|
||||
columns={specialModalColumns}
|
||||
onCancel={this.handleCloseImport} detailOptBtns={[]}
|
||||
importPayload={importPayload} onImportFile={specialAddDeductionImportData}
|
||||
targetid={targetid} onClearTargrtid={() => this.setState({ targetid: "" })}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import { Dropdown, Menu, message, Modal } from "antd";
|
||||
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
|
||||
|
|
@ -117,6 +117,10 @@ class Index extends Component {
|
|||
>
|
||||
{getLabel(83110, "查看详情")}
|
||||
</a>
|
||||
{
|
||||
!showWithDrawBtn && <a href="javascript:void(0)" style={{ marginLeft: 10 }}
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
}
|
||||
{
|
||||
showWithDrawBtn &&
|
||||
<a
|
||||
|
|
@ -132,6 +136,18 @@ class Index extends Component {
|
|||
{getLabel(32025, "撤回")}
|
||||
</a>
|
||||
}
|
||||
{
|
||||
showWithDrawBtn && <Dropdown overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)" style={{ marginLeft: 10 }}><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
}
|
||||
</React.Fragment>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import moment from "moment";
|
|||
import DeclareQuery from "./components/declareQuery";
|
||||
import DeclareTablelist from "./components/declareTablelist";
|
||||
import DeclareDialog from "./components/declareDialog";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -25,11 +26,12 @@ class Calculate extends Component {
|
|||
queryParams: {
|
||||
taxAgentName: "",
|
||||
dateRange: [
|
||||
moment(new Date()).subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}, isRefresh: false,
|
||||
declareDaialog: { visible: false, title: "" }
|
||||
declareDaialog: { visible: false, title: "" },
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
};
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
|
@ -57,21 +59,41 @@ class Calculate extends Component {
|
|||
];
|
||||
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { queryParams, isRefresh, declareDaialog } = this.state;
|
||||
const { queryParams, isRefresh, declareDaialog, logDialogVisible, filterConditions } = this.state;
|
||||
return (
|
||||
<WeaTop title={getLabel(543353, "个税申报")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="declare-main-layout"
|
||||
>
|
||||
buttons={this.renderCalculateOpts()} className="declare-main-layout" showDropIcon
|
||||
onDropMenuClick={this.onDropMenuClick} dropMenuDatas={[{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}>
|
||||
<div className="declare-body">
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh}/>
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
<DeclareDialog {...declareDaialog}
|
||||
onCancel={(bool) => this.setState({
|
||||
declareDaialog: { ...declareDaialog, visible: false },
|
||||
isRefresh: bool === "refresh" ? !isRefresh : isRefresh
|
||||
})}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="taxdecla" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import { inject, observer } from "mobx-react";
|
|||
import { WeaHelpfulTip, WeaLocaleProvider, WeaTab, WeaTable, WeaTop } from "ecCom";
|
||||
import ExternalPersonManageEditSlide from "./components/externalPersonManageEditSlide";
|
||||
import ExternalPersonImport from "./components/externalPersonImport";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { getSearchs } from "../../util";
|
||||
import { condition, searchCondition } from "./conditions";
|
||||
import { deleteExtEmp, listPage } from "../../apis/externalPersonManage";
|
||||
import "./index.less";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false,
|
||||
loading: false, logDialogVisible: false, filterConditions: "[]",
|
||||
selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
showSearchAd: false,
|
||||
|
|
@ -103,10 +104,22 @@ class Index extends Component {
|
|||
}
|
||||
}));
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
showSearchAd, externalPersonManagePayload, loading,
|
||||
showSearchAd, externalPersonManagePayload, loading, logDialogVisible, filterConditions,
|
||||
pageInfo, selectedRowKeys, dataSource, externalPersonImportPayload
|
||||
} = this.state;
|
||||
const {
|
||||
|
|
@ -136,7 +149,13 @@ class Index extends Component {
|
|||
<div className="externalPerWrapper">
|
||||
<WeaTop
|
||||
title="非系统人员管理" icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false}
|
||||
iconBgcolor="#F14A2D" showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="externalPerCont">
|
||||
<WeaTab
|
||||
|
|
@ -181,6 +200,17 @@ class Index extends Component {
|
|||
<React.Fragment>
|
||||
<a href="javascript: void(0);" onClick={() => this.handleAdd(id)}
|
||||
style={{ paddingRight: 8 }}>编辑</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.onDropMenuClick("log", id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
{/*<a href="javascript: void(0);" onClick={() => this.handleDelete(id)}>删除</a>*/}
|
||||
</React.Fragment>
|
||||
)
|
||||
|
|
@ -222,6 +252,9 @@ class Index extends Component {
|
|||
/>
|
||||
}
|
||||
</div>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="extemployee" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaTop>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 { Dropdown, Menu, Switch } from "antd";
|
||||
import { salaryFieldList } from "../../../apis/fieldManage";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class FieldTable extends Component {
|
||||
|
|
@ -75,6 +77,17 @@ class FieldTable extends Component {
|
|||
record.canDelete && (showSalaryItemBtn || showOperateBtn) &&
|
||||
<a href="javascript:void(0);" className="mr10" onClick={() => onDeleteLedger(record)}>删除</a>
|
||||
}
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</div>;
|
||||
};
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,20 +7,22 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaInputSearch, WeaTop } from "ecCom";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import FieldTable from "./components/fieldTable";
|
||||
import FieldSlide from "./components/fieldSlide";
|
||||
import { deleteSalaryField } from "../../apis/fieldManage";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class FieldManagement extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchVal: "",
|
||||
doSearch: false,
|
||||
searchVal: "", doSearch: false, logDialogVisible: false, filterConditions: "[]",
|
||||
slideparams: {
|
||||
visible: false,
|
||||
title: "新建字段",
|
||||
|
|
@ -67,9 +69,21 @@ class FieldManagement extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { searchVal, doSearch, slideparams } = this.state;
|
||||
const { searchVal, doSearch, slideparams, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore } = this.props;
|
||||
const { showSalaryItemBtn, showOperateBtn } = taxAgentStore;
|
||||
const btns = [
|
||||
|
|
@ -85,15 +99,21 @@ class FieldManagement extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title="字段管理"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
showDropIcon={false}
|
||||
title="字段管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={(showSalaryItemBtn || showOperateBtn) ? btns : btns.slice(-1)}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="fieldManageWrapper">
|
||||
<FieldTable name={searchVal} doSearch={doSearch} onEditLedger={this.handleEditField}
|
||||
onDeleteLedger={(record) => this.handleDeleteField([record.id])}/>
|
||||
onDeleteLedger={(record) => this.handleDeleteField([record.id])}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
<FieldSlide
|
||||
{...slideparams}
|
||||
onChangeRecord={(record) => this.setState({
|
||||
|
|
@ -105,6 +125,9 @@ class FieldManagement extends Component {
|
|||
onCancel={this.handleResetField}
|
||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarcfield" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ledgerSlideContent {
|
||||
.ledgerSlideLayout {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
padding-right: 45px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
||||
right: 45px !important;
|
||||
}
|
||||
|
||||
.ledgerSlideContent {
|
||||
}
|
||||
}
|
||||
|
||||
.copyWrapper {
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
|||
const options = _.map(empFieldListOptions, o => ({
|
||||
...o, disabled: _.map(dataSource, g => g.fieldId).includes(o.key)
|
||||
}));
|
||||
if (_.isEmpty(dataSource) || _.isEmpty(options)) return null;
|
||||
return (
|
||||
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
|
||||
<div className="userInfoWrapper">
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import LedgerSalaryItemEditSlide from "./ledgerSalaryItemEditSlide";
|
|||
import { getSalaryItemForm } from "../../../apis/ledger";
|
||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import FormalFormModal from "../../salaryItem/formalFormModal";
|
||||
import { toDecimal_n } from "../../../util";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -91,7 +92,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
handleEditSalaryItem = async (record) => {
|
||||
const { salarySobId, dataSource } = this.props, { salaryItemId, id } = record;
|
||||
const {
|
||||
itemHide: hideDefault,
|
||||
itemHide: hideDefault, defaultValue,
|
||||
valueType, name, description,
|
||||
roundingMode, formulaId, dataType, useInEmployeeSalary,
|
||||
pattern, canEdit, formulaContent, originFormulaContent, originSqlContent
|
||||
|
|
@ -126,7 +127,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
...this.state.salaryItemPayload,
|
||||
visible: true,
|
||||
request: {
|
||||
canEdit, dataType, description,
|
||||
canEdit, dataType, description, defaultValue,
|
||||
formulaContent, formulaId, name,
|
||||
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
|
||||
valueType, roundingMode, pattern,
|
||||
|
|
@ -155,12 +156,13 @@ class LedgerSalaryItemTable extends Component {
|
|||
});
|
||||
const { salaryItemId } = record;
|
||||
const {
|
||||
hideDefault, roundingMode, pattern, valueType,
|
||||
originFormulaContent, originSqlContent, formulaId
|
||||
hideDefault, roundingMode, pattern, valueType, defaultValue,
|
||||
originFormulaContent, originSqlContent, formulaId, dataType
|
||||
} = request;
|
||||
this.handleChangeSalaryItem({
|
||||
...sxwzForm.getFormParams(),
|
||||
itemHide: hideDefault.toString(),
|
||||
defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue,
|
||||
roundingMode, pattern, valueType,
|
||||
formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent,
|
||||
formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId,
|
||||
|
|
|
|||
|
|
@ -6,25 +6,20 @@
|
|||
*/
|
||||
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";
|
||||
import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel";
|
||||
import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules";
|
||||
import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem";
|
||||
import LedgerSalaryItem from "./ledgerSalaryItem";
|
||||
import WeaTopTitle from "../../../components/custom-title/weaTopTitle";
|
||||
import WeaReqTitle from "../../../components/custom-title/weaReqTitle";
|
||||
import { saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const Step = WeaSteps.Step;
|
||||
const tabs = [
|
||||
{ key: 0, title: "基础设置" },
|
||||
{ key: 1, title: "关联人员" },
|
||||
{ key: 2, title: "薪资项目" },
|
||||
{ key: 3, title: "回算薪资项目" },
|
||||
{ key: 4, title: "调薪计薪规则" }
|
||||
];
|
||||
|
||||
@inject("taxAgentStore", "ledgerStore")
|
||||
@observer
|
||||
|
|
@ -32,12 +27,8 @@ class LedgerSlide extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
current: 0,
|
||||
loading: false,
|
||||
baseSettingInfo: {},
|
||||
adjustRules: [],
|
||||
empFields: [], itemGroups: [],
|
||||
saveSalarySobId: ""
|
||||
current: 0, loading: false, baseSettingInfo: {}, adjustRules: [],
|
||||
empFields: [], itemGroups: [], saveSalarySobId: ""
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -142,128 +133,96 @@ class LedgerSlide extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleChangeSlideTab = (current) => {
|
||||
this.setState({ current: Number(current) });
|
||||
};
|
||||
handleClose = () => {
|
||||
this.setState({ current: 0 }, () => this.props.onCancel());
|
||||
};
|
||||
handleClose = () => this.setState({ current: 0, baseSettingInfo: {} }, () => this.props.onCancel());
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 基础信息字段切换
|
||||
* Params:
|
||||
* Date: 2022/12/9
|
||||
*/
|
||||
handleChangeSaveParams = (baseSettingInfo) => {
|
||||
this.setState({ baseSettingInfo });
|
||||
};
|
||||
handleChangeSaveParams = (baseSettingInfo) => this.setState({ baseSettingInfo });
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 薪资项目保存数据
|
||||
* Params:
|
||||
* Date: 2022/12/14
|
||||
*/
|
||||
handleSaveSalaryItemParams = (empFields, itemGroups) => {
|
||||
this.setState({ empFields, itemGroups });
|
||||
};
|
||||
renderChildren = () => {
|
||||
const { current, saveSalarySobId } = this.state;
|
||||
let CurrentDom = null;
|
||||
switch (current) {
|
||||
case 0:
|
||||
CurrentDom = <LedgerBaseSetting {...this.props} onSaveParams={this.handleChangeSaveParams}/>;
|
||||
break;
|
||||
case 1:
|
||||
CurrentDom = <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>;
|
||||
break;
|
||||
case 2:
|
||||
CurrentDom = <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>;
|
||||
break;
|
||||
case 3:
|
||||
CurrentDom = <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>;
|
||||
break;
|
||||
case 4:
|
||||
CurrentDom =
|
||||
<LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>;
|
||||
break;
|
||||
default:
|
||||
CurrentDom = null;
|
||||
break;
|
||||
}
|
||||
return CurrentDom;
|
||||
};
|
||||
renderCustomOperate = () => {
|
||||
const { taxAgentStore: { showOperateBtn }, editId } = this.props;
|
||||
const { current, loading } = this.state;
|
||||
let CurrentDom = [];
|
||||
//管理员操作权限
|
||||
if (showOperateBtn) {
|
||||
switch (current) {
|
||||
case 0:
|
||||
CurrentDom = [
|
||||
<Button
|
||||
type="primary"
|
||||
loading={loading}
|
||||
onClick={this.saveLedgerBasic}
|
||||
>{editId ? "保存" : "保存并进入下一步"}</Button>
|
||||
];
|
||||
break;
|
||||
case 1:
|
||||
CurrentDom = !editId ? [
|
||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
||||
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</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="primary"
|
||||
loading={loading}
|
||||
onClick={() => {
|
||||
this.setState({ current: current + 1 }, () => {
|
||||
this.saveLedgerItem();
|
||||
});
|
||||
}}
|
||||
>保存并进入下一步</Button>
|
||||
] : [
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>保存</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>
|
||||
] : [];
|
||||
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="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>保存</Button>
|
||||
];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CurrentDom;
|
||||
};
|
||||
handleSaveSalaryItemParams = (empFields, itemGroups) => this.setState({ empFields, itemGroups });
|
||||
|
||||
render() {
|
||||
const { title, visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { current } = this.state;
|
||||
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { current, saveSalarySobId, loading } = this.state;
|
||||
let tabs = [
|
||||
{
|
||||
key: 0, title: getLabel(82751, "基础设置"),
|
||||
createBtns: [
|
||||
<Button type="primary" loading={loading}
|
||||
onClick={this.saveLedgerBasic}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerBasic}>{getLabel(111, "保存")}</Button>
|
||||
],
|
||||
children: <LedgerBaseSetting
|
||||
{...this.props} onSaveParams={this.handleChangeSaveParams}
|
||||
onTaxableItemsChange={(val) => this.setState({ taxableItems: val })}
|
||||
/>
|
||||
},
|
||||
{
|
||||
key: 1, title: getLabel(543467, "关联人员"),
|
||||
createBtns: [
|
||||
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
|
||||
],
|
||||
editBtns: [],
|
||||
children: <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>
|
||||
},
|
||||
{
|
||||
key: 2, title: getLabel(542362, "薪资项目"),
|
||||
createBtns: [
|
||||
<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} onClick={() => {
|
||||
this.setState({ current: current + 1 }, () => this.saveLedgerItem());
|
||||
}}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>{getLabel(111, "保存")}</Button>
|
||||
],
|
||||
children: <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>
|
||||
},
|
||||
{
|
||||
key: 3, title: getLabel(543468, "回算薪资项目"),
|
||||
createBtns: [
|
||||
<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>
|
||||
],
|
||||
editBtns: [],
|
||||
children: <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>
|
||||
},
|
||||
{
|
||||
key: 4, title: getLabel(543469, "调薪计薪规则"),
|
||||
createBtns: [
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>{getLabel(111, "完成")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" loading={loading}
|
||||
onClick={this.saveLedgerAdjustRule}>{getLabel(111, "保存")}</Button>
|
||||
],
|
||||
children: <LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>
|
||||
}
|
||||
];
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
className="ledgerSlideLayout slideOuterWrapper"
|
||||
visible={visible}
|
||||
top={0}
|
||||
width={100}
|
||||
|
|
@ -271,18 +230,10 @@ class LedgerSlide extends Component {
|
|||
direction="right"
|
||||
measure="%"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={title}
|
||||
tabs={editId ? tabs : []}
|
||||
loading={false}
|
||||
showOperateBtn={showOperateBtn}
|
||||
editable={false}
|
||||
onSave={() => {
|
||||
}}
|
||||
selectedTab={current}
|
||||
customOperate={this.renderCustomOperate()}
|
||||
subItemChange={this.handleChangeSlideTab}
|
||||
/>
|
||||
!editId ? <WeaTopTitle buttons={_.find(tabs, o => current === o.key).createBtns}/> :
|
||||
<WeaReqTitle buttons={showOperateBtn ? _.find(tabs, o => current === o.key).editBtns : []}
|
||||
tabDatas={tabs} selectedKey={String(current)}
|
||||
onChange={cur => this.setState({ current: parseInt(cur) })}/>
|
||||
}
|
||||
content={
|
||||
<div className="ledgerSlideContent">
|
||||
|
|
@ -297,9 +248,7 @@ class LedgerSlide extends Component {
|
|||
}
|
||||
</WeaSteps>
|
||||
}
|
||||
{
|
||||
this.renderChildren()
|
||||
}
|
||||
{_.find(tabs, o => current === o.key).children}
|
||||
</div>
|
||||
}
|
||||
onClose={this.handleClose}
|
||||
|
|
|
|||
|
|
@ -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", "ledgerStore")
|
||||
@observer
|
||||
class LedgerTable extends Component {
|
||||
|
|
@ -91,6 +93,7 @@ class LedgerTable extends Component {
|
|||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleMenuClick(e, record)}>
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
|
|
@ -161,6 +164,9 @@ class LedgerTable extends Component {
|
|||
}
|
||||
});
|
||||
break;
|
||||
case "log":
|
||||
this.props.onFilterLog(key, id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,21 +6,23 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import LedgerTable from "./components/ledgerTable";
|
||||
import LedgerSlide from "./components/ledgerSlide";
|
||||
import LedgerSearchComp from "./components/ledgerSearchComp";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
searchVal: "",
|
||||
doSearch: false,
|
||||
searchVal: "", doSearch: false, logDialogVisible: false, filterConditions: "[]",
|
||||
slideparams: {
|
||||
visible: false,
|
||||
title: "新建账套",
|
||||
|
|
@ -51,9 +53,21 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { searchVal, doSearch, slideparams } = this.state;
|
||||
const { logDialogVisible, filterConditions, doSearch, slideparams } = this.state;
|
||||
const { taxAgentStore } = this.props;
|
||||
const { showOperateBtn } = taxAgentStore;
|
||||
const btns = [
|
||||
|
|
@ -65,19 +79,27 @@ class Index extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title="薪资账套" className="ledgerOuter"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
showDropIcon={false}
|
||||
title="薪资账套" className="ledgerOuter" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(-1)}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
<div className="ledgerWrapper">
|
||||
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}/>
|
||||
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
<LedgerSlide
|
||||
{...slideparams}
|
||||
onCancel={this.handleResetLedger}
|
||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarysob" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
.ledgerOuter {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
span:nth-child(2) {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ledgerWrapper {
|
||||
height: 100%;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ export default class MobilePayroll extends React.Component {
|
|||
async componentWillMount() {
|
||||
const type = getQueryString("type");
|
||||
this.id = getQueryString("id");
|
||||
const { mySalaryStore: { init } } = this.props;
|
||||
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
|
||||
setMySalaryBill({});
|
||||
if (type !== "phone") {
|
||||
const { data, status } = await payrollCheckType();
|
||||
if (status && data === "PWD") {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { WeaSwitch } from "comsMobx";
|
|||
import { condition, loginCondition } from "./pwdCondtion";
|
||||
import { Button, message } from "antd";
|
||||
import { RSAEcrypt } from "../../util/RSAUtil";
|
||||
import { checkPassword, saveSecondaryPwd } from "../../apis/mySalaryBenefits";
|
||||
import { checkPassword, getPasswordForm, saveSecondaryPwd } from "../../apis/mySalaryBenefits";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -72,7 +72,8 @@ class PassSetDialog extends Component {
|
|||
});
|
||||
return group;
|
||||
};
|
||||
saveSecondaryPassword = () => {
|
||||
saveSecondaryPassword = async () => {
|
||||
const { openRSA } = await getPasswordForm();
|
||||
const { isPassLoginPassword } = this.state;
|
||||
const { form } = this.props;
|
||||
const { secondaryPwd1, secondaryPwd2, validatecode, password } = form.getFormParams();
|
||||
|
|
@ -92,7 +93,7 @@ class PassSetDialog extends Component {
|
|||
}
|
||||
}
|
||||
const params = isPassLoginPassword ? { secondaryPwd1, secondaryPwd2 } : { password };
|
||||
RSAEcrypt("1", params).then(RSAParam => {
|
||||
RSAEcrypt(openRSA, params).then(RSAParam => {
|
||||
isPassLoginPassword ?
|
||||
saveSecondaryPwd({ ...RSAParam, validatecode }).then(({ sign, message: msg }) => {
|
||||
if (sign === "1") {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu } from "antd";
|
||||
import { mySalaryBillList, mySalaryBillList4Card } from "../../../../apis/mySalaryBenefits";
|
||||
import moment from "moment";
|
||||
|
||||
|
|
@ -83,9 +84,22 @@ class Index extends Component {
|
|||
dataIndex: "options",
|
||||
title: getLabel(30585, "操作"),
|
||||
width: 120,
|
||||
render: (_, record) => (<a
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/mySalary/${record.id}`}
|
||||
target="_blank">{getLabel(33564, "查看")}</a>)
|
||||
render: (_, record) => (<React.Fragment>
|
||||
<a style={{ marginRight: 10 }}
|
||||
href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/mySalary/${record.id}`}
|
||||
target="_blank">{getLabel(33564, "查看")}</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
</React.Fragment>)
|
||||
}]}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
|||
import Payroll from "./components/payrollTable";
|
||||
import SalaryAdjustmentRecords from "./components/SalaryAdjustmentRecords";
|
||||
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
||||
import Authority from "../mySalary/authority";
|
||||
import * as API from "../../apis/ruleconfig";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -18,20 +21,40 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "1",
|
||||
selectedKey: "0", sysinfo: {}, tabs: [], store: { loading: false, hasRight: false },
|
||||
logDialogVisible: false, filterConditions: "[]",
|
||||
salaryYearMonth: [
|
||||
moment().subtract(1, 'year').startOf("year").format("YYYY-MM"),
|
||||
moment().subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment().endOf("year").format("YYYY-MM")
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data: sysinfo } = await API.sysinfo();
|
||||
const { adjustShowStatus, salaryShowStatus } = sysinfo;
|
||||
let tabs = [
|
||||
{ key: "1", title: getLabel(111, "工资单") },
|
||||
{ key: "2", title: getLabel(543150, "调薪记录") }
|
||||
];
|
||||
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
|
||||
adjustShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "2"));
|
||||
this.setState({ sysinfo, tabs }, () => {
|
||||
const { tabs, store } = this.state;
|
||||
this.setState({
|
||||
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",
|
||||
store: { ...store, hasRight: !_.isEmpty(tabs) }
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
renderContent = () => {
|
||||
const { selectedKey, salaryYearMonth } = this.state;
|
||||
let Dom = null;
|
||||
switch (selectedKey) {
|
||||
case "1":
|
||||
Dom = <Payroll salaryYearMonth={salaryYearMonth}/>;
|
||||
Dom = <Payroll salaryYearMonth={salaryYearMonth}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>;
|
||||
break;
|
||||
case "2":
|
||||
Dom = <SalaryAdjustmentRecords/>;
|
||||
|
|
@ -41,13 +64,21 @@ class Index extends Component {
|
|||
}
|
||||
return Dom;
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
switch (key) {
|
||||
case "log":
|
||||
this.setState({
|
||||
logDialogVisible: true,
|
||||
filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]"
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, salaryYearMonth } = this.state;
|
||||
const tabs = [
|
||||
{ key: "1", title: getLabel(111, "工资单") },
|
||||
{ key: "2", title: getLabel(543150, "调薪记录") }
|
||||
];
|
||||
const { selectedKey, salaryYearMonth, tabs, logDialogVisible, filterConditions } = this.state;
|
||||
const btns = [
|
||||
<div className="flex-salary">
|
||||
<div className="mysalary-search-title">{getLabel(542604, "薪资所属月")}</div>
|
||||
|
|
@ -55,15 +86,29 @@ class Index extends Component {
|
|||
onChange={v => this.setState({ salaryYearMonth: v })}/>
|
||||
</div>
|
||||
];
|
||||
const logFunction = selectedKey === "1" ? "mysalarybill" : "myadjustrecord";
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(537998, "我的薪资福利")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="mySalary_wrapper"
|
||||
buttons={selectedKey === "1" ? btns : []} buttonSpace={10} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
>
|
||||
{this.renderContent()}
|
||||
</WeaReqTop>
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
store={{ ...this.state.store }}>
|
||||
<WeaReqTop
|
||||
title={getLabel(537998, "我的薪资福利")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="mySalary_wrapper"
|
||||
buttons={selectedKey === "1" ? btns : []} buttonSpace={10} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
{this.renderContent()}
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction={logFunction} filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaReqTop>
|
||||
</Authority>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,9 @@ class Index extends Component {
|
|||
<span>{getLabel(111, "发放时间")}</span>
|
||||
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
|
||||
</div>
|
||||
<a href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&type=phone`}
|
||||
target="_blank">
|
||||
<a
|
||||
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&recipient=${it.employeeId}&type=phone`}
|
||||
target="_blank">
|
||||
{`${getLabel(33564, "查看")}>`}
|
||||
</a>
|
||||
</li>;
|
||||
|
|
|
|||
|
|
@ -87,9 +87,14 @@ export default class PayrollDetail extends React.Component {
|
|||
const { child, ...extraParams } = extra;
|
||||
const salarySendId = getQueryString("id");
|
||||
const { payrollStore } = this.props;
|
||||
const { detailListConditionForm: form } = payrollStore;
|
||||
const payload = { salarySendId, ...pageInfo, ...extraParams, ...form.getFormParams() };
|
||||
const { detailListConditionForm: form, setDetailListShowSearchAd } = payrollStore;
|
||||
const payload = {
|
||||
salarySendId, ...pageInfo, ...extraParams, ...form.getFormParams(),
|
||||
departmentIds: form.getFormParams().departmentIds ? form.getFormParams().departmentIds.split(",") : [],
|
||||
subCompanyIds: form.getFormParams().subCompanyIds ? form.getFormParams().subCompanyIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
setDetailListShowSearchAd(false)
|
||||
getPayrollDetailList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
.payPreBox {
|
||||
.pay-preview-layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
*
|
||||
* 工资单预览
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/6/17
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { salaryBillPreview } from "../../../../apis/payroll";
|
||||
import Content from "../../../../components/pcTemplate/content";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class PayrollPreviewDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
salaryBillData: { salaryTemplate: {}, salaryGroups: [], employeeInformation: {} }
|
||||
};
|
||||
this.preRef = null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { salaryInfoId, recipient } = nextProps;
|
||||
salaryBillPreview({ salaryInfoId, recipient }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ salaryBillData: data });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const {
|
||||
salaryTemplate, salaryGroups, employeeInformation, sendTime
|
||||
} = this.state.salaryBillData;
|
||||
const salaryProps = {
|
||||
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
||||
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
|
||||
itemTypeList: [employeeInformation, ...salaryGroups]
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} ref={dom => this.preRef = dom} scalable hasScroll className="payPreBox" initLoadCss
|
||||
style={{
|
||||
width: 998, height: window.innerHeight - 40, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}
|
||||
>
|
||||
<div className="pay-preview-layout">{!_.isEmpty(salaryGroups) && <Content {...salaryProps}/>}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PayrollPreviewDialog;
|
||||
|
|
@ -8,8 +8,9 @@ import { getQueryString } from "../../../util/url";
|
|||
import { getSearchs, renderLoading } from "../../../util";
|
||||
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||
import PayrollPartTable from "./payrollPartTable";
|
||||
import { getPayrollIssuanceProgressBar } from "../../../apis/payroll";
|
||||
import { genPdfBeforeExport, getPayrollIssuanceProgressBar } from "../../../apis/payroll";
|
||||
import ProgressModal from "../../../components/progressModal";
|
||||
import PayrollPreviewDialog from "./components/payrollPreviewDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const { ButtonSelect } = WeaDropdown;
|
||||
|
|
@ -31,6 +32,10 @@ export default class PayrollGrant extends React.Component {
|
|||
title: "工资单发放",
|
||||
grantType: "",
|
||||
salarySendId: ""
|
||||
},
|
||||
payrollPreviewDialog: {
|
||||
visible: false, title: getLabel(111, "工资单预览"),
|
||||
salaryInfoId: "", recipient: ""
|
||||
}
|
||||
};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
|
|
@ -303,7 +308,7 @@ export default class PayrollGrant extends React.Component {
|
|||
};
|
||||
|
||||
getColumns = () => {
|
||||
const { selectedKey, showFeedbackColumn } = this.state;
|
||||
const { selectedKey, showFeedbackColumn, payrollPreviewDialog } = this.state;
|
||||
const { payrollStore } = this.props;
|
||||
const { salaryGrantTableStore: columns, salarySendDetailBaseInfo } = payrollStore;
|
||||
return _.map([
|
||||
|
|
@ -323,12 +328,28 @@ export default class PayrollGrant extends React.Component {
|
|||
onClick={() => this.handleWithdraw({ ids: [record.id] })}>
|
||||
撤回
|
||||
</a>
|
||||
<a href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.setState({
|
||||
payrollPreviewDialog: {
|
||||
...payrollPreviewDialog,
|
||||
visible: true, salaryInfoId: record.id, recipient: record.employeeId
|
||||
}
|
||||
})}>
|
||||
{getLabel(111, "查看")}
|
||||
</a>
|
||||
{
|
||||
salarySendDetailBaseInfo.showPdfBtn &&
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
genPdfBeforeExport({ id: record.id, salarySendId: getQueryString("id") })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}}>
|
||||
{getLabel(111, "导出PDF")}
|
||||
</a>
|
||||
|
|
@ -343,7 +364,14 @@ export default class PayrollGrant extends React.Component {
|
|||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
genPdfBeforeExport({ id: record.id, salarySendId: getQueryString("id") })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/salaryBill/exportPdf?id=${record.id}&salarySendId=${getQueryString("id")}`, "_blank");
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}}>
|
||||
{getLabel(111, "导出PDF")}
|
||||
</a>
|
||||
|
|
@ -353,11 +381,21 @@ export default class PayrollGrant extends React.Component {
|
|||
}
|
||||
} else if (salarySendDetailBaseInfo.canSend) {
|
||||
return (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
onClick={() => this.handleGrant({ ids: [record.id] })}>
|
||||
发放
|
||||
</a>
|
||||
<React.Fragment>
|
||||
<a
|
||||
href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleGrant({ ids: [record.id] })}>
|
||||
发放
|
||||
</a>
|
||||
<a href="javascript:void(0);" onClick={() => this.setState({
|
||||
payrollPreviewDialog: {
|
||||
...payrollPreviewDialog,
|
||||
visible: true, salaryInfoId: record.id, recipient: record.employeeId
|
||||
}
|
||||
})}>
|
||||
{getLabel(111, "查看")}
|
||||
</a>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -398,10 +436,10 @@ export default class PayrollGrant extends React.Component {
|
|||
<Menu onClick={handleMenuClick}>
|
||||
<Menu.Item key="3">全部导出</Menu.Item>
|
||||
<Menu.Item key="4">导出选中</Menu.Item>
|
||||
{
|
||||
selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn &&
|
||||
<Menu.Item key="5">{getLabel(111, "导出PDF")}</Menu.Item>
|
||||
}
|
||||
{/*{*/}
|
||||
{/* selectedKey === "1" && salarySendDetailBaseInfo.showPdfBtn &&*/}
|
||||
{/* <Menu.Item key="5">{getLabel(111, "导出PDF")}</Menu.Item>*/}
|
||||
{/*}*/}
|
||||
</Menu>
|
||||
);
|
||||
let btnDom = [
|
||||
|
|
@ -524,9 +562,10 @@ export default class PayrollGrant extends React.Component {
|
|||
grantListCondition,
|
||||
setGrantListShowSearchAd,
|
||||
salaryGrantPageInfo,
|
||||
getInfoList
|
||||
getInfoList,
|
||||
loading
|
||||
} = payrollStore;
|
||||
const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams } = this.state;
|
||||
const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams, payrollPreviewDialog } = this.state;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange
|
||||
|
|
@ -555,35 +594,19 @@ export default class PayrollGrant extends React.Component {
|
|||
];
|
||||
return (
|
||||
<div className="payrollGrant_new">
|
||||
<WeaTop
|
||||
title="工资单发放" // 文字
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
buttons={this.getSearchsAdQuick()}
|
||||
/>
|
||||
|
||||
<WeaTop title="工资单发放" icon={<i className="icon-coms-meeting"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon={true} buttons={this.getSearchsAdQuick()}/>
|
||||
<WeaTab
|
||||
datas={topTab}
|
||||
keyParam="viewcondition"
|
||||
selectedKey={selectedKey}
|
||||
onChange={v =>
|
||||
this.setState({ selectedKey: v }, () => {
|
||||
getInfoList({
|
||||
salarySendId: currentId,
|
||||
isGranted: v !== "0"
|
||||
});
|
||||
})
|
||||
}
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
searchsBasePlaceHolder="请输入姓名"
|
||||
showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
|
||||
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
|
||||
onSearchChange={v => grantListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||
searchsBaseValue={grantListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} searchType={["base", "advanced"]}
|
||||
onChange={v => this.setState({ selectedKey: v }, () => {
|
||||
getInfoList({ salarySendId: currentId, isGranted: v !== "0" });
|
||||
})}
|
||||
searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn}
|
||||
setShowSearchAd={bool => setGrantListShowSearchAd(bool)}
|
||||
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)}
|
||||
onSearch={() => this.handleSearch()}
|
||||
onSearchChange={v => grantListConditionForm.updateFields({ username: v })}
|
||||
searchsBaseValue={grantListConditionForm.getFormParams().username}
|
||||
/>
|
||||
<div className="titleBar">
|
||||
<div className="titleBarLeft">
|
||||
|
|
@ -612,7 +635,7 @@ export default class PayrollGrant extends React.Component {
|
|||
</div>
|
||||
<div className="tableWrapper">
|
||||
{
|
||||
!_.isEmpty(this.getColumns()) ?
|
||||
!loading ?
|
||||
<CustomPaginationTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
|
|
@ -652,6 +675,14 @@ export default class PayrollGrant extends React.Component {
|
|||
progress={this.state.progress}
|
||||
/>
|
||||
}
|
||||
{/*工资单预览*/}
|
||||
<PayrollPreviewDialog {...payrollPreviewDialog}
|
||||
onCancel={() => this.setState({
|
||||
payrollPreviewDialog: {
|
||||
...payrollPreviewDialog,
|
||||
visible: false
|
||||
}
|
||||
})}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,6 +290,7 @@ class SalaryItemSettings extends Component {
|
|||
render() {
|
||||
const { onChangeSalaryItem, salaryBillItemNameSet } = this.props;
|
||||
const { dataList, modalPayload, checkedValue } = this.state;
|
||||
if (_.isEmpty(dataList)) return null;
|
||||
return (
|
||||
<div className="salaryItemSettingWrapper">
|
||||
<WeaSortable
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue