Merge branch 'release/2.19.1.2501.01-个税' into custom-昂立个税
# Conflicts: # pc4mobx/hrmSalary/index.js # pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js
This commit is contained in:
commit
57ddde15bf
|
|
@ -95,7 +95,10 @@ export const comparisonresultList = (params) => {
|
|||
export const refreshTaxAgent = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/refreshTaxAgent", params);
|
||||
};
|
||||
|
||||
// 核算人员--刷新薪资核算人员的
|
||||
export const refreshAcctemployee = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctemployee/refresh", params);
|
||||
};
|
||||
// 薪资核算-编辑表单
|
||||
export const acctresultDetail = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/detail", "GET", params);
|
||||
|
|
@ -215,8 +218,9 @@ export const exportComparisonResult = (salaryAcctRecordId) => {
|
|||
};
|
||||
|
||||
// 核算进度条
|
||||
export const getCalculateProgress = (id) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_" + id, "get", {});
|
||||
export const getCalculateProgress = (id = "", paymentOrganization = "") => {
|
||||
const extra= paymentOrganization ? `_${paymentOrganization}` : paymentOrganization
|
||||
return WeaTools.callApi(`/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_${id}${extra}`, "get", {});
|
||||
};
|
||||
|
||||
// 核算进度条
|
||||
|
|
@ -232,6 +236,10 @@ export const updateLockStatus = (params) => {
|
|||
export const updateLockEmpStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/lockEmp", params);
|
||||
};
|
||||
// 单元格锁定
|
||||
export const updateLockEmpCellStatus = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/lock", params);
|
||||
};
|
||||
// 导入薪资核算添加表头字段缓存
|
||||
export const cacheImportField = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", params);
|
||||
|
|
@ -270,6 +278,10 @@ export const deleteExportTemplate = (params) => {
|
|||
export const getExportTemplateForm = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/getExportTemplateForm", params);
|
||||
};
|
||||
//薪资审批-薪资核算页面获取审批信息
|
||||
export const getApprovalInfoByRecordId = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/salaryApproval/getApprovalInfoByRecordId", "GET", params);
|
||||
};
|
||||
//薪资核算-薪资项目改变否
|
||||
export const getCompareSobConfig = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/compareSobConfig", "GET", params);
|
||||
|
|
|
|||
|
|
@ -283,3 +283,28 @@ export const getTaxdeclarationContrastList = (params) => {
|
|||
export const exportContrast = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportContrast", params);
|
||||
};
|
||||
|
||||
//扣除名单确认-人员列表
|
||||
export const getDeductionAmountList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/list", params);
|
||||
};
|
||||
//扣除名单确认-增加人员
|
||||
export const addDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/add", params);
|
||||
};
|
||||
//扣除名单确认-删除人员
|
||||
export const deleteDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/delete", params);
|
||||
};
|
||||
//扣除名单确认-编辑人员
|
||||
export const editDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/edit", params);
|
||||
};
|
||||
//扣除名单确认-确认人员
|
||||
export const confirmDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/confirm", params);
|
||||
};
|
||||
//扣除名单确认-反馈人员
|
||||
export const feedbackDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/feedback", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@ export const deleteLedgerPersonExtRange = params => {
|
|||
export const saveLedgerPersonRange = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/save", params);
|
||||
};
|
||||
//编辑薪资帐套人员范围
|
||||
export const editLedgerPersonRange = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/edit", params);
|
||||
};
|
||||
|
||||
//删除薪资帐套人员范围
|
||||
export const deleteLedgerPersonRange = params => {
|
||||
|
|
@ -187,6 +191,18 @@ export const saveTaxMapping = params => {
|
|||
export const getSalaryItemForm = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/item/getSalaryItemForm", params);
|
||||
};
|
||||
//薪资核算规则配置-获取薪资审批规则表单
|
||||
export const getSalaryApprovalForm = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/salaryApproval/getForm", params);
|
||||
};
|
||||
//薪资核算规则配置-保存薪资审批规则表单
|
||||
export const salaryApprovalSaveForm = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/salaryApproval/saveForm", params);
|
||||
};
|
||||
//薪资核算规则配置-获取能够添加的项目
|
||||
export const getListSalaryItem = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/salaryApproval/listSalaryItem", params);
|
||||
};
|
||||
//薪资账套-获取薪资账套中拓扑图数据
|
||||
export const getSalaryItemTopology = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/item/topology", params);
|
||||
|
|
|
|||
|
|
@ -45,12 +45,14 @@ export const doSecondAuth = (params, headers) => {
|
|||
export const getPasswordForm = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
|
||||
};
|
||||
export const checkPassword = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||
export const checkPassword = (params, headers) => {
|
||||
return formHeaderPost("/api/hrm/secondarypwd/checkPassword", "POST", params, headers);
|
||||
// return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||
};
|
||||
export const saveSecondaryPwd = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
|
||||
export const saveSecondaryPwd = (params, headers) => {
|
||||
return formHeaderPost("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params, headers);
|
||||
// return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
|
||||
};
|
||||
export const salaryBillGetToken = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/getToken", "GET", params);
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/getToken", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -210,18 +210,26 @@ export const payrollCheckType = params => {
|
|||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
||||
};
|
||||
//工资单-反馈验证
|
||||
export const feedBackSalaryBill = params => {
|
||||
export const feedBackSalaryBill = async params => {
|
||||
const { header, ...payload } = params;
|
||||
return fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, {
|
||||
const res = await fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: { "Content-Type": "application/json", ...header }
|
||||
}).then(res => res.json());
|
||||
});
|
||||
return await res.json();
|
||||
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
|
||||
};
|
||||
//工资单-确认
|
||||
export const confirmSalaryBill = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
|
||||
export const confirmSalaryBill = async params => {
|
||||
const { header, ...payload } = params;
|
||||
const res = await fetch(`/api/bs/hrmsalary/salaryBill/confirmSalaryBill?${convertToUrlString(payload)}`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: { "Content-Type": "application/json", ...header }
|
||||
});
|
||||
return await res.json();
|
||||
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
|
||||
};
|
||||
|
||||
// 工资单基础设置-获取设置列表
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ export const recessionList = (params) => {
|
|||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
|
||||
};
|
||||
//查询补差列表
|
||||
export const balanceList = (params) => {
|
||||
export const balanceList = (params, ids) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
|
||||
};
|
||||
//删除退差数据
|
||||
|
|
|
|||
|
|
@ -134,3 +134,27 @@ export const getSalaryListSum = (params) => {
|
|||
export const exportSalaryList = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", params);
|
||||
};
|
||||
//薪酬统计报表-保存全局自定义列配置
|
||||
export const savePageListSetting = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/save/setting", params);
|
||||
};
|
||||
//薪酬统计报表-保存页面模板
|
||||
export const savePageListTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/template/save", params);
|
||||
};
|
||||
// 薪酬统计报表-导出模板示例下载
|
||||
export const downloadPageListTemplate = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/common/pageList/template/file/download", params);
|
||||
};
|
||||
//薪酬统计报表-获取页面模板
|
||||
export const getPageListTemplatelist = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/template/list", params);
|
||||
};
|
||||
//薪酬统计报表-切换个体页面模板
|
||||
export const changePageListTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/template/change", params);
|
||||
};
|
||||
//薪酬统计报表-删除模板
|
||||
export const deleteTemplatePageList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/template/delete", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ export const deleteTaxAgent = (params) => {
|
|||
export const taxAgentRangeSave = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/save", params);
|
||||
};
|
||||
//编辑人员范围
|
||||
export const taxAgentRangeEdit = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/edit", params);
|
||||
};
|
||||
//非系统人员范围查询
|
||||
export const taxAgentRangelistExt = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/listExt", params);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
|
||||
//浮动薪酬项目列表
|
||||
export const getVariableSalaryItemList = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalaryItem/listPage", params);
|
||||
};
|
||||
//删除浮动薪酬项目
|
||||
export const deleteVariableSalaryItem = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalaryItem/delete", params);
|
||||
};
|
||||
//获取浮动薪酬项目详情
|
||||
export const getVariableSalaryItemDetail = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalaryItem/getDetail", params);
|
||||
};
|
||||
//保存/更新 浮动薪酬项目
|
||||
export const saveVariableSalaryItem = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalaryItem/save", params);
|
||||
};
|
||||
|
||||
//创建浮动薪酬档案时获取项目信息
|
||||
export const getCreateForm = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalary/getCreateForm", params);
|
||||
};
|
||||
//创建浮动薪酬档案
|
||||
export const createVariableSalary = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalary/createData", params);
|
||||
};
|
||||
//创建浮动薪酬档案
|
||||
export const getVariableSalaryList = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalary/list", params);
|
||||
};
|
||||
//导入浮动薪酬档案
|
||||
export const importVariableSalary = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalary/importData", params);
|
||||
};
|
||||
//删除浮动薪酬档案
|
||||
export const deleteVariableSalary = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalary/deleteSelectData", params);
|
||||
};
|
||||
//获取浮动薪酬档案明细
|
||||
export const getVariableSalaryDetail = params => {
|
||||
return postFetch("/api/bs/hrmsalary/variableSalary/getDetail", params);
|
||||
};
|
||||
// 获取当前管理员下的所有的个税扣缴义务人
|
||||
export const getAdminTaxAgentList = () => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectList", "GET", { isShare: false });
|
||||
};
|
||||
// 浮动薪酬档案导出
|
||||
export const exportVariableSalary = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/variableSalary/export", params);
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* 自定义浏览框组件
|
||||
* 单选
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/9/3
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import AssociativeSearchMult from "./associativeSearchMult";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class AssociativeSearchSingle extends Component {
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
<AssociativeSearchMult {...this.props}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default AssociativeSearchSingle;
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
* 自定义浏览框组件
|
||||
* 多选
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/29
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Button, Icon, Select } from "antd";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import classNames from "classnames";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const Option = Select.Option;
|
||||
|
||||
class AssociativeSearchMult extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, data: [], activeKey: "", dropdownWidth: 200
|
||||
};
|
||||
this.selectedData = {};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { dropdownWidth } = this.state;
|
||||
const w = $(this.refs.searchWrapperMui).outerWidth();
|
||||
if (dropdownWidth < w) {
|
||||
this.setState({ dropdownWidth: w });
|
||||
}
|
||||
}
|
||||
|
||||
handleSearch = (value) => {
|
||||
this.setState({ loading: true });
|
||||
this.getData(value);
|
||||
};
|
||||
getData = (name = "") => {
|
||||
const { browserConditionParam } = this.props;
|
||||
const {
|
||||
completeURL, filterByName, searchParamsKey, convertDatasource, dataParams = {}
|
||||
} = browserConditionParam;
|
||||
if (_.trim(name)) {
|
||||
let payload = { ...dataParams };
|
||||
searchParamsKey && (payload = { ...payload, [searchParamsKey]: name, current: 1, pageSize: 9999 });
|
||||
postFetch(completeURL, payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && data.list) {
|
||||
this.setState({
|
||||
data: convertDatasource ? convertDatasource(data.list) : data.list,
|
||||
activeKey: this.getActiveKey(convertDatasource ? convertDatasource(data.list) : data.list)
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
data: filterByName ? _.filter(_.map(data, o => ({
|
||||
...o, id: String(o.id), name: o.name
|
||||
})), k => k.name.indexOf(name) !== -1) : _.map(data, o => ({ ...o, id: String(o.id), name: o.name })),
|
||||
activeKey: this.getActiveKey(data)
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({ data: [], loading: false, activeKey: "" });
|
||||
}
|
||||
};
|
||||
getActiveKey = (data) => {
|
||||
const { selectedValues = [] } = this.props;
|
||||
let v = "";
|
||||
if (data && data.length > 0) {
|
||||
let target = data.filter((d) => selectedValues.indexOf(d.id) === -1);
|
||||
if (!_.isEmpty(target)) v = String(target[0].id);
|
||||
}
|
||||
return v;
|
||||
};
|
||||
getItemById = (id) => {
|
||||
const { data } = this.state, { datas } = this.props;
|
||||
if (datas[id]) return datas[id];
|
||||
if (!_.isEmpty(data)) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (id === data[i].id) return data[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
handleChange = (values) => {
|
||||
this.selectedData = {};
|
||||
values.forEach((v) => {
|
||||
let item = this.getItemById(v);
|
||||
if (item) this.selectedData[v] = item;
|
||||
});
|
||||
this.props.onChange && this.props.onChange(values, this.selectedData);
|
||||
this.setState({ activeKey: "" });
|
||||
};
|
||||
handleBlur = () => this.setState({ data: [], activeKey: "" });
|
||||
handleClick = (e) => {
|
||||
e && e.preventDefault();
|
||||
const { datas, selectedValues } = this.props;
|
||||
if (this.props.clickCallback) this.props.clickCallback(selectedValues, datas);
|
||||
};
|
||||
isReadOnly = () => {
|
||||
const { viewAttr } = this.props;
|
||||
return viewAttr === 1 || viewAttr === "1";
|
||||
};
|
||||
|
||||
render() {
|
||||
const { data, dropdownWidth } = this.state;
|
||||
const { viewAttr, selectedValues, datas, isSingle, browserConditionParam = {} } = this.props;
|
||||
const clsname = classNames({
|
||||
"required": (viewAttr === 3 || viewAttr === "3") && _.isEmpty(selectedValues),
|
||||
"mr12": viewAttr === "3" && _.isEmpty(selectedValues),
|
||||
"wea-associative-single": (isSingle || browserConditionParam.isSingle),
|
||||
"wea-associative-search-mult": !(isSingle || browserConditionParam.isSingle)
|
||||
});
|
||||
if (this.isReadOnly()) {
|
||||
let arr = [];
|
||||
selectedValues && selectedValues.map(v => {
|
||||
let item = datas[v].name;
|
||||
if (_.isString(item)) {
|
||||
arr.push(<a className="child-item wdb">{item}</a>);
|
||||
} else {
|
||||
arr.push(<a className="child-item wdb" dangerouslySetInnerHTML={{ __html: item }}> </a>);
|
||||
}
|
||||
});
|
||||
return (
|
||||
<span className={`wea-associative-search wea-field-readonly ${clsname} `} ref="searchWrapperMui">{arr}</span>
|
||||
);
|
||||
}
|
||||
let options = data.map(d => <Option key={d.id} title={d.name}>{d.name}</Option>);
|
||||
selectedValues && selectedValues.map((v) => {
|
||||
v && options.unshift(<Option key={v} title={datas[v].name}>{datas[v].name}</Option>);
|
||||
});
|
||||
const select = <Select
|
||||
{...this.props}
|
||||
hasScroll={false}
|
||||
hideSelected={true}
|
||||
transitionName=""
|
||||
animation=""
|
||||
multiple={true}
|
||||
notFoundContent=""
|
||||
defaultActiveFirstOption={true}
|
||||
showArrow={false}
|
||||
filterOption={false}
|
||||
defaultValue={selectedValues}
|
||||
value={selectedValues}
|
||||
dropdownStyle={{ minWidth: dropdownWidth }}
|
||||
onSearch={_.debounce(this.handleSearch, 400)}
|
||||
onChange={this.handleChange}
|
||||
onBlur={this.handleBlur}
|
||||
>
|
||||
{options}
|
||||
</Select>;
|
||||
return (
|
||||
<div className={`wea-associative-search ${clsname}`} ref="searchWrapperMui">
|
||||
{select}
|
||||
<Icon type="loading" style={{ display: this.state.loading ? "block" : "none" }}/>
|
||||
<div className="ant-input-group-wrap">
|
||||
<Button type="ghost" icon="search" onClick={this.handleClick}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default AssociativeSearchMult;
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* 自定义组件
|
||||
* 下拉树选择框
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/9/24
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { TreeSelect } from "antd";
|
||||
import classNames from "classnames";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class AssociativeTreeMult extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
data: []
|
||||
};
|
||||
this.selectedData = {};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { treeData } = this.props;
|
||||
this.setState({ data: this.filterTree(treeData) });
|
||||
}
|
||||
|
||||
handleChange = (values) => {
|
||||
this.selectedData = {};
|
||||
values.forEach((v) => {
|
||||
let item = this.getItemById(v);
|
||||
if (item) this.selectedData[v] = item;
|
||||
});
|
||||
this.props.onChange && this.props.onChange(values, this.selectedData);
|
||||
};
|
||||
getItemById = (id) => {
|
||||
const { data } = this.state, { datas } = this.props;
|
||||
if (datas[id]) return datas[id];
|
||||
if (!_.isEmpty(data)) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (id === data[i].id) return data[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
filterTree = (nodes) => {
|
||||
const selectableNodes = [];
|
||||
const recurse = (nodes) => {
|
||||
nodes.forEach((node) => {
|
||||
if (node.selectable) selectableNodes.push(node);
|
||||
if (node.children) recurse(node.children);
|
||||
});
|
||||
};
|
||||
recurse(nodes);
|
||||
return selectableNodes;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { viewAttr, selectedValues, datas, isSingle, treeData } = this.props;
|
||||
const clsname = classNames({
|
||||
"required": (viewAttr === 3 || viewAttr === "3") && _.isEmpty(selectedValues)
|
||||
});
|
||||
const tProps = {
|
||||
treeData,
|
||||
multiple: true,
|
||||
allowClear: false,
|
||||
treeCheckable: true,
|
||||
style: { width: "100%" },
|
||||
treeDefaultExpandAll: true,
|
||||
value: selectedValues,
|
||||
onChange: this.handleChange,
|
||||
dropdownMatchSelectWidth: true,
|
||||
dropdownStyle: { minWidth: 200, maxHeight: 280, overflowY: "auto" },
|
||||
getPopupContainer: (triggerNode) => triggerNode.parentNode
|
||||
};
|
||||
return (
|
||||
<span className={`${clsname}`} ref="treeSelectWrapperMui"><TreeSelect {...tProps} /></span>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default AssociativeTreeMult;
|
||||
|
|
@ -0,0 +1,299 @@
|
|||
/*
|
||||
* 自定义浏览框组件
|
||||
* 弹框选择
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/30
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTable, WeaTransfer } from "ecCom";
|
||||
import { Button, Col, Row, Spin } from "antd";
|
||||
import CustomBrowserMutiLeft from "./customBrowserMutiLeft";
|
||||
import CustomBrowserMutiRight from "./customBrowserMutiRight";
|
||||
import CustomBrowserOperation from "./customBrowserOperation";
|
||||
import { postFetch } from "../../../util/request";
|
||||
|
||||
const WeaTransferList = WeaTransfer.list;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class CustomBrowserDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, listDatas: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [],
|
||||
query: { [props.searchParamsKey]: "" }, singleFilterVal: "",
|
||||
leftListSelectedKeys: [], // 左侧table选择的keys
|
||||
leftListSelectedData: [], // 左侧table选择的数据
|
||||
rightCheckedKeys: [], //右侧选择的keys
|
||||
rightDatas: [] // 右侧展示的数据
|
||||
};
|
||||
this.selectedData = {};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.getData();
|
||||
this.setState({
|
||||
selectedRowKeys: nextProps.selectedValues,
|
||||
leftListSelectedData: _.values(nextProps.datas), rightDatas: _.values(nextProps.datas)
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, query: { [this.props.searchParamsKey]: "" },
|
||||
rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: []
|
||||
});
|
||||
this.selectedData = {};
|
||||
}
|
||||
}
|
||||
|
||||
getData = () => {
|
||||
const { pageInfo, query } = this.state;
|
||||
const { dialogType, completeURL, convertDatasource, dataParams = {} } = this.props;
|
||||
let payload = { ...dataParams, ...query };
|
||||
dialogType === "table" && (payload = { ...pageInfo, ...payload, ...query });
|
||||
this.setState({ loading: true });
|
||||
postFetch(completeURL, payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && data.list) {
|
||||
const { pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
listDatas: convertDatasource ? convertDatasource(data.list) : data.list,
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
} else {
|
||||
this.setState({ listDatas: _.map(data, o => ({ ...o, id: String(o.id) })) });
|
||||
}
|
||||
});
|
||||
};
|
||||
handleRowClick = record => {
|
||||
if (!this.props.isSingle) return;
|
||||
const values = [record.id];
|
||||
const selectedData = { [record["id"]]: record };
|
||||
this.props.onCancel();
|
||||
this.props.onChange && this.props.onChange(values, selectedData);
|
||||
};
|
||||
handleClear = () => {
|
||||
this.props.onCancel();
|
||||
this.props.onChange && this.props.onChange([], {});
|
||||
};
|
||||
handleOk = () => {
|
||||
const { selectedRowKeys, rightDatas } = this.state, { dialogType } = this.props;
|
||||
const convertSelectedRowKeys = dialogType !== "table" ? rightDatas.map((v) => v.id) : selectedRowKeys;
|
||||
convertSelectedRowKeys.forEach((v) => {
|
||||
let item = this.getItemById(v);
|
||||
if (item) this.selectedData[v] = item;
|
||||
});
|
||||
this.props.onChange && this.props.onChange(convertSelectedRowKeys, this.selectedData);
|
||||
this.props.onCancel && this.props.onCancel();
|
||||
};
|
||||
getItemById = (id) => {
|
||||
const { listDatas } = this.state;
|
||||
if (this.selectedData[id]) return this.selectedData[id];
|
||||
if (!_.isEmpty(listDatas)) {
|
||||
for (let i = 0; i < listDatas.length; i++) {
|
||||
if (String(id) === String(listDatas[i].id)) return listDatas[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
onLeftListCheck = (keys, datas) => {
|
||||
const { leftListSelectedData } = this.state;
|
||||
let targets = leftListSelectedData.concat(datas);
|
||||
targets = _.uniqBy(targets, "id");
|
||||
targets = targets.filter((t) => keys.indexOf(t["id"]) > -1);
|
||||
this.setState({ leftListSelectedKeys: keys, leftListSelectedData: targets });
|
||||
};
|
||||
onleftDoubleClick = (data) => {
|
||||
const { rightDatas } = this.state;
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(data),
|
||||
rightCheckedKeys: [],
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
};
|
||||
onRightDoubleClick = (key) => {
|
||||
const { rightDatas } = this.state;
|
||||
const newRightDatas = rightDatas.filter(item => String(item.id) !== key);
|
||||
this.setState({ rightDatas: newRightDatas, rightCheckedKeys: [] });
|
||||
};
|
||||
moveTo = (direction) => {
|
||||
const { rightDatas, rightCheckedKeys, listDatas, leftListSelectedData } = this.state;
|
||||
if (direction === "right") {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(leftListSelectedData),
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
} else if (direction === "left") {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.filter(item => !rightCheckedKeys.some(checkedKey => String(item.id) === checkedKey)),
|
||||
rightCheckedKeys: []
|
||||
});
|
||||
} else if (direction === "allToLeft") {
|
||||
this.setState({ rightDatas: [], rightCheckedKeys: [] });
|
||||
} else if (direction === "allToRight") {
|
||||
if (this.leftListAllActive()) {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(listDatas),
|
||||
rightCheckedKeys: [],
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
leftListAllActive = () => {
|
||||
const { rightDatas, listDatas } = this.state;
|
||||
let bool = true;
|
||||
if (_.isEmpty(listDatas)) bool = false;
|
||||
if (!_.isEmpty(listDatas) && !_.isEmpty(rightDatas)) {
|
||||
bool = listDatas.filter((l) => !rightDatas.some(r => l.id === r.id)).length !== 0;
|
||||
}
|
||||
return bool;
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { dialogType, searchParamsKey, isSingle } = this.props, {
|
||||
query, pageInfo, selectedRowKeys, singleFilterVal
|
||||
} = this.state;
|
||||
return (<div className="wea-hr-muti-dialog-title">
|
||||
<span>{getLabel(111, "数据选择")}</span>
|
||||
{
|
||||
dialogType === "table" ?
|
||||
<WeaInputSearch
|
||||
value={query[searchParamsKey]} style={{ width: 220 }}
|
||||
onChange={value => this.setState({ query: { ...query, [searchParamsKey]: value } })}
|
||||
onSearch={() => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current: 1 } }, () => {
|
||||
this.getData();
|
||||
selectedRowKeys.forEach((v) => {
|
||||
let item = this.getItemById(v);
|
||||
if (item) this.selectedData[v] = item;
|
||||
});
|
||||
});
|
||||
}}/> : isSingle ?
|
||||
<WeaInputSearch value={singleFilterVal} onChange={singleFilterVal => this.setState({ singleFilterVal })}/> :
|
||||
<div/>
|
||||
}
|
||||
</div>);
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
loading, listDatas, pageInfo, selectedRowKeys, query, leftListSelectedKeys, rightDatas, rightCheckedKeys,
|
||||
singleFilterVal
|
||||
} = this.state;
|
||||
const { dialogType, tableProps: { rowKey, columns }, isSingle, searchParamsKey } = this.props;
|
||||
const sheight = this.dialog ? this.dialog.state.height - 116 : 260;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.handleOk}
|
||||
disabled={dialogType !== "table" && _.isEmpty(rightDatas)}>{getLabel(111, "确 定")}</Button>,
|
||||
<Button type="ghost" onClick={this.handleClear}>{getLabel(111, "清 除")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>];
|
||||
let rightActive = false, leftActive = false, rightAllActive = false;
|
||||
if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true;
|
||||
if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true;
|
||||
if (rightDatas && rightDatas.length > 0) rightAllActive = true;
|
||||
let dom = <Spin spinning={loading}>
|
||||
<div className="wea-hr-muti-dialog">
|
||||
{
|
||||
!isSingle ? <React.Fragment>
|
||||
<div className="wea-hr-muti-input-left">
|
||||
<Row style={{ height: 35 }}>
|
||||
<Col span="24">
|
||||
<WeaInputSearch value={query[searchParamsKey]} onSearch={this.getData}
|
||||
onChange={value => this.setState({ query: { ...query, [searchParamsKey]: value } })}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<div>
|
||||
<WeaNewScroll height={this.dialog ? this.dialog.state.height - 51 : 260}>
|
||||
<CustomBrowserMutiLeft
|
||||
filterData={rightDatas}
|
||||
datas={listDatas}
|
||||
onDoubleClick={this.onleftDoubleClick}
|
||||
onClick={this.onLeftListCheck}
|
||||
selectedKeys={leftListSelectedKeys}
|
||||
/>
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
</div>
|
||||
<div className="wea-transfer-opration">
|
||||
<CustomBrowserOperation
|
||||
rightActive={rightActive}
|
||||
leftActive={leftActive}
|
||||
leftAllActive={this.leftListAllActive()}
|
||||
rightAllActive={rightAllActive}
|
||||
moveToRight={() => this.moveTo("right")}
|
||||
moveToLeft={() => this.moveTo("left")}
|
||||
moveAllToRight={() => this.moveTo("allToRight")}
|
||||
moveAllToLeft={() => this.moveTo("allToLeft")}
|
||||
/>
|
||||
</div>
|
||||
<div className="wea-hr-muti-input-right">
|
||||
<CustomBrowserMutiRight
|
||||
height={this.dialog ? this.dialog.state.height - 51 : 260}
|
||||
data={rightDatas} checkedKeys={rightCheckedKeys}
|
||||
checkedCb={rightCheckedKeys => this.setState({ rightCheckedKeys })}
|
||||
onDoubleClick={this.onRightDoubleClick}
|
||||
/>
|
||||
</div>
|
||||
</React.Fragment> :
|
||||
<WeaTransferList height={this.dialog ? this.dialog.state.height - 16 : 260} checkedKeys={[]}
|
||||
checkedCb={([id]) => this.handleRowClick(_.find(listDatas, item => item.id === id))}
|
||||
data={listDatas.filter((item) => item.name.indexOf(_.trim(singleFilterVal)) > -1)}/>
|
||||
}
|
||||
</div>
|
||||
</Spin>;
|
||||
if (dialogType === "table") {
|
||||
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.getData();
|
||||
selectedRowKeys.forEach((v) => {
|
||||
let item = this.getItemById(v);
|
||||
if (item) this.selectedData[v] = item;
|
||||
});
|
||||
});
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => {
|
||||
this.getData();
|
||||
selectedRowKeys.forEach((v) => {
|
||||
let item = this.getItemById(v);
|
||||
if (item) this.selectedData[v] = item;
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: selectedRowKeys => this.setState({ selectedRowKeys })
|
||||
};
|
||||
dom = <div className="wea-hr-muti-input-table">
|
||||
<WeaTable dataSource={listDatas} loading={loading} pagination={pagination} scroll={{ y: sheight }}
|
||||
onRowClick={this.handleRowClick} rowSelection={!isSingle ? rowSelection : null}
|
||||
rowKey={rowKey || "id"} columns={columns}/>
|
||||
</div>;
|
||||
}
|
||||
dialogType === "table" && isSingle && buttons.splice(0, 1);
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={this.renderTitle()}
|
||||
className="custom_browser_dialog" draggable={false} style={{
|
||||
width: 784, height: 460, minHeight: 200, minWidth: 380,
|
||||
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}} buttons={buttons}>{dom}</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomBrowserDialog;
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* 自定义浏览框组件
|
||||
* 选择框左边
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/30
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
let timeout = null;
|
||||
|
||||
class CustomBrowserMutiLeft extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.dataObj = {};
|
||||
}
|
||||
|
||||
onClick = (data) => {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
let { selectedKeys } = this.props;
|
||||
let keys = selectedKeys ? [...selectedKeys] : [];
|
||||
let datas = [];
|
||||
if (keys.indexOf(data.id) > -1) {
|
||||
keys = keys.filter((k) => k !== data.id);
|
||||
} else {
|
||||
keys.push(data.id);
|
||||
}
|
||||
keys.forEach((k) => this.dataObj[k] && datas.push(this.dataObj[k]));
|
||||
this.props.onClick && this.props.onClick(keys, datas);
|
||||
}, 200);
|
||||
};
|
||||
onDoubleClick = (data) => {
|
||||
clearTimeout(timeout);
|
||||
this.props.onDoubleClick && this.props.onDoubleClick([data]);
|
||||
};
|
||||
cls = (item) => {
|
||||
const { selectedKeys, filterData } = this.props;
|
||||
let cls = [];
|
||||
if (selectedKeys && selectedKeys.indexOf(item.id) > -1) {
|
||||
cls.push("selected");
|
||||
}
|
||||
if (filterData && filterData.filter((d) => d.id === item.id).length > 0) {
|
||||
cls.push("hide");
|
||||
}
|
||||
return cls.join(" ");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { datas, selectedKeys } = this.props;
|
||||
const list = datas.map(item => {
|
||||
this.dataObj[item.id] = item;
|
||||
return <li className={this.cls(item)} onClick={() => this.onClick(item)}
|
||||
onDoubleClick={() => this.onDoubleClick(item)}>
|
||||
<div className="item-wrap" style={{ fontSize: 12 }}> {item.name} </div>
|
||||
<div className="icon-wrap"/>
|
||||
<i className="icon-coms-Selected"/>
|
||||
</li>;
|
||||
});
|
||||
return (
|
||||
<div className="wea-crm-list">
|
||||
<ul className="wea-crm-list-wrapper">
|
||||
{list}
|
||||
</ul>
|
||||
{
|
||||
list.length === 0 &&
|
||||
<div className="empty-tip" style={{ color: "#2f2929", paddingTop: 30, textAlign: "center" }}>
|
||||
{getLabel(111, "没有可显示的数据")}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomBrowserMutiLeft;
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* 自定义浏览框组件
|
||||
* 选择框右边
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/30
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll } from "ecCom";
|
||||
import { Tree } from "antd";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const TreeNode = Tree.TreeNode;
|
||||
|
||||
let timeout = null;
|
||||
|
||||
class CustomBrowserMutiRight extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
key: ""
|
||||
};
|
||||
this.nodeIds = [];
|
||||
this.nodeObj = {};
|
||||
}
|
||||
|
||||
generateTreeNodes = () => {
|
||||
const { data } = this.props, { key } = this.state;
|
||||
const treeNodes = [];
|
||||
let showData = [...data];
|
||||
if (_.trim(key)) {
|
||||
showData = showData.filter((item) => {
|
||||
return item.name.indexOf(_.trim(key)) > -1;
|
||||
});
|
||||
}
|
||||
showData = _.uniqBy(showData, "id");
|
||||
this.nodeIds = [];
|
||||
this.nodeObj = {};
|
||||
showData.map((item) => {
|
||||
let title = (
|
||||
<div>
|
||||
<div className="item-wrap" style={{ whiteSpace: "normal" }}>
|
||||
<div className="item-top">
|
||||
<span style={{ marginRight: "5px" }}>{item.name}</span>
|
||||
</div>
|
||||
<div className="item-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
treeNodes.push(<TreeNode title={title} key={item["id"]} isLeaf={true}/>);
|
||||
this.nodeIds.push(item["id"]);
|
||||
this.nodeObj[item["id"]] = item;
|
||||
});
|
||||
return treeNodes;
|
||||
};
|
||||
handleSearchChange = (v) => this.setState({ key: v });
|
||||
checkHandler = (v) => {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
this.props.checkedCb && this.props.checkedCb(v);
|
||||
}, 200);
|
||||
};
|
||||
onDoubleClick = (key) => {
|
||||
clearTimeout(timeout);
|
||||
this.props.onDoubleClick && this.props.onDoubleClick(key);
|
||||
};
|
||||
onDragStart = (obj) => {
|
||||
clearTimeout(timeout);
|
||||
this.props.checkedCb && this.props.checkedCb([]);
|
||||
};
|
||||
onDrop = (obj) => {
|
||||
const dragNodes = obj.dragNodesKeys;
|
||||
const targetNode = obj.node.props.eventKey;
|
||||
const result = [];
|
||||
this.nodeIds.filter((item) => {
|
||||
return dragNodes.indexOf(String(item)) === -1;
|
||||
}).forEach((id) => {
|
||||
if (String(id) === targetNode) {
|
||||
dragNodes.forEach((drag) => {
|
||||
result.push(this.nodeObj[drag]);
|
||||
});
|
||||
}
|
||||
result.push(this.nodeObj[id]);
|
||||
});
|
||||
this.props.onDrag && this.props.onDrag(result);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { height, checkedKeys } = this.props;
|
||||
return (
|
||||
<div className="wea-transfer-right">
|
||||
<WeaInputSearch placeholder={getLabel(111, "请输入关键字搜索")} value={this.state.key}
|
||||
onSearchChange={_.debounce(this.handleSearchChange, 200)}/>
|
||||
<div>
|
||||
<WeaNewScroll height={height || 400}>
|
||||
<Tree className="transfer-tree" draggable multiple={true} async={true} selectable={true}
|
||||
onSelect={this.checkHandler} onDoubleClick={this.onDoubleClick} selectedKeys={checkedKeys}
|
||||
onDragStart={this.onDragStart} onDrop={this.onDrop}>
|
||||
{this.generateTreeNodes()}
|
||||
</Tree>
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomBrowserMutiRight;
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 自定义浏览框组件
|
||||
* 弹框操作栏
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/30
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class CustomBrowserOperation extends Component {
|
||||
render() {
|
||||
const {
|
||||
moveToLeft,
|
||||
moveToRight,
|
||||
leftArrowText,
|
||||
rightArrowText,
|
||||
leftActive,
|
||||
rightActive,
|
||||
className,
|
||||
leftAllActive,
|
||||
moveAllToLeft,
|
||||
rightAllActive,
|
||||
moveAllToRight
|
||||
} = this.props;
|
||||
|
||||
const moveToLeftButton = (
|
||||
<Button type="primary" size="small" disabled={!rightActive} onClick={moveToRight}>
|
||||
{<span><i className="icon-coms-Browse-box-Add-to"/></span>}
|
||||
</Button>
|
||||
);
|
||||
const moveToRightButton = (
|
||||
<Button type="primary" size="small" disabled={!leftActive} onClick={moveToLeft}>
|
||||
{<span><i className="icon-coms-Browse-box-delete"/></span>}
|
||||
</Button>
|
||||
);
|
||||
|
||||
const moveAllToLeftButton = (
|
||||
<Button type="primary" size="small" disabled={!leftAllActive} onClick={moveAllToRight}>
|
||||
{<span title={getLabel(111, "将当页数据全部添加到右侧已选列表")}><i className="icon-coms-right"/></span>}
|
||||
</Button>
|
||||
);
|
||||
const moveAllToRightButton = (
|
||||
<Button type="primary" size="small" disabled={!rightAllActive} onClick={moveAllToLeft}>
|
||||
{<span title={getLabel(111, "全部删除")}><i className="icon-coms-Browse-box-Delete-all"/></span>}
|
||||
</Button>
|
||||
);
|
||||
return (
|
||||
<div className={className}>
|
||||
{moveToLeftButton}
|
||||
{moveToRightButton}
|
||||
{moveAllToLeftButton}
|
||||
{moveAllToRightButton}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomBrowserOperation;
|
||||
|
|
@ -0,0 +1,245 @@
|
|||
/*
|
||||
* 自定义穿梭框组件
|
||||
* 弹框选择
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/30
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom";
|
||||
import { Button, Col, Row, Spin } from "antd";
|
||||
import CustomBrowserMutiLeft from "./customBrowserMutiLeft";
|
||||
import CustomBrowserMutiRight from "./customBrowserMutiRight";
|
||||
import CustomBrowserOperation from "./customBrowserOperation";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import "../index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class CustomTransferDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, listDatas: [], columns: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
query: props.searchParamsKey ? { [props.searchParamsKey]: "" } : {},
|
||||
leftListSelectedKeys: [], // 左侧table选择的keys
|
||||
leftListSelectedData: [], // 左侧table选择的数据
|
||||
rightCheckedKeys: [], //右侧选择的keys
|
||||
rightDatas: [] // 右侧展示的数据
|
||||
};
|
||||
this.selectedData = {};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.getData(true, nextProps);
|
||||
if (nextProps.datas) {
|
||||
this.setState({
|
||||
leftListSelectedData: _.values(nextProps.datas), rightDatas: _.values(nextProps.datas)
|
||||
});
|
||||
}
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({
|
||||
query: { [this.props.searchParamsKey]: "" }, selectedRowKeys: [],
|
||||
rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
});
|
||||
this.selectedData = {};
|
||||
}
|
||||
}
|
||||
|
||||
getData = (init = false, props) => {
|
||||
const { query, pageInfo } = this.state;
|
||||
const { completeURL, convertDatasource, dataParams = {}, dialogType } = props || this.props;
|
||||
let payload = { ...dataParams, ...query };
|
||||
dialogType === "table" && (payload = { ...payload, ...pageInfo });
|
||||
this.setState({ loading: true });
|
||||
postFetch(completeURL, payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && data.list) {
|
||||
const { pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
listDatas: convertDatasource ? convertDatasource(data.list) : data.list, columns: data.columns,
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
listDatas: convertDatasource ? convertDatasource(data).listDatas : [],
|
||||
leftListSelectedData: (init && convertDatasource) ? convertDatasource(data).checked : this.state.leftListSelectedData,
|
||||
rightDatas: (init && convertDatasource) ? convertDatasource(data).checked : this.state.rightDatas
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleOk = () => {
|
||||
const { rightDatas } = this.state;
|
||||
this.props.onChange && this.props.onChange(rightDatas);
|
||||
};
|
||||
onLeftListCheck = (keys, datas) => {
|
||||
const { leftListSelectedData } = this.state;
|
||||
let targets = leftListSelectedData.concat(datas);
|
||||
targets = _.uniqBy(targets, "id");
|
||||
targets = targets.filter((t) => keys.indexOf(t["id"]) > -1);
|
||||
this.setState({ leftListSelectedKeys: keys, leftListSelectedData: targets });
|
||||
};
|
||||
onleftDoubleClick = (data) => {
|
||||
const { rightDatas } = this.state;
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(data),
|
||||
rightCheckedKeys: [],
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
};
|
||||
onRightDoubleClick = (key) => {
|
||||
const { rightDatas } = this.state;
|
||||
const newRightDatas = rightDatas.filter(item => String(item.id) !== key);
|
||||
this.setState({ rightDatas: newRightDatas, rightCheckedKeys: [] });
|
||||
};
|
||||
moveTo = (direction) => {
|
||||
const { rightDatas, rightCheckedKeys, listDatas, leftListSelectedData } = this.state;
|
||||
if (direction === "right") {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(leftListSelectedData),
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
} else if (direction === "left") {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.filter(item => !rightCheckedKeys.some(checkedKey => String(item.id) === checkedKey)),
|
||||
rightCheckedKeys: []
|
||||
});
|
||||
} else if (direction === "allToLeft") {
|
||||
this.setState({ rightDatas: [], rightCheckedKeys: [] });
|
||||
} else if (direction === "allToRight") {
|
||||
if (this.leftListAllActive()) {
|
||||
this.setState({
|
||||
rightDatas: rightDatas.concat(listDatas),
|
||||
rightCheckedKeys: [],
|
||||
leftListSelectedData: [],
|
||||
leftListSelectedKeys: []
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
leftListAllActive = () => {
|
||||
const { rightDatas, listDatas } = this.state;
|
||||
let bool = true;
|
||||
if (_.isEmpty(listDatas)) bool = false;
|
||||
if (!_.isEmpty(listDatas) && !_.isEmpty(rightDatas)) {
|
||||
bool = listDatas.filter((l) => !rightDatas.some(r => l.id === r.id)).length !== 0;
|
||||
}
|
||||
return bool;
|
||||
};
|
||||
renderTitle = () => {
|
||||
return (<div className="wea-hr-muti-dialog-title">
|
||||
<span>{this.props.title || getLabel(111, "数据选择")}</span>
|
||||
<div>{this.props.titleOptsComs}</div>
|
||||
</div>);
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys, pageInfo, selectedRowKeys,
|
||||
columns
|
||||
} = this.state;
|
||||
const {
|
||||
searchParamsKey, saveLoading, dialogType = "", rowKey, tableOpts = {}, buttons = [
|
||||
<Button type="primary" loading={saveLoading} onClick={this.handleOk}
|
||||
disabled={_.isEmpty(rightDatas)}>{getLabel(111, "确 定")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>
|
||||
]
|
||||
} = this.props;
|
||||
let rightActive = false, leftActive = false, rightAllActive = false;
|
||||
if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true;
|
||||
if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true;
|
||||
if (rightDatas && rightDatas.length > 0) rightAllActive = true;
|
||||
let dom = <Spin spinning={loading}>
|
||||
<div className="wea-hr-muti-dialog">
|
||||
<div className="wea-hr-muti-input-left">
|
||||
<Row style={{ height: 35 }}>
|
||||
<Col span="24">
|
||||
<WeaInputSearch value={query[searchParamsKey]} onSearch={() => this.getData()}
|
||||
onChange={value => this.setState({ query: { ...query, [searchParamsKey]: value } })}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<div>
|
||||
<WeaNewScroll height={this.dialog ? this.dialog.state.height - 51 : 260}>
|
||||
<CustomBrowserMutiLeft
|
||||
filterData={rightDatas}
|
||||
datas={listDatas}
|
||||
onDoubleClick={this.onleftDoubleClick}
|
||||
onClick={this.onLeftListCheck}
|
||||
selectedKeys={leftListSelectedKeys}
|
||||
/>
|
||||
</WeaNewScroll>
|
||||
</div>
|
||||
</div>
|
||||
<div className="wea-transfer-opration">
|
||||
<CustomBrowserOperation
|
||||
rightActive={rightActive}
|
||||
leftActive={leftActive}
|
||||
leftAllActive={this.leftListAllActive()}
|
||||
rightAllActive={rightAllActive}
|
||||
moveToRight={() => this.moveTo("right")}
|
||||
moveToLeft={() => this.moveTo("left")}
|
||||
moveAllToRight={() => this.moveTo("allToRight")}
|
||||
moveAllToLeft={() => this.moveTo("allToLeft")}
|
||||
/>
|
||||
</div>
|
||||
<div className="wea-hr-muti-input-right">
|
||||
<CustomBrowserMutiRight
|
||||
height={this.dialog ? this.dialog.state.height - 51 : 260}
|
||||
data={rightDatas} checkedKeys={rightCheckedKeys}
|
||||
checkedCb={rightCheckedKeys => this.setState({ rightCheckedKeys })}
|
||||
onDoubleClick={this.onRightDoubleClick}
|
||||
onDrag={(data) => {
|
||||
this.setState({ rightDatas: data });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Spin>;
|
||||
if (dialogType === "table") {
|
||||
const sheight = this.dialog ? this.dialog.state.height - 156 : 260;
|
||||
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.getData());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getData());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: selectedRowKeys => this.setState({ selectedRowKeys }, () => this.props.onSelect(selectedRowKeys))
|
||||
};
|
||||
dom = <div className="wea-hr-muti-input-table">
|
||||
{this.props.children}
|
||||
<WeaTable dataSource={listDatas} loading={loading} pagination={pagination} scroll={{ y: sheight }}
|
||||
rowSelection={rowSelection} rowKey={rowKey || "id"}
|
||||
columns={!_.isEmpty(tableOpts) ? [...columns, tableOpts] : columns}/>
|
||||
</div>;
|
||||
}
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={this.renderTitle()}
|
||||
className="custom_browser_dialog" draggable={true} style={{
|
||||
width: 784, height: 460, minHeight: 200, minWidth: 380,
|
||||
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}} buttons={buttons}>{dom}</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomTransferDialog;
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* 自定义浏览框组件
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/8/29
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import AssociativeTreeMult from "./components/associativeTreeMult";
|
||||
import AssociativeSearchMult from "./components/associativeSearchMult";
|
||||
import AssociativeSearchSingle from "./components/AssociativeSearchSingle";
|
||||
import CustomBrowserDialog from "./components/customBrowserDialog";
|
||||
import classNames from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
browserDialog: { visible: false },
|
||||
selectedData: {}, searchKeys: [], // 搜索按钮选择的数据和keys
|
||||
rightDatas: [] // 右侧展示的数据
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { value, fieldConfig } = this.props;
|
||||
const { value: defaultValue, browserConditionParam: { replaceDatas = [] } } = fieldConfig;
|
||||
if ((value || defaultValue) && replaceDatas.length > 0) {
|
||||
this.setState({
|
||||
searchKeys: (value || defaultValue).split(","),
|
||||
selectedData: _.reduce(replaceDatas, (pre, cur) => ({ ...pre, [cur["id"]]: cur }), {})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (
|
||||
(nextProps.value !== this.props.value && _.isEmpty(nextProps.value)) ||
|
||||
(nextProps.fieldConfig.value !== this.props.fieldConfig.value && _.isEmpty(nextProps.fieldConfig.value))
|
||||
) {
|
||||
this.setState({ searchKeys: [], selectedData: [] });
|
||||
}
|
||||
}
|
||||
|
||||
renderSingle = () => {
|
||||
const { fieldConfig } = this.props;
|
||||
const { selectedData, searchKeys } = this.state;
|
||||
return (<div>
|
||||
<AssociativeSearchSingle
|
||||
{...fieldConfig}
|
||||
{...this.props}
|
||||
datas={selectedData}
|
||||
selectedValues={searchKeys}
|
||||
onChange={this.onBrowerChangeHandler}
|
||||
clickCallback={this.onBrowerClick}
|
||||
/>
|
||||
</div>);
|
||||
};
|
||||
renderMult = () => {
|
||||
const { fieldConfig } = this.props;
|
||||
const { browserConditionParam = {} } = fieldConfig || {};
|
||||
const { selectedData, searchKeys } = this.state;
|
||||
return (<div>
|
||||
{
|
||||
browserConditionParam.treeSelect ?
|
||||
<AssociativeTreeMult
|
||||
{...fieldConfig}
|
||||
{...this.props}
|
||||
datas={selectedData}
|
||||
selectedValues={searchKeys}
|
||||
onChange={this.onBrowerChangeHandler}
|
||||
/> :
|
||||
<AssociativeSearchMult
|
||||
{...fieldConfig}
|
||||
{...this.props}
|
||||
datas={selectedData}
|
||||
selectedValues={searchKeys}
|
||||
onChange={this.onBrowerChangeHandler}
|
||||
clickCallback={this.onBrowerClick}
|
||||
/>
|
||||
}
|
||||
</div>);
|
||||
};
|
||||
onBrowerChangeHandler = (values, datas) => {
|
||||
const { form, fieldConfig, isSingle } = this.props;
|
||||
const { browserConditionParam = {} } = fieldConfig || {};
|
||||
this.setState({
|
||||
searchKeys: (isSingle || browserConditionParam.isSingle) ? values.slice(-1) : values,
|
||||
selectedData: ((isSingle || browserConditionParam.isSingle) && !_.isEmpty(values)) ? { [_.last(values)]: datas[_.last(values)] } : datas
|
||||
}, () => {
|
||||
this.props.onChange && this.props.onChange(values.join(","));
|
||||
this.props.onCustomChange && this.props.onCustomChange(this.state.selectedData);
|
||||
if (form) {
|
||||
form.updateFields({
|
||||
[getKey(fieldConfig)]: { value: this.state.searchKeys.join(",") }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
onBrowerClick = (keys, selectedObj) => {
|
||||
if (_.isEmpty(keys)) {
|
||||
this.setState({ searchKeys: [], selectedData: {}, rightDatas: [] });
|
||||
}
|
||||
this.setState({ browserDialog: { visible: true } });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { browserDialog, selectedData, searchKeys } = this.state;
|
||||
const { isSingle, viewAttr, fieldConfig = {} } = this.props;
|
||||
const { browserConditionParam = {} } = fieldConfig || {};
|
||||
const className = classNames({
|
||||
"wea-browser": true,
|
||||
"wea-field-readonly": viewAttr === "1" || fieldConfig.viewAttr === "1"
|
||||
});
|
||||
const browser = (isSingle || browserConditionParam.isSingle) ? this.renderSingle() : this.renderMult();
|
||||
const style = {};
|
||||
if (this.props.resize) style.visibility = "hidden";
|
||||
return (<React.Fragment>
|
||||
<div className={`${className} ${this.props.className || ""}`} style={style}>{browser}</div>
|
||||
<CustomBrowserDialog
|
||||
{...browserDialog} {...browserConditionParam} {...this.props} onChange={this.onBrowerChangeHandler}
|
||||
onCancel={() => this.setState({ browserDialog: { visible: false } })}
|
||||
datas={selectedData} selectedValues={searchKeys}/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
.custom_browser_dialog {
|
||||
.wea-hr-muti-dialog-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.wea-select, .ant-select-selection, .ant-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ant-select-selection {
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-hr-muti-input-table {
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
height: 100%;
|
||||
|
||||
.table_opts {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background: #FFF;
|
||||
|
||||
.wea-button-icon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wea-hr-muti-dialog {
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
|
||||
.wea-hr-muti-input-left, .wea-hr-muti-input-right {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.wea-transfer-list {
|
||||
background: #FFF;
|
||||
border: 1px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.wea-input-focus {
|
||||
height: 35px !important;
|
||||
width: 100% !important;
|
||||
|
||||
input {
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-transfer-list-wrapper {
|
||||
border: none !important;
|
||||
|
||||
.transfer-tree {
|
||||
padding: 0 !important;
|
||||
|
||||
& > li {
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 6px 0 6px 20px !important;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
|
||||
.ant-tree-switcher {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.tree-title {
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { observer } from "mobx-react";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@observer
|
||||
export default class FormInfo extends Component {
|
||||
renderForm = () => {
|
||||
const {
|
||||
formFields, form, colCount, itemRender, onSelectedChangeHandle, showLabel, multiColumn, custLabelCol,
|
||||
childrenComponents
|
||||
} = this.props;
|
||||
|
||||
let groupArr = [];
|
||||
const formParams = form.getFormParams();
|
||||
const labelVisible = showLabel == null || showLabel == true;
|
||||
const col = colCount ? colCount : 1;
|
||||
const labelCol = labelVisible ? (custLabelCol || 6) : 0;
|
||||
const itemProps = {
|
||||
// ratio1to2: labelVisible && custLabelCol == null,
|
||||
style: { marginLeft: 0 },
|
||||
tipPosition: "bottom",
|
||||
labelCol: { span: labelCol },
|
||||
wrapperCol: { span: 22 - labelCol }
|
||||
};
|
||||
const textAreaProps = { minRows: 4, maxRows: 4 };
|
||||
|
||||
formFields.map((fields, i) => {
|
||||
let formItems = [];
|
||||
fields.items.map((field, j) => {
|
||||
const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null;
|
||||
const showCheckbox = field.checkbox || false;
|
||||
let label = getLabel(field.lanId, field.label);
|
||||
if (showCheckbox)
|
||||
label = <WeaCheckbox content={label} value={field.checkboxValue} onChange={(v) => {
|
||||
field.checkboxValue = v === "1";
|
||||
onSelectedChangeHandle && onSelectedChangeHandle(field, v);
|
||||
}}/>;
|
||||
let coms;
|
||||
if (customerRender == null) {
|
||||
coms = <WeaSwitch fieldConfig={{
|
||||
...field, helpfulTip: getLabel(field.helpfulTipLanId || "", field.helpfulTip || ""), ...textAreaProps,
|
||||
hasBorder: false
|
||||
}} form={form} formParams={formParams}/>;
|
||||
} else {
|
||||
coms = customerRender({
|
||||
...field, helpfulTip: getLabel(field.helpfulTipLanId || "", field.helpfulTip || "")
|
||||
}, textAreaProps, form, formParams);
|
||||
}
|
||||
Object.assign(itemProps, { label, error: form.getError(field) });
|
||||
let col = colCount ? colCount : 1;
|
||||
if (multiColumn != null) {//检查有哪些字段需要一行显示多个
|
||||
const idx = _.findIndex(multiColumn, item => item.key === field.domkey[0]);
|
||||
if (idx > -1) {
|
||||
col = field.colSpan || 1;
|
||||
if (multiColumn[idx].labelCol != null)//检查字段是否有配置标题宽度
|
||||
Object.assign(itemProps, {
|
||||
labelCol: { span: multiColumn[idx].labelCol },
|
||||
wrapperCol: { span: 24 - multiColumn[idx].labelCol }
|
||||
});
|
||||
} else {
|
||||
Object.assign(itemProps, {
|
||||
labelCol: { span: labelCol },
|
||||
wrapperCol: { span: 24 - labelCol }
|
||||
});
|
||||
}
|
||||
}
|
||||
coms != null && formItems.push({
|
||||
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>), hide: field.hide,
|
||||
col
|
||||
});
|
||||
|
||||
if (childrenComponents && childrenComponents[field.domkey[0]]) {
|
||||
childrenComponents[field.domkey[0]]().map(child => formItems.push(child));
|
||||
}
|
||||
});
|
||||
|
||||
groupArr.push(<WeaSearchGroup
|
||||
center={this.props.center != null ? this.props.center : true}
|
||||
needTigger={true}
|
||||
title={formFields.length < 2 ? null : fields.title}
|
||||
showGroup={true}
|
||||
items={formItems}
|
||||
col={col}
|
||||
fontSize={14}/>);
|
||||
});
|
||||
return groupArr;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { formFields, className, form } = this.props;
|
||||
if (formFields == null || !form.isFormInit) return (<div></div>);
|
||||
return (
|
||||
<div className={className}>{this.renderForm()}</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -39,47 +39,33 @@ class PersonalScopeModal extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { isTaxgent = true } = this.props;
|
||||
if (isTaxgent) {
|
||||
this.getTaxAgentRangeForm();
|
||||
} else {
|
||||
this.commonEnumList();
|
||||
// const employeeStatus = [
|
||||
// { key: "TRIAL", showname: "试用" },
|
||||
// { key: "FORMAL", showname: "正式" },
|
||||
// { key: "TEMPORARY", showname: "临时" },
|
||||
// { key: "DELAY", showname: "试用延期" },
|
||||
// { key: "FIRE", showname: "解雇" },
|
||||
// { key: "DEPARTURE", showname: "离职" },
|
||||
// { key: "RETIRED", showname: "退休" }
|
||||
// ];
|
||||
// const targetTypeList = [
|
||||
// {
|
||||
// key: "EMPLOYEE",
|
||||
// showname: "人员",
|
||||
// selected: false
|
||||
// },
|
||||
// {
|
||||
// key: "SUBCOMPANY",
|
||||
// showname: "分部",
|
||||
// selected: false
|
||||
// },
|
||||
// {
|
||||
// key: "DEPT",
|
||||
// showname: "部门",
|
||||
// selected: false
|
||||
// },
|
||||
// {
|
||||
// key: "POSITION",
|
||||
// showname: "岗位",
|
||||
// selected: false
|
||||
// }
|
||||
// ];
|
||||
// this.setState({ targetTypeList, employeeStatus });
|
||||
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { isTaxgent = true } = nextProps;
|
||||
if (isTaxgent) {
|
||||
this.getTaxAgentRangeForm();
|
||||
} else {
|
||||
this.commonEnumList(nextProps);
|
||||
}
|
||||
if (!_.isEmpty(nextProps.record)) {
|
||||
this.setState({
|
||||
targetType: nextProps.record.targetType,
|
||||
targetTypeIds: nextProps.record.targetType !== "SQL" ? String(nextProps.record.targetId) : nextProps.record.target,
|
||||
targetTypeIdsNames: nextProps.record.targetName,
|
||||
status: nextProps.record.status,
|
||||
statusAll: ""
|
||||
});
|
||||
} else {
|
||||
this.handleReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
commonEnumList = () => {
|
||||
commonEnumList = (props) => {
|
||||
const { record } = props;
|
||||
commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const targetTypeList = [
|
||||
|
|
@ -112,6 +98,11 @@ class PersonalScopeModal extends Component {
|
|||
this.setState({
|
||||
targetTypeList,
|
||||
employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({ key: it.enum, showname: it.defaultLabel }))
|
||||
}, () => {
|
||||
if (!_.isEmpty(record)) {
|
||||
const bool = _.every(_.map(this.state.employeeStatus, it => it.key), item => record.status.split(",").includes(item));
|
||||
this.setState({ statusAll: bool ? "0" : "" });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -129,7 +120,7 @@ class PersonalScopeModal extends Component {
|
|||
};
|
||||
handleSubmit = () => {
|
||||
const { status, targetTypeIds, targetType } = this.state;
|
||||
const { includeType, saveKeyVal, onSuccess, onCancel, APISaveFox } = this.props;
|
||||
const { includeType, saveKeyVal, onSuccess, onCancel, APISaveFox, record } = this.props;
|
||||
if (_.isEmpty(status) || _.isEmpty(targetTypeIds)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
|
|
@ -139,14 +130,14 @@ class PersonalScopeModal extends Component {
|
|||
}
|
||||
const payload = {
|
||||
employeeStatus: status.split(","),
|
||||
includeType,
|
||||
includeType, id: record.id,
|
||||
targetParams: targetType !== "SQL" ?
|
||||
_.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) :
|
||||
[{ targetType, targetId: "0", target: targetTypeIds }],
|
||||
[saveKeyVal["key"]]: saveKeyVal["value"]
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
APISaveFox["save"](payload).then(({ status, errormsg }) => {
|
||||
APISaveFox[_.isEmpty(record) ? "save" : "edit"](payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success("保存成功");
|
||||
|
|
@ -159,6 +150,7 @@ class PersonalScopeModal extends Component {
|
|||
}).catch(() => this.setState({ loading: true }));
|
||||
};
|
||||
renderBrowser = () => {
|
||||
const { record } = this.props;
|
||||
const { targetType, targetTypeIds, targetTypeIdsNames } = this.state;
|
||||
let browserType = {};
|
||||
switch (targetType) {
|
||||
|
|
@ -176,7 +168,7 @@ class PersonalScopeModal extends Component {
|
|||
break;
|
||||
case "SQL":
|
||||
return <div style={{ display: "flex", alignItems: "center" }}>
|
||||
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={targetTypeIds}
|
||||
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={targetTypeIdsNames}
|
||||
onChange={val => this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>
|
||||
<WeaHelpfulTip style={{ marginLeft: 10 }} width={200} placement="topLeft" title={<SQLHelpTip/>}/>
|
||||
</div>;
|
||||
|
|
@ -186,9 +178,9 @@ class PersonalScopeModal extends Component {
|
|||
return <WeaBrowser
|
||||
{...browserType}
|
||||
viewAttr={3}
|
||||
isSingle={false}
|
||||
isSingle={!_.isEmpty(record)}
|
||||
value={targetTypeIds}
|
||||
valueSpan={targetTypeIdsNames}
|
||||
replaceDatas={[{ id: targetTypeIds, name: targetTypeIdsNames }]}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(targetTypeIds, targetTypeIdsNames) => {
|
||||
this.setState({ targetTypeIds, targetTypeIdsNames });
|
||||
|
|
@ -197,7 +189,7 @@ class PersonalScopeModal extends Component {
|
|||
};
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
targetType: "EMPLOYEE",
|
||||
targetType: !_.isEmpty(this.props.record) ? this.props.record.targetType : "EMPLOYEE",
|
||||
targetTypeIds: "",
|
||||
status: "",
|
||||
statusAll: ""
|
||||
|
|
@ -205,7 +197,7 @@ class PersonalScopeModal extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { onCancel, title, visible } = this.props;
|
||||
const { onCancel, title, visible, record } = this.props;
|
||||
const { employeeStatus, targetTypeList, targetType, status, statusAll, loading } = this.state;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.handleSubmit} loading={loading}>确定</Button>,
|
||||
|
|
@ -233,6 +225,7 @@ class PersonalScopeModal extends Component {
|
|||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
<WeaSelect
|
||||
style={{ width: 60, marginRight: 12 }}
|
||||
disabled={!_.isEmpty(record)}
|
||||
value={targetType}
|
||||
options={targetTypeList}
|
||||
onChange={(targetType) => this.setState({ targetType })}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class PersonalScopeTable extends Component {
|
|||
}
|
||||
|
||||
getPersonalScopeList = (tabActive = this.props.tabActive) => {
|
||||
const { searchValue, searchKeyVal, APIFox } = this.props;
|
||||
const { searchValue, searchKeyVal, APIFox, showOperateBtn } = this.props;
|
||||
const { pageInfo, loading } = this.state;
|
||||
const payload = {
|
||||
[searchKeyVal["key"]]: searchKeyVal["value"],
|
||||
|
|
@ -59,7 +59,10 @@ class PersonalScopeTable extends Component {
|
|||
columns: _.map(columns, item => {
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
render: (text, record) => {
|
||||
if (item.dataIndex === "targetName" && showOperateBtn) {
|
||||
return <a href="javascript:void(0);" onClick={() => this.props.onEditScope(record)}>{text}</a>;
|
||||
}
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,8 +18,10 @@ CodeMirror.extendMode("javascript", {
|
|||
if (this.jsonMode) {
|
||||
return /^[\[,{]$/.test(content) || /^}/.test(textAfter) || /^]/.test(textAfter);
|
||||
} else {
|
||||
if (content == ";" && state.lexical && state.lexical.type == ")") return false;
|
||||
return /^[;{}]$/.test(content) && !/^;/.test(textAfter);
|
||||
if (content == ";" && state.lexical && state.lexical.type == "}") return false;
|
||||
// if (content == ";" && state.lexical && state.lexical.type == ")") return false;
|
||||
return /[=,]/.test(content) || /.*\)/.test(textAfter);
|
||||
// return /^[;{}]$/.test(content) && !/^;/.test(textAfter);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -94,7 +96,8 @@ CodeMirror.defineExtension("autoFormatRange", function (from, to) {
|
|||
atSol = false;
|
||||
}
|
||||
if (!atSol && inner.mode.newlineAfterToken &&
|
||||
inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || "", inner.state))
|
||||
// inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || "", inner.state))
|
||||
inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos, stream.pos + 2) || text[i + 1] || "", inner.state))
|
||||
newline();
|
||||
}
|
||||
if (!stream.pos && outer.blankLine) outer.blankLine(state);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
});
|
||||
}, () => this.props.baseFormStore.form.resetForm());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Content extends Component {
|
|||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
||||
return (
|
||||
<div className="salary-preview-container">
|
||||
<div style={{ border: "10px solid #F3F9FF" }}>
|
||||
<div style={{ border: "10px solid #F3F9FF", width: "100%" }}>
|
||||
<div className="edition-center">
|
||||
<div className="header">
|
||||
<div className="header-title">{theme || ""}</div>
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@
|
|||
}
|
||||
|
||||
.data-detail {
|
||||
padding-bottom: 16px;
|
||||
|
||||
.salary-group {
|
||||
background: #FFF;
|
||||
|
||||
|
|
@ -153,13 +155,14 @@
|
|||
.item-count {
|
||||
//flex-basis: 328px;
|
||||
flex: 1;
|
||||
padding-left: 16px;
|
||||
padding: 12px 16px;
|
||||
height: 100%;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
color: #5F5F5F;
|
||||
word-break: break-all;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import SalaryAdjustmentRecords from "./pages/salaryAdjustmentRecords";
|
|||
import MySalaryMobile from "./pages/mySalaryMobile";
|
||||
import MySalary from "./pages/mySalaryBenefits";
|
||||
import Programme from "./pages/socialSecurityBenefits/welfarePlan";
|
||||
// import Archivess from "./pages/socialSecurityBenefits/archives";
|
||||
import Archives from "./pages/socialSecurityBenefits/welfareArchive"; //社保福利档案重构页面
|
||||
import StandingBook from "./pages/socialSecurityBenefits/standingBook/standingBook"; //社保福利台账重构页面
|
||||
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
|
||||
|
|
@ -19,20 +18,16 @@ import CumSituation from "./pages/dataAcquisition/cumSituation";
|
|||
import Attendance from "./pages/dataAcquisition/attendance";
|
||||
import SpecialAddDeduction from "./pages/dataAcquisition/specialAddDeduction";
|
||||
import Ledger from "./pages/ledgerPage";
|
||||
// import Calculate from "./pages/calculate";
|
||||
import Calculate from "./pages/calculate/calculate"; //重构的薪资核算页面
|
||||
// import Payroll from "./pages/payroll";
|
||||
import Payroll from "./pages/payrollRelease"; //重构的工资单发放页面
|
||||
import PayrollGrant from "./pages/payroll/payrollGrant";
|
||||
import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
|
||||
// import Declare from "./pages/declare";
|
||||
import DeclareDetail from "./pages/declareDetail";
|
||||
import DeclareOnlineComparison from "./pages/declareOnlineComparison";
|
||||
import Employeedeclare from "./pages/employeedeclare";
|
||||
import EnterprisePayCertificationDetail from "./pages/enterprisePayCertificationDetail";
|
||||
import BankVoucherDetail from "./pages/bankVoucherDetail";
|
||||
import EmployeedeclareDetail from "./pages/employeedeclareDetail";
|
||||
// import Declare from "./pages/declare";
|
||||
import Declare from "./pages/declare/declare"; //重构的个税申报表
|
||||
import TaxRate from "./pages/taxRate";
|
||||
import TaxAgents from "./pages/taxAgent";
|
||||
|
|
@ -61,6 +56,7 @@ import ExternalPersonManage from "./pages/externalPersonManage";
|
|||
import AdjustSalaryManage from "./pages/adjustSalaryManage";
|
||||
import TopologyMap from "./pages/topologyMap";
|
||||
import SupplementaryCalc from "./pages/supplementaryCalc";
|
||||
import VariableSalary from "./pages/variableSalary";
|
||||
import Layout from "./layout";
|
||||
//二开页面路由
|
||||
import PersonalConfirm from "./pages/custom-pages/angli/personalConfirm";
|
||||
|
|
@ -68,67 +64,14 @@ import SalaryAccounting from "./pages/custom-pages/angli/salaryAccounting"
|
|||
|
||||
import stores from "./stores";
|
||||
import "./style/index";
|
||||
|
||||
// 读取系统多语言配置
|
||||
let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, "hrmSalary");
|
||||
|
||||
// 不需要读取系统多语言
|
||||
getLocaleLabel = function (nextState, replace, callback) {
|
||||
callback();
|
||||
};
|
||||
|
||||
const Home = (props) => props.children;
|
||||
|
||||
const SocialSecurityBenefits = (props) => props.children;
|
||||
const DataAcquisition = (props) => props.children;
|
||||
|
||||
// historicalPayroll 历史工资单查看
|
||||
// salaryAdjustmentRecords 调薪记录查看
|
||||
|
||||
// mySalaryMobile 我的薪资福利-移动端
|
||||
// mySalaryMobile 我的薪资福利-移动端
|
||||
// mySalary 我的薪资福利
|
||||
// mySalaryView 我的薪资福利-查看工资单
|
||||
// socialSecurityBenefits 社保福利
|
||||
// programme 社保福利方案
|
||||
// archives 社保福利档案
|
||||
// standingBook 社保福利台账
|
||||
// sbofflineComparison 社保福利台账线下对比
|
||||
// salaryItem 薪资项目管理
|
||||
// salaryFile 薪资档案
|
||||
// dataAcquisition 数据采集
|
||||
// CumDeduct 累计专项附加扣除
|
||||
// otherDeduct 其他免税扣除
|
||||
// cumSituation 往期累计情况
|
||||
// attendance 考勤引用
|
||||
// specialAddDeduction 专项附件扣除
|
||||
// ledger 薪资账套
|
||||
// calculate 薪资核算
|
||||
// calculateDetail 核算详情
|
||||
// DoCalcDetail 核算详情页面-新
|
||||
// CalcView 核算查看页面-新
|
||||
// OfflineCompare 薪资核算线下对比-新
|
||||
// placeOnFileDetail 核算归档详情
|
||||
// compareDetail 线下线上对比
|
||||
// payroll 工资单发放
|
||||
// declare 个税申报表
|
||||
// generateDeclarationDetail 个税单详情
|
||||
// taxRate 个税税率表
|
||||
// taxAgent 个税扣缴义务人
|
||||
// mobilepayroll 移动端工资单
|
||||
// sysconfig 系統配置
|
||||
// sysconfig-1 规则配置
|
||||
// appconfig 应用配置
|
||||
// fieldManagement 字段管理
|
||||
// analysisOfSalaryStatistics 薪酬统计分析
|
||||
// reportView 薪酬报表查看
|
||||
// externalPersonManage 非系统人员管理
|
||||
// adjustSalaryManage 档案管理
|
||||
// supplementaryCalc 补算
|
||||
// employeedeclare 人员信息报送
|
||||
// employeedeclareDetail 人员信息报送详情
|
||||
// intelligentCalculateSalarySettings 智能算薪
|
||||
|
||||
const Routes = (
|
||||
<Route key="hrmSalary" path="hrmSalary" onEnter={getLocaleLabel} component={Layout}>
|
||||
<Route key="historicalPayroll" path="historicalPayroll" component={HistoricalPayroll}/>
|
||||
|
|
@ -177,14 +120,9 @@ const Routes = (
|
|||
<Route key="employeedeclare" path="employeedeclare" component={Employeedeclare}/>
|
||||
<Route key="enterprisePayCertificationDetail" path="enterprisePayCertificationDetail"
|
||||
component={EnterprisePayCertificationDetail}/>
|
||||
<Route key="bankVoucherDetail" path="bankVoucherDetail"
|
||||
component={BankVoucherDetail}/>
|
||||
<Route key="bankVoucherDetail" path="bankVoucherDetail" component={BankVoucherDetail}/>
|
||||
<Route key="employeedeclareDetail" path="employeedeclareDetail" component={EmployeedeclareDetail}/>
|
||||
<Route
|
||||
key="generateDeclarationDetail"
|
||||
path="generateDeclarationDetail"
|
||||
component={GenerateDeclarationDetail}
|
||||
/>
|
||||
<Route key="generateDeclarationDetail" path="generateDeclarationDetail" component={GenerateDeclarationDetail}/>
|
||||
<Route key="taxRate" path="taxRate" component={TaxRate}/>
|
||||
<Route key="taxAgent" path="taxAgent" component={TaxAgent}/>
|
||||
<Route key="taxAgents" path="taxAgents" component={TaxAgents}/>
|
||||
|
|
@ -201,10 +139,11 @@ const Routes = (
|
|||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
||||
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
|
||||
<Route key="variableSalary" path="variableSalary" component={VariableSalary}/>
|
||||
</Route>
|
||||
);
|
||||
|
||||
module.exports = {
|
||||
Route: Routes,
|
||||
store: stores
|
||||
};
|
||||
};
|
||||
|
|
@ -22,6 +22,8 @@ class Layout extends Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
|
||||
stores.baseFormStore.initForm();
|
||||
stores.baseFormStore.initFormExtra();
|
||||
if (window.location.hash.indexOf("payroll") !== -1) {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
|
|
@ -30,6 +32,7 @@ class Layout extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.setFontSize();
|
||||
if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
|
||||
const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css";
|
||||
const link = document.createElement("link");
|
||||
|
|
@ -41,8 +44,31 @@ class Layout extends Component {
|
|||
top.$(".ant-message").remove();
|
||||
window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
|
||||
}
|
||||
window.addEventListener("storage", this.setFontSize);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("storage", this.setFontSize);
|
||||
}
|
||||
|
||||
setFontSize = () => {
|
||||
const { themeFontSize } = JSON.parse(localStorage.getItem("theme-themeInfo")) || { themeFontSize: "12" };
|
||||
if (window.location.href.indexOf("/spa/hrmSalary/") !== -1) {
|
||||
const href = `/cloudstore/resource/pc/com/font-size/${themeFontSize}px.css`;
|
||||
jQuery("#theme-font").remove();
|
||||
window.parent.jQuery("#theme-font1").remove();
|
||||
jQuery(jQuery("head")[0]).append(`<link id="theme-font" rel="stylesheet" type="text/css" href="${href}" />`);
|
||||
const link = document.createElement("link");
|
||||
link.setAttribute("rel", "stylesheet");
|
||||
link.setAttribute("type", "text/css");
|
||||
link.setAttribute("href", href);
|
||||
link.setAttribute("id", "theme-font1");
|
||||
setTimeout(() => {
|
||||
window.parent.document.head.appendChild(link);
|
||||
}, 500);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<WeaLocaleProvider>{this.props.children}</WeaLocaleProvider>
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ class Index extends Component {
|
|||
const payload = {
|
||||
...pageInfo, ...extra,
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: departmentIds ? departmentIds.split(",") : [],
|
||||
operatorIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: positionIds ? positionIds.split(",") : [],
|
||||
operatorIds: operatorIds ? operatorIds.split(",") : [],
|
||||
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
||||
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
||||
};
|
||||
|
|
@ -62,7 +62,7 @@ class Index extends Component {
|
|||
if (o.dataIndex === "username") {
|
||||
return { ...o, width: 150, fixed: "left" };
|
||||
}
|
||||
return { ...o, width: 150 };
|
||||
return { ...o, width: 150, render: (v) => (<span title={v}>{v}</span>) };
|
||||
}), {
|
||||
dataIndex: "options", title: getLabel(30585, "操作"),
|
||||
width: 120, render: (_, record) => (
|
||||
|
|
|
|||
|
|
@ -43,5 +43,15 @@
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
.ant-table-tbody > tr > td,
|
||||
.ant-table-thead > tr > th {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -154,6 +153,36 @@ export const salaryDetailSearchConditions = [
|
|||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "17",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["employeeIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "人员"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
|
|
@ -219,3 +248,66 @@ export const salaryDetailSearchConditions = [
|
|||
col: 2
|
||||
}
|
||||
];
|
||||
export const tempCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["name"],
|
||||
fieldcol: 14,
|
||||
label: "模板名称",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "UPLOAD",
|
||||
domkey: ["fileId"],
|
||||
fieldcol: 14,
|
||||
label: "导出模板",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
datas: [],
|
||||
multiSelection: false,
|
||||
showClearAll: false,
|
||||
showListBottom: true,
|
||||
showListTop: true,
|
||||
maxFilesNumber: 1,
|
||||
limitType: "xlsx",
|
||||
uploadUrl: "/api/doc/upload/uploadFile",
|
||||
category: "111",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["sharedType"],
|
||||
fieldcol: 14,
|
||||
label: "可见性",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["limitIds"],
|
||||
fieldcol: 14,
|
||||
label: "可见性范围",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
detailtype: 3,
|
||||
multiple: true,
|
||||
rules: "",
|
||||
viewAttr: 1,
|
||||
hide: true
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class EmployeeDetails extends Component {
|
|||
pagination={pagination}
|
||||
loading={loading}
|
||||
columns={columns}
|
||||
scroll={{ y: `calc(100vh - 174px)` }}
|
||||
scroll={{ y: `calc(100vh - 182px)` }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/4/17
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { WeaAlertPage, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd";
|
||||
import {
|
||||
reportStatisticsReportDelete,
|
||||
|
|
@ -14,7 +14,6 @@ import {
|
|||
} from "../../../apis/statistics";
|
||||
import "../index.less";
|
||||
|
||||
const SubMenu = Menu.SubMenu;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class ReportList extends Component {
|
||||
|
|
@ -87,7 +86,9 @@ class ReportList extends Component {
|
|||
return (
|
||||
<Row gutter={16} className="reportRow">
|
||||
{
|
||||
_.isEmpty(dataSource) ? <div className="empty">{getLabel(83553, "暂无数据")}</div> :
|
||||
_.isEmpty(dataSource) ? <WeaAlertPage icon="icon-coms-blank" iconSize={100}>
|
||||
<div>暂无数据</div>
|
||||
</WeaAlertPage> :
|
||||
_.map(dataSource, it => {
|
||||
const { reportName, dimension, id, dimensionId, isShare } = it;
|
||||
return <Col className="gutter-row" span={6} onClick={() => this.handleGoReportView(id)}>
|
||||
|
|
|
|||
|
|
@ -6,13 +6,19 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import { message, Spin } from "antd";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider, WeaSelect } from "ecCom";
|
||||
import { Button, message, Modal, Spin } from "antd";
|
||||
import { getIframeParentHeight } from "../../../util";
|
||||
import { sysConfCodeRule } from "../../../apis/ruleconfig";
|
||||
import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog";
|
||||
import SalaryDetailsTempDialog from "./salaryDetailsTempDialog";
|
||||
import SalaryTempMangerDialog from "./salaryTempMangerDialog";
|
||||
import { MonthRangePicker } from "../../reportView/components/statisticalMicroSettingsSlide";
|
||||
import AdvanceInputBtn from "../components/advanceInputBtn";
|
||||
import SearchPannel from "../components/searchPannel";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import cs from "classnames";
|
||||
import "../index.less";
|
||||
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
|
|
@ -24,15 +30,32 @@ class SalaryDetails extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, dataSource: [], columns: [], selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
|
||||
showTotalCell: false, updateSum: true
|
||||
loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {},
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", tempManageQuery: false,
|
||||
showTotalCell: false, updateSum: true,
|
||||
tempDialog: { visible: false, setting: [], heads: [], id: "", template: {} },
|
||||
transferDialog: {
|
||||
visible: false, searchParamsKey: "name", saveLoading: false,
|
||||
dataParams: { page: "salary_details_report" },
|
||||
completeURL: "", convertDatasource: datas => {
|
||||
return {
|
||||
listDatas: _.map(datas.setting, o => ({ id: o.id || o.column, name: o.name || o.text })),
|
||||
checked: converCheckedCol(datas)
|
||||
};
|
||||
},
|
||||
dialogType: "temp"
|
||||
},
|
||||
tempManageDialog: { //模板管理
|
||||
visible: false, completeURL: "", dialogType: "table", dataParams: { page: "salary_details_report" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSalaryList(this.props);
|
||||
async componentDidMount() {
|
||||
const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
|
||||
this.setState({ showTotalCell: confCode === "1" });
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
window.addEventListener("resize", () => this.forceUpdate(), false);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
|
|
@ -43,20 +66,31 @@ class SalaryDetails extends Component {
|
|||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
window.removeEventListener("message", () => this.forceUpdate(), false);
|
||||
this.setState(({ selectedRowKeys: [] }));
|
||||
}
|
||||
|
||||
getPageListTemplatelist = () => {
|
||||
API.getPageListTemplatelist({ page: "salary_details_report" }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
tempPageList: _.map(data, o => ({ ...o, key: String(o.id), showname: o.name })),
|
||||
templateId: !_.isEmpty(_.find(data, o => !!o.checked)) ? String(_.find(data, o => !!o.checked).id) : ""
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleReceive = ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
const { pageInfo } = this.state;
|
||||
if (type === "init") {
|
||||
this.getColumns();
|
||||
// this.getColumns();
|
||||
this.getSalaryList(this.props);
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize },
|
||||
updateSum: false
|
||||
pageInfo: { ...pageInfo, current, pageSize }, updateSum: false
|
||||
}, () => this.getSalaryList(this.props));
|
||||
} else if (id === "CHECKBOX") {
|
||||
const { selectedRowKeys: checkBox } = params;
|
||||
|
|
@ -73,56 +107,67 @@ class SalaryDetails extends Component {
|
|||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
getSalaryList = (props) => {
|
||||
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props;
|
||||
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props || this.props;
|
||||
const [startDateStr, endDateStr] = dateRange;
|
||||
const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams();
|
||||
const { pageInfo } = this.state;
|
||||
const { taxAgentIds, subcompanyIds, departmentIds, employeeIds, ...extra } = salaryDetailSearchForm.getFormParams();
|
||||
const { pageInfo, transferDialog, updateSum } = this.state;
|
||||
const payload = {
|
||||
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
employeeIds: employeeIds ? employeeIds.split(",") : [],
|
||||
...extra, ...pageInfo, startDateStr, endDateStr
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getSalaryList(payload).then(async ({ status, data }) => {
|
||||
// API.getSalaryListSum(payload),
|
||||
const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
|
||||
API.getSalaryList(payload).then(({ status, data }) => {
|
||||
if (updateSum) this.getSalaryListSum(payload);
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { dataKey, pageInfo: pageparams } = data;
|
||||
const { columns, dataKey, pageInfo: pageparams } = data;
|
||||
const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload,
|
||||
showTotalCell: confCode === "1"
|
||||
}, () => tableStore.getDatas(dataKey.datas));
|
||||
columns, dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload
|
||||
}, () => {
|
||||
// tableStore.getDatas(dataKey.datas)
|
||||
this.getColumns();
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
getSalaryListSum = (payload) => {
|
||||
API.getSalaryListSum(payload).then(({ status, data }) => {
|
||||
if (status) this.setState({ sumRow: data.sumRow }, () => this.getColumns());
|
||||
});
|
||||
};
|
||||
handleExportSalaryList = (key) => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
let { selectedRowKeys, payload } = this.state;
|
||||
// const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props;
|
||||
let { selectedRowKeys, payload, columns: tempCols } = this.state;
|
||||
// const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
|
||||
// const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols;
|
||||
const columns = _.filter(tempCols, o => o.column !== "acctTimes");
|
||||
if (key === "SELECTED" && selectedRowKeys.length === 0) {
|
||||
message.warning(getLabel(543345, "请选择需要导出的数据!"));
|
||||
return;
|
||||
}
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportSalaryList({
|
||||
...payload, ids: key === "SELECTED" ? selectedRowKeys : [],
|
||||
columns: _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"), o => o.dataIndex)
|
||||
...payload, ids: key === "SELECTED" ? selectedRowKeys : [], columns: _.map(columns, o => o.column || o.dataIndex)
|
||||
});
|
||||
};
|
||||
getColumns = () => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state;
|
||||
const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
|
||||
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : "";
|
||||
// const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props;
|
||||
const {
|
||||
columns: tempCols, dataSource, pageInfo, selectedRowKeys, showTotalCell, sumRow
|
||||
} = this.state;
|
||||
// const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
|
||||
// const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols;
|
||||
const columns = _.filter(tempCols, o => o.column !== "acctTimes");
|
||||
if (!_.isEmpty(columns)) {
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
|
||||
sumRowlistUrl, payload: { ...payload, updateSum },
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
|
||||
columns: _.map(columns, (it, idx) => ({
|
||||
...it,
|
||||
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,
|
||||
dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true, showSee: false,
|
||||
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : (it.width || it.oldWidth),
|
||||
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||
ellipsis: true
|
||||
}))
|
||||
|
|
@ -130,30 +175,161 @@ class SalaryDetails extends Component {
|
|||
}
|
||||
return [];
|
||||
};
|
||||
handleSetDefCols = (params = {}) => this.setState({
|
||||
transferDialog: {
|
||||
...this.state.transferDialog, visible: true, dataParams: { ...this.state.transferDialog.dataParams, ...params },
|
||||
completeURL: "/api/bs/hrmsalary/common/pageList/template/get", dialogType: "temp"
|
||||
}
|
||||
}, () => this.getPageListTemplatelist());
|
||||
|
||||
savePageListSetting = (values) => {
|
||||
const { transferDialog } = this.state;
|
||||
const payload = {
|
||||
...transferDialog.dataParams, setting: _.map(values, o => o.id)
|
||||
};
|
||||
this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: true } });
|
||||
API.savePageListSetting(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({
|
||||
transferDialog: { ...this.state.transferDialog, visible: false, dialogType: "temp" }
|
||||
}, () => this.getSalaryList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
handelAddTemp = (templateId = "") => {
|
||||
const { tempDialog, tempPageList } = this.state;
|
||||
if (_.isEmpty(this.transferRef.state.rightDatas)) {
|
||||
message.warning(getLabel(111, "请选择设置!"));
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
tempDialog: {
|
||||
...tempDialog, visible: true, setting: _.map(this.transferRef.state.rightDatas, o => o.id),
|
||||
heads: _.map(this.transferRef.state.rightDatas, o => o.name)
|
||||
// template: _.find(tempPageList, o => o.key === templateId)
|
||||
}
|
||||
});
|
||||
};
|
||||
changePageListTemplate = (templateId) => {
|
||||
this.setState({ templateId }, () => {
|
||||
API.changePageListTemplate({ page: "salary_details_report", templateId })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({
|
||||
transferDialog: {
|
||||
...this.state.transferDialog,
|
||||
dataParams: { ...this.state.transferDialog.dataParams, id: templateId }
|
||||
}
|
||||
}, () => {
|
||||
this.transferRef.getData(true);
|
||||
this.getSalaryList();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
handleDelTemp = (ids) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认删除吗?"),
|
||||
onOk: () => {
|
||||
API.deleteTemplatePageList({ ids }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ tempManageQuery: !this.state.tempManageQuery }, () => this.getPageListTemplatelist());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource } = this.state;
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
return (
|
||||
<div className="table-layout"
|
||||
style={{ height: getIframeParentHeight(".wea-new-top-req-content", dataSource.length, 0) + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/calcTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
comsWeaTableStore={tableStore}
|
||||
needScroll={true}
|
||||
columns={this.getColumns()}
|
||||
/>
|
||||
</div>
|
||||
const {
|
||||
loading, dataSource, transferDialog, tempDialog, tempPageList, templateId, tempManageDialog, tempManageQuery
|
||||
} = this.state;
|
||||
const { dateRange, showSearchAd } = this.props;
|
||||
const { dialogType } = transferDialog;
|
||||
return (<React.Fragment>
|
||||
<div className="query-div">
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2} onChange={this.props.onChange}/>
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={this.props.handleOpenAdvanceSearch}
|
||||
onAdvanceSearch={this.props.handleAdvanceSearch}/>
|
||||
</div>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={this.props.onCancel} onAdSearch={this.props.onAdSearch}/>
|
||||
</div>
|
||||
<div className="table-layout"
|
||||
style={{ height: getIframeParentHeight(".wea-new-top-req-content", dataSource.length, 70) + "px" }}>
|
||||
<Spin spinning={loading}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/calcTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/calcTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
{/*<WeaTableComx*/}
|
||||
{/* style={{ display: "none" }}*/}
|
||||
{/* comsWeaTableStore={tableStore}*/}
|
||||
{/* needScroll={true}*/}
|
||||
{/* columns={this.getColumns()}*/}
|
||||
{/*/>*/}
|
||||
{/*默认显示列,薪资模板列表*/}
|
||||
<CustomTransferDialog {...transferDialog} ref={dom => this.transferRef = dom}
|
||||
onCancel={() => this.setState({
|
||||
transferDialog: { ...transferDialog, completeURL: "", visible: false }
|
||||
})}
|
||||
buttons={
|
||||
dialogType === "temp" ? [
|
||||
<Button type="primary"
|
||||
onClick={this.handelAddTemp}>{getLabel(111, "存为模板")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({
|
||||
tempManageDialog: {
|
||||
...tempManageDialog, visible: true,
|
||||
completeURL: "/api/bs/hrmsalary/common/pageList/template/pageList"
|
||||
}
|
||||
})}>{getLabel(111, "模板管理")}</Button>
|
||||
] : []
|
||||
}
|
||||
titleOptsComs={
|
||||
dialogType === "temp" ?
|
||||
<WeaSelect style={{ width: 200 }} options={tempPageList}
|
||||
showSearch optionFilterProp="children"
|
||||
value={templateId}
|
||||
onChange={this.changePageListTemplate}/> : null
|
||||
}/>
|
||||
{/*薪资明细模板设置*/}
|
||||
<SalaryDetailsTempDialog {...tempDialog}
|
||||
onCancel={callback => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false, setting: [], heads: [] }
|
||||
}, () => callback && callback())}
|
||||
onSuccess={this.getPageListTemplatelist}/>
|
||||
{/*薪资明细自定义列模板管理*/}
|
||||
<SalaryTempMangerDialog {...tempManageDialog} onDelete={this.handleDelTemp} isQuery={tempManageQuery}
|
||||
onSuccess={this.getPageListTemplatelist} onCancel={() => this.setState({
|
||||
tempManageDialog: { ...tempManageDialog, completeURL: "", visible: false }
|
||||
})}/>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryDetails;
|
||||
|
||||
export const converCheckedCol = (data) => {
|
||||
return _.reduce(data.checked || [], (pre, cur) => {
|
||||
const item = _.find(data.setting, k => k.column === cur.column);
|
||||
if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }];
|
||||
return pre;
|
||||
}, []);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* 薪酬统计分析-薪资明细
|
||||
* 列表模板设置
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/11/7
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLoadingGlobal, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { tempCondition } from "./conditions";
|
||||
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import { downloadPageListTemplate } from "../../../apis/statistics";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@observer
|
||||
class SalaryDetailTempDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTempForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({ loading: false, conditions: [] }, () => nextProps.attendanceStore.initTempForm());
|
||||
}
|
||||
}
|
||||
|
||||
getTempForm = (props) => {
|
||||
getTaxAgentSelectList().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { id, template } = props;
|
||||
this.setState({
|
||||
conditions: _.map(tempCondition, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "sharedType") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), value: id ? String(template["sharedType"]) : "1",
|
||||
options: [
|
||||
{ key: "1", showname: getLabel(111, "私有") },
|
||||
{ key: "0", showname: getLabel(111, "共享") }
|
||||
]
|
||||
};
|
||||
} else if (getKey(o) === "limitIds") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), hide: !id || (id && template["sharedType"] === 1),
|
||||
value: id ? template["limitIds"].join(",") : "",
|
||||
options: _.map(data, o => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
} else if (getKey(o) === "fileId") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), value: id ? template[getKey(o)] : "",
|
||||
datas: id && template[getKey(o)] ? [
|
||||
{ fileid: template[getKey(o)], filename: template["fileName"], showDelete: true }
|
||||
] : [], labelExtra: getLabel(111, "下载示例"), labelType: "download"
|
||||
};
|
||||
}
|
||||
return { ...o, label: getLabel(o.lanId, o.label), value: id ? template[getKey(o)] : "" };
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
const { attendanceStore: { tempForm } } = props;
|
||||
tempForm.initFormFields(this.state.conditions);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
save = () => {
|
||||
const { attendanceStore: { tempForm }, setting, id } = this.props;
|
||||
tempForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
const { limitIds, fileId, ...formVal } = tempForm.getFormParams();
|
||||
const payload = {
|
||||
page: "salary_details_report", setting, id, ...formVal,
|
||||
limitIds: !_.isEmpty(limitIds) ? limitIds.split(",") : []
|
||||
};
|
||||
API.savePageListTemplate(_.assign(payload, fileId ? { fileId } : {})).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
formFieldChange = (field) => {
|
||||
if (field === "download") {
|
||||
const { setting, heads } = this.props;
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = downloadPageListTemplate({ setting, heads });
|
||||
return;
|
||||
}
|
||||
const key = Object.keys(field)[0], value = field[key].value;
|
||||
this.setState({
|
||||
conditions: _.map(this.state.conditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (key === "sharedType" && getKey(o) === "limitIds") {
|
||||
return {
|
||||
...o, hide: value !== "0", viewAttr: value === "0" ? 3 : 1,
|
||||
rules: value === "0" ? "required|string" : ""
|
||||
};
|
||||
} else if (key === "fileId" && getKey(o) === "fileId") {
|
||||
return {
|
||||
...o, value, datas: value ? _.map(field[key].valueSpan, o => ({
|
||||
fileid: o.fileid, filename: o.filename, showDelete: true
|
||||
})) : []
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
const { attendanceStore: { tempForm } } = this.props;
|
||||
tempForm.initFormFields(this.state.conditions);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, conditions } = this.state;
|
||||
const { attendanceStore: { tempForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 480, height: 127 }} initLoadCss title={getLabel(111, "模板保存")}
|
||||
buttons={[<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>]}>
|
||||
<div
|
||||
className="form-dialog-layout tempDialog">{getSearchs(tempForm, conditions, 1, false, this.formFieldChange)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryDetailTempDialog;
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 薪酬报表-薪酬明细
|
||||
* 模板管理新增编辑弹框
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/12/4
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { Button } from "antd";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SalaryTempAdminDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, selectedKeys: [], dataSource: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { dataParams = {} } = nextProps;
|
||||
this.setState({ loading: true });
|
||||
postFetch("/api/bs/hrmsalary/common/pageList/template/get", { ...dataParams })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
dataSource: _.map(data.setting, o => ({ id: o.column, name: o.text })),
|
||||
selectedKeys: _.map(data.checked, o => o.column)
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { dataSource, selectedKeys } = this.state, { dataParams } = this.props;
|
||||
const heads = _.reduce(selectedKeys, (pre, cur) => {
|
||||
const item = dataSource.find(data => data.id === cur);
|
||||
if (item) pre.push(item.name);
|
||||
return pre;
|
||||
}, []);
|
||||
return (<WeaDialog
|
||||
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={getLabel(111, "模板管理")}
|
||||
className="temp_admin_dialog" style={{
|
||||
width: 784, height: 460, minHeight: 200, minWidth: 380,
|
||||
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}} buttons={[
|
||||
<Button type="primary"
|
||||
onClick={() => this.props.onAddTemp(dataParams.id, selectedKeys, heads)}>{getLabel(111, "确 定")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>
|
||||
]}>
|
||||
<WeaTransfer data={dataSource} selectedKeys={selectedKeys} onChange={v => this.setState({ selectedKeys: v })}
|
||||
height={this.dialog ? this.dialog.state.height - 10 : 260}/>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryTempAdminDialog;
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* 薪酬报表-薪酬明细
|
||||
* 模板管理弹框
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/12/4
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaLocaleProvider } from "ecCom";
|
||||
import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog";
|
||||
import SalaryTempAdminDialog from "./salaryTempAdminDialog";
|
||||
import SalaryDetailsTempDialog from "./salaryDetailsTempDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SalaryTempMangerDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: [], tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } },
|
||||
tempDialog: { visible: false, setting: [], heads: [], id: "", template: {} }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({ selectedRowKeys: [] }, () => this.tempManageRef.getData());
|
||||
}
|
||||
|
||||
handleTempAdminCols = (params = {}) => this.setState({
|
||||
tempAdminDialog: { visible: true, dataParams: { ...this.state.tempAdminDialog.dataParams, ...params } }
|
||||
});
|
||||
handelAddTemp = (id = "", setting = [], heads = []) => {
|
||||
this.setState({
|
||||
tempDialog: {
|
||||
visible: true, setting, heads, id, template: _.find(this.tempManageRef.state.listDatas, o => o.id === id)
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedRowKeys, tempAdminDialog, tempDialog } = this.state;
|
||||
return (<CustomTransferDialog ref={dom => this.tempManageRef = dom} {...this.props} buttons={[]}
|
||||
title={getLabel(111, "模板管理")}
|
||||
onSelect={v => this.setState({ selectedRowKeys: v })}
|
||||
tableOpts={{
|
||||
title: getLabel(111, "操作"),
|
||||
dataIndex: "options",
|
||||
width: 120,
|
||||
render: (text, record) => (<React.Fragment>
|
||||
{
|
||||
record.canEdit &&
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.handleTempAdminCols({ id: record.id })}
|
||||
style={{ marginRight: 10 }}>{getLabel(111, "编辑")}</a>
|
||||
}
|
||||
{
|
||||
record.canEdit &&
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.props.onDelete([record.id])}>{getLabel(111, "删除")}</a>
|
||||
}
|
||||
|
||||
</React.Fragment>)
|
||||
}}>
|
||||
<div className="table_opts">
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.handleTempAdminCols()}/>
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
|
||||
onClick={() => this.props.onDelete(selectedRowKeys)} disabled={_.isEmpty(selectedRowKeys)}/>
|
||||
</div>
|
||||
{/*模板管理*/}
|
||||
<SalaryTempAdminDialog {...tempAdminDialog} onAddTemp={this.handelAddTemp} onCancel={() => this.setState({
|
||||
tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } }
|
||||
})}/>
|
||||
{/*薪资明细模板设置*/}
|
||||
<SalaryDetailsTempDialog {...tempDialog}
|
||||
onCancel={callback => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false, setting: [], heads: [] }
|
||||
}, () => callback && callback())}
|
||||
onSuccess={() => this.setState({
|
||||
tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } }
|
||||
}, () => {
|
||||
this.props.onSuccess();
|
||||
this.tempManageRef.getData();
|
||||
})}/>
|
||||
</CustomTransferDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryTempMangerDialog;
|
||||
|
|
@ -19,11 +19,7 @@ import DimensionTable from "./components/dimensionTable";
|
|||
import ReportList from "./components/reportList";
|
||||
import ReportForm from "./components/reportForm";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import SearchPannel from "./components/searchPannel";
|
||||
import moment from "moment";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -275,7 +271,7 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
taxAgentStore: { statisticsReportBtn },
|
||||
taxAgentStore: { statisticsReportBtn, PageAndOptAuth },
|
||||
attendanceStore: { statisticsForm, reportForm, tableStore }
|
||||
} = this.props;
|
||||
const {
|
||||
|
|
@ -307,13 +303,9 @@ class Index extends Component {
|
|||
onClick={({ key }) => this.handleExportSalaryList(key)}>
|
||||
<Menu.Item
|
||||
key="SELECTED">{getLabel(543715, "导出所选")}</Menu.Item>
|
||||
</Menu>}>{getLabel(81272, "导出全部")}</Dropdown.Button>,
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.setState({ dateRange: v }, () => this.handleAdvanceSearch())}/>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={this.handleOpenAdvanceSearch}
|
||||
onAdvanceSearch={this.handleAdvanceSearch}/>
|
||||
</Menu>}>{getLabel(81272, "导出全部")}</Dropdown.Button>
|
||||
];
|
||||
const dropMenuDatas = [
|
||||
let dropMenuDatas = [
|
||||
{
|
||||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
|
|
@ -323,8 +315,9 @@ class Index extends Component {
|
|||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(111, "显示列定制"),
|
||||
onClick: () => {
|
||||
tableStore.setColSetVisible(true);
|
||||
tableStore.tableColSet(true);
|
||||
this.salaryRef.wrappedInstance.handleSetDefCols();
|
||||
// tableStore.setColSetVisible(true);
|
||||
// tableStore.tableColSet(true);
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
@ -333,18 +326,14 @@ class Index extends Component {
|
|||
{ key: "detail", title: getLabel(111, "员工明细") },
|
||||
{ key: "salaryDetail", title: getLabel(111, "薪资明细") }
|
||||
];
|
||||
dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1);
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper"
|
||||
buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10}
|
||||
onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())}
|
||||
showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1)}
|
||||
>
|
||||
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.onAdSearch}/>
|
||||
</div>
|
||||
showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick} dropMenuDatas={dropMenuDatas}>
|
||||
{
|
||||
selectedKey === "statistics" ?
|
||||
<ReportList
|
||||
|
|
@ -356,7 +345,11 @@ class Index extends Component {
|
|||
ref={dom => this.employeeListRef = dom}
|
||||
keyword={keyword} year={year}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> : <SalaryDetails ref={dom => this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery}/>
|
||||
/> : <SalaryDetails ref={dom => this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery}
|
||||
showSearchAd={showSearchAd} handleOpenAdvanceSearch={this.handleOpenAdvanceSearch}
|
||||
handleAdvanceSearch={this.handleAdvanceSearch} onAdSearch={this.onAdSearch}
|
||||
onCancel={() => this.setState({ showSearchAd: false })}
|
||||
onChange={v => this.setState({ dateRange: v }, () => this.handleAdvanceSearch())}/>
|
||||
}
|
||||
<StatisticsModal {...modalReq} onCancel={this.handleCancel} form={reportForm} onClose={this.handleCancel}
|
||||
onAddDimension={this.handleAddDimension}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
width: 220px;
|
||||
}
|
||||
|
||||
.ant-btn-group {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.employeeYearWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -15,7 +19,7 @@
|
|||
}
|
||||
|
||||
.wea-new-top-req-content {
|
||||
padding: 16px;
|
||||
padding: 8px 16px;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
|
|
@ -158,11 +162,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 26px;
|
||||
.wea-alert-page-con {
|
||||
padding-top: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +182,7 @@
|
|||
}
|
||||
|
||||
.wea-advanced-searchsAd {
|
||||
height: 155px;
|
||||
height: 200px;
|
||||
overflow: hidden auto;
|
||||
|
||||
.formItem-delete {
|
||||
|
|
@ -210,6 +211,42 @@
|
|||
}
|
||||
}
|
||||
|
||||
.query-div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 46px;
|
||||
background: #FFF;
|
||||
margin-bottom: 8px;
|
||||
padding: 0 8px;
|
||||
|
||||
.custom-select {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
position: relative;
|
||||
|
||||
.custom-select-edit {
|
||||
position: absolute;
|
||||
right: -56px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background-color: #f4f4f4;
|
||||
color: #b2b2b2;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-left: none;
|
||||
width: 28px;
|
||||
height: 30px;
|
||||
line-height: 28px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.rangePickerBox {
|
||||
margin: 0 10px 0 68px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-layout {
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
|
|
@ -345,3 +382,17 @@
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
.tempDialog {
|
||||
.wea-form-item-label {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.wea-form-item-label-extra {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
cursor: pointer;
|
||||
color: #4d7ad8;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ class AppConfig extends Component {
|
|||
} = this.state;
|
||||
const btns = [
|
||||
<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
|
||||
// <Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
|
||||
// <Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
|
||||
];
|
||||
const items = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import moment from "moment";
|
||||
import CalculateQuery from "./components/calculateQuery";
|
||||
|
|
@ -15,9 +16,15 @@ import CalculateDialog from "./components/calculateDialog";
|
|||
import ProgressModal from "../../components/progressModal";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { queryConditions } from "./config";
|
||||
import { getTaxAgentSelectList } from "../../apis/taxAgent";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -31,17 +38,32 @@ class Calculate extends Component {
|
|||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}, isRefresh: false, logDialogVisible: false,
|
||||
}, isRefresh: false, logDialogVisible: false, conditions: [],
|
||||
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||
calcDaialog: { visible: false, title: "" }
|
||||
calcDaialog: { visible: false, title: "" }, showAdvance: false
|
||||
};
|
||||
this.timer = null;
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data } = await getTaxAgentSelectList();
|
||||
this.setState({
|
||||
conditions: _.map(queryConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return { ...o, options: _.map(data, k => ({ key: k.id, showname: k.content })) };
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, () => form.initFormFields(this.state.conditions));
|
||||
}
|
||||
|
||||
renderCalculateOpts = () => {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { queryParams, isRefresh } = this.state;
|
||||
const { queryParams, isRefresh, showAdvance } = this.state;
|
||||
let calculateOpts = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
calcDaialog: {
|
||||
|
|
@ -49,10 +71,11 @@ class Calculate extends Component {
|
|||
title: getLabel(538780, "核算")
|
||||
}
|
||||
})}>{getLabel(538780, "核算")}</Button>,
|
||||
<CalculateQuery queryParams={queryParams} onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
queryParams: { ...queryParams, ...v }
|
||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||
onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
queryParams: { ...queryParams, ...v }
|
||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||
];
|
||||
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
||||
};
|
||||
|
|
@ -192,7 +215,9 @@ class Calculate extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance
|
||||
} = this.state;
|
||||
return (
|
||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
|
||||
|
|
@ -205,7 +230,18 @@ class Calculate extends Component {
|
|||
]}
|
||||
>
|
||||
<div className="calculate-body">
|
||||
<CalculateTablelist queryParams={queryParams} isRefresh={isRefresh} onCalcOpts={this.handleCalcOpts}/>
|
||||
<div className={cs("advance-calc", { "show-advance-calc": showAdvance })}>
|
||||
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
|
||||
<div className="advance-calc-btns">
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ isRefresh: !isRefresh })}>{getLabel(111, "搜索")}</Button>
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>{getLabel(111, "重置")}</Button>
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<CalculateTablelist form={form} queryParams={queryParams} isRefresh={isRefresh}
|
||||
onCalcOpts={this.handleCalcOpts}/>
|
||||
<CalculateDialog {...calcDaialog}
|
||||
onCancel={(bool, id) => this.setState({
|
||||
calcDaialog: { ...calcDaialog, visible: false },
|
||||
|
|
|
|||
|
|
@ -21,11 +21,14 @@ class Index extends Component {
|
|||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.props.onChange({ dateRange: v })}/>
|
||||
</div>
|
||||
<WeaInputSearch value={name}
|
||||
placeholder={getLabel(543431, "请输入薪资账套名称")}
|
||||
onChange={v => this.props.onChange({ name: v })}
|
||||
onSearch={this.props.onSearch}
|
||||
/>
|
||||
<div className="advance-custom">
|
||||
<WeaInputSearch value={name}
|
||||
placeholder={getLabel(543431, "请输入薪资账套名称")}
|
||||
onChange={v => this.props.onChange({ name: v })}
|
||||
onSearch={this.props.onSearch}
|
||||
/>
|
||||
<a href="javascript:void(0);" onClick={this.props.onAdvance}>{getLabel(111, "高级搜索")}</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,12 +29,14 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
getSalaryAcctList = (props) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { queryParams } = props;
|
||||
const { pageInfo } = this.state, { queryParams, form } = props;
|
||||
const { taxAgentIds } = form.getFormParams();
|
||||
const { dateRange, ...extra } = queryParams;
|
||||
const [startMonthStr, endMonthStr] = dateRange || [];
|
||||
const params = { startMonthStr, endMonthStr, ...extra };
|
||||
const payload = { ...pageInfo, ...params };
|
||||
const payload = {
|
||||
...pageInfo, ...params, taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
getSalaryAcctList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
export const queryConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 14,
|
||||
label: "个税扣缴义务人",
|
||||
lanI: 111,
|
||||
multiple: true,
|
||||
options: [],
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -14,6 +14,7 @@ import {
|
|||
addedemployeeList,
|
||||
deleteAcctemployee,
|
||||
reducedemployeeList,
|
||||
refreshAcctemployee,
|
||||
saveAcctemployee
|
||||
} from "../../../../../apis/calculate";
|
||||
import { personConfirmSearchConditions } from "./condition";
|
||||
|
|
@ -80,6 +81,7 @@ class Index extends Component {
|
|||
|
||||
renderTabBtns = () => {
|
||||
const { selectedKey, selectedRowKeys } = this.state;
|
||||
const { calcDetail } = this.props;
|
||||
let tabBtns = [];
|
||||
switch (selectedKey) {
|
||||
case "range":
|
||||
|
|
@ -92,9 +94,11 @@ class Index extends Component {
|
|||
>
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(1421, "新增")}/>
|
||||
</WeaBrowser>,
|
||||
<span className="icon-refresh" onClick={this.handleRefresh}><i
|
||||
className="icon-coms-Refresh"/></span>,
|
||||
<Button type="primary" onClick={this.handleExport}>{getLabel(17416, "导出")}</Button>
|
||||
];
|
||||
this.props.calcDetail && tabBtns.splice(0, 2);
|
||||
calcDetail && tabBtns.splice(0, 2);
|
||||
break;
|
||||
case "add":
|
||||
case "sub":
|
||||
|
|
@ -186,9 +190,26 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleRefresh = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
refreshAcctemployee({ salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.queryPCList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
this.handleDebounce = null;
|
||||
}, 500);
|
||||
}
|
||||
this.handleDebounce();
|
||||
};
|
||||
|
||||
render() {
|
||||
const { calculateStore: { PCSearchForm } } = this.props;
|
||||
const { calculateStore: { PCSearchForm }, calcDetail } = this.props;
|
||||
const {
|
||||
selectedKey, showSearchAd, searchConditions, pageInfo, loading, selectedRowKeys,
|
||||
columns, dataSource
|
||||
|
|
@ -264,9 +285,10 @@ class Index extends Component {
|
|||
dataIndex: "operate",
|
||||
title: getLabel(30585, "操作"),
|
||||
width: 120,
|
||||
render: (_, record) => (
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.handleDeletePCitem([record.id])}>{getLabel(535052, "删除")}</a>
|
||||
render: (_, record) => (<React.Fragment>
|
||||
{calcDetail ? null : <a href="javascript:void(0);"
|
||||
onClick={() => this.handleDeletePCitem([record.id])}>{getLabel(535052, "删除")}</a>}
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
];
|
||||
|
|
@ -302,4 +324,4 @@ class Index extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index;
|
||||
|
|
@ -6,6 +6,18 @@
|
|||
.wea-new-table {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.icon-refresh {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: #fff;
|
||||
background: #55a1f8;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.docalc-baseinfo-layout {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ class EditSalaryBaseInfo extends Component {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return <WeaBrowser {...browserType} viewAttr={3} value={value} valueSpan={valueSpan} inputStyle={{ width: 200 }}
|
||||
return <WeaBrowser {...browserType} viewAttr={this.props.viewAttr === 1 ? 1 : 3}
|
||||
value={value} valueSpan={valueSpan} inputStyle={{ width: 200 }}
|
||||
onChange={(value, valueSpan) => this.props.onChange(_.map(this.props.baseInfo, it => {
|
||||
if (fieldCode === it.fieldCode) {
|
||||
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
|
||||
|
|
|
|||
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* 核算编辑
|
||||
* 数据查看锚点
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/2/10
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import classnames from "classnames";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class CalcAnchorList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
collapsed: false, currentIndex: 0
|
||||
};
|
||||
this.isClickRef = null;
|
||||
this.timerRef = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.getElementById("salary_anchor_area").addEventListener("scroll", this.handlerScroll);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
collapsed: false,
|
||||
currentIndex: 0
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
document.getElementById("salary_anchor_area").removeEventListener("scroll", this.handlerScroll);
|
||||
}
|
||||
|
||||
handlerScroll = () => {
|
||||
// 点击锚点时,不执行滚动函数
|
||||
if (this.isClickRef) return;
|
||||
// 获取滚动容器的滚动高度(这里相对于#salary_anchor_area滚动的)
|
||||
const scrollTop = document.getElementById("salary_anchor_area").scrollTop;
|
||||
// 获取所有wea-search-group anchor_开头的元素集合
|
||||
const contentList = document.querySelectorAll("[class^='wea-search-group anchor_']");
|
||||
const offsetTopArr = [];
|
||||
contentList.forEach((item) => {
|
||||
// 获取每个wea-search-group anchor_开头的元素的offsetTop
|
||||
offsetTopArr.push(item.offsetTop);
|
||||
});
|
||||
for (let i = 0; i < offsetTopArr.length; i++) {
|
||||
// 当滚动条高度达到对应wea-search-group anchor_开头的元素的滚动高度、则将锚点设置为高亮状态
|
||||
if (scrollTop + 190 >= offsetTopArr[i]) this.setState({ currentIndex: i });
|
||||
}
|
||||
};
|
||||
onClickAnchor = (item, index) => {
|
||||
const anchorElement = document.getElementById("salary_anchor_area");
|
||||
const el = document.querySelector(`.anchor_${item.salarySobItemGroupId}`);
|
||||
if (el) {
|
||||
anchorElement.scroll({ top: el.offsetTop, behavior: "smooth" });
|
||||
}
|
||||
this.setState({ currentIndex: index });
|
||||
// 点击时设置为true,为了防止同时执行滚动事件
|
||||
this.isClickRef = true;
|
||||
// 清除定时器,防止滚动事件触发、出现走马灯闪烁问题
|
||||
if (this.timerRef) clearTimeout(this.timerRef);
|
||||
this.timerRef = setTimeout(() => {
|
||||
this.isClickRef = false;
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { collapsed, currentIndex } = this.state, { datas } = this.props;
|
||||
return (
|
||||
<div id="anchorList-contianer" style={{ position: "sticky", top: 8, zIndex: 10086 }}>
|
||||
<div className={classnames("anchor-list-wrapper", { "anchor-list-collapsed": collapsed })}>
|
||||
{
|
||||
collapsed ?
|
||||
<div className="anchor-list-collapsed-btn">
|
||||
<i className="icon-coms02-Initialize-template"
|
||||
onClick={() => this.setState({ collapsed: !collapsed })}/>
|
||||
</div> :
|
||||
<React.Fragment>
|
||||
<div className="anchor-list-header">
|
||||
<i className="icon-coms-right" onClick={() => this.setState({ collapsed: !collapsed })}/>
|
||||
</div>
|
||||
<div className="anchor-list">
|
||||
<div className="anchor-list-ink">
|
||||
<span className="anchor-list-ink-ball visible"
|
||||
style={{ top: `${2.5 + currentIndex * 27.7}px`, height: 23 }}/>
|
||||
</div>
|
||||
{_.map(datas, (o, i) => (
|
||||
<div className={classnames("anchor-list-link", { "anchor-list-link-active": currentIndex === i })}
|
||||
onClick={() => this.onClickAnchor(o, i)}>
|
||||
<span
|
||||
className={classnames("anchor-list-link-title", { "anchor-list-link-title-active": currentIndex === i })}>{o.salarySobItemGroupName}</span>
|
||||
</div>)
|
||||
)}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CalcAnchorList;
|
||||
|
|
@ -8,7 +8,12 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { acctResultList, updateLockEmpStatus, updateLockStatus } from "../../../../../apis/calculate";
|
||||
import {
|
||||
acctResultList,
|
||||
updateLockEmpCellStatus,
|
||||
updateLockEmpStatus,
|
||||
updateLockStatus
|
||||
} from "../../../../../apis/calculate";
|
||||
import ProgressModal from "../../../../../components/progressModal";
|
||||
import BatchUpdateSalaryItemValDialog from "./batchUpdateSalaryItemValDialog";
|
||||
import EditSalaryCalcSlide from "./editSalaryCalcSlide";
|
||||
|
|
@ -25,7 +30,7 @@ class EditCalcTable extends Component {
|
|||
this.state = {
|
||||
loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: [], progressVisible: false, progress: 0,
|
||||
salaryCalcSlide: { visible: false, id: "" }, originPayloadData: {},
|
||||
salaryCalcSlide: { visible: false, id: "", viewAttr: 2 }, originPayloadData: {},
|
||||
batchUpdateDialog: {
|
||||
visible: false, salaryAcctRecordId: "", idList: [], salaryItemId: "",
|
||||
conditions: [], pattern: 0, dataType: ""
|
||||
|
|
@ -68,9 +73,9 @@ class EditCalcTable extends Component {
|
|||
this.updateEmpLockStatus({ ...params });
|
||||
break;
|
||||
case "EDIT":
|
||||
const { id: salaryCalcId } = params;
|
||||
const { id: salaryCalcId, showSee } = params;
|
||||
this.setState({
|
||||
salaryCalcSlide: { visible: true, id: salaryCalcId }
|
||||
salaryCalcSlide: { visible: true, id: salaryCalcId, viewAttr: showSee ? 1 : 2 }
|
||||
});
|
||||
break;
|
||||
case "DIAGRAM":
|
||||
|
|
@ -120,22 +125,23 @@ class EditCalcTable extends Component {
|
|||
}, 500);
|
||||
});
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
updateEmpLockStatus = (payload) => {
|
||||
const { lockStatus } = payload;
|
||||
const { lockStatus, salaryItemId } = payload;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: <div>
|
||||
|
|
@ -166,13 +172,16 @@ class EditCalcTable extends Component {
|
|||
}, 500);
|
||||
});
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
updateLockEmpStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
const params = salaryItemId ? payload : { ...payload, salaryAcctRecordId };
|
||||
const APIFunction = salaryItemId ? updateLockEmpCellStatus : updateLockEmpStatus;
|
||||
APIFunction(params).then(({ status, errormsg }) => {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
if (status) {
|
||||
clearInterval(this.timerLock);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => this.queryCalcResultList());
|
||||
this.queryCalcResultList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
|
|
@ -224,13 +233,13 @@ class EditCalcTable extends Component {
|
|||
"点击锁定所有解锁的项目值": getLabel(543649, "点击锁定所有解锁的项目值"),
|
||||
"点击解锁所有锁定的项目值": getLabel(543648, "点击解锁所有锁定的项目值"),
|
||||
"锁定的项目值": getLabel(543647, "锁定的项目值"),
|
||||
"当前状态锁定,点击解锁": getLabel(111, "当前状态锁定,点击解锁"),
|
||||
"当前状态未锁定,点击锁定": getLabel(111, "当前状态未锁定,点击锁定"),
|
||||
"当前状态锁定,右击解锁": getLabel(111, "当前状态锁定,右击解锁"),
|
||||
"当前状态未锁定,右击锁定": getLabel(111, "当前状态未锁定,右击锁定"),
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
||||
"批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图"), "锁定": getLabel(111, "锁定"),
|
||||
"解锁": getLabel(111, "解锁")
|
||||
"解锁": getLabel(111, "解锁"), "查看": getLabel(111, "查看")
|
||||
};
|
||||
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
|
|
@ -261,7 +270,7 @@ class EditCalcTable extends Component {
|
|||
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, sumRowlistUrl, payload,
|
||||
calcDetail,
|
||||
calcDetail, showSee: calcDetail,
|
||||
columns: _.every(traverse(columns, calcDetail), (it, idx) => !it.fixed) ? _.map(traverse(columns, calcDetail), (it, idx) => ({
|
||||
...it,
|
||||
fixed: idx < 2 ? "left" : false
|
||||
|
|
@ -296,10 +305,7 @@ class EditCalcTable extends Component {
|
|||
/>
|
||||
<EditSalaryCalcSlide {...salaryCalcSlide}
|
||||
onClose={(isFresh) => this.setState({
|
||||
salaryCalcSlide: {
|
||||
visible: false,
|
||||
id: ""
|
||||
}
|
||||
salaryCalcSlide: { visible: false, id: "", viewAttr: 2 }
|
||||
}, () => isFresh === "true" && this.queryCalcResultList())}/>
|
||||
{
|
||||
progressVisible &&
|
||||
|
|
@ -324,7 +330,7 @@ const traverse = (arr, calcDetail) => {
|
|||
return _.map(arr, item => {
|
||||
if (!_.isEmpty(item.children)) {
|
||||
return {
|
||||
title: item.text, width: item.width + "px", ellipsis: true,
|
||||
title: item.text, width: item.width + "px", ellipsis: true, calcDetail,
|
||||
dataIndex: item.column, children: traverse(item.children, calcDetail),
|
||||
fixed: item.fixed || false, dataType: item.dataType, align: "center"
|
||||
};
|
||||
|
|
@ -336,4 +342,4 @@ const traverse = (arr, calcDetail) => {
|
|||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
@ -12,9 +12,9 @@ import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
|
|||
import IssuedAndReissueTable from "../../../../calculateDetail/issuedAndReissueTable";
|
||||
import { acctresultDetail, saveAcctResult } from "../../../../../apis/calculate";
|
||||
import { toDecimal_n } from "../../../../../util";
|
||||
import CalcAnchorList from "./calcAnchorList";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class EditSalaryCalcSlide extends Component {
|
||||
|
|
@ -29,7 +29,7 @@ class EditSalaryCalcSlide extends Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.acctresultDetail(nextProps.id);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ selectedKey: "0" });
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ selectedKey: "0" }, () => document.getElementById("salary_anchor_area").scrollTop = 0);
|
||||
}
|
||||
|
||||
acctresultDetail = (id) => {
|
||||
|
|
@ -43,14 +43,17 @@ class EditSalaryCalcSlide extends Component {
|
|||
});
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { loading } = this.state;
|
||||
const { loading, itemsByGroup } = this.state, { viewAttr } = this.props;
|
||||
return <div className="titleDialog">
|
||||
<div className="titleCol titleLeftBox">
|
||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||
<div className="title">{getLabel(543559, "编辑薪资")}</div>
|
||||
<div className="title">{viewAttr === 2 ? getLabel(543559, "编辑薪资") : getLabel(111, "查看薪资")}</div>
|
||||
</div>
|
||||
<div className="titleCol titleRightBox">
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
{
|
||||
viewAttr === 2 &&
|
||||
<Button type="primary" disabled={_.isEmpty(itemsByGroup)} onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
}
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
|
@ -88,7 +91,7 @@ class EditSalaryCalcSlide extends Component {
|
|||
save = () => {
|
||||
const { id: salaryAcctEmpId } = this.props;
|
||||
const { issuedAndReissueItems, itemsByGroup, baseInfo } = this.state;
|
||||
if (_.every(baseInfo, it => !it.canEdit || (it.canEdit && !it.fieldValue))) {
|
||||
if (!_.every(baseInfo, (item) => (!item.canEdit || !!item.fieldValue))) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
|
|
@ -96,7 +99,8 @@ class EditSalaryCalcSlide extends Component {
|
|||
return;
|
||||
}
|
||||
const payload = {
|
||||
salaryAcctEmpId, employeeInfos: baseInfo,
|
||||
salaryAcctEmpId,
|
||||
employeeInfos: _.map(baseInfo, o => ({ ...o, fieldValue: o.fieldValue.id || o.fieldValue })),
|
||||
items: [
|
||||
..._.reduce(itemsByGroup, (pre, cur) => {
|
||||
return [
|
||||
|
|
@ -139,7 +143,9 @@ class EditSalaryCalcSlide extends Component {
|
|||
className="salary-calculate-esf-layout" {...this.props}
|
||||
top={0} width={60} height={100} measure={"%"}
|
||||
direction={"right"} title={this.renderTitle()}
|
||||
content={<div className="salary-calculate-esf-area">
|
||||
content={<div className="salary-calculate-esf-area" id="salary_anchor_area">
|
||||
{/*锚点*/}
|
||||
<CalcAnchorList datas={itemsByGroup} visible={this.props.visible}/>
|
||||
<EditSalaryBaseInfo {...this.props} baseInfo={baseInfo}
|
||||
onChange={baseInfo => this.setState({ baseInfo })}/>
|
||||
<WeaTab keyParam="viewcondition" className="calc-esf-tab"
|
||||
|
|
@ -148,12 +154,14 @@ class EditSalaryCalcSlide extends Component {
|
|||
/>
|
||||
{
|
||||
selectedKey === "0" && _.map(itemsByGroup, item => {
|
||||
return <PayrollItemsTable {...item} onChangeIssueReissueValue={this.handleItemValueChange}/>;
|
||||
return <PayrollItemsTable {...this.props} {...item}
|
||||
onChangeIssueReissueValue={this.handleItemValueChange}/>;
|
||||
})
|
||||
}
|
||||
{
|
||||
selectedKey === "1" &&
|
||||
<IssuedAndReissueTable
|
||||
{...this.props}
|
||||
dataSource={issuedAndReissueItems}
|
||||
onChangeIssueReissueValue={this.handleItemValueChange}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@
|
|||
height: 100%;
|
||||
|
||||
.salary-calculate-esf-area {
|
||||
position: relative;
|
||||
background: #f6f6f6;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
|
@ -154,6 +155,10 @@
|
|||
|
||||
.esf-base-info-form, .wea-title, .wea-content {
|
||||
padding: 0;
|
||||
|
||||
.ant-row {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.esf-form-content {
|
||||
|
|
@ -196,6 +201,111 @@
|
|||
.wea-search-group {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
//锚点按钮
|
||||
.anchor-list-collapsed {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.anchor-list-wrapper {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin: 10px 15px 20px;
|
||||
padding: 8px 10px;
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 3px 12px 0 rgba(0, 0, 0, .12);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
.anchor-list-collapsed-btn {
|
||||
opacity: .5;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.anchor-list-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
min-width: 130px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.anchor-list {
|
||||
padding: 0 10px;
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
transition: margin-top .3s;
|
||||
max-height: 80vh;
|
||||
overflow: auto;
|
||||
|
||||
.anchor-list-ink {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 5px;
|
||||
height: 100%;
|
||||
|
||||
.anchor-list-ink-ball.visible {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.anchor-list-ink-ball {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
display: none;
|
||||
width: 3px;
|
||||
height: 8px;
|
||||
background-color: #5d9cec;
|
||||
border: 1.5px solid #5d9cec;
|
||||
border-radius: 8px;
|
||||
transform: translateX(-50%);
|
||||
transition: top .3s ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
.anchor-list-ink:before {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
background-color: #f0f0f0;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.anchor-list-link {
|
||||
padding: 7px 0 7px 10px;
|
||||
line-height: 1.143;
|
||||
|
||||
.anchor-list-link-title {
|
||||
position: relative;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
transition: all .3s;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.anchor-list-link-active > .anchor-list-link-title {
|
||||
color: #5d9cec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class PersonAbnormalDialog extends Component {
|
|||
<WeaDialog
|
||||
{...this.props}
|
||||
scalable hasScroll className="declareResultDialog" initLoadCss
|
||||
title={getLabel(111, "未报送人员")}
|
||||
title={getLabel(111, "未报送人员")} ref={dom => this.errorRef = dom}
|
||||
style={{
|
||||
width: 1150, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
|
|
@ -73,7 +73,7 @@ class PersonAbnormalDialog extends Component {
|
|||
<WeaTable
|
||||
columns={columns} dataSource={dataSource}
|
||||
loading={loading} className="declareTable"
|
||||
pagination={pagination}
|
||||
pagination={pagination} scroll={{ y: this.errorRef ? this.errorRef.state.height - 124 : 600 }}
|
||||
/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ class Index extends Component {
|
|||
}
|
||||
}, () => {
|
||||
const { selectItems: salaryItems } = this.state.headerFieldsDialog;
|
||||
cacheImportField({ salaryItems: salaryItems ? salaryItems.split(",") : [] })
|
||||
cacheImportField({ salaryAcctRecordId, salaryItemIds: salaryItems ? salaryItems.split(",") : [] })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
const payload = {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
const { attendCycle, salaryCycle, salaryMonth, socialSecurityCycle } = this.props;
|
||||
const { attendCycle, salaryCycle, taxCycle, salaryMonth, socialSecurityCycle } = this.props;
|
||||
const { fromDate: attendFromDate, endDate: attendEndDate } = attendCycle,
|
||||
{ fromDate: salaryFromDate, endDate: salaryEndDate } = salaryCycle;
|
||||
return (
|
||||
|
|
@ -23,7 +23,7 @@ class Index extends Component {
|
|||
</div>
|
||||
<div className="line">
|
||||
<div className="lable">{getLabel(542240, "税款所属期")}</div>
|
||||
<div className="value">{salaryMonth}</div>
|
||||
<div className="value">{taxCycle || salaryMonth}</div>
|
||||
</div>
|
||||
<div className="line">
|
||||
<div className="lable">{getLabel(543475, "考勤取值周期")}</div>
|
||||
|
|
|
|||
|
|
@ -32,12 +32,19 @@ class Index extends Component {
|
|||
selectedKey: "person", progressVisible: false, progress: 0, loading: { calcTax: false, feedback: false },
|
||||
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
|
||||
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
|
||||
approvalInfo: {},//审批信息,
|
||||
accountExceptInfo: "" //核算报错信息,
|
||||
};
|
||||
this.calc = null;
|
||||
this.timer = null;
|
||||
}
|
||||
|
||||
init = () => {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
API.getApprovalInfoByRecordId({ salaryAcctRecordId }).then(({ status, data: approvalInfo }) => {
|
||||
if (status) this.setState({ approvalInfo });
|
||||
});
|
||||
};
|
||||
handleMenuClick = ({ key }) => {
|
||||
switch (key) {
|
||||
case "calc_selected":
|
||||
|
|
@ -129,6 +136,15 @@ class Index extends Component {
|
|||
case "offlineCompare":
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcOc/${salaryAcctRecordId}`, "_blank");
|
||||
break;
|
||||
case "LOCK":
|
||||
case "UNLOCK":
|
||||
const { selectedRowKeys } = this.calc.calcTableRef.wrappedInstance.state;
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
message.warning(getLabel(543303, "请选择表格数据!"));
|
||||
return;
|
||||
}
|
||||
this.calc.calcTableRef.wrappedInstance.updateEmpLockStatus({ lockStatus: key, acctEmpIds: selectedRowKeys });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -197,7 +213,9 @@ class Index extends Component {
|
|||
});
|
||||
};
|
||||
renderReqBtns = () => {
|
||||
const { selectedKey, accountExceptInfo, loading } = this.state;
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
const { selectedKey, accountExceptInfo, approvalInfo, loading } = this.state;
|
||||
const { isOpenApproval, approvalWorkflowUrl, canEdit } = approvalInfo;
|
||||
let reqBtns = [];
|
||||
switch (selectedKey) {
|
||||
case "calc":
|
||||
|
|
@ -208,10 +226,12 @@ class Index extends Component {
|
|||
);
|
||||
const moreMenu = (
|
||||
<Menu onClick={this.handleMoreMenuClick}>
|
||||
<Menu.Item key="import">{getLabel(32935, "导入")}</Menu.Item>
|
||||
{canEdit && <Menu.Item key="import">{getLabel(32935, "导入")}</Menu.Item>}
|
||||
<Menu.Item key="exportAll">{getLabel(81272, "导出全部")}</Menu.Item>
|
||||
<Menu.Item key="export_custom">{getLabel(544270, "自定义导出")}</Menu.Item>
|
||||
<Menu.Item key="offlineCompare">{getLabel(543249, "线下对比")}</Menu.Item>
|
||||
<Menu.Item key="LOCK">{getLabel(111, "批量锁定")}</Menu.Item>
|
||||
<Menu.Item key="UNLOCK">{getLabel(111, "批量解锁")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
reqBtns = [
|
||||
|
|
@ -226,6 +246,10 @@ class Index extends Component {
|
|||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
|
||||
];
|
||||
!canEdit && reqBtns.splice(0, 1);
|
||||
isOpenApproval && reqBtns.unshift(<Button type="ghost" onClick={() => {
|
||||
window.open(`${approvalWorkflowUrl}&salaryAcctRecordId=${salaryAcctRecordId}`, "_blank");
|
||||
}}>{getLabel(111, "发起审批")}</Button>);
|
||||
accountExceptInfo && reqBtns.unshift(<i className="iconfont icon-jinggao"
|
||||
title={getLabel(111, "存在异常信息,点击下载!")}
|
||||
onClick={() => this.downloadTxtfile(accountExceptInfo)}/>);
|
||||
|
|
@ -252,14 +276,15 @@ class Index extends Component {
|
|||
element.click();
|
||||
};
|
||||
renderContent = () => {
|
||||
const { selectedKey } = this.state;
|
||||
const { selectedKey, approvalInfo } = this.state;
|
||||
const { canEdit } = approvalInfo;
|
||||
let dom = null;
|
||||
switch (selectedKey) {
|
||||
case "person":
|
||||
dom = <SalaryCalcPersonConfirm {...this.props}/>;
|
||||
dom = <SalaryCalcPersonConfirm calcDetail={!canEdit} {...this.props}/>;
|
||||
break;
|
||||
case "calc":
|
||||
dom = <SalaryEditCalc {...this.props} ref={dom => this.calc = dom}/>;
|
||||
dom = <SalaryEditCalc {...this.props} calcDetail={!canEdit} ref={dom => this.calc = dom}/>;
|
||||
break;
|
||||
case "diff":
|
||||
dom = <SalaryEditAccounting {...this.props} api={acctDifferList} calcDetail notShowTotalCell
|
||||
|
|
@ -280,7 +305,7 @@ class Index extends Component {
|
|||
const { calculateStore: { setOtherConditions } } = this.props;
|
||||
const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog } = this.state;
|
||||
return (
|
||||
<Layout {...this.props}>
|
||||
<Layout {...this.props} init={this.init}>
|
||||
<div className="salary-calculate-do-calc">
|
||||
<WeaReqTop
|
||||
title={getLabel(538011, "薪资核算")} tabDatas={tabs} selectedKey={selectedKey}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
.advance-custom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > a {
|
||||
border-radius: 0;
|
||||
height: 28px;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-left: none
|
||||
}
|
||||
}
|
||||
|
||||
.wea-input-focus {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
|
@ -72,10 +90,38 @@
|
|||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.advance-calc {
|
||||
display: none;
|
||||
background: #FFF;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.advance-calc-btns {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 15px 0;
|
||||
border-top: 1px solid #dadada;
|
||||
|
||||
button {
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.show-advance-calc {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.calculate-body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 8px 16px 0 16px;
|
||||
background: #F6F6F6;
|
||||
|
||||
.wea-new-table {
|
||||
background: #fff;
|
||||
|
|
@ -83,7 +129,7 @@
|
|||
|
||||
.ant-table-tbody {
|
||||
.ant-table-row-indent {
|
||||
display: none!important;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
td:not(.ant-table-selection-column) {
|
||||
|
|
|
|||
|
|
@ -29,10 +29,11 @@ class IssuedAndReissueTable extends Component {
|
|||
/>
|
||||
</span>,
|
||||
render: (text, record) => {
|
||||
const { canEdit, pattern } = record;
|
||||
const { canEdit, pattern } = record, { viewAttr } = this.props;
|
||||
return <WeaInputNumber
|
||||
disabled={!canEdit}
|
||||
min={0}
|
||||
viewAttr={viewAttr}
|
||||
precision={pattern || 2}
|
||||
value={text || 0}
|
||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemName, value, "issuedAndReissueItems")}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,9 @@ class PayrollItemsTable extends Component {
|
|||
</span>,
|
||||
width: "20%",
|
||||
render: (text, record) => {
|
||||
const { canEdit, dataType, pattern } = record;
|
||||
const { canEdit, dataType, pattern } = record, { viewAttr } = this.props;
|
||||
return dataType === "number" ? <WeaInputNumber
|
||||
viewAttr={viewAttr}
|
||||
disabled={!canEdit}
|
||||
precision={!_.isNil(pattern) ? pattern : 0}
|
||||
value={text || 0}
|
||||
|
|
@ -46,6 +47,7 @@ class PayrollItemsTable extends Component {
|
|||
/> : <WeaInput
|
||||
disabled={!canEdit}
|
||||
value={text}
|
||||
viewAttr={viewAttr}
|
||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
|
||||
/>;
|
||||
}
|
||||
|
|
@ -66,7 +68,7 @@ class PayrollItemsTable extends Component {
|
|||
}
|
||||
];
|
||||
return (
|
||||
<WeaSearchGroup title={salarySobItemGroupName} showGroup needTigger>
|
||||
<WeaSearchGroup title={salarySobItemGroupName} showGroup needTigger className={`anchor_${salarySobItemGroupId}`}>
|
||||
<WeaTable
|
||||
rowKey="salaryItemId"
|
||||
dataSource={dataSource}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaFormItem } from "ecCom";
|
||||
import { getDomkes, getSearchs } from "../../util";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { getDomkes, toDecimal_n } from "../../util";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import "./index.less";
|
||||
|
||||
class AddItems extends Component {
|
||||
|
|
@ -60,9 +62,207 @@ class AddItems extends Component {
|
|||
|
||||
render() {
|
||||
const { form, condition = [] } = this.props;
|
||||
const itemRender = {
|
||||
// 累计专项附加扣除
|
||||
addUpChildEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpChildEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpContinuingEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpContinuingEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpHousingLoanInterest: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpHousingLoanInterest: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpHousingRent: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpHousingRent: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpSupportElderly: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpSupportElderly: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpIllnessMedical: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpIllnessMedical: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpInfantCare: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpInfantCare: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
//专项附加扣除
|
||||
childrenEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ childrenEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
continuingEducation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ continuingEducation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
housingLoanInterest: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ housingLoanInterest: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
housingRent: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ housingRent: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
supportingElder: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ supportingElder: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
seriousIllnessTreatment: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ seriousIllnessTreatment: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
infantCare: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ infantCare: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
//往期累计情况(工资、薪金)
|
||||
addUpIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpIncome: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpSubtraction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpSubtraction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpSocialSecurityTotal: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpSocialSecurityTotal: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpAccumulationFundTotal: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpAccumulationFundTotal: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpEnterpriseAndOther: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpEnterpriseAndOther: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpOtherDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpOtherDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpTaxExemptIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpTaxExemptIncome: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpAllowedDonation: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpAllowedDonation: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpTaxSavings: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpTaxSavings: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpAdvanceTax: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpAdvanceTax: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
actualAddUpAdvanceTax: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ actualAddUpAdvanceTax: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
taxAdjustment: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ taxAdjustment: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
addUpTaxableIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ addUpTaxableIncome: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
// 其他免税扣除
|
||||
freeIncome: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ freeIncome: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
businessHealthyInsurance: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ businessHealthyInsurance: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
taxDelayEndowmentInsurance: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ taxDelayEndowmentInsurance: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
deductionAllowedDonation: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ deductionAllowedDonation: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
derateDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ derateDeduction: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
otherDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ otherDeduction: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
},
|
||||
privatePension: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ privatePension: { value: toDecimal_n(v, 2) } })}/>
|
||||
{field.extraDom && field.extraDom}
|
||||
</React.Fragment>);
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="addItemsWrapper">
|
||||
{getSearchs(form, condition)}
|
||||
<div className="addItemsWrapper form-dialog-layout">
|
||||
<FormInfo center={false} form={form} formFields={condition} colCount={2} custLabelCol={8}
|
||||
itemRender={itemRender}/>
|
||||
<Tips><span>若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据</span></Tips>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
* Date: 2023/3/7
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { viewAttendQuote } from "../../../../apis/attendance";
|
||||
import { Button, Spin } from "antd";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -16,11 +16,31 @@ class AttendanceDataViewSlide extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: { query: false }, keyword: "", dataSource: [], columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
loading: { query: false }, keyword: "", dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "turn") {
|
||||
switch (id) {
|
||||
case "PAGEINFO":
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.viewAttendQuote());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
|
||||
|
|
@ -33,20 +53,29 @@ class AttendanceDataViewSlide extends Component {
|
|||
|
||||
viewAttendQuote = (extraPayload = {}, props) => {
|
||||
const { loading, pageInfo, keyword } = this.state;
|
||||
const { attendQuoteId } = props;
|
||||
const { attendQuoteId } = props || this.props;
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
// o.dataIndex === "username" ? "left" :
|
||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
|
||||
});
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
|
||||
}, () => this.postMessageToChild({
|
||||
pageInfo: this.state.pageInfo, dataSource, showRowSelection: false, unitTableType: "attendanceView",
|
||||
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : false }))
|
||||
}));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
|
||||
"条": getLabel(18256, "条")
|
||||
};
|
||||
const childFrameObj = document.getElementById("attendanceViewTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
handleExportAttendQuote = () => {
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
|
|
@ -61,24 +90,7 @@ class AttendanceDataViewSlide extends Component {
|
|||
|
||||
render() {
|
||||
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
|
||||
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.viewAttendQuote({}, this.props));
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.viewAttendQuote({}, this.props));
|
||||
}
|
||||
};
|
||||
const { loading, keyword } = this.state;
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||
<WeaInputSearch
|
||||
|
|
@ -101,9 +113,16 @@ class AttendanceDataViewSlide extends Component {
|
|||
<div>{getLabel(543376, "考勤周期")}:{salaryYearMonth}</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource} bordered pagination={pagination}
|
||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 225px)` }}/>
|
||||
<div style={{ height: `calc(100% - 40px)` }}>
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/unitTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
|
||||
id="attendanceViewTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@
|
|||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,15 @@
|
|||
flex-direction: column;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 8px 16px 0 16px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
background: #FFF;
|
||||
margin: 8px 16px 0 16px;
|
||||
|
||||
.wea-form-item-label {
|
||||
line-height: 46px !important;
|
||||
padding-left: 8px !important;
|
||||
}
|
||||
|
||||
.to {
|
||||
padding: 0 10px
|
||||
|
|
@ -15,7 +23,7 @@
|
|||
flex: 1;
|
||||
overflow: hidden;
|
||||
background: #FFF;
|
||||
margin: 16px;
|
||||
margin: 8px 16px;
|
||||
}
|
||||
|
||||
.linkWapper {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,41 @@
|
|||
.tableRecordWrapper {
|
||||
padding: 0 16px;
|
||||
|
||||
.form-dialog-layout {
|
||||
padding: 0 !important;
|
||||
|
||||
.wea-search-group {
|
||||
padding: 16px 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-form-cell-wrapper {
|
||||
& > div:first-child {
|
||||
height: 47px !important;
|
||||
line-height: 47px;
|
||||
}
|
||||
|
||||
& > div:last-child {
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
|
||||
.to {
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.accumulated {
|
||||
.wea-form-cell-wrapper {
|
||||
& > div:first-child {
|
||||
height: 46px !important;
|
||||
line-height: 46px;
|
||||
height: 47px !important;
|
||||
line-height: 47px;
|
||||
}
|
||||
|
||||
& > div:nth-child(2) {
|
||||
//width: 40% !important;
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: flex !important;
|
||||
|
|
@ -18,10 +46,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > div:last-child {
|
||||
//width: 40% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,13 @@
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaSearchGroup } from "ecCom";
|
||||
import UnifiedTable from "../../../components/UnifiedTable";
|
||||
import { WeaLocaleProvider, WeaSearchGroup, WeaTable } from "ecCom";
|
||||
import { getTableRecordDate } from "../../../apis/cumDeduct";
|
||||
import { DataCollectionDateRangePick, DataCollectionSelect, Input } from "../cumDeduct";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class TableRecord extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -87,9 +88,22 @@ class TableRecord extends Component {
|
|||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: _.map(columns, (o, i) => {
|
||||
let col = {
|
||||
...o, width: 110,
|
||||
render: text => (<span className="dataAc-ellipsis" title={text}>{text}</span>)
|
||||
};
|
||||
switch (o.dataIndex) {
|
||||
case "taxAgentName":
|
||||
col = { ...col, width: 180 };
|
||||
break;
|
||||
default:
|
||||
col = { ...col };
|
||||
break;
|
||||
}
|
||||
return i === 0 ? { ...col, fixed: "left" } : col;
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
|
|
@ -155,19 +169,11 @@ class TableRecord extends Component {
|
|||
};
|
||||
const items = screenParams.length === 1 ? [
|
||||
{
|
||||
com: Input({ value: record.username })
|
||||
com: Input({ label: getLabel(111, "姓名"), value: record.username })
|
||||
}
|
||||
] : [
|
||||
{
|
||||
com: Input({ value: record.username })
|
||||
},
|
||||
{
|
||||
com: DataCollectionDateRangePick({
|
||||
label: "税款所属期",
|
||||
range: recordPayload[screenParams[screenParams.length - 1]] || [],
|
||||
onChange: this.handleTablerecordScreen,
|
||||
key: screenParams[screenParams.length - 1]
|
||||
})
|
||||
com: Input({ label: getLabel(111, "姓名"), value: record.username })
|
||||
},
|
||||
{
|
||||
com: DataCollectionSelect({
|
||||
|
|
@ -177,28 +183,26 @@ class TableRecord extends Component {
|
|||
onChange: this.handleTablerecordScreen,
|
||||
key: "taxAgentId"
|
||||
})
|
||||
},
|
||||
{
|
||||
com: DataCollectionDateRangePick({
|
||||
label: "税款所属期",
|
||||
range: recordPayload[screenParams[screenParams.length - 1]] || [],
|
||||
onChange: this.handleTablerecordScreen,
|
||||
key: screenParams[screenParams.length - 1]
|
||||
})
|
||||
}
|
||||
];
|
||||
return (
|
||||
<div className="tableRecordWrapper">
|
||||
{
|
||||
!_.isEmpty(screenParams) &&
|
||||
<WeaSearchGroup className={className} showGroup needTigger={false} items={items} col={width > 1280 ? 3 : 2}/>
|
||||
<div className="form-dialog-layout">
|
||||
<WeaSearchGroup className={className} showGroup needTigger={false} items={items} col={2}/>
|
||||
</div>
|
||||
}
|
||||
<UnifiedTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
columns={_.map(columns, item => ({
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}> {text} </span>;
|
||||
}
|
||||
}))}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={columns.length * 180}
|
||||
/>
|
||||
<WeaTable rowKey="id" rowSelection={rowSelection} bordered dataSource={dataSource} pagination={pagination}
|
||||
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 310px)` }} columns={columns}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,400 +1,3 @@
|
|||
export const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
export const modalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "addUpChildEducation",
|
||||
key: "addUpChildEducation"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "addUpContinuingEducation",
|
||||
key: "addUpContinuingEducation"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "addUpHousingLoanInterest",
|
||||
key: "addUpHousingLoanInterest"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "addUpHousingRent",
|
||||
key: "addUpHousingRent"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "addUpSupportElderly",
|
||||
key: "addUpSupportElderly"
|
||||
},
|
||||
{
|
||||
title: "累计婴幼儿照护",
|
||||
dataIndex: "addUpInfantCare",
|
||||
key: "addUpInfantCare"
|
||||
},
|
||||
{
|
||||
title: "累计大病医疗",
|
||||
dataIndex: "addUpIllnessMedical",
|
||||
key: "addUpIllnessMedical"
|
||||
}
|
||||
];
|
||||
export const specialModalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "子女教育",
|
||||
dataIndex: "childrenEducation",
|
||||
key: "childrenEducation"
|
||||
},
|
||||
{
|
||||
title: "继续教育",
|
||||
dataIndex: "continuingEducation",
|
||||
key: "continuingEducation"
|
||||
},
|
||||
{
|
||||
title: "住房贷款利息",
|
||||
dataIndex: "housingLoanInterest",
|
||||
key: "housingLoanInterest"
|
||||
},
|
||||
{
|
||||
title: "住房租金",
|
||||
dataIndex: "housingRent",
|
||||
key: "housingRent"
|
||||
},
|
||||
{
|
||||
title: "赡养老人",
|
||||
dataIndex: "supportingElder",
|
||||
key: "supportingElder"
|
||||
},
|
||||
{
|
||||
title: "婴幼儿照护",
|
||||
dataIndex: "infantCare",
|
||||
key: "infantCare"
|
||||
},
|
||||
{
|
||||
title: "大病医疗",
|
||||
dataIndex: "seriousIllnessTreatment",
|
||||
key: "seriousIllnessTreatment"
|
||||
}
|
||||
];
|
||||
export const otherModalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "商业健康保险",
|
||||
dataIndex: "businessHealthyInsurance",
|
||||
key: "businessHealthyInsurance"
|
||||
},
|
||||
{
|
||||
title: "税延养老保险",
|
||||
dataIndex: "taxDelayEndowmentInsurance",
|
||||
key: "taxDelayEndowmentInsurance"
|
||||
},
|
||||
{
|
||||
title: "其他",
|
||||
dataIndex: "otherDeduction",
|
||||
key: "otherDeduction"
|
||||
},
|
||||
{
|
||||
title: "准予扣除的捐赠额",
|
||||
dataIndex: "deductionAllowedDonation",
|
||||
key: "deductionAllowedDonation"
|
||||
}
|
||||
];
|
||||
export const situationModalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "累计收入额",
|
||||
dataIndex: "addUpIncome",
|
||||
key: "addUpIncome"
|
||||
},
|
||||
{
|
||||
title: "累计减除费用",
|
||||
dataIndex: "addUpSubtraction",
|
||||
key: "addUpSubtraction"
|
||||
},
|
||||
{
|
||||
title: "累计社保个人合计",
|
||||
dataIndex: "addUpSocialSecurityTotal",
|
||||
key: "addUpSocialSecurityTotal"
|
||||
},
|
||||
{
|
||||
title: "累计公积金个人合计",
|
||||
dataIndex: "addUpAccumulationFundTotal",
|
||||
key: "addUpAccumulationFundTotal"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "addUpChildEducation",
|
||||
key: "addUpChildEducation"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "addUpContinuingEducation",
|
||||
key: "addUpContinuingEducation"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "addUpHousingLoanInterest",
|
||||
key: "addUpHousingLoanInterest"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "addUpHousingRent",
|
||||
key: "addUpHousingRent"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "addUpSupportElderly",
|
||||
key: "addUpSupportElderly"
|
||||
},
|
||||
{
|
||||
title: "累计企业(职业)年金及其他福利",
|
||||
dataIndex: "addUpEnterpriseAndOther",
|
||||
key: "addUpEnterpriseAndOther"
|
||||
},
|
||||
{
|
||||
title: "累计其他免税扣除",
|
||||
dataIndex: "addUpOtherDeduction",
|
||||
key: "addUpOtherDeduction"
|
||||
},
|
||||
{
|
||||
title: "累计免税收入",
|
||||
dataIndex: "addUpTaxExemptIncome",
|
||||
key: "addUpTaxExemptIncome"
|
||||
},
|
||||
{
|
||||
title: "累计准予扣除的捐赠额",
|
||||
dataIndex: "addUpAllowedDonation",
|
||||
key: "addUpAllowedDonation"
|
||||
},
|
||||
{
|
||||
title: "累计减免税额",
|
||||
dataIndex: "addUpTaxSavings",
|
||||
key: "addUpTaxSavings"
|
||||
},
|
||||
{
|
||||
title: "累计已预扣预缴税额",
|
||||
dataIndex: "addUpAdvanceTax",
|
||||
key: "addUpAdvanceTax"
|
||||
},
|
||||
{
|
||||
title: "累计婴幼儿照护",
|
||||
dataIndex: "addUpInfantCare",
|
||||
key: "addUpInfantCare"
|
||||
},
|
||||
{
|
||||
title: "累计大病医疗",
|
||||
dataIndex: "addUpIllnessMedical",
|
||||
key: "addUpIllnessMedical"
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
|
||||
export const dataSource = [];
|
||||
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -404,7 +7,7 @@ export const dataCollectCondition = [
|
|||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
|
|
@ -414,7 +17,7 @@ export const dataCollectCondition = [
|
|||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
|
|
@ -448,7 +51,7 @@ export const dataCollectCondition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import TableRecord from "../components/tableRecord";
|
|||
import { dataCollectCondition } from "./columns";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { getDomkes } from "../../../util";
|
||||
import Layout from "../layout";
|
||||
import moment from "moment";
|
||||
import SalaryCumDeductChooseTaxPeriodDialog from "./components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
|
|
@ -253,6 +254,7 @@ class Index extends Component {
|
|||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
|
|
@ -346,7 +348,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
@ -524,11 +526,15 @@ class Index extends Component {
|
|||
|
||||
onlineFeedback = () => {
|
||||
this.setState({ feedbackLoading: true });
|
||||
onlineFeedback().then(({ status, errormsg }) => {
|
||||
onlineFeedback().then(({ status, data, errormsg }) => {
|
||||
this.setState({ feedbackLoading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.tableRef.getTableDate();
|
||||
if (data.finish) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.tableRef.getTableDate();
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
|
|
@ -603,8 +609,10 @@ export const DataCollectionSelect = (props) => {
|
|||
};
|
||||
|
||||
export const Input = (props) => {
|
||||
const { value } = props;
|
||||
return (<WeaInput value={value} viewAttr={1}/>);
|
||||
const { value, label } = props;
|
||||
return (<WeaFormItem label={label} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaInput value={value} viewAttr={1}/>
|
||||
</WeaFormItem>);
|
||||
};
|
||||
export const DataCollectionDateRangePick = (props) => {
|
||||
const { range, label, onChange, format = "YYYY-MM", key } = props;
|
||||
|
|
|
|||
|
|
@ -1,70 +1,3 @@
|
|||
export const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -74,7 +7,7 @@ export const dataCollectCondition = [
|
|||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
|
|
@ -84,7 +17,7 @@ export const dataCollectCondition = [
|
|||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
|
|
@ -133,7 +66,7 @@ export const dataCollectCondition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
@ -321,8 +254,9 @@ export const dataCollectCondition = [
|
|||
domkey: ["taxAdjustment"],
|
||||
fieldcol: 14,
|
||||
label: "个税调差",
|
||||
helpfulTitle: "1、【个税调差】=【实际累计已预扣预缴税额】-【累计已预扣预缴税额】。\n" +
|
||||
helpfulTip: "1、【个税调差】=【实际累计已预扣预缴税额】-【累计已预扣预缴税额】。\n" +
|
||||
"2、直接输入或导入【个税调差】值,则以输入/导入为准,公式失效。再次编辑减数或被减数,会再次按公式自动计算。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
|
|
@ -337,7 +271,7 @@ export const dataCollectCondition = [
|
|||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
}
|
||||
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import AddItems from "../addItems";
|
|||
import TableRecord from "../components/tableRecord";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
import { getDomkes } from "../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -335,7 +336,7 @@ class Index extends Component {
|
|||
const { addAllLoading, incomeTaxStatus } = this.state;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
<Button type="ghost" onClick={this.handleOnlineAccess}>{getLabel(111, "在线获取")}</Button>,
|
||||
// <Button type="ghost" onClick={this.handleOnlineAccess}>{getLabel(111, "在线获取")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
<Dropdown
|
||||
overlay={
|
||||
|
|
@ -416,7 +417,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
@ -429,6 +430,7 @@ class Index extends Component {
|
|||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import UnifiedTable from "../../components/UnifiedTable";
|
||||
import { getTableDate } from "../../apis/cumDeduct";
|
||||
import { Menu, Popover } from "antd";
|
||||
import { Spin } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -16,25 +15,53 @@ class DataTables extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
selectedRowKeys: [],
|
||||
pageInfo: {
|
||||
current: 1, pageSize: 10, total: 0
|
||||
}
|
||||
loading: { query: false }, dataSource: [], columns: [], selectedRowKeys: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getTableDate();
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.getTableDate();
|
||||
} else if (type === "turn") {
|
||||
switch (id) {
|
||||
case "PAGEINFO":
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.getTableDate());
|
||||
break;
|
||||
case "CHECKBOX":
|
||||
const { selectedRowKeys } = params;
|
||||
this.setState({ selectedRowKeys });
|
||||
break;
|
||||
case "DEL":
|
||||
this.props.onTableOperate({ key: "deleteSelectAddUpDeduction" }, params);
|
||||
break;
|
||||
case "EDIT":
|
||||
this.props.onTableOperate({ key: "handleAddData" }, params);
|
||||
break;
|
||||
case "VIEW":
|
||||
this.props.onViewDetails(params);
|
||||
break;
|
||||
case "log":
|
||||
this.props.onTableOperate({ key: "log" }, params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getTableDate = (extraPayload = {}) => {
|
||||
const { loading, pageInfo } = this.state;
|
||||
const { url, payload } = this.props;
|
||||
const { loading, pageInfo, selectedRowKeys } = this.state;
|
||||
const { url, payload, isSpecial } = this.props;
|
||||
const module = {
|
||||
...pageInfo, url, ...payload, ...extraPayload,
|
||||
departmentIds: extraPayload.departmentIds ? extraPayload.departmentIds.split(",") : []
|
||||
|
|
@ -45,10 +72,12 @@ class DataTables extends Component {
|
|||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns
|
||||
});
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns
|
||||
}, () => this.postMessageToChild({
|
||||
dataSource: this.state.dataSource, scrollHeight: 103, selectedRowKeys, isSpecial,
|
||||
pageInfo: this.state.pageInfo, unitTableType: "dataAcquisition",
|
||||
columns: this.state.columns
|
||||
}));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
|
|
@ -59,124 +88,34 @@ class DataTables extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleClearRows = () => this.setState({ selectedRowKeys: [] });
|
||||
postMessageToChild = (payload = {}) => {
|
||||
const i18n = {
|
||||
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
|
||||
"条": getLabel(18256, "条"), "删除": getLabel(111, "删除"), "查看明细": getLabel(111, "查看明细"),
|
||||
"操作日志": getLabel(545781, "操作日志")
|
||||
};
|
||||
const childFrameObj = document.getElementById("unitTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { columns, dataSource, loading, selectedRowKeys, pageInfo } = this.state;
|
||||
const { showOperateBtn, onTableOperate, onViewDetails, isSpecial = false, form } = this.props;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
|
||||
};
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => {
|
||||
this.getTableDate({ ...form.getFormParams() });
|
||||
});
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => {
|
||||
this.getTableDate({ ...form.getFormParams() });
|
||||
});
|
||||
}
|
||||
};
|
||||
const getColumns = _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
if (dataIndex === "username") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return <a
|
||||
className="ellipsis"
|
||||
href={`javaScript:openhrm(${record.employeeId});`}
|
||||
onClick={e => window.pointerXY(e)}
|
||||
title={text}
|
||||
>
|
||||
{text}
|
||||
</a>;
|
||||
}
|
||||
};
|
||||
} else if (dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
width: 150,
|
||||
render: (text, record) => (
|
||||
<div className="linkWapper">
|
||||
{
|
||||
!isSpecial &&
|
||||
<React.Fragment>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onViewDetails(record)}>查看明细</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="deleteSelectAddUpDeduction">删除</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
isSpecial &&
|
||||
<React.Fragment>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<React.Fragment>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}> {text} </span>;
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
return <UnifiedTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
columns={getColumns}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={getColumns.length * 160}
|
||||
/>;
|
||||
const { dataSource, loading } = this.state;
|
||||
const dom = document.querySelector(".dataContent");
|
||||
let height = 280;
|
||||
if (dataSource.length > 0 && dom) {
|
||||
const tableHeight = dataSource.length * 46 + 124;
|
||||
height = dom.offsetHeight > tableHeight ? tableHeight : dom.offsetHeight;
|
||||
}
|
||||
return (<div style={{ height: height + "px" }}>
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/unitTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
|
||||
id="unitTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,32 +23,28 @@
|
|||
}
|
||||
|
||||
.addItemsWrapper {
|
||||
padding-bottom: 8px;
|
||||
|
||||
.baseForm {
|
||||
.wea-form-cell {
|
||||
padding-right: 20% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
.wea-form-cell-wrapper {
|
||||
border: 1px solid #e5e5e5;
|
||||
.tipWrapper {
|
||||
background: #FFF;
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
& > div:last-child {
|
||||
border-bottom: none
|
||||
}
|
||||
.extra_tax {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: -20px;
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 4px 16px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.wea-form-item {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
i {
|
||||
color: #2db7f5;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -57,6 +53,15 @@
|
|||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #F6F6F6;
|
||||
|
||||
.wea-new-top-wapper, .wea-tab {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.wea-tab {
|
||||
margin: 8px 16px;
|
||||
}
|
||||
|
||||
.wea-tab-left {
|
||||
min-width: 600px !important;
|
||||
|
|
@ -114,6 +119,68 @@
|
|||
.dataContent {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding: 0 16px;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
|
||||
.dataAc-ellipsis {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-slide-modal .wea-slide-modal-content {
|
||||
background: #f6f6f6;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.titleDialog {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 46px 8px 16px;
|
||||
background: #fff;
|
||||
|
||||
.titleCol {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.titleLeftBox {
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.titleRightBox {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import ImportModal from "./importDialog";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import { getSearchs } from "../../util";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -73,15 +73,29 @@ class Layout extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { slidePayload, slideLoading, detailOptBtns, onSave } = this.props;
|
||||
const { title } = slidePayload;
|
||||
return <div className="titleDialog">
|
||||
<div className="titleCol titleLeftBox">
|
||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||
<div className="title">{title}</div>
|
||||
</div>
|
||||
<div className="titleCol titleRightBox">
|
||||
{(slidePayload.children && slidePayload.children.props.className) ? [...detailOptBtns] :
|
||||
<Button type="primary" loading={slideLoading} onClick={onSave}>{getLabel(537558, "保存")}</Button>}
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||
slidePayload, onClose, onSave, slideLoading, form, condition, onImportFile,
|
||||
onAdSearch, onCancel, importPayload, detailOptBtns, tabBtns = [], logFunction, onClearTargrtid
|
||||
slidePayload, onClose, form, condition, onImportFile, tabBtns = [],
|
||||
onAdSearch, onCancel, importPayload, logFunction, onClearTargrtid
|
||||
} = this.props;
|
||||
const { visible, title: subtitle, children: slideChildren } = slidePayload;
|
||||
const { visible, children: slideChildren } = slidePayload;
|
||||
const {
|
||||
visible: importVisiable, importFormComponent, importOpts,
|
||||
importResult, templateLink, previewUrl
|
||||
|
|
@ -99,6 +113,7 @@ class Layout extends Component {
|
|||
]}
|
||||
/>
|
||||
<WeaTab
|
||||
advanceHeight={162}
|
||||
searchType={["base", "advanced"]}
|
||||
replaceLeft={leftComp}
|
||||
searchsAd={getSearchs(form, toJS(condition), 2)}
|
||||
|
|
@ -112,7 +127,7 @@ class Layout extends Component {
|
|||
buttons={showOperateBtn ? tabBtns : []}
|
||||
/>
|
||||
<div className="dataContent">
|
||||
<WeaNewScroll height="100%">{children}</WeaNewScroll>
|
||||
{children}
|
||||
{/*导入弹框*/}
|
||||
<ImportModal
|
||||
visible={importVisiable} onCancel={onCancel} importParams={importFormComponent}
|
||||
|
|
@ -125,21 +140,12 @@ class Layout extends Component {
|
|||
visible={visible}
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={80}
|
||||
measureX="%"
|
||||
width={850}
|
||||
measureX="px"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction="right"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={subtitle}
|
||||
loading={slideLoading}
|
||||
onSave={onSave}
|
||||
editable={subtitle.length <= 2}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={subtitle.length <= 2 ? [] : detailOptBtns}
|
||||
/>
|
||||
}
|
||||
title={this.renderTitle()}
|
||||
content={slideChildren}
|
||||
onClose={onClose}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,70 +1,3 @@
|
|||
export const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -74,7 +7,7 @@ export const dataCollectCondition = [
|
|||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
|
|
@ -84,7 +17,7 @@ export const dataCollectCondition = [
|
|||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
|
|
@ -118,7 +51,7 @@ export const dataCollectCondition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
@ -129,9 +62,22 @@ export const dataCollectCondition = [
|
|||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["freeIncome"],
|
||||
dataType: "freeIncome",
|
||||
fieldcol: 14,
|
||||
label: "免税收入",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2,
|
||||
extraDom: null
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["businessHealthyInsurance"],
|
||||
dataType: "healthInsurance",
|
||||
fieldcol: 14,
|
||||
label: "商业健康保险",
|
||||
labelcol: 8,
|
||||
|
|
@ -142,6 +88,7 @@ export const dataCollectCondition = [
|
|||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["taxDelayEndowmentInsurance"],
|
||||
dataType: "endowmentInsurance",
|
||||
fieldcol: 14,
|
||||
label: "税延养老保险",
|
||||
labelcol: 8,
|
||||
|
|
@ -149,19 +96,10 @@ export const dataCollectCondition = [
|
|||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["otherDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "其他",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["deductionAllowedDonation"],
|
||||
dataType: "grantDonation",
|
||||
fieldcol: 14,
|
||||
label: "准予扣除的捐赠额",
|
||||
labelcol: 8,
|
||||
|
|
@ -169,9 +107,32 @@ export const dataCollectCondition = [
|
|||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["derateDeduction"],
|
||||
dataType: "derateDeduction",
|
||||
fieldcol: 14,
|
||||
label: "减免税额",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["otherDeduction"],
|
||||
dataType: "otherDerateDeduction",
|
||||
fieldcol: 14,
|
||||
label: "其他",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["privatePension"],
|
||||
dataType: "personalPension",
|
||||
fieldcol: 14,
|
||||
label: "个人养老金",
|
||||
labelcol: 8,
|
||||
|
|
@ -185,8 +146,493 @@ export const dataCollectCondition = [
|
|||
col: 2
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export const taxDetailSettingsConditions = {
|
||||
freeIncome: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["freeItem"],
|
||||
fieldcol: 14,
|
||||
label: "免税事项",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["freeProperty"],
|
||||
fieldcol: 14,
|
||||
label: "免税性质",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["freeAmount"],
|
||||
fieldcol: 14,
|
||||
label: "免税金额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
healthInsurance: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["identificationNumber"],
|
||||
fieldcol: 14,
|
||||
label: "税优识别码",
|
||||
lanId: 111,
|
||||
helpfulTip: "为确保税收优惠商业健康保险保单的唯一性、真实性和有效性,由商业健康保险信息平台按照“一人一单一码”的原则进行核发,填写个人保单凭证上打印的数字识别码。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["effectiveDate"],
|
||||
fieldcol: 14,
|
||||
label: "保单生效日期",
|
||||
lanId: 111,
|
||||
helpfulTip: "该商业健康保险保单生效的日期。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["yearPremium"],
|
||||
fieldcol: 14,
|
||||
label: "年度保费",
|
||||
lanId: 111,
|
||||
helpfulTip: "商业健康保险保单年度内该保单的总保费。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["monthPremium"],
|
||||
fieldcol: 14,
|
||||
label: "月度保费",
|
||||
lanId: 111,
|
||||
helpfulTip: "月缴费的保单填写每月所缴保费,按年一次性缴费的保单填写年度保费除以12后的金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["currentDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "本期扣除金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "根据国家有关政策对个人购买或单位统一购买符合规定的商业健康保险产品的支出,扣除限额为2400。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
endowmentInsurance: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["deductionMonth"],
|
||||
fieldcol: 14,
|
||||
label: "申报扣除月份",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["accountNumber"],
|
||||
fieldcol: 14,
|
||||
label: "税延养老账户编号",
|
||||
lanId: 111,
|
||||
helpfulTip: "按照中国保险信息技术管理有限责任公司相关信息平台出具的《个人税收递延型商业养老保险扣除凭证》载明的对应项目填写。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["checkCode"],
|
||||
fieldcol: 14,
|
||||
label: "报税校验码",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["yearPremium"],
|
||||
fieldcol: 14,
|
||||
label: "年度保费",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["monthPremium"],
|
||||
fieldcol: 14,
|
||||
label: "月度保费",
|
||||
lanId: 111,
|
||||
helpfulTip: "取得工资薪金所得、连续性劳务报酬所得(特定行业除外)的个人,填写《个人税收递延型商业养老保险扣除凭证》载明的月度保费金额,一次性缴费的保单填写月平均保费金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["currentDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "本期扣除金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "取得工资薪金所得的个人,应按税延养老保险扣除凭证记载的当月金额和扣除限额孰低的方法计算可扣除额。扣除限额按照申报扣除当月的工资薪金的 6%和1000元孰低的办法确定。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
grantDonation: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["recipientName"],
|
||||
fieldcol: 14,
|
||||
label: "受赠单位名称",
|
||||
lanId: 111,
|
||||
helpfulTip: "受赠单位名称填写受赠单位的法定名称全称。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["taxCode"],
|
||||
fieldcol: 14,
|
||||
label: "受赠单位纳税人识别号",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["donationNumber"],
|
||||
fieldcol: 14,
|
||||
label: "捐赠凭证号",
|
||||
lanId: 111,
|
||||
helpfulTip: "捐赠凭证",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "DATEPICKER",
|
||||
domkey: ["donateDate"],
|
||||
fieldcol: 14,
|
||||
label: "捐赠日期",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写个人发生的公益慈善事业捐赠的具体日期。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["donateAmount"],
|
||||
fieldcol: 14,
|
||||
label: "捐赠金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写个人发生的公益慈善事业捐赠的具体金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["deductionProportion"],
|
||||
fieldcol: 14,
|
||||
label: "扣除比例",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写税法规定的可以公益慈善事业捐赠支出税前扣除比例。如:0.3(30%)或者1(100%),请注意,必须是小数形式的百分比。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["actualDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "实际扣除金额",
|
||||
lanId: 111,
|
||||
helpfulTip: "填写个人取得“扣除所得项目”对应收入办理扣缴申报或者自行申报时,实际扣除的公益慈善事业捐赠支出金额。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
derateDeduction: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["derateItem"],
|
||||
fieldcol: 14,
|
||||
label: "减免事项",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["derateProperty"],
|
||||
fieldcol: 14,
|
||||
label: "减免性质",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["derateAmount"],
|
||||
fieldcol: 14,
|
||||
label: "减免金额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
otherDerateDeduction: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["otherDeduction"],
|
||||
fieldcol: 14,
|
||||
label: "减免税额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["remark"],
|
||||
fieldcol: 14,
|
||||
label: "备注",
|
||||
lanId: 111,
|
||||
helpfulTip: "根据政策要求,一定要在备注中写明具体扣除项目名称,备注不超过20个字符。",
|
||||
helpfulTipLanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}],
|
||||
personalPension: [{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["incomeCategory"],
|
||||
fieldcol: 14,
|
||||
label: "所得项目",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["voucherTypeName"],
|
||||
fieldcol: 14,
|
||||
label: "凭证类型",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["voucherNo"],
|
||||
fieldcol: 14,
|
||||
label: "凭证编码",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["payAmount"],
|
||||
fieldcol: 14,
|
||||
label: "缴费金额",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required",
|
||||
precision: 2,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
}]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* 数据采集-其他免税扣除
|
||||
* 明细设置弹框
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/12/24
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaHelpfulTip, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import FormInfo from "../../../components/FormInfo";
|
||||
import { taxDetailSettingsConditions } from "./columns";
|
||||
import { Button, message } from "antd";
|
||||
import { getDomkes, toDecimal_n } from "../../../util";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { getIncomeCategoryList } from "../../../apis/ledger"; //获取薪资类型
|
||||
import cs from "classnames";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("otherDeductStore")
|
||||
@observer
|
||||
class DetailSettingsDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
async componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { data } = await getIncomeCategoryList();
|
||||
this.setState({
|
||||
conditions: _.map(taxDetailSettingsConditions[nextProps.dataType], item => ({
|
||||
...item, items: _.map(item.items, o => ({
|
||||
...o, options: getKey(o) === "voucherTypeName" ?
|
||||
[{ key: "MONTH", showname: "月度" }, { key: "YEAR", showname: "年度" }] :
|
||||
getKey(o) === "incomeCategory" ? _.map(data, it => ({
|
||||
key: it.value.toString(),
|
||||
showname: <div className="reportTypeName-box">
|
||||
<span>{it.defaultLabel}</span>
|
||||
<span
|
||||
className={cs("reportTypeName", { "danger": it.reportTypeName === getLabel(111, "非居民所得") })}>
|
||||
{it.reportTypeName}
|
||||
</span>
|
||||
</div>
|
||||
})) : []
|
||||
}))
|
||||
}))
|
||||
}, () => {
|
||||
this.props.otherDeductStore.settingsForm.initFormFields(this.state.conditions);
|
||||
if (nextProps.id) _.map(getDomkes(this.state.conditions), domkey => {
|
||||
this.props.otherDeductStore.settingsForm.updateFields({ [domkey]: { value: nextProps.record[domkey].toString() } });
|
||||
});
|
||||
});
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.props.otherDeductStore.initSettingsForm();
|
||||
}
|
||||
}
|
||||
|
||||
save = () => {
|
||||
const { otherDeductStore: { settingsForm }, mainId, id, dataType } = this.props;
|
||||
settingsForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
let { deductionMonth, incomeCategory, ...payload } = settingsForm.getFormParams();
|
||||
deductionMonth && (payload = { ...payload, deductionMonth: deductionMonth + "-01" });
|
||||
this.setState({ loading: true });
|
||||
postFetch(`/api/bs/hrmsalary/otherDeduction/save${_.upperFirst(dataType)}`, {
|
||||
...payload, mainId, id,
|
||||
incomeCategory: Number(incomeCategory)
|
||||
}).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { otherDeductStore: { settingsForm } } = this.props, { loading, conditions } = this.state;
|
||||
const itemRender = {
|
||||
freeAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ freeAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
identificationNumber: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>);
|
||||
},
|
||||
effectiveDate: (field, textAreaProps, form, formParams) => {
|
||||
return (<div className="cust">
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>
|
||||
<div className="cus_helpful">
|
||||
<WeaHelpfulTip title={getLabel(field.helpfulTipLanId, field.helpfulTip)}/>
|
||||
</div>
|
||||
</div>);
|
||||
},
|
||||
donateDate: (field, textAreaProps, form, formParams) => {
|
||||
return (<div className="cust">
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>
|
||||
<div className="cus_helpful">
|
||||
<WeaHelpfulTip title={getLabel(field.helpfulTipLanId, field.helpfulTip)}/>
|
||||
</div>
|
||||
</div>);
|
||||
},
|
||||
yearPremium: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ yearPremium: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
monthPremium: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ monthPremium: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
currentDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ currentDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
donateAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ donateAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
deductionProportion: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ deductionProportion: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
actualDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ actualDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
derateAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ derateAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
otherDeduction: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ otherDeduction: { value: toDecimal_n(v, 2) } })}/>);
|
||||
},
|
||||
payAmount: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||
form={form} formParams={formParams}
|
||||
onBlur={(v) => v && form.updateFields({ payAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||
}
|
||||
};
|
||||
if (_.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 === 33) return null;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} initLoadCss title={getLabel(111, "明细设置")}
|
||||
style={{ width: 480, height: _.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 }}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "确定")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>
|
||||
]}
|
||||
>
|
||||
<FormInfo className="form-dialog-layout" center={false} itemRender={itemRender}
|
||||
form={settingsForm} formFields={conditions}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default DetailSettingsDialog;
|
||||
|
|
@ -29,6 +29,8 @@ import { dataCollectCondition } from "./columns";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { getDomkes } from "../../../util";
|
||||
import TaxSetDialog from "./taxSetDialog";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -63,7 +65,8 @@ class Index extends Component {
|
|||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
targetid: "",
|
||||
taxSetDialog: { visible: false, dataType: "", id: "" }
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -293,7 +296,17 @@ class Index extends Component {
|
|||
return {
|
||||
...it, title: getLabel(83871, "数据采集"),
|
||||
items: _.map(it.items, o => ({
|
||||
...o, label: getLabel(o.lanId, o.label)
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
extraDom: !_.isEmpty(editId) &&
|
||||
<a href="javascript:void(0);" className="extra_tax" title={getLabel(111, "添加附表")}
|
||||
onClick={() => this.setState({
|
||||
taxSetDialog: {
|
||||
visible: true, dataType: o.dataType, id: editId.id,
|
||||
label: getLabel(o.lanId, o.label)
|
||||
}
|
||||
})}>
|
||||
<i className="icon-coms02-Preview-1"/>
|
||||
</a>
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
|
@ -394,7 +407,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
@ -407,6 +420,7 @@ class Index extends Component {
|
|||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
|
|
@ -515,7 +529,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType, targetid
|
||||
importPayload, exportPayloadType, targetid, taxSetDialog
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -538,6 +552,8 @@ class Index extends Component {
|
|||
onViewDetails={(record) => this.handleAddData("其他免税扣除记录", record)}
|
||||
form={form}
|
||||
/>
|
||||
<TaxSetDialog {...taxSetDialog}
|
||||
onCancel={() => this.setState({ taxSetDialog: { ...taxSetDialog, visible: false } })}/>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* 其他免税扣除设置
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/12/24
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import DetailSettingsDialog from "./detailSettingsDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class TaxSetDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: [], detailSettingsDialog: { visible: false, dataType: "", mainId: "", id: "", record: {} }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
detailSettingsDialog: { ...this.state.detailSettingsDialog, dataType: nextProps.dataType, mainId: nextProps.id }
|
||||
}, () => this.getList(nextProps));
|
||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
loading: false,
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: [],
|
||||
detailSettingsDialog: { visible: false }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getList = (props) => {
|
||||
const { id, dataType, viewParams = {} } = props || this.props, { pageInfo, detailSettingsDialog } = this.state;
|
||||
this.setState({ loading: true });
|
||||
postFetch(`/api/bs/hrmsalary/otherDeduction/${dataType}List`, { ...pageInfo, ...viewParams, id })
|
||||
.then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { current, pageSize, total }, columns: _.map(columns, o => ({
|
||||
...o,
|
||||
width: o.dataIndex === "operate" && 120,
|
||||
render: (text, record) => o.dataIndex === "operate" ? (<div className="space_div">
|
||||
<a href="javascript:void(0);" onClick={() => this.setState({
|
||||
detailSettingsDialog: { ...detailSettingsDialog, visible: true, id: record.id, record }
|
||||
})}>{getLabel(111, "编辑")}</a>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.handleDelete([record.id])}>{getLabel(111, "删除")}</a>
|
||||
</div>) : (<span>{text}</span>)
|
||||
}))
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleDelete = (ids = []) => {
|
||||
const { selectedRowKeys } = this.state, { dataType, id: mainId } = this.props;
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(388758, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
postFetch(`/api/bs/hrmsalary/otherDeduction/delete${_.upperFirst(dataType)}`, { ids, mainId })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功!"));
|
||||
this.setState({ selectedRowKeys: _.difference(selectedRowKeys, ids) }, () => this.getList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { pageInfo, dataSource, loading, columns, selectedRowKeys, detailSettingsDialog } = this.state;
|
||||
const { viewParams } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current: 1, pageSize } }, () => this.getList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
|
||||
};
|
||||
return (<WeaDialog {...this.props} initLoadCss className="sys-salary-wrapper" ref={dom => this.taxSetRef = dom}
|
||||
title={`${getLabel(111, "附表明细")}(${this.props.label})`}
|
||||
style={{
|
||||
width: "60vw", height: 600, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="sys-item-table-box">
|
||||
<Spin spinning={loading && pageInfo.total === 0}>
|
||||
{
|
||||
_.isEmpty(viewParams) && <div className="sys-item-table-opts">
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({
|
||||
detailSettingsDialog: { ...detailSettingsDialog, visible: true }
|
||||
})}/>
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
|
||||
disabled={_.isEmpty(selectedRowKeys)} onClick={() => {
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
message.warning(getLabel(111, "请选择要删除的数据!"));
|
||||
return;
|
||||
}
|
||||
this.handleDelete(selectedRowKeys);
|
||||
}}/>
|
||||
</div>
|
||||
}
|
||||
<WeaTable columns={!_.isEmpty(viewParams) ? _.filter(columns, o => o.dataIndex !== "operate") : columns}
|
||||
dataSource={dataSource} pagination={pagination} bordered
|
||||
rowSelection={rowSelection} loading={loading} rowKey="id"
|
||||
scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 164 : 600 }}/>
|
||||
<DetailSettingsDialog {...detailSettingsDialog} onCancel={(callback) => this.setState({
|
||||
detailSettingsDialog: { ...detailSettingsDialog, visible: false, id: "" }
|
||||
}, () => callback && callback())} onSuccess={this.getList}/>
|
||||
</Spin>
|
||||
</div>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxSetDialog;
|
||||
|
|
@ -7,7 +7,7 @@ export const condition = [
|
|||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
|
|
@ -40,7 +40,7 @@ export const condition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { condition } from "./components/condition";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { getDomkes } from "../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -332,7 +333,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
@ -345,6 +346,7 @@ class Index extends Component {
|
|||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
..._.reduce(getDomkes(condition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import { getSearchs } from "../../../../util";
|
|||
import { getTaxAgentSelectListAsAdmin } from "../../../../apis/taxAgent";
|
||||
import { saveDeclare, taxdeclarationGetRate } from "../../../../apis/declare";
|
||||
import { declareConditions } from "./condition";
|
||||
import * as API from "../../../../apis/ruleconfig";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -31,7 +32,8 @@ class Index extends Component {
|
|||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.declareStore.initDeclareForm();
|
||||
}
|
||||
|
||||
getTaxAgentSelectListAsAdmin = (props) => {
|
||||
getTaxAgentSelectListAsAdmin = async (props) => {
|
||||
const { data: sysinfo } = await API.sysinfo();
|
||||
const { declareStore: { declareForm } } = props;
|
||||
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
|
||||
if (status) {
|
||||
|
|
@ -44,6 +46,11 @@ class Index extends Component {
|
|||
...o, options: _.map(data, g => ({ key: g.id, showname: g.content }))
|
||||
// helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
|
||||
};
|
||||
} else if (getKey(o) === "salaryMonth") {
|
||||
return {
|
||||
...o,
|
||||
label: sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月")
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
|
|
@ -58,8 +65,11 @@ class Index extends Component {
|
|||
if (f.isValid) {
|
||||
const { salaryMonth, ...payload } = declareForm.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
saveDeclare({ ...payload, salaryMonth: salaryMonth + "-01" })
|
||||
.then(async ({ status, data, errormsg }) => {
|
||||
saveDeclare({
|
||||
...payload, salaryMonth: salaryMonth + "-01",
|
||||
taxCycle: `${salaryMonth}-01`,
|
||||
salaryDate: `${salaryMonth}-01`
|
||||
}).then(async ({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.destroy();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class Index extends Component {
|
|||
return (
|
||||
<div className="salary-btn-flex">
|
||||
<div className="mounth-range">
|
||||
<span className="label">{getLabel(543549, "薪资所属月:")}</span>
|
||||
<span className="label">{getLabel(111, "税款所属期:")}</span>
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.props.onChange({ dateRange: v })}/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu, message, Modal, Tag } from "antd";
|
||||
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -36,9 +36,9 @@ class Index extends Component {
|
|||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" && showOperateBtn });
|
||||
});
|
||||
};
|
||||
getDeclareList = (props) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { queryParams } = props;
|
||||
getDeclareList = async (props) => {
|
||||
const { data: sysData } = await sysinfo();
|
||||
const { pageInfo } = this.state, { queryParams } = props;
|
||||
const { dateRange, ...extra } = queryParams;
|
||||
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
|
||||
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
|
||||
|
|
@ -47,7 +47,8 @@ class Index extends Component {
|
|||
getDeclareList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum, pageSize, total } = data;
|
||||
let { columns, list: dataSource, pageNum, pageSize, total } = data;
|
||||
sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth"));
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||
columns: _.map(columns, o => {
|
||||
|
|
|
|||
|
|
@ -1,31 +1,35 @@
|
|||
import React from "react";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { sysinfo } from "../../apis/ruleconfig";
|
||||
import * as API from "../../apis/declare";
|
||||
import { Button } from "antd";
|
||||
import UnifiedTable from "../../components/UnifiedTable";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
export default class GenerateDeclarationDetail extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
declareInfo: {}
|
||||
loading: false, dataSource: [], columns: [], declareInfo: {},
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
this.getDetailList();
|
||||
this.getDeclareInfo();
|
||||
this.getSysinfo();
|
||||
}
|
||||
|
||||
getSysinfo = () => {
|
||||
sysinfo().then(({ status, data: sysinfo }) => {
|
||||
if (status) this.setState({ sysinfo });
|
||||
});
|
||||
};
|
||||
getDetailList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const payload = {
|
||||
|
|
@ -37,31 +41,19 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource,
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current, pageSize, total
|
||||
},
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => {
|
||||
if (item.dataIndex === "username") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return <a className="ellipsis"
|
||||
href={`javaScript:openhrm(${record.employeeId});`}
|
||||
onClick={e => window.pointerXY(e)}
|
||||
title={text}
|
||||
>
|
||||
{text}
|
||||
</a>;
|
||||
}
|
||||
...item, width: 180,
|
||||
render: (text, record) => (<a className="ellipsis" href={`javaScript:openhrm(${record.employeeId});`}
|
||||
onClick={e => window.pointerXY(e)}
|
||||
title={text}>{text}</a>)
|
||||
};
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}>{text}</span>;
|
||||
}
|
||||
...item, width: (item.dataIndex === "cardType" || item.dataIndex === "cardNum") ? 180 : 100,
|
||||
render: (text) => (<span className="ellipsis" title={text}>{text}</span>)
|
||||
};
|
||||
})
|
||||
});
|
||||
|
|
@ -78,26 +70,20 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { declareInfo, sysinfo } = this.state;
|
||||
const title = sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月");
|
||||
return (<React.Fragment>
|
||||
<span>{title}:{declareInfo.salaryMonth}</span>
|
||||
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
||||
</React.Fragment>);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { declareInfo, loading, pageInfo, columns, dataSource } = this.state;
|
||||
const { loading, pageInfo, columns, dataSource } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
|
||||
const renderRightOperation = () => {
|
||||
return (
|
||||
<div style={{ display: "inline-block" }}>
|
||||
<Button type="primary" onClick={this.handleExport}>导出</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const renderLeftOperation = () => {
|
||||
return (
|
||||
<div style={{ display: "inline-block", lineHeight: "47px" }}>
|
||||
<span>薪资所属月:{declareInfo.salaryMonth}</span>
|
||||
<span style={{ marginLeft: "10px" }}>个税扣缴义务人:{declareInfo.taxAgentName}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const buttons = showOperateBtn ? [<Button type="primary"
|
||||
onClick={this.handleExport}>{getLabel(111, "导出全部")}</Button>] : [];
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
|
|
@ -115,23 +101,12 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
}, () => this.getDetailList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="generateDeclarationDetail">
|
||||
<CustomTab
|
||||
searchOperationItem={showOperateBtn && renderRightOperation()}
|
||||
leftOperation={renderLeftOperation()}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
<UnifiedTable
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading}
|
||||
xWidth={columns.length * 120}
|
||||
/>
|
||||
</div>
|
||||
return (<WeaTop title={this.renderTitle()} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={buttons}>
|
||||
<div className="declare-detail-table-container">
|
||||
<WeaTable columns={columns} dataSource={dataSource} pagination={pagination} loading={loading}
|
||||
scroll={{ x: 1200, y: `calc(100vh - 186px)` }}/>
|
||||
</div>
|
||||
);
|
||||
</WeaTop>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
.generateDeclarationDetail {
|
||||
.tabWrapper {
|
||||
padding-left: 10px
|
||||
}
|
||||
.declare-detail-table-container {
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
|
||||
.tableWrapper {
|
||||
height: calc(100vh - 48px);
|
||||
overflow: auto;
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +34,8 @@
|
|||
.declare-body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
padding: 8px 16px 0 16px;
|
||||
background: #F6F6F6;
|
||||
overflow-y: auto;
|
||||
|
||||
.wea-new-table {
|
||||
|
|
|
|||
|
|
@ -169,3 +169,13 @@ export const taxTabConditions = [
|
|||
title: ""
|
||||
}
|
||||
];
|
||||
// 查看附表对应字段
|
||||
export const appendixFields = [
|
||||
{ dataIndex: "taxFreeIncome", dataType: "freeIncome" },
|
||||
{ dataIndex: "commercialHealthInsurance", dataType: "healthInsurance" },
|
||||
{ dataIndex: "taxDeferredEndowmentInsurance", dataType: "endowmentInsurance" },
|
||||
{ dataIndex: "allowedDonation", dataType: "grantDonation" },
|
||||
{ dataIndex: "taxDeduction", dataType: "derateDeduction" },
|
||||
{ dataIndex: "other", dataType: "otherDerateDeduction" },
|
||||
{ dataIndex: "", dataType: "personalPension" }
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/8/22
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaLoadingGlobal } from "ecCom";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import PaymentDialog from "./paymentDialog";
|
||||
|
|
@ -46,7 +46,7 @@ class PaymentBtn extends Component {
|
|||
style={{ textAlign: "center" }}>{getLabel(111, "若申请过银行缴款,点击确定,将自动作废银行缴款凭证。并进行三方缴款。 ")}</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") })
|
||||
taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id"), reportType: this.props.reportType })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { paymentDialog } = this.state;
|
||||
|
|
@ -82,7 +82,8 @@ class PaymentBtn extends Component {
|
|||
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("id"),
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01"
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01",
|
||||
reportType: this.props.reportType
|
||||
};
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
|
|
@ -122,7 +123,7 @@ class PaymentBtn extends Component {
|
|||
};
|
||||
getBankAccountInfo = (payload) => {
|
||||
let loop = () => {
|
||||
WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") });
|
||||
WeaLoadingGlobal.start({ tip: getLabel(111, "获取三方信息中...") });
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(async () => {
|
||||
let response = await taxPaymentgetAgreementFeedback(payload);
|
||||
|
|
@ -236,7 +237,7 @@ class PaymentBtn extends Component {
|
|||
};
|
||||
handleMenuChange = ({ key }) => {
|
||||
if (key === "bank_voucher_payment") {
|
||||
taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") })
|
||||
taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id"), reportType: this.props.reportType })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { paymentDialog } = this.state;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ class PaymentFeedbackBtn extends Component {
|
|||
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||
const payload = {
|
||||
taxDeclareRecordId: getQueryString("id"),
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01"
|
||||
taxAgentId, taxYearMonth: taxYearMonth + "-01",
|
||||
reportType: this.props.reportType
|
||||
};
|
||||
this.setState({
|
||||
paymentDialog: {
|
||||
|
|
@ -152,7 +153,7 @@ class PaymentFeedbackBtn extends Component {
|
|||
return {
|
||||
...it,
|
||||
options: [
|
||||
{ key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款"), selected: true },
|
||||
{ key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款"), selected: true }
|
||||
// { key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") }
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/12/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { WeaCheckbox, WeaLocaleProvider } from "ecCom";
|
||||
import { message } from "antd";
|
||||
import ImportDialog from "../../../components/importDialog";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
|
@ -17,7 +17,7 @@ class TaxDeclareDetailImportDialog extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false,
|
||||
visible: false, title: "", nextloading: false, hasData: "0",
|
||||
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
|
||||
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview",
|
||||
extraPreview: { taxDeclarationId: "" }
|
||||
|
|
@ -49,16 +49,16 @@ class TaxDeclareDetailImportDialog extends Component {
|
|||
}).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } }));
|
||||
};
|
||||
handleExportTemp = () => {
|
||||
const { importDialog: { taxDeclarationId } } = this.state;
|
||||
const { importDialog: { taxDeclarationId, hasData } } = this.state;
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "下载中"), 0);
|
||||
const promise = API.taxdeclarationExportTemplate({ taxDeclarationId });
|
||||
const promise = API.taxdeclarationExportTemplate({ taxDeclarationId, hasData: hasData === "1" });
|
||||
message.destroy();
|
||||
};
|
||||
handleCancel = () => {
|
||||
this.setState({
|
||||
importDialog: {
|
||||
visible: false, title: "", nextloading: false,
|
||||
visible: false, title: "", nextloading: false, hasData: "0",
|
||||
link: null, importResult: {}, imageId: "", taxDeclarationId: "",
|
||||
previewUrl: "/api/bs/hrmsalary/taxdeclaration/preview"
|
||||
}
|
||||
|
|
@ -71,10 +71,17 @@ class TaxDeclareDetailImportDialog extends Component {
|
|||
<ImportDialog
|
||||
{...importDialog} onCancel={this.handleCancel}
|
||||
onResetImportResult={() => this.setState(({
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "" }
|
||||
importDialog: { ...importDialog, importResult: {}, imageId: "", hasData: "0" }
|
||||
}))}
|
||||
nextCallback={imageId => this.setState({ importDialog: { ...importDialog, imageId } })}
|
||||
nextUplaodCallback={imageId => this.handleImport({ imageId })}
|
||||
exportDataDom={
|
||||
<WeaCheckbox
|
||||
content={getLabel(543208, "导出现有数据")} value={importDialog.hasData}
|
||||
helpfulTip={getLabel(111, "提示:建议先导出现有最新数据,修改后再导入")}
|
||||
onChange={val => this.setState({ importDialog: { ...importDialog, hasData: val } })}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDia
|
|||
import TabEditDialog from "./components/tabEditDialog";
|
||||
import LeftTab from "./components/leftTab";
|
||||
import { confirmDialog } from "./confirm";
|
||||
import { appendixFields } from "./components/constants";
|
||||
import "./index.less";
|
||||
import TaxSetDialog from "../dataAcquisition/otherDeduct/taxSetDialog";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
|
|
@ -61,7 +63,8 @@ class Index extends Component {
|
|||
},
|
||||
intelCalcSalaryStatus: false, //智能算薪 总开关是否开启
|
||||
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
reportType: "", showLeft: false
|
||||
reportType: "", showLeft: false,
|
||||
taxSetDialog: { visible: false, dataType: "", viewParams: {} }//查看附表
|
||||
};
|
||||
this.timer = null;
|
||||
this.taxDeclareRef = null;
|
||||
|
|
@ -143,6 +146,15 @@ class Index extends Component {
|
|||
});
|
||||
}
|
||||
});
|
||||
} else if (id === "APPENDIX") {
|
||||
const { taxAgentId, taxCycle } = this.state.declareInfo;
|
||||
this.setState({
|
||||
taxSetDialog: {
|
||||
visible: true, viewParams: { employeeId: params.employeeId, taxAgentId, taxCycle: taxCycle + "-01" },
|
||||
dataType: _.find(appendixFields, o => o.dataIndex === params.dataIndex).dataType,
|
||||
label: params.title
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -151,7 +163,8 @@ class Index extends Component {
|
|||
const i18n = {
|
||||
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
|
||||
"操作": getLabel(30585, "操作"), "共": getLabel(83698, "共"),
|
||||
"条": getLabel(18256, "条"), "删除": getLabel(535052, "删除")
|
||||
"条": getLabel(18256, "条"), "删除": getLabel(535052, "删除"),
|
||||
"查看附表": getLabel(111, "查看附表")
|
||||
};
|
||||
const declareStatus = intelCalcSalaryStatus ? declareInfo.declareStatus : "";
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
|
|
@ -175,7 +188,10 @@ class Index extends Component {
|
|||
if (idx <= 1) {
|
||||
return { ...it, width: 150, fixed: "left", ellipsis: true };
|
||||
}
|
||||
return { ...it, width: 150, ellipsis: true };
|
||||
return {
|
||||
...it, width: 150, ellipsis: true,
|
||||
isAppendix: _.findIndex(appendixFields, o => o.dataIndex === it.dataIndex) !== -1
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
const payload = {
|
||||
|
|
@ -346,7 +362,7 @@ class Index extends Component {
|
|||
render() {
|
||||
const {
|
||||
tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide,
|
||||
editTabVisible, reportType, showLeft
|
||||
editTabVisible, reportType, showLeft, taxSetDialog
|
||||
} = this.state;
|
||||
const [__, taxDeclarationId] = selectedKey.split("%%");
|
||||
let btns = [
|
||||
|
|
@ -387,7 +403,7 @@ class Index extends Component {
|
|||
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>,
|
||||
<Button type="ghost"
|
||||
loading={loading.cancel}
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>,
|
||||
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>
|
||||
// <Button type="ghost"
|
||||
// loading={loading.refreshingPay}
|
||||
// onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>
|
||||
|
|
@ -414,7 +430,7 @@ class Index extends Component {
|
|||
if (intelCalcSalaryStatus && (declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID")) {
|
||||
btns.push(
|
||||
<PaymentBtn declareInfo={declareInfo} updateDeclare={this.declare} reportType={reportType}/>,
|
||||
<PaymentFeedbackBtn declareInfo={declareInfo} updateDeclare={this.declare}/>
|
||||
<PaymentFeedbackBtn declareInfo={declareInfo} updateDeclare={this.declare} reportType={reportType}/>
|
||||
);
|
||||
}
|
||||
if (intelCalcSalaryStatus && declareInfo.taxPaidAmount && parseFloat(declareInfo.taxPaidAmount) > 0) {
|
||||
|
|
@ -453,6 +469,9 @@ class Index extends Component {
|
|||
<TabEditDialog visible={editTabVisible}
|
||||
onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
|
||||
</div>
|
||||
{/*查看附表*/}
|
||||
<TaxSetDialog {...taxSetDialog}
|
||||
onCancel={() => this.setState({ taxSetDialog: { ...taxSetDialog, visible: false } })}/>
|
||||
<div className="declareDetail-layout-table-content">
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@
|
|||
height: 100%;
|
||||
padding: 16px;
|
||||
background: #f6f6f6;
|
||||
overflow-y: auto;
|
||||
|
||||
.declareTable {
|
||||
background: #FFF;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ class Index extends Component {
|
|||
return _.map(_.filter(toJS(declareTableStore.columns), (item) => (item.display === "true" && showColumns.includes(item["dataIndex"]))), o => ({
|
||||
dataIndex: o.dataIndex, title: o.title, width: 150,
|
||||
render: (text, record) => {
|
||||
if (!record[o["dataIndex"]]) return <span/>;
|
||||
return Object.prototype.toString.call(record[o["dataIndex"]]) === "[object String]" ? <span>{text}</span> :
|
||||
<div className="comparison-column-item-container">
|
||||
<div className="comparison-single-row">
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class Index extends Component {
|
|||
width: 260,
|
||||
render: (_, record) => (<React.Fragment>
|
||||
<a
|
||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/employeedeclareDetail?id=${record.id}&taxName=${record.taxAgentName}`}
|
||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/employeedeclareDetail?id=${record.id}&taxName=${encodeURIComponent(record.taxAgentName)}`}
|
||||
target="_blank">{getLabel(83110, "查看详情")}</a>
|
||||
<Dropdown overlay={
|
||||
<Menu>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* 编辑是否扣除
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/27
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import FormInfo from "../../../components/FormInfo";
|
||||
import { deductConditions } from "../constants";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
class DeductionAmountEditDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) form.resetForm();
|
||||
}
|
||||
|
||||
initForm = (props) => {
|
||||
const { record } = props;
|
||||
this.setState({
|
||||
conditions: _.map(deductConditions, item => ({
|
||||
...item,
|
||||
items: _.map(item.items, o => ({ ...o, value: record[getKey(o)] + "", label: getLabel(o.lanId, o.label) }))
|
||||
}))
|
||||
}, () => form.initFormFields(this.state.conditions));
|
||||
};
|
||||
save = () => {
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { id } = this.props.record;
|
||||
const paylaod = { id, deductFlag: form.getFormParams().deductFlag };
|
||||
this.setState({ loading: true });
|
||||
API.editDeductionAmount(paylaod).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { conditions, loading } = this.state;
|
||||
const height = _.reduce(conditions, (pre, cur) => pre + cur.items.length, 0).length * 47;
|
||||
return (<WeaDialog {...this.props} initLoadCss title={getLabel(111, "编辑")} style={{ height }}
|
||||
buttons={[<Button type="primary" loading={loading}
|
||||
onClick={this.save}>{getLabel(111, "确定")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>]}>
|
||||
<FormInfo className="form-dialog-layout" center={false} form={form} formFields={conditions}/>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionAmountEditDialog;
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/26
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaDialog, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import DeductionListConfirmEmployeeDialog from "./deductionListConfirmEmployeeDialog";
|
||||
import DeductionAmountEditDialog from "./deductionAmountEditDialog";
|
||||
import { Button, Col, message, Modal, Row } from "antd";
|
||||
import * as API from "../../../apis/declare";
|
||||
import { calcPageNo } from "../../../util";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider, { getUrlParams } = WeaTools;
|
||||
|
||||
class DeductionListConfirmDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, columns: [], dataSource: [], visible: false,
|
||||
selectedRowKeys: [], editDialog: { visible: false, record: {} }, loadingBtn: { confirm: false, feedback: false }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getDeductionAmountList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: []
|
||||
});
|
||||
}
|
||||
|
||||
getDeductionAmountList = (props) => {
|
||||
const { pageInfo } = this.state, { id: taxAgentId } = getUrlParams(), { year } = props || this.props;
|
||||
const payload = { ...pageInfo, taxAgentId, year };
|
||||
this.setState({ loading: true });
|
||||
API.getDeductionAmountList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: [..._.map(columns, o => {
|
||||
if (o.dataIndex === "deductFlag") {
|
||||
return { ...o, render: v => (<span>{v === 1 ? getLabel(111, "是") : getLabel(111, "否")}</span>) };
|
||||
}
|
||||
return { ...o };
|
||||
}), {
|
||||
title: getLabel(111, "操作"), dataIndex: "action",
|
||||
render: (v, record) => (<a href="javascript:void(0)" onClick={() => this.setState({
|
||||
editDialog: { visible: true, record }
|
||||
})}>{getLabel(111, "编辑")}</a>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleDelete = () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "确认删除本条数据吗?"),
|
||||
onOk: () => {
|
||||
API.deleteDeductionAmount({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
const { pageInfo } = this.state, { current, pageSize, total } = pageInfo;
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.setState({
|
||||
selectedRowKeys: [],
|
||||
pageInfo: {
|
||||
...pageInfo, current: calcPageNo(total, current, pageSize, this.state.selectedRowKeys.length)
|
||||
}
|
||||
}, () => this.getDeductionAmountList());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
confirmDeductionAmount = () => {
|
||||
const { id: taxAgentId } = getUrlParams(), { year } = this.props;
|
||||
const payload = { taxAgentId, year };
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: true } });
|
||||
API.confirmDeductionAmount(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.getDeductionAmountList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
feedbackDeductionAmount = () => {
|
||||
const { id: taxAgentId } = getUrlParams(), { year } = this.props;
|
||||
const payload = { taxAgentId, year };
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: true } });
|
||||
API.feedbackDeductionAmount(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loadingBtn: { ...this.state.loadingBtn, confirm: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.getDeductionAmountList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, columns, dataSource, pageInfo, visible, selectedRowKeys, editDialog, loadingBtn } = 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.getDeductionAmountList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getDeductionAmountList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: v => this.setState({ selectedRowKeys: v })
|
||||
};
|
||||
const height = this.refs.employeeRef ? this.refs.employeeRef.state.height : 400;
|
||||
return (
|
||||
<WeaDialog {...this.props} initLoadCss ref="confirmRef" className="confirmationDialog"
|
||||
title={(<Row type="flex">
|
||||
<Col span={12}>
|
||||
<span className="title">{getLabel(111, "扣除名单确认")}</span>
|
||||
</Col>
|
||||
<Col span={12} className="title-right">
|
||||
<Button type="primary" onClick={this.confirmDeductionAmount}
|
||||
loading={loadingBtn.confirm}>{getLabel(111, "确认")}</Button>
|
||||
<Button type="primary" onClick={this.feedbackDeductionAmount}
|
||||
loading={loadingBtn.feedback}>{getLabel(111, "反馈")}</Button>
|
||||
</Col>
|
||||
</Row>)}
|
||||
style={{
|
||||
width: 1150, height: 490, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="confirmationDialogContent">
|
||||
<div className="tableBtns">
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({ visible: true })}/>
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} onClick={this.handleDelete}
|
||||
disabled={_.isEmpty(selectedRowKeys)}/>
|
||||
</div>
|
||||
<WeaTable columns={columns} dataSource={dataSource} loading={loading} pagination={pagination} rowKey="id"
|
||||
rowSelection={rowSelection} scroll={{ y: `calc(${height}px - 113px)` }}/>
|
||||
<DeductionAmountEditDialog {...editDialog} onSuccess={this.getDeductionAmountList}
|
||||
onCancel={(callback) => this.setState({
|
||||
editDialog: { visible: false, record: {} }
|
||||
}, () => callback && callback())}/>
|
||||
<DeductionListConfirmEmployeeDialog visible={visible} onSuccess={this.getDeductionAmountList}
|
||||
year={this.props.year} payload={this.props.payload}
|
||||
onCancel={(callback) => this.setState({ visible: false }, () => callback && callback())}/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionListConfirmDialog;
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* 人员添加列表
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/26
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider, { getUrlParams } = WeaTools;
|
||||
const columns = [{ title: getLabel(111, "姓名"), dataIndex: "employeeName" }, {
|
||||
title: getLabel(111, "分部"),
|
||||
dataIndex: "subCompanyName"
|
||||
}, { title: getLabel(111, "部门"), dataIndex: "departmentName" }, {
|
||||
title: getLabel(111, "个税扣缴义务人"),
|
||||
dataIndex: "taxAgentName"
|
||||
}, { title: getLabel(111, "工号"), dataIndex: "jobNum" }, { title: getLabel(111, "手机号码"), dataIndex: "mobile" }];
|
||||
|
||||
class DeductionListConfirmEmployeeDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: [],
|
||||
saveloading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: []
|
||||
});
|
||||
}
|
||||
|
||||
employeedeclareList = (props) => {
|
||||
const { pageInfo } = this.state, { payload } = props || this.props;
|
||||
this.setState({ loading: true });
|
||||
API.employeedeclareList({ ...payload, ...pageInfo }).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: result } = data;
|
||||
const { list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.setState({ dataSource, pageInfo: { ...pageInfo, current, pageSize, total } });
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
save = () => {
|
||||
const { selectedRowKeys: employeeDeclareIds } = this.state, { id: taxAgentId } = getUrlParams(), { year } = this.props;
|
||||
const payload = { taxAgentId, year, employeeDeclareIds };
|
||||
this.setState({ saveloading: true });
|
||||
API.addDeductionAmount(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ saveloading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource, pageInfo, selectedRowKeys, saveloading } = 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.employeedeclareList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.employeedeclareList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: v => this.setState({ selectedRowKeys: v })
|
||||
};
|
||||
const height = this.refs.employeeRef ? this.refs.employeeRef.state.height : 400;
|
||||
return (<WeaDialog {...this.props} hasScroll initLoadCss title={getLabel(111, "选择人员")} ref="employeeRef"
|
||||
buttons={[<Button type="primary" disabled={_.isEmpty(selectedRowKeys)} loading={saveloading}
|
||||
onClick={this.save}>{getLabel(111, "确认")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>]}
|
||||
style={{
|
||||
width: 1150, height: 490, minHeight: 200, minWidth: 380, maxHeight: "90%", maxWidth: "90%",
|
||||
overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="confirmationDialogContent">
|
||||
<WeaTable columns={columns} dataSource={dataSource} loading={loading} pagination={pagination} rowKey="id"
|
||||
rowSelection={rowSelection} scroll={{ y: `calc(${height}px - 113px)` }}/>
|
||||
</div>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionListConfirmEmployeeDialog;
|
||||
|
|
@ -170,7 +170,6 @@ export const advanceConditions = [
|
|||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
||||
export const declareConditions = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -491,3 +490,31 @@ export const declareConditions = [
|
|||
defaultshow: true
|
||||
}
|
||||
];
|
||||
// 扣除名单确认
|
||||
export const deductConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["employeeName"],
|
||||
fieldcol: 12,
|
||||
label: "姓名",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["deductFlag"],
|
||||
fieldcol: 12,
|
||||
label: "是否扣除",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import { Button, Dropdown, Menu, message, Modal, Spin } from "antd";
|
|||
import BaseInfo from "./components/baseInfo";
|
||||
import EmployeeDeclareDetailSchemaEditDialog from "./components/employeeDeclareDetailSchemaEditDialog";
|
||||
import EmployeeDeclareDetailSchemaImportDialog from "./components/employeeDeclareDetailImportDialog";
|
||||
import DeductionListConfirmDialog from "./components/deductionListConfirmDialog";
|
||||
import { commonEnumList } from "../../apis/payrollFiles";
|
||||
import {
|
||||
employeedeclareDeclare,
|
||||
|
|
@ -48,6 +49,7 @@ class Index extends Component {
|
|||
taxCycle: new Date(), pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: { query: false, refresh: false, feedback: false, declare: false, exportLoading: false },
|
||||
declareEditDialog: { visible: false, id: "", title: "" },
|
||||
confirmationDialog: { visible: false, payload: {} },
|
||||
declareStatusList: [], employmentStatusList: [],
|
||||
employmentTypeList: [], adConditons: [],
|
||||
selectedRowKeys: [], exportPayload: {}
|
||||
|
|
@ -165,7 +167,7 @@ class Index extends Component {
|
|||
*/
|
||||
queryEmployeeList = () => {
|
||||
const { employeeDeclareStore: { advanceForm: form } } = this.props;
|
||||
const { pageInfo, declareStatus, taxCycle, selectedKey, selectedRowKeys } = this.state;
|
||||
const { pageInfo, declareStatus, taxCycle, selectedKey, selectedRowKeys, confirmationDialog } = this.state;
|
||||
const { departmentIds, positionIds, ...formParams } = form.getFormParams();
|
||||
const payload = {
|
||||
...formParams, ...pageInfo,
|
||||
|
|
@ -183,7 +185,8 @@ class Index extends Component {
|
|||
const { columns, list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.baseInfoRef.getEmployeeDeclareInfo();
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
confirmationDialog: { ...confirmationDialog, payload }
|
||||
}, () => {
|
||||
const payload = {
|
||||
dataSource, selectedRowKeys, selectedKey,
|
||||
|
|
@ -402,7 +405,7 @@ class Index extends Component {
|
|||
});
|
||||
};
|
||||
handleMenuClick = ({ key }) => {
|
||||
const { selectedRowKeys } = this.state;
|
||||
const { selectedRowKeys, confirmationDialog } = this.state;
|
||||
switch (key) {
|
||||
case "1":
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
|
|
@ -411,6 +414,9 @@ class Index extends Component {
|
|||
}
|
||||
this.handleDeleteDeclare(selectedRowKeys);
|
||||
break;
|
||||
case"5":
|
||||
this.setState({ confirmationDialog: { ...confirmationDialog, visible: true } });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -445,7 +451,7 @@ class Index extends Component {
|
|||
render() {
|
||||
const {
|
||||
selectedKey, showSearchAd, declareStatus, declareStatusList, taxCycle, declareEditDialog, loading,
|
||||
pageInfo, adConditons, employmentTypeList, employmentStatusList
|
||||
pageInfo, adConditons, employmentTypeList, employmentStatusList, confirmationDialog
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form, declareForm } } = this.props;
|
||||
const menu = (
|
||||
|
|
@ -454,6 +460,7 @@ class Index extends Component {
|
|||
{/*<Menu.Item key="2">{getLabel(111, "批量编辑")}</Menu.Item>*/}
|
||||
{/*<Menu.Item key="3">{getLabel(81272, "导出全部")}</Menu.Item>*/}
|
||||
{/*<Menu.Item key="4">{getLabel(543715, "导出所选")}</Menu.Item>*/}
|
||||
<Menu.Item key="5">{getLabel(111, "扣除名单确认")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
const buttons = [
|
||||
|
|
@ -472,7 +479,11 @@ class Index extends Component {
|
|||
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>,
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="ghost" icon="ellipsis" className="moreBtn"/>
|
||||
</Dropdown>
|
||||
</Dropdown>,
|
||||
<DeductionListConfirmDialog {...confirmationDialog} year={moment(taxCycle).format("YYYY")}
|
||||
onCancel={() => this.setState({
|
||||
confirmationDialog: { ...confirmationDialog, visible: false }
|
||||
})}/>
|
||||
];
|
||||
const topTab = [
|
||||
{ title: getLabel(332, "全部"), viewcondition: "list" },
|
||||
|
|
|
|||
|
|
@ -207,3 +207,32 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//扣除名单确认
|
||||
.confirmationDialog {
|
||||
.title-right {
|
||||
text-align: right;
|
||||
|
||||
button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.confirmationDialogContent {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
|
||||
.tableBtns {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
justify-content: end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class FieldTable extends Component {
|
|||
pagination={pagination}
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
scroll={{ y: "calc(100vh - 152px)" }}
|
||||
scroll={{ y: "calc(100vh - 175px)" }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class FieldManagement extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title="字段管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
title="字段管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D" className="fieldManageWrapper"
|
||||
buttons={(showSalaryItemBtn || showOperateBtn) ? btns : btns.slice(-1)}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
|
|
@ -109,26 +109,23 @@ class FieldManagement extends Component {
|
|||
}
|
||||
]}
|
||||
>
|
||||
<div className="fieldManageWrapper">
|
||||
<FieldTable name={searchVal} doSearch={doSearch} onEditLedger={this.handleEditField}
|
||||
onDeleteLedger={(record) => this.handleDeleteField([record.id])}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
<FieldSlide
|
||||
{...slideparams}
|
||||
onChangeRecord={(record) => this.setState({
|
||||
slideparams: {
|
||||
...slideparams,
|
||||
record: { ...slideparams.record, ...record }
|
||||
}
|
||||
})}
|
||||
onCancel={this.handleResetField}
|
||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarcfield" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</div>
|
||||
<FieldTable name={searchVal} doSearch={doSearch} onEditLedger={this.handleEditField}
|
||||
onDeleteLedger={(record) => this.handleDeleteField([record.id])}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
<FieldSlide
|
||||
{...slideparams}
|
||||
onChangeRecord={(record) => this.setState({
|
||||
slideparams: {
|
||||
...slideparams,
|
||||
record: { ...slideparams.record, ...record }
|
||||
}
|
||||
})}
|
||||
onCancel={this.handleResetField}
|
||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||
/>
|
||||
{/*操作日志*/}
|
||||
<LogDialog visible={logDialogVisible} logFunction="salarcfield" filterConditions={filterConditions}
|
||||
onCancel={() => this.setState({ logDialogVisible: false })}/>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,15 @@
|
|||
|
||||
.fieldManageWrapper {
|
||||
.wea-new-top-content {
|
||||
background: #F6F6F6;
|
||||
padding: 8px 16px 0 16px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.slideOuterWrapper {
|
||||
.wea-form-item-group {
|
||||
margin: 16px;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@
|
|||
.baseSettingWrapper {
|
||||
padding: 12px 12px 12px 20px;
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.baseSettingLeft {
|
||||
border: 1px solid #ebedf0;
|
||||
padding: 0 !important;
|
||||
|
|
@ -249,7 +253,7 @@
|
|||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
font-size: 20px !important;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
|
@ -370,6 +374,16 @@
|
|||
|
||||
.incomeDialogContent {
|
||||
height: 100%;
|
||||
padding: 16px;
|
||||
padding: 8px 16px;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-input-focus {
|
||||
margin-bottom: 2px!important;
|
||||
margin-top: 0!important;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue