Merge branch 'release/2.15.1.2407.01' into release/2.15.1.2407.01-个税
This commit is contained in:
commit
290f5d5945
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
import { convertToUrlString } from "../util/url";
|
||||
|
||||
//工资单-工资单发放列表
|
||||
|
|
@ -248,3 +248,8 @@ export const genPdfBeforeExport = (params) => {
|
|||
export const salaryBillPreview = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/preview", params);
|
||||
};
|
||||
// 工资单查看详情导出-重构
|
||||
export const exportDetailList_reconfig = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/salaryBill/send/exportDetailList", params);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
|
||||
//通用字典表 {enumClass:""}
|
||||
export const commonEnumList = (params) => {
|
||||
|
|
@ -75,3 +75,7 @@ export const reportGetForm = params => {
|
|||
export const saveSalarySendFeedback = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
|
||||
};
|
||||
// 数据分析列表导出
|
||||
export const exportDataReport = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportData", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ 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";
|
||||
import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
|
||||
// import Declare from "./pages/declare";
|
||||
import DeclareDetail from "./pages/declareDetail";
|
||||
import DeclareOnlineComparison from "./pages/declareOnlineComparison";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/9/25
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { WeaBrowser, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import cs from "classnames";
|
||||
import { Col, Row } from "antd";
|
||||
import "./index.less";
|
||||
|
|
@ -13,6 +13,48 @@ import "./index.less";
|
|||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class EditSalaryBaseInfo extends Component {
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (this.props.visible !== nextProps.visible && nextProps.visible && !_.isEmpty(nextProps.baseInfo)) {
|
||||
nextProps.onChange(_.map(nextProps.baseInfo, it => {
|
||||
const { fieldValue, canEdit, fieldValueObj } = it;
|
||||
if (canEdit) {
|
||||
const { id: value, name: valueSpan } = fieldValueObj || fieldValue;
|
||||
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
|
||||
}
|
||||
return { ...it };
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
renderBrowser = (item) => {
|
||||
const { fieldType, fieldValue, fieldCode } = item;
|
||||
const { id: value, name: valueSpan } = fieldValue;
|
||||
let browserType = {};
|
||||
switch (fieldType) {
|
||||
case "subcompanyBrowser":
|
||||
browserType = { ...browserType, type: 164, title: getLabel(111, "选择分部") };
|
||||
break;
|
||||
case "departmentBrowser":
|
||||
browserType = { ...browserType, type: 4, title: getLabel(111, "选择部门") };
|
||||
break;
|
||||
case "jobtitleBrowser":
|
||||
browserType = { ...browserType, type: 24, title: getLabel(111, "选择岗位") };
|
||||
break;
|
||||
case "jobcallBrowser":
|
||||
browserType = { ...browserType, type: 260, title: getLabel(111, "选择职称") };
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return <WeaBrowser {...browserType} viewAttr={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 } };
|
||||
}
|
||||
return { ...it };
|
||||
}))}/>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { baseInfo } = this.props;
|
||||
return (
|
||||
|
|
@ -32,7 +74,7 @@ class EditSalaryBaseInfo extends Component {
|
|||
<Row type="flex" className="esf-form-content">
|
||||
{
|
||||
_.map(baseInfo, (item, index) => {
|
||||
const { fieldName, fieldValue } = item;
|
||||
const { fieldName, fieldType, fieldValue, fieldValueObj } = item;
|
||||
return (
|
||||
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 24 : 12}>
|
||||
<Row className={cs("esf-form-item", {
|
||||
|
|
@ -43,7 +85,13 @@ class EditSalaryBaseInfo extends Component {
|
|||
<span className="label" title={fieldName}>{fieldName}</span>
|
||||
</Col>
|
||||
<Col span={(index === baseInfo.length - 1 && (index + 1) % 2 === 1) ? 21 : 18}>
|
||||
<span className="value" title={fieldValue}>{fieldValue}</span>
|
||||
<span className="value" title={fieldValue}>
|
||||
{
|
||||
fieldType.indexOf("Browser") !== -1 ?
|
||||
this.renderBrowser({ ...item, fieldValue: fieldValueObj || fieldValue }) :
|
||||
fieldValue
|
||||
}
|
||||
</span>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/9/25
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, message } from "antd";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaTab } from "ecCom";
|
||||
import EditSalaryBaseInfo from "./baseInfo";
|
||||
import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
|
||||
|
|
@ -87,9 +87,16 @@ class EditSalaryCalcSlide extends Component {
|
|||
};
|
||||
save = () => {
|
||||
const { id: salaryAcctEmpId } = this.props;
|
||||
const { issuedAndReissueItems, itemsByGroup } = this.state;
|
||||
const { issuedAndReissueItems, itemsByGroup, baseInfo } = this.state;
|
||||
if (_.every(baseInfo, it => !it.canEdit || (it.canEdit && !it.fieldValue))) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
salaryAcctEmpId,
|
||||
salaryAcctEmpId, employeeInfos: baseInfo,
|
||||
items: [
|
||||
..._.reduce(itemsByGroup, (pre, cur) => {
|
||||
return [
|
||||
|
|
@ -133,7 +140,8 @@ class EditSalaryCalcSlide extends Component {
|
|||
top={0} width={60} height={100} measure={"%"}
|
||||
direction={"right"} title={this.renderTitle()}
|
||||
content={<div className="salary-calculate-esf-area">
|
||||
<EditSalaryBaseInfo baseInfo={baseInfo}/>
|
||||
<EditSalaryBaseInfo {...this.props} baseInfo={baseInfo}
|
||||
onChange={baseInfo => this.setState({ baseInfo })}/>
|
||||
<WeaTab keyParam="viewcondition" className="calc-esf-tab"
|
||||
selectedKey={selectedKey} onChange={v => this.setState({ selectedKey: v })}
|
||||
datas={!_.isEmpty(issuedAndReissueItems) ? topTab : topTab.slice(0, 1)}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class PayrollItemsTable extends Component {
|
|||
const { canEdit, dataType, pattern } = record;
|
||||
return dataType === "number" ? <WeaInputNumber
|
||||
disabled={!canEdit}
|
||||
precision={pattern || 2}
|
||||
precision={!_.isNil(pattern) ? pattern : 0}
|
||||
value={text || 0}
|
||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
|
||||
/> : <WeaInput
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("payrollStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
render() {
|
||||
const { payrollStore: { detailListConditionForm } } = this.props;
|
||||
return (
|
||||
<div className="advance-search">
|
||||
<WeaInputSearch value={detailListConditionForm.getFormParams().username}
|
||||
onChange={v => detailListConditionForm.updateFields({ username: v })}
|
||||
onSearch={this.props.onAdvanceSearch}
|
||||
/>
|
||||
<Button type="ghost" className="wea-advanced-search text-elli"
|
||||
onClick={this.props.onOpenAdvanceSearch}>{getLabel(111, "高级搜索")}</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
.advance-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: -2.5px;
|
||||
|
||||
.wea-advanced-search {
|
||||
top: 2px;
|
||||
left: -1px;
|
||||
height: 28px;
|
||||
line-height: 1;
|
||||
border-radius: 0;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
}
|
||||
|
||||
.wea-advanced-search:hover {
|
||||
border: 1px solid #dadada;
|
||||
color: #474747;
|
||||
}
|
||||
|
||||
.text-elli {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
/*
|
||||
*
|
||||
* 查看工资单详情-列表
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/7/15
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { Spin } from "antd";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import * as API from "../../../../../apis/payroll";
|
||||
import { getQueryString } from "../../../../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
|
||||
@inject("payrollStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false, dataSource: [], visible: false, updateSum: true, payload: {},
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({ updateSum: true }, () => this.getPayrollDetailList());
|
||||
}
|
||||
|
||||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.getPayrollDetailList();
|
||||
} else if (type === "turn") {
|
||||
switch (id) {
|
||||
case "PAGEINFO":
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current, pageSize },
|
||||
updateSum: false
|
||||
}, () => this.getPayrollDetailList());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
getPayrollDetailList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const salarySendId = getQueryString("id");
|
||||
const { payrollStore: { detailListConditionForm: form, salaryTableStore } } = this.props;
|
||||
const payload = {
|
||||
salarySendId, ...pageInfo, ...form.getFormParams(),
|
||||
departmentIds: form.getFormParams().departmentIds ? form.getFormParams().departmentIds.split(",") : [],
|
||||
subCompanyIds: form.getFormParams().subCompanyIds ? form.getFormParams().subCompanyIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
API.getPayrollDetailList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { dataKey, pageInfo: pageResult, datas: dataSource } = data;
|
||||
const { datas } = dataKey;
|
||||
const { pageNum: current, pageSize, total } = pageResult;
|
||||
salaryTableStore.getDatas(datas);
|
||||
this.setState({ payload, dataSource, pageInfo: { ...pageInfo, current, pageSize, total } });
|
||||
}
|
||||
});
|
||||
};
|
||||
getColumns = () => {
|
||||
const { payrollStore: { salaryTableStore }, showTotalCell } = this.props;
|
||||
const { dataSource, pageInfo, selectedRowKeys, payload, updateSum } = this.state;
|
||||
const columns = _.filter(toJS(salaryTableStore.columns), (item) => item.display === "true");
|
||||
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/salaryBill/send/sum" : "";
|
||||
if (!_.isEmpty(columns)) {
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true,
|
||||
tableScrollHeight: pageInfo.total === 0 ? 90 : 156,
|
||||
sumRowlistUrl, payload: { ...payload, updateSum },
|
||||
columns: _.map(columns, (it, idx) => ({
|
||||
...it, width: it.oldWidth, fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
|
||||
ellipsis: true
|
||||
}))
|
||||
});
|
||||
}
|
||||
return [];
|
||||
};
|
||||
postMessageToChild = (payload) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
handleSetCustomCols = () => {
|
||||
const { payrollStore: { salaryTableStore } } = this.props;
|
||||
this.setState({ updateSum: true }, () => {
|
||||
salaryTableStore.setColSetVisible(true);
|
||||
salaryTableStore.tableColSet(true);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { payrollStore: { salaryTableStore } } = this.props;
|
||||
const { loading, pageInfo } = this.state;
|
||||
const { pageSize, total } = pageInfo;
|
||||
const columnNum = total > 10 ? pageSize + 1 : total + 1;
|
||||
return (
|
||||
<div style={{
|
||||
height: `calc((39px * ${columnNum}) + 126.84px)`,
|
||||
maxHeight: "678px",
|
||||
minHeight: !total ? "270px" : "inherit"
|
||||
}}>
|
||||
<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" }} needScroll={true} columns={this.getColumns()}
|
||||
comsWeaTableStore={salaryTableStore}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { getSearchs } from "../../../../../util";
|
||||
import { Button } from "antd";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("payrollStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
render() {
|
||||
const { payrollStore: { detailListConditionForm }, conditions } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="wea-advanced-searchsAd">
|
||||
{getSearchs(detailListConditionForm, conditions, 2, false)}
|
||||
</div>
|
||||
<div className="wea-search-buttons">
|
||||
<div style={{ textAlign: "center" }}>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="primary" onClick={this.props.onAdSearch}>{getLabel(388113, "搜索")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={() => detailListConditionForm.resetForm()}>{getLabel(2022, "重置")}</Button>
|
||||
</span>
|
||||
<span style={{ marginLeft: 15 }}>
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
*
|
||||
* 薪资所属月-提示框
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/7/15
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SalaryMonthHelpfulTip extends Component {
|
||||
render() {
|
||||
const { salarySendDetailBaseInfo = {} } = this.props;
|
||||
const { salarySobCycle: { salaryCycle, taxCycle, attendCycle, socialSecurityCycle } } = salarySendDetailBaseInfo;
|
||||
const { fromDate, endDate } = salaryCycle;
|
||||
const { fromDate: aFromDate, endDate: aEndDate } = attendCycle;
|
||||
return (
|
||||
<WeaHelpfulTip width={200} placement="topLeft"
|
||||
title={<div>
|
||||
<div>{getLabel(111, "薪资周期")}</div>
|
||||
<div><span>{fromDate}</span><span>{getLabel(111, "至")}</span><span>{endDate}</span></div>
|
||||
<div>{getLabel(111, "税款所属期")}</div>
|
||||
<div>{taxCycle}</div>
|
||||
<div>{getLabel(111, "考勤取值周期")}</div>
|
||||
<div><span>{aFromDate}</span><span>{getLabel(111, "至")}</span><span>{aEndDate}</span></div>
|
||||
<div>{getLabel(111, "福利台账月份")}</div>
|
||||
<div>{`${getLabel(111, "引用")}${socialSecurityCycle}${getLabel(111, "的福利台账数据")}`}</div>
|
||||
</div>}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SalaryMonthHelpfulTip;
|
||||
|
|
@ -31,3 +31,75 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//查看工资单详情-重构
|
||||
.salary-payroll-details-layout {
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.salary-payroll-details {
|
||||
padding: 0 16px 16px;
|
||||
|
||||
.salary-tb-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.salary-payroll-template-name {
|
||||
vertical-align: middle;
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.label {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.searchAdvanced-condition-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchAdvanced-condition-container {
|
||||
background: #FFF;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
.wea-search-buttons {
|
||||
border-top: 1px solid #dadada;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.wea-advanced-searchsAd {
|
||||
height: 246px;
|
||||
overflow: hidden auto;
|
||||
|
||||
.formItem-delete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -40px;
|
||||
}
|
||||
|
||||
.searchAdvanced-commonSelect {
|
||||
border-top: 1px solid #ebebeb;
|
||||
margin: 0 25px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.custom-advance-largeSpacing {
|
||||
padding-left: 26px;
|
||||
|
||||
.link {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 12px 10px 12px 26px;
|
||||
color: #2db7f5
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
*
|
||||
* 查看工资单详情-重构页面
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/7/15
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import SalaryMonthHelpfulTip from "./components/salaryMonthHelpfulTip";
|
||||
import SalaryDetailSearchPannel from "./components/salaryDetailSearchPannel";
|
||||
import SalaryDetailList from "./components/salaryDetailList";
|
||||
import { getQueryString } from "../../../util/url";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { sysConfCodeRule } from "../../../apis/ruleconfig";
|
||||
import * as API from "../../../apis/payroll";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore", "payrollStore")
|
||||
@observer
|
||||
class PayrollDetail extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
salarySendDetailBaseInfo: {}, showSearchAd: false, isQuery: false, conditions: [],
|
||||
showTotalCell: false
|
||||
};
|
||||
this.listRef = null;
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const id = getQueryString("id");
|
||||
const { payrollStore: { detailListConditionForm } } = this.props;
|
||||
const [{ data: salarySendDetailBaseInfo }, { data }, { data: confCode }] = await Promise.all([
|
||||
API.getPayrollInfo({ id }), API.getPayrollDetailSa(),
|
||||
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })
|
||||
]);
|
||||
this.setState({
|
||||
salarySendDetailBaseInfo, showTotalCell: confCode === "1",
|
||||
conditions: removePropertyCondition(data.condition)
|
||||
}, () => detailListConditionForm.initFormFields(this.state.conditions));
|
||||
}
|
||||
|
||||
handleExportAll = () => {
|
||||
const { payrollStore: { salaryTableStore } } = this.props;
|
||||
const columns = _.filter(toJS(salaryTableStore.columns), (item) => item.display === "true");
|
||||
WeaLoadingGlobal.start();
|
||||
const salarySendId = getQueryString("id");
|
||||
const promise = API.exportDetailList_reconfig({ salarySendId, columns: _.map(columns, it => it.dataIndex) });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { salaryMonth, template } = salarySendDetailBaseInfo;
|
||||
const dropMenuDatas = [
|
||||
{
|
||||
key: "BTN_COLUMN",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(111, "显示列定制"),
|
||||
onClick: () => this.listRef.wrappedInstance.handleSetCustomCols()
|
||||
}
|
||||
];
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.handleExportAll}>{getLabel(111, "导出全部")}</Button>,
|
||||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.setState({ showSearchAd: true })}
|
||||
onAdvanceSearch={() => this.setState({ isQuery: !isQuery })}/>
|
||||
];
|
||||
!showOperateBtn && btns.shift();
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(111, "查看工资单详情")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={true} dropMenuDatas={dropMenuDatas}
|
||||
buttons={btns} className="salary-payroll-details-layout"
|
||||
>
|
||||
<div className="salary-payroll-details">
|
||||
<div className="salary-tb-tip">
|
||||
<div>
|
||||
<span><span
|
||||
className="label">{getLabel(111, "薪资所属月")}</span>:<span>{salaryMonth}</span></span>
|
||||
{
|
||||
!_.isEmpty(salarySendDetailBaseInfo) &&
|
||||
<SalaryMonthHelpfulTip salarySendDetailBaseInfo={salarySendDetailBaseInfo}/>
|
||||
}
|
||||
<span
|
||||
className="salary-payroll-template-name"><span
|
||||
className="label">{getLabel(111, "工资单模板")}</span>:<span>{template}</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
|
||||
<SalaryDetailSearchPannel onCancel={() => this.setState({ showSearchAd: false })}
|
||||
onAdSearch={() => this.setState({ isQuery: !isQuery })}
|
||||
conditions={conditions}/>
|
||||
</div>
|
||||
{/*列表*/}
|
||||
<SalaryDetailList isQuery={isQuery} showTotalCell={showTotalCell} ref={dom => this.listRef = dom}/>
|
||||
</div>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PayrollDetail;
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
import React from 'react'
|
||||
import { payrollGrantDetailColumns, dataSource} from '../columns'
|
||||
|
||||
export default class PayrollGrantDeatail extends React.Component {
|
||||
|
||||
|
||||
render() {
|
||||
const handleMenuClick = () => {
|
||||
|
||||
}
|
||||
const menu = (
|
||||
<Menu onClick={handleMenuClick}>
|
||||
<Menu.Item key="1">导出选中</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
const renderRightOperation = () => {
|
||||
return (
|
||||
<div style={{display: "inline-block"}}>
|
||||
<Dropdown.Button style={{marginRight: "10px"}} overlay={menu}>导出全部</Dropdown.Button>
|
||||
<WeaInputSearch />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<CustomTab
|
||||
searchOperationItem={
|
||||
renderRightOperation()
|
||||
}
|
||||
/>
|
||||
<div className="titleBar">
|
||||
<div className="titleBarLeft">
|
||||
<span>薪资所属月:2021-11</span>
|
||||
<WeaHelpfulTip
|
||||
style={{marginLeft: '10px', marginRight: "10px"}}
|
||||
width={200}
|
||||
title="薪资周期\n
|
||||
2021-11-01至2021-11-30\n
|
||||
税款所属期\n
|
||||
2021-12\n
|
||||
考勤取值周期\n
|
||||
2021-11-01至2021-11-30\n
|
||||
福利台账月份\n
|
||||
引用2021-11的福利台账数据"
|
||||
placement="topLeft"
|
||||
/>
|
||||
<span>工资单模板:上海泛微工资单1</span>
|
||||
</div>
|
||||
|
||||
<div className="titleBarRight">
|
||||
<span>已发放:111/<span style={{color: "red"}}>1111</span></span>
|
||||
<span style={{marginLeft: "10px"}}>未确认:111</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Table dataSource={dataSource} columns={payrollGrantDetailColumns} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2023/4/21
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Spin } from "antd";
|
||||
import { message, Spin } from "antd";
|
||||
import { WeaEchart, WeaLocaleProvider } from "ecCom";
|
||||
import RightOptions from "./rightOptions";
|
||||
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
|
||||
|
|
@ -75,7 +75,7 @@ class ReportContent extends Component {
|
|||
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
|
||||
}
|
||||
});
|
||||
} else if (id === "PAGEINFO") {
|
||||
} else if (id === "PAGEINFO_REPORT") {
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report));
|
||||
}
|
||||
}
|
||||
|
|
@ -205,6 +205,11 @@ class ReportContent extends Component {
|
|||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleChangeChartOpts = (chartsType, viewType) => {
|
||||
const { loading } = this.state;
|
||||
if (loading) {
|
||||
message.info(getLabel(111, "列表正在加载中,请稍后"));
|
||||
return;
|
||||
}
|
||||
this.setState({ chartsInfo: {} });
|
||||
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
|
||||
const { report: { id: reportId } } = this.props;
|
||||
|
|
|
|||
|
|
@ -412,7 +412,10 @@ const StatisticalScopePicker = (props) => {
|
|||
<WeaDatePicker
|
||||
value={startDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||
if (!current || !endDate) return false;
|
||||
const start = moment(startDate || endDate).subtract(11, "months").format("YYYY-MM");
|
||||
const end = moment(startDate).add(12, "months").format("YYYY-MM");
|
||||
return current.getTime() < new Date(start).getTime() || current.getTime() > new Date(endDate || end).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => onChange([val, endDate], timeType)}
|
||||
|
|
@ -422,7 +425,11 @@ const StatisticalScopePicker = (props) => {
|
|||
<WeaDatePicker
|
||||
value={endDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
||||
if (!current || !startDate) return false;
|
||||
const start = moment(endDate).subtract(12, "months").format("YYYY-MM");
|
||||
const end = moment(endDate || startDate).add(12, "months").format("YYYY-MM");
|
||||
|
||||
return current.getTime() > new Date(end).getTime() || current.getTime() < new Date(startDate || start).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
viewAttr={viewAttr}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,12 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
|
||||
import { WeaLeftRightLayout, WeaLoadingGlobal, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import LeftTab from "./components/leftTab";
|
||||
import ReportContent from "./components/reportContent";
|
||||
import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide";
|
||||
import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
import { exportDataReport, reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig";
|
||||
import TopBtns from "./components/topBtns";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -92,6 +91,10 @@ class Index extends Component {
|
|||
* Date: 2023/4/24
|
||||
*/
|
||||
exportData = () => {
|
||||
if (this.reportRef.state.loading) {
|
||||
message.info(getLabel(111, "列表正在加载中,请稍后"));
|
||||
return;
|
||||
}
|
||||
const { report } = this.state;
|
||||
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report;
|
||||
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
||||
|
|
@ -99,7 +102,8 @@ class Index extends Component {
|
|||
id, dimensionId, isShare,
|
||||
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
||||
};
|
||||
window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?${convertToUrlString(payload)}`, "_blank");
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = exportDataReport(payload);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ export class payrollStore {
|
|||
@observable salarySendDetailDataSource = []; // 详情列表DataSource
|
||||
@observable salarySendDetailTableStore = new TableStore(); // 详情列表store
|
||||
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
|
||||
@observable salaryTableStore = new TableStore();//薪资查看详情页表格Store
|
||||
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
|
||||
@observable detailListCondition = []; // 详情页搜索条件
|
||||
@observable salarySendDetailPageInfo = {};
|
||||
|
|
|
|||
Loading…
Reference in New Issue