Merge branch 'hotfix/v2-bug修复-1031' into feature/v2-专项附加扣除-1103
This commit is contained in:
commit
39e6f95fef
|
|
@ -31,6 +31,10 @@ export const queryAppsetting = (params) => {
|
|||
export const saveEncryptSetting = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting', params);
|
||||
}
|
||||
//加密配置保存
|
||||
export const appSettingSave = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/sys/app/setting/save', params);
|
||||
}
|
||||
//获取加密进度条
|
||||
export const getEncryptProgress = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/sys/app/getEncryptProgress', 'GET', params);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ export const createScheme = params => {
|
|||
}).then(res => res.json())
|
||||
};
|
||||
export const updateScheme = params => {
|
||||
|
||||
return fetch('/api/bs/hrmsalary/scheme/update', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
import React from 'react';
|
||||
import "./index.less"
|
||||
import React from "react";
|
||||
import "./index.less";
|
||||
|
||||
export default class TipLabel extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="tipLabelWrapper">
|
||||
<div className="titleWrapper">
|
||||
<span className="title">{this.props.title ? this.props.title : "小提示"}</span>
|
||||
</div>
|
||||
<div className="tipContentWrapper">
|
||||
{this.props.tipList && this.props.tipList.map(item => <div className="tipContentItem">{item}</div>)}
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div className="tipLabelWrapper">
|
||||
<div className="titleWrapper">
|
||||
<span className="title">{this.props.title ? this.props.title : "小提示"}</span>
|
||||
</div>
|
||||
<div className="tipContentWrapper">
|
||||
{this.props.tipList && this.props.tipList.map(item => <div className="tipContentItem">{item}</div>)}
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -604,7 +604,18 @@ export default class Attendance extends React.Component {
|
|||
// )
|
||||
// }
|
||||
// })
|
||||
return newColumns;
|
||||
return [
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "index",
|
||||
width: 80,
|
||||
render: (text, record, index) => {
|
||||
const { current, pageSize } = this.pageInfo;
|
||||
return (current - 1) * pageSize + index + 1;
|
||||
}
|
||||
},
|
||||
...newColumns
|
||||
];
|
||||
};
|
||||
|
||||
// 保存回调
|
||||
|
|
@ -692,6 +703,7 @@ export default class Attendance extends React.Component {
|
|||
topTab={topTab}
|
||||
searchOperationItem={renderSearchOperationItem()}
|
||||
onChange={v => {
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
handleTabChange(v);
|
||||
}}
|
||||
/>
|
||||
|
|
@ -725,6 +737,8 @@ export default class Attendance extends React.Component {
|
|||
onChange={v => {
|
||||
this.setState({
|
||||
tabSelectedKey: v
|
||||
},()=>{
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ export default class GenerateModal extends React.Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
taxAgentStore: { taxAgentAdminOption }
|
||||
taxAgentStore: { taxAgentAdminOption },
|
||||
declareStore: { loading }
|
||||
} = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
|
|
@ -65,6 +66,7 @@ export default class GenerateModal extends React.Component {
|
|||
buttons={
|
||||
[<Button
|
||||
type="primary"
|
||||
loading={loading}
|
||||
onClick={() => {
|
||||
this.handleGenerate();
|
||||
}}>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { slideStep4Columns } from "./columns";
|
|||
import "./index.less";
|
||||
import RuleEditModal from "./step4/RuleEditModal";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from 'mobx';
|
||||
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
|
|
@ -48,8 +49,13 @@ export default class CalRulesForm extends React.Component {
|
|||
}
|
||||
|
||||
convertAdjustmentType(index) {
|
||||
let nameList = ["取调整后薪资", "分段计薪", "取平均"];
|
||||
return nameList[Number(index) - 1];
|
||||
let nameList = {
|
||||
1: '取调薪前薪资',
|
||||
2: '取调薪后薪资',
|
||||
3: '平均值',
|
||||
4: '分段计薪',
|
||||
};
|
||||
return nameList[Number(index)];
|
||||
}
|
||||
|
||||
getSalaryItemName(salaryItemId) {
|
||||
|
|
@ -75,7 +81,6 @@ export default class CalRulesForm extends React.Component {
|
|||
rule: resultStr
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import SlideModalTitle from "../../components/slideModalTitle";
|
|||
import CopyFormModal from "./copyFormModal";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
@inject("ledgerStore", "taxAgentStore")
|
||||
@observer
|
||||
export default class Ledger extends React.Component {
|
||||
|
|
|
|||
|
|
@ -326,3 +326,7 @@
|
|||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
//.ant-modal-body {
|
||||
// overflow: auto;
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export default class SlideRefereUser extends React.Component {
|
|||
} = this.props;
|
||||
getLedgerPersonRangeInclude({ salarySobId: salarySobId });
|
||||
if (edit) getLedgerBasicForm();
|
||||
// window.setLayoutWindow=window;
|
||||
}
|
||||
|
||||
onSelectChange = selectedRowKeys => {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default class RuleEditModal extends React.Component {
|
|||
this.state = {
|
||||
itemValue: "",
|
||||
effectiveDate: "",
|
||||
beforeAdjustmentType: 1,
|
||||
beforeAdjustmentType: 2,
|
||||
afterAdjustmentType: 1,
|
||||
initedSelect: false
|
||||
};
|
||||
|
|
@ -150,8 +150,8 @@ export default class RuleEditModal extends React.Component {
|
|||
<Radio.Group onChange={(value) => {
|
||||
this.beforeAdjustmentTypeChange(value);
|
||||
}} value={beforeAdjustmentType}>
|
||||
<Radio value={1}>取调整后薪资</Radio>
|
||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||
<Radio value={2}>取调整后薪资</Radio>
|
||||
<Radio value={4}>分段计薪<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
|
|
@ -175,7 +175,7 @@ export default class RuleEditModal extends React.Component {
|
|||
this.afterAdjustmentTypeChange(value);
|
||||
}} value={afterAdjustmentType}>
|
||||
<Radio value={1}>取调整前薪资</Radio>
|
||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||
<Radio value={4}>分段计薪<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@ import "../payroll/templatePreview/index.less";
|
|||
export default class MobilePayroll extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state= {
|
||||
this.state = {
|
||||
mySalaryBillData: {
|
||||
employeeInformation: {}
|
||||
employeeInformation: {},
|
||||
salaryTemplate: []
|
||||
}
|
||||
};
|
||||
this.id = "";
|
||||
|
|
@ -31,13 +32,13 @@ export default class MobilePayroll extends React.Component {
|
|||
getMySalaryBill(id).then(result => {
|
||||
this.setState({
|
||||
mySalaryBillData: result
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { mySalaryBillData }= this.state;
|
||||
const { mySalaryBillData } = this.state;
|
||||
const type = getQueryString("type");
|
||||
const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {};
|
||||
const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : [];
|
||||
|
|
@ -64,7 +65,7 @@ export default class MobilePayroll extends React.Component {
|
|||
isPreview
|
||||
isMsgPreview
|
||||
salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -73,9 +73,11 @@ export default class ComputerTemplate extends React.Component {
|
|||
const { salaryTemplateShowSet, salaryItemSet } = this.state;
|
||||
return (
|
||||
<div className="computerTemplate">
|
||||
<div className="titleWrapper">
|
||||
{salaryTemplateShowSet.theme.replace("${companyName}", "").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
|
||||
</div>
|
||||
{salaryTemplateShowSet.theme &&
|
||||
<div className="titleWrapper">
|
||||
{salaryTemplateShowSet.theme.replace("${companyName}", "").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
|
||||
</div>
|
||||
}
|
||||
{
|
||||
salaryTemplateShowSet.background && <div className="background-wrapper">
|
||||
<img className="background-img" src={salaryTemplateShowSet.background} alt=""/>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,13 @@ class ImportMenu extends Component {
|
|||
}
|
||||
|
||||
salaryArchivePreview = (params) => {
|
||||
params.importType = this.state.importParams.importType;
|
||||
if (this.state.importParams.importType === "init" || this.state.importParams.importType === "salaryItemAdjust") {
|
||||
params.importType = this.state.importParams.importType;
|
||||
params.listType = "FIXED";
|
||||
} else {
|
||||
params.listType = this.state.importParams.importType;
|
||||
params.importType = '';
|
||||
}
|
||||
API.salaryArchivePreview(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { headers, list } = data;
|
||||
|
|
@ -77,16 +83,22 @@ class ImportMenu extends Component {
|
|||
handleInitModal = () => {
|
||||
// 清空列表数据
|
||||
this.setState({
|
||||
previewDataSource:[],
|
||||
previewDataSource: [],
|
||||
importParams: {
|
||||
...this.state.importParams,
|
||||
importResult:{},
|
||||
importResult: {}
|
||||
}
|
||||
});
|
||||
};
|
||||
// 导入档案
|
||||
handleImportFile = (params) => {
|
||||
params.importType = this.state.importParams.importType;
|
||||
if (this.state.importParams.importType === "init" || this.state.importParams.importType === "salaryItemAdjust") {
|
||||
params.importType = this.state.importParams.importType;
|
||||
params.listType = "FIXED";
|
||||
} else {
|
||||
params.importType = '';
|
||||
params.listType = this.state.importParams.importType;
|
||||
}
|
||||
API.importSalaryArchive(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
data.errorData = data.errorNotice;
|
||||
|
|
@ -103,6 +115,12 @@ class ImportMenu extends Component {
|
|||
render() {
|
||||
const { importType, refreshList } = this.props;
|
||||
const { importParams, previewColumns, previewDataSource } = this.state;
|
||||
let params = "";
|
||||
if (importParams.importType === "init" || importParams.importType === "salaryItemAdjust") {
|
||||
params = importParams.importType + "&listType=FIXED";
|
||||
} else {
|
||||
params = "" + "&listType=" + importParams.importType;
|
||||
}
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Menu className="dropdownMenuWrapper" onClick={this.handleMenuClick}>
|
||||
|
|
@ -134,8 +152,7 @@ class ImportMenu extends Component {
|
|||
previewImport={(params) => this.salaryArchivePreview(params)}
|
||||
importFile={(params) => this.handleImportFile(params)}
|
||||
templateLink={
|
||||
"/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" +
|
||||
importParams.importType
|
||||
"/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" + params
|
||||
}
|
||||
visiable={importParams.visible}
|
||||
onCancel={() => {
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ class Index extends Component {
|
|||
onOk: () => {
|
||||
API.allGotoFixed({}).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { msg }= data;
|
||||
const { msg } = data;
|
||||
message.info(msg || "操作成功!");
|
||||
this.query();
|
||||
} else {
|
||||
|
|
@ -293,20 +293,12 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
if (selectedKey === "pending" && showOperateBtn) {
|
||||
return [
|
||||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
importType={_.filter(importType, it => it.id !== "salaryItemAdjust")}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
}}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导入<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys} searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导出<i className="icon-coms-down2" style={{
|
||||
<Button type="primary" onClick={() => {
|
||||
this.importRef.handleMenuClick({ key: "PENDING" });
|
||||
}}>导入</Button>,
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
||||
searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
|
|
@ -328,13 +320,14 @@ class Index extends Component {
|
|||
this.setState({ selectedRowKeys: [] });
|
||||
}}/>
|
||||
}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导入<i className="icon-coms-down2" style={{
|
||||
<Button type="primary">导入<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys} searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导出<i className="icon-coms-down2" style={{
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
||||
searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
|
|
@ -357,29 +350,20 @@ class Index extends Component {
|
|||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Button type="ghost" onClick={() => {
|
||||
const { selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
this.deleteSuspendTodo(selectedRowKeys);
|
||||
}}>批量删除待办</Button>,
|
||||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
importType={_.filter(importType, it => it.id !== "salaryItemAdjust")}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
}}/>
|
||||
}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导入<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys} searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导出<i className="icon-coms-down2" style={{
|
||||
// <Button type="ghost" onClick={() => {
|
||||
// const { selectedRowKeys } = this.state;
|
||||
// if (selectedRowKeys.length === 0) {
|
||||
// message.warning("未选择条目");
|
||||
// return;
|
||||
// }
|
||||
// this.deleteSuspendTodo(selectedRowKeys);
|
||||
// }}>批量删除待办</Button>,
|
||||
<Button type="primary" onClick={() => {
|
||||
this.importRef.handleMenuClick({ key: "SUSPEND" });
|
||||
}}>导入</Button>,
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
||||
searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
|
|
@ -396,13 +380,14 @@ class Index extends Component {
|
|||
}}
|
||||
/>
|
||||
}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>批量取消停薪<i className="icon-coms-down2" style={{
|
||||
<Button type="primary">批量取消停薪<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
</Dropdown>,
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys} searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary" style={{ marginLeft: 8 }}>导出<i className="icon-coms-down2" style={{
|
||||
<Dropdown overlay={<ExportMenu selectedKey={selectedKey} selectedRowKeys={selectedRowKeys}
|
||||
searchItemsValue={searchItemsValue}/>}>
|
||||
<Button type="primary">导出<i className="icon-coms-down2" style={{
|
||||
marginLeft: 8,
|
||||
verticalAlign: "middle"
|
||||
}}/></Button>
|
||||
|
|
@ -415,29 +400,34 @@ class Index extends Component {
|
|||
const { pageInfo, selectedKey } = this.state;
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
let columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true");
|
||||
return _.map([{
|
||||
title: "序号",
|
||||
dataIndex: "index",
|
||||
align: "left",
|
||||
oldWidth: 60,
|
||||
render: (text, record, index) => {
|
||||
const { current, pageSize } = pageInfo;
|
||||
return (current - 1) * pageSize + index + 1;
|
||||
}
|
||||
}, ...columns], (item, index) => {
|
||||
return _.map([
|
||||
// {
|
||||
// title: "序号",
|
||||
// dataIndex: "index",
|
||||
// align: "left",
|
||||
// oldWidth: 60,
|
||||
// render: (text, record, index) => {
|
||||
// const { current, pageSize } = pageInfo;
|
||||
// return (current - 1) * pageSize + index + 1;
|
||||
// }
|
||||
// },
|
||||
...columns], (item, index) => {
|
||||
if (index === 0) {
|
||||
return { ...item, width: item.oldWidth, fixed: "left" };
|
||||
// , fixed: "left"
|
||||
// , width: item.oldWidth
|
||||
return { ...item };
|
||||
}
|
||||
if (item.dataIndex === "operate") {
|
||||
return {
|
||||
...item, fixed: "right",
|
||||
width: 150,
|
||||
...item,
|
||||
// fixed: "right",
|
||||
// width: 150,
|
||||
render: (text, record) => {
|
||||
if(!showOperateBtn){
|
||||
if (!showOperateBtn) {
|
||||
return <div className="optWrapper">
|
||||
<a href="javascript:void(0);" onClick={() => this.handleEdit(record)}>查看</a>
|
||||
</div>;
|
||||
}else{
|
||||
} else {
|
||||
if (selectedKey === "pending") {
|
||||
return <div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10" onClick={() => this.handleEdit(record)}>编辑</a>
|
||||
|
|
@ -461,7 +451,7 @@ class Index extends Component {
|
|||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleMenuClick(e, record.id)}>
|
||||
<Menu.Item key="stopSalary">停薪</Menu.Item>
|
||||
<Menu.Item key="deleteSuspendTodo">删除待办</Menu.Item>
|
||||
{/*<Menu.Item key="deleteSuspendTodo">删除待办</Menu.Item>*/}
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
|
|
@ -483,7 +473,8 @@ class Index extends Component {
|
|||
}
|
||||
};
|
||||
}
|
||||
return { ...item, width: item.oldWidth };
|
||||
// , width: item.oldWidth
|
||||
return { ...item };
|
||||
});
|
||||
};
|
||||
handleEdit = (record) => {
|
||||
|
|
@ -563,7 +554,7 @@ class Index extends Component {
|
|||
handleSave = () => {
|
||||
const { paysetParams, selectedKey } = this.state;
|
||||
const { salaryFileStore: { adjustSalaryItems, detailForm } } = this.props;
|
||||
if ((selectedKey === "pending" && _.isEmpty(paysetParams.payStartDate)) || (selectedKey !== "pending" && _.isEmpty(paysetParams.payEndDate))) {
|
||||
if ((selectedKey === "pending" && _.isEmpty(paysetParams.payStartDate)) || (selectedKey === "suspend" && _.isEmpty(paysetParams.payEndDate))) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
|
|
@ -734,7 +725,7 @@ class Index extends Component {
|
|||
columns={this.getColumns()} dataSource={dataSource} pagination={pagination}
|
||||
// rowClassName={(record) => record.archiveStatus === "ARCHIVE" ? "archiveRow" : ""}
|
||||
rowSelection={rowSelection}
|
||||
scroll={{ x: 1200 }}
|
||||
// scroll={{ x: 1200 }}
|
||||
/>
|
||||
<WeaTableComx
|
||||
style={{ display: "none" }}
|
||||
|
|
@ -742,6 +733,14 @@ class Index extends Component {
|
|||
needScroll={true}
|
||||
/>
|
||||
</WeaTop>
|
||||
<div style={{ display: "none" }}>
|
||||
<ImportMenu
|
||||
ref={(dom) => this.importRef = dom}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
}}/>
|
||||
</div>
|
||||
{slideParams.visible && (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
|
|
|
|||
|
|
@ -159,49 +159,70 @@ class Index extends Component {
|
|||
}
|
||||
});
|
||||
} else if (type === "ENCRYTION") {
|
||||
this.setState({ loading: { ...this.state.loading, encry: true } });
|
||||
API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, encry: false } });
|
||||
if (status) {
|
||||
const { isSuccess, progressId, msg } = data;
|
||||
if(!isSuccess){
|
||||
message.error(errormsg || msg || "保存失败!");
|
||||
return
|
||||
}
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
let number=1 ;
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getEncryptProgress({ progressId }).then(({status, data, errormsg}) => {
|
||||
const { progress_statue }= data;
|
||||
if (progress_statue === "success" && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number=1;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 100
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!",
|
||||
onOk: () => {
|
||||
this.setState({ loading: { ...this.state.loading, encry: true } });
|
||||
API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, encry: false } });
|
||||
if (status) {
|
||||
const { isSuccess, progressId, msg } = data;
|
||||
if (!isSuccess) {
|
||||
message.error(errormsg || msg || "保存失败!");
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
progressVisible: true,
|
||||
progress: 0
|
||||
}, () => {
|
||||
let number = 1;
|
||||
this.timer && clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => {
|
||||
const { progress_statue } = data;
|
||||
if (progress_statue === "success" && this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.success("保存成功");
|
||||
} else if (progress_statue === "in_progress" && this.timer) {
|
||||
if (this.state.progress >= 90) {
|
||||
this.setState({
|
||||
progress: this.state.progress + (0.001 * this.state.progress)
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, () => number++);
|
||||
}
|
||||
} else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number = 1;
|
||||
this.setState({
|
||||
progress: 100
|
||||
}, () => {
|
||||
this.setState({
|
||||
progressVisible: false
|
||||
});
|
||||
});
|
||||
message.error(errormsg || "保存失败!");
|
||||
}
|
||||
});
|
||||
message.success("加密成功");
|
||||
} else if(progress_statue === "in_progress" && this.timer){
|
||||
this.setState({
|
||||
progress: 10 * number
|
||||
}, ()=> number++ );
|
||||
}else if (!status || (progress_statue === "fail" && this.timer)) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
number=1;
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 100
|
||||
});
|
||||
message.error(errormsg || "加密失败!");
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -249,16 +270,17 @@ class Index extends Component {
|
|||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>人员校验规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")} loading={loading.employee}>保存</Button>
|
||||
<Button type="primary" onClick={() => this.handleSave("EMPLOYEE")}
|
||||
loading={loading.employee}>保存</Button>
|
||||
</div>
|
||||
} showGroup center items={importItems}/>
|
||||
{/*<WeaSearchGroup*/}
|
||||
{/* title={*/}
|
||||
{/* <div className="titleWrapper">*/}
|
||||
{/* <span>加密规则</span>*/}
|
||||
{/* <Button type="primary" onClick={() => this.handleSave("ENCRYTION")} loading={loading.encry}>保存</Button>*/}
|
||||
{/* </div>*/}
|
||||
{/* } showGroup center items={enctryItems}/>*/}
|
||||
<WeaSearchGroup
|
||||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>加密规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("ENCRYTION")} loading={loading.encry}>保存</Button>
|
||||
</div>
|
||||
} showGroup center items={enctryItems}/>
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
{
|
||||
com: PickDate({
|
||||
label: "最后发薪日期",
|
||||
viewAttr: selectedKey === "pending" ? 2 : selectedKey === "stop" ? 1 : 3,
|
||||
viewAttr: (selectedKey === "pending" || selectedKey === "fixed") ? 2 : selectedKey === "stop" ? 1 : 3,
|
||||
value: paysetParams.payEndDate,
|
||||
onChange: handleSetpay
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Col, Row, Select } from "antd";
|
||||
import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom";
|
||||
import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom";
|
||||
import GroupCard from "../../../components/groupCard";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
|
@ -12,8 +12,8 @@ export default class AccumulationFundForm extends React.Component {
|
|||
|
||||
componentWillMount() {
|
||||
const { archivesStore: { getBaseForm, getPaymentForm } } = this.props;
|
||||
getBaseForm(this.props.employeeId, "ACCUMULATION_FUND");
|
||||
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId);
|
||||
getBaseForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.paymentOrganization);
|
||||
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId, this.props.record.paymentOrganization);
|
||||
}
|
||||
|
||||
// 表单变化
|
||||
|
|
@ -30,7 +30,7 @@ export default class AccumulationFundForm extends React.Component {
|
|||
// 获取基数表单
|
||||
handleFetchPaymentForm(fundName) {
|
||||
const { archivesStore: { getPaymentForm } } = this.props;
|
||||
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName);
|
||||
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName, this.props.record.paymentOrganization);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -80,18 +80,20 @@ export default class AccumulationFundForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={6} className="formItem borderR-none borderB-none">公积金方案名称:</Col>
|
||||
<Col span={6} className="formItem borderB-none">
|
||||
<Select defaultValue={data && data.fundSchemeId}
|
||||
notFoundContent="暂无数据" value={data && data.fundSchemeId} style={{ width: "100%" }}
|
||||
onChange={(value) => {
|
||||
this.handleFormChange({ fundSchemeId: value });
|
||||
this.handleFetchPaymentForm(value);
|
||||
}}>
|
||||
{
|
||||
items && items[0].items && items[0].items[0] && items[0].items[0].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
))
|
||||
<WeaSelect
|
||||
options={
|
||||
(items && items[0].items && items[0].items[0]) ? [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ...items[0].items[0].options] : []
|
||||
}
|
||||
</Select>
|
||||
value={data && data.fundSchemeId}
|
||||
style={{ width: "100%" }}
|
||||
onChange={(value, showname) => {
|
||||
this.handleFormChange({ fundSchemeId: value, fundName: showname });
|
||||
this.handleFetchPaymentForm(value);
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import OtherForm from "./otherForm";
|
|||
import { tabCondition } from "./config";
|
||||
import * as API from "../../../apis/welfareArchive";
|
||||
import ImportModal from "../../../components/importModal";
|
||||
import TipLabel from "../../../components/TipLabel";
|
||||
import "./index.less";
|
||||
|
||||
@inject("archivesStore", "taxAgentStore")
|
||||
|
|
@ -141,10 +142,10 @@ export default class Archives extends React.Component {
|
|||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={({key}) => {
|
||||
if(key === "addMember"){
|
||||
content={<Menu onClick={({ key }) => {
|
||||
if (key === "addMember") {
|
||||
this.stayAddToPay([record.baseInfo]);
|
||||
}else{
|
||||
} else {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: `确定要删除该条待办人员吗?`,
|
||||
|
|
@ -175,7 +176,7 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
}}>
|
||||
<Menu.Item key="stayDelToStop">减员</Menu.Item>
|
||||
<Menu.Item key="stopSalary">删除待办</Menu.Item>
|
||||
{/*<Menu.Item key="stopSalary">删除待办</Menu.Item>*/}
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
|
|
@ -200,23 +201,23 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
|
||||
// 保存
|
||||
handleEditSlideSave() {
|
||||
handleEditSlideSave = () => {
|
||||
const { selectedTab } = this.state;
|
||||
const { archivesStore: { save } } = this.props;
|
||||
if (selectedTab == 1) {
|
||||
save("SOCIAL_SECURITY");
|
||||
save("SOCIAL_SECURITY").then(() => {
|
||||
this.query();
|
||||
});
|
||||
} else if (selectedTab == 2) {
|
||||
save("ACCUMULATION_FUND");
|
||||
save("ACCUMULATION_FUND").then(() => {
|
||||
this.query();
|
||||
});
|
||||
} else if (selectedTab == 3) {
|
||||
save("OTHER");
|
||||
save("OTHER").then(() => {
|
||||
this.query();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
handlePageChnage(value) {
|
||||
const { archivesStore: { form, getTableDatas } } = this.props;
|
||||
this.pageInfo.current = value;
|
||||
getTableDatas(this.pageInfo);
|
||||
}
|
||||
};
|
||||
|
||||
// 导入
|
||||
handleBtnImport(runStatus) {
|
||||
|
|
@ -284,6 +285,7 @@ export default class Archives extends React.Component {
|
|||
const { pageInfo } = this.state;
|
||||
this.setState({
|
||||
selectedKey,
|
||||
selectedRowKeys: [],
|
||||
editSlideVisible: false,
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
|
|
@ -433,6 +435,49 @@ export default class Archives extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
getTipChildren = () => {
|
||||
const { selectedKey } = this.state;
|
||||
let dom = null;
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
dom = <div>
|
||||
{/*<div>1、新入职人员、返聘人员和个税扣缴义务人发生变更从【待减员】中减员操作的会进入【待增员】;</div>*/}
|
||||
{/*<div>2、返聘人员默认返聘前的社保福利缴纳方案、缴纳账号、缴纳组织数据,其他数据会清空;</div>*/}
|
||||
<div>1、个税扣缴义务人变更进入【待增员】的,保留所有最新版本数据;若修改了数据再增员则修改的数据作为新版本保存;</div>
|
||||
<div>2、维护好员工的社保福利档案数据后,点击【增员】,数据会进入【在缴员工】;</div>
|
||||
<div>3、若不需给该员工缴纳,可点击【删除待办】进入【停缴员工】;进入【停缴员工】后,可以点击【取消停缴】再次进入【待增员】;</div>
|
||||
<div>4、不管起始缴纳月维护到哪个月,都可以进行增员,不影响核算判断;若维护了最后缴纳月,且小于等于当前月,则增员失败;</div>
|
||||
<div>5、增员失败情况:①终止缴纳月小于等于当前月;</div>
|
||||
{/* ②其他的个税扣缴义务人下的在缴员工中存在该员工,在缴员工未进入停缴员工;*/}
|
||||
</div>;
|
||||
break;
|
||||
case "fixed":
|
||||
dom = <div>
|
||||
<div>1、需缴纳社保福利的员工维护在【在缴员工】;</div>
|
||||
<div>2、可使用更新导入,调整档案数据;</div>
|
||||
<div>3、若维护了最后缴纳月且小于等于当前月,则自动进入【待减员】;</div>
|
||||
<div>4、核算人员范围为,【在缴员工】中的起始缴纳月和最后缴纳月区间包含当前月的人员;</div>
|
||||
</div>;
|
||||
break;
|
||||
case "suspend":
|
||||
dom = <div>
|
||||
<div>1、数据进入【待减员】规则:①员工的人事状态属性从在职变成非在职,且在【在缴员工】里;②【在缴员工】里档案维护了缴纳终止月且小于等于当前月;③个税扣缴义务人发生调整;④某员工分权时在原个税扣缴义务人下处于【在缴员工】里但又将该员工添加到其他的个税扣缴义务人下的情况;</div>
|
||||
<div>2、【待减员】为是否不再缴纳的待办状态,数据是从【在缴员工】中复制的,若不处理列表中的待办数据,也不影响社保福利核算;【待减员】维护的数据和【在缴员工】数据是同步的;</div>
|
||||
<div>3、点击【减员】前先维护最后缴纳月,所有有起始缴纳月的福利项的最后缴纳月都小于等于当前月且无未归档的核算数据的档案才能减员成功,减员成功后数据进入【停缴员工】;</div>
|
||||
{/*<div>4、数据进入【待减员】规则的第四种情况下,若还需要在当前个税扣缴义务人下进行缴纳的话,当前该员工的【待减员】数据进行【删除待办】操作即可;若不在该个税扣缴义务人下继续缴纳,维护好最后缴纳月后进行【减员】操作,员工进入【停缴员工】;</div>*/}
|
||||
</div>;
|
||||
break;
|
||||
default:
|
||||
dom = <div>
|
||||
<div>1、不需要缴纳社保福利的员工,保存在【停缴员工】;</div>
|
||||
<div>2、【停缴员工】点击取消停缴,数据会回退到上次的位置(从【待减员】减员到停缴员工的,点击停缴返回到【在缴员工】,不返回到【待减员】);</div>
|
||||
{/*<div>3、若员工的社保福利从一个个税扣缴义务人下转到另一个个税扣缴义务人下去缴纳,则在转后的个税扣缴义务人的【待增员】中进行增员操作成功后,员工进入待【在缴员工】,而在原个税扣缴义务人下的【停缴员工】中,该员工数据将会被删除;是否开启分权员工的档案数据都只保存一份;</div>*/}
|
||||
</div>;
|
||||
break;
|
||||
}
|
||||
return dom;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { selectedTab, selectedRowKeys, selectedKey, dataSource: dataSourceActive, pageInfo, tabCount } = this.state;
|
||||
|
|
@ -484,7 +529,7 @@ export default class Archives extends React.Component {
|
|||
url = `${url}&runStatuses=3`;
|
||||
break;
|
||||
default:
|
||||
url = `${url}&runStatuses=4`;
|
||||
url = `${url}&runStatuses=4,5`;
|
||||
break;
|
||||
}
|
||||
window.open(url, "_self");
|
||||
|
|
@ -510,7 +555,7 @@ export default class Archives extends React.Component {
|
|||
url = `${url}&runStatuses=3`;
|
||||
break;
|
||||
default:
|
||||
url = `${url}&runStatuses=4`;
|
||||
url = `${url}&runStatuses=4,5`;
|
||||
break;
|
||||
}
|
||||
window.open(url, "_self");
|
||||
|
|
@ -658,6 +703,10 @@ export default class Archives extends React.Component {
|
|||
rowSelection={rowSelection}
|
||||
scroll={{ x: 1200 }}
|
||||
/>
|
||||
{
|
||||
!_.isEmpty(this.getColumns()) &&
|
||||
<TipLabel>{this.getTipChildren()}</TipLabel>
|
||||
}
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Col, Row, Select } from "antd";
|
||||
import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom";
|
||||
import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom";
|
||||
import GroupCard from "../../../components/groupCard";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -19,14 +19,14 @@ export default class OtherForm extends React.Component {
|
|||
|
||||
componentWillMount() {
|
||||
const { archivesStore: { getBaseForm, getPaymentForm } } = this.props;
|
||||
getBaseForm(this.props.employeeId, "OTHER");
|
||||
getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId);
|
||||
getBaseForm(this.props.employeeId, "OTHER", this.props.record.paymentOrganization);
|
||||
getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId, this.props.record.paymentOrganization);
|
||||
}
|
||||
|
||||
// 获取基数表单
|
||||
handleFetchPaymentForm(value) {
|
||||
const { archivesStore: { getPaymentForm } } = this.props;
|
||||
getPaymentForm(this.props.employeeId, "OTHER", value);
|
||||
getPaymentForm(this.props.employeeId, "OTHER", value, this.props.record.paymentOrganization);
|
||||
}
|
||||
|
||||
// 表单变化
|
||||
|
|
@ -86,18 +86,17 @@ export default class OtherForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={6} className="formItem borderR-none borderB-none">其他福利方案名称:</Col>
|
||||
<Col span={6} className="formItem borderB-none">
|
||||
<Select defaultValue={data && data.otherName}
|
||||
notFoundContent="暂无数据" value={data && data.otherName} style={{ width: "100%" }}
|
||||
onChange={(value) => {
|
||||
this.handleFormChange({ otherName: value });
|
||||
this.handleFetchPaymentForm(value);
|
||||
}}>
|
||||
{
|
||||
items && items[0].items && items[0].items[0] && items[0].items[0].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
))
|
||||
}
|
||||
</Select>
|
||||
<WeaSelect
|
||||
options={(items && items[0].items && items[0].items[0]) ? [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ...items[0].items[0].options] : []}
|
||||
value={data && data.otherSchemeId}
|
||||
style={{ width: "100%" }}
|
||||
onChange={(value, showname) => {
|
||||
this.handleFormChange({ otherName: showname, otherSchemeId: value });
|
||||
this.handleFetchPaymentForm(value);
|
||||
}}/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import GroupCard from "../../../components/groupCard";
|
||||
import { Col, Row, Select } from "antd";
|
||||
import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom";
|
||||
import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
|
@ -14,8 +14,8 @@ export default class SocialSecurityForm extends React.Component {
|
|||
componentWillMount() {
|
||||
const { archivesStore } = this.props;
|
||||
const { getBaseForm, getPaymentForm } = archivesStore;
|
||||
getBaseForm(this.props.employeeId, "SOCIAL_SECURITY");
|
||||
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId);
|
||||
getBaseForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.paymentOrganization);
|
||||
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId, this.props.record.paymentOrganization);
|
||||
}
|
||||
|
||||
// 表单变化
|
||||
|
|
@ -31,7 +31,7 @@ export default class SocialSecurityForm extends React.Component {
|
|||
// 获取基数表单
|
||||
handleFetchPaymentForm(value) {
|
||||
const { archivesStore: { getPaymentForm } } = this.props;
|
||||
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", value);
|
||||
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", value, this.props.record.paymentOrganization);
|
||||
}
|
||||
|
||||
//基数变化
|
||||
|
|
@ -84,21 +84,18 @@ export default class SocialSecurityForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={6} className="formItem borderR-none borderB-none">社保方案名称:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select
|
||||
defaultValue={data && data.socialName}
|
||||
notFoundContent="暂无数据"
|
||||
value={data && data.socialName} style={{ width: "100%" }}
|
||||
onChange={(value) => {
|
||||
this.handleFormChange({ socialName: value });
|
||||
<WeaSelect
|
||||
options={(items && items[0].items && items[0].items[0]) ? [{
|
||||
key: "",
|
||||
showname: ""
|
||||
}, ...items[0].items[0].options] : []}
|
||||
value={data && data.socialSchemeId}
|
||||
style={{ width: "100%" }}
|
||||
onChange={(value, showName) => {
|
||||
this.handleFormChange({ socialName: showName, socialSchemeId: value });
|
||||
this.handleFetchPaymentForm(value);
|
||||
}}
|
||||
>
|
||||
{
|
||||
items && items[0].items && items[0].items[0] && items[0].items[0].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
))
|
||||
}
|
||||
</Select>
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
|
|
|
|||
|
|
@ -1,144 +1,154 @@
|
|||
// 社保
|
||||
export const socialSecurityColumns = [{
|
||||
title: "方案名称",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
title: "方案名称",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}, {
|
||||
title: '缴纳类型',
|
||||
dataIndex: 'username',
|
||||
key: 'username',
|
||||
title: "缴纳类型",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
}, {
|
||||
title: '缴纳范围',
|
||||
dataIndex: 'projectName',
|
||||
key: 'projectName',
|
||||
title: "缴纳范围",
|
||||
dataIndex: "projectName",
|
||||
key: "projectName"
|
||||
}, {
|
||||
title: '备注',
|
||||
dataIndex: 'customer',
|
||||
key: 'customer',
|
||||
title: "备注",
|
||||
dataIndex: "customer",
|
||||
key: "customer"
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'customer',
|
||||
key: 'customer',
|
||||
title: "操作",
|
||||
dataIndex: "customer",
|
||||
key: "customer"
|
||||
}];
|
||||
|
||||
// 公积金
|
||||
export const accumulationFundColumns= [{
|
||||
title: "方案名称",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
export const accumulationFundColumns = [{
|
||||
title: "方案名称",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}, {
|
||||
title: '缴纳类型',
|
||||
dataIndex: 'username',
|
||||
key: 'username',
|
||||
title: "缴纳类型",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
}, {
|
||||
title: '缴纳范围',
|
||||
dataIndex: 'projectName',
|
||||
key: 'projectName',
|
||||
title: "缴纳范围",
|
||||
dataIndex: "projectName",
|
||||
key: "projectName"
|
||||
}, {
|
||||
title: '备注',
|
||||
dataIndex: 'customer',
|
||||
key: 'customer',
|
||||
title: "备注",
|
||||
dataIndex: "customer",
|
||||
key: "customer"
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'customer',
|
||||
key: 'customer',
|
||||
}]
|
||||
title: "操作",
|
||||
dataIndex: "customer",
|
||||
key: "customer"
|
||||
}];
|
||||
|
||||
// 企业年金及其他福利
|
||||
export const otherBenefitsColumns = [
|
||||
{
|
||||
title: "方案名称",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
|
||||
},
|
||||
{
|
||||
title: "缴纳类型",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "缴纳范围",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
}
|
||||
]
|
||||
{
|
||||
title: "方案名称",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
|
||||
},
|
||||
{
|
||||
title: "缴纳类型",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "缴纳范围",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
|
||||
export const CustomBenefitsColumns = [
|
||||
{
|
||||
title: "福利名称",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "启用",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "缴纳对象",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: 'title',
|
||||
key: 'title',
|
||||
}
|
||||
]
|
||||
{
|
||||
title: "福利名称",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "启用",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "缴纳对象",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
|
||||
export const insertUpdateColumns = [
|
||||
{
|
||||
title: "类型名称",
|
||||
dataIndex: "insuranceName",
|
||||
key: "insuranceName"
|
||||
},
|
||||
{
|
||||
title: "是否缴费",
|
||||
dataIndex: "isPayment",
|
||||
key: "isPayment"
|
||||
},
|
||||
{
|
||||
title: "缴纳对象",
|
||||
dataIndex: "paymentScope",
|
||||
key: "paymentScope"
|
||||
},
|
||||
{
|
||||
title: "缴纳比例%",
|
||||
dataIndex: "paymentProportion",
|
||||
key: "paymentProportion"
|
||||
},
|
||||
{
|
||||
title: "固定费用",
|
||||
dataIndex: "fixedCost",
|
||||
key: "fixedCost"
|
||||
},
|
||||
{
|
||||
title: "有效小数位",
|
||||
dataIndex: "validNum",
|
||||
key: "validNum"
|
||||
},
|
||||
{
|
||||
title: "进位规则",
|
||||
dataIndex: "rententionRule",
|
||||
key: "rententionRule"
|
||||
},
|
||||
]
|
||||
{
|
||||
title: "类型名称",
|
||||
dataIndex: "insuranceName",
|
||||
key: "insuranceName"
|
||||
},
|
||||
{
|
||||
title: "是否缴费",
|
||||
dataIndex: "isPayment",
|
||||
key: "isPayment"
|
||||
},
|
||||
{
|
||||
title: "缴纳对象",
|
||||
dataIndex: "paymentScope",
|
||||
key: "paymentScope"
|
||||
},
|
||||
{
|
||||
title: "基数下限",
|
||||
dataIndex: "lowerLimit",
|
||||
key: "lowerLimit"
|
||||
},
|
||||
{
|
||||
title: "基数上限",
|
||||
dataIndex: "upperLimit",
|
||||
key: "upperLimit"
|
||||
},
|
||||
{
|
||||
title: "缴纳比例%",
|
||||
dataIndex: "paymentProportion",
|
||||
key: "paymentProportion"
|
||||
},
|
||||
{
|
||||
title: "固定费用",
|
||||
dataIndex: "fixedCost",
|
||||
key: "fixedCost"
|
||||
},
|
||||
{
|
||||
title: "有效小数位",
|
||||
dataIndex: "validNum",
|
||||
key: "validNum"
|
||||
},
|
||||
{
|
||||
title: "进位规则",
|
||||
dataIndex: "rententionRule",
|
||||
key: "rententionRule"
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
export const dataSource = [];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { WeaSelect, WeaInput, WeaTable } from "ecCom";
|
||||
import { Table, Row, Col, Switch } from "antd";
|
||||
import { WeaSelect, WeaInput, WeaTable, WeaInputNumber } from "ecCom";
|
||||
import { Row, Col, Switch } from "antd";
|
||||
import { insertUpdateColumns } from "./columns";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import SmallTab from "../../../components/smallTab";
|
||||
|
|
@ -104,7 +104,8 @@ export default class DefaultSlideForm extends React.Component {
|
|||
} else if (item.dataIndex == "paymentProportion") {
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<WeaInput
|
||||
<WeaInputNumber
|
||||
precision={3}
|
||||
value={text}
|
||||
onChange={v => {
|
||||
this.updateDataSource(record, v, "paymentProportion");
|
||||
|
|
@ -115,7 +116,8 @@ export default class DefaultSlideForm extends React.Component {
|
|||
} else if (item.dataIndex == "fixedCost") {
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<WeaInput
|
||||
<WeaInputNumber
|
||||
precision={2}
|
||||
value={text}
|
||||
onChange={v => {
|
||||
this.updateDataSource(record, v, "fixedCost");
|
||||
|
|
@ -123,6 +125,30 @@ export default class DefaultSlideForm extends React.Component {
|
|||
/>
|
||||
);
|
||||
};
|
||||
} else if (item.dataIndex == "upperLimit") {
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
precision={2}
|
||||
value={text}
|
||||
onChange={v => {
|
||||
this.updateDataSource(record, v, "upperLimit");
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
} else if (item.dataIndex == "lowerLimit") {
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<WeaInputNumber
|
||||
precision={2}
|
||||
value={text}
|
||||
onChange={v => {
|
||||
this.updateDataSource(record, v, "lowerLimit");
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -138,20 +164,35 @@ export default class DefaultSlideForm extends React.Component {
|
|||
} = this.props;
|
||||
let result = { ...record };
|
||||
result[key] = e;
|
||||
if (this.state.selectItem == "个人") {
|
||||
let dataSource = [...defaultPersonDataSource];
|
||||
if(key === 'upperLimit' || key === 'lowerLimit'){
|
||||
let dataSource = [...defaultPersonDataSource],
|
||||
dataSource_company = [...defaultCompanyDataSource];
|
||||
dataSource = dataSource.map(item => {
|
||||
if (item.id == result.id) return result;
|
||||
if (item.insuranceName === result.insuranceName) return {...item, [key]: e, };
|
||||
else return item;
|
||||
});
|
||||
dataSource_company = dataSource_company.map(item => {
|
||||
if (item.insuranceName === result.insuranceName) return {...item, [key]: e };
|
||||
else return item;
|
||||
});
|
||||
setDefaultPersonDataSource(dataSource);
|
||||
} else {
|
||||
let dataSource = [...defaultCompanyDataSource];
|
||||
dataSource = dataSource.map(item => {
|
||||
if (item.id == result.id) return result;
|
||||
else return item;
|
||||
});
|
||||
setDefaultCompanyDataSource(dataSource);
|
||||
setDefaultCompanyDataSource(dataSource_company);
|
||||
}else{
|
||||
if (this.state.selectItem == "个人") {
|
||||
let dataSource = [...defaultPersonDataSource];
|
||||
dataSource = dataSource.map(item => {
|
||||
if (item.id == result.id) return result;
|
||||
else return item;
|
||||
});
|
||||
setDefaultPersonDataSource(dataSource);
|
||||
} else {
|
||||
let dataSource = [...defaultCompanyDataSource];
|
||||
dataSource = dataSource.map(item => {
|
||||
if (item.id == result.id) return result;
|
||||
else return item;
|
||||
});
|
||||
setDefaultCompanyDataSource(dataSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -167,10 +208,7 @@ export default class DefaultSlideForm extends React.Component {
|
|||
const { programmeStore, salaryFileStore, taxAgentStore } = this.props;
|
||||
const { userStatusList } = salaryFileStore;
|
||||
const { taxAgentAdminOption,getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||
const {
|
||||
defaultPersonDataSource,
|
||||
defaultCompanyDataSource,
|
||||
} = programmeStore;
|
||||
const { defaultPersonDataSource, defaultCompanyDataSource } = programmeStore;
|
||||
const options = [
|
||||
{
|
||||
key: "",
|
||||
|
|
@ -190,13 +228,9 @@ export default class DefaultSlideForm extends React.Component {
|
|||
];
|
||||
|
||||
const handleSmallTabChange = item => {
|
||||
// let paymentArea = item == "paymentArea" ? "1": "2"
|
||||
// let requestParams = {...this.props.requestParams}
|
||||
// requestParams.paymentArea = paymentArea
|
||||
this.setState({
|
||||
selectItem: item.value
|
||||
});
|
||||
// this.props.onChange(requestParams)
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ export default class Programme extends React.Component {
|
|||
}
|
||||
});
|
||||
newColumns.push({
|
||||
title: "",
|
||||
key: "moreOperate",
|
||||
dataIndex: "moreOperate",
|
||||
render: (text, record) => {
|
||||
|
|
@ -121,7 +120,12 @@ export default class Programme extends React.Component {
|
|||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more"/>
|
||||
<a href="javascript:void(0)" style={{ textDecoration: "none" }}>
|
||||
<i
|
||||
className="icon-coms-more"
|
||||
style={{ fontSize: 18 }}>
|
||||
</i>
|
||||
</a>
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
|
|
@ -224,7 +228,7 @@ export default class Programme extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
onCustomEdit=(record)=> {
|
||||
onCustomEdit = (record) => {
|
||||
const {
|
||||
programmeStore: { getCustomForm, setCustomNewVisible, setCustomRequest },
|
||||
taxAgentStore: { showOperateBtn }
|
||||
|
|
@ -242,10 +246,10 @@ export default class Programme extends React.Component {
|
|||
insuranceName: record["insurance_name"],
|
||||
id: record.id,
|
||||
isUse: record.is_use,
|
||||
paymentScope: record["payment_scope"].split(",").map(item => paymentScopeEnum[item]).join(','),
|
||||
paymentScope: record["payment_scope"].split(",").map(item => paymentScopeEnum[item]).join(","),
|
||||
welfareType: welfareTypeEnum[record.welfare_type]
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 页面跳转
|
||||
handlePageChange(value) {
|
||||
|
|
@ -405,7 +409,6 @@ export default class Programme extends React.Component {
|
|||
...defaultCompanyDataSource
|
||||
]
|
||||
};
|
||||
|
||||
if (currentOperate == "add") {
|
||||
createScheme(request).then(res => {
|
||||
if (res.status) this.setState({ slideVisiable: false });
|
||||
|
|
@ -538,7 +541,7 @@ export default class Programme extends React.Component {
|
|||
className="slideOuterWrapper"
|
||||
visible={this.state.slideVisiable}
|
||||
top={0}
|
||||
width={50}
|
||||
width={60}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
|
|
@ -554,13 +557,14 @@ export default class Programme extends React.Component {
|
|||
/>
|
||||
}
|
||||
content={
|
||||
<DefaultSlideForm
|
||||
customEditVisible={this.state.customEdit}
|
||||
requestParams={requestParams}
|
||||
onChange={requestParams => {
|
||||
setRequestParams(requestParams);
|
||||
}}
|
||||
/>
|
||||
this.state.slideVisiable ?
|
||||
<DefaultSlideForm
|
||||
customEditVisible={this.state.customEdit}
|
||||
requestParams={requestParams}
|
||||
onChange={requestParams => {
|
||||
setRequestParams(requestParams);
|
||||
}}
|
||||
/> : null
|
||||
}
|
||||
onClose={() => {
|
||||
handleSlideClose();
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ import AbnormalDrawer from "./components/abnormalDrawer";
|
|||
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||
import moment from "moment";
|
||||
import _ from "lodash";
|
||||
|
||||
// import { columns, dataSource } from './columns';
|
||||
import ProgressModal from "../../../components/progressModal";
|
||||
import "./index.less";
|
||||
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
|
@ -49,7 +48,9 @@ export default class StandingBook extends React.Component {
|
|||
list: [],
|
||||
total: 0
|
||||
},
|
||||
adminData: {}
|
||||
adminData: {},
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
};
|
||||
this.payload = {};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
|
|
@ -248,13 +249,6 @@ export default class StandingBook extends React.Component {
|
|||
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`
|
||||
);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current: this.state.current
|
||||
});
|
||||
}, 3000);
|
||||
};
|
||||
handleOperate = (payload) => {
|
||||
const { siaccountFile, siaccountDelete, deleteLoading } =
|
||||
|
|
@ -313,19 +307,36 @@ export default class StandingBook extends React.Component {
|
|||
handleOk = (formVal) => {
|
||||
const { save } = this.props.standingBookStore;
|
||||
const { billMonth, ...extra } = formVal;
|
||||
console.log("extra:", extra);
|
||||
const payload = {
|
||||
billMonth: moment(billMonth).format("YYYY-MM"),
|
||||
...extra
|
||||
};
|
||||
save(payload).then(() => {
|
||||
message.success("核算成功");
|
||||
this.handleClose();
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current: this.state.current
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 10
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
},()=>{
|
||||
message.success("核算成功");
|
||||
this.handleClose();
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current: this.state.current
|
||||
});
|
||||
this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "");
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "");
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -493,6 +504,17 @@ export default class StandingBook extends React.Component {
|
|||
loading={loading}
|
||||
/>
|
||||
)}
|
||||
{/*核算进度条*/}
|
||||
{
|
||||
this.state.progressVisible &&
|
||||
<ProgressModal
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}}
|
||||
progress={this.state.progress}
|
||||
/>
|
||||
}
|
||||
{drawerProps.visible && (
|
||||
<AbnormalDrawer
|
||||
{...drawerProps}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
.standingbookWrapper {
|
||||
.wea-new-top-content {
|
||||
padding: 0 16px;
|
||||
.wea-new-table {
|
||||
.ant-table-row:hover {
|
||||
.more {
|
||||
|
|
@ -23,6 +22,7 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
height: 46px;
|
||||
padding: 0 16px;
|
||||
.to {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { Button, Icon, message, Modal, Spin, Tooltip } from "antd";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
|
||||
import { getSearchs, calcPageNo } from "../../../../util";
|
||||
import { calcPageNo, getSearchs } from "../../../../util";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import ProgressModal from "../../../../components/progressModal";
|
||||
import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal";
|
||||
|
|
@ -47,8 +47,10 @@ export default class NormalIndex extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { selectedKey, location } = this.props;
|
||||
const { current } = this.state;
|
||||
const billMonth = location.query.billMonth;
|
||||
const paymentOrganization = location.query.paymentOrganization;
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||
|
|
@ -65,8 +67,8 @@ export default class NormalIndex extends Component {
|
|||
if (nextProps.selectedKey != this.props.selectedKey) {
|
||||
const { billMonth, paymentOrganization } = nextProps;
|
||||
this.setState({
|
||||
current: 1,
|
||||
}, ()=>{
|
||||
current: 1
|
||||
}, () => {
|
||||
const { current } = this.state;
|
||||
nextProps.selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
|
|
@ -75,7 +77,7 @@ export default class NormalIndex extends Component {
|
|||
current,
|
||||
paymentOrganization
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -280,11 +282,11 @@ export default class NormalIndex extends Component {
|
|||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length)
|
||||
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length)
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length),
|
||||
current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length),
|
||||
paymentOrganization
|
||||
});
|
||||
});
|
||||
|
|
@ -493,7 +495,7 @@ export default class NormalIndex extends Component {
|
|||
selectedKey === "1" &&
|
||||
<React.Fragment>
|
||||
<Button type="primary" onClick={() => {
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`)
|
||||
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/sbofflineComparison?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`);
|
||||
}}>线下对比</Button>
|
||||
</React.Fragment>
|
||||
}
|
||||
|
|
@ -508,8 +510,11 @@ export default class NormalIndex extends Component {
|
|||
{
|
||||
this.props.type !== "detail" &&
|
||||
<Tooltip title="导入数据">
|
||||
<i className="icon-coms02-Template-import1" style={{ color: "#2db7f5", fontSize: 18, marginRight: 10 }}
|
||||
onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}/>
|
||||
<i
|
||||
className="icon-coms02-Import"
|
||||
style={{ color: "#2db7f5", fontSize: 18, marginRight: 10 }}
|
||||
onClick={() => this.setState({ importParams: { ...importParams, visible: true } })}
|
||||
/>
|
||||
</Tooltip>
|
||||
}
|
||||
{/*导入弹框*/}
|
||||
|
|
@ -524,7 +529,7 @@ export default class NormalIndex extends Component {
|
|||
});
|
||||
}}
|
||||
onCancel={() => {
|
||||
this.setState({ importParams: { ...importParams, visible: false },fieldData: {} }, () => {
|
||||
this.setState({ importParams: { ...importParams, visible: false }, fieldData: {} }, () => {
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { current } = this.state;
|
||||
selectedKey === "1"
|
||||
|
|
@ -538,8 +543,11 @@ export default class NormalIndex extends Component {
|
|||
}
|
||||
|
||||
<Tooltip title="导出全部">
|
||||
<i className="icon-coms-export" style={{ color: "#2db7f5", fontSize: 18 }}
|
||||
onClick={this.handleExport}/>
|
||||
<i
|
||||
className="icon-coms02-coms2-export"
|
||||
style={{ color: "#2db7f5", fontSize: 18 }}
|
||||
onClick={this.handleExport}
|
||||
/>
|
||||
</Tooltip>
|
||||
<WeaInputSearch
|
||||
value={this.state.searchValue}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class StandingBookDetail extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "",
|
||||
selectedKey: "1",
|
||||
tabList: [],
|
||||
remarks: "",
|
||||
billMonth: ""
|
||||
|
|
@ -62,7 +62,7 @@ class StandingBookDetail extends Component {
|
|||
{
|
||||
(selectedKey === "1" || selectedKey === "3") &&
|
||||
<NormalIndex selectedKey={selectedKey} remarks={remarks} billMonth={billMonth} type={this.type}
|
||||
paymentOrganization={this.paymentOrganization}/>
|
||||
paymentOrganization={this.paymentOrganization} location={this.props.location}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "2" &&
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ export default class EditModal extends React.Component {
|
|||
saveloading,
|
||||
onClose,
|
||||
onChangeTab,
|
||||
taxAgentStore
|
||||
taxAgentStore,
|
||||
isChief
|
||||
} = this.props;
|
||||
const { form } = taxAgentStore;
|
||||
return (
|
||||
|
|
@ -118,7 +119,8 @@ export default class EditModal extends React.Component {
|
|||
<div className="title">{title}</div>
|
||||
</div>
|
||||
<div className="right">
|
||||
{editType !== "set" && (
|
||||
{/*总管理权限*/}
|
||||
{(editType !== "set" && isChief) && (
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={this.handleSubmit}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { Row, Col, Switch, message, Modal, Menu, Dropdown } from "antd";
|
||||
import {
|
||||
WeaTop,
|
||||
WeaRightMenu,
|
||||
WeaSearchGroup,
|
||||
WeaFormItem,
|
||||
WeaTable
|
||||
} from "ecCom";
|
||||
import { Col, message, Modal, Row, Switch } from "antd";
|
||||
import { WeaFormItem, WeaRightMenu, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import EditModal from "./editModal";
|
||||
import TipLabel from "../../components/TipLabel";
|
||||
|
|
@ -43,6 +36,7 @@ export default class TaxAgent extends React.Component {
|
|||
const { doInit } = taxAgentStore;
|
||||
doInit();
|
||||
this.getPermission();
|
||||
// window.setLayoutWindow=window;
|
||||
}
|
||||
|
||||
getPermission = () => {
|
||||
|
|
@ -85,7 +79,8 @@ export default class TaxAgent extends React.Component {
|
|||
}
|
||||
});
|
||||
},
|
||||
onCancel() {}
|
||||
onCancel() {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -300,7 +295,7 @@ export default class TaxAgent extends React.Component {
|
|||
"3、只有薪酬总管理员能够操作个税扣缴义务人的增减和开启/关闭分权;",
|
||||
"4、总管理员通过后台设置“薪酬管理权限”权限项进行配置;"
|
||||
];
|
||||
return <TipLabel tipList={tipList} />;
|
||||
return <TipLabel tipList={tipList}/>;
|
||||
};
|
||||
|
||||
const pagination = {
|
||||
|
|
@ -374,7 +369,7 @@ export default class TaxAgent extends React.Component {
|
|||
<WeaRightMenu>
|
||||
<WeaTop
|
||||
title="个税扣缴义务人" // 文字
|
||||
icon={<i className="icon-coms-fa" />} // 左侧图标
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true}>
|
||||
<Row
|
||||
|
|
@ -430,6 +425,7 @@ export default class TaxAgent extends React.Component {
|
|||
{...editModalLoading}
|
||||
editConditions={conditions}
|
||||
taxAgentStore={taxAgentStore}
|
||||
isChief={permission.isChief}
|
||||
onPrev={() =>
|
||||
this.setState({
|
||||
editModalProps: {
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
import { observable, action, toJS } from 'mobx';
|
||||
import { message } from 'antd';
|
||||
import { WeaForm, WeaTableNew } from 'comsMobx';
|
||||
import { removePropertyCondition } from '../util/response'
|
||||
import { action, observable } from "mobx";
|
||||
import { message } from "antd";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
import { removePropertyCondition } from "../util/response";
|
||||
|
||||
import * as API from '../apis/welfareArchive'; // 引入API接口文件
|
||||
import * as API from "../apis/welfareArchive"; // 引入API接口文件
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class ArchivesStore {
|
||||
@observable tableStore = new TableStore(
|
||||
// {dataHandle: (datas) => {
|
||||
// return dataSource;
|
||||
// }}
|
||||
// {dataHandle: (datas) => {
|
||||
// return dataSource;
|
||||
// }}
|
||||
);
|
||||
@observable form = new WeaForm(); // nrew 一个form
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
|
|
@ -22,9 +22,9 @@ export class ArchivesStore {
|
|||
@observable dataSource = [];
|
||||
|
||||
// Slide 表单
|
||||
@observable baseFormData = {}
|
||||
@observable socialSecurityForm = {} // 社保表单
|
||||
@observable accumulationFundForm = {} // 公积金表单
|
||||
@observable baseFormData = {};
|
||||
@observable socialSecurityForm = {}; // 社保表单
|
||||
@observable accumulationFundForm = {}; // 公积金表单
|
||||
@observable otherForm = {}; // 其他福利表单
|
||||
|
||||
// 基数表单
|
||||
|
|
@ -34,35 +34,35 @@ export class ArchivesStore {
|
|||
@observable pageInfo = {};
|
||||
|
||||
// 导入预览
|
||||
@observable previewCurDataList = {}
|
||||
@observable previewCurDataColumns = []
|
||||
@observable previewCurDataDataSource = []
|
||||
@observable importResult = {}
|
||||
@observable previewCurDataList = {};
|
||||
@observable previewCurDataColumns = [];
|
||||
@observable previewCurDataDataSource = [];
|
||||
@observable importResult = {};
|
||||
|
||||
@action
|
||||
initImportParams = () => {
|
||||
this.previewCurDataList = {};
|
||||
this.previewCurDataColumns = [];
|
||||
this.previewCurDataDataSource = [];
|
||||
this.importResult = {}
|
||||
}
|
||||
this.importResult = {};
|
||||
};
|
||||
|
||||
|
||||
// ** 设置导入参数 start **
|
||||
@action
|
||||
setPreviewCurDataColumns = (previewCurDataColumns) => {
|
||||
this.previewCurDataColumns = previewCurDataColumns
|
||||
}
|
||||
this.previewCurDataColumns = previewCurDataColumns;
|
||||
};
|
||||
|
||||
@action
|
||||
setPreviewCurDataDataSource = (previewCurDataDataSource) => {
|
||||
this.previewCurDataDataSource = previewCurDataDataSource
|
||||
}
|
||||
this.previewCurDataDataSource = previewCurDataDataSource;
|
||||
};
|
||||
|
||||
@action
|
||||
setImportResult = (importResult) => {
|
||||
this.importResult = importResult
|
||||
}
|
||||
this.importResult = importResult;
|
||||
};
|
||||
// ** 设置导入参数 end **
|
||||
|
||||
// 社保表单
|
||||
|
|
@ -71,66 +71,66 @@ export class ArchivesStore {
|
|||
|
||||
// 公积金表单
|
||||
@action
|
||||
setAccumulationFundForm = accumulationFundForm => this.accumulationFundForm = accumulationFundForm
|
||||
setAccumulationFundForm = accumulationFundForm => this.accumulationFundForm = accumulationFundForm;
|
||||
|
||||
// 其他福利表单
|
||||
@action
|
||||
setOtherForm = otherForm => this.otherForm = otherForm
|
||||
setOtherForm = otherForm => this.otherForm = otherForm;
|
||||
|
||||
// 社保表单
|
||||
@action
|
||||
setSocialSecurityPaymentForm = socialSecurityPaymentForm => this.socialSecurityPaymentForm = socialSecurityPaymentForm
|
||||
setSocialSecurityPaymentForm = socialSecurityPaymentForm => this.socialSecurityPaymentForm = socialSecurityPaymentForm;
|
||||
|
||||
// 公积金表单
|
||||
@action
|
||||
setAccumulationFundPaymentForm = accumulationFundPaymentForm => this.accumulationFundPaymentForm = accumulationFundPaymentForm
|
||||
setAccumulationFundPaymentForm = accumulationFundPaymentForm => this.accumulationFundPaymentForm = accumulationFundPaymentForm;
|
||||
|
||||
// 其他福利基数表单
|
||||
@action
|
||||
setOtherPaymentForm = otherPaymentForm => this.otherPaymentForm = otherPaymentForm
|
||||
setOtherPaymentForm = otherPaymentForm => this.otherPaymentForm = otherPaymentForm;
|
||||
// 初始化操作
|
||||
@action
|
||||
doInit = () => {
|
||||
this.getCondition();
|
||||
// this.getTableDatas();
|
||||
}
|
||||
};
|
||||
|
||||
// 获得高级搜索表单数据
|
||||
@action
|
||||
getCondition = () => {
|
||||
API.getCondition().then(action(res => {
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
let condition = removePropertyCondition(res.data.condition)
|
||||
let condition = removePropertyCondition(res.data.condition);
|
||||
this.condition = condition;
|
||||
this.form.initFormFields(condition); // 渲染高级搜索form表单
|
||||
} else {
|
||||
message.error(res.msg || '接口调用失败!')
|
||||
message.error(res.msg || "接口调用失败!");
|
||||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
// 渲染table数据
|
||||
@action
|
||||
getTableDatas = (params = {}) => {
|
||||
this.loading = true;
|
||||
const formParams = this.form.getFormParams() || {};
|
||||
params = {...formParams, ...params};
|
||||
params = { ...formParams, ...params };
|
||||
API.getTable(params).then(action(res => {
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.dataSource = res.data.datas.map(item => {
|
||||
item = {...item}
|
||||
item.key = item.employeeId
|
||||
item = { ...item };
|
||||
item.key = item.employeeId;
|
||||
return item;
|
||||
})
|
||||
});
|
||||
// this.columns = res.data.columns;
|
||||
this.tableStore.getDatas(res.data.dataKey.datas)
|
||||
this.pageInfo = res.data.pageInfo
|
||||
this.tableStore.getDatas(res.data.dataKey.datas);
|
||||
this.pageInfo = res.data.pageInfo;
|
||||
} else {
|
||||
message.error(res.msg || '接口调用失败!')
|
||||
message.error(res.msg || "接口调用失败!");
|
||||
}
|
||||
this.loading = false;
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
setShowSearchAd = bool => this.showSearchAd = bool;
|
||||
|
|
@ -139,124 +139,128 @@ export class ArchivesStore {
|
|||
@action doSearch = () => {
|
||||
this.getTableDatas();
|
||||
this.showSearchAd = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 查询档案基本信息表单
|
||||
@action
|
||||
getBaseForm = (employeeId, welfareTypeEnum ="") => {
|
||||
API.getBaseForm({employeeId, welfareTypeEnum}).then(action(res => {
|
||||
if(res.status) {
|
||||
if(welfareTypeEnum == "") {
|
||||
this.baseFormData = res.data.data
|
||||
} else if(welfareTypeEnum == "SOCIAL_SECURITY"){
|
||||
this.socialSecurityForm = res.data
|
||||
} else if(welfareTypeEnum == "ACCUMULATION_FUND") {
|
||||
this.accumulationFundForm = res.data
|
||||
} else if(welfareTypeEnum == "OTHER") {
|
||||
this.otherForm = res.data
|
||||
}
|
||||
// if(res.data && res.data.data && res.data.data.id) {
|
||||
// this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id)
|
||||
// }
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
getBaseForm = (employeeId, welfareTypeEnum = "", paymentOrganization = "") => {
|
||||
API.getBaseForm({ employeeId, welfareTypeEnum, paymentOrganization }).then(action(res => {
|
||||
if (res.status) {
|
||||
if (welfareTypeEnum == "") {
|
||||
this.baseFormData = res.data.data;
|
||||
} else if (welfareTypeEnum == "SOCIAL_SECURITY") {
|
||||
this.socialSecurityForm = res.data;
|
||||
} else if (welfareTypeEnum == "ACCUMULATION_FUND") {
|
||||
this.accumulationFundForm = res.data;
|
||||
} else if (welfareTypeEnum == "OTHER") {
|
||||
this.otherForm = res.data;
|
||||
}
|
||||
}))
|
||||
}
|
||||
// if(res.data && res.data.data && res.data.data.id) {
|
||||
// this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id)
|
||||
// }
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
// 查询档案缴纳基数表单
|
||||
@action
|
||||
getPaymentForm = (employeeId, welfareTypeEnum, schemeId) => {
|
||||
API.getPaymentForm({employeeId, welfareTypeEnum, schemeId}).then(res => {
|
||||
if(welfareTypeEnum == "SOCIAL_SECURITY") {
|
||||
this.socialSecurityPaymentForm = res.data
|
||||
} else if(welfareTypeEnum == "ACCUMULATION_FUND") {
|
||||
this.accumulationFundPaymentForm = res.data
|
||||
} else if(welfareTypeEnum == "OTHER") {
|
||||
this.otherPaymentForm = res.data
|
||||
getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization = "") => {
|
||||
API.getPaymentForm({ employeeId, welfareTypeEnum, schemeId, paymentOrganization }).then(res => {
|
||||
if (welfareTypeEnum == "SOCIAL_SECURITY") {
|
||||
this.socialSecurityPaymentForm = res.data;
|
||||
} else if (welfareTypeEnum == "ACCUMULATION_FUND") {
|
||||
this.accumulationFundPaymentForm = res.data;
|
||||
} else if (welfareTypeEnum == "OTHER") {
|
||||
this.otherPaymentForm = res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 保存表单
|
||||
@action
|
||||
save = (welfareType) => {
|
||||
let baseForm = ""
|
||||
let paymentForm = ""
|
||||
if(welfareType == "SOCIAL_SECURITY") {
|
||||
baseForm = JSON.stringify(this.socialSecurityForm.data)
|
||||
paymentForm = JSON.stringify(this.socialSecurityPaymentForm.data)
|
||||
} else if(welfareType == "ACCUMULATION_FUND") {
|
||||
baseForm = JSON.stringify(this.accumulationFundForm.data)
|
||||
paymentForm = JSON.stringify(this.accumulationFundPaymentForm.data)
|
||||
} else if(welfareType == "OTHER") {
|
||||
baseForm = JSON.stringify(this.otherForm.data)
|
||||
paymentForm = JSON.stringify(this.otherPaymentForm.data)
|
||||
let baseForm = "";
|
||||
let paymentForm = "";
|
||||
if (welfareType == "SOCIAL_SECURITY") {
|
||||
baseForm = JSON.stringify(this.socialSecurityForm.data);
|
||||
paymentForm = JSON.stringify(this.socialSecurityPaymentForm.data);
|
||||
} else if (welfareType == "ACCUMULATION_FUND") {
|
||||
baseForm = JSON.stringify(this.accumulationFundForm.data);
|
||||
paymentForm = JSON.stringify(this.accumulationFundPaymentForm.data);
|
||||
} else if (welfareType == "OTHER") {
|
||||
baseForm = JSON.stringify(this.otherForm.data);
|
||||
paymentForm = JSON.stringify(this.otherPaymentForm.data);
|
||||
}
|
||||
API.save({welfareType, baseForm, paymentForm}).then(res => {
|
||||
if(res.status) {
|
||||
message.success("保存成功", 1)
|
||||
this.getTableDatas()
|
||||
} else {
|
||||
message.error(res.errormsg || "保存失败", 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
API.save({ welfareType, baseForm, paymentForm }).then(res => {
|
||||
if (res.status) {
|
||||
message.success("保存成功", 1);
|
||||
resolve();
|
||||
// this.getTableDatas()
|
||||
} else {
|
||||
message.error(res.errormsg || "保存失败", 1);
|
||||
reject();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 导入模板下载
|
||||
@action
|
||||
exportTempateDownload = (params = {}) => {
|
||||
API.exportCurData(params)
|
||||
}
|
||||
API.exportCurData(params);
|
||||
};
|
||||
|
||||
// 导入预览
|
||||
@action
|
||||
previewCurData = (params) => {
|
||||
API.previewCurData(params).then(res => {
|
||||
if(res.status) {
|
||||
this.previewCurDataList = res.data
|
||||
if (res.status) {
|
||||
this.previewCurDataList = res.data;
|
||||
this.previewCurDataColumns = res.data.headers.map((item, index) => {
|
||||
let column = {}
|
||||
let column = {};
|
||||
column.title = item;
|
||||
column.dataIndex = "" + index;
|
||||
column.key = index + ""
|
||||
return column
|
||||
})
|
||||
column.key = index + "";
|
||||
return column;
|
||||
});
|
||||
|
||||
this.previewCurDataDataSource = res.data.list.map((item) => {
|
||||
let data = {}
|
||||
let data = {};
|
||||
item.map((i, index) => {
|
||||
data[index + ''] = i
|
||||
})
|
||||
return data
|
||||
})
|
||||
data[index + ""] = i;
|
||||
});
|
||||
return data;
|
||||
});
|
||||
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败", 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 导入
|
||||
@action
|
||||
importBatch = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.importBatch(params).then(res => {
|
||||
if(res.status) {
|
||||
this.importResult = res.data
|
||||
if (res.status) {
|
||||
this.importResult = res.data;
|
||||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "导入失败", 1)
|
||||
message.error(res.errormsg || "导入失败", 1);
|
||||
reject();
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// 导出档案
|
||||
@action
|
||||
exportArchives = (ids = "") => {
|
||||
API.exportArchives(ids)
|
||||
}
|
||||
API.exportArchives(ids);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,9 @@ export class DeclareStore {
|
|||
@action
|
||||
saveDeclare = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading= true;
|
||||
API.saveDeclare(params).then(res => {
|
||||
this.loading= false;
|
||||
if(res.status) {
|
||||
message.success("生成成功")
|
||||
resolve();
|
||||
|
|
@ -102,8 +104,8 @@ export class DeclareStore {
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//个税申报表-个税申报表相关信息
|
||||
@action
|
||||
|
|
@ -139,6 +141,6 @@ export class DeclareStore {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,18 +79,21 @@ export class SalaryItemStore {
|
|||
setDeleteItemVisible = deleteItemVisible => this.deleteItemVisible = deleteItemVisible;
|
||||
|
||||
@action
|
||||
setSystemItemVisible = systemItemVisible => this.systemItemVisible = systemItemVisible;
|
||||
setSystemItemVisible = systemItemVisible => {
|
||||
this.systemItemVisible = systemItemVisible;
|
||||
this.sysListTableStore = new TableStore();
|
||||
};
|
||||
|
||||
// 存储分页以及关键字信息
|
||||
@action
|
||||
setPageInfo = (pageInfo) => this.pageInfo = {...this.pageInfo,...pageInfo};
|
||||
setPageInfo = (pageInfo) => this.pageInfo = { ...this.pageInfo, ...pageInfo };
|
||||
|
||||
// 渲染table数据
|
||||
@action
|
||||
getTableDatas = (params) => {
|
||||
this.loading = true;
|
||||
return new Promise((resolve, reject)=>{
|
||||
API.getItemList({...params, ...this.pageInfo}).then(action(res => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.getItemList({ ...params, ...this.pageInfo }).then(action(res => {
|
||||
this.loading = false;
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.tableDataSource = res.data.list;
|
||||
|
|
@ -101,7 +104,7 @@ export class SalaryItemStore {
|
|||
reject();
|
||||
}
|
||||
}));
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
@action
|
||||
|
|
@ -202,7 +205,7 @@ export class SalaryItemStore {
|
|||
|
||||
@action
|
||||
deleteItemRequest = (ids) => {
|
||||
return new Promise((resolve, reject)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
API.deleteItem(ids).then(res => {
|
||||
if (res.status) {
|
||||
this.deleteItemVisible = false;
|
||||
|
|
@ -213,7 +216,7 @@ export class SalaryItemStore {
|
|||
reject();
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
validateForm(params) {
|
||||
|
|
@ -252,7 +255,7 @@ export class SalaryItemStore {
|
|||
//薪资项目-新增薪资项目
|
||||
@action
|
||||
saveItem = (params, continueFlag) => {
|
||||
return new Promise((resolve, reject)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.validateForm(params)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -269,7 +272,7 @@ export class SalaryItemStore {
|
|||
reject();
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
// 获取公式变量类型
|
||||
|
|
|
|||
Loading…
Reference in New Issue