Merge branch 'master' into feature/V2-薪酬统计分析
This commit is contained in:
commit
d2c8928eba
|
|
@ -520,6 +520,39 @@ export const siaccountDetailCommonListSum = (params) => {
|
|||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 社保福利台账补缴合计接口
|
||||
export const siaccountDetailSupplementaryListSum = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 社保福利台账退差合计接口
|
||||
export const siaccountDetailRecessionListSum = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 社保福利台账补差合计接口
|
||||
export const siaccountDetailBalanceListSum = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
// 导入薪资核算添加表头字段缓存
|
||||
export const cacheImportField = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/cacheImportField", {
|
||||
|
|
|
|||
|
|
@ -109,7 +109,10 @@ export default class SelectFieldModal extends React.Component {
|
|||
|
||||
// 添加按钮点击回调
|
||||
handleAddClick = async () => {
|
||||
const { status } = await this.cacheImportField();
|
||||
//薪资核算详情页面的导入表单字段缓存功能
|
||||
if (window.location.hash.indexOf("calculateDetail") !== -1) {
|
||||
const { status } = await this.cacheImportField();
|
||||
}
|
||||
this.props.onAdd(this.fieldData);
|
||||
this.props.onCancel();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import ImportModal from "../../components/importModal";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
|
||||
@inject("calculateStore", "standingBookStore")
|
||||
@observer
|
||||
|
|
@ -35,7 +35,12 @@ export default class CompareDetailImportModal extends React.Component {
|
|||
if (this.props.id) {
|
||||
url = "/api/bs/hrmsalary/salaryacct/comparisonresult/importtemplate/export?salaryAcctRecordId=" + this.props.id;
|
||||
} else {
|
||||
url = `/api/bs/hrmsalary/siaccount/comparisonwelfare/importtemplate/export`;
|
||||
const payload = {
|
||||
billMonth: getQueryString("billMonth"),
|
||||
paymentOrganization: getQueryString("paymentOrganization"),
|
||||
paymentStatus: 0
|
||||
};
|
||||
url = `/api/bs/hrmsalary/siaccount/comparisonwelfare/importtemplate/export?${convertToUrlString(payload)}`;
|
||||
}
|
||||
window.open(url);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { inject, observer } from "mobx-react";
|
|||
import SalaryDetail from "./salaryDetail";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ export default class CalculateDetail extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
selectedRowKeys: [],
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
salaryAcctRecordId
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -208,8 +208,11 @@ export default class CalculateDetail extends React.Component {
|
|||
this.id
|
||||
);
|
||||
} else if (e.key == "3") {
|
||||
const { searchItemsValue } = this.state;
|
||||
const { consolidatedTaxation, ...extra } = searchItemsValue;
|
||||
const payload = { ...extra, consolidatedTaxation: consolidatedTaxation === "0" ? "" : consolidatedTaxation };
|
||||
window.open(
|
||||
"/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=" + this.id + "&ids="
|
||||
`/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=${this.id}&ids=&${convertToUrlString(payload)}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -56,17 +56,17 @@ class Index extends Component {
|
|||
};
|
||||
handleChangeSalaryMonth = (salaryMonth) => this.setState({ salaryMonth }, () => this.attendanceTableRef.getAttendanceList({ salaryYearMonth: _.compact(this.state.salaryMonth) }));
|
||||
handleAddAttendFileds = () => this.fieldMangRef.handleTriggerAttendFileds();
|
||||
handleImportAttendanceData= ()=>{
|
||||
handleImportAttendanceData = () => {
|
||||
this.attendanceTableRef.handleImportAttendanceData({
|
||||
visiable: true, params: {}, step: 0,
|
||||
columns: [], slideDataSource: [], importResult: []
|
||||
});
|
||||
}
|
||||
handleQuoteAttendanceData= ()=>{
|
||||
};
|
||||
handleQuoteAttendanceData = () => {
|
||||
this.attendanceTableRef.handleQuoteAttendanceData({
|
||||
visible: true, title: "引用考勤数据"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, salaryMonth, fieldName } = this.state;
|
||||
|
|
@ -82,7 +82,7 @@ class Index extends Component {
|
|||
return (
|
||||
<div className="attendanceRefWrapper">
|
||||
<WeaTab
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} buttons={buttons}
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} buttons={showOperateBtn ? buttons : []}
|
||||
searchType={selectedKey === "FIELD" ? ["base"] : []} searchsBasePlaceHolder="请输入字段名称"
|
||||
onChange={v => this.setState({ selectedKey: v })}
|
||||
searchsBaseValue={fieldName} onSearchChange={fieldName => this.setState({ fieldName })}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import ImportFormCom from "./components/importFormCom";
|
|||
import TableRecord from "../components/tableRecord";
|
||||
import { dataCollectCondition, modalColumns } from "./columns";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import Layout from "../layout";
|
||||
import moment from "moment";
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ class Index extends Component {
|
|||
slideDataSource: []
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
};
|
||||
this.tableRef = null;
|
||||
|
|
@ -160,9 +162,11 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
const { cumDeductStore: { form } } = this.props;
|
||||
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
@ -173,12 +177,13 @@ class Index extends Component {
|
|||
*/
|
||||
handleExportSelect = () => {
|
||||
const { selectedRowKeys: ids } = this.tableRef.state;
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
|
||||
if (ids.length === 0) {
|
||||
message.warning("请选择需要导出的数据");
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
});
|
||||
};
|
||||
|
|
@ -497,7 +502,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload
|
||||
importPayload, exportPayloadType
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -505,6 +510,7 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import { dataCollectCondition, taxOptions } from "./columns";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { situationModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
@inject("taxAgentStore", "cumSituationStore")
|
||||
@observer
|
||||
|
|
@ -59,6 +60,7 @@ class Index extends Component {
|
|||
slideDataSource: []
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
};
|
||||
this.tableRef = null;
|
||||
|
|
@ -277,9 +279,11 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { declareMonth, taxAgentId, year } = this.state;
|
||||
const { cumSituationStore: { form } } = this.props;
|
||||
const { declareMonth, taxAgentId, year, exportPayloadType } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
@ -290,12 +294,13 @@ class Index extends Component {
|
|||
*/
|
||||
handleExportSelect = () => {
|
||||
const { selectedRowKeys: ids } = this.tableRef.state;
|
||||
const { declareMonth, taxAgentId, year } = this.state;
|
||||
const { declareMonth, taxAgentId, year, exportPayloadType } = this.state;
|
||||
if (ids.length === 0) {
|
||||
message.warning("请选择需要导出的数据");
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${ids.join(",")}&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
});
|
||||
};
|
||||
|
|
@ -511,7 +516,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, year
|
||||
importPayload, year, exportPayloadType
|
||||
} = this.state;
|
||||
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
|
||||
return (
|
||||
|
|
@ -519,6 +524,7 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class DataTables extends Component {
|
|||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={getColumns.length * 120}
|
||||
xWidth={getColumns.length * 150}
|
||||
/>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Layout extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.exportPayloadUrl !== this.props.exportPayloadUrl) {
|
||||
if (nextProps.exportPayloadType !== this.props.exportPayloadType) {
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:导出数据采集数据
|
||||
|
|
|
|||
|
|
@ -103,6 +103,15 @@ export const dataCollectCondition = [
|
|||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["privatePension"],
|
||||
fieldcol: 14,
|
||||
label: "个人养老金",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "数据采集",
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { otherModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
@inject("taxAgentStore", "otherDeductStore")
|
||||
@observer
|
||||
|
|
@ -59,6 +60,7 @@ class Index extends Component {
|
|||
slideDataSource: []
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
};
|
||||
this.tableRef = null;
|
||||
|
|
@ -250,9 +252,11 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
const { otherDeductStore: { form } } = this.props;
|
||||
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
@ -263,12 +267,13 @@ class Index extends Component {
|
|||
*/
|
||||
handleExportSelect = () => {
|
||||
const { selectedRowKeys: ids } = this.tableRef.state;
|
||||
const { declareMonth, taxAgentId } = this.state;
|
||||
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
|
||||
if (ids.length === 0) {
|
||||
message.warning("请选择需要导出的数据");
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
|
||||
});
|
||||
};
|
||||
|
|
@ -504,7 +509,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload
|
||||
importPayload, exportPayloadType
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -512,6 +517,7 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import { condition } from "./components/condition";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { specialModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
@inject("taxAgentStore", "specialAddStore")
|
||||
@observer
|
||||
|
|
@ -49,6 +50,7 @@ class Index extends Component {
|
|||
slideDataSource: []
|
||||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
};
|
||||
this.tableRef = null;
|
||||
|
|
@ -207,9 +209,11 @@ class Index extends Component {
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
handleExportAll = () => {
|
||||
const { taxAgentId } = this.state;
|
||||
const { specialAddStore: { advanceForm } } = this.props;
|
||||
const { taxAgentId, exportPayloadType } = this.state;
|
||||
this.setState({
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}`
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}&${convertToUrlString(advanceForm.getFormParams())}`
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
@ -220,12 +224,13 @@ class Index extends Component {
|
|||
*/
|
||||
handleExportSelect = () => {
|
||||
const { selectedRowKeys: ids } = this.tableRef.state;
|
||||
const { taxAgentId } = this.state;
|
||||
const { taxAgentId, exportPayloadType } = this.state;
|
||||
if (ids.length === 0) {
|
||||
message.warning("请选择需要导出的数据");
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
exportPayloadType: !exportPayloadType,
|
||||
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=${ids.join(",")}&taxAgentId=${taxAgentId}`
|
||||
});
|
||||
};
|
||||
|
|
@ -414,7 +419,8 @@ class Index extends Component {
|
|||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
||||
const {
|
||||
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload
|
||||
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
|
||||
exportPayloadType
|
||||
} = this.state;
|
||||
const tablePayload = { taxAgentId };
|
||||
return (
|
||||
|
|
@ -422,6 +428,7 @@ class Index extends Component {
|
|||
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
|
||||
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
|
||||
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
|
||||
exportPayloadType={exportPayloadType}
|
||||
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
|
||||
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
|
||||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
|
|
|
|||
|
|
@ -232,17 +232,17 @@ class FieldSlide extends Component {
|
|||
{/* />*/}
|
||||
{/* </WeaFormItem>*/}
|
||||
{/*}*/}
|
||||
<WeaFormItem label="默认使用" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaCheckbox
|
||||
value={useDefault}
|
||||
display="switch"
|
||||
onChange={value => this.handleChangeFields("useDefault", value)}
|
||||
/>
|
||||
<WeaHelpfulTip style={{ marginLeft: "10px" }}
|
||||
title="提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</WeaFormItem>
|
||||
{/*<WeaFormItem label="默认使用" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>*/}
|
||||
{/* <WeaCheckbox*/}
|
||||
{/* value={useDefault}*/}
|
||||
{/* display="switch"*/}
|
||||
{/* onChange={value => this.handleChangeFields("useDefault", value)}*/}
|
||||
{/* />*/}
|
||||
{/* <WeaHelpfulTip style={{ marginLeft: "10px" }}*/}
|
||||
{/* title="提示:开启后,每个薪资方案都有该薪资项目,可在具体薪资方案中删除"*/}
|
||||
{/* placement="topLeft"*/}
|
||||
{/* />*/}
|
||||
{/*</WeaFormItem>*/}
|
||||
<WeaFormItem label="可见性" labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaSelect
|
||||
value={sharedType}
|
||||
|
|
|
|||
|
|
@ -8,10 +8,16 @@ import React, { Component } from "react";
|
|||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
|
||||
import { Col, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import {toJS} from 'mobx';
|
||||
import { baseSettingFormItem } from "../config";
|
||||
import { getLedgerBasicForm } from "../../../apis/ledger";
|
||||
import { getAddMonthYearMonth, getCurrentYearMonth, getSubtractMonthYearMonth } from "../../../util/date";
|
||||
import {
|
||||
generateBasicInfo,
|
||||
getAddMonthYearMonth,
|
||||
getCurrentYearMonth,
|
||||
getMonthDays,
|
||||
getSubtractMonthYearMonth,
|
||||
prefixAddZero
|
||||
} from "../../../util/date";
|
||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
|
@ -206,9 +212,8 @@ export default LedgerBaseSetting;
|
|||
|
||||
const CustomSelect = (props) => {
|
||||
const { list, baseInfo, onChange, inputStr } = props;
|
||||
const { salaryCycleType, salaryCycleFromDay, attendCycleType, attendCycleFromDay, canEdit } = baseInfo;
|
||||
const salaryCycleStrObj = initPeriodStr("inputStr", salaryCycleType, salaryCycleFromDay);
|
||||
const attendCycleStrObj = initPeriodStr("inputStr", attendCycleType, attendCycleFromDay);
|
||||
const { canEdit } = baseInfo;
|
||||
const selectInfo = buildEditBasicInfo(baseInfo);
|
||||
return <Row gutter={10} key={inputStr}>
|
||||
{
|
||||
_.map(list, item => {
|
||||
|
|
@ -221,20 +226,12 @@ const CustomSelect = (props) => {
|
|||
})
|
||||
}
|
||||
<Col span={12}
|
||||
className="desc">{inputStr === "salaryCycleStrObj" ? salaryCycleStrObj.inputStr : attendCycleStrObj.inputStr}</Col>
|
||||
className="desc">{inputStr === "salaryCycleStrObj" ? selectInfo.salaryCycleInfo.salaryPeriodTip : selectInfo.attendCycleInfo.attendancePeriodTip}</Col>
|
||||
</Row>;
|
||||
};
|
||||
const MonthCycleDesc = (props) => {
|
||||
const {
|
||||
taxCycleType,
|
||||
socialSecurityCycleType,
|
||||
salaryCycleFromDay,
|
||||
salaryCycleType,
|
||||
attendCycleType,
|
||||
attendCycleFromDay
|
||||
} = props;
|
||||
const salaryCycleStrObj = initPeriodStr("salaryCycleStr", salaryCycleType, salaryCycleFromDay);
|
||||
const attendCycleStrObj = initPeriodStr("attendCycleStr", attendCycleType, attendCycleFromDay);
|
||||
const { taxCycleType, socialSecurityCycleType } = props;
|
||||
const selectInfo = buildEditBasicInfo({ ...props });
|
||||
return <div className="baseSettingRight">
|
||||
<div className="title">月份周期说明</div>
|
||||
<div className="descContent">
|
||||
|
|
@ -245,28 +242,131 @@ const MonthCycleDesc = (props) => {
|
|||
<div>根据您当前的选择,相应的周期为:</div>
|
||||
<div className="descTitle">薪资周期</div>
|
||||
<div>
|
||||
<span className="notice">{getStartDate(salaryCycleType, salaryCycleFromDay)}</span>至
|
||||
<span className="notice">{salaryCycleStrObj.date}</span>
|
||||
<span className="notice">{selectInfo.salaryCycleInfo.salaryPeriodStart}</span>至
|
||||
<span className="notice">{selectInfo.salaryCycleInfo.salaryPeriodEnd}</span>
|
||||
</div>
|
||||
<div className="descTitle">税款所属期</div>
|
||||
<div className="notice">{getMonth(taxCycleType)}</div>
|
||||
<div className="descTitle">考勤取值周期</div>
|
||||
<div>
|
||||
<span className="notice">{getStartDate(attendCycleType, attendCycleFromDay)}</span>至
|
||||
<span className="notice">{attendCycleStrObj.date}</span>
|
||||
<span className="notice">{selectInfo.attendCycleInfo.attendancePeriodStart}</span>至
|
||||
<span className="notice">{selectInfo.attendCycleInfo.attendancePeriodEnd}</span>
|
||||
</div>
|
||||
<div className="descTitle">福利台账月份</div>
|
||||
<div>引用<span className="notice">{getMonth(socialSecurityCycleType)}</span>的福利台账数据</div>
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
||||
// 获取开始日期
|
||||
const getStartDate = (salaryCycleType, day) => {
|
||||
day = Number(day);
|
||||
return getMonth(salaryCycleType) + "-" + (day < 10 ? "0" + day : day);
|
||||
const buildEditBasicInfo = (editBasicInfo) => {
|
||||
const { attendCycleType, salaryCycleType } = editBasicInfo;
|
||||
const now = new Date();
|
||||
let nowYear = now.getFullYear();
|
||||
let nowMonth = now.getMonth() + 1;
|
||||
let tmpV = {};
|
||||
// 薪资联动
|
||||
switch (salaryCycleType) {
|
||||
case "1" :
|
||||
tmpV["salaryCycleInfo"] = buildSalaryInfo(editBasicInfo, -2, nowYear, nowMonth);
|
||||
break;
|
||||
case "2" :
|
||||
tmpV["salaryCycleInfo"] = buildSalaryInfo(editBasicInfo, -1, nowYear, nowMonth);
|
||||
break;
|
||||
case "3" :
|
||||
tmpV["salaryCycleInfo"] = buildSalaryInfo(editBasicInfo, 0, nowYear, nowMonth);
|
||||
break;
|
||||
case "4" :
|
||||
tmpV["salaryCycleInfo"] = buildSalaryInfo(editBasicInfo, 1, nowYear, nowMonth);
|
||||
break;
|
||||
}
|
||||
// 考勤联动
|
||||
switch (attendCycleType) {
|
||||
case "1" :
|
||||
tmpV["attendCycleInfo"] = buildAttendanceInfo(editBasicInfo, -2, nowYear, nowMonth);
|
||||
break;
|
||||
case "2" :
|
||||
tmpV["attendCycleInfo"] = buildAttendanceInfo(editBasicInfo, -1, nowYear, nowMonth);
|
||||
break;
|
||||
case "3" :
|
||||
tmpV["attendCycleInfo"] = buildAttendanceInfo(editBasicInfo, 0, nowYear, nowMonth);
|
||||
break;
|
||||
case "4" :
|
||||
tmpV["attendCycleInfo"] = buildAttendanceInfo(editBasicInfo, 1, nowYear, nowMonth);
|
||||
break;
|
||||
}
|
||||
return tmpV;
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:构建薪资周期联动信息
|
||||
* Params:
|
||||
* Date: 2023/4/17
|
||||
*/
|
||||
const buildSalaryInfo = (editBasicInfo, monthCal, nowYear, nowMonth) => {
|
||||
const { salaryCycleFromDay } = editBasicInfo;
|
||||
let salaryCycleFromDayNum = Number(salaryCycleFromDay), customInfo = {};
|
||||
const basicInfo = generateBasicInfo(monthCal, nowYear, nowMonth);
|
||||
const { nowMonthStr, nextMonthStr, year, month } = basicInfo;
|
||||
customInfo.salaryYear = year;
|
||||
customInfo.salaryMonth = month;
|
||||
|
||||
if (salaryCycleFromDayNum === 1) {
|
||||
customInfo.salaryPeriodTip = "至" + nowMonthStr + "最后一天";
|
||||
customInfo.salaryPeriodStart = customInfo.salaryYear + "-"
|
||||
+ prefixAddZero(customInfo.salaryMonth, 2) + "-01";
|
||||
customInfo.salaryPeriodEnd = customInfo.salaryYear + "-"
|
||||
+ prefixAddZero(customInfo.salaryMonth, 2) + "-"
|
||||
+ prefixAddZero(getMonthDays(customInfo.salaryYear, customInfo.salaryMonth), 2);
|
||||
} else {
|
||||
customInfo.salaryPeriodTip = "至" + nextMonthStr + (salaryCycleFromDayNum - 1) + "号";
|
||||
customInfo.salaryPeriodStart = customInfo.salaryYear + "-"
|
||||
+ prefixAddZero(customInfo.salaryMonth, 2) + "-" + prefixAddZero(salaryCycleFromDayNum, 2);
|
||||
let year = customInfo.salaryYear;
|
||||
let month = customInfo.salaryMonth;
|
||||
if (month === "12") {
|
||||
year = Number(year) + 1;
|
||||
month = 1;
|
||||
} else {
|
||||
month = Number(month) + 1;
|
||||
}
|
||||
customInfo.salaryPeriodEnd = year + "-"
|
||||
+ prefixAddZero(month, 2) + "-"
|
||||
+ prefixAddZero(salaryCycleFromDayNum - 1, 2);
|
||||
}
|
||||
return customInfo;
|
||||
};
|
||||
const buildAttendanceInfo = (editBasicInfo, monthCal, nowYear, nowMonth) => {
|
||||
const { attendCycleFromDay } = editBasicInfo;
|
||||
let attendCycleFromDayNum = Number(attendCycleFromDay), customInfo = {};
|
||||
|
||||
const basicInfo = generateBasicInfo(monthCal, nowYear, nowMonth);
|
||||
const { nowMonthStr, nextMonthStr } = basicInfo;
|
||||
let year = basicInfo.year;
|
||||
let month = basicInfo.month;
|
||||
|
||||
if (attendCycleFromDayNum === 1) {
|
||||
customInfo.attendancePeriodTip = "至" + nowMonthStr + "最后一天";
|
||||
|
||||
customInfo.attendancePeriodStart = year + "-"
|
||||
+ prefixAddZero(month, 2) + "-01";
|
||||
customInfo.attendancePeriodEnd = year + "-"
|
||||
+ prefixAddZero(month, 2) + "-"
|
||||
+ prefixAddZero(getMonthDays(year, month), 2);
|
||||
} else {
|
||||
customInfo.attendancePeriodTip = "至" + nextMonthStr + (attendCycleFromDayNum - 1) + "号";
|
||||
customInfo.attendancePeriodStart = year + "-"
|
||||
+ prefixAddZero(month, 2) + "-" + prefixAddZero(attendCycleFromDayNum, 2);
|
||||
if (month === "12") {
|
||||
year = (Number(year) + 1).toString();
|
||||
month = "1";
|
||||
} else {
|
||||
month = (Number(month) + 1).toString();
|
||||
}
|
||||
customInfo.attendancePeriodEnd = year + "-"
|
||||
+ prefixAddZero(month, 2) + "-"
|
||||
+ prefixAddZero(attendCycleFromDayNum - 1, 2);
|
||||
}
|
||||
return customInfo;
|
||||
};
|
||||
const getMonth = (salaryCycleType) => {
|
||||
switch (salaryCycleType) {
|
||||
case "1": // 上上月
|
||||
|
|
@ -279,62 +379,3 @@ const getMonth = (salaryCycleType) => {
|
|||
return getAddMonthYearMonth(1);
|
||||
}
|
||||
};
|
||||
const initPeriodStr = (periodStrType, types, fromDay) => {
|
||||
let str = "", tmpDate = null;
|
||||
switch (types) {
|
||||
case "1":
|
||||
tmpDate = moment().subtract(2, "month");
|
||||
const is_31H = moment(tmpDate, "YYYY-MM").daysInMonth() === 31;
|
||||
if (fromDay == 1) {
|
||||
tmpDate = moment().subtract(2, "month").endOf("month");
|
||||
str = `至上上月最后一天`;
|
||||
} else {
|
||||
tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`))
|
||||
.add(is_31H ? 30 : 27, "days");
|
||||
str = `至上月${moment(tmpDate).date()}号`;
|
||||
}
|
||||
break;
|
||||
case "2":
|
||||
tmpDate = moment().subtract(1, "month");
|
||||
const is_31 = moment(tmpDate, "YYYY-MM").daysInMonth() === 31;
|
||||
if (fromDay == 1) {
|
||||
tmpDate = moment().subtract(1, "month").endOf("month");
|
||||
str = `至上月最后一天`;
|
||||
} else {
|
||||
tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`))
|
||||
.add(is_31 ? 30 : 27, "days");
|
||||
str = `至本月${moment(tmpDate).date()}号`;
|
||||
}
|
||||
break;
|
||||
case "3":
|
||||
tmpDate = moment().add(0, "month");
|
||||
const is_31K = moment(tmpDate, "YYYY-MM").daysInMonth() === 31;
|
||||
if (fromDay == 1) {
|
||||
tmpDate = moment().endOf("month");
|
||||
str = `至本月最后一天`;
|
||||
} else {
|
||||
tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`))
|
||||
.add(is_31K ? 30 : 27, "days");
|
||||
str = `至下月${moment(tmpDate).date()}号`;
|
||||
}
|
||||
break;
|
||||
case "4":
|
||||
tmpDate = moment().add(1, "month");
|
||||
const is_31L = moment(tmpDate, "YYYY-MM").daysInMonth() === 31;
|
||||
if (fromDay == 1) {
|
||||
tmpDate = moment().add(1, "month").endOf("month");
|
||||
str = `至下月最后一天`;
|
||||
} else {
|
||||
tmpDate = moment(new Date(`${moment(tmpDate).format("YYYY-MM")}-0${fromDay}`))
|
||||
.add(is_31L ? 30 : 29, "days");
|
||||
str = `至下下月${moment(tmpDate).date()}号`;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return {
|
||||
[periodStrType]: str,
|
||||
date: moment(tmpDate).format("YYYY-MM-DD")
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -301,10 +301,10 @@ class LedgerSalaryItem extends Component {
|
|||
* Params:
|
||||
* Date: 2023/3/8
|
||||
*/
|
||||
handleMoveSalaryItem = (moveToItemId, items) => {
|
||||
handleMoveSalaryItem = (moveToItemId, items, titleName) => {
|
||||
const { itemGroups } = this.state;
|
||||
const { salaryItemGroupId: deleteItemId, id, key } = items;
|
||||
if (moveToItemId === deleteItemId) return;
|
||||
if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === "未分类")) return;
|
||||
this.setState({
|
||||
itemGroups: _.map(itemGroups, it => {
|
||||
if (moveToItemId === it.uuid) {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
name: "",
|
||||
selectedRowKeys: [],
|
||||
dataSource: [],
|
||||
dataSourceCopy: [],
|
||||
columns: [],
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
|
|
@ -24,7 +25,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visivle && nextProps.visible) {
|
||||
this.setState({ selectedRowKeys: [] }, () => {
|
||||
this.setState({ selectedRowKeys: [], dataSourceCopy: [] }, () => {
|
||||
this.listSalaryItem();
|
||||
});
|
||||
}
|
||||
|
|
@ -32,7 +33,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
|
||||
listSalaryItem = () => {
|
||||
const { itemGroups } = this.props;
|
||||
const { name, pageInfo, loading } = this.state;
|
||||
const { name, pageInfo, loading, dataSourceCopy } = this.state;
|
||||
let excludeIds = [];
|
||||
itemGroups.map(item => {
|
||||
item.items && item.items.map(i => {
|
||||
|
|
@ -50,6 +51,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
if (status) {
|
||||
const { pageNum: current, pageSize, total, columns, list: dataSource } = data;
|
||||
this.setState({
|
||||
dataSourceCopy: [...dataSourceCopy, ...dataSource],
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns
|
||||
|
|
@ -80,11 +82,11 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
};
|
||||
|
||||
handleAdd = () => {
|
||||
const { dataSource, selectedRowKeys } = this.state;
|
||||
const { dataSourceCopy, selectedRowKeys } = this.state;
|
||||
const { onAddSalaryItems, id, onCancel, itemGroups } = this.props;
|
||||
const arrItems = _.find(itemGroups, it => it.uuid === id).items || [];
|
||||
let selectItems = [];
|
||||
dataSource.map((item) => {
|
||||
dataSourceCopy.map((item) => {
|
||||
item = { ...item };
|
||||
selectedRowKeys.map((key, keyIdx) => {
|
||||
if (item.id === key) {
|
||||
|
|
|
|||
|
|
@ -175,11 +175,11 @@ class LedgerSalaryItemNormal extends Component {
|
|||
});
|
||||
};
|
||||
handleSubmitMoveTo = () => {
|
||||
const { onMoveSalaryItem } = this.props;
|
||||
const { onMoveSalaryItem, dataSource } = this.props;
|
||||
const { moveModalPayload } = this.state;
|
||||
const { record, value } = moveModalPayload;
|
||||
this.handleCancelMove();
|
||||
onMoveSalaryItem(value, record);
|
||||
onMoveSalaryItem(value, record, _.find(dataSource, it => (it.id === value || it.uuid === value)).name);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
const { dataSource, onHandleItemhide } = this.props;
|
||||
onHandleItemhide(
|
||||
_.map([...dataSource], item => {
|
||||
if (id === item.id) {
|
||||
if (id === item.id || id === item.key) {
|
||||
return {
|
||||
...item,
|
||||
itemHide: String(value)
|
||||
|
|
@ -48,7 +48,14 @@ class LedgerSalaryItemTable extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, onDropCategoryItem, onChangeSelectedRowKeys, onEditFormnul, selectedRowKeys, onMoveTo } = this.props;
|
||||
const {
|
||||
dataSource,
|
||||
onDropCategoryItem,
|
||||
onChangeSelectedRowKeys,
|
||||
onEditFormnul,
|
||||
selectedRowKeys,
|
||||
onMoveTo
|
||||
} = this.props;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }, () => {
|
||||
|
|
@ -58,7 +65,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
disabled: !record.canDelete
|
||||
})
|
||||
};
|
||||
const checkValue = _.every(dataSource, it => it.itemHide && it.itemHide === "1") ? "1" : "0";
|
||||
const checkValue = (!_.isEmpty(dataSource) && _.every(dataSource, it => it.itemHide && it.itemHide === "1")) ? "1" : "0";
|
||||
const columns = [
|
||||
{
|
||||
title: "名称",
|
||||
|
|
@ -102,7 +109,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
width: 80,
|
||||
render: (text, record) => <WeaCheckbox
|
||||
value={text ? String(text) : !text ? "0" : "1"}
|
||||
onChange={value => this.handleChangeItem(value, record.id)}
|
||||
onChange={value => this.handleChangeItem(value, record.id || record.key)}
|
||||
/>
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ export default class MobilePayroll extends React.Component {
|
|||
const type = getQueryString("type");
|
||||
this.id = getQueryString("id");
|
||||
const { mySalaryStore: { init } } = this.props;
|
||||
type !== "phone" && init(false);
|
||||
// type !== "phone" && init(false);
|
||||
init(false);
|
||||
this.getMySalaryBill(this.id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ import { Button, Spin } from "antd";
|
|||
import { getQueryString } from "../../../util/url";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { getSearchs } from "../../../util";
|
||||
import { getPayrollDetailList, getPayrollDetailSa, getPayrollInfo, salaryBillSendSum } from "../../../apis/payroll";
|
||||
import { sysConfCodeRule } from "../../../apis/ruleconfig";
|
||||
import { getPayrollDetailList, getPayrollDetailSa, getPayrollInfo } from "../../../apis/payroll";
|
||||
import "./index.less";
|
||||
|
||||
@inject("payrollStore")
|
||||
|
|
@ -17,8 +16,7 @@ export default class PayrollDetail extends React.Component {
|
|||
this.state = {
|
||||
salarySendDetailBaseInfo: {}, loading: false,
|
||||
condition: [], dataSource: [], columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
salaryBillSendSum: {}, showSum: false
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -54,16 +52,11 @@ export default class PayrollDetail extends React.Component {
|
|||
}
|
||||
}
|
||||
if (type === "init") {
|
||||
const { status, data: sysData } = await this.sysConfCodeRule();
|
||||
const { data: { sumRow } } = await this.salaryBillSendSum();
|
||||
const salaryBillSendSum = _.reduce(_.keys(sumRow), (pre, cur) => (_.assign(pre, { [`${cur}_salaryItem`]: sumRow[cur] })), {});
|
||||
this.setState({ showSum: status && sysData === "1", salaryBillSendSum });
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource,
|
||||
columns,
|
||||
pageInfo,
|
||||
showSum: status && sysData === "1",
|
||||
salaryBillSendSum
|
||||
sumpayload: { salarySendId: getQueryString("id") }
|
||||
}), "*");
|
||||
this.getPayrollDetailList({ child: type });
|
||||
}
|
||||
|
|
@ -110,25 +103,18 @@ export default class PayrollDetail extends React.Component {
|
|||
})),
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
}, () => {
|
||||
const { pageInfo, dataSource, columns, salaryBillSendSum, showSum } = this.state;
|
||||
const { pageInfo, dataSource, columns } = this.state;
|
||||
(child === "PAGEINFO" || child === "init") &&
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource,
|
||||
columns,
|
||||
pageInfo, showSum,
|
||||
salaryBillSendSum
|
||||
pageInfo,
|
||||
sumpayload: { salarySendId: getQueryString("id") }
|
||||
}), "*");
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
salaryBillSendSum = () => {
|
||||
const salarySendId = getQueryString("id");
|
||||
return salaryBillSendSum({ salarySendId });
|
||||
};
|
||||
sysConfCodeRule = () => {
|
||||
return sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" });
|
||||
};
|
||||
handleExportAll = () => {
|
||||
const salarySendId = getQueryString("id");
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${salarySendId}`;
|
||||
|
|
|
|||
|
|
@ -491,7 +491,8 @@ export default class Archives extends React.Component {
|
|||
break;
|
||||
case "suspend":
|
||||
dom = <div>
|
||||
<div>1、数据进入【待减员】规则:①员工的人事状态属性从在职变成非在职,且在【在缴员工】里;②【在缴员工】里档案维护了缴纳终止月且小于等于当前月;③个税扣缴义务人发生调整;④某员工分权时在原个税扣缴义务人下处于【在缴员工】里但又将该员工添加到其他的个税扣缴义务人下的情况;</div>
|
||||
{/*④某员工分权时在原个税扣缴义务人下处于【在缴员工】里但又将该员工添加到其他的个税扣缴义务人下的情况;*/}
|
||||
<div>1、数据进入【待减员】规则:①员工的人事状态属性从在职变成非在职,且在【在缴员工】里;②【在缴员工】里档案维护了缴纳终止月且小于等于当前月;③个税扣缴义务人发生调整;</div>
|
||||
<div>2、【待减员】为是否不再缴纳的待办状态,数据是从【在缴员工】中复制的,若不处理列表中的待办数据,也不影响社保福利核算;【待减员】维护的数据和【在缴员工】数据是同步的;</div>
|
||||
<div>3、点击【减员】前先维护最后缴纳月,所有有起始缴纳月的福利项的最后缴纳月都小于等于当前月且无未归档的核算数据的档案才能减员成功,减员成功后数据进入【停缴员工】;</div>
|
||||
{/*<div>4、数据进入【待减员】规则的第四种情况下,若还需要在当前个税扣缴义务人下进行缴纳的话,当前该员工的【待减员】数据进行【删除待办】操作即可;若不在该个税扣缴义务人下继续缴纳,维护好最后缴纳月后进行【减员】操作,员工进入【停缴员工】;</div>*/}
|
||||
|
|
@ -500,7 +501,7 @@ export default class Archives extends React.Component {
|
|||
default:
|
||||
dom = <div>
|
||||
<div>1、不需要缴纳社保福利的员工,保存在【停缴员工】;</div>
|
||||
<div>2、【停缴员工】点击取消停缴,数据会回退到上次的位置(从【待减员】减员到停缴员工的,点击停缴返回到【在缴员工】,不返回到【待减员】);</div>
|
||||
{/*<div>2、【停缴员工】点击取消停缴,数据会回退到上次的位置(从【待减员】减员到停缴员工的,点击停缴返回到【在缴员工】,不返回到【待减员】);</div>*/}
|
||||
{/*<div>3、若员工的社保福利从一个个税扣缴义务人下转到另一个个税扣缴义务人下去缴纳,则在转后的个税扣缴义务人的【待增员】中进行增员操作成功后,员工进入待【在缴员工】,而在原个税扣缴义务人下的【停缴员工】中,该员工数据将会被删除;是否开启分权员工的档案数据都只保存一份;</div>*/}
|
||||
</div>;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@
|
|||
.tableWrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.tdEllipsis {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ import { getQueryString } from "../../../../util/url";
|
|||
import ProgressModal from "../../../../components/progressModal";
|
||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||
import AdjustmentSlide from "./adjustmentSlide";
|
||||
import { getCalculateProgress, siaccountDetailCommonListSum } from "../../../../apis/calculate";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
import { getCalculateProgress } from "../../../../apis/calculate";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
import SupplementarySlide from "./supplementarySlide";
|
||||
import _ from "lodash";
|
||||
|
|
@ -76,13 +75,7 @@ export default class NormalIndex extends Component {
|
|||
handleReceive = async ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
const { selectedKey } = this.props;
|
||||
const { status, data: sysData } = await this.sysConfCodeRule();
|
||||
const { data: { sumRow: siaccountSum } } = await this.siaccountDetailCommonListSum();
|
||||
this.setState({
|
||||
showSum: selectedKey === "1" && status && sysData === "1",
|
||||
siaccountSum
|
||||
}, () => this.postMessageToChild());
|
||||
this.postMessageToChild();
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
|
|
@ -105,13 +98,6 @@ export default class NormalIndex extends Component {
|
|||
}
|
||||
}
|
||||
};
|
||||
sysConfCodeRule = () => {
|
||||
return sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" });
|
||||
};
|
||||
siaccountDetailCommonListSum = () => {
|
||||
const { billMonth, paymentOrganization } = this.props;
|
||||
return siaccountDetailCommonListSum({ billMonth, paymentOrganization });
|
||||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.timer) {
|
||||
|
|
@ -138,20 +124,22 @@ export default class NormalIndex extends Component {
|
|||
}
|
||||
|
||||
postMessageToChild = () => {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const { current, pageSize, tableData, selectedRowKeys, showSum, siaccountSum } = this.state;
|
||||
const { current, pageSize, tableData, selectedRowKeys, showSum, siaccountSum, searchValue: userName } = this.state;
|
||||
const { list: dataSource, total, columns } = tableData;
|
||||
const pageInfo = { current, pageSize, total };
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, pageInfo,
|
||||
selectedRowKeys, showSum, siaccountSum,
|
||||
selectedRowKeys, selectedKey: this.props.selectedKey,
|
||||
sumpayload: { billMonth, paymentOrganization, userName },
|
||||
showOperates: !getQueryString("type")
|
||||
}), "*");
|
||||
};
|
||||
|
||||
handleSearch(value) {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { current } = this.state;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
|
|
@ -242,27 +230,19 @@ export default class NormalIndex extends Component {
|
|||
}
|
||||
};
|
||||
getNormalList = async (payload = {}) => {
|
||||
const { status, data: sysData } = await this.sysConfCodeRule();
|
||||
const { data: { sumRow: siaccountSum } } = await this.siaccountDetailCommonListSum();
|
||||
const { getNormalList } = this.props.standingBookStore;
|
||||
getNormalList({ ...payload }).then(({ list, columns = [], total }) => {
|
||||
this.setState({
|
||||
showSum: this.props.selectedKey === "1" && status && sysData === "1",
|
||||
siaccountSum,
|
||||
tableData: { list, total, columns }
|
||||
}, () => this.postMessageToChild());
|
||||
});
|
||||
};
|
||||
getSupplementaryList = async (payload = {}) => {
|
||||
const { status, data: sysData } = await this.sysConfCodeRule();
|
||||
const { data: { sumRow: siaccountSum } } = await this.siaccountDetailCommonListSum();
|
||||
const { getSupplementaryList } = this.props.standingBookStore;
|
||||
getSupplementaryList({
|
||||
...payload
|
||||
}).then(({ list, columns = [], total }) => {
|
||||
this.setState({
|
||||
showSum: this.props.selectedKey === "1" && status && sysData === "1",
|
||||
siaccountSum,
|
||||
tableData: { list, columns, total }
|
||||
}, () => this.postMessageToChild());
|
||||
});
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ class RegEditDetial extends Component {
|
|||
}
|
||||
</div>
|
||||
}
|
||||
onClose={onCancel}
|
||||
onClose={() => onCancel()}
|
||||
showMask={true}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Date: 2022/11/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { Spin } from "antd";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
|
|
@ -25,6 +25,7 @@ class RegList extends Component {
|
|||
loading: {
|
||||
query: false
|
||||
},
|
||||
datalistPayload: {},
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
|
|
@ -35,14 +36,52 @@ class RegList extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.recessionList();
|
||||
window.addEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleReceive = async ({ data }) => {
|
||||
const { onEdit, onChangeRowkey } = this.props;
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
this.postMessageToChild();
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } }, () => this.recessionList());
|
||||
} else if (id === "ROWSELECT") {
|
||||
const { selectedRowKeys } = params;
|
||||
this.setState({ selectedRowKeys });
|
||||
onChangeRowkey(selectedRowKeys);
|
||||
} else if (id === "EDIT") {
|
||||
onEdit(params);
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = () => {
|
||||
const paymentStatus = "3";
|
||||
const creator = Number(getQueryString("creator"));
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const { pageInfo, dataSource, columns, selectedRowKeys, datalistPayload } = this.state;
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, pageInfo,
|
||||
selectedRowKeys, selectedKey: this.props.type,
|
||||
sumpayload: { billMonth, paymentOrganization, creator, paymentStatus, ...datalistPayload },
|
||||
showOperates: !getQueryString("type")
|
||||
}), "*");
|
||||
};
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible) {
|
||||
this.recessionList();
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
handleResetSelectRowKeys = (selectedRowKeys) => {
|
||||
this.setState({ selectedRowKeys });
|
||||
};
|
||||
|
|
@ -68,105 +107,26 @@ class RegList extends Component {
|
|||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns: _.map(_.filter(columns, it => it.dataIndex !== "id"), items => {
|
||||
if (items.dataIndex === "employeeId") {
|
||||
return {
|
||||
...items,
|
||||
width: 110,
|
||||
title: "姓名",
|
||||
render: (text, r) => {
|
||||
const { userName } = r;
|
||||
return (
|
||||
<span>{userName}</span>
|
||||
);
|
||||
}
|
||||
};
|
||||
} else if (items.dataIndex === "costCenter") {
|
||||
return {
|
||||
...items,
|
||||
width: 110,
|
||||
render: (text, r) => {
|
||||
const { costCenter } = r;
|
||||
return (
|
||||
<a href={costCenter.url} className="tdEllipsis">{costCenter.name || ""}</a>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
...items,
|
||||
title: <span dangerouslySetInnerHTML={{ __html: items.title }}/>,
|
||||
width: 120,
|
||||
render: (text) => {
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
columns,
|
||||
datalistPayload: module
|
||||
}, () => this.postMessageToChild());
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
});
|
||||
};
|
||||
handleChangeRow = (selectedRowKeys) => {
|
||||
const { onChangeRowkey } = this.props;
|
||||
this.setState({ selectedRowKeys });
|
||||
onChangeRowkey(selectedRowKeys);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, pageInfo, selectedRowKeys, dataSource, columns } = this.state;
|
||||
const { onEdit } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
|
||||
this.recessionList();
|
||||
});
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => {
|
||||
this.recessionList();
|
||||
});
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.handleChangeRow
|
||||
};
|
||||
const { loading } = this.state;
|
||||
return (
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
columns={!getQueryString("type") ? [
|
||||
...columns,
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
fixed: "right",
|
||||
width: "120px",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<div className="optWrapper">
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="mr10"
|
||||
onClick={() => onEdit(record)}
|
||||
>编辑</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
] : [...columns]}
|
||||
dataSource={dataSource}
|
||||
loading={loading.query}
|
||||
pagination={pagination}
|
||||
rowSelection={rowSelection}
|
||||
scroll={{ x: 900 }}
|
||||
/>
|
||||
<Spin spinning={loading.query}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/standingbookTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/standingbookTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</Spin>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class Regression extends Component {
|
|||
selectKey={selectKey}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
<WeaNewScroll height="100%">
|
||||
{/*<WeaNewScroll height="100%">*/}
|
||||
<RegList
|
||||
type="regression"
|
||||
ref={dom => this.regListRef = dom}
|
||||
|
|
@ -152,7 +152,7 @@ class Regression extends Component {
|
|||
onCancel={this.handleCloseModal}
|
||||
onSave={this.handleSave}
|
||||
/>
|
||||
</WeaNewScroll>
|
||||
{/*</WeaNewScroll>*/}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Col, message, Modal, Row, Switch, Dropdown, Menu } from "antd";
|
||||
import { Button, Col, Dropdown, Menu, message, Modal, Row, Switch } from "antd";
|
||||
import { WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import EditModal from "./editModal";
|
||||
|
|
@ -303,7 +303,8 @@ export default class TaxAgent extends React.Component {
|
|||
columns,
|
||||
doInit,
|
||||
hasRight,
|
||||
getTaxAgentList
|
||||
getTaxAgentList,
|
||||
showOperateBtn
|
||||
} = taxAgentStore;
|
||||
|
||||
if (!hasRight && !loading) {
|
||||
|
|
@ -369,7 +370,7 @@ export default class TaxAgent extends React.Component {
|
|||
</Menu>
|
||||
}>
|
||||
<a className="ant-dropdown-link" href="javaScript:void(0);">
|
||||
<i className="icon-coms-more" />
|
||||
<i className="icon-coms-more"/>
|
||||
</a>
|
||||
</Dropdown>
|
||||
</div>
|
||||
|
|
@ -403,7 +404,7 @@ export default class TaxAgent extends React.Component {
|
|||
title="个税扣缴义务人" // 文字
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
buttons={btns}
|
||||
buttons={showOperateBtn ? btns : btns.slice(1)}
|
||||
showDropIcon={true}>
|
||||
<Row
|
||||
gutter={16}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,89 @@
|
|||
import moment from 'moment'
|
||||
import moment from "moment";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
// 获取当前年月
|
||||
export const getCurrentYearMonth = () => {
|
||||
return moment(new Date()).format("YYYY-MM")
|
||||
}
|
||||
return moment(new Date()).format("YYYY-MM");
|
||||
};
|
||||
|
||||
// 获取当前月份
|
||||
export const getCurrentMonth = () => {
|
||||
return (new Date()).getMonth() + 1
|
||||
}
|
||||
return (new Date()).getMonth() + 1;
|
||||
};
|
||||
|
||||
// 获取前几个月的年月
|
||||
export const getSubtractMonthYearMonth = (subtract = 1) => {
|
||||
return moment(new Date()).subtract(subtract,'months').startOf('month').format('YYYY-MM')
|
||||
}
|
||||
return moment(new Date()).subtract(subtract, "months").startOf("month").format("YYYY-MM");
|
||||
};
|
||||
|
||||
// 获取后几个月的年月
|
||||
export const getAddMonthYearMonth = (add = 1) => {
|
||||
return moment(new Date()).add(add,'months').startOf('month').format('YYYY-MM')
|
||||
}
|
||||
return moment(new Date()).add(add, "months").startOf("month").format("YYYY-MM");
|
||||
};
|
||||
/**
|
||||
* 数字前面补零
|
||||
* @param num
|
||||
* @param length
|
||||
*/
|
||||
export const prefixAddZero = (num, length) => {
|
||||
return (Array(length).join("0") + num).slice(-length);
|
||||
};
|
||||
/**
|
||||
* 获取月份天数
|
||||
* @param year
|
||||
* @param month
|
||||
*/
|
||||
export const getMonthDays = (year, month) => {
|
||||
const d = new Date(Number(year), Number(month), 0);
|
||||
return d.getDate();
|
||||
};
|
||||
|
||||
export const generateBasicInfo = (monthCal, nowYear, nowMonth) => {
|
||||
let nowMonthStr = "", nextMonthStr = "";
|
||||
switch (monthCal) {
|
||||
case -2:
|
||||
nowMonthStr = getLabel(111, "上上月");
|
||||
nextMonthStr = getLabel(111, "上月");
|
||||
break;
|
||||
case -1:
|
||||
nowMonthStr = getLabel(111, "上月");
|
||||
nextMonthStr = getLabel(111, "本月");
|
||||
break;
|
||||
case 0:
|
||||
nowMonthStr = getLabel(111, "本月");
|
||||
nextMonthStr = getLabel(111, "下月");
|
||||
break;
|
||||
case 1:
|
||||
nowMonthStr = getLabel(111, "下月");
|
||||
nextMonthStr = getLabel(111, "下下月");
|
||||
break;
|
||||
}
|
||||
|
||||
let year, month;
|
||||
if (monthCal < 0) {
|
||||
let monthCalAbs = Math.abs(monthCal);
|
||||
if (nowMonth <= monthCalAbs) {
|
||||
// 跨年
|
||||
year = (nowYear - 1).toString();
|
||||
month = (12 - (monthCalAbs - nowMonth)).toString();
|
||||
} else {
|
||||
// 未跨年
|
||||
year = nowYear.toString();
|
||||
month = (nowMonth - monthCalAbs).toString();
|
||||
}
|
||||
} else if (monthCal === 0) {
|
||||
year = nowYear.toString();
|
||||
month = nowMonth.toString();
|
||||
} else {
|
||||
if (nowMonth + monthCal > 12) {
|
||||
year = (nowYear + 1).toString();
|
||||
month = (nowMonth + monthCal - 12).toString();
|
||||
} else {
|
||||
year = nowYear.toString();
|
||||
month = (nowMonth + monthCal).toString();
|
||||
}
|
||||
}
|
||||
return { year, month, nowMonthStr, nextMonthStr };
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,3 +22,18 @@ export const getQueryString = (variable) => {
|
|||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
export const convertToUrlString = (data) => {
|
||||
const _result = [];
|
||||
for (const key in data) {
|
||||
const value = data[key];
|
||||
if (value.constructor === Array) {
|
||||
value.forEach(function (_value) {
|
||||
_result.push(key + "=" + _value);
|
||||
});
|
||||
} else {
|
||||
_result.push(key + "=" + value);
|
||||
}
|
||||
}
|
||||
return _result.join("&");
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue