This commit is contained in:
MustangDeng 2022-04-22 14:52:10 +08:00
commit 046be5bf5e
16 changed files with 1897 additions and 139 deletions

View File

@ -0,0 +1,160 @@
import { WeaTools } from "ecCom";
//社会福利台账-获取正常缴纳列表
export const getCommonList = (params) => {
// return WeaTools.callApi('/api/bs/hrmsalary/siaccount/batch/list', 'POST', params);
return fetch("/api/bs/hrmsalary/siaccount/batch/list", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-获取tab列表
export const getTabList = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/tabList", "get", params);
};
//社会福利台账-获取正常缴纳列表
export const getNormalList = (params) => {
// return WeaTools.callApi('/api/bs/hrmsalary/siaccount/detail/common/list', 'get', params);
return fetch("/api/bs/hrmsalary/siaccount/detail/common/list", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-获取补缴列表
export const getSupplementaryList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-获取总览列表
export const getOverViewList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/overView", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-获取异常列表
export const getChangeList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/changeList", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-保存并进入核算
export const save = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/save", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-归档
export const siaccountFile = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/file", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-核算异常列表
export const inspectList = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/inspectList", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-删除正常缴纳人员
export const siaccountCommonDelete = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/common/delete", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-添加正常缴纳人员
export const siaccountCommonSave = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/common/save", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-添加补缴人员
export const siaccountSupplementarySave = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/supplementary/save", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-删除月份表单
export const siaccountDelete = (params) => {
return fetch("/api/bs/hrmsalary/siaccount/delete", {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
//社会福利台账-正常缴纳添加缴纳人员表单
export const siaccountCommonForm = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/siaccount/commonForm",
"get",
params
);
};
//社会福利台账-补缴添加缴纳人员表单
export const querySupplementaryForm = (params) => {
return WeaTools.callApi(
"/api/bs/hrmsalary/siaccount/querySupplementaryForm",
"get",
params
);
};

View File

@ -1,48 +1,47 @@
import React from 'react';
import Route from 'react-router/lib/Route';
import { WeaLocaleProvider } from 'ecCom'
import MySalary from './pages/mySalary';
import Programme from './pages/socialSecurityBenefits/programme';
import Archives from './pages/socialSecurityBenefits/archives';
import StandingBook from './pages/socialSecurityBenefits/standingBook';
import SalaryItem from './pages/salaryItem';
import SalaryFile from './pages/salaryFile';
import CumDeduct from './pages/dataAcquisition/cumDeduct';
import OtherDeduct from './pages/dataAcquisition/otherDeduct';
import CumSituation from './pages/dataAcquisition/cumSituation';
import Attendance from './pages/dataAcquisition/attendance';
import Ledger from './pages/ledger';
import Calculate from './pages/calculate';
import Payroll from './pages/payroll';
import PayrollGrant from './pages/payroll/payrollGrant';
import PayrollDetail from './pages/payroll/payrollDetail'
import Declare from './pages/declare';
import TaxRate from './pages/taxRate';
import TaxAgent from './pages/taxAgent';
import CalculateDetail from './pages/calculateDetail'
import PlaceOnFileDetail from './pages/calculateDetail/placeOnFileDetail';
import CompareDetail from './pages/calculateDetail/compareDetail'
import GenerateDeclarationDetail from './pages/declare/generateDeclarationDetail'
import BaseForm from './components';
import TemplatePreview from './pages/payroll/templatePreview'
import stores from './stores';
import './style/index';
import React from "react";
import Route from "react-router/lib/Route";
import { WeaLocaleProvider } from "ecCom";
import MySalary from "./pages/mySalary";
import Programme from "./pages/socialSecurityBenefits/programme";
import Archives from "./pages/socialSecurityBenefits/archives";
import StandingBook from "./pages/socialSecurityBenefits/standingBook";
import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetail";
import SalaryItem from "./pages/salaryItem";
import SalaryFile from "./pages/salaryFile";
import CumDeduct from "./pages/dataAcquisition/cumDeduct";
import OtherDeduct from "./pages/dataAcquisition/otherDeduct";
import CumSituation from "./pages/dataAcquisition/cumSituation";
import Attendance from "./pages/dataAcquisition/attendance";
import Ledger from "./pages/ledger";
import Calculate from "./pages/calculate";
import Payroll from "./pages/payroll";
import PayrollGrant from "./pages/payroll/payrollGrant";
import PayrollDetail from "./pages/payroll/payrollDetail";
import Declare from "./pages/declare";
import TaxRate from "./pages/taxRate";
import TaxAgent from "./pages/taxAgent";
import CalculateDetail from "./pages/calculateDetail";
import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
import CompareDetail from "./pages/calculateDetail/compareDetail";
import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail";
import BaseForm from "./components";
import TemplatePreview from "./pages/payroll/templatePreview";
import stores from "./stores";
import "./style/index";
// 读取系统多语言配置
let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'hrmSalary');
let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, "hrmSalary");
// 不需要读取系统多语言
getLocaleLabel = function (nextState, replace, callback) {
callback();
callback();
};
const Home = props => props.children;
const Home = (props) => props.children;
const SocialSecurityBenefits = props => props.children;
const DataAcquisition = props => props.children;
const SocialSecurityBenefits = (props) => props.children;
const DataAcquisition = (props) => props.children;
// mySalaryBenefits 我的薪资福利
// socialSecurityBenefits 社保福利
@ -58,48 +57,77 @@ const DataAcquisition = props => props.children;
// attendance 考勤引用
// ledger 薪资账套
// calculate 薪资核算
// calculateDetail 核算详情
// placeOnFileDetail 核算归档详情
// compareDetail 线下线上对比
// calculateDetail 核算详情
// placeOnFileDetail 核算归档详情
// compareDetail 线下线上对比
// payroll 工资单发放
// declare 个税申请表
// generateDeclarationDetail 个税单详情
// taxRate 个税税率表
// taxAgent 个税扣缴义务人
const Routes = (
<Route key='hrmSalary' path='hrmSalary' onEnter={getLocaleLabel} component={Home}>
<Route key='mySalary' path='mySalary' component={MySalary} />
<Route key='socialSecurityBenefits' path='socialSecurityBenefits' component={SocialSecurityBenefits}>
<Route key='programme' path='programme' component={Programme} />
<Route key='archives' path='archives' component={Archives} />
<Route key='standingBook' path='standingBook' component={StandingBook} />
<Route
key="hrmSalary"
path="hrmSalary"
onEnter={getLocaleLabel}
component={Home}>
<Route key="mySalary" path="mySalary" component={MySalary} />
<Route
key="socialSecurityBenefits"
path="socialSecurityBenefits"
component={SocialSecurityBenefits}>
<Route key="programme" path="programme" component={Programme} />
<Route key="archives" path="archives" component={Archives} />
<Route key="standingBook" path="standingBook" component={StandingBook} />
<Route
key="standingBookDetail"
path="standingBookDetail"
component={StandingBookDetail}
/>
</Route>
<Route key='salaryItem' path='salaryItem' component={SalaryItem} />
<Route key='salaryFile' path='salaryFile' component={SalaryFile} />
<Route key='dataAcquisition' path='dataAcquisition' component={DataAcquisition}>
<Route key='cumDeduct' path='cumDeduct' component={CumDeduct} />
<Route key='otherDeduct' path='otherDeduct' component={OtherDeduct} />
<Route key='cumSituation' path='cumSituation' component={CumSituation} />
<Route key='attendance' path='attendance' component={Attendance} />
<Route key="salaryItem" path="salaryItem" component={SalaryItem} />
<Route key="salaryFile" path="salaryFile" component={SalaryFile} />
<Route
key="dataAcquisition"
path="dataAcquisition"
component={DataAcquisition}>
<Route key="cumDeduct" path="cumDeduct" component={CumDeduct} />
<Route key="otherDeduct" path="otherDeduct" component={OtherDeduct} />
<Route key="cumSituation" path="cumSituation" component={CumSituation} />
<Route key="attendance" path="attendance" component={Attendance} />
</Route>
<Route key='ledger' path='ledger' component={Ledger} />
<Route key='calculate' path='calculate' component={Calculate} />
<Route key='calculateDetail' path='calculateDetail' component={CalculateDetail} />
<Route key='placeOnFileDetail' path='placeOnFileDetail' component={PlaceOnFileDetail} />
<Route key='compareDetail' path='compareDetail' component={CompareDetail} />
<Route key='payroll' path='payroll' component={Payroll} />
<Route key='payrollGrant' path='payrollGrant' component={PayrollGrant} />
<Route key="ledger" path="ledger" component={Ledger} />
<Route key="calculate" path="calculate" component={Calculate} />
<Route
key="calculateDetail"
path="calculateDetail"
component={CalculateDetail}
/>
<Route
key="placeOnFileDetail"
path="placeOnFileDetail"
component={PlaceOnFileDetail}
/>
<Route key="compareDetail" path="compareDetail" component={CompareDetail} />
<Route key="payroll" path="payroll" component={Payroll} />
<Route key="payrollGrant" path="payrollGrant" component={PayrollGrant} />
<Route key="payrollDetail" path="payrollDetail" component={PayrollDetail} />
<Route key="templatePreview" path="templatePreview" component={TemplatePreview} />
<Route key='declare' path='declare' component={Declare} />
<Route key='generateDeclarationDetail' path='generateDeclarationDetail' component={GenerateDeclarationDetail} />
<Route key='taxRate' path='taxRate' component={TaxRate} />
<Route key='taxAgent' path='taxAgent' component={TaxAgent} />
<Route
key="templatePreview"
path="templatePreview"
component={TemplatePreview}
/>
<Route key="declare" path="declare" component={Declare} />
<Route
key="generateDeclarationDetail"
path="generateDeclarationDetail"
component={GenerateDeclarationDetail}
/>
<Route key="taxRate" path="taxRate" component={TaxRate} />
<Route key="taxAgent" path="taxAgent" component={TaxAgent} />
</Route>
);

View File

@ -0,0 +1,72 @@
/*
* Author: 黎永顺
* Description: 异常列表
* Date: 2022-04-21 16:51:27
* LastEditTime: 2022-04-21 20:08:59
*/
import React, { Component } from "react";
import { Button, Table, Dropdown, Menu, Tooltip, Icon } from "antd";
import { WeaSlideModal, WeaTable } from "ecCom";
import "./index.less";
export default class AbnormalDrawer extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys: [],
};
}
onSelectChange = (selectedRowKeys) => {
this.setState({ selectedRowKeys });
};
render() {
const { selectedRowKeys } = this.state;
const { loading } = this.props;
const rowSelection = {
selectedRowKeys,
onChange: this.onSelectChange,
};
return (
<WeaSlideModal
{...this.props}
width={50}
height={100}
direction={"right"}
measure={"%"}
content={
<div className="abnormalWapper">
<div className="top">
<Tooltip
placement="bottom"
title="提示核算范围内人员福利项目在福利方案中开启缴纳但核算数值为0的进行异常统计点击忽略视为该数据主观判断为非异常数据导出档案只导出异常数据点击核算也不再重新核算">
<Icon type="question-circle" />
</Tooltip>
<Button type="primary">导出档案</Button>
<Button>核算</Button>
<Dropdown
overlay={
<Menu>
<Menu.Item key="log">忽略全部</Menu.Item>
<Menu.Item key="column">取消全部忽略</Menu.Item>
</Menu>
}>
<i className="icon-coms-more" />
</Dropdown>
</div>
{/* table */}
<WeaTable
rowKey="id"
columns={this.props.columns}
dataSource={[]}
loading={loading}
// pagination={{ total }}
rowSelection={rowSelection}
scroll={{ x: 1200 }}
/>
</div>
}
/>
);
}
}

View File

@ -0,0 +1,71 @@
/*
* Author: 黎永顺
* Description: 核算弹框
* Date: 2022-04-21 15:16:18
* LastEditTime: 2022-04-21 16:54:59
*/
import React, { Component } from "react";
import { Button, Form, Input } from "antd";
import { WeaDatePicker, WeaDialog } from "ecCom";
const createForm = Form.create;
const FormItem = Form.Item;
class Accountdialog extends Component {
constructor(props) {
super(props);
this.state = {};
}
handleSubmit = (e) => {
const { onOk } = this.props;
e.preventDefault();
this.props.form.validateFields((errors, values) => {
if (!!errors) {
return;
}
onOk(values);
});
};
render() {
const { getFieldProps } = this.props.form;
const formItemLayout = {
labelCol: { span: 7 },
wrapperCol: { span: 12 },
};
return (
<WeaDialog
{...this.props}
style={{ maxHeight: 400 }}
buttons={[
<Button
type="primary"
onClick={this.handleSubmit}
loading={this.props.loading}>
保存并进入核算
</Button>,
]}>
<Form horizontal form={this.props.form} style={{ marginTop: 16 }}>
<FormItem {...formItemLayout} label="账单月份" required>
<WeaDatePicker
style={{ width: "100%" }}
format="YYYY-MM"
{...getFieldProps("billMonth", {
initialValue: new Date(),
rules: [{ required: true, message: "请选择日期" }],
})}
/>
</FormItem>
<FormItem {...formItemLayout} label="备注">
<Input
type="textarea"
{...getFieldProps("remarks", { initialValue: "" })}
/>
</FormItem>
</Form>
</WeaDialog>
);
}
}
export default createForm()(Accountdialog);

View File

@ -0,0 +1,23 @@
.abnormalWapper {
padding: 10px 12px;
.top {
display: flex;
align-items: center;
justify-content: flex-end;
i:first-child {
margin-right: 12px;
color: #666;
}
i {
font-size: 16px;
cursor: pointer;
}
button {
margin-right: 12px;
}
}
}

View File

@ -1,92 +1,387 @@
import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { Button, Table, DatePicker } from 'antd';
import { Button, Table, Dropdown, Menu, Modal, message } from "antd";
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable } from 'ecCom';
import { WeaTop, WeaTab, WeaRightMenu, WeaDatePicker, WeaTable } from "ecCom";
import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import { renderNoright, getSearchs } from "../../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import CustomTab from "../../../components/customTab";
import ContentWrapper from "../../../components/contentWrapper";
import Accountdialog from "./components/accountDialog";
import AbnormalDrawer from "./components/abnormalDrawer";
import moment from "moment";
import _ from "lodash";
import { columns, dataSource } from './columns';
// import { columns, dataSource } from './columns';
import "./index.less";
const { MonthPicker } = DatePicker;
@inject('baseTableStore')
@inject("standingBookStore")
@observer
export default class StandingBook extends React.Component {
constructor(props) {
super(props);
this.state = {
value: "",
selectedKey: "0"
}
selectedKey: "0",
tableParams: {
startTime: moment(new Date()).format("YYYY-MM"),
endTime: moment(new Date()).format("YYYY-MM"),
},
dialogProps: {
title: "",
visible: false,
},
drawerProps: {
title: "",
visible: false,
},
tableData: {
list: [],
columns: [],
total: 0,
},
};
}
render() {
const { baseTableStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = baseTableStore;
if (!hasRight && !loading) { // 无权限处理
componentDidMount() {
this.getCommonList({ ...this.state.tableParams });
}
getCommonList = (payload = {}) => {
const { getCommonList } = this.props.standingBookStore;
getCommonList({ ...payload }).then(({ list, columns, total }) => {
columns = _.map(columns, (it) => {
if (it.dataIndex === "billMonth") {
it = {
...it,
render: (text, r) => {
const { billMonth } = r;
return (
<a
href="javascript:;"
className="linkTo"
onClick={() => this.handleGoDetail(billMonth)}>
{text}
</a>
);
},
};
}
return { ...it };
});
this.setState({
tableData: {
list,
columns: [
...columns,
{
title: "操作",
dataIndex: "action",
key: "action",
render: (text, r) => {
const { billStatus, billMonth } = r;
return (
<React.Fragment>
{billStatus === "未归档" && (
<a
href="javascript:;"
className="linkTo"
onClick={() => this.handleGoDetail(billMonth)}>
{" "}
核算{" "}
</a>
)}
{billStatus === "未归档" && (
<Dropdown
overlay={
<Menu
onClick={({ key }) =>
this.handleOperate({ key, billMonth })
}>
<Menu.Item key="archive">归档</Menu.Item>
<Menu.Item key="detail">异常详情</Menu.Item>
<Menu.Item key="delete">删除</Menu.Item>
<Menu.Item key="operate">操作日志</Menu.Item>
</Menu>
}>
<i className="icon-coms-more more" />
</Dropdown>
)}
{billStatus === "已归档" && (
<Dropdown
overlay={
<Menu
onClick={({ key }) =>
this.handleOperate({ key, billMonth })
}>
<Menu.Item key="view">查看</Menu.Item>
<Menu.Item key="operate">操作日志</Menu.Item>
</Menu>
}>
<i className="icon-coms-more more" />
</Dropdown>
)}
</React.Fragment>
);
},
},
],
total,
},
});
});
};
inspectList = (payload) => {
const { inspectList } = this.props.standingBookStore;
inspectList({ ...payload }).then((res) => {
console.log("liyongshun", res);
});
};
handleGoDetail = (billMonth) => {
window.open(
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}`
);
};
handleOperate = (payload) => {
const { siaccountFile, siaccountDelete, deleteLoading } =
this.props.standingBookStore;
const { key, billMonth } = payload;
switch (key) {
case "archive":
Modal.confirm({
title: "确认信息",
content: "确认要归档吗?",
onOk: () => {
siaccountFile({ billMonth }).then((res) => {
console.log("res", res);
});
},
onCancel: () => {},
});
break;
case "detail":
this.inspectList({ billMonth });
this.setState({
drawerProps: {
...this.state.drawerProps,
title: "核算异常",
visible: true,
},
});
break;
case "delete":
Modal.confirm({
title: "确认信息",
content: "确认删除本条数据吗?",
confirmLoading: deleteLoading,
onOk: () => {
siaccountDelete({ billMonth }).then(() => {
message.success("删除成功");
this.getCommonList({ ...this.state.tableParams });
});
},
onCancel: () => {},
});
case "view":
this.handleGoDetail(billMonth);
break;
default:
break;
}
};
handleOk = (formVal) => {
const { save } = this.props.standingBookStore;
const { billMonth, ...extra } = formVal;
const payload = {
billMonth: moment(billMonth).format("YYYY-MM"),
...extra,
};
save(payload).then(() => {
message.success("核算成功");
this.handleClose();
this.getCommonList({ ...this.state.tableParams });
this.handleGoDetail(moment(billMonth).format("YYYY-MM"));
});
};
handleClose = () => {
this.setState({
dialogProps: {
...this.state.dialogProps,
title: "",
visible: false,
},
});
};
handleChangeMonth = (type, val) => {
this.setState({
tableParams: {
...this.state.tableParams,
[type]: val,
},
});
this.getCommonList({
...this.state.tableParams,
[type]: val,
});
};
render() {
const { standingBookStore } = this.props;
const {
inspectLoading,
loading,
hasRight,
form,
condition,
tableStore,
showSearchAd,
getTableDatas,
doSearch,
setShowSearchAd,
} = standingBookStore;
const { list, columns, total } = this.state.tableData;
const { startTime, endTime } = this.state.tableParams;
const { dialogProps, drawerProps } = this.state;
const abnormalColumns = _.map(
_.filter(tableStore.columns, (it) => it.hide && it.hide === "false"),
(item) => ({ ...item, width: item.oldWidth })
);
if (!hasRight && !loading) {
// 无权限处理
return renderNoright();
}
const rightMenu = [// 右键菜单
const rightBtns = [
// 右键菜单
<Button
type="primary"
onClick={() => {
this.setState({
dialogProps: {
...this.state.dialogProps,
title: "核算",
visible: true,
},
});
}}>
核算
</Button>,
<Dropdown
overlay={
<Menu>
<Menu.Item key="log">操作日志</Menu.Item>
<Menu.Item key="column">自定义列</Menu.Item>
<Menu.Item key="help">帮助</Menu.Item>
</Menu>
}>
<i className="icon-coms-more" />
</Dropdown>,
];
const rightMenu = [
// 右键菜单
{
key: 'BTN_COLUMN',
icon: <i className='icon-coms-Custom' />,
content: '显示列定制',
onClick: this.showColumn
key: "BTN_COLUMN",
icon: <i className="icon-coms-Custom" />,
content: "显示列定制",
onClick: this.showColumn,
},
];
const collectParams = { // 收藏功能配置
favname: '社保福利台账',
const collectParams = {
// 收藏功能配置
favname: "社保福利台账",
favouritetype: 1,
objid: 0,
link: 'wui/index.html#/ns_demo03/index',
link: "wui/index.html#/ns_demo03/index",
importantlevel: 1,
};
const adBtn = [ // 高级搜索内部按钮
<Button type="primary" onClick={doSearch}>搜索</Button>,
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>,
const adBtn = [
// 高级搜索内部按钮
<Button type="primary" onClick={doSearch}>
搜索
</Button>,
<Button type="ghost" onClick={() => form.resetForm()}>
重置
</Button>,
<Button type="ghost" onClick={() => setShowSearchAd(false)}>
取消
</Button>,
];
const topTab = [
];
const topTab = [];
const renderSearchOperationItem = () => {
return <div></div>
}
return <div></div>;
};
return (
<div className="mySalaryBenefitsWrapper">
<div className="standingbookWrapper">
<WeaRightMenu
datas={rightMenu} // 右键菜单
collectParams={collectParams} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
>
<WeaTop
title="社保福利方案" // 文字
icon={<i className='icon-coms-meeting' />} // 左侧图标
iconBgcolor='#F14A2D' // 左侧图标背景色
showDropIcon={true} // 是否显示下拉按钮
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
title="社保福利台账" // 文字
icon={<i className="icon-coms-meeting" />} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
buttons={rightBtns}
// showDropIcon={true} // 是否显示下拉按钮
// dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
// dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
>
<CustomTab topTab={topTab}
searchOperationItem={
renderSearchOperationItem()
}
onChange={(v) => {
this.setState({selectedKey: v})
}}
<div className="billDateWrapper">
<div>账单月份</div>
<WeaDatePicker
value={startTime}
format="YYYY-MM"
onChange={(val) => this.handleChangeMonth("startTime", val)}
/>
<span className="to"></span>
<WeaDatePicker
value={endTime}
format="YYYY-MM"
onChange={(val) => this.handleChangeMonth("endTime", val)}
/>
</div>
<WeaTable
columns={_.filter(columns, (it) => it.dataIndex !== "id")}
dataSource={list}
loading={loading}
pagination={{ total }}
/>
<WeaTable columns={columns} dataSource={dataSource}/>
{dialogProps.visible && (
<Accountdialog
{...dialogProps}
onCancel={() => this.handleClose()}
onOk={this.handleOk}
loading={loading}
/>
)}
{drawerProps.visible && (
<AbnormalDrawer
{...drawerProps}
onClose={() => {
this.setState({
drawerProps: {
...this.state.drawerProps,
title: "",
visible: false,
},
});
}}
columns={abnormalColumns}
// onOk={this.handleOk}
loading={inspectLoading}
/>
)}
</WeaTop>
</WeaRightMenu>
</div>
)
);
}
}

View File

@ -0,0 +1,29 @@
.standingbookWrapper {
.wea-new-top-content {
padding: 0 16px;
.wea-new-table {
.ant-table-row:hover {
.more {
display: inline-block;
}
}
.linkTo {
text-decoration: none;
color: #4d7ad8;
}
.more {
margin-left: 8px;
cursor: pointer;
display: none;
}
}
}
.billDateWrapper {
display: flex;
align-items: center;
height: 46px;
.to {
padding: 0 8px;
}
}
}

View File

@ -0,0 +1,86 @@
/*
* Author: 黎永顺
* Description: 异常列表
* Date: 2022-04-20 21:00:54
* LastEditTime: 2022-04-21 17:43:31
*/
import React, { Component } from "react";
import { Icon, Tooltip, Button } from "antd";
import { inject, observer } from "mobx-react";
import { WeaInputSearch, WeaTable } from "ecCom";
import "./index.less";
@inject("standingBookStore")
@observer
export default class AbnormalListIndex extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys: [],
tableData: {
list: [],
columns: [],
total: 0,
},
};
}
componentDidMount() {
const { billMonth } = this.props;
this.getChangeList({ billMonth });
}
getChangeList = (payload = {}) => {
const { getChangeList, tableStore } = this.props.standingBookStore;
getChangeList({ ...payload }).then(({ list, total }) => {
this.setState({
tableData: {
list,
total,
},
});
});
};
render() {
const { remarks, billMonth, selectedKey } = this.props;
const { selectedRowKeys } = this.state;
const { loading, tableStore } = this.props.standingBookStore;
const columns = _.map(
_.filter(tableStore.columns, (it) => it.hide && it.hide === "false"),
(item) => ({ ...item, width: item.oldWidth })
);
let { list, total } = this.state.tableData;
return (
<div className="normalWapper">
<div className="topContent">
<div className="month">
<span>
账单月份
<Tooltip
placement="topLeft"
title="提示:列表显示未维护缴纳起始月的账单月入职人员(不在系统缴纳范围内,可添加到缴纳范围)和有缴纳起始月未维护缴纳最后月的账单月离职人员(在系统缴纳范围内,可从缴纳范围移除)。">
<Icon type="question-circle" />
</Tooltip>
</span>
<span>{billMonth}</span>
</div>
</div>
<div className="tabOption">
<Button>导出全部</Button>
<WeaInputSearch placeholder={"请输入姓名"} />
</div>
{/* table */}
<div style={{ padding: "0 16px" }}>
<WeaTable
rowKey="id"
columns={columns}
dataSource={list}
loading={loading}
pagination={{ total }}
scroll={{ x: 1200 }}
/>
</div>
</div>
);
}
}

View File

@ -0,0 +1,71 @@
/*
* Author: 黎永顺
* Description: 添加弹框
* Date: 2022-04-21 19:59:45
* LastEditTime: 2022-04-21 20:14:23
*/
import React, { Component } from "react";
import { Button, Form, Input } from "antd";
import { WeaDatePicker, WeaDialog } from "ecCom";
const createForm = Form.create;
const FormItem = Form.Item;
class Accountdialog extends Component {
constructor(props) {
super(props);
this.state = {};
}
handleSubmit = (e) => {
const { onOk } = this.props;
e.preventDefault();
this.props.form.validateFields((errors, values) => {
if (!!errors) {
return;
}
onOk(values);
});
};
render() {
const { getFieldProps } = this.props.form;
const formItemLayout = {
labelCol: { span: 7 },
wrapperCol: { span: 12 },
};
return (
<WeaDialog
{...this.props}
style={{ maxHeight: 400 }}
buttons={[
<Button
type="primary"
onClick={this.handleSubmit}
loading={this.props.loading}>
保存并进入核算
</Button>,
]}>
<Form horizontal form={this.props.form} style={{ marginTop: 16 }}>
<FormItem {...formItemLayout} label="账单月份" required>
<WeaDatePicker
style={{ width: "100%" }}
format="YYYY-MM"
{...getFieldProps("billMonth", {
initialValue: new Date(),
rules: [{ required: true, message: "请选择日期" }],
})}
/>
</FormItem>
<FormItem {...formItemLayout} label="备注">
<Input
type="textarea"
{...getFieldProps("remarks", { initialValue: "" })}
/>
</FormItem>
</Form>
</WeaDialog>
);
}
}
export default createForm()(Accountdialog);

View File

@ -0,0 +1,33 @@
.normalWapper {
.topContent {
padding: 8px 20px;
display: flex;
align-items: center;
.month {
margin-right: 26px;
span:first-child {
margin-right: 8px;
}
i {
color: #666;
margin-left: 8px;
}
}
}
.tabOption {
display: flex;
align-items: center;
padding: 8px 20px;
justify-content: flex-end;
i,
button {
cursor: pointer;
margin-right: 10px;
}
}
}

View File

@ -0,0 +1,335 @@
/*
* Author: 黎永顺
* Description: 正常缴纳月份
* Date: 2022-04-20 08:56:08
* LastEditTime: 2022-04-22 14:05:50
*/
import React, { Component } from "react";
import { Icon, Tooltip, Button, message, Modal } from "antd";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaInputSearch, WeaTable, WeaPopoverHrm, WeaDialog } from "ecCom";
import { getSearchs } from "../../../../util";
import _ from "lodash";
import "./index.less";
@inject("standingBookStore")
@observer
export default class NormalIndex extends Component {
constructor(props) {
super(props);
this.state = {
date: "",
selectedRowKeys: [],
addProps: {
title: "",
visible: false,
},
tableData: {
list: [],
columns: [],
total: 0,
},
};
}
componentDidMount() {
const { billMonth, selectedKey } = this.props;
selectedKey === "1"
? this.getNormalList({ billMonth })
: this.getSupplementaryList({ billMonth });
}
componentWillReceiveProps(nextProps) {
if (nextProps.selectedKey != this.props.selectedKey) {
const { billMonth } = nextProps;
nextProps.selectedKey === "1"
? this.getNormalList({ billMonth })
: this.getSupplementaryList({ billMonth });
}
}
handleSave = () => {
const { siaccountCommonSave, siaccountSupplementarySave, form } =
this.props.standingBookStore;
const { billMonth, selectedKey } = this.props;
if (selectedKey === "1") {
const { includes } = form.getFormParams();
const payload = {
billMonth,
includes: includes.split(","),
};
siaccountCommonSave(payload).then(() => {
message.success("添加成功");
this.getNormalList({ billMonth });
this.setState({
addProps: {
...this.state.addProps,
title: "",
visible: false,
},
});
});
} else {
form.validateForm().then((f) => {
if (f.isValid) {
const {
includes,
billMonth: billMonthList,
excludes,
projects,
} = form.getFormParams();
const payload = {
billMonth,
billMonthList: billMonthList.split(","),
includes: includes.split(","),
excludes: excludes.split(","),
projects: projects.split(","),
};
siaccountSupplementarySave(payload).then(() => {
message.success("添加成功");
this.getSupplementaryList({ billMonth });
this.setState({
addProps: {
...this.state.addProps,
title: "",
visible: false,
},
});
});
} else {
f.showErrors();
this.setState({ date: new Date() }); // 改变一个state的变量,强制页面刷新
}
});
}
};
getNormalList = (payload = {}) => {
const { getNormalList } = this.props.standingBookStore;
getNormalList({ ...payload }).then(({ list, columns = [], total }) => {
columns = _.map(
_.filter(columns, (it) => it.dataIndex !== "id"),
(it) => {
if (it.dataIndex === "employeeId") {
it = {
...it,
width: 150,
fixed: "left",
render: (text, r) => {
const { userName, employeeId } = r;
return (
<WeaPopoverHrm>
<a
href={`javaScript:openhrm(${employeeId});`}
onClick={(e) => window.pointerXY(e)}
title={userName}>
{userName}
</a>
</WeaPopoverHrm>
);
},
};
}
return {
...it,
title: <span dangerouslySetInnerHTML={{ __html: it.title }}></span>,
width: 150,
};
}
);
this.setState({
tableData: {
list,
columns,
total,
},
});
});
};
getSupplementaryList = (payload = {}) => {
const { getSupplementaryList } = this.props.standingBookStore;
getSupplementaryList({ ...payload }).then(
({ list, columns = [], total }) => {
columns = _.map(
_.filter(columns, (it) => it.dataIndex !== "id"),
(it) => {
if (it.dataIndex === "employeeId") {
it = {
...it,
width: 150,
fixed: "left",
render: (text, r) => {
const { userName, employeeId } = r;
return (
<WeaPopoverHrm>
<a
href={`javaScript:openhrm(${employeeId});`}
onClick={(e) => window.pointerXY(e)}
title={userName}>
{userName}
</a>
</WeaPopoverHrm>
);
},
};
}
return {
...it,
title: (
<span dangerouslySetInnerHTML={{ __html: it.title }}></span>
),
width: 150,
};
}
);
this.setState({
tableData: {
list,
columns,
total,
},
});
}
);
};
onSelectChange = (selectedRowKeys) => {
this.setState({ selectedRowKeys });
};
handleBatchDelete = () => {
const { siaccountCommonDelete } = this.props.standingBookStore;
const { list } = this.state.tableData;
const { selectedRowKeys } = this.state;
const { billMonth, selectedKey } = this.props;
if (_.isEmpty(selectedRowKeys)) {
message.warning("未勾选数据!");
} else {
const includes = _.map(
_.filter(list, (it) => selectedRowKeys.includes(it.id)),
(item) => item.employeeId
);
Modal.confirm({
title: "确认信息",
content: "确认删除勾选的数据吗?",
onOk: () => {
siaccountCommonDelete({ billMonth, includes }).then(() => {
message.success("删除成功");
this.setState({ selectedRowKeys: [] });
selectedKey === "1"
? this.getNormalList({ billMonth })
: this.getSupplementaryList({ billMonth });
});
},
onCancel: () => {},
});
}
};
handleAdd = () => {
const { siaccountCommonForm, querySupplementaryForm } =
this.props.standingBookStore;
const { billMonth, selectedKey } = this.props;
if (selectedKey === "1") {
siaccountCommonForm();
} else {
querySupplementaryForm();
}
this.setState({
addProps: {
...this.state.addProps,
title: "添加缴纳人员",
visible: true,
},
});
};
render() {
const { remarks, billMonth, selectedKey } = this.props;
const { selectedRowKeys, addProps, date } = this.state;
const { loading, form, condition, saveLoading } =
this.props.standingBookStore;
let { list, columns, total } = this.state.tableData;
const rowSelection = {
selectedRowKeys,
onChange: this.onSelectChange,
};
return (
<div className="normalWapper">
{selectedKey === "1" && (
<div className="topContent">
<div className="month">
<span>
账单月份
<Tooltip
placement="topLeft"
title="提示:正常缴纳,账单月份即社保福利缴纳月份">
<Icon type="question-circle" />
</Tooltip>
</span>
<span>{billMonth}</span>
</div>
<div>
<span>备注</span>
<span>{remarks}</span>
</div>
</div>
)}
<div className="tabOption">
<Tooltip title="批量删除">
<i
className="icon-coms-Batch-delete"
onClick={this.handleBatchDelete}
/>
</Tooltip>
<Tooltip title="添加该月正常缴纳人员">
<i className="icon-coms-Add-to" onClick={this.handleAdd} />
</Tooltip>
{addProps.visible && (
<WeaDialog
{...addProps}
onCancel={() =>
this.setState({
addProps: {
...addProps,
title: "",
visible: false,
},
})
}
buttons={[
<Button
type="primary"
onClick={this.handleSave}
loading={saveLoading}>
保存
</Button>,
<Button onClick={() => form.resetForm()}>重置</Button>,
]}>
{getSearchs(form, toJS(condition), 1)}
</WeaDialog>
)}
{selectedKey === "3" && (
<Tooltip title="导入">
<i className="icon-coms02-Import" />
</Tooltip>
)}
<Tooltip title="导出全部">
<i className="icon-coms02-coms2-export" />
</Tooltip>
{selectedKey === "1" && <Button type="primary">核算</Button>}
<WeaInputSearch placeholder={"请输入姓名"} />
</div>
{/* table */}
<div style={{ padding: "0 16px" }}>
<WeaTable
rowKey="id"
columns={columns}
dataSource={list}
loading={loading}
pagination={{ total }}
rowSelection={rowSelection}
scroll={{ x: 1200 }}
/>
</div>
</div>
);
}
}

View File

@ -0,0 +1,99 @@
/*
* Author: 黎永顺
* Description: 总览
* Date: 2022-04-20 20:49:23
* LastEditTime: 2022-04-20 21:36:46
*/
/*
* Author: 黎永顺
* Description: 总览月份
* Date: 2022-04-20 08:56:08
* LastEditTime: 2022-04-20 20:45:54
*/
import React, { Component } from 'react';
import { Icon, Tooltip, Button } from 'antd';
import { inject, observer } from 'mobx-react';
import { WeaInputSearch, WeaTable } from 'ecCom';
import './index.less';
@inject('standingBookStore')
@observer
export default class OverViewIndex extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys: [],
tableData: {
list: [], columns: [], total: 0
}
}
}
componentDidMount() {
const { billMonth } = this.props;
this.getOverViewList({ billMonth })
}
getOverViewList = (payload = {}) => {
const { getOverViewList } = this.props.standingBookStore;
getOverViewList({ ...payload }).then(({ list, columns = [], total }) => {
columns = _.map(_.filter(columns, it => it.dataIndex !== 'id'), it => {
// if (it.dataIndex === "employeeId") {
// it = {
// ...it,
// width: 150,
// fixed: 'left'
// }
// }
return {
...it,
title: <span dangerouslySetInnerHTML={{ __html: it.title }}></span>,
}
})
this.setState({
tableData: {
list,
columns,
total
}
})
})
}
render() {
const { remarks, billMonth, selectedKey } = this.props;
const { selectedRowKeys } = this.state;
const { loading } = this.props.standingBookStore;
let { list, columns, total } = this.state.tableData;
return (
<div className='normalWapper'>
<div className='topContent'>
<div className='month'>
<span>
账单月份
<Tooltip placement="topLeft" title='提示:正常缴纳,账单月份即社保福利缴纳月份'>
<Icon type="question-circle" />
</Tooltip>
</span>
<span>{billMonth}</span>
</div>
</div>
<div className='tabOption'>
<Button>导出全部</Button>
</div>
{/* table */}
<div style={{ padding: '0 16px' }}>
<WeaTable
rowKey='id'
columns={columns}
dataSource={list}
loading={loading}
pagination={{ total }}
scroll={{ x: 1200 }}
/>
</div>
</div>
)
}
}

View File

@ -0,0 +1,32 @@
export const unArchiveTabs = [
{
title: "正常缴纳",
viewcondition: "NORMAL",
},
{
title: "异动清单",
viewcondition: "LIST",
},
{
title: "补缴",
viewcondition: "PAY",
},
{
title: "总览",
viewcondition: "OVERVIEW",
},
];
export const archiveTabs = [
{
title: "正常缴纳",
viewcondition: "NORMAL",
},
{
title: "补缴",
viewcondition: "PAY",
},
{
title: "总览",
viewcondition: "OVERVIEW",
},
];

View File

@ -0,0 +1,75 @@
/*
* Author: 黎永顺
* Description: 台账详情
* Date: 2022-04-19 16:57:29
* LastEditTime: 2022-04-20 21:01:57
*/
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import { WeaTab } from 'ecCom';
import NormalIndex from './components/normal';
import OverViewIndex from './components/overView';
import AbnormalListIndex from './components/abnormalList';
import _ from 'lodash';
@inject('standingBookStore')
@observer
class StandingBookDetail extends Component {
constructor(props) {
super(props);
this.state = {
selectedKey: '',
tabList: [],
remarks: '',
billMonth: ''
}
}
componentDidMount() {
this.getTabList();
}
getTabList = (payload = {}) => {
const { getTabList } = this.props.standingBookStore;
const billMonth = this.props.location.query.billMonth;
getTabList({ billMonth }).then(({ data }) => {
const { tabList, remarks, billMonth } = data;
this.setState({
selectedKey: tabList[0].id,
tabList: _.map(tabList, it => ({ title: it.content, viewcondition: it.id })),
remarks, billMonth
});
})
}
render() {
const { selectedKey, tabList, remarks, billMonth } = this.state;
return (
<div className="standingBookDetailWapper">
<WeaTab
datas={tabList}
keyParam="viewcondition" //主键
selectedKey={selectedKey}
onChange={(selectedKey) => {
this.setState({ selectedKey })
}}
/>
{
(selectedKey === '1' || selectedKey === '3') &&
<NormalIndex selectedKey={selectedKey} remarks={remarks} billMonth={billMonth} />
}
{
selectedKey === '2' &&
<AbnormalListIndex billMonth={billMonth} />
}
{
selectedKey === '4' &&
<OverViewIndex billMonth={billMonth} />
}
</div>
);
}
}
export default StandingBookDetail;

View File

@ -0,0 +1,349 @@
import { observable, action, toJS } from "mobx";
import { message } from "antd";
import { WeaForm, WeaTableNew } from "comsMobx";
import _ from "lodash";
import * as API from "../apis/standingBook"; // 引入API接口文件
const { TableStore } = WeaTableNew;
export class StandingBookStore {
@observable tableStore = new TableStore(); // new table
@observable form = new WeaForm(); // nrew 一个form
@observable condition = []; // 存储后台得到的form数据
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示
@observable loading = false; // 数据加载状态
@observable inspectLoading = false; // 核算异常列表加载loading
@observable saveLoading = false; // 添加正常缴纳人员loading
@observable deleteLoading = false; // 删除月份表单loading
// 初始化操作
@action
doInit = () => {
// this.getCondition();
// this.getTableDatas();
};
// 社会福利台账-获取正常缴纳列表
@action
getCommonList = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.getCommonList(params).then(
action(({ data, status }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
const {
pageInfo: { list, columns, total },
} = data;
resolve({ list, columns, total });
} else {
message.error("接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-获取正常缴纳列表
@action
getNormalList = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.getNormalList(params).then(
action(({ data, status }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
const {
pageInfo: { list, columns, total },
} = data;
resolve({ list, columns, total });
} else {
message.error("接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-获取补缴列表
@action
getSupplementaryList = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.getSupplementaryList(params).then(
action(({ data, status }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
const {
pageInfo: { list, columns, total },
} = data;
resolve({ list, columns, total });
} else {
message.error("接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-获取总览列表
@action
getOverViewList = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.getOverViewList(params).then(
action(({ data, status }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
const { list, columns, total } = data;
resolve({ list, columns, total });
} else {
message.error("接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-获取异动列表
@action
getChangeList = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.getChangeList(params).then(
action(({ data, status }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
const {
dataKey: { datas },
pageInfo: { list, total },
} = data;
this.tableStore.getDatas(datas);
resolve({ list, total });
} else {
message.error("接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-获取正tab列表
@action
getTabList = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.getTabList(params).then(
action(({ data, status }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
resolve({ data });
} else {
message.error("接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-保存并进入核算
@action
save = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.save(params).then(
action(({ data, status, errormsg }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
resolve({ data });
} else {
message.error(errormsg || "接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-归档
@action
siaccountFile = (params) => {
this.loading = true;
return new Promise((resolve, reject) => {
API.siaccountFile(params).then(
action(({ data, status, errormsg }) => {
this.loading = false;
if (status) {
// 接口请求成功/失败处理
resolve({ data });
} else {
message.error(errormsg || "接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-删除正常缴纳人员
@action
siaccountCommonDelete = (params) => {
return new Promise((resolve, reject) => {
API.siaccountCommonDelete(params).then(
action(({ data, status, errormsg }) => {
if (status) {
// 接口请求成功/失败处理
resolve({ data });
} else {
message.error(errormsg || "接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-核算异常列表
@action
inspectList = (params) => {
this.inspectLoading = true;
return new Promise((resolve, reject) => {
API.inspectList(params).then(
action(({ data, status, errormsg }) => {
this.inspectLoading = false;
if (status) {
// 接口请求成功/失败处理
const {
dataKey: { datas },
pageInfo: { list, total },
} = data;
this.tableStore.getDatas(datas);
resolve({ list, total });
} else {
message.error(errormsg || "接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-添加正常缴纳人员
@action
siaccountCommonSave = (params) => {
this.saveLoading = true;
return new Promise((resolve, reject) => {
API.siaccountCommonSave(params).then(
action(({ data, status, errormsg }) => {
this.saveLoading = false;
if (status) {
resolve({ data });
} else {
message.error(errormsg || "接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-添加补缴人员
@action
siaccountSupplementarySave = (params) => {
this.saveLoading = true;
return new Promise((resolve, reject) => {
API.siaccountSupplementarySave(params).then(
action(({ data, status, errormsg }) => {
this.saveLoading = false;
if (status) {
resolve({ data });
} else {
message.error(errormsg || "接口调用失败!");
reject();
}
})
);
});
};
// 社会福利台账-删除月份表单
@action
siaccountDelete = (params) => {
this.deleteLoading = true;
return new Promise((resolve, reject) => {
API.siaccountDelete(params).then(
action(({ data, status, errormsg }) => {
this.deleteLoading = false;
if (status) {
resolve({ data });
} else {
message.error(errormsg || "接口调用失败!");
reject();
}
})
);
});
};
// 获得高级搜索表单数据
@action
siaccountCommonForm = () => {
API.siaccountCommonForm().then(
action((res) => {
if (res.status) {
// 接口请求成功/失败处理
this.condition = res.data.condition;
this.form.initFormFields(res.data.condition); // 渲染高级搜索form表单
} else {
message.error(res.msg || "接口调用失败!");
}
})
);
};
// 补缴添加缴纳人员表单
@action
querySupplementaryForm = () => {
API.querySupplementaryForm().then(
action((res) => {
if (res.status) {
// 接口请求成功/失败处理
this.condition = res.data.condition;
this.form.initFormFields(res.data.condition); // 渲染高级搜索form表单
} else {
message.error(res.msg || "接口调用失败!");
}
})
);
};
// 渲染table数据
@action
getTableDatas = (params) => {
this.loading = true;
const formParams = this.form.getFormParams() || {};
params = params || formParams;
API.getTableDatas(params).then(
action((res) => {
if (res.api_status) {
// 接口请求成功/失败处理
this.tableStore.getDatas(res.datas); // table 请求数据
this.hasRight = res.hasRight;
} else {
message.error(res.msg || "接口调用失败!");
}
this.loading = false;
})
);
};
@action
setShowSearchAd = (bool) => (this.showSearchAd = bool);
// 高级搜索 - 搜索
@action doSearch = () => {
this.getTableDatas();
this.showSearchAd = false;
};
}

View File

@ -1,21 +1,21 @@
import { BaseTableStore } from './baseTable';
import { MySalaryStore } from'./mySalary';
import { TaxAgentStore } from './taxAgent';
import { BaseFormStore } from './baseForm';
import { taxRateStore } from './taxRate';
import { CumDeductStore } from "./cumDeduct"
import { OtherDeductStore } from "./otherDeduct"
import { CumSituationStore } from './cumSituation'
import { ProgrammeStore } from './programme'
import { AttendanceStore } from './attendanceStore';
import { SalaryItemStore } from './salaryItem'
import { LedgerStore } from './ledger'
import { ArchivesStore } from './archives'
import { salaryFileStore } from './salaryFile';
import { payrollStore } from './payroll';
import { calculateStore } from './calculate';
import { DeclareStore } from './declare';
import { BaseTableStore } from "./baseTable";
import { MySalaryStore } from "./mySalary";
import { TaxAgentStore } from "./taxAgent";
import { BaseFormStore } from "./baseForm";
import { taxRateStore } from "./taxRate";
import { CumDeductStore } from "./cumDeduct";
import { OtherDeductStore } from "./otherDeduct";
import { CumSituationStore } from "./cumSituation";
import { ProgrammeStore } from "./programme";
import { AttendanceStore } from "./attendanceStore";
import { SalaryItemStore } from "./salaryItem";
import { LedgerStore } from "./ledger";
import { ArchivesStore } from "./archives";
import { salaryFileStore } from "./salaryFile";
import { payrollStore } from "./payroll";
import { calculateStore } from "./calculate";
import { DeclareStore } from "./declare";
import { StandingBookStore } from "./StandingBook";
module.exports = {
baseFormStore: new BaseFormStore(),
@ -34,6 +34,6 @@ module.exports = {
salaryFileStore: new salaryFileStore(),
payrollStore: new payrollStore(),
calculateStore: new calculateStore(),
declareStore: new DeclareStore()
declareStore: new DeclareStore(),
standingBookStore: new StandingBookStore(),
};