Merge branch 'release/2.9.42309.01' into release/2.9.42309.01-个税
# Conflicts: # pc4mobx/hrmSalary/components/importDialog/components/impStep1.js # pc4mobx/hrmSalary/components/importDialog/index.js # pc4mobx/hrmSalary/components/importDialog/index.less # pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js
This commit is contained in:
commit
1bd7d92073
|
|
@ -1,4 +1,4 @@
|
||||||
import { WeaTools } from 'ecCom';
|
import { WeaTools } from "ecCom";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 薪资项目api
|
* 薪资项目api
|
||||||
|
|
@ -7,171 +7,171 @@ import { WeaTools } from 'ecCom';
|
||||||
|
|
||||||
// 薪资项目-获取列表
|
// 薪资项目-获取列表
|
||||||
export const getItemList = params => {
|
export const getItemList = params => {
|
||||||
return fetch('/api/bs/hrmsalary/salaryitem/list', {
|
return fetch("/api/bs/hrmsalary/salaryitem/list", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
};
|
};
|
||||||
|
|
||||||
//薪资项目的高级搜索
|
//薪资项目的高级搜索
|
||||||
export const getSaCondition = params => {
|
export const getSaCondition = params => {
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/getSearchCondition', 'GET', params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSearchCondition", "GET", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
//数据源列表字典项
|
//数据源列表字典项
|
||||||
export const formulaDatasourceList = params => {
|
export const formulaDatasourceList = params => {
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/formula/datasource/list', 'GET', params);
|
return WeaTools.callApi("/api/bs/hrmsalary/formula/datasource/list", "GET", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
//薪资项目-系统薪资项目列表
|
//薪资项目-系统薪资项目列表
|
||||||
export const getSysItemList = params => {
|
export const getSysItemList = params => {
|
||||||
return fetch('/api/bs/hrmsalary/salaryitem/sysList', {
|
return fetch("/api/bs/hrmsalary/salaryitem/sysList", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
};
|
};
|
||||||
|
|
||||||
//系统薪资项目的高级搜索
|
//系统薪资项目的高级搜索
|
||||||
export const getSysSaCondition = params => {
|
export const getSysSaCondition = params => {
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/getSysSearchCondition', 'GET', params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSysSearchCondition", "GET", params);
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-批量删除薪资项目
|
//薪资项目-批量删除薪资项目
|
||||||
export const deleteItem = params => {
|
export const deleteItem = params => {
|
||||||
return fetch('/api/bs/hrmsalary/salaryitem/delete', {
|
return fetch("/api/bs/hrmsalary/salaryitem/delete", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-批量删除列表
|
//薪资项目-批量删除列表
|
||||||
export const deleteItemList = params => {
|
export const deleteItemList = params => {
|
||||||
return fetch('/api/bs/hrmsalary/salaryitem/listCanDelete', {
|
return fetch("/api/bs/hrmsalary/salaryitem/listCanDelete", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-新增薪资项目
|
//薪资项目-新增薪资项目
|
||||||
export const saveItem = params => {
|
export const saveItem = params => {
|
||||||
delete params.formulaContent
|
delete params.formulaContent;
|
||||||
return fetch('/api/bs/hrmsalary/salaryitem/save', {
|
return fetch("/api/bs/hrmsalary/salaryitem/save", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-更新薪资项目
|
//薪资项目-更新薪资项目
|
||||||
export const updateItem = params => {
|
export const updateItem = params => {
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/update', 'POST', params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/update", "POST", params);
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-薪资项目详情
|
//薪资项目-薪资项目详情
|
||||||
export const getItemForm = params => {
|
export const getItemForm = params => {
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/getSalaryForm', 'GET', params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSalaryForm", "GET", params);
|
||||||
}
|
};
|
||||||
|
|
||||||
//薪资项目-添加系统薪资项目
|
//薪资项目-添加系统薪资项目
|
||||||
export const saveSysItem = params => {
|
export const saveSysItem = params => {
|
||||||
return fetch('/api/bs/hrmsalary/salaryitem/saveSys', {
|
return fetch("/api/bs/hrmsalary/salaryitem/saveSys", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
//获取薪资项目可选的类型(与属性有联动)
|
//获取薪资项目可选的类型(与属性有联动)
|
||||||
export const getItemTypeOption = params => {
|
export const getItemTypeOption = params => {
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/listSalaryItemTypeOption', 'GET', params);
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/listSalaryItemTypeOption", "GET", params);
|
||||||
}
|
};
|
||||||
//获取公式描述
|
//获取公式描述
|
||||||
export const getFormulaDes = params => {
|
export const getFormulaDes = params => {
|
||||||
return WeaTools.callApi('/api/bs/hrmsalary/formula/des', 'GET', params);
|
return WeaTools.callApi("/api/bs/hrmsalary/formula/des", "GET", params);
|
||||||
}
|
};
|
||||||
|
|
||||||
// *** 公式 start ***
|
// *** 公式 start ***
|
||||||
// 获取公式变量类型
|
// 获取公式变量类型
|
||||||
export const formualSearchGroup = params => {
|
export const formualSearchGroup = params => {
|
||||||
return fetch('/api/bs/hrmsalary/formula/search/group', {
|
return fetch("/api/bs/hrmsalary/formula/search/group", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
//获取公式变量字段
|
//获取公式变量字段
|
||||||
export const formualSearchField = params => {
|
export const formualSearchField = params => {
|
||||||
return fetch('/api/bs/hrmsalary/formula/search/field', {
|
return fetch("/api/bs/hrmsalary/formula/search/field", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
// /api/bs/hrmsalary/formula/save
|
// /api/bs/hrmsalary/formula/save
|
||||||
// 保存公式
|
// 保存公式
|
||||||
export const saveFormual = params => {
|
export const saveFormual = params => {
|
||||||
return fetch('/api/bs/hrmsalary/formula/save', {
|
return fetch("/api/bs/hrmsalary/formula/save", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
// 公式测试
|
// 公式测试
|
||||||
export const testFormual = params => {
|
export const testFormual = params => {
|
||||||
return fetch('/api/bs/hrmsalary/formula/mock', {
|
return fetch("/api/bs/hrmsalary/formula/mock", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
// 根据id获取formual
|
// 根据id获取formual
|
||||||
export const detailFormual = params => {
|
export const detailFormual = params => {
|
||||||
return fetch('/api/bs/hrmsalary/formula/detail', {
|
return fetch("/api/bs/hrmsalary/formula/detail", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
// *** 公式 end ***
|
// *** 公式 end ***
|
||||||
|
|
@ -179,14 +179,28 @@ export const detailFormual = params => {
|
||||||
|
|
||||||
// 列出可以删除的薪资项目
|
// 列出可以删除的薪资项目
|
||||||
export const listCanDelete = params => {
|
export const listCanDelete = params => {
|
||||||
return fetch('/api/bs/hrmsalary/salaryitem/listCanDelete', {
|
return fetch("/api/bs/hrmsalary/salaryitem/listCanDelete", {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
mode: 'cors',
|
mode: "cors",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
body: JSON.stringify(params)
|
body: JSON.stringify(params)
|
||||||
}).then(res => res.json())
|
}).then(res => res.json());
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//获取哪些账套中使用了该薪资项目
|
||||||
|
export const getSalarySobBySalaryItem = params => {
|
||||||
|
return WeaTools.callApi("/api/bs/hrmsalary/salaryitem/getSalarySobBySalaryItem", "GET", params);
|
||||||
|
};
|
||||||
|
// 同步到薪资账套
|
||||||
|
export const syncSalaryItemToSalarySobItem = params => {
|
||||||
|
return fetch("/api/bs/hrmsalary/salaryitem/syncSalaryItemToSalarySobItem ", {
|
||||||
|
method: "POST",
|
||||||
|
mode: "cors",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
}).then(res => res.json());
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -78,3 +78,31 @@ export const statisticsEmployeeDetailList = (params) => {
|
||||||
export const getDataPerspective = (params) => {
|
export const getDataPerspective = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/report/statistics/report/getDataPerspective", params);
|
return postFetch("/api/bs/hrmsalary/report/statistics/report/getDataPerspective", params);
|
||||||
};
|
};
|
||||||
|
//报表分享-确认分享
|
||||||
|
export const salaryStatisticsPushSendMsg = (params) => {
|
||||||
|
return postFetch("/api/bs/salaryreport/salary/statistics/push/sendMsg", params);
|
||||||
|
};
|
||||||
|
//报表分享-表单数据
|
||||||
|
export const salaryStatisticsPushGetForm = (params) => {
|
||||||
|
return WeaTools.callApi("/api/bs/salaryreport/salary/statistics/push/getForm", "GET", params);
|
||||||
|
};
|
||||||
|
//报表记录-全部撤回
|
||||||
|
export const salaryStatisticsPushcancelAll = (params) => {
|
||||||
|
return WeaTools.callApi("/api/bs/salaryreport/salary/statistics/push/cancelAll", "GET", params);
|
||||||
|
};
|
||||||
|
//报表记录-撤回单条记录
|
||||||
|
export const salaryStatisticsPushcancel = (params) => {
|
||||||
|
return WeaTools.callApi("/api/bs/salaryreport/salary/statistics/push/cancel", "GET", params);
|
||||||
|
};
|
||||||
|
//报表记录-列表数据
|
||||||
|
export const salaryStatisticsPushGetTable = (params) => {
|
||||||
|
return postFetch("/api/bs/salaryreport/salary/statistics/push/getTable", params);
|
||||||
|
};
|
||||||
|
//报表记录-查看分享记录详情
|
||||||
|
export const salaryStatisticsPushGetDetail = (params) => {
|
||||||
|
return postFetch("/api/bs/salaryreport/salary/statistics/push/getDetail", params);
|
||||||
|
};
|
||||||
|
//报表记录-追加被分享人
|
||||||
|
export const salaryStatisticsPushAddSharedSendMsg = (params) => {
|
||||||
|
return postFetch("/api/bs/salaryreport/salary/statistics/push/addSharedSendMsg", params);
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -108,12 +108,8 @@ export const taxAgentRangeImportData = (params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
//个税扣缴义务人下拉列表
|
//个税扣缴义务人下拉列表
|
||||||
export const getTaxAgentSelectList = (params) => {
|
export const getTaxAgentSelectList = (isShare = false) => {
|
||||||
return WeaTools.callApi(
|
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectList", "GET", { isShare });
|
||||||
"/api/bs/hrmsalary/taxAgent/selectList",
|
|
||||||
"GET",
|
|
||||||
params
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//当前登录人个税扣缴义务人下拉列表
|
//当前登录人个税扣缴义务人下拉列表
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ export const getCondition = params => {
|
||||||
export const queryList = (params) => {
|
export const queryList = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/archives/getTable", params);
|
return postFetch("/api/bs/hrmsalary/archives/getTable", params);
|
||||||
};
|
};
|
||||||
|
//社保福利档案_非系统人员列表
|
||||||
|
export const getExtTable = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/archives/getExtTable", params);
|
||||||
|
};
|
||||||
//社保福利档案列表
|
//社保福利档案列表
|
||||||
export const queryInsuranceTabTotal = (params) => {
|
export const queryInsuranceTabTotal = (params) => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/archives/queryInsuranceTabTotal", params);
|
return WeaTools.callApi("/api/bs/hrmsalary/archives/queryInsuranceTabTotal", params);
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ class ImpStep1 extends Component {
|
||||||
|
|
||||||
handleChange = (data) => {
|
handleChange = (data) => {
|
||||||
const { fileList, file } = data;
|
const { fileList, file } = data;
|
||||||
if (file.response && typeof (file.response) != "undefined") message.success(getLabel(111, "上传成功"));
|
if (file.response && typeof (file.response) != "undefined" && file.status !== "removed") message.success(getLabel(111, "上传成功"));
|
||||||
this.setState({ fileList });
|
this.setState({ fileList: fileList.slice(-1) });
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
@ -62,7 +62,8 @@ class ImpStep1 extends Component {
|
||||||
<p>
|
<p>
|
||||||
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>
|
<span>{`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}</span>
|
||||||
<a href={this.props.link} className="weapp-salary-link"
|
<a href={this.props.link} className="weapp-salary-link"
|
||||||
target="_blank">{getLabel(543207, "点击这里下载模板")}</a>
|
target="_blank">{getLabel(543207, "点击这里下载模板")}</a>
|
||||||
|
{this.props.exportDataDom}
|
||||||
</p>
|
</p>
|
||||||
<p>{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}</p>
|
<p>{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}</p>
|
||||||
<p>{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}</p>
|
<p>{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}</p>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 导入-步骤二
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/9/5
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaTable } from "ecCom";
|
||||||
|
import { postFetch } from "../../../util/request";
|
||||||
|
|
||||||
|
class ImpStep2 extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, columns: [], dataSource: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
init = () => {
|
||||||
|
const { previewUrl, imageId } = this.props;
|
||||||
|
const payload = { imageId };
|
||||||
|
this.setState({ loading: true });
|
||||||
|
postFetch(previewUrl, payload).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { headers, list } = data;
|
||||||
|
this.setState({
|
||||||
|
columns: _.map(headers, (item, index) => ({ title: item, dataIndex: index + "", width: 120 })),
|
||||||
|
dataSource: _.map(list, item => {
|
||||||
|
return _.reduce(item, (pre, cur, key) => (_.assign(pre, { [key]: cur })), {});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { dataSource, columns, loading } = this.state;
|
||||||
|
return (
|
||||||
|
<WeaTable dataSource={dataSource} columns={columns} pagination={false} loading={loading} scroll={{ x: 800 }}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ImpStep2;
|
||||||
|
|
@ -8,6 +8,7 @@ import React, { Component } from "react";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom";
|
import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom";
|
||||||
import ImpStep1 from "./components/impStep1";
|
import ImpStep1 from "./components/impStep1";
|
||||||
|
import ImpStep2 from "./components/impStep2";
|
||||||
import ImpStep3 from "./components/impStep3";
|
import ImpStep3 from "./components/impStep3";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
@ -23,7 +24,7 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (JSON.stringify(nextProps.importResult) !== JSON.stringify(this.props.importResult)) {
|
if (JSON.stringify(nextProps.importResult) !== JSON.stringify(this.props.importResult) && !_.isEmpty(nextProps.importResult)) {
|
||||||
this.setState({
|
this.setState({
|
||||||
current: this.state.current + 1
|
current: this.state.current + 1
|
||||||
});
|
});
|
||||||
|
|
@ -33,20 +34,21 @@ class Index extends Component {
|
||||||
|
|
||||||
renderChildren = () => {
|
renderChildren = () => {
|
||||||
const { current } = this.state;
|
const { current } = this.state;
|
||||||
const { importParams, link, excludeKey, importResult } = this.props;
|
const { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props;
|
||||||
let CurrentDom = null;
|
let CurrentDom = null;
|
||||||
switch (current) {
|
switch (current) {
|
||||||
case 0:
|
case 0:
|
||||||
CurrentDom = <ImpStep1 importParams={importParams} link={link} ref={dom => this.step1Ref = dom}/>;
|
CurrentDom = <ImpStep1 importParams={importParams} link={link} exportDataDom={exportDataDom}
|
||||||
|
ref={dom => this.step1Ref = dom}/>;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
CurrentDom = null;
|
CurrentDom = <ImpStep2 {...this.props}/>;
|
||||||
if (excludeKey) {
|
if (excludeKey) {
|
||||||
CurrentDom = <ImpStep3 importResult={importResult}/>;
|
CurrentDom = <ImpStep3 importResult={importResult}/>;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
CurrentDom = null;
|
CurrentDom = <ImpStep3 importResult={importResult}/>;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CurrentDom = null;
|
CurrentDom = null;
|
||||||
|
|
@ -54,6 +56,19 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
return CurrentDom;
|
return CurrentDom;
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* Description: 上一步
|
||||||
|
* Params:
|
||||||
|
* Date: 2023/9/5
|
||||||
|
*/
|
||||||
|
handlePreviousStep = () => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(111, "是否放弃已上传的文件?"),
|
||||||
|
onOk: () => this.setState({ current: this.state.current - 1 }, () => this.props.onResetImportResult())
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: 黎永顺
|
* Author: 黎永顺
|
||||||
|
|
@ -62,24 +77,28 @@ class Index extends Component {
|
||||||
* Date: 2023/8/11
|
* Date: 2023/8/11
|
||||||
*/
|
*/
|
||||||
handleNext = () => {
|
handleNext = () => {
|
||||||
const { params } = this.props;
|
const { params, importResult } = this.props;
|
||||||
const { fileList } = this.step1Ref.state;
|
if (_.isEmpty(importResult)) {
|
||||||
if (!_.isEmpty(params)) {
|
const { fileList } = this.step1Ref.state;
|
||||||
if (!Object.values(params).every(o => !!o)) {
|
if (!_.isEmpty(params)) {
|
||||||
Modal.warning({
|
if (!Object.values(params).every(o => !!o)) {
|
||||||
title: getLabel(131329, "信息确认"),
|
Modal.warning({
|
||||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
title: getLabel(131329, "信息确认"),
|
||||||
});
|
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_.isEmpty(fileList)) {
|
||||||
|
message.warning(getLabel(111, "请先上传EXCEL文件"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const [file] = fileList;
|
||||||
|
const { response } = file;
|
||||||
|
this.props.nextCallback(response.data.fileid);
|
||||||
|
} else {
|
||||||
|
this.setState({ current: this.state.current + 1 });
|
||||||
}
|
}
|
||||||
if (_.isEmpty(fileList)) {
|
|
||||||
message.error(getLabel(111, "请先上传EXCEL文件"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const [file] = fileList;
|
|
||||||
const { response } = file;
|
|
||||||
this.props.nextCallback(response.data.fileid);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
@ -90,7 +109,7 @@ class Index extends Component {
|
||||||
{ key: 2, label: getLabel(502835, "导入数据") }
|
{ key: 2, label: getLabel(502835, "导入数据") }
|
||||||
];
|
];
|
||||||
const btns = [
|
const btns = [
|
||||||
<Button type="ghost">{getLabel(1876, "上一步")}</Button>,
|
<Button type="ghost" onClick={this.handlePreviousStep}>{getLabel(1876, "上一步")}</Button>,
|
||||||
<Button type="primary" onClick={this.handleNext}
|
<Button type="primary" onClick={this.handleNext}
|
||||||
loading={this.props.nextloading}>{getLabel(1402, "下一步")}</Button>,
|
loading={this.props.nextloading}>{getLabel(1402, "下一步")}</Button>,
|
||||||
<Button type="primary" onClick={() => this.props.onCancel(true)}>{getLabel(555, "完成")}</Button>
|
<Button type="primary" onClick={() => this.props.onCancel(true)}>{getLabel(555, "完成")}</Button>
|
||||||
|
|
|
||||||
|
|
@ -131,8 +131,6 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-top: 80px;
|
|
||||||
padding-bottom: 80px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class ReportList extends Component {
|
||||||
{
|
{
|
||||||
_.isEmpty(dataSource) ? <div className="empty">{getLabel(83553, "暂无数据")}</div> :
|
_.isEmpty(dataSource) ? <div className="empty">{getLabel(83553, "暂无数据")}</div> :
|
||||||
_.map(dataSource, it => {
|
_.map(dataSource, it => {
|
||||||
const { reportName, dimension, id, dimensionId } = it;
|
const { reportName, dimension, id, dimensionId, isShare } = it;
|
||||||
return <Col className="gutter-row" span={6} onClick={() => this.handleGoReportView(id)}>
|
return <Col className="gutter-row" span={6} onClick={() => this.handleGoReportView(id)}>
|
||||||
<div className="card-item">
|
<div className="card-item">
|
||||||
<div className="cardLeft"><i className="icon-coms-fa"/></div>
|
<div className="cardLeft"><i className="icon-coms-fa"/></div>
|
||||||
|
|
@ -85,14 +85,17 @@ class ReportList extends Component {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="cardRight">
|
<div className="cardRight">
|
||||||
<Dropdown overlay={
|
{
|
||||||
<Menu onClick={e => this.handleOptsClick(e, id, dimensionId)}>
|
!isShare &&
|
||||||
<Menu.Item key="edit">{getLabel(501169, "编辑")}</Menu.Item>
|
<Dropdown overlay={
|
||||||
<Menu.Item key="delete">{getLabel(535052, "删除")}</Menu.Item>
|
<Menu onClick={e => this.handleOptsClick(e, id, dimensionId)}>
|
||||||
</Menu>
|
<Menu.Item key="edit">{getLabel(501169, "编辑")}</Menu.Item>
|
||||||
}>
|
<Menu.Item key="delete">{getLabel(535052, "删除")}</Menu.Item>
|
||||||
<Button type="ghost"><i className="icon-coms-more"/></Button>
|
</Menu>
|
||||||
</Dropdown>
|
}>
|
||||||
|
<Button type="ghost"><i className="icon-coms-more"/></Button>
|
||||||
|
</Dropdown>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Col>;
|
</Col>;
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { DatePicker } from "antd";
|
import { DatePicker } from "antd";
|
||||||
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
||||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
|
||||||
import CustomTab from "../../components/customTab";
|
import CustomTab from "../../components/customTab";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import PayrollModal from "./payrollModal";
|
import PayrollModal from "./payrollModal";
|
||||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||||
|
import Authority from "./authority";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
@ -87,8 +87,8 @@ export default class MySalary extends React.Component {
|
||||||
|
|
||||||
handleTabChange = (selectedKey) => {
|
handleTabChange = (selectedKey) => {
|
||||||
if (selectedKey === "2") {
|
if (selectedKey === "2") {
|
||||||
const { mySalaryStore: { getRecordList } } = this.props;
|
const { mySalaryStore: { initRecordData } } = this.props;
|
||||||
getRecordList();
|
initRecordData();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -176,21 +176,24 @@ export default class MySalary extends React.Component {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
this.state.selectedKey === "2" &&
|
this.state.selectedKey === "2" &&
|
||||||
<CustomPaginationTable
|
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||||
columns={recordListColumns}
|
store={this.props.mySalaryStore}>
|
||||||
dataSource={recordListDataSource}
|
<CustomPaginationTable
|
||||||
total={recordListPageInfo.total}
|
columns={recordListColumns}
|
||||||
current={recordListPageInfo.pageNum}
|
dataSource={recordListDataSource}
|
||||||
pageSize={this.historyPageInfo.pageSize}
|
total={recordListPageInfo.total}
|
||||||
onPageChange={(value) => {
|
current={recordListPageInfo.pageNum}
|
||||||
this.historyPageInfo.current = value;
|
pageSize={this.historyPageInfo.pageSize}
|
||||||
this.handleHistoryPageChange();
|
onPageChange={(value) => {
|
||||||
}}
|
this.historyPageInfo.current = value;
|
||||||
onShowSizeChange={(current, pageSize) => {
|
this.handleHistoryPageChange();
|
||||||
this.historyPageInfo = { current, pageSize };
|
}}
|
||||||
this.handleHistoryPageChange();
|
onShowSizeChange={(current, pageSize) => {
|
||||||
}}
|
this.historyPageInfo = { current, pageSize };
|
||||||
/>
|
this.handleHistoryPageChange();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Authority>
|
||||||
}
|
}
|
||||||
</WeaNewScroll>
|
</WeaNewScroll>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ export default class BaseInformForm extends React.Component {
|
||||||
{
|
{
|
||||||
this.state.inited &&
|
this.state.inited &&
|
||||||
<WeaSelect
|
<WeaSelect
|
||||||
|
disabled={this.props.id}
|
||||||
viewAttr={3}
|
viewAttr={3}
|
||||||
options={options}
|
options={options}
|
||||||
value={salarySob ? salarySob : ""}
|
value={salarySob ? salarySob : ""}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ export default class ComputerTemplate extends React.Component {
|
||||||
<div className="sobItemWrapper">
|
<div className="sobItemWrapper">
|
||||||
{
|
{
|
||||||
salaryItemSet.length > 0 &&
|
salaryItemSet.length > 0 &&
|
||||||
salaryItemSet.map((group, index) => {
|
_.filter(salaryItemSet, it => (!_.isNil(it) && !_.isEmpty(it))).map((group, index) => {
|
||||||
return <div className="sobItem">
|
return <div className="sobItem">
|
||||||
<div className="descript-title">{group.groupName}</div>
|
<div className="descript-title">{group.groupName}</div>
|
||||||
<div className="descriptions-view">
|
<div className="descriptions-view">
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export default class PhoneTemplate extends React.Component {
|
||||||
<div className="sobItemWrapper">
|
<div className="sobItemWrapper">
|
||||||
{
|
{
|
||||||
salaryItemSet.length > 0 &&
|
salaryItemSet.length > 0 &&
|
||||||
salaryItemSet.map((group, index) => (
|
_.filter(salaryItemSet, it => (!_.isNil(it) && !_.isEmpty(it))).map((group, index) => (
|
||||||
<div className="sobItem">
|
<div className="sobItem">
|
||||||
<div className="descript-title">{group.groupName}</div>
|
<div className="descript-title">{group.groupName}</div>
|
||||||
<div className="descriptions-view">
|
<div className="descriptions-view">
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,16 @@ class AllWithoutPay extends Component {
|
||||||
message.warning("未选择条目");
|
message.warning("未选择条目");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
API.gotoStop(selectedRowKeys).then(({ status, errormsg }) => {
|
API.gotoStop(selectedRowKeys).then(({ status, data, errormsg }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("操作成功!");
|
const { msg } = data;
|
||||||
|
message.info(msg || "操作成功!");
|
||||||
refreshList();
|
refreshList();
|
||||||
} else {
|
} else {
|
||||||
message.error(errormsg || "操作失败!");
|
message.error(errormsg || "操作失败!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
const { pageInfo } = this.props;
|
const { pageInfo } = this.props;
|
||||||
if (pageInfo.total === 0) {
|
if (pageInfo.total === 0) {
|
||||||
message.warning("您没有需要处理的待停薪人员!");
|
message.warning("您没有需要处理的待停薪人员!");
|
||||||
|
|
@ -31,7 +32,7 @@ class AllWithoutPay extends Component {
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
API.allGotoStop({}).then(({ status, data, errormsg }) => {
|
API.allGotoStop({}).then(({ status, data, errormsg }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const { msg }= data;
|
const { msg } = data;
|
||||||
message.info(msg || "操作成功!");
|
message.info(msg || "操作成功!");
|
||||||
refreshList();
|
refreshList();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,195 @@ export const condition = [
|
||||||
defaultshow: true
|
defaultshow: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
export const shareCondition = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
checkbox: false,
|
||||||
|
checkboxValue: false,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["reportIds"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "分享报表",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
options: [],
|
||||||
|
multiple: true,
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
checkbox: false,
|
||||||
|
checkboxValue: false,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["pushTitle"],
|
||||||
|
fieldcol: 18,
|
||||||
|
label: "主题",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: true,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
type: "17",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
domkey: ["sharedBy"],
|
||||||
|
fieldcol: 14,
|
||||||
|
isQuickSearch: false,
|
||||||
|
label: "被分享人",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "DATEPICKER",
|
||||||
|
domkey: ["startTime"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "报表查看有效开始时间",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "DATEPICKER",
|
||||||
|
domkey: ["endTime"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "报表查看有效结束时间",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
checkbox: false,
|
||||||
|
checkboxValue: false,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["mark"],
|
||||||
|
fieldcol: 18,
|
||||||
|
label: "分享说明",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
// colSpan: 1,
|
||||||
|
// conditionType: "SWITCH",
|
||||||
|
// domkey: ["remind"],
|
||||||
|
// fieldcol: 12,
|
||||||
|
// isQuickSearch: false,
|
||||||
|
// label: "已查看提醒",
|
||||||
|
// lanId: 111,
|
||||||
|
// labelcol: 6,
|
||||||
|
// viewAttr: 2
|
||||||
|
// }
|
||||||
|
],
|
||||||
|
title: "",
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const sharePersonCondition = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
browserConditionParam: {
|
||||||
|
completeParams: {},
|
||||||
|
conditionDataParams: {},
|
||||||
|
dataParams: {},
|
||||||
|
destDataParams: {},
|
||||||
|
hasAddBtn: false,
|
||||||
|
hasAdvanceSerach: true,
|
||||||
|
idSeparator: ",",
|
||||||
|
isAutoComplete: 1,
|
||||||
|
isDetail: 0,
|
||||||
|
isMultCheckbox: false,
|
||||||
|
isSingle: false,
|
||||||
|
linkUrl: "",
|
||||||
|
pageSize: 10,
|
||||||
|
quickSearchName: "",
|
||||||
|
replaceDatas: [],
|
||||||
|
type: "17",
|
||||||
|
viewAttr: 3
|
||||||
|
},
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "BROWSER",
|
||||||
|
domkey: ["sharedBy"],
|
||||||
|
fieldcol: 14,
|
||||||
|
isQuickSearch: false,
|
||||||
|
label: "被分享人",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
rules: "required|string",
|
||||||
|
viewAttr: 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: "",
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const shareLogCondition = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["reportName"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "分享报表",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["effectiveTime"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "报表查看有效时间",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["remark"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "分享说明",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
viewAttr: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: "",
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
const colorList = ["#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81"];
|
const colorList = ["#709DF7", "#73DEB3", "#7585A2", "#F7C739", "#5FC3E3", "#AEE279", "#FF7F81"];
|
||||||
export const mapBarOptions = (params) => ({
|
export const mapBarOptions = (params) => ({
|
||||||
|
|
@ -292,7 +481,7 @@ export const mapBarOptions = (params) => ({
|
||||||
{
|
{
|
||||||
type: "slider",
|
type: "slider",
|
||||||
show: true,
|
show: true,
|
||||||
bottom: 20,
|
bottom: 20
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { loading, columns, dataSource, formData } = this.state;
|
const { loading, columns, dataSource, formData } = this.state;
|
||||||
const { itemName, itemValue, itemValueSpan } = formData;
|
const { itemName, itemValue, itemValueSpan } = formData;
|
||||||
const { statisticsItemId } = this.props;
|
const { statisticsItemId, isShare } = this.props;
|
||||||
const cols = _.map(columns, it => {
|
const cols = _.map(columns, it => {
|
||||||
const { text, column } = it;
|
const { text, column } = it;
|
||||||
if (column === "ruleName" || column === "ratio" || column === "m2m" || column === "y2y") {
|
if (column === "ruleName" || column === "ratio" || column === "m2m" || column === "y2y") {
|
||||||
|
|
@ -278,6 +278,7 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
...it,
|
...it,
|
||||||
title: <span>
|
title: <span>
|
||||||
<WeaCheckbox
|
<WeaCheckbox
|
||||||
|
disabled={isShare}
|
||||||
value={_.every(dataSource, child => !!child[`${key}Value`])}
|
value={_.every(dataSource, child => !!child[`${key}Value`])}
|
||||||
onChange={val => this.handleChangeColumnAllChecked(`${key}Value`, val)}
|
onChange={val => this.handleChangeColumnAllChecked(`${key}Value`, val)}
|
||||||
/>
|
/>
|
||||||
|
|
@ -286,6 +287,7 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
render: (txt, record) => {
|
render: (txt, record) => {
|
||||||
return <span>
|
return <span>
|
||||||
<WeaCheckbox
|
<WeaCheckbox
|
||||||
|
disabled={isShare}
|
||||||
value={record[`${key}Value`].toString()}
|
value={record[`${key}Value`].toString()}
|
||||||
onChange={val => this.handleChangeColumnCheckBox(`${key}Value`, val, record.id)}
|
onChange={val => this.handleChangeColumnCheckBox(`${key}Value`, val, record.id)}
|
||||||
/>
|
/>
|
||||||
|
|
@ -305,6 +307,7 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
</span>,
|
</span>,
|
||||||
render: (txt, record) => {
|
render: (txt, record) => {
|
||||||
return !!record["m2mValue"] && <IntervalSettingsComp
|
return !!record["m2mValue"] && <IntervalSettingsComp
|
||||||
|
isShare={isShare}
|
||||||
LowerLimit={record[`${column.replace("Limit", "")}LowerLimit`]}
|
LowerLimit={record[`${column.replace("Limit", "")}LowerLimit`]}
|
||||||
UpperLimit={record[`${column.replace("Limit", "")}UpperLimit`]}
|
UpperLimit={record[`${column.replace("Limit", "")}UpperLimit`]}
|
||||||
onChange={(type, val) => this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
|
onChange={(type, val) => this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
|
||||||
|
|
@ -321,6 +324,7 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
</span>,
|
</span>,
|
||||||
render: (txt, record) => {
|
render: (txt, record) => {
|
||||||
return !!record["y2yValue"] && <IntervalSettingsComp
|
return !!record["y2yValue"] && <IntervalSettingsComp
|
||||||
|
isShare={isShare}
|
||||||
LowerLimit={record[`${column.replace("Limit", "")}LowerLimit`]}
|
LowerLimit={record[`${column.replace("Limit", "")}LowerLimit`]}
|
||||||
UpperLimit={record[`${column.replace("Limit", "")}UpperLimit`]}
|
UpperLimit={record[`${column.replace("Limit", "")}UpperLimit`]}
|
||||||
onChange={(type, val) => this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
|
onChange={(type, val) => this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
|
||||||
|
|
@ -335,8 +339,10 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
title={
|
title={
|
||||||
<div className="itemsTitle">
|
<div className="itemsTitle">
|
||||||
<span>{statisticsItemId ? getLabel(111, "编辑自定义统计项目") : getLabel(111, "新建自定义统计项目")}</span>
|
<span>{statisticsItemId ? getLabel(111, "编辑自定义统计项目") : getLabel(111, "新建自定义统计项目")}</span>
|
||||||
<Button type="primary" loading={loading}
|
{
|
||||||
onClick={this.handleSaveStatisticalItems}>{getLabel(111, "保存")}</Button>
|
!isShare && <Button type="primary" loading={loading}
|
||||||
|
onClick={this.handleSaveStatisticalItems}>{getLabel(111, "保存")}</Button>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
style={{ width: 900, height: 450 }}
|
style={{ width: 900, height: 450 }}
|
||||||
|
|
@ -348,7 +354,7 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
<WeaBrowser
|
<WeaBrowser
|
||||||
title={getLabel(111, "统计项目")}
|
title={getLabel(111, "统计项目")}
|
||||||
type={162}
|
type={162}
|
||||||
viewAttr={3}
|
viewAttr={!isShare ? 3 : 1}
|
||||||
isSingle={false}
|
isSingle={false}
|
||||||
value={itemValue}
|
value={itemValue}
|
||||||
replaceDatas={itemValue ? _.map(itemValue.split(","), (it, idx) => ({
|
replaceDatas={itemValue ? _.map(itemValue.split(","), (it, idx) => ({
|
||||||
|
|
@ -381,7 +387,7 @@ class CustomStatisticsItemsModal extends Component {
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
<WeaFormItem label={getLabel(111, "统计项名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
<WeaFormItem label={getLabel(111, "统计项名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||||
<WeaError tipPosition="bottom" ref="nameError" error={getLabel(111, "此项必填")}>
|
<WeaError tipPosition="bottom" ref="nameError" error={getLabel(111, "此项必填")}>
|
||||||
<WeaInput value={itemName} viewAttr={3}
|
<WeaInput value={itemName} viewAttr={!isShare ? 3 : 1}
|
||||||
onChange={itemName => this.setState({ formData: { ...formData, itemName } })}/>
|
onChange={itemName => this.setState({ formData: { ...formData, itemName } })}/>
|
||||||
</WeaError>
|
</WeaError>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
|
|
@ -406,11 +412,11 @@ export default CustomStatisticsItemsModal;
|
||||||
* Date: 2023/4/23
|
* Date: 2023/4/23
|
||||||
*/
|
*/
|
||||||
const IntervalSettingsComp = (props) => {
|
const IntervalSettingsComp = (props) => {
|
||||||
const { LowerLimit, UpperLimit, onChange } = props;
|
const { LowerLimit, UpperLimit, onChange, isShare } = props;
|
||||||
return <div className="intervalSettingsCompWrapper">
|
return <div className="intervalSettingsCompWrapper">
|
||||||
<WeaInputNumber value={LowerLimit} precision={2} onChange={val => onChange("min", val)}/>
|
<WeaInputNumber value={LowerLimit} precision={2} onChange={val => onChange("min", val)} disabled={isShare}/>
|
||||||
<span className="increaseTitle">{`% <${getLabel(111, "增幅")}<`}</span>
|
<span className="increaseTitle">{`% <${getLabel(111, "增幅")}<`}</span>
|
||||||
<WeaInputNumber value={UpperLimit} precision={2} onChange={val => onChange("max", val)}/>
|
<WeaInputNumber value={UpperLimit} precision={2} onChange={val => onChange("max", val)} disabled={isShare}/>
|
||||||
<span className="pecentTitle">%</span>
|
<span className="pecentTitle">%</span>
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -63,3 +63,134 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shareDialogWrapper {
|
||||||
|
.wea-dialog-body {
|
||||||
|
background: #f6f6f6;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-bottom: none;
|
||||||
|
background: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-search-group, .wea-content, .wea-form-cell {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select, .ant-select, .ant-select-selection {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input .arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 8px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wdb {
|
||||||
|
word-break: break-all !important;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input {
|
||||||
|
height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 345px;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 17px 4px 4px;
|
||||||
|
position: relative;
|
||||||
|
min-height: 30px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shareLogGroupWrapper {
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
.logtitleHeader {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.shareRecordWrapper {
|
||||||
|
z-index: 111;
|
||||||
|
|
||||||
|
.wea-slide-modal-title {
|
||||||
|
height: auto !important;
|
||||||
|
line-height: normal !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleDialog {
|
||||||
|
display: flex;
|
||||||
|
padding: 10px 16px 10px 0;
|
||||||
|
position: relative;
|
||||||
|
background-color: #FFF;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.titleCol {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.titleLeftBox {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 16px;
|
||||||
|
|
||||||
|
.titleIcon {
|
||||||
|
color: #fff;
|
||||||
|
margin: 0;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 22px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: #F14A2D;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
padding-left: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody {
|
||||||
|
& > tr {
|
||||||
|
& > td {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ class PovitpivotChartModal extends Component {
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
const { id, dimensionId, dimensionValue } = nextProps;
|
const { id, dimensionId, dimensionValue, isShare } = nextProps;
|
||||||
this.getDataPerspective({ id, dimensionId, dimensionValue });
|
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare });
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
|
|
@ -63,13 +63,11 @@ class PovitpivotChartModal extends Component {
|
||||||
});
|
});
|
||||||
} else if (type === "turn") {
|
} else if (type === "turn") {
|
||||||
if (id === "PAGEINFO") {
|
if (id === "PAGEINFO") {
|
||||||
const { id, dimensionId, dimensionValue } = this.props;
|
const { id, dimensionId, dimensionValue, isShare } = this.props;
|
||||||
const { pageNum: current, size: pageSize } = params;
|
const { pageNum: current, size: pageSize } = params;
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
|
||||||
this.getDataPerspective({
|
this.getDataPerspective({
|
||||||
id,
|
id, dimensionId, dimensionValue, isShare
|
||||||
dimensionId,
|
|
||||||
dimensionValue
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class ReportContent extends Component {
|
||||||
chartsType: "0",
|
chartsType: "0",
|
||||||
chartsInfo: {},
|
chartsInfo: {},
|
||||||
povitView: {
|
povitView: {
|
||||||
visible: false, id: "",
|
visible: false, id: "", isShare: false,
|
||||||
dimensionId: "", dimensionValue: ""
|
dimensionId: "", dimensionValue: ""
|
||||||
},
|
},
|
||||||
rangSet: {
|
rangSet: {
|
||||||
|
|
@ -43,7 +43,7 @@ class ReportContent extends Component {
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.report !== this.props.report && nextProps.report.dimensionId) {
|
if (nextProps.report !== this.props.report && nextProps.report.dimensionId) {
|
||||||
this.reportStatisticsReportGetData(nextProps.report.id, nextProps.report.dimensionId);
|
this.reportStatisticsReportGetData(nextProps.report.id, nextProps.report.dimensionId, nextProps.report.isShare);
|
||||||
this.setState({ viewType: "dataView", chartsInfo: {} });
|
this.setState({ viewType: "dataView", chartsInfo: {} });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -65,10 +65,10 @@ class ReportContent extends Component {
|
||||||
if (id === "PIVOTCHART") {
|
if (id === "PIVOTCHART") {
|
||||||
const { record } = params;
|
const { record } = params;
|
||||||
const { dimension: dimensionValue } = record;
|
const { dimension: dimensionValue } = record;
|
||||||
const { id: pivotId, dimensionId } = this.props.report;
|
const { id: pivotId, dimensionId, isShare } = this.props.report;
|
||||||
this.setState({
|
this.setState({
|
||||||
povitView: {
|
povitView: {
|
||||||
visible: true, id: pivotId, dimensionId, dimensionValue
|
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -81,8 +81,8 @@ class ReportContent extends Component {
|
||||||
dataSource, columns, showSum, countResult
|
dataSource, columns, showSum, countResult
|
||||||
}), "*");
|
}), "*");
|
||||||
};
|
};
|
||||||
reportStatisticsReportGetData = (id, dimensionId) => {
|
reportStatisticsReportGetData = (id, dimensionId, isShare) => {
|
||||||
const payload = { id, dimensionId };
|
const payload = { id, dimensionId, isShare };
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
reportStatisticsReportGetData(payload).then(({ status, data }) => {
|
reportStatisticsReportGetData(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
|
|
@ -191,13 +191,13 @@ class ReportContent extends Component {
|
||||||
handleChangeChartOpts = (chartsType, viewType) => {
|
handleChangeChartOpts = (chartsType, viewType) => {
|
||||||
this.setState({ chartsInfo: {} });
|
this.setState({ chartsInfo: {} });
|
||||||
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
|
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
|
||||||
const { report: { id: reportId, dimensionId } } = this.props;
|
const { report: { id: reportId, dimensionId, isShare } } = this.props;
|
||||||
const { rangSet } = this.state;
|
const { rangSet } = this.state;
|
||||||
viewType !== "setting" && this.setState({ chartsType, viewType }, () => {
|
viewType !== "setting" && this.setState({ chartsType, viewType }, () => {
|
||||||
const { viewType, chartsType } = this.state;
|
const { viewType, chartsType } = this.state;
|
||||||
viewType !== "dataView" ?
|
viewType !== "dataView" ?
|
||||||
this.queryRangeSetting({ reportId, chartsType }, true) :
|
this.queryRangeSetting({ reportId, chartsType }, true) :
|
||||||
this.reportStatisticsReportGetData(reportId, dimensionId);
|
this.reportStatisticsReportGetData(reportId, dimensionId, isShare);
|
||||||
});
|
});
|
||||||
viewType === "setting" && this.setState({ rangSet: { ...rangSet, visible: true, reportId } }, () => {
|
viewType === "setting" && this.setState({ rangSet: { ...rangSet, visible: true, reportId } }, () => {
|
||||||
this.queryRangeSetting({ reportId, chartsType });
|
this.queryRangeSetting({ reportId, chartsType });
|
||||||
|
|
@ -213,8 +213,8 @@ class ReportContent extends Component {
|
||||||
};
|
};
|
||||||
handleGetData = () => {
|
handleGetData = () => {
|
||||||
const { report } = this.props;
|
const { report } = this.props;
|
||||||
const { id, dimensionId } = report;
|
const { id, dimensionId, isShare } = report;
|
||||||
this.setState({ viewType: "dataView" }, () => this.reportStatisticsReportGetData(id, dimensionId));
|
this.setState({ viewType: "dataView" }, () => this.reportStatisticsReportGetData(id, dimensionId, isShare));
|
||||||
};
|
};
|
||||||
renderCharts = () => {
|
renderCharts = () => {
|
||||||
const { chartsInfo, viewType } = this.state;
|
const { chartsInfo, viewType } = this.state;
|
||||||
|
|
@ -229,6 +229,8 @@ class ReportContent extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, viewType, rangSet, columns, povitView } = this.state;
|
const { loading, viewType, rangSet, columns, povitView } = this.state;
|
||||||
|
const { report } = this.props;
|
||||||
|
const { isShare } = report;
|
||||||
return (
|
return (
|
||||||
<div className="layoutContent">
|
<div className="layoutContent">
|
||||||
<div className="layoutBox">
|
<div className="layoutBox">
|
||||||
|
|
@ -245,7 +247,7 @@ class ReportContent extends Component {
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
{/*侧边栏*/}
|
{/*侧边栏*/}
|
||||||
<RightOptions onChange={this.handleChangeChartOpts}/>
|
<RightOptions isShare={isShare} onChange={this.handleChangeChartOpts}/>
|
||||||
{/* 图表范围数据设置框 */}
|
{/* 图表范围数据设置框 */}
|
||||||
<ChartsRangeSettingsModal
|
<ChartsRangeSettingsModal
|
||||||
{...rangSet}
|
{...rangSet}
|
||||||
|
|
@ -259,7 +261,8 @@ class ReportContent extends Component {
|
||||||
{...povitView}
|
{...povitView}
|
||||||
onCancel={() => this.setState({
|
onCancel={() => this.setState({
|
||||||
povitView: {
|
povitView: {
|
||||||
visible: false, id: "", dimensionId: "", dimensionValue: ""
|
visible: false, id: "", dimensionId: "", dimensionValue: "",
|
||||||
|
isShare: false
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class RightOptions extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { onChange } = this.props;
|
const { onChange, isShare } = this.props;
|
||||||
const { show } = this.state;
|
const { show } = this.state;
|
||||||
return (
|
return (
|
||||||
<div className="layoutSide" style={{ width: show ? "30px" : 0 }}>
|
<div className="layoutSide" style={{ width: show ? "30px" : 0 }}>
|
||||||
|
|
@ -32,8 +32,11 @@ class RightOptions extends Component {
|
||||||
onClick={() => onChange("1", "bar")}/>
|
onClick={() => onChange("1", "bar")}/>
|
||||||
<i className="icon-coms-Line" title={getLabel(111, "折线图")} onClick={() => onChange("2", "line")}/>
|
<i className="icon-coms-Line" title={getLabel(111, "折线图")} onClick={() => onChange("2", "line")}/>
|
||||||
<i className="icon-coms-Pie" title={getLabel(111, "饼图")} onClick={() => onChange("0", "pie")}/>
|
<i className="icon-coms-Pie" title={getLabel(111, "饼图")} onClick={() => onChange("0", "pie")}/>
|
||||||
<i className="icon-coms-Flow-setting" title={getLabel(111, "设置")}
|
{
|
||||||
onClick={() => onChange("1", "setting")}/>
|
!isShare &&
|
||||||
|
<i className="icon-coms-Flow-setting" title={getLabel(111, "设置")}
|
||||||
|
onClick={() => onChange("1", "setting")}/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span className="show-btn-right"
|
<span className="show-btn-right"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,139 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 分享记录
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/9/19
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import { shareCondition } from "./condition";
|
||||||
|
import { getSearchs } from "../../../util";
|
||||||
|
import { salaryStatisticsPushGetForm, salaryStatisticsPushSendMsg } from "../../../apis/statistics";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("attendanceStore")
|
||||||
|
@observer
|
||||||
|
class SalaryStatisticsDetailShareDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
conditions: [], loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { attendanceStore: { initShareForm } } = nextProps;
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
this.salaryStatisticsPushGetForm(nextProps);
|
||||||
|
} else {
|
||||||
|
initShareForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
salaryStatisticsPushGetForm = (props) => {
|
||||||
|
const { attendanceStore: { shareForm } } = props;
|
||||||
|
salaryStatisticsPushGetForm().then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const { reportOptions } = data;
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(shareCondition, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "sharedBy") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
helpfulTitle: getLabel(111, "被分享人收到您分享的报表后,会默认赋予您的数据权限,但还需要有【薪酬统计分析】的菜单权限才可以查看报表。菜单权限设置路径:后台管理中心-【权限管理中心】-【角色设置】,建议创建一个仅查看报表的角色,这个角色只有薪酬管理模块的【薪酬统计分析】菜单权限。\n" +
|
||||||
|
"为了避免所选的人同名导致选错人,可在后台管理中心-【组织架构设置】-【浏览框显示字段定义】中人员浏览框的显示字段多勾选几个能区别人员的字段")
|
||||||
|
};
|
||||||
|
} else if (getKey(o) === "startTime__endTime") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
helpfulTitle: getLabel(111, "有效时间之外,被分享人无法查看您分享的报表")
|
||||||
|
};
|
||||||
|
} else if (getKey(o) === "remind") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
helpfulTitle: getLabel(111, "开启后,被分享人查看报表时,系统自动通过系统消息提醒分享人。")
|
||||||
|
};
|
||||||
|
} else if (getKey(o) === "reportIds") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
options: _.map(reportOptions, it => ({ key: it.id, showname: it.reportName }))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
shareForm.initFormFields(this.state.conditions);
|
||||||
|
shareForm.updateFields({ pushTitle: data["pushTitle"] || "" });
|
||||||
|
shareForm.updateFields({ mark: data["mark"] || "" });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
salaryStatisticsPushSendMsg = () => {
|
||||||
|
const { attendanceStore: { shareForm } } = this.props;
|
||||||
|
shareForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
const { sharedBy, reportIds, ...extraFormparams } = shareForm.getFormParams();
|
||||||
|
const payload = {
|
||||||
|
sharedBy: sharedBy.split(","),
|
||||||
|
reportIds: reportIds.split(","),
|
||||||
|
...extraFormparams
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
salaryStatisticsPushSendMsg(payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(111, "分享成功"));
|
||||||
|
this.props.onCancel();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { attendanceStore: { shareForm } } = this.props;
|
||||||
|
const { conditions, loading } = this.state;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props}
|
||||||
|
hasScroll initLoadCss title={getLabel(111, "分享报表")}
|
||||||
|
buttons={[
|
||||||
|
<Button type="primary" onClick={this.salaryStatisticsPushSendMsg}
|
||||||
|
loading={loading}>{getLabel(111, "确认分享")}</Button>
|
||||||
|
]}
|
||||||
|
className="shareDialogWrapper"
|
||||||
|
style={{
|
||||||
|
width: 750,
|
||||||
|
height: 375.6,
|
||||||
|
minHeight: 200,
|
||||||
|
minWidth: 380,
|
||||||
|
maxHeight: "60%",
|
||||||
|
maxWidth: "60%",
|
||||||
|
overflow: "hidden",
|
||||||
|
transform: "translate(0px, 0px)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ padding: 16, overflowY: "auto" }}>
|
||||||
|
{getSearchs(shareForm, conditions, 1, false)}
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SalaryStatisticsDetailShareDialog;
|
||||||
|
|
@ -0,0 +1,189 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 分享记录-查看分享记录详情
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/9/19
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import {
|
||||||
|
WeaButtonIcon,
|
||||||
|
WeaDialog,
|
||||||
|
WeaHelpfulTip,
|
||||||
|
WeaInputSearch,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaTable,
|
||||||
|
WeaTools
|
||||||
|
} from "ecCom";
|
||||||
|
import { message, Modal } from "antd";
|
||||||
|
import { shareLogCondition } from "./condition";
|
||||||
|
import { getConditionDomkeys, getSearchs } from "../../../util";
|
||||||
|
import { salaryStatisticsPushcancel, salaryStatisticsPushGetDetail } from "../../../apis/statistics";
|
||||||
|
import SalaryStatisticsDetailSharePersonDialog from "./salaryStatisticsDetailSharePersonDialog";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("attendanceStore")
|
||||||
|
@observer
|
||||||
|
class SalaryStatisticsDetailShareLogDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
conditions: [], loading: false, dataSource: [], columns: [],
|
||||||
|
userNameSearch: "", sharePerDialog: { visible: false, id: "" }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { attendanceStore: { initShareLogForm } } = nextProps;
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
this.salaryStatisticsPushGetDetail(nextProps);
|
||||||
|
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||||
|
initShareLogForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
renderShareLogTitle = () => {
|
||||||
|
return <div className="logtitleHeader">
|
||||||
|
<div className="titleText">
|
||||||
|
<span style={{ marginRight: 10 }}>{getLabel(111, "被分享人")}</span>
|
||||||
|
<WeaHelpfulTip width={200} placement="topLeft"
|
||||||
|
title={getLabel(111, "被分享人收到您分享的报表后,会默认赋予您的数据权限,但还需要有【薪酬统计分析】的菜单权限才可以查看报表。菜单权限设置路径:后台管理中心-【权限管理中心】-【角色设置】,建议创建一个仅查看报表的角色,这个角色只有薪酬管理模块的【薪酬统计分析】菜单权限。\n" +
|
||||||
|
"为了避免所选的人同名导致选错人,可在后台管理中心-【组织架构设置】-【浏览框显示字段定义】中人员浏览框的显示字段多勾选几个能区别人员的字段")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="right">
|
||||||
|
<WeaButtonIcon buttonType="add" type="primary" style={{ marginRight: 10 }}
|
||||||
|
onClick={() => this.setState({
|
||||||
|
sharePerDialog: {
|
||||||
|
...this.state.sharePerDialog,
|
||||||
|
visible: true, id: this.props.id
|
||||||
|
}
|
||||||
|
})}/>
|
||||||
|
<WeaInputSearch value={this.state.userNameSearch} onChange={v => this.setState({ userNameSearch: v })}
|
||||||
|
onSearch={() => this.salaryStatisticsPushGetDetail(this.props)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
salaryStatisticsPushGetDetail = (props) => {
|
||||||
|
const { userNameSearch } = this.state;
|
||||||
|
const { attendanceStore: { shareLogForm }, id } = props;
|
||||||
|
this.setState({ loading: true });
|
||||||
|
salaryStatisticsPushGetDetail({ id, userNameSearch }).then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { detailForm, detailTable } = data;
|
||||||
|
const { columns, list: dataSource } = detailTable;
|
||||||
|
this.setState({
|
||||||
|
columns, dataSource,
|
||||||
|
conditions: _.map(shareLogCondition, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "effectiveTime") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
helpfulTitle: getLabel(111, "有效时间之外,被分享人无法查看您分享的报表")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
shareLogForm.initFormFields(this.state.conditions);
|
||||||
|
getConditionDomkeys(this.state.conditions).map(key => {
|
||||||
|
shareLogForm.updateFields({
|
||||||
|
[key]: detailForm[key] || ""
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
salaryStatisticsPushcancel = (id) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(111, "确定要全部撤回吗?"),
|
||||||
|
onOk: () => {
|
||||||
|
salaryStatisticsPushcancel({ id }).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(505793, "撤回成功!"));
|
||||||
|
this.salaryStatisticsPushGetDetail(this.props);
|
||||||
|
this.props.onGetTable();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { attendanceStore: { shareLogForm } } = this.props;
|
||||||
|
const { conditions, dataSource, columns, loading, sharePerDialog } = this.state;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props}
|
||||||
|
hasScroll initLoadCss title={getLabel(111, "查看分享记录详情")}
|
||||||
|
className="shareDialogWrapper"
|
||||||
|
style={{
|
||||||
|
width: 850,
|
||||||
|
height: 506.6,
|
||||||
|
minHeight: 200,
|
||||||
|
minWidth: 380,
|
||||||
|
maxHeight: "60%",
|
||||||
|
maxWidth: "60%",
|
||||||
|
overflow: "hidden",
|
||||||
|
transform: "translate(0px, 0px)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ padding: 16, overflowY: "auto" }}>
|
||||||
|
{getSearchs(shareLogForm, conditions, 1, false)}
|
||||||
|
<WeaSearchGroup title={this.renderShareLogTitle()} showGroup needTigger className="shareLogGroupWrapper">
|
||||||
|
<WeaTable
|
||||||
|
rowKey="id" dataSource={dataSource} pagination={false} loading={loading}
|
||||||
|
columns={[
|
||||||
|
...columns,
|
||||||
|
{
|
||||||
|
dataIndex: "operate",
|
||||||
|
width: 120,
|
||||||
|
title: <React.Fragment>
|
||||||
|
<span style={{ marginRight: 10 }}>{getLabel(30585, "操作")}</span>
|
||||||
|
<WeaHelpfulTip width={200} placement="topLeft"
|
||||||
|
title={
|
||||||
|
<div>
|
||||||
|
<p>{getLabel(111, "1、分享状态为成功且撤回状态为空时,可操作撤回;")}</p>
|
||||||
|
<p>{getLabel(111, "2、撤回后不可重新分享;")}</p>
|
||||||
|
<p>{getLabel(111, "3、分享状态为失败,可操作重新分享;")}</p>
|
||||||
|
<p>{getLabel(111, "4、重新分享:以当前分享记录的分享报表、有效时间、渠道和说明重新分享,分享后自动刷新分享时间和分享状态")}</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</React.Fragment>,
|
||||||
|
render: (__, record) => (_.isEmpty(record.rebackStatus) ?
|
||||||
|
<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.salaryStatisticsPushcancel(record.id)}>{getLabel(32025, "撤回")}</a> : null)
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<SalaryStatisticsDetailSharePersonDialog
|
||||||
|
{...sharePerDialog}
|
||||||
|
onCancel={() => this.setState({ sharePerDialog: { ...sharePerDialog, visible: false, id: "" } })}
|
||||||
|
onGetTable={() => {
|
||||||
|
this.salaryStatisticsPushGetDetail(this.props);
|
||||||
|
this.props.onGetTable();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</WeaSearchGroup>
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SalaryStatisticsDetailShareLogDialog;
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
import { salaryStatisticsPushAddSharedSendMsg } from "../../../apis/statistics";
|
||||||
|
import { sharePersonCondition } from "./condition";
|
||||||
|
import { getSearchs } from "../../../util";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("attendanceStore")
|
||||||
|
@observer
|
||||||
|
class SalaryStatisticsDetailSharePersonDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
conditions: [], loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { attendanceStore: { initSharePerForm, sharePerForm } } = nextProps;
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
|
sharePerForm.initFormFields(sharePersonCondition);
|
||||||
|
} else {
|
||||||
|
initSharePerForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
save = () => {
|
||||||
|
const { attendanceStore: { sharePerForm }, id } = this.props;
|
||||||
|
sharePerForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
const { sharedBy } = sharePerForm.getFormParams();
|
||||||
|
const payload = {
|
||||||
|
id, sharedBy: sharedBy.split(",")
|
||||||
|
};
|
||||||
|
salaryStatisticsPushAddSharedSendMsg(payload)
|
||||||
|
.then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.props.onCancel();
|
||||||
|
this.props.onGetTable();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => this.setState({ loading: false }));
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { attendanceStore: { sharePerForm }, loading } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props}
|
||||||
|
hasScroll initLoadCss title={getLabel(111, "追加被分享人")}
|
||||||
|
buttons={[
|
||||||
|
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "保存并分享")}</Button>
|
||||||
|
]}
|
||||||
|
style={{ width: 600, height: 100 }}
|
||||||
|
>
|
||||||
|
{getSearchs(sharePerForm, sharePersonCondition, 1, false)}
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SalaryStatisticsDetailSharePersonDialog;
|
||||||
|
|
@ -0,0 +1,132 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 统计报表-分享记录
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/9/19
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider, WeaSlideModal, WeaTable } from "ecCom";
|
||||||
|
import { message, Modal } from "antd";
|
||||||
|
import { salaryStatisticsPushcancelAll, salaryStatisticsPushGetTable } from "../../../apis/statistics";
|
||||||
|
import SalaryStatisticsDetailShareLogDialog from "./salaryStatisticsDetailShareLogDialog";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
class SalaryStatisticsDetailShareRecord extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false, dataSource: [], columns: [],
|
||||||
|
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
|
shareLogDialog: {
|
||||||
|
visible: false, id: ""
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.salaryStatisticsPushGetTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
salaryStatisticsPushGetTable = () => {
|
||||||
|
this.setState({ loading: true });
|
||||||
|
salaryStatisticsPushGetTable({ ...this.state.pageInfo })
|
||||||
|
.then(({ status, data }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||||
|
this.setState({
|
||||||
|
columns, dataSource,
|
||||||
|
pageInfo: { ...this.state.pageInfo, current, pageSize, total }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
handleWithdrawAll = (id) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: getLabel(111, "确定要全部撤回吗?"),
|
||||||
|
onOk: () => {
|
||||||
|
salaryStatisticsPushcancelAll({ id }).then(({ status, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(30700, "操作成功!"));
|
||||||
|
this.salaryStatisticsPushGetTable();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { dataSource, columns, loading, pageInfo, shareLogDialog } = this.state;
|
||||||
|
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.salaryStatisticsPushGetTable();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onChange: current => {
|
||||||
|
this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current }
|
||||||
|
}, () => {
|
||||||
|
this.salaryStatisticsPushGetTable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<WeaSlideModal
|
||||||
|
{...this.props} className="shareRecordWrapper"
|
||||||
|
direction="right" top={0} width={800} height={100}
|
||||||
|
measureT="%" measureX="px" measureY="%"
|
||||||
|
title={<div className="titleDialog">
|
||||||
|
<div className="titleCol">
|
||||||
|
<div className="titleLeftBox">
|
||||||
|
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||||
|
<div className="title">{getLabel(111, "分享记录")}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
|
</div>}
|
||||||
|
content={(
|
||||||
|
<WeaTable
|
||||||
|
rowKey="id" dataSource={dataSource} pagination={pagination} loading={loading}
|
||||||
|
columns={[
|
||||||
|
...columns,
|
||||||
|
{
|
||||||
|
dataIndex: "operate",
|
||||||
|
width: 150,
|
||||||
|
title: getLabel(30585, "操作"),
|
||||||
|
render: (__, record) => (
|
||||||
|
<React.Fragment>
|
||||||
|
<a href="javascript:void(0);" style={{ marginRight: 10 }}
|
||||||
|
onClick={() => this.setState({
|
||||||
|
shareLogDialog: { visible: true, id: record.id }
|
||||||
|
})}>{getLabel(111, "查询详情")}</a>
|
||||||
|
<a href="javascript:void(0);"
|
||||||
|
onClick={() => this.handleWithdrawAll(record.id)}>{getLabel(111, "全部撤回")}</a>
|
||||||
|
<SalaryStatisticsDetailShareLogDialog
|
||||||
|
{...shareLogDialog}
|
||||||
|
onGetTable={() => this.salaryStatisticsPushGetTable()}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
shareLogDialog: { visible: false, id: "" }
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
)}/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SalaryStatisticsDetailShareRecord;
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
* Date: 2023/4/21
|
* Date: 2023/4/21
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { toJS } from "mobx";
|
|
||||||
import {
|
import {
|
||||||
WeaButtonIcon,
|
WeaButtonIcon,
|
||||||
WeaDatePicker,
|
WeaDatePicker,
|
||||||
|
|
@ -16,12 +15,12 @@ import {
|
||||||
WeaSearchGroup,
|
WeaSearchGroup,
|
||||||
WeaSelect,
|
WeaSelect,
|
||||||
WeaSlideModal,
|
WeaSlideModal,
|
||||||
WeaTable
|
WeaTable,
|
||||||
|
WeaTools
|
||||||
} from "ecCom";
|
} from "ecCom";
|
||||||
import CustomStatisticsItemsModal from "./customStatisticsItemsModal";
|
import CustomStatisticsItemsModal from "./customStatisticsItemsModal";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import { condition } from "./condition";
|
|
||||||
import { getSearchs } from "../../../util";
|
import { getSearchs } from "../../../util";
|
||||||
import {
|
import {
|
||||||
deleteRangeSetting,
|
deleteRangeSetting,
|
||||||
|
|
@ -31,8 +30,11 @@ import {
|
||||||
statisticsItemList
|
statisticsItemList
|
||||||
} from "../../../apis/statistics";
|
} from "../../../apis/statistics";
|
||||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||||
|
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||||
|
import { condition } from "./condition";
|
||||||
import "../index.less";
|
import "../index.less";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
class StatisticalMicroSettingsSlide extends Component {
|
class StatisticalMicroSettingsSlide extends Component {
|
||||||
|
|
@ -47,32 +49,14 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
salaryMonth: [],
|
salaryMonth: [],
|
||||||
statisticalItemPayload: {
|
statisticalItemPayload: {
|
||||||
visible: false, id: "", dimension: "",
|
visible: false, id: "", dimension: "",
|
||||||
statisticsItemId: ""
|
statisticsItemId: "", isShare: false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.taxAgentAdminOption !== this.props.taxAgentAdminOption && !_.isEmpty(nextProps.taxAgentAdminOption)) {
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxAgentSelectList(nextProps);
|
||||||
const conditions = _.map(condition, item => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
items: _.map(item.items, child => {
|
|
||||||
if (child.domkey[0] === "taxAgent") {
|
|
||||||
return {
|
|
||||||
...child,
|
|
||||||
options: toJS(nextProps.taxAgentAdminOption)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { ...child };
|
|
||||||
})
|
|
||||||
};
|
|
||||||
});
|
|
||||||
this.setState({ conditions });
|
|
||||||
nextProps.form.initFormFields(condition);
|
|
||||||
}
|
|
||||||
if (nextProps.id !== this.props.id && !_.isEmpty(nextProps.id)) {
|
if (nextProps.id !== this.props.id && !_.isEmpty(nextProps.id)) {
|
||||||
this.reportStatisticsGetSearchCondition(nextProps.id);
|
|
||||||
this.statisticsItemList(nextProps.id).then(r => {
|
this.statisticsItemList(nextProps.id).then(r => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -82,6 +66,31 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTaxAgentSelectList = (props) => {
|
||||||
|
getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
const conditions = _.map(condition, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, child => {
|
||||||
|
if (getKey(child) === "taxAgent") {
|
||||||
|
return {
|
||||||
|
...child, viewAttr: props.isShare ? 1 : child.viewAttr,
|
||||||
|
options: _.map(data, o => ({ key: o.id, showname: o.content }))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...child, viewAttr: props.isShare ? 1 : child.viewAttr };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
});
|
||||||
|
this.setState({ conditions }, () => {
|
||||||
|
props.form.initFormFields(this.state.conditions);
|
||||||
|
props.id && this.reportStatisticsGetSearchCondition(props.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
reportStatisticsGetSearchCondition = (id) => {
|
reportStatisticsGetSearchCondition = (id) => {
|
||||||
const { conditions } = this.state;
|
const { conditions } = this.state;
|
||||||
const { form } = this.props;
|
const { form } = this.props;
|
||||||
|
|
@ -189,7 +198,7 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
};
|
};
|
||||||
renderProjectTitle = () => {
|
renderProjectTitle = () => {
|
||||||
const { selectedRowKeys } = this.state;
|
const { selectedRowKeys } = this.state;
|
||||||
const { id, dimension } = this.props;
|
const { id, dimension, isShare } = this.props;
|
||||||
return <div className="groupPorjectTitleWrapper">
|
return <div className="groupPorjectTitleWrapper">
|
||||||
<div>
|
<div>
|
||||||
<span>{getLabel(111, "统计项目")}</span>
|
<span>{getLabel(111, "统计项目")}</span>
|
||||||
|
|
@ -198,19 +207,25 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<WeaButtonIcon
|
{
|
||||||
buttonType="del" type="primary" disabled={_.isEmpty(selectedRowKeys)}
|
!isShare &&
|
||||||
onClick={this.reportStatisticsItemDelete}
|
<WeaButtonIcon
|
||||||
/>
|
buttonType="del" type="primary" disabled={_.isEmpty(selectedRowKeys)}
|
||||||
<WeaButtonIcon
|
onClick={this.reportStatisticsItemDelete}
|
||||||
buttonType="add" type="primary"
|
/>
|
||||||
onClick={() => this.setState({
|
}
|
||||||
statisticalItemPayload: {
|
{
|
||||||
visible: true, id, dimension,
|
!isShare &&
|
||||||
statisticsItemId: ""
|
<WeaButtonIcon
|
||||||
}
|
buttonType="add" type="primary"
|
||||||
})}
|
onClick={() => this.setState({
|
||||||
/>
|
statisticalItemPayload: {
|
||||||
|
visible: true, id, dimension,
|
||||||
|
statisticsItemId: "", isShare
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
@ -220,16 +235,18 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
salaryMonth, conditions, selectedRowKeys, loading,
|
salaryMonth, conditions, selectedRowKeys, loading,
|
||||||
statisticalItemPayload, dataSource, unitTypeList
|
statisticalItemPayload, dataSource, unitTypeList
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { id, dimension } = this.props;
|
const { id, dimension, isShare } = this.props;
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "统计项名称",
|
title: "统计项名称",
|
||||||
dataIndex: "itemName",
|
dataIndex: "itemName",
|
||||||
render: (txt, record) => {
|
render: (txt, record) => {
|
||||||
return (
|
return (
|
||||||
<a href="javascript: void(0);" onClick={() => this.setState({
|
<a href="javascript: void(0);" onClick={() => {
|
||||||
statisticalItemPayload: { visible: true, id, dimension, statisticsItemId: record.id }
|
this.setState({
|
||||||
})}>{txt}</a>
|
statisticalItemPayload: { visible: true, id, dimension, statisticsItemId: record.id, isShare }
|
||||||
|
});
|
||||||
|
}}>{txt}</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -238,7 +255,7 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
dataIndex: "unitType",
|
dataIndex: "unitType",
|
||||||
render: (txt, record) => {
|
render: (txt, record) => {
|
||||||
return <WeaSelect
|
return <WeaSelect
|
||||||
value={!_.isNil(txt) ? txt.toString() : ""} options={unitTypeList} style={{ width: 150 }}
|
value={!_.isNil(txt) ? txt.toString() : ""} options={unitTypeList} style={{ width: 150 }} disabled={isShare}
|
||||||
onChange={unitType => this.customStatisticsItemsRef.reportStatisticsItemSave({ id: record.id, unitType })}
|
onChange={unitType => this.customStatisticsItemsRef.reportStatisticsItemSave({ id: record.id, unitType })}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +265,10 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
selectedRowKeys,
|
selectedRowKeys,
|
||||||
onChange: (selectedRowKeys) => {
|
onChange: (selectedRowKeys) => {
|
||||||
this.setState({ selectedRowKeys });
|
this.setState({ selectedRowKeys });
|
||||||
}
|
},
|
||||||
|
getCheckboxProps: record => ({
|
||||||
|
disabled: isShare
|
||||||
|
})
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<WeaSlideModal
|
<WeaSlideModal
|
||||||
|
|
@ -262,13 +282,13 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
height={100}
|
height={100}
|
||||||
measureY="%"
|
measureY="%"
|
||||||
direction={"right"}
|
direction={"right"}
|
||||||
title={<TitleDialog loading={loading} onSave={this.reportStatisticsSaveSearchCondition}/>}
|
title={<TitleDialog loading={loading} isShare={isShare} onSave={this.reportStatisticsSaveSearchCondition}/>}
|
||||||
content={
|
content={
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<WeaSearchGroup title={getLabel(111, "统计时间范围")} col={2} showGroup needTigger>
|
<WeaSearchGroup title={getLabel(111, "统计时间范围")} col={2} showGroup needTigger>
|
||||||
<WeaFormItem label={getLabel(111, "薪资所属月")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
<WeaFormItem label={getLabel(111, "薪资所属月")} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||||
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(111, "此项必填")}>
|
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(111, "此项必填")}>
|
||||||
<MonthRangePicker viewAttr={3} dateRange={salaryMonth}
|
<MonthRangePicker viewAttr={3} dateRange={salaryMonth} disabled={isShare}
|
||||||
onChange={v => this.setState({ salaryMonth: v })}/>
|
onChange={v => this.setState({ salaryMonth: v })}/>
|
||||||
</WeaError>
|
</WeaError>
|
||||||
</WeaFormItem>
|
</WeaFormItem>
|
||||||
|
|
@ -294,10 +314,8 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
{...statisticalItemPayload}
|
{...statisticalItemPayload}
|
||||||
onCancel={(isRefresh) => this.setState({
|
onCancel={(isRefresh) => this.setState({
|
||||||
statisticalItemPayload: {
|
statisticalItemPayload: {
|
||||||
visible: false,
|
visible: false, id: "", dimension: "",
|
||||||
id: "",
|
statisticsItemId: "", isShare: false
|
||||||
dimension: "",
|
|
||||||
statisticsItemId: ""
|
|
||||||
}
|
}
|
||||||
}, () => isRefresh && this.statisticsItemList(this.props.id))}
|
}, () => isRefresh && this.statisticsItemList(this.props.id))}
|
||||||
/>
|
/>
|
||||||
|
|
@ -319,16 +337,19 @@ const TitleDialog = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="titleCol titleRightBox">
|
<div className="titleCol titleRightBox">
|
||||||
<Button type="primary" loading={props.loading} onClick={props.onSave}>{getLabel(111, "保存")}</Button>
|
{
|
||||||
|
!props.isShare &&
|
||||||
|
<Button type="primary" loading={props.loading} onClick={props.onSave}>{getLabel(111, "保存")}</Button>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
export const MonthRangePicker = (props) => {
|
export const MonthRangePicker = (props) => {
|
||||||
const { dateRange, onChange, viewAttr } = props;
|
const { dateRange, onChange, viewAttr, disabled = false } = props;
|
||||||
const [startDate, endDate] = dateRange || [];
|
const [startDate, endDate] = dateRange || [];
|
||||||
return <div className="rangePickerBox">
|
return <div className="rangePickerBox">
|
||||||
<WeaDatePicker
|
<WeaDatePicker
|
||||||
value={startDate}
|
value={startDate} disabled={disabled}
|
||||||
disabledDate={(current) => {
|
disabledDate={(current) => {
|
||||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||||
}}
|
}}
|
||||||
|
|
@ -338,7 +359,7 @@ export const MonthRangePicker = (props) => {
|
||||||
/>
|
/>
|
||||||
<span className="to" style={{ margin: "0 10px" }}>至</span>
|
<span className="to" style={{ margin: "0 10px" }}>至</span>
|
||||||
<WeaDatePicker
|
<WeaDatePicker
|
||||||
value={endDate}
|
value={endDate} disabled={disabled}
|
||||||
disabledDate={(current) => {
|
disabledDate={(current) => {
|
||||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import SalaryStatisticsDetailShareDialog from "./salaryStatisticsDetailShareDialog";
|
||||||
|
import SalaryStatisticsDetailShareRecord from "./salaryStatisticsDetailShareRecord";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
class TopBtns extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
shareDialog: {
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
shareRecordDialog: {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
handleShare = () => {
|
||||||
|
this.setState({
|
||||||
|
shareDialog: { visible: true }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleShareRecord = () => {
|
||||||
|
this.setState({
|
||||||
|
shareRecordDialog: { visible: true }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { shareDialog, shareRecordDialog } = this.state;
|
||||||
|
return [
|
||||||
|
<Button type="ghost" style={{ marginRight: 10 }} onClick={this.handleShare}>{getLabel(111, "分享报表")}</Button>,
|
||||||
|
<Button type="ghost" onClick={this.handleShareRecord}>{getLabel(111, "分享记录")}</Button>,
|
||||||
|
<SalaryStatisticsDetailShareDialog
|
||||||
|
{...shareDialog}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
shareDialog: { visible: false }
|
||||||
|
})}
|
||||||
|
/>,
|
||||||
|
<SalaryStatisticsDetailShareRecord
|
||||||
|
{...shareRecordDialog}
|
||||||
|
onClose={() => this.setState({
|
||||||
|
shareRecordDialog: { visible: false }
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default TopBtns;
|
||||||
|
|
@ -11,9 +11,11 @@ import { message, Modal } from "antd";
|
||||||
import LeftTab from "./components/leftTab";
|
import LeftTab from "./components/leftTab";
|
||||||
import ReportContent from "./components/reportContent";
|
import ReportContent from "./components/reportContent";
|
||||||
import StatisticalMicroSettingsSlide from "./components/statisticalMicroSettingsSlide";
|
import StatisticalMicroSettingsSlide from "./components/statisticalMicroSettingsSlide";
|
||||||
|
import TopBtns from "./components/topBtns";
|
||||||
import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
|
import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
@inject("taxAgentStore", "attendanceStore")
|
@inject("taxAgentStore", "attendanceStore")
|
||||||
|
|
@ -31,9 +33,7 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { taxAgentStore: { fetchTaxAgentOption } } = this.props;
|
|
||||||
this.reportGetForm();
|
this.reportGetForm();
|
||||||
fetchTaxAgentOption();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reportGetForm = () => {
|
reportGetForm = () => {
|
||||||
|
|
@ -92,20 +92,19 @@ class Index extends Component {
|
||||||
*/
|
*/
|
||||||
exportData = () => {
|
exportData = () => {
|
||||||
const { report } = this.state;
|
const { report } = this.state;
|
||||||
const { id, dimensionId } = report;
|
const { id, dimensionId, isShare } = report;
|
||||||
window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?id=${id}&dimensionId=${dimensionId}`, "_self");
|
window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?id=${id}&dimensionId=${dimensionId}&isShare=${isShare}`, "_blank");
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { report, dimensionList, statisticalPayload } = this.state;
|
const { report, dimensionList, statisticalPayload } = this.state;
|
||||||
const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
const { isShare } = report;
|
||||||
|
const { attendanceStore: { settingForm }, taxAgentStore: { taxAgentOption, showOperateBtn } } = this.props;
|
||||||
return (
|
return (
|
||||||
<WeaTop
|
<WeaTop
|
||||||
title={getLabel(111, "报表查看")}
|
title={getLabel(111, "报表查看")} icon={<i className="icon-coms-fa"/>}
|
||||||
icon={<i className="icon-coms-fa"/>}
|
iconBgcolor="#F14A2D" className="reportViewWrapper"
|
||||||
iconBgcolor="#F14A2D"
|
buttons={(showOperateBtn && !isShare) ? [<TopBtns/>] : []}
|
||||||
showDropIcon={false}
|
|
||||||
className="reportViewWrapper"
|
|
||||||
>
|
>
|
||||||
<WeaLeftRightLayout
|
<WeaLeftRightLayout
|
||||||
leftWidth={210}
|
leftWidth={210}
|
||||||
|
|
@ -128,7 +127,7 @@ class Index extends Component {
|
||||||
<div className="rightColTitle">
|
<div className="rightColTitle">
|
||||||
<div className="dimension">
|
<div className="dimension">
|
||||||
<span>{getLabel(111, "统计维度")}:</span>
|
<span>{getLabel(111, "统计维度")}:</span>
|
||||||
<WeaSelect value={report.dimensionId} options={dimensionList}
|
<WeaSelect value={report.dimensionId} options={dimensionList} disabled={isShare}
|
||||||
onChange={(key, showname) => this.handleChangeDimension(key, showname)}/>
|
onChange={(key, showname) => this.handleChangeDimension(key, showname)}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="iconWrapper">
|
<div className="iconWrapper">
|
||||||
|
|
@ -150,10 +149,10 @@ class Index extends Component {
|
||||||
{/*统计数据范围及规则设置弹框*/}
|
{/*统计数据范围及规则设置弹框*/}
|
||||||
<StatisticalMicroSettingsSlide
|
<StatisticalMicroSettingsSlide
|
||||||
{...statisticalPayload} form={settingForm}
|
{...statisticalPayload} form={settingForm}
|
||||||
taxAgentAdminOption={taxAgentOption}
|
taxAgentAdminOption={taxAgentOption} isShare={isShare}
|
||||||
onClose={(isRefresh) => this.setState({
|
onClose={(isRefresh) => this.setState({
|
||||||
statisticalPayload: { visible: false, id: "", dimension: "" }
|
statisticalPayload: { visible: false, id: "", dimension: "" }
|
||||||
}, () => isRefresh && this.reportRef.reportStatisticsReportGetData(report.id, report.dimensionId))}
|
}, () => isRefresh && this.reportRef.reportStatisticsReportGetData(report.id, report.dimensionId, report.isShare))}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,18 @@
|
||||||
.microSlideWrapper {
|
.microSlideWrapper {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
|
||||||
|
.wea-form-item-wrapper {
|
||||||
|
display: flex !important;
|
||||||
|
|
||||||
|
.wea-browser {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-item .wea-form-item-wrapper .wea-field-readonly {
|
||||||
|
white-space: pre-wrap !important;
|
||||||
|
}
|
||||||
|
|
||||||
.wea-slide-modal-title {
|
.wea-slide-modal-title {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
line-height: normal !important;
|
line-height: normal !important;
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,27 @@ export const valTakeOptions = [
|
||||||
{ key: "2", showname: "公式" },
|
{ key: "2", showname: "公式" },
|
||||||
{ key: "3", showname: "SQL" }
|
{ key: "3", showname: "SQL" }
|
||||||
];
|
];
|
||||||
|
export const salarySetConditions = [
|
||||||
|
{
|
||||||
|
items: [{
|
||||||
|
colSpan: 1,
|
||||||
|
checkbox: false,
|
||||||
|
checkboxValue: false,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["salarySobIds"],
|
||||||
|
fieldcol: 18,
|
||||||
|
label: "薪资账套",
|
||||||
|
lanId: 538010,
|
||||||
|
labelcol: 6,
|
||||||
|
options: [],
|
||||||
|
rules: "required|string",
|
||||||
|
multiple: true,
|
||||||
|
viewAttr: 3
|
||||||
|
}],
|
||||||
|
title: "",
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import { columns } from "./columns";
|
||||||
import SlideModalTitle from "../../components/slideModalTitle";
|
import SlideModalTitle from "../../components/slideModalTitle";
|
||||||
import CustomSalaryItemSlide from "./customSalaryItemSlide";
|
import CustomSalaryItemSlide from "./customSalaryItemSlide";
|
||||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||||
|
import SyncToSalaryAccountSetDialog from "./syncToSalaryAccountSetDialog";
|
||||||
import "../socialSecurityBenefits/programme/index.less";
|
import "../socialSecurityBenefits/programme/index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
@ -25,7 +26,8 @@ export default class SalaryItem extends React.Component {
|
||||||
searchValue: "",
|
searchValue: "",
|
||||||
formalModalVisible: false,
|
formalModalVisible: false,
|
||||||
searchParams: { current: 1, pageSize: 10, total: 0 },
|
searchParams: { current: 1, pageSize: 10, total: 0 },
|
||||||
selectedRowKeys: []
|
selectedRowKeys: [],
|
||||||
|
syncSalarySetDialog: { visible: false, title: "", id: "" }
|
||||||
};
|
};
|
||||||
columns.map(item => {
|
columns.map(item => {
|
||||||
if (item.dataIndex == "refere") {
|
if (item.dataIndex == "refere") {
|
||||||
|
|
@ -69,7 +71,10 @@ export default class SalaryItem extends React.Component {
|
||||||
onEditItem = (record, isedit) => {
|
onEditItem = (record, isedit) => {
|
||||||
this.record = record;
|
this.record = record;
|
||||||
const { salaryItemStore: { getItemForm, setEditSlideVisible } } = this.props;
|
const { salaryItemStore: { getItemForm, setEditSlideVisible } } = this.props;
|
||||||
this.setState({ editable: isedit, isAdd: false });
|
this.setState({
|
||||||
|
editable: isedit, isAdd: false,
|
||||||
|
syncSalarySetDialog: { ...this.state.syncSalarySetDialog, id: record.id }
|
||||||
|
});
|
||||||
getItemForm(record.id).then(() => {
|
getItemForm(record.id).then(() => {
|
||||||
setEditSlideVisible(true);
|
setEditSlideVisible(true);
|
||||||
}).catch(({ errormsg }) => {
|
}).catch(({ errormsg }) => {
|
||||||
|
|
@ -308,6 +313,15 @@ export default class SalaryItem extends React.Component {
|
||||||
];
|
];
|
||||||
} else if (this.state.editable) {
|
} else if (this.state.editable) {
|
||||||
arrList = [
|
arrList = [
|
||||||
|
<Button type="ghost"
|
||||||
|
onClick={() => this.setState({
|
||||||
|
syncSalarySetDialog: {
|
||||||
|
...this.state.syncSalarySetDialog,
|
||||||
|
visible: true,
|
||||||
|
title: getLabel(111, "请选择薪资账套")
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
>{getLabel(111, "同步到薪资账套")}</Button>,
|
||||||
<Button type="primary" onClick={() => {
|
<Button type="primary" onClick={() => {
|
||||||
handleSlideSave(false);
|
handleSlideSave(false);
|
||||||
}}>保存</Button>
|
}}>保存</Button>
|
||||||
|
|
@ -365,6 +379,15 @@ export default class SalaryItem extends React.Component {
|
||||||
</WeaNewScroll>
|
</WeaNewScroll>
|
||||||
</div>
|
</div>
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
|
<SyncToSalaryAccountSetDialog
|
||||||
|
{...this.state.syncSalarySetDialog}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
syncSalarySetDialog: {
|
||||||
|
...this.state.syncSalarySetDialog,
|
||||||
|
visible: false, id: "", title: ""
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
|
||||||
{
|
{
|
||||||
systemItemVisible &&
|
systemItemVisible &&
|
||||||
|
|
|
||||||
|
|
@ -102,3 +102,43 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.salarySetDialog {
|
||||||
|
.salarySetDialogContent {
|
||||||
|
.wea-select, .ant-select, .ant-select-selection {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input .arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 8px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wdb {
|
||||||
|
word-break: break-all !important;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select .wea-select-input {
|
||||||
|
height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 345px;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 17px 4px 4px;
|
||||||
|
position: relative;
|
||||||
|
min-height: 30px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 同步到薪资账套
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/8/31
|
||||||
|
*/
|
||||||
|
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 { getSalarySobBySalaryItem, syncSalaryItemToSalarySobItem } from "../../apis/item";
|
||||||
|
import { salarySetConditions } from "./columns";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
@inject("salaryItemStore")
|
||||||
|
@observer
|
||||||
|
class SyncToSalaryAccountSetDialog extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false,
|
||||||
|
conditions: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { salaryItemStore: { salarySetform } } = nextProps;
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getSalarySobBySalaryItem(nextProps);
|
||||||
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) salarySetform.resetForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
getSalarySobBySalaryItem = (props) => {
|
||||||
|
const { id, salaryItemStore: { salarySetform } } = props;
|
||||||
|
getSalarySobBySalaryItem({ id }).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({
|
||||||
|
conditions: _.map(salarySetConditions, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, o => ({
|
||||||
|
...o,
|
||||||
|
options: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||||
|
}))
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}, () => {
|
||||||
|
salarySetform.initFormFields(this.state.conditions);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
save = () => {
|
||||||
|
const { salaryItemStore: { salarySetform }, id: salaryItemId } = this.props;
|
||||||
|
salarySetform.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
const { salarySobIds } = salarySetform.getFormParams();
|
||||||
|
this.setState({ loading: true });
|
||||||
|
syncSalaryItemToSalarySobItem({ salaryItemId, salarySobIds: salarySobIds.split(",") })
|
||||||
|
.then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(38462, "同步成功!"));
|
||||||
|
this.props.onCancel();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || getLabel(81556, "同步失败!"));
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { salaryItemStore: { salarySetform } } = this.props;
|
||||||
|
const { conditions } = this.state;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props} className="salarySetDialog" initLoadCss
|
||||||
|
style={{ width: 550 }}
|
||||||
|
buttons={[<Button type="primary" onClick={this.save}
|
||||||
|
loading={this.state.loading}>{getLabel(537558, "确定")}</Button>]}
|
||||||
|
>
|
||||||
|
<div className="salarySetDialogContent">
|
||||||
|
{getSearchs(salarySetform, conditions, 1)}
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SyncToSalaryAccountSetDialog;
|
||||||
|
|
@ -26,5 +26,12 @@ export const tabCondition = [
|
||||||
showcount: true,
|
showcount: true,
|
||||||
title: "停缴员工",
|
title: "停缴员工",
|
||||||
viewcondition: "stop"
|
viewcondition: "stop"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
color: "#000000",
|
||||||
|
groupid: "ext",
|
||||||
|
showcount: true,
|
||||||
|
title: "非系统人员",
|
||||||
|
viewcondition: "ext"
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from "mobx";
|
import { toJS } from "mobx";
|
||||||
import { Button, Dropdown, Menu, message, Modal, Popover } from "antd";
|
import { Button, Dropdown, Menu, message, Modal, Popover } from "antd";
|
||||||
import { WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
import { WeaCheckbox, WeaHelpfulTip, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||||
import { getSearchs, renderLoading } from "../../../util";
|
import { getSearchs, renderLoading } from "../../../util";
|
||||||
import BaseForm from "./baseForm";
|
import BaseForm from "./baseForm";
|
||||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||||
|
|
@ -14,11 +14,16 @@ import * as API from "../../../apis/welfareArchive";
|
||||||
import ImportModal from "../../../components/importModal";
|
import ImportModal from "../../../components/importModal";
|
||||||
import TipLabel from "../../../components/TipLabel";
|
import TipLabel from "../../../components/TipLabel";
|
||||||
import UnifiedTable from "../../../components/UnifiedTable";
|
import UnifiedTable from "../../../components/UnifiedTable";
|
||||||
import { convertToUrlString } from "../../../util/url";
|
import { convertToUrlString, getURLParameters } from "../../../util/url";
|
||||||
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
|
import { salaryArchiveDelete } from "../../../apis/payrollFiles";
|
||||||
|
import ImportDialog from "../../../components/importDialog";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
const APILIST = {
|
||||||
|
runStatuses: API["queryList"],
|
||||||
|
extWelArchiveList: API["getExtTable"]
|
||||||
|
};
|
||||||
@inject("archivesStore", "taxAgentStore")
|
@inject("archivesStore", "taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
export default class Archives extends React.Component {
|
export default class Archives extends React.Component {
|
||||||
|
|
@ -46,14 +51,20 @@ export default class Archives extends React.Component {
|
||||||
stayAdd: 0,
|
stayAdd: 0,
|
||||||
paying: 0,
|
paying: 0,
|
||||||
stayDel: 0,
|
stayDel: 0,
|
||||||
stopPay: 0
|
stopPay: 0,
|
||||||
|
ext: 0
|
||||||
},
|
},
|
||||||
pageInfo: {
|
pageInfo: {
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0
|
total: 0
|
||||||
},
|
},
|
||||||
salaryArchiveDelete: "" //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
|
salaryArchiveDelete: "", //待定薪、停薪员工 是否允许删除薪资档案 0: 否, 1: 是
|
||||||
|
importDialog: {
|
||||||
|
visible: false, title: "", nextloading: false,
|
||||||
|
link: "", importResult: {}, imageId: "",
|
||||||
|
previewUrl: "/api/bs/hrmsalary/scheme/preview"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.record = {};
|
this.record = {};
|
||||||
}
|
}
|
||||||
|
|
@ -78,7 +89,7 @@ export default class Archives extends React.Component {
|
||||||
const formParams = form.getFormParams() || {};
|
const formParams = form.getFormParams() || {};
|
||||||
const payload = { ...pageInfo };
|
const payload = { ...pageInfo };
|
||||||
this.setState({ loading: { ...loading, query: true } });
|
this.setState({ loading: { ...loading, query: true } });
|
||||||
API.queryList({ ...formParams, ...payload, ...params }).then(({ data, status }) => {
|
APILIST[_.keys(params)[0]]({ ...formParams, ...payload, ...params }).then(({ data, status }) => {
|
||||||
this.setState({ loading: { ...loading, query: false } });
|
this.setState({ loading: { ...loading, query: false } });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { pageInfo: paganition, columns, datas: dataSource } = data;
|
const { pageInfo: paganition, columns, datas: dataSource } = data;
|
||||||
|
|
@ -309,8 +320,19 @@ export default class Archives extends React.Component {
|
||||||
// 导入
|
// 导入
|
||||||
handleImport = (params) => {
|
handleImport = (params) => {
|
||||||
const { archivesStore: { importBatch } } = this.props;
|
const { archivesStore: { importBatch } } = this.props;
|
||||||
const { runStatus } = this.state;
|
const { runStatus, importDialog } = this.state;
|
||||||
importBatch({ ...params, runStatus });
|
this.setState(({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog, nextloading: true, ...params
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
importBatch({ ...params, runStatus }).then(({ status, data }) => {
|
||||||
|
this.setState(({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog, nextloading: false, importResult: data, ...params
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 导入完成
|
// 导入完成
|
||||||
|
|
@ -375,9 +397,12 @@ export default class Archives extends React.Component {
|
||||||
case "suspend":
|
case "suspend":
|
||||||
this.queryList({ runStatuses: ["3"] });
|
this.queryList({ runStatuses: ["3"] });
|
||||||
break;
|
break;
|
||||||
default:
|
case "stop":
|
||||||
this.queryList({ runStatuses: ["4", "5"] });
|
this.queryList({ runStatuses: ["4", "5"] });
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
this.queryList({ extWelArchiveList: true });
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handleMenuBtnClick = () => {
|
handleMenuBtnClick = () => {
|
||||||
|
|
@ -564,13 +589,15 @@ export default class Archives extends React.Component {
|
||||||
{/*<div>4、数据进入【待减员】规则的第四种情况下,若还需要在当前个税扣缴义务人下进行缴纳的话,当前该员工的【待减员】数据进行【删除待办】操作即可;若不在该个税扣缴义务人下继续缴纳,维护好最后缴纳月后进行【减员】操作,员工进入【停缴员工】;</div>*/}
|
{/*<div>4、数据进入【待减员】规则的第四种情况下,若还需要在当前个税扣缴义务人下进行缴纳的话,当前该员工的【待减员】数据进行【删除待办】操作即可;若不在该个税扣缴义务人下继续缴纳,维护好最后缴纳月后进行【减员】操作,员工进入【停缴员工】;</div>*/}
|
||||||
</div>;
|
</div>;
|
||||||
break;
|
break;
|
||||||
default:
|
case "stop":
|
||||||
dom = <div>
|
dom = <div>
|
||||||
<div>1、不需要缴纳社保福利的员工,保存在【停缴员工】;</div>
|
<div>1、不需要缴纳社保福利的员工,保存在【停缴员工】;</div>
|
||||||
{/*<div>2、【停缴员工】点击取消停缴,数据会回退到上次的位置(从【待减员】减员到停缴员工的,点击停缴返回到【在缴员工】,不返回到【待减员】);</div>*/}
|
{/*<div>2、【停缴员工】点击取消停缴,数据会回退到上次的位置(从【待减员】减员到停缴员工的,点击停缴返回到【在缴员工】,不返回到【待减员】);</div>*/}
|
||||||
{/*<div>3、若员工的社保福利从一个个税扣缴义务人下转到另一个个税扣缴义务人下去缴纳,则在转后的个税扣缴义务人的【待增员】中进行增员操作成功后,员工进入待【在缴员工】,而在原个税扣缴义务人下的【停缴员工】中,该员工数据将会被删除;是否开启分权员工的档案数据都只保存一份;</div>*/}
|
{/*<div>3、若员工的社保福利从一个个税扣缴义务人下转到另一个个税扣缴义务人下去缴纳,则在转后的个税扣缴义务人的【待增员】中进行增员操作成功后,员工进入待【在缴员工】,而在原个税扣缴义务人下的【停缴员工】中,该员工数据将会被删除;是否开启分权员工的档案数据都只保存一份;</div>*/}
|
||||||
</div>;
|
</div>;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return dom;
|
return dom;
|
||||||
};
|
};
|
||||||
|
|
@ -584,7 +611,8 @@ export default class Archives extends React.Component {
|
||||||
dataSource: dataSourceActive,
|
dataSource: dataSourceActive,
|
||||||
pageInfo,
|
pageInfo,
|
||||||
tabCount,
|
tabCount,
|
||||||
loading
|
loading,
|
||||||
|
importDialog
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const {
|
const {
|
||||||
form, condition, showSearchAd, setShowSearchAd,
|
form, condition, showSearchAd, setShowSearchAd,
|
||||||
|
|
@ -719,7 +747,7 @@ export default class Archives extends React.Component {
|
||||||
} type="ghost">
|
} type="ghost">
|
||||||
导出全部
|
导出全部
|
||||||
</Dropdown.Button>
|
</Dropdown.Button>
|
||||||
] : [
|
] : selectedKey === "stop" ? [
|
||||||
<WeaHelpfulTip
|
<WeaHelpfulTip
|
||||||
width={300}
|
width={300}
|
||||||
title={<CancelHelpfulDiv/>}
|
title={<CancelHelpfulDiv/>}
|
||||||
|
|
@ -733,6 +761,15 @@ export default class Archives extends React.Component {
|
||||||
} type="ghost">
|
} type="ghost">
|
||||||
导出全部
|
导出全部
|
||||||
</Dropdown.Button>
|
</Dropdown.Button>
|
||||||
|
] : [<Button type="primary"
|
||||||
|
onClick={() => this.setState(({
|
||||||
|
runStatus: "2",
|
||||||
|
importDialog: {
|
||||||
|
...importDialog,
|
||||||
|
visible: true, title: getLabel(111, "非系统人员导入"),
|
||||||
|
link: "/api/bs/hrmsalary/scheme/template/export?extWelArchiveList=true"
|
||||||
|
}
|
||||||
|
}))}>导入</Button>
|
||||||
];
|
];
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
@ -775,6 +812,7 @@ export default class Archives extends React.Component {
|
||||||
keyParam="viewcondition" //主键
|
keyParam="viewcondition" //主键
|
||||||
selectedKey={selectedKey}
|
selectedKey={selectedKey}
|
||||||
onChange={this.handleChangeTab}
|
onChange={this.handleChangeTab}
|
||||||
|
autoCalculateWidth
|
||||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||||
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
|
||||||
|
|
@ -807,7 +845,7 @@ export default class Archives extends React.Component {
|
||||||
xWidth={this.getColumns().length * 120}
|
xWidth={this.getColumns().length * 120}
|
||||||
/>
|
/>
|
||||||
{
|
{
|
||||||
!_.isEmpty(this.getColumns()) &&
|
!_.isEmpty(this.getColumns()) && selectedKey !== "ext" &&
|
||||||
<TipLabel>{this.getTipChildren()}</TipLabel>
|
<TipLabel>{this.getTipChildren()}</TipLabel>
|
||||||
}
|
}
|
||||||
</WeaNewScroll>
|
</WeaNewScroll>
|
||||||
|
|
@ -878,6 +916,36 @@ export default class Archives extends React.Component {
|
||||||
this.setState({ selectedTab: "0" });
|
this.setState({ selectedTab: "0" });
|
||||||
})}/>
|
})}/>
|
||||||
}
|
}
|
||||||
|
<ImportDialog
|
||||||
|
{...importDialog}
|
||||||
|
onCancel={(isFresh) => this.setState({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog,
|
||||||
|
visible: false, title: "", nextloading: false,
|
||||||
|
link: "", importResult: {}, imageId: ""
|
||||||
|
}
|
||||||
|
}, () => isFresh && this.query())}
|
||||||
|
onResetImportResult={() => this.setState(({
|
||||||
|
importDialog: { ...importDialog, importResult: {}, imageId: "" }
|
||||||
|
}))}
|
||||||
|
exportDataDom={
|
||||||
|
<WeaCheckbox content={getLabel(543208, "导出现有数据")}
|
||||||
|
value={getURLParameters(importDialog.link).exportData === "true" ? "1" : "0"}
|
||||||
|
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||||
|
onChange={val => {
|
||||||
|
const formParams = form.getFormParams() || {};
|
||||||
|
const payload = { exportData: val === "1", ...formParams };
|
||||||
|
this.setState(({
|
||||||
|
importDialog: {
|
||||||
|
...importDialog,
|
||||||
|
link: `/api/bs/hrmsalary/scheme/template/export?extWelArchiveList=true&${convertToUrlString(payload)}`
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
nextCallback={imageId => this.handleImport({ imageId })}
|
||||||
|
/>
|
||||||
{
|
{
|
||||||
this.state.importVisible && <ImportModal
|
this.state.importVisible && <ImportModal
|
||||||
init={() => {
|
init={() => {
|
||||||
|
|
|
||||||
|
|
@ -1,114 +1,10 @@
|
||||||
// 社保
|
|
||||||
export const socialSecurityColumns = [{
|
|
||||||
title: "方案名称",
|
|
||||||
dataIndex: "title",
|
|
||||||
key: "title"
|
|
||||||
}, {
|
|
||||||
title: "缴纳类型",
|
|
||||||
dataIndex: "username",
|
|
||||||
key: "username"
|
|
||||||
}, {
|
|
||||||
title: "缴纳范围",
|
|
||||||
dataIndex: "projectName",
|
|
||||||
key: "projectName"
|
|
||||||
}, {
|
|
||||||
title: "备注",
|
|
||||||
dataIndex: "customer",
|
|
||||||
key: "customer"
|
|
||||||
}, {
|
|
||||||
title: "操作",
|
|
||||||
dataIndex: "customer",
|
|
||||||
key: "customer"
|
|
||||||
}];
|
|
||||||
|
|
||||||
// 公积金
|
|
||||||
export const accumulationFundColumns = [{
|
|
||||||
title: "方案名称",
|
|
||||||
dataIndex: "title",
|
|
||||||
key: "title"
|
|
||||||
}, {
|
|
||||||
title: "缴纳类型",
|
|
||||||
dataIndex: "username",
|
|
||||||
key: "username"
|
|
||||||
}, {
|
|
||||||
title: "缴纳范围",
|
|
||||||
dataIndex: "projectName",
|
|
||||||
key: "projectName"
|
|
||||||
}, {
|
|
||||||
title: "备注",
|
|
||||||
dataIndex: "customer",
|
|
||||||
key: "customer"
|
|
||||||
}, {
|
|
||||||
title: "操作",
|
|
||||||
dataIndex: "customer",
|
|
||||||
key: "customer"
|
|
||||||
}];
|
|
||||||
|
|
||||||
// 企业年金及其他福利
|
|
||||||
export const otherBenefitsColumns = [
|
|
||||||
{
|
|
||||||
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 CustomBenefitsColumns = [
|
|
||||||
{
|
|
||||||
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 insertUpdateColumns = [
|
export const insertUpdateColumns = [
|
||||||
{
|
{
|
||||||
title: "类型名称",
|
title: "类型名称",
|
||||||
dataIndex: "insuranceName",
|
dataIndex: "insuranceName",
|
||||||
key: "insuranceName",
|
key: "insuranceName",
|
||||||
width: 120,
|
width: 120,
|
||||||
fixed: 'left'
|
fixed: "left"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否缴费",
|
title: "是否缴费",
|
||||||
|
|
@ -172,8 +68,39 @@ export const insertUpdateColumns = [
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const conditons = [
|
||||||
export const dataSource = [];
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["schemeName"],
|
||||||
|
fieldcol: 12,
|
||||||
|
isQuickSearch: true,
|
||||||
|
label: "方案名称",
|
||||||
|
lanId: 33162,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 2,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["paymentTypeEnum"],
|
||||||
|
fieldcol: 12,
|
||||||
|
isQuickSearch: true,
|
||||||
|
label: "缴纳类型",
|
||||||
|
lanId: 543163,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
options: [],
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: "",
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,11 @@ export default class DefaultSlideForm extends React.Component {
|
||||||
key: "2",
|
key: "2",
|
||||||
selected: true,
|
selected: true,
|
||||||
showname: "2"
|
showname: "2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "3",
|
||||||
|
selected: false,
|
||||||
|
showname: "3"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
item.render = (text, record) => {
|
item.render = (text, record) => {
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from "mobx";
|
import { toJS } from "mobx";
|
||||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||||
import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTab, WeaTools, WeaTop } from "ecCom";
|
||||||
import { renderNoright } from "../../../util";
|
import { getSearchs, renderNoright } from "../../../util";
|
||||||
import CustomTab from "../../../components/customTab";
|
|
||||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||||
import TipLabel from "../../../components/TipLabel";
|
import TipLabel from "../../../components/TipLabel";
|
||||||
import DefaultSlideForm from "./defaultSlideForm";
|
import DefaultSlideForm from "./defaultSlideForm";
|
||||||
|
|
@ -14,8 +13,10 @@ import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||||
import TwoColContent from "../../../components/twoColContent";
|
import TwoColContent from "../../../components/twoColContent";
|
||||||
import CopySchemaModal from "./copySchemaModal";
|
import CopySchemaModal from "./copySchemaModal";
|
||||||
import CustomBenefitsTable from "./customBenefitsTable";
|
import CustomBenefitsTable from "./customBenefitsTable";
|
||||||
|
import { conditons } from "./columns";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
const getKey = WeaTools.getKey;
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
|
@inject("programmeStore", "taxAgentStore", "salaryFileStore")
|
||||||
@observer
|
@observer
|
||||||
|
|
@ -30,7 +31,8 @@ export default class Programme extends React.Component {
|
||||||
copyModalValue: "",
|
copyModalValue: "",
|
||||||
copyId: "",
|
copyId: "",
|
||||||
customNewVisible: false,
|
customNewVisible: false,
|
||||||
customEdit: false
|
customEdit: false,
|
||||||
|
showSearchAd: false
|
||||||
};
|
};
|
||||||
|
|
||||||
this.pageInfo = { current: 1, pageSize: 10 };
|
this.pageInfo = { current: 1, pageSize: 10 };
|
||||||
|
|
@ -38,12 +40,29 @@ export default class Programme extends React.Component {
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { programmeStore, salaryFileStore, taxAgentStore } = this.props;
|
const { programmeStore, salaryFileStore, taxAgentStore } = this.props;
|
||||||
const { doInit } = programmeStore;
|
const { doInit, planSearchForm } = programmeStore;
|
||||||
doInit();
|
doInit();
|
||||||
const { commonEnumList } = salaryFileStore;
|
const { commonEnumList } = salaryFileStore;
|
||||||
commonEnumList("user", { enumClass: "com.engine.salary.enums.sicategory.SharedTypeEnum" });
|
commonEnumList("user", { enumClass: "com.engine.salary.enums.sicategory.SharedTypeEnum" });
|
||||||
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||||
getTaxAgentSelectListAsAdmin();
|
getTaxAgentSelectListAsAdmin();
|
||||||
|
planSearchForm.initFormFields(_.map(conditons, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, o => {
|
||||||
|
if (getKey(o) === "paymentTypeEnum") {
|
||||||
|
return {
|
||||||
|
...o,
|
||||||
|
options: [
|
||||||
|
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
|
||||||
|
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...o };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 增加编辑功能,重写columns绑定事件
|
// 增加编辑功能,重写columns绑定事件
|
||||||
|
|
@ -173,6 +192,7 @@ export default class Programme extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { showSearchAd } = this.state;
|
||||||
const { programmeStore, taxAgentStore: { showOperateBtn } } = this.props;
|
const { programmeStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||||
const { loading, hasRight, form, getTableDatas } = programmeStore;
|
const { loading, hasRight, form, getTableDatas } = programmeStore;
|
||||||
const {
|
const {
|
||||||
|
|
@ -187,7 +207,8 @@ export default class Programme extends React.Component {
|
||||||
customNewVisible,
|
customNewVisible,
|
||||||
tableDataSource,
|
tableDataSource,
|
||||||
tableColumns,
|
tableColumns,
|
||||||
tablePageInfo
|
tablePageInfo,
|
||||||
|
planSearchForm
|
||||||
} = programmeStore;
|
} = programmeStore;
|
||||||
if (!hasRight && !loading) return renderNoright();
|
if (!hasRight && !loading) return renderNoright();
|
||||||
|
|
||||||
|
|
@ -317,59 +338,65 @@ export default class Programme extends React.Component {
|
||||||
const { programmeStore: { initSlideParms } } = this.props;
|
const { programmeStore: { initSlideParms } } = this.props;
|
||||||
initSlideParms();
|
initSlideParms();
|
||||||
};
|
};
|
||||||
|
const customButtons = [
|
||||||
|
<WeaSelect
|
||||||
|
options={options}
|
||||||
|
value={customSelectkey}
|
||||||
|
style={{ width: "150px" }}
|
||||||
|
onChange={v => {
|
||||||
|
setCustomSelectkey(v);
|
||||||
|
this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
];
|
||||||
|
const tabButtons = [
|
||||||
|
<Button type="primary" onClick={() => {
|
||||||
|
selectedKey === "custom" ? handleCustomNewClick() : handleNewClick();
|
||||||
|
}}>{getLabel(365, "新建")}</Button>
|
||||||
|
];
|
||||||
return (
|
return (
|
||||||
<div className="socialSecurityAndWelfareSchemeWrapper">
|
<div className="socialSecurityAndWelfareSchemeWrapper">
|
||||||
<WeaTop
|
<WeaTop
|
||||||
title="社保福利方案" // 文字
|
title="社保福利方案" icon={<i className="icon-coms-fa"/>}
|
||||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
iconBgcolor="#F14A2D" showDropIcon={false}
|
||||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
|
||||||
showDropIcon={false} // 是否显示下拉按钮
|
|
||||||
>
|
>
|
||||||
<CustomTab
|
<WeaTab
|
||||||
topTab={topTab}
|
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey}
|
||||||
searchOperationItem={
|
searchType={selectedKey !== "custom" ? ["base", "advanced"] : []}
|
||||||
<div>
|
showSearchAd={showSearchAd}
|
||||||
{/* 操作按钮权限 */}
|
setShowSearchAd={bool => this.setState({ showSearchAd: bool })}
|
||||||
{showOperateBtn &&
|
advanceHeight={200} searchsAd={getSearchs(planSearchForm, _.map(conditons, item => {
|
||||||
<Button
|
return {
|
||||||
type="primary"
|
...item,
|
||||||
style={{ marginRight: "10px" }}
|
items: _.map(item.items, o => {
|
||||||
onClick={() => {
|
if (getKey(o) === "paymentTypeEnum") {
|
||||||
if (selectedKey == "custom") {
|
return {
|
||||||
handleCustomNewClick();
|
...o,
|
||||||
} else {
|
options: [
|
||||||
handleNewClick();
|
{ key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
|
||||||
}
|
{ key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
|
||||||
}}>
|
]
|
||||||
新建
|
};
|
||||||
</Button>}
|
}
|
||||||
|
return { ...o };
|
||||||
{selectedKey == "custom" &&
|
})
|
||||||
<WeaSelect
|
};
|
||||||
options={options}
|
}), 2, false)}
|
||||||
value={customSelectkey}
|
onAdSearch={() => getTableDatas(selectedKey)}
|
||||||
style={{ width: "150px" }}
|
onAdReset={v => planSearchForm.resetForm()}
|
||||||
onChange={v => {
|
onSearch={() => getTableDatas(selectedKey)}
|
||||||
setCustomSelectkey(v);
|
|
||||||
this.customBenefitsTableRef.getCustomCategoryList({ current: 1, welfareTypeEnum: v });
|
|
||||||
}}
|
|
||||||
/>}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
onChange={v => {
|
onChange={v => {
|
||||||
setSelectedKey(v);
|
setSelectedKey(v);
|
||||||
handleSlideClose();
|
handleSlideClose();
|
||||||
if (v == "custom") {
|
v !== "custom" && getTableDatas(v);
|
||||||
// 自定义福利
|
|
||||||
} else {
|
|
||||||
getTableDatas(v);
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
|
onSearchChange={v => planSearchForm.updateFields({ schemeName: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||||
|
searchsBaseValue={planSearchForm.getFormParams().schemeName}
|
||||||
|
buttons={!showOperateBtn ? [] : selectedKey !== "custom" ? tabButtons : [...tabButtons, ...customButtons]}
|
||||||
/>
|
/>
|
||||||
<div className="tableWrapper">
|
<div className="tableWrapper">
|
||||||
<WeaNewScroll height="100%">
|
<WeaNewScroll height="100%">
|
||||||
{selectedKey == "custom"
|
{selectedKey === "custom"
|
||||||
? <TwoColContent
|
? <TwoColContent
|
||||||
leftContent={
|
leftContent={
|
||||||
<CustomBenefitsTable
|
<CustomBenefitsTable
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ class AdjustTable extends Component {
|
||||||
dataSource: _.map(dataSource, (item, idx) => {
|
dataSource: _.map(dataSource, (item, idx) => {
|
||||||
if (index === idx) {
|
if (index === idx) {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item, adjustTo: "",
|
||||||
companyTotal: data[0].totalNum,
|
companyTotal: data[0].totalNum,
|
||||||
adjustToOptions: categoryType ? _.map(categoryType.split(","), tmpV => {
|
adjustToOptions: categoryType ? _.map(categoryType.split(","), tmpV => {
|
||||||
return _.find(item.categoryTypeOptions, tmpJ => tmpJ.key === tmpV);
|
return _.find(item.categoryTypeOptions, tmpJ => tmpJ.key === tmpV);
|
||||||
|
|
@ -330,7 +330,7 @@ class AdjustTable extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleClick = (record) => {
|
handleClick = (record) => {
|
||||||
const { status, id, paymentOrganization, billMonth } = record;
|
const { status, id, paymentOrganization, billMonth, employeeId } = record;
|
||||||
const { targetOptions } = this.state;
|
const { targetOptions } = this.state;
|
||||||
if (status) {
|
if (status) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
|
|
@ -338,7 +338,8 @@ class AdjustTable extends Component {
|
||||||
content: "确定撤回吗?撤回后该笔调差将失效!",
|
content: "确定撤回吗?撤回后该笔调差将失效!",
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const payload = { id, paymentOrganization, billMonth };
|
const payload = { id, paymentOrganization, billMonth };
|
||||||
compensationBack(payload).then(({ status, data, errormsg }) => {
|
compensationBack(payload).then(async ({ status, data, errormsg }) => {
|
||||||
|
const { data: categoryTypeOptions } = await compensationCategoryType({ id: _.find(targetOptions, child => child.employeeId == employeeId).target });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success(data || "撤回成功");
|
message.success(data || "撤回成功");
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
@ -347,7 +348,11 @@ class AdjustTable extends Component {
|
||||||
return {
|
return {
|
||||||
...it,
|
...it,
|
||||||
status: false,
|
status: false,
|
||||||
uuid: new Date().getTime() + idx
|
uuid: new Date().getTime() + idx,
|
||||||
|
categoryTypeOptions: _.map(categoryTypeOptions, child => ({
|
||||||
|
key: child.id,
|
||||||
|
showname: child.content
|
||||||
|
}))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return { ...it, uuid: new Date().getTime() + idx };
|
return { ...it, uuid: new Date().getTime() + idx };
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class AdjustmentSlide extends Component {
|
||||||
const { data: dataMsg, errorMessage = [] } = data;
|
const { data: dataMsg, errorMessage = [] } = data;
|
||||||
const msg = dataMsg + errorMessage.join(",");
|
const msg = dataMsg + errorMessage.join(",");
|
||||||
!_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || "保存成功");
|
!_.isEmpty(errorMessage) ? message.error(msg) : message.success(msg || "保存成功");
|
||||||
_.isEmpty(errorMessage) &&
|
// _.isEmpty(errorMessage) &&
|
||||||
this.adjustTableRef.getCompensationList().then(r => {
|
this.adjustTableRef.getCompensationList().then(r => {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,6 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
|
|
||||||
.wea-new-top-req-wapper .wea-new-top-req-main {
|
|
||||||
background: #f6f6f6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wea-new-top-req-wapper .wea-new-top-req {
|
.wea-new-top-req-wapper .wea-new-top-req {
|
||||||
z-index: 0 !important;
|
z-index: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ export class ArchivesStore {
|
||||||
API.importBatch(params).then(res => {
|
API.importBatch(params).then(res => {
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
this.importResult = res.data;
|
this.importResult = res.data;
|
||||||
resolve();
|
resolve(res);
|
||||||
} else {
|
} else {
|
||||||
message.error(res.errormsg || "导入失败", 1);
|
message.error(res.errormsg || "导入失败", 1);
|
||||||
reject();
|
reject();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { observable } from "mobx";
|
import { action, observable } from "mobx";
|
||||||
import { WeaForm } from "comsMobx";
|
import { WeaForm } from "comsMobx";
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -10,4 +10,15 @@ export class AttendanceStore {
|
||||||
@observable reportForm = new WeaForm();
|
@observable reportForm = new WeaForm();
|
||||||
//报表查看 统计数据范围及规则设置form
|
//报表查看 统计数据范围及规则设置form
|
||||||
@observable settingForm = new WeaForm();
|
@observable settingForm = new WeaForm();
|
||||||
|
//报表查看 分享报表
|
||||||
|
@observable shareForm = new WeaForm();
|
||||||
|
@observable shareLogForm = new WeaForm();
|
||||||
|
@observable sharePerForm = new WeaForm();
|
||||||
|
|
||||||
|
@action("报表查看-分享报表表单初始化")
|
||||||
|
initShareForm = () => this.shareForm = new WeaForm();
|
||||||
|
@action("报表查看-查看分享记录详情表单初始化")
|
||||||
|
initShareLogForm = () => this.shareLogForm = new WeaForm();
|
||||||
|
@action("报表查看-追加被分享人表单初始化")
|
||||||
|
initSharePerForm = () => this.sharePerForm = new WeaForm();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,34 @@ export class MySalaryStore {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@action initRecordData = async (payload) => {
|
||||||
|
this.clear();
|
||||||
|
//1.check is need second verify
|
||||||
|
if (window.doCheckSecondaryVerify4ec) {
|
||||||
|
window.doCheckSecondaryVerify4ec({ mouldCode: "HRM", itemCode: "SALARY" }, (data) => this.getRecordData({
|
||||||
|
...data, payload
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
//4.loaddata
|
||||||
|
this.getRecordData({ status: "1", token: "", payload });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@action
|
||||||
|
getRecordData = async (params = {}) => {
|
||||||
|
if (_.isEmpty(params)) return;
|
||||||
|
const { status, payload, token } = params;
|
||||||
|
if (status == "1") {
|
||||||
|
// Object.assign(this._reqParams, { token });
|
||||||
|
// this.getFormData({ viewAttr: 1 });
|
||||||
|
this.hasRight = true;
|
||||||
|
this.getRecordList(payload);
|
||||||
|
} else {
|
||||||
|
this.hasRight = false;
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
};
|
||||||
|
|
||||||
@action
|
@action
|
||||||
getRecordList = (params = {}) => {
|
getRecordList = (params = {}) => {
|
||||||
API.recordList(params).then(res => {
|
API.recordList(params).then(res => {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ import { notNull } from "../util/validate";
|
||||||
const { TableStore } = WeaTableNew;
|
const { TableStore } = WeaTableNew;
|
||||||
|
|
||||||
export class ProgrammeStore {
|
export class ProgrammeStore {
|
||||||
|
//lys-表单初始化(方案查询表单)
|
||||||
|
@observable planSearchForm = new WeaForm();
|
||||||
|
|
||||||
|
|
||||||
@observable tableStore = new TableStore(); // new table
|
@observable tableStore = new TableStore(); // new table
|
||||||
@observable condition = []; // 存储后台得到的form数据
|
@observable condition = []; // 存储后台得到的form数据
|
||||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||||
|
|
@ -94,20 +98,18 @@ export class ProgrammeStore {
|
||||||
@action
|
@action
|
||||||
getTableDatas = (selectKey = "SOCIAL_SECURITY", params) => {
|
getTableDatas = (selectKey = "SOCIAL_SECURITY", params) => {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const formParams = this.form.getFormParams() || {};
|
API.getTable({ ...params, ...this.planSearchForm.getFormParams(), welfareTypeEnum: selectKey })
|
||||||
params = params || formParams;
|
.then(action(res => {
|
||||||
params.welfareTypeEnum = selectKey;
|
if (res.status) { // 接口请求成功/失败处理
|
||||||
API.getTable(params).then(action(res => {
|
// this.tableStore.getDatas(res.data.datas); // table 请求数据
|
||||||
if (res.status) { // 接口请求成功/失败处理
|
this.tableDataSource = res.data.list ? res.data.list : [];
|
||||||
// this.tableStore.getDatas(res.data.datas); // table 请求数据
|
this.tableColumns = res.data.columns;
|
||||||
this.tableDataSource = res.data.list ? res.data.list : [];
|
this.tablePageInfo = res.data;
|
||||||
this.tableColumns = res.data.columns;
|
} else {
|
||||||
this.tablePageInfo = res.data;
|
message.error(res.errormsg || "接口调用失败!");
|
||||||
} else {
|
}
|
||||||
message.error(res.errormsg || "接口调用失败!");
|
this.loading = false;
|
||||||
}
|
}));
|
||||||
this.loading = false;
|
|
||||||
}));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import { notNull } from "../util/validate";
|
||||||
const { TableStore } = WeaTableNew;
|
const { TableStore } = WeaTableNew;
|
||||||
|
|
||||||
export class SalaryItemStore {
|
export class SalaryItemStore {
|
||||||
|
@observable salarySetform = new WeaForm(); //同步薪资账套form
|
||||||
|
|
||||||
@observable tableStore = new TableStore(); // new table
|
@observable tableStore = new TableStore(); // new table
|
||||||
@observable sysListTableStore = new TableStore();
|
@observable sysListTableStore = new TableStore();
|
||||||
@observable form = new WeaForm(); // nrew 一个form
|
@observable form = new WeaForm(); // nrew 一个form
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
// export const getQueryString = (name) => {
|
export const getURLParameters = (url) =>
|
||||||
// let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
(url.match(/([^?=&]+)(=([^&]*))/g) || []).reduce(
|
||||||
// let r = window.location.hash.split("?")[1].match(reg);
|
(a, v) => (
|
||||||
// if (r != null) {
|
(a[v.slice(0, v.indexOf("="))] = v.slice(v.indexOf("=") + 1)), a
|
||||||
// return decodeURIComponent(r[2]);
|
),
|
||||||
// };
|
{}
|
||||||
// return null;
|
);
|
||||||
// }
|
|
||||||
|
|
||||||
export const getQueryString = (variable) => {
|
export const getQueryString = (variable) => {
|
||||||
let split = window.location.hash.split("?");
|
let split = window.location.hash.split("?");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue