薪资发放页面添加进度条弹框组件
This commit is contained in:
parent
c6d9082986
commit
134653fac6
|
|
@ -171,6 +171,18 @@ export const commonAccount = (params) => {
|
|||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
// 社保福利台账重新核算
|
||||
export const socialSecurityBenefitsRecalculate = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/siaccount/socialSecurityBenefitsRecalculate", {
|
||||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
||||
// 获取当前管理员下的所有的个税扣缴义务人
|
||||
export const getAdminTaxAgentList = () => {
|
||||
|
|
@ -179,4 +191,4 @@ export const getAdminTaxAgentList = () => {
|
|||
"get",
|
||||
{}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,21 @@
|
|||
import React from 'react'
|
||||
import { Modal } from 'antd'
|
||||
import { WeaProgress } from 'ecCom'
|
||||
import React from "react";
|
||||
import { Modal } from "antd";
|
||||
import { WeaProgress } from "ecCom";
|
||||
|
||||
export default class ProgressModal extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Modal title="正在核算请稍后" style={{top: 20}} visible={this.props.visible} width={this.props.width ? this.props.width: 600} onCancel={() => {this.props.onCancel()}} footer={null}>
|
||||
<div>
|
||||
<WeaProgress percent={this.props.progress ? this.props.progress : 0} strokeColor={this.props.color ? this.props.color: "#B37BFA"} />
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Modal title="正在核算请稍后" style={{ top: 20 }} visible={this.props.visible}
|
||||
width={this.props.width ? this.props.width : 600} onCancel={() => {
|
||||
this.props.onCancel();
|
||||
}} footer={null}>
|
||||
<div>
|
||||
<WeaProgress percent={this.props.progress ? this.props.progress : 0}
|
||||
strokeColor={this.props.color ? this.props.color : "#B37BFA"}/>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ export default class SlideModalTitle extends React.Component {
|
|||
<div className="btnWrapper">
|
||||
{this.props.btns}
|
||||
{
|
||||
this.props.showOperateBtn && this.state.editable && <Button type="primary" className="saveBtn" onClick={this.props.onSave}>保存</Button>
|
||||
this.props.showOperateBtn && this.state.editable && this.props.selectedTab != 1 && <Button type="primary" className="saveBtn" onClick={this.props.onSave}>保存</Button>
|
||||
}
|
||||
{this.props.customOperate}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,38 +1,19 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
|
||||
import {
|
||||
Button,
|
||||
Table,
|
||||
DatePicker,
|
||||
Dropdown,
|
||||
Menu,
|
||||
Modal,
|
||||
message
|
||||
} from "antd";
|
||||
import { Button, DatePicker, Dropdown, Menu, Modal } from "antd";
|
||||
|
||||
import {
|
||||
WeaTop,
|
||||
WeaTab,
|
||||
WeaRightMenu,
|
||||
WeaRangePicker,
|
||||
WeaTable,
|
||||
WeaDatePicker,
|
||||
WeaInputSearch
|
||||
} from "ecCom";
|
||||
import { WeaInputSearch, WeaRightMenu, WeaTop } from "ecCom";
|
||||
|
||||
import { renderNoright, getSearchs } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
import ContentWrapper from "../../components/contentWrapper";
|
||||
|
||||
import { columns, dataSource } from "./columns";
|
||||
import { columns } from "./columns";
|
||||
import moment from "moment";
|
||||
import BaseFormModal from "./baseFormModal";
|
||||
import CustomTable from "../../components/customTable";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -43,10 +24,7 @@ export default class Calculate extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
searchValue: "",
|
||||
startDate: moment(new Date())
|
||||
.subtract(5, "months")
|
||||
.startOf("month")
|
||||
.format("YYYY-MM"),
|
||||
startDate: moment(new Date()).startOf("year").format("YYYY-MM"),
|
||||
endDate: moment(new Date()).startOf("month").format("YYYY-MM"),
|
||||
current: 1,
|
||||
columns: columns.map(item => {
|
||||
|
|
@ -93,45 +71,25 @@ export default class Calculate extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
handleRangePickerChange(value) {
|
||||
const isNil = _.every(value, it => !_.isNil(it));
|
||||
let range = isNil && value.map(item => moment(item).format("YYYY-MM"));
|
||||
handleRangePickerChange(type, value) {
|
||||
const { calculateStore: { getSalaryAcctList } } = this.props;
|
||||
if (isNil && !_.isEmpty(value)) {
|
||||
this.setState(
|
||||
{
|
||||
startDate: range[0],
|
||||
endDate: range[1]
|
||||
},
|
||||
() => {
|
||||
getSalaryAcctList({
|
||||
name: this.state.searchValue,
|
||||
startMonthStr: range[0],
|
||||
endMonthStr: range[1]
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this.setState(
|
||||
{
|
||||
startDate: moment(new Date())
|
||||
.subtract(5, "months")
|
||||
.startOf("month")
|
||||
.format("YYYY-MM"),
|
||||
endDate: moment(new Date()).startOf("month").format("YYYY-MM")
|
||||
},
|
||||
() => {
|
||||
message.error("目前可查询的最大时间范围为6个月 请重新选择");
|
||||
}
|
||||
);
|
||||
}
|
||||
this.setState({
|
||||
[type]: value ? moment(value).format("YYYY-MM") : moment().format("YYYY-MM")
|
||||
}, () => {
|
||||
const { startDate: startMonthStr, endDate: endMonthStr } = this.state;
|
||||
getSalaryAcctList({
|
||||
name: this.state.searchValue,
|
||||
startMonthStr,
|
||||
endMonthStr
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 列表项核算回调
|
||||
handleAccount(record) {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetail?id=" +
|
||||
record.id
|
||||
record.id
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -146,7 +104,8 @@ export default class Calculate extends React.Component {
|
|||
this.handleSearch(this.state.searchValue);
|
||||
});
|
||||
},
|
||||
onCancel: () => {}
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +129,7 @@ export default class Calculate extends React.Component {
|
|||
handleDetail(record) {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/placeOnFileDetail?id=" +
|
||||
record.id
|
||||
record.id
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +268,7 @@ export default class Calculate extends React.Component {
|
|||
// 右键菜单
|
||||
{
|
||||
key: "BTN_COLUMN",
|
||||
icon: <i className="icon-coms-Custom" />,
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: "显示列定制",
|
||||
onClick: this.showColumn
|
||||
}
|
||||
|
|
@ -335,12 +294,6 @@ export default class Calculate extends React.Component {
|
|||
</Button>
|
||||
];
|
||||
|
||||
const topTab = [];
|
||||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div />;
|
||||
};
|
||||
|
||||
const renderRightOperation = () => {
|
||||
const { startDate, endDate } = this.state;
|
||||
return (
|
||||
|
|
@ -357,11 +310,22 @@ export default class Calculate extends React.Component {
|
|||
</Button>}
|
||||
<div
|
||||
style={{ display: "inline-block", position: "relative", top: 2 }}>
|
||||
<RangePicker
|
||||
value={[this.state.startDate, this.state.endDate]}
|
||||
picker="month"
|
||||
format="yyyy-MM"
|
||||
onChange={value => this.handleRangePickerChange(value)}
|
||||
<MonthPicker
|
||||
value={startDate}
|
||||
format="YYYY-MM"
|
||||
disabledDate={(current) => {
|
||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||
}}
|
||||
onChange={(val) => this.handleRangePickerChange("startDate", val)}
|
||||
/>
|
||||
<span className="to" style={{ margin: "0 10px" }}>至</span>
|
||||
<MonthPicker
|
||||
value={endDate}
|
||||
format="YYYY-MM"
|
||||
disabledDate={(current) => {
|
||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
||||
}}
|
||||
onChange={(val) => this.handleRangePickerChange("endDate", val)}
|
||||
/>
|
||||
</div>
|
||||
<WeaInputSearch
|
||||
|
|
@ -386,7 +350,7 @@ export default class Calculate extends React.Component {
|
|||
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
|
||||
<WeaTop
|
||||
title="薪资核算" // 文字
|
||||
icon={<i className="icon-coms-meeting" />} // 左侧图标
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
@ -394,7 +358,8 @@ export default class Calculate extends React.Component {
|
|||
{/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */}
|
||||
<CustomTab
|
||||
searchOperationItem={renderRightOperation()}
|
||||
onChange={v => {}}
|
||||
onChange={v => {
|
||||
}}
|
||||
/>
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
|
|
|
|||
|
|
@ -1,45 +1,18 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
|
||||
import {
|
||||
Button,
|
||||
Table,
|
||||
DatePicker,
|
||||
Row,
|
||||
Col,
|
||||
Menu,
|
||||
Dropdown,
|
||||
Switch,
|
||||
Select,
|
||||
message,
|
||||
Modal
|
||||
} from "antd";
|
||||
import { Button, Col, DatePicker, Dropdown, Menu, message, Modal, Row, Select, Switch } from "antd";
|
||||
|
||||
import {
|
||||
WeaInputSearch,
|
||||
WeaSlideModal,
|
||||
WeaHelpfulTip,
|
||||
WeaCheckbox,
|
||||
WeaDatePicker,
|
||||
WeaTop,
|
||||
WeaTab,
|
||||
WeaRightMenu,
|
||||
WeaRangePicker,
|
||||
WeaSelect,
|
||||
WeaTable
|
||||
} from "ecCom";
|
||||
import { WeaDatePicker, WeaInputSearch, WeaRightMenu, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import moment from "moment";
|
||||
import { renderNoright, getSearchs } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../../components/customTab";
|
||||
import ContentWrapper from "../../../components/contentWrapper";
|
||||
|
||||
import { columns, dataSource, tab2Columns, slideDataSource } from "./columns";
|
||||
import MonthRange from "../../../components/monthRange";
|
||||
import { columns } from "./columns";
|
||||
import ImportModal from "../../../components/importModal";
|
||||
import HeaderSet from "../../../components/importModal/headerSet";
|
||||
import SelectItemModal, { items } from "../../../components/selectItemsModal";
|
||||
import SelectItemModal from "../../../components/selectItemsModal";
|
||||
import RefereAttendFormModal from "./refereAttendFormModal";
|
||||
import SelectItemsWrapper from "../../../components/selectItemsModal/selectItemsWrapper";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
|
|
@ -47,10 +20,9 @@ import EditSlideContent from "./editSlideContent";
|
|||
import TwoColContent from "../../../components/twoColContent";
|
||||
import TipLabel from "../../../components/TipLabel";
|
||||
import ItemMangeFormModal from "./itemMangeFormModal";
|
||||
import CustomTable from "../../../components/customTable";
|
||||
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
const { Option } = Select;
|
||||
|
||||
@inject("attendanceStore", "taxAgentStore")
|
||||
|
|
@ -97,7 +69,10 @@ export default class Attendance extends React.Component {
|
|||
inited: false
|
||||
};
|
||||
this.fieldSearch = {};
|
||||
this.listSearch = {};
|
||||
this.listSearch = {
|
||||
salaryYearMonth: [moment(new Date()).startOf("year").format("YYYY-MM"), moment(new Date()).startOf("month").format("YYYY-MM")],
|
||||
current: 1
|
||||
};
|
||||
this.recordId = ""; // 考勤数据列表查看选择项
|
||||
this.salaryYearMonth = ""; // 考勤数据查看,当前数据的薪资所属月
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
|
|
@ -235,14 +210,15 @@ export default class Attendance extends React.Component {
|
|||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {}
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
}}>
|
||||
<Menu.Item key="1">删除</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a className="ant-dropdown-link" href="javaScript:void(0);">
|
||||
<i className="icon-coms-more" style={{ marginLeft: 18 }} />
|
||||
<i className="icon-coms-more" style={{ marginLeft: 18 }}/>
|
||||
</a>
|
||||
</Dropdown>}
|
||||
</div>
|
||||
|
|
@ -308,6 +284,14 @@ export default class Attendance extends React.Component {
|
|||
window.open(url, "_self");
|
||||
};
|
||||
|
||||
handleChangeMonth = (type, val) => {
|
||||
const { attendanceStore: { getAttendanceList } } = this.props;
|
||||
this.listSearch.salaryYearMonth[type] = val && moment(val).format("YYYY-MM");
|
||||
!this.listSearch.salaryYearMonth[0] && (this.listSearch.salaryYearMonth[0] = moment(new Date()).startOf("year").format("YYYY-MM"));
|
||||
!this.listSearch.salaryYearMonth[1] && (this.listSearch.salaryYearMonth = this.listSearch.salaryYearMonth.filter(n => n));
|
||||
getAttendanceList(this.listSearch);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { attendanceStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { modalParam } = this.state;
|
||||
|
|
@ -381,18 +365,6 @@ export default class Attendance extends React.Component {
|
|||
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 topTab = [
|
||||
{
|
||||
|
|
@ -409,42 +381,46 @@ export default class Attendance extends React.Component {
|
|||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
return showOperateBtn
|
||||
? <div>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: "10px" }}
|
||||
onClick={() => {
|
||||
this.setState({ refereAttendFormVisible: true });
|
||||
}}>
|
||||
引用
|
||||
</Button>
|
||||
<Button
|
||||
type="default"
|
||||
onClick={() => {
|
||||
this.setState({ modalVisiable: true });
|
||||
setStep(0);
|
||||
}}>
|
||||
导入
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: "10px" }}
|
||||
onClick={() => {
|
||||
this.setState({ refereAttendFormVisible: true });
|
||||
}}>
|
||||
引用
|
||||
</Button>
|
||||
<Button
|
||||
type="default"
|
||||
onClick={() => {
|
||||
this.setState({ modalVisiable: true });
|
||||
setStep(0);
|
||||
}}>
|
||||
导入
|
||||
</Button>
|
||||
</div>
|
||||
: null;
|
||||
};
|
||||
|
||||
const renderLeftOperation = () => {
|
||||
const { attendanceStore: { getAttendanceList } } = this.props;
|
||||
return (
|
||||
<div style={{ marginLeft: "20px", marginTop: "10px" }}>
|
||||
薪资所属月:{" "}
|
||||
<RangePicker
|
||||
picker="month"
|
||||
format="yyyy-MM"
|
||||
onChange={range => {
|
||||
this.listSearch = {
|
||||
salaryYearMonth: range.map(item =>
|
||||
moment(item).format("YYYY-MM")
|
||||
)
|
||||
};
|
||||
getAttendanceList(this.listSearch);
|
||||
<div style={{ marginLeft: "20px", marginTop: "10px", display: "flex", alignItems: "center" }}>
|
||||
<span style={{ marginRight: 10 }}>薪资所属月:</span>
|
||||
<MonthPicker
|
||||
value={!_.isEmpty(this.listSearch.salaryYearMonth) ? this.listSearch.salaryYearMonth[0] : ""}
|
||||
disabledDate={(current) => {
|
||||
return current && this.listSearch.salaryYearMonth[1] && current.getTime() > new Date(this.listSearch.salaryYearMonth[1]).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => this.handleChangeMonth("0", val)}
|
||||
/>
|
||||
<span className="to" style={{ margin: "0 10px" }}>至</span>
|
||||
<MonthPicker
|
||||
value={!_.isEmpty(this.listSearch.salaryYearMonth) ? this.listSearch.salaryYearMonth[1] : ""}
|
||||
disabledDate={(current) => {
|
||||
return current && this.listSearch.salaryYearMonth[0] && current.getTime() < new Date(this.listSearch.salaryYearMonth[0]).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => this.handleChangeMonth("1", val)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -537,7 +513,7 @@ export default class Attendance extends React.Component {
|
|||
<Button type="primary" onClick={this.handleExportAttendQuote}>
|
||||
导出全部
|
||||
</Button>
|
||||
// <Dropdown.Button onClick={this.handleExportAttendQuote} overlay={menu} type="primary" visible={ false }>导出全部</Dropdown.Button>
|
||||
// <Dropdown.Button onClick={this.handleExportAttendQuote} overlay={menu} type="primary" visible={ false }>导出全部</Dropdown.Button>
|
||||
}
|
||||
<WeaInputSearch
|
||||
style={{ marginLeft: 10 }}
|
||||
|
|
@ -607,8 +583,10 @@ export default class Attendance extends React.Component {
|
|||
this.fieldSearch = { fieldName: this.state.fieldName };
|
||||
getAttendanceFieldList(this.fieldSearch);
|
||||
} else if (v == "0") {
|
||||
this.listSearch = {};
|
||||
getAttendanceList(this.listSearch);
|
||||
this.listSearch = {
|
||||
salaryYearMonth: []
|
||||
};
|
||||
getAttendanceList({});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -658,7 +636,7 @@ export default class Attendance extends React.Component {
|
|||
/>
|
||||
);
|
||||
default:
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }} />;
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||
}
|
||||
};
|
||||
return newColumn;
|
||||
|
|
@ -750,102 +728,86 @@ export default class Attendance extends React.Component {
|
|||
collectParams={collectParams}>
|
||||
<WeaTop
|
||||
title="考勤引用" // 文字
|
||||
icon={<i className="icon-coms-meeting" />} // 左侧图标
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
dropMenuProps={{ collectParams }}>
|
||||
{this.state.tabSelectedKey == 0
|
||||
? <div>
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={renderSearchOperationItem()}
|
||||
onChange={v => {
|
||||
handleTabChange(v);
|
||||
}}
|
||||
/>
|
||||
<CustomTab
|
||||
leftOperation={renderLeftOperation()}
|
||||
onChange={v => {}}
|
||||
/>
|
||||
{/* <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
comsWeaTableStore={attendTableStore} // table store
|
||||
hasOrder={true} // 是否启用排序
|
||||
needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
// getColumns={this.getColumns}
|
||||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={renderSearchOperationItem()}
|
||||
onChange={v => {
|
||||
handleTabChange(v);
|
||||
}}
|
||||
/>
|
||||
<CustomTab
|
||||
leftOperation={renderLeftOperation()}
|
||||
onChange={v => {
|
||||
}}
|
||||
/>
|
||||
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={this.getColumns(attendanceColumns)}
|
||||
dataSource={attendanceDataSource}
|
||||
total={attendancePageInfo.total}
|
||||
current={attendancePageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={value => {
|
||||
this.pageInfo.current = value;
|
||||
this.handleDataPageChange(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleDataShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={this.getColumns(attendanceColumns)}
|
||||
dataSource={attendanceDataSource}
|
||||
total={attendancePageInfo.total}
|
||||
current={attendancePageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={value => {
|
||||
this.pageInfo.current = value;
|
||||
this.handleDataPageChange(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleDataShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
: <div>
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={renderRightOperation()}
|
||||
onChange={v => {
|
||||
this.setState({
|
||||
tabSelectedKey: v
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<TwoColContent
|
||||
leftContent={
|
||||
// <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
// comsWeaTableStore={tableStore} // table store
|
||||
// hasOrder={true} // 是否启用排序
|
||||
// needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
|
||||
// getColumns={getFieldColumns}
|
||||
// onOperatesClick={this.onItemOperatesClick.bind(this)}
|
||||
// />
|
||||
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
dataSource={fieldDataSource}
|
||||
columns={getFieldColumns(
|
||||
fieldTableStore.columns ? fieldTableStore.columns : []
|
||||
)}
|
||||
total={fieldPageInfo.total}
|
||||
current={fieldPageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={value => {
|
||||
this.pageInfo.current = value;
|
||||
this.handleFieldPageChange(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleFieldShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
rightContent={
|
||||
<TipLabel
|
||||
tipList={[
|
||||
"1、考勤字段包含自定义字段和考勤模块的统计字段,所有字段不可重名;",
|
||||
"2、停用自定义字段将影响其参与计算的账套核算;"
|
||||
]}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={renderRightOperation()}
|
||||
onChange={v => {
|
||||
this.setState({
|
||||
tabSelectedKey: v
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<TwoColContent
|
||||
leftContent={
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
dataSource={fieldDataSource}
|
||||
columns={getFieldColumns(
|
||||
fieldTableStore.columns ? fieldTableStore.columns : []
|
||||
)}
|
||||
total={fieldPageInfo.total}
|
||||
current={fieldPageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={value => {
|
||||
this.pageInfo.current = value;
|
||||
this.handleFieldPageChange(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleFieldShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
rightContent={
|
||||
<TipLabel
|
||||
tipList={[
|
||||
"1、考勤字段包含自定义字段和考勤模块的统计字段,所有字段不可重名;",
|
||||
"2、停用自定义字段将影响其参与计算的账套核算;"
|
||||
]}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
{/* {this.state.modalVisiable && */}
|
||||
<ImportModal
|
||||
init={() => {
|
||||
this.handleInitImportModal();
|
||||
|
|
@ -875,7 +837,6 @@ export default class Attendance extends React.Component {
|
|||
this.handleFinish();
|
||||
}}
|
||||
/>
|
||||
{/* } */}
|
||||
|
||||
<SelectItemModal
|
||||
onRestoreDefault={() => {
|
||||
|
|
|
|||
|
|
@ -1,29 +1,19 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
|
||||
import { Button, Table, DatePicker } from "antd";
|
||||
import { Button, DatePicker } from "antd";
|
||||
|
||||
import {
|
||||
WeaTop,
|
||||
WeaTab,
|
||||
WeaRightMenu,
|
||||
WeaRangePicker,
|
||||
WeaTable,
|
||||
WeaDatePicker,
|
||||
} from "ecCom";
|
||||
import { WeaRightMenu, WeaTop } from "ecCom";
|
||||
|
||||
import { renderNoright, getSearchs } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
import ContentWrapper from "../../components/contentWrapper";
|
||||
import CustomTable from "../../components/customTable";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
|
||||
import { columns, dataSource } from "./columns";
|
||||
import { columns } from "./columns";
|
||||
import GenerateModal from "./generateModal";
|
||||
import moment from "moment";
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
@inject("declareStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -34,13 +24,10 @@ export default class Declare extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
declarationModalVisible: false,
|
||||
startDate: moment(new Date())
|
||||
.subtract(5, "months")
|
||||
.startOf("month")
|
||||
.format("YYYY-MM"),
|
||||
startDate: moment(new Date()).startOf("year").format("YYYY-MM"),
|
||||
endDate: moment(new Date())
|
||||
.startOf("month")
|
||||
.format("YYYY-MM"),
|
||||
.format("YYYY-MM")
|
||||
};
|
||||
this.searchParams = { current: 1 };
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
|
|
@ -52,7 +39,7 @@ export default class Declare extends React.Component {
|
|||
onClick={() => {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" +
|
||||
record.id
|
||||
record.id
|
||||
);
|
||||
}}>
|
||||
查看
|
||||
|
|
@ -66,32 +53,32 @@ export default class Declare extends React.Component {
|
|||
componentWillMount() {
|
||||
const {
|
||||
taxAgentStore: { getTaxAgentSelectListAsAdmin },
|
||||
declareStore: { getDeclareList },
|
||||
declareStore: { getDeclareList }
|
||||
} = this.props;
|
||||
this.searchParams = {
|
||||
fromSalaryMonthStr: this.state.startDate,
|
||||
endSalaryMonthStr: this.state.endDate,
|
||||
current: 1,
|
||||
current: 1
|
||||
};
|
||||
getDeclareList(this.searchParams);
|
||||
getTaxAgentSelectListAsAdmin();
|
||||
}
|
||||
|
||||
// 日期区间改变事件
|
||||
handleRangePickerChange(value) {
|
||||
let range = value.map((item) => moment(item).format("YYYY-MM"));
|
||||
handleRangePickerChange(type, value) {
|
||||
const {
|
||||
declareStore: { getDeclareList },
|
||||
declareStore: { getDeclareList }
|
||||
} = this.props;
|
||||
this.setState({
|
||||
startDate: range[0],
|
||||
endDate: range[1],
|
||||
});
|
||||
this.pageInfo.current = 1;
|
||||
getDeclareList({
|
||||
fromSalaryMonthStr: range[0],
|
||||
endSalaryMonthStr: range[1],
|
||||
...this.pageInfo,
|
||||
[type]: value ? moment(value).format("YYYY-MM") : moment().format("YYYY-MM")
|
||||
}, () => {
|
||||
this.pageInfo.current = 1;
|
||||
const { startDate: fromSalaryMonthStr, endDate: endSalaryMonthStr } = this.state;
|
||||
getDeclareList({
|
||||
fromSalaryMonthStr,
|
||||
endSalaryMonthStr,
|
||||
...this.pageInfo
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -103,7 +90,7 @@ export default class Declare extends React.Component {
|
|||
this.searchParams = {
|
||||
fromSalaryMonthStr: this.state.startDate,
|
||||
endSalaryMonthStr: this.state.endDate,
|
||||
current: 1,
|
||||
current: 1
|
||||
};
|
||||
getDeclareList(this.searchParams);
|
||||
});
|
||||
|
|
@ -111,7 +98,7 @@ export default class Declare extends React.Component {
|
|||
|
||||
getColumns() {
|
||||
const {
|
||||
declareStore: { listColumns },
|
||||
declareStore: { listColumns }
|
||||
} = this.props;
|
||||
let columns = [...listColumns];
|
||||
columns.push({
|
||||
|
|
@ -123,37 +110,37 @@ export default class Declare extends React.Component {
|
|||
onClick={() => {
|
||||
window.open(
|
||||
"/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=" +
|
||||
record.id
|
||||
record.id
|
||||
);
|
||||
}}>
|
||||
查看
|
||||
</a>
|
||||
);
|
||||
},
|
||||
}
|
||||
});
|
||||
return columns;
|
||||
}
|
||||
|
||||
handleDataPageChange(value) {
|
||||
const {
|
||||
declareStore: { getDeclareList },
|
||||
declareStore: { getDeclareList }
|
||||
} = this.props;
|
||||
this.searchParams = {
|
||||
fromSalaryMonthStr: this.state.startDate,
|
||||
endSalaryMonthStr: this.state.endDate,
|
||||
current: value,
|
||||
current: value
|
||||
};
|
||||
getDeclareList(this.searchParams);
|
||||
}
|
||||
|
||||
handleShowSizeChange(pageInfo) {
|
||||
const {
|
||||
declareStore: { getDeclareList },
|
||||
declareStore: { getDeclareList }
|
||||
} = this.props;
|
||||
this.searchParams = {
|
||||
fromSalaryMonthStr: this.state.startDate,
|
||||
endSalaryMonthStr: this.state.endDate,
|
||||
...pageInfo,
|
||||
...pageInfo
|
||||
};
|
||||
getDeclareList(this.searchParams);
|
||||
}
|
||||
|
|
@ -172,7 +159,7 @@ export default class Declare extends React.Component {
|
|||
setShowSearchAd,
|
||||
listDataSource,
|
||||
listColumns,
|
||||
pageInfo,
|
||||
pageInfo
|
||||
} = declareStore;
|
||||
|
||||
if (!hasRight && !loading) {
|
||||
|
|
@ -182,12 +169,12 @@ export default class Declare extends React.Component {
|
|||
|
||||
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 = {
|
||||
// 收藏功能配置
|
||||
|
|
@ -195,37 +182,35 @@ export default class Declare extends React.Component {
|
|||
favouritetype: 1,
|
||||
objid: 0,
|
||||
link: "wui/index.html#/ns_demo03/index",
|
||||
importantlevel: 1,
|
||||
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 topTab = [];
|
||||
|
||||
const renderRightOperation = () => {
|
||||
const { startDate, endDate } = this.state;
|
||||
return (
|
||||
<div style={{ display: "inline-block" }}>
|
||||
<RangePicker
|
||||
picker="month"
|
||||
format="yyyy-MM"
|
||||
defaultValue={[this.state.startDate, this.state.endDate]}
|
||||
onChange={(value) => this.handleRangePickerChange(value)}
|
||||
<MonthPicker
|
||||
value={startDate}
|
||||
disabledDate={(current) => {
|
||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => this.handleRangePickerChange("startDate", val)}
|
||||
/>
|
||||
<span className="to" style={{ margin: "0 10px" }}>至</span>
|
||||
<MonthPicker
|
||||
value={endDate}
|
||||
disabledDate={(current) => {
|
||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => this.handleRangePickerChange("endDate", val)}
|
||||
/>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginLeft: "10px", position: "relative", top: '-2px' }}
|
||||
style={{ marginLeft: "10px", position: "relative", top: "-2px" }}
|
||||
onClick={() => {
|
||||
this.setState({ declarationModalVisible: true });
|
||||
}}>
|
||||
|
|
@ -244,13 +229,13 @@ export default class Declare extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="个税申报表" // 文字
|
||||
icon={<i className="icon-coms-meeting" />} // 左侧图标
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
>
|
||||
<CustomTab searchOperationItem={renderRightOperation()} />
|
||||
<CustomTab searchOperationItem={renderRightOperation()}/>
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
|
|
@ -261,7 +246,7 @@ export default class Declare extends React.Component {
|
|||
},
|
||||
total: pageInfo.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: pageInfo.pageNum,
|
||||
current: pageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
</WeaTop>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:
|
||||
* Description:
|
||||
* Date: 2022-06-20 13:53:14
|
||||
* LastEditTime: 2022-06-21 13:30:00
|
||||
*/
|
||||
import React from "react";
|
||||
import { Modal, Button, Row, Col } from "antd";
|
||||
import { WeaInput, WeaSelect, WeaError } from "ecCom";
|
||||
import { Button, Col, Modal, Row } from "antd";
|
||||
import { WeaError, WeaInput, WeaSelect } from "ecCom";
|
||||
import "./index.less";
|
||||
|
||||
export default class CopyFormModal extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -16,15 +17,17 @@ export default class CopyFormModal extends React.Component {
|
|||
taxAgentId: ""
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
const { taxAgentAdminOption } = taxAgentStore;
|
||||
return (
|
||||
<Modal
|
||||
width={600}
|
||||
visible={this.props.visible}
|
||||
title="复制账套"
|
||||
onCancel={() => this.props.onCancel()}
|
||||
className="copyModalWrapper"
|
||||
footer={
|
||||
<Button
|
||||
type="primary"
|
||||
|
|
@ -52,6 +55,7 @@ export default class CopyFormModal extends React.Component {
|
|||
<WeaInput
|
||||
style={{ width: "200px" }}
|
||||
value={this.state.name}
|
||||
placeholder="请输入"
|
||||
onChange={value => {
|
||||
this.setState({ name: value });
|
||||
!value && this.refs.weaNameError.showError();
|
||||
|
|
@ -60,7 +64,7 @@ export default class CopyFormModal extends React.Component {
|
|||
</WeaError>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{ display: "flex", alignItems: "center" }}>
|
||||
<Row style={{ display: "flex", alignItems: "center", marginTop: 20 }}>
|
||||
<Col span={6}>个税扣缴义务人</Col>
|
||||
<Col span={18}>
|
||||
<WeaError
|
||||
|
|
@ -69,9 +73,9 @@ export default class CopyFormModal extends React.Component {
|
|||
error="请选择个税扣缴义务人">
|
||||
<WeaSelect
|
||||
showSearch // 设置select可搜索
|
||||
style={{ width: 200, marginTop: 10 }}
|
||||
options={taxAgentOption}
|
||||
options={taxAgentAdminOption}
|
||||
value={this.state.taxAgentId}
|
||||
placeholder="请选择"
|
||||
onChange={value => {
|
||||
this.setState({ taxAgentId: value });
|
||||
!value && this.refs.weaTaxAgentError.showError();
|
||||
|
|
|
|||
|
|
@ -195,3 +195,24 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copyModalWrapper{
|
||||
.ant-modal-body{
|
||||
padding-left: 150px;
|
||||
}
|
||||
.wea-select{
|
||||
width: 200px;
|
||||
.ant-select-show-search{
|
||||
width: 100%;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
.ant-select-selection{
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
border-color: #d9d9d9;
|
||||
box-shadow: 0 0 0 transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,26 @@
|
|||
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 { Button, Table, DatePicker, message, Modal } from 'antd';
|
||||
import moment from 'moment'
|
||||
import { Button, DatePicker, message, Modal } from "antd";
|
||||
import moment from "moment";
|
||||
|
||||
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable,WeaDatePicker, WeaHelpfulTip, WeaSelect, WeaInputSearch, WeaSlideModal } from 'ecCom';
|
||||
import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from '../../components/customTab';
|
||||
import ContentWrapper from '../../components/contentWrapper';
|
||||
import { WeaHelpfulTip, WeaInputSearch, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
|
||||
import { columns, dataSource, tempateColumns } from './columns';
|
||||
import StepSlide from '../../components/stepSlide'
|
||||
import ItemMangeFormModal from '../dataAcquisition/attendance/itemMangeFormModal';
|
||||
import BaseInformForm from './stepForm/baseInformForm'
|
||||
import ShowSettingForm from './stepForm/showSettingForm'
|
||||
import SlideModalTitle from "../../components/slideModalTitle"
|
||||
import TemplateSettingList from './templateSettingList'
|
||||
import { notNull } from '../../util/validate';
|
||||
import CopyModal from './copyModal';
|
||||
import SalarySendList from './SalarySendList'
|
||||
import { columns, tempateColumns } from "./columns";
|
||||
import StepSlide from "../../components/stepSlide";
|
||||
import BaseInformForm from "./stepForm/baseInformForm";
|
||||
import ShowSettingForm from "./stepForm/showSettingForm";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import TemplateSettingList from "./templateSettingList";
|
||||
import { notNull } from "../../util/validate";
|
||||
import CopyModal from "./copyModal";
|
||||
import SalarySendList from "./SalarySendList";
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
@inject('payrollStore', 'taxAgentStore')
|
||||
@inject("payrollStore", "taxAgentStore")
|
||||
@observer
|
||||
export default class Payroll extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -40,45 +37,51 @@ export default class Payroll extends React.Component {
|
|||
templateSearchValue: "", // 工资单模板列表-搜索条件-名称
|
||||
templateSelect: "", // 工资单模板列表-搜索条件-账套下拉选中值
|
||||
templateCurrentId: "",
|
||||
copyModalVisible: false
|
||||
}
|
||||
this.recordId = ""
|
||||
this.salaryYearMonth = []
|
||||
this.listPageInfo = {current: 1, pageSize: 10}
|
||||
copyModalVisible: false,
|
||||
startDate: moment(new Date()).startOf("year").format("YYYY-MM"),
|
||||
endDate: moment(new Date()).startOf("month").format("YYYY-MM")
|
||||
};
|
||||
this.recordId = "";
|
||||
this.salaryYearMonth = [];
|
||||
this.listPageInfo = { current: 1, pageSize: 10 };
|
||||
columns.map(item => {
|
||||
if(item.dataIndex == "cz") {
|
||||
if (item.dataIndex == "cz") {
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<div>
|
||||
<a onClick={() => {window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant")}}>工资单发放</a>
|
||||
<a onClick={() => {
|
||||
window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant");
|
||||
}}>工资单发放</a>
|
||||
<a onClick={window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollDetail")}>查看详情</a>
|
||||
<a onClick={this.handleUpdateTemplate(record)}>更新模板</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
tempateColumns.map(item => {
|
||||
if(item.dataIndex == "username") {
|
||||
if (item.dataIndex == "username") {
|
||||
item.render = (text) => {
|
||||
return (
|
||||
<a onClick={() => {this.setState({editSlideVisible: true})}}>{text}</a>
|
||||
)
|
||||
}
|
||||
} else if(item.dataIndex == "cz") {
|
||||
<a onClick={() => {
|
||||
this.setState({ editSlideVisible: true });
|
||||
}}>{text}</a>
|
||||
);
|
||||
};
|
||||
} else if (item.dataIndex == "cz") {
|
||||
item.render = () => {
|
||||
return (
|
||||
<div style={{display: "inline-block"}}>
|
||||
<a style={{marginRight: "10px"}}>编辑</a>
|
||||
<a style={{marginRight: "10px"}}>复制</a>
|
||||
<a style={{marginRight: "10px"}}>删除</a>
|
||||
<div style={{ display: "inline-block" }}>
|
||||
<a style={{ marginRight: "10px" }}>编辑</a>
|
||||
<a style={{ marginRight: "10px" }}>复制</a>
|
||||
<a style={{ marginRight: "10px" }}>删除</a>
|
||||
{/* <a >操作日志</a> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 更新模板
|
||||
|
|
@ -88,22 +91,22 @@ export default class Payroll extends React.Component {
|
|||
editSlideVisible: true,
|
||||
templateCurrentId: record.templateId
|
||||
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// 工资单模板-新建表单变化监听
|
||||
handleBaseInfoChange(request) {
|
||||
const { payrollStore: {setTemplateBaseData}} = this.props;
|
||||
const { payrollStore: { setTemplateBaseData } } = this.props;
|
||||
setTemplateBaseData(request);
|
||||
}
|
||||
|
||||
// 新建保存
|
||||
handleSave() {
|
||||
const { payrollStore } = this.props;
|
||||
const { fetchSavePayroll } = payrollStore
|
||||
const { fetchSavePayroll } = payrollStore;
|
||||
fetchSavePayroll().then(() => {
|
||||
this.setState({currentStep: 0, stepSlideVisible: false})
|
||||
})
|
||||
this.setState({ currentStep: 0, stepSlideVisible: false });
|
||||
});
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
|
@ -114,33 +117,33 @@ export default class Payroll extends React.Component {
|
|||
this.setState({
|
||||
initSelected: true,
|
||||
ledgerOptions: options
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 模板搜索
|
||||
handleTemplateSearch() {
|
||||
const { templateSearchValue, templateSelect } = this.state;
|
||||
let params = {name: templateSearchValue, salarySobId: templateSelect}
|
||||
const { payrollStore: {getPayrollTemplateList}} = this.props;
|
||||
getPayrollTemplateList(params)
|
||||
let params = { name: templateSearchValue, salarySobId: templateSelect };
|
||||
const { payrollStore: { getPayrollTemplateList } } = this.props;
|
||||
getPayrollTemplateList(params);
|
||||
}
|
||||
|
||||
// 模板选择框下拉改变事件
|
||||
handleTemplateSelectChange(value) {
|
||||
this.setState({templateSelect: value})
|
||||
this.handleTemplateSearch()
|
||||
this.setState({ templateSelect: value });
|
||||
this.handleTemplateSearch();
|
||||
}
|
||||
|
||||
// 模板列表编辑
|
||||
handleTemplateListEdit(record) {
|
||||
const { payrollStore } = this.props;
|
||||
const { getPayrollShowForm } = payrollStore
|
||||
this.recordId = record.id
|
||||
getPayrollShowForm(record.id)
|
||||
this.setState({templateCurrentId: record.id, selectedTab: 0},() => {
|
||||
this.setState({editSlideVisible: true})
|
||||
})
|
||||
const { getPayrollShowForm } = payrollStore;
|
||||
this.recordId = record.id;
|
||||
getPayrollShowForm(record.id);
|
||||
this.setState({ templateCurrentId: record.id, selectedTab: 0 }, () => {
|
||||
this.setState({ editSlideVisible: true });
|
||||
});
|
||||
}
|
||||
|
||||
// 模板列表复制
|
||||
|
|
@ -150,90 +153,103 @@ export default class Payroll extends React.Component {
|
|||
}, () => {
|
||||
this.setState({
|
||||
copyModalVisible: true
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 复制模板保存事件监听
|
||||
handleCopyModalSave(value) {
|
||||
const { payrollStore } = this.props;
|
||||
const { duplicatePayroll } = payrollStore
|
||||
const { duplicatePayroll } = payrollStore;
|
||||
duplicatePayroll(this.state.templateCurrentId, value).then(() => {
|
||||
this.setState({
|
||||
copyModalVisible: false
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 模板列表删除
|
||||
handleTemplateListDelete(record) {
|
||||
const { payrollStore: { deletePayroll }} = this.props;
|
||||
const { payrollStore: { deletePayroll } } = this.props;
|
||||
Modal.confirm({
|
||||
title: '信息确认',
|
||||
content: '确认删除',
|
||||
onOk:() => {
|
||||
deletePayroll([record.id])
|
||||
title: "信息确认",
|
||||
content: "确认删除",
|
||||
onOk: () => {
|
||||
deletePayroll([record.id]);
|
||||
},
|
||||
onCancel: () => {
|
||||
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
handleRangePickerChange(value) {
|
||||
let range = value.map(item => moment(item).format("YYYY-MM"))
|
||||
handleRangePickerChange(type, value) {
|
||||
const { payrollStore: { getPayrollList } } = this.props;
|
||||
this.salaryYearMonth = range
|
||||
getPayrollList({salaryYearMonth: range, ...this.listPageInfo})
|
||||
this.setState({
|
||||
[type]: value ? moment(value).format("YYYY-MM") : moment().format("YYYY-MM")
|
||||
}, () => {
|
||||
const { startDate, endDate } = this.state;
|
||||
this.salaryYearMonth = [startDate, endDate];
|
||||
getPayrollList({ salaryYearMonth: [startDate, endDate], ...this.listPageInfo });
|
||||
});
|
||||
}
|
||||
|
||||
// 预览
|
||||
handlePreview() {
|
||||
const { payrollStore : {templateBaseData, salaryTemplateShowSet, salaryItemSet}} = this.props;
|
||||
window.localStorage.setItem("templateBaseData", JSON.stringify(templateBaseData))
|
||||
window.localStorage.setItem("salaryTemplateShowSet", JSON.stringify(salaryTemplateShowSet))
|
||||
window.localStorage.setItem("salaryItemSet", JSON.stringify(salaryItemSet))
|
||||
window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/templatePreview")
|
||||
handlePreview() {
|
||||
const { payrollStore: { templateBaseData, salaryTemplateShowSet, salaryItemSet } } = this.props;
|
||||
window.localStorage.setItem("templateBaseData", JSON.stringify(templateBaseData));
|
||||
window.localStorage.setItem("salaryTemplateShowSet", JSON.stringify(salaryTemplateShowSet));
|
||||
window.localStorage.setItem("salaryItemSet", JSON.stringify(salaryItemSet));
|
||||
window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/templatePreview");
|
||||
}
|
||||
|
||||
|
||||
// 更新保存
|
||||
handleUpdateSave() {
|
||||
const { payrollStore} = this.props;
|
||||
const { payrollStore } = this.props;
|
||||
const { fetchUpdatePayroll } = payrollStore;
|
||||
fetchUpdatePayroll(this.recordId).then(() => {
|
||||
this.setState({
|
||||
editSlideVisible: false,
|
||||
selectedTab: 0
|
||||
})
|
||||
})
|
||||
selectedTab: 0
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 发放页面页码跳转
|
||||
handleListDataPageChange(value, pageInfo) {
|
||||
const { payrollStore: {getPayrollList} } = this.props;
|
||||
this.listPageInfo = pageInfo
|
||||
getPayrollList({salaryYearMonth: this.salaryYearMonth, ...pageInfo})
|
||||
const { payrollStore: { getPayrollList } } = this.props;
|
||||
this.listPageInfo = pageInfo;
|
||||
getPayrollList({ salaryYearMonth: this.salaryYearMonth, ...pageInfo });
|
||||
}
|
||||
|
||||
// 发放页面每页条数
|
||||
handleListShowSizeChange(pageInfo) {
|
||||
const { payrollStore: {getPayrollList} } = this.props;
|
||||
this.listPageInfo = pageInfo
|
||||
getPayrollList({salaryYearMonth: this.salaryYearMonth, ...pageInfo})
|
||||
const { payrollStore: { getPayrollList } } = this.props;
|
||||
this.listPageInfo = pageInfo;
|
||||
getPayrollList({ salaryYearMonth: this.salaryYearMonth, ...pageInfo });
|
||||
}
|
||||
|
||||
render() {
|
||||
const { payrollStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = payrollStore;
|
||||
const { currentStep, selectedTab, templateSearchValue, templateSelect } = this.state
|
||||
const {
|
||||
loading,
|
||||
hasRight,
|
||||
form,
|
||||
condition,
|
||||
tableStore,
|
||||
showSearchAd,
|
||||
getTableDatas,
|
||||
doSearch,
|
||||
setShowSearchAd
|
||||
} = payrollStore;
|
||||
const { currentStep, selectedTab, templateSearchValue, templateSelect, startDate, endDate } = this.state;
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
return renderNoright();
|
||||
}
|
||||
|
||||
const rightMenu = [// 右键菜单
|
||||
// {
|
||||
// {
|
||||
// key: 'BTN_COLUMN',
|
||||
// icon: <i className='icon-coms-Custom' />,
|
||||
// content: '显示列定制',
|
||||
|
|
@ -241,90 +257,116 @@ export default class Payroll extends React.Component {
|
|||
// },
|
||||
];
|
||||
const collectParams = { // 收藏功能配置
|
||||
favname: '工资单发放',
|
||||
favname: "工资单发放",
|
||||
favouritetype: 1,
|
||||
objid: 0,
|
||||
link: 'wui/index.html#/ns_demo03/index',
|
||||
importantlevel: 1,
|
||||
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>,
|
||||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>
|
||||
];
|
||||
|
||||
const topTab = [{
|
||||
const topTab = [{
|
||||
title: "工资单发放",
|
||||
viewcondition: "0"
|
||||
},
|
||||
{
|
||||
{
|
||||
title: "工资单模板设置",
|
||||
viewcondition: "1"
|
||||
}];
|
||||
}];
|
||||
|
||||
const renderRightOperation = () => {
|
||||
if(this.state.selectedKey == "0") {
|
||||
return <div style={{display: "inline-block"}}>
|
||||
if (this.state.selectedKey == "0") {
|
||||
return <div style={{ display: "inline-block" }}>
|
||||
<WeaHelpfulTip
|
||||
width={200}
|
||||
title="提示:无工资单模板无法发放工资单,请先设置一个默认使用的工资单模板"
|
||||
placement="topLeft"
|
||||
/>
|
||||
<div style={{display: "inline-block", marginLeft: "10px"}}>
|
||||
<RangePicker picker="month" format="yyyy-MM"
|
||||
onChange={(value) => this.handleRangePickerChange(value)}
|
||||
<div style={{ display: "inline-block", marginLeft: "10px" }}>
|
||||
<MonthPicker
|
||||
value={startDate}
|
||||
disabledDate={(current) => {
|
||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => this.handleRangePickerChange("startDate", val)}
|
||||
/>
|
||||
<span className="to" style={{ margin: "0 10px" }}>至</span>
|
||||
<MonthPicker
|
||||
value={endDate}
|
||||
disabledDate={(current) => {
|
||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => this.handleRangePickerChange("endDate", val)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
} else if(this.state.selectedKey == "1") {
|
||||
</div>;
|
||||
} else if (this.state.selectedKey == "1") {
|
||||
return (
|
||||
<div style={{display: "inline-block"}}>
|
||||
<div style={{ display: "inline-block" }}>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Button type="primary" onClick={() => {this.setState({stepSlideVisible: true})}}>新建</Button>
|
||||
showOperateBtn &&
|
||||
<Button type="primary" onClick={() => {
|
||||
this.setState({ stepSlideVisible: true });
|
||||
}}>新建</Button>
|
||||
}
|
||||
{
|
||||
this.state.initSelected && <WeaSelect options={this.state.ledgerOptions} style={{width: "200px", marginLeft: "10px", marginRight: "10px"}} value={templateSelect} onChange={(value) => {this.handleTemplateSelectChange(value)}}/>
|
||||
this.state.initSelected && <WeaSelect options={this.state.ledgerOptions}
|
||||
placeholder="请选择账套"
|
||||
style={{ width: "200px", marginLeft: "10px", marginRight: "10px" }}
|
||||
value={templateSelect} onChange={(value) => {
|
||||
this.handleTemplateSelectChange(value);
|
||||
}}/>
|
||||
}
|
||||
|
||||
<WeaInputSearch style={{marginleft: "10px"}} placeholder="请输入工资单名称" value={templateSearchValue} onChange={(value) => {this.setState({templateSearchValue: value})}} onSearch={(value) => {this.handleTemplateSearch(value)}}/>
|
||||
|
||||
<WeaInputSearch style={{ marginleft: "10px" }} placeholder="请输入工资单名称" value={templateSearchValue}
|
||||
onChange={(value) => {
|
||||
this.setState({ templateSearchValue: value });
|
||||
}} onSearch={(value) => {
|
||||
this.handleTemplateSearch(value);
|
||||
}}/>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const steps = [
|
||||
"基础设置",
|
||||
"显示设置"
|
||||
]
|
||||
];
|
||||
|
||||
const validateStep1 = () => {
|
||||
const { payrollStore: {templateBaseData}} = this.props;
|
||||
if(!notNull(templateBaseData.name)) {
|
||||
message.warning("工资单模板名称不能为空")
|
||||
return false
|
||||
const { payrollStore: { templateBaseData } } = this.props;
|
||||
if (!notNull(templateBaseData.name)) {
|
||||
message.warning("工资单模板名称不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!notNull(templateBaseData.salarySob)) {
|
||||
message.warning("薪资账套不能为空")
|
||||
if (!notNull(templateBaseData.salarySob)) {
|
||||
message.warning("薪资账套不能为空");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
const nextStep = () => {
|
||||
if(!validateStep1()) {
|
||||
return
|
||||
};
|
||||
const nextStep = () => {
|
||||
if (!validateStep1()) {
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
currentStep: this.state.currentStep + 1
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
// 上一步
|
||||
const prevStep = () => {
|
||||
this.setState({
|
||||
currentStep: this.state.currentStep - 1
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="mySalaryBenefitsWrapper">
|
||||
|
|
@ -334,137 +376,164 @@ export default class Payroll extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="工资单发放" // 文字
|
||||
icon={<i className='icon-coms-meeting' />} // 左侧图标
|
||||
iconBgcolor='#F14A2D' // 左侧图标背景色
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
>
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={
|
||||
renderRightOperation()
|
||||
}
|
||||
onChange={(v) => {
|
||||
this.setState({selectedKey: v})
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={
|
||||
renderRightOperation()
|
||||
}
|
||||
onChange={(v) => {
|
||||
this.setState({ selectedKey: v });
|
||||
}}
|
||||
/>
|
||||
{
|
||||
this.state.selectedKey == 0 &&
|
||||
<SalarySendList
|
||||
onEditTemplate={(record) => {
|
||||
this.handleTemplateListEdit(record);
|
||||
}}
|
||||
salaryYearMonth={this.salaryYearMonth}
|
||||
handleListDataPageChange={(value, pageInfo) => {
|
||||
this.handleListDataPageChange(value, pageInfo);
|
||||
}}
|
||||
handleListShowSizeChange={(pageInfo) => {
|
||||
this.handleListShowSizeChange(pageInfo);
|
||||
}}
|
||||
/>
|
||||
{
|
||||
this.state.selectedKey == 0 &&
|
||||
<SalarySendList
|
||||
onEditTemplate={(record) => {
|
||||
this.handleTemplateListEdit(record)
|
||||
}}
|
||||
salaryYearMonth={this.salaryYearMonth}
|
||||
handleListDataPageChange={(value, pageInfo) => {
|
||||
this.handleListDataPageChange(value, pageInfo)
|
||||
}}
|
||||
handleListShowSizeChange={(pageInfo) => {
|
||||
this.handleListShowSizeChange(pageInfo)
|
||||
}}
|
||||
/>
|
||||
|
||||
// <WeaTable columns={columns} dataSource={dataSource}/>
|
||||
}
|
||||
|
||||
{
|
||||
this.state.selectedKey == 1 &&
|
||||
<TemplateSettingList onEdit={(record) => {
|
||||
this.handleTemplateListEdit(record)
|
||||
}}
|
||||
onCopy={(record) => {
|
||||
this.handleTemplateListCopy(record)
|
||||
}}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onDelete={(record)=> this.handleTemplateListDelete(record)}
|
||||
/>
|
||||
}
|
||||
// <WeaTable columns={columns} dataSource={dataSource}/>
|
||||
}
|
||||
|
||||
{
|
||||
this.state.selectedKey == 1 &&
|
||||
<TemplateSettingList onEdit={(record) => {
|
||||
this.handleTemplateListEdit(record);
|
||||
}}
|
||||
onCopy={(record) => {
|
||||
this.handleTemplateListCopy(record);
|
||||
}}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onDelete={(record) => this.handleTemplateListDelete(record)}
|
||||
/>
|
||||
}
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
|
||||
{
|
||||
this.state.stepSlideVisible && <StepSlide
|
||||
visible={this.state.stepSlideVisible}
|
||||
currentStep={currentStep}
|
||||
steps={steps}
|
||||
onCancel={() => {this.setState({stepSlideVisible: false})}}
|
||||
customOperate = {
|
||||
<div style={{display: "inline-block"}}>
|
||||
this.state.stepSlideVisible && <StepSlide
|
||||
visible={this.state.stepSlideVisible}
|
||||
currentStep={currentStep}
|
||||
steps={steps}
|
||||
onCancel={() => {
|
||||
this.setState({ stepSlideVisible: false });
|
||||
}}
|
||||
customOperate={
|
||||
<div style={{ display: "inline-block" }}>
|
||||
{
|
||||
currentStep == 0 && <Button type="primary" onClick={() => {nextStep()}}>下一步</Button>
|
||||
currentStep == 0 && <Button type="primary" onClick={() => {
|
||||
nextStep();
|
||||
}}>下一步</Button>
|
||||
}
|
||||
{
|
||||
currentStep == 1 && <div style={{display: "inline-block"}}>
|
||||
<Button type="default" style={{marginRight: "10px"}} onClick={() => {prevStep()}}>上一步</Button>
|
||||
<Button type="primary" onClick={() => {this.handleSave()}}>保存</Button>
|
||||
<Button type="default" style={{marginLeft: "10px"}} onClick={() => {this.handlePreview()}}>预览</Button>
|
||||
</div>
|
||||
currentStep == 1 && <div style={{ display: "inline-block" }}>
|
||||
<Button type="default" style={{ marginRight: "10px" }} onClick={() => {
|
||||
prevStep();
|
||||
}}>上一步</Button>
|
||||
<Button type="primary" onClick={() => {
|
||||
this.handleSave();
|
||||
}}>保存</Button>
|
||||
<Button type="default" style={{ marginLeft: "10px" }} onClick={() => {
|
||||
this.handlePreview();
|
||||
}}>预览</Button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
title="新建工资单模板"
|
||||
content={
|
||||
<div>
|
||||
{
|
||||
currentStep == 0 && <BaseInformForm onChange={(request) => {this.handleBaseInfoChange(request)}}/>
|
||||
}
|
||||
{
|
||||
currentStep == 1 && <ShowSettingForm />
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
title="新建工资单模板"
|
||||
content={
|
||||
<div>
|
||||
{
|
||||
currentStep == 0 && <BaseInformForm onChange={(request) => {
|
||||
this.handleBaseInfoChange(request);
|
||||
}}/>
|
||||
}
|
||||
{
|
||||
currentStep == 1 && <ShowSettingForm/>
|
||||
}
|
||||
</div>
|
||||
|
||||
{
|
||||
this.state.editSlideVisible &&
|
||||
<WeaSlideModal visible={this.state.editSlideVisible}
|
||||
top={0}
|
||||
width={50}
|
||||
height={100}
|
||||
direction={'right'}
|
||||
measure={'%'}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={"编辑工资单模板"}
|
||||
tabs={[{title: '基础设置', key: 0}, {title: "显示设置", key: 1}]}
|
||||
editable={false}
|
||||
selectedTab={selectedTab}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={<span>
|
||||
}
|
||||
/>
|
||||
}
|
||||
|
||||
{
|
||||
this.state.editSlideVisible &&
|
||||
<WeaSlideModal visible={this.state.editSlideVisible}
|
||||
top={0}
|
||||
width={50}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={"编辑工资单模板"}
|
||||
tabs={[{ title: "基础设置", key: 0 }, { title: "显示设置", key: 1 }]}
|
||||
editable={false}
|
||||
selectedTab={selectedTab}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={<span>
|
||||
{
|
||||
selectedTab == 0 && <Button type="primary" onClick={() => {this.handleUpdateSave()}}>保存</Button>
|
||||
selectedTab == 0 && <Button type="primary" onClick={() => {
|
||||
this.handleUpdateSave();
|
||||
}}>保存</Button>
|
||||
}
|
||||
{
|
||||
selectedTab == 1 &&
|
||||
<span>
|
||||
<Button type="primary" onClick={() => {this.handleUpdateSave()}} style={{marginRight: '10px'}}>保存</Button>
|
||||
<Button type="default" onClick={() => {this.handlePreview()}}>预览</Button>
|
||||
{
|
||||
selectedTab == 1 &&
|
||||
<span>
|
||||
<Button type="primary" onClick={() => {
|
||||
this.handleUpdateSave();
|
||||
}} style={{ marginRight: "10px" }}>保存</Button>
|
||||
<Button type="default" onClick={() => {
|
||||
this.handlePreview();
|
||||
}}>预览</Button>
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</span>}
|
||||
subItemChange={
|
||||
(item) => {this.setState({selectedTab: item.key})}
|
||||
}
|
||||
/>
|
||||
}
|
||||
content={<div>
|
||||
{
|
||||
selectedTab == 0 && <BaseInformForm id={this.state.templateCurrentId} onChange={(request) => {this.handleBaseInfoChange(request)}}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 1 && <ShowSettingForm id={this.state.templateCurrentId}/>
|
||||
}
|
||||
</div>}
|
||||
onClose={() => this.setState({editSlideVisible: false})}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({editSlideVisible: false})} />
|
||||
}
|
||||
{
|
||||
this.state.copyModalVisible && <CopyModal onSave={(value) => this.handleCopyModalSave(value)} visible={this.state.copyModalVisible} onCancel={() => {this.setState({copyModalVisible: false})}}/>
|
||||
}
|
||||
subItemChange={
|
||||
(item) => {
|
||||
this.setState({ selectedTab: item.key });
|
||||
}
|
||||
}
|
||||
/>
|
||||
}
|
||||
content={<div>
|
||||
{
|
||||
selectedTab == 0 &&
|
||||
<BaseInformForm id={this.state.templateCurrentId} onChange={(request) => {
|
||||
this.handleBaseInfoChange(request);
|
||||
}}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 1 && <ShowSettingForm id={this.state.templateCurrentId}/>
|
||||
}
|
||||
</div>}
|
||||
onClose={() => this.setState({ editSlideVisible: false })}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({ editSlideVisible: false })}/>
|
||||
}
|
||||
{
|
||||
this.state.copyModalVisible &&
|
||||
<CopyModal onSave={(value) => this.handleCopyModalSave(value)} visible={this.state.copyModalVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ copyModalVisible: false });
|
||||
}}/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export default class Archives extends React.Component {
|
|||
handleImport(params) {
|
||||
const { archivesStore: {importBatch, initImportParams}} = this.props;
|
||||
importBatch(params)
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 导入完成
|
||||
|
|
@ -144,19 +144,19 @@ export default class Archives extends React.Component {
|
|||
// 关闭导入框
|
||||
handleImportCancel() {
|
||||
const { archivesStore: {initImportParams, getTableDatas }} = this.props;
|
||||
|
||||
initImportParams()
|
||||
|
||||
initImportParams()
|
||||
if(this.state.step == 2) {
|
||||
getTableDatas()
|
||||
}
|
||||
this.setState({importVisible: false, step: 0});
|
||||
this.setState({importVisible: false, step: 0});
|
||||
}
|
||||
|
||||
handleSearch() {
|
||||
const { archivesStore: {getTableDatas}} = this.props;
|
||||
getTableDatas({...this.pageInfo, current: 1})
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { selectedTab, selectedRowKeys } = this.state;
|
||||
|
|
@ -169,12 +169,12 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
|
||||
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: '社保福利档案',
|
||||
|
|
@ -246,7 +246,7 @@ export default class Archives extends React.Component {
|
|||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
buttons={showOperateBtn ? btns : []}
|
||||
>
|
||||
|
||||
|
||||
<WeaTab
|
||||
searchType={['base', 'advanced']} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||
|
|
@ -261,11 +261,11 @@ export default class Archives extends React.Component {
|
|||
comsWeaTableStore={tableStore} // table store
|
||||
hasOrder={true} // 是否启用排序
|
||||
needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
|
||||
|
||||
// getColumns={this.getColumns}
|
||||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
<CustomPaginationTable
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
dataSource={dataSource}
|
||||
|
|
@ -287,7 +287,7 @@ export default class Archives extends React.Component {
|
|||
</WeaRightMenu>
|
||||
|
||||
{
|
||||
this.state.editSlideVisible &&
|
||||
this.state.editSlideVisible &&
|
||||
<WeaSlideModal visible={this.state.editSlideVisible}
|
||||
top={0}
|
||||
width={40}
|
||||
|
|
@ -295,7 +295,7 @@ export default class Archives extends React.Component {
|
|||
direction={'right'}
|
||||
measure={'%'}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
<SlideModalTitle
|
||||
subtitle={"员工福利档案"}
|
||||
tabs={[{title: '基础设置', key: 0}, {title: "社保", key: 1}, {title: "公积金", key: 2}, {title: '企业年金及其他福利', key: 3}]}
|
||||
editable={false}
|
||||
|
|
@ -326,14 +326,14 @@ export default class Archives extends React.Component {
|
|||
{
|
||||
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
|
||||
|
||||
</div>}
|
||||
onClose={() => this.setState({editSlideVisible: false})}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({editSlideVisible: false})} />
|
||||
}
|
||||
{
|
||||
this.state.importVisible && <ImportModal
|
||||
this.state.importVisible && <ImportModal
|
||||
init={() => {
|
||||
this.handleInitModal()
|
||||
}}
|
||||
|
|
@ -347,11 +347,11 @@ export default class Archives extends React.Component {
|
|||
previewImport={(params) => {this.handlePreviewImport(params)}}
|
||||
importFile={(params) => {this.handleImport(params);}}
|
||||
templateLink={() => {this.handleTemplateLinkClick()}}
|
||||
visiable={this.state.importVisible}
|
||||
visiable={this.state.importVisible}
|
||||
onCancel={() => {
|
||||
this.handleImportCancel()
|
||||
|
||||
}}
|
||||
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
|
||||
import { Button, Table, Dropdown, Menu, Modal, message, Spin } from "antd";
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal } from "antd";
|
||||
|
||||
import { WeaTop, WeaTab, WeaRightMenu, WeaDatePicker, WeaTable } from "ecCom";
|
||||
import { WeaRightMenu, WeaTop } from "ecCom";
|
||||
|
||||
import { renderNoright, getSearchs } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../../components/customTab";
|
||||
import ContentWrapper from "../../../components/contentWrapper";
|
||||
import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import Accountdialog from "./components/accountDialog";
|
||||
import AbnormalDrawer from "./components/abnormalDrawer";
|
||||
import CustomPaginationTable from '../../../components/customPaginationTable'
|
||||
import CustomPaginationTable from "../../../components/customPaginationTable";
|
||||
import moment from "moment";
|
||||
import _ from "lodash";
|
||||
|
||||
// import { columns, dataSource } from './columns';
|
||||
import "./index.less";
|
||||
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
||||
@inject("standingBookStore", "taxAgentStore")
|
||||
@observer
|
||||
export default class StandingBook extends React.Component {
|
||||
|
|
@ -27,8 +26,8 @@ export default class StandingBook extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
tableParams: {
|
||||
startTime: moment(new Date()).subtract(5,'months').startOf('month').format('YYYY-MM'),
|
||||
endTime: moment(new Date()).startOf('month').format('YYYY-MM')
|
||||
startTime: moment(new Date()).startOf("year").format("YYYY-MM"),
|
||||
endTime: moment(new Date()).startOf("month").format("YYYY-MM")
|
||||
},
|
||||
current: 1,
|
||||
dialogProps: {
|
||||
|
|
@ -39,64 +38,74 @@ export default class StandingBook extends React.Component {
|
|||
},
|
||||
drawerProps: {
|
||||
title: "",
|
||||
visible: false,
|
||||
visible: false
|
||||
},
|
||||
tableData: {
|
||||
list: [],
|
||||
columns: [],
|
||||
total: 0,
|
||||
total: 0
|
||||
},
|
||||
dbnormalTableData: {
|
||||
list: [],
|
||||
total: 0,
|
||||
total: 0
|
||||
},
|
||||
adminData: {}
|
||||
};
|
||||
this.payload = {}
|
||||
this.pageInfo = {current: 1, pageSize: 10}
|
||||
this.payload = {};
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
init = () => {
|
||||
const { current, dialogProps } = this.state;
|
||||
|
||||
const { taxAgentStore: {getPermission, fetchTaxAgentOption}, standingBookStore: {getAdminTaxAgentList}} = this.props
|
||||
getPermission().then(({status, data}) => {
|
||||
if(status) {
|
||||
this.setState({adminData : data})
|
||||
if(data.isOpenDevolution) {
|
||||
const {
|
||||
taxAgentStore: { getPermission, fetchTaxAgentOption },
|
||||
standingBookStore: { getAdminTaxAgentList }
|
||||
} = this.props;
|
||||
getPermission().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ adminData: data });
|
||||
if (data.isOpenDevolution) {
|
||||
getAdminTaxAgentList().then((data) => {
|
||||
let taxAgentList = data.map(item => {
|
||||
let result = {}
|
||||
result.showname = item.name
|
||||
result.key = item.id + ""
|
||||
result.selected = false
|
||||
return result
|
||||
})
|
||||
this.setState({dialogProps: {
|
||||
...dialogProps,
|
||||
options: taxAgentList,
|
||||
isAdmin: true
|
||||
}})
|
||||
})
|
||||
}else{
|
||||
fetchTaxAgentOption().then(({data}) => {
|
||||
let result = {};
|
||||
result.showname = item.name;
|
||||
result.key = item.id + "";
|
||||
result.selected = false;
|
||||
return result;
|
||||
});
|
||||
this.setState({
|
||||
dialogProps: {
|
||||
...dialogProps,
|
||||
options: taxAgentList,
|
||||
isAdmin: true
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
fetchTaxAgentOption().then(({ data }) => {
|
||||
let taxAgentList = data.map(item => {
|
||||
let result = {}
|
||||
result.showname = item.content
|
||||
result.key = item.id + ""
|
||||
result.selected = false
|
||||
return result
|
||||
})
|
||||
this.setState({dialogProps: {
|
||||
...dialogProps,
|
||||
options: taxAgentList,
|
||||
}})
|
||||
})
|
||||
let result = {};
|
||||
result.showname = item.content;
|
||||
result.key = item.id + "";
|
||||
result.selected = false;
|
||||
return result;
|
||||
});
|
||||
this.setState({
|
||||
dialogProps: {
|
||||
...dialogProps,
|
||||
options: taxAgentList
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
this.getCommonList({ ...this.state.tableParams, current });
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
getCommonList = (payload = {}) => {
|
||||
const { getCommonList } = this.props.standingBookStore;
|
||||
|
|
@ -115,7 +124,7 @@ export default class StandingBook extends React.Component {
|
|||
{text}
|
||||
</a>
|
||||
);
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
|
|
@ -129,18 +138,25 @@ export default class StandingBook extends React.Component {
|
|||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
fixed: 'right',
|
||||
fixed: "right",
|
||||
render: (text, r) => {
|
||||
const { billStatus, billMonth } = r;
|
||||
return (
|
||||
<React.Fragment>
|
||||
{billStatus === "未归档" && (
|
||||
<a
|
||||
href="javascript:;"
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.handleGoDetail(billMonth, "", r.paymentOrganizationId)}>
|
||||
{" "}
|
||||
核算{" "}
|
||||
核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.socialSecurityBenefitsRecalculate({ id: r.id })}>
|
||||
重新核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "未归档" && (
|
||||
|
|
@ -156,7 +172,7 @@ export default class StandingBook extends React.Component {
|
|||
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more" />
|
||||
<i className="icon-coms-more more"/>
|
||||
</Dropdown>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
|
|
@ -164,56 +180,66 @@ export default class StandingBook extends React.Component {
|
|||
overlay={
|
||||
<Menu
|
||||
onClick={({ key }) =>
|
||||
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId})
|
||||
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId })
|
||||
}>
|
||||
<Menu.Item key="view">查看</Menu.Item>
|
||||
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more" />
|
||||
<i className="icon-coms-more more"/>
|
||||
</Dropdown>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
},
|
||||
} : {},
|
||||
}
|
||||
} : {}
|
||||
],
|
||||
total,
|
||||
total
|
||||
},
|
||||
current: pageNum,
|
||||
current: pageNum
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
socialSecurityBenefitsRecalculate = (params) => {
|
||||
const { socialSecurityBenefitsRecalculate } = this.props.standingBookStore;
|
||||
socialSecurityBenefitsRecalculate(params).then(() => {
|
||||
message.success("重新核算成功");
|
||||
this.init();
|
||||
}).catch(err => {
|
||||
message.error(err);
|
||||
});
|
||||
};
|
||||
|
||||
// 异常详情列表
|
||||
inspectList = (payload) => {
|
||||
const { inspectList } = this.props.standingBookStore;
|
||||
this.payload = payload;
|
||||
inspectList({ ...payload }).then(({list, total}) => {
|
||||
inspectList({ ...payload }).then(({ list, total }) => {
|
||||
this.setState({
|
||||
dbnormalTableData: {
|
||||
list,
|
||||
total
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 异常详情分页回调
|
||||
handlePageChange(value) {
|
||||
const { inspectList} = this.props.standingBookStore;
|
||||
inspectList({ ...this.payload, current: value }).then(({list, total}) => {
|
||||
const { inspectList } = this.props.standingBookStore;
|
||||
inspectList({ ...this.payload, current: value }).then(({ list, total }) => {
|
||||
this.setState({
|
||||
dbnormalTableData: {
|
||||
list,
|
||||
total
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
handleGoDetail = (billMonth, detail, paymentOrganization) => {
|
||||
if(detail) {
|
||||
if (detail) {
|
||||
window.open(
|
||||
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?type=${detail}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`
|
||||
);
|
||||
|
|
@ -222,13 +248,13 @@ 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,
|
||||
current: this.state.current
|
||||
});
|
||||
}, 3000)
|
||||
}, 3000);
|
||||
};
|
||||
handleOperate = (payload) => {
|
||||
const { siaccountFile, siaccountDelete, deleteLoading } =
|
||||
|
|
@ -245,7 +271,8 @@ export default class StandingBook extends React.Component {
|
|||
this.getCommonList({ ...this.state.tableParams, current });
|
||||
});
|
||||
},
|
||||
onCancel: () => {},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "detail":
|
||||
|
|
@ -254,8 +281,8 @@ export default class StandingBook extends React.Component {
|
|||
drawerProps: {
|
||||
...this.state.drawerProps,
|
||||
title: "核算异常",
|
||||
visible: true,
|
||||
},
|
||||
visible: true
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "delete":
|
||||
|
|
@ -268,11 +295,12 @@ export default class StandingBook extends React.Component {
|
|||
message.success("删除成功");
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current: this.state.current,
|
||||
current: this.state.current
|
||||
});
|
||||
});
|
||||
},
|
||||
onCancel: () => {},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "view":
|
||||
|
|
@ -288,14 +316,14 @@ export default class StandingBook extends React.Component {
|
|||
console.log("extra:", extra);
|
||||
const payload = {
|
||||
billMonth: moment(billMonth).format("YYYY-MM"),
|
||||
...extra,
|
||||
...extra
|
||||
};
|
||||
save(payload).then(() => {
|
||||
message.success("核算成功");
|
||||
this.handleClose();
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current: this.state.current,
|
||||
current: this.state.current
|
||||
});
|
||||
this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "");
|
||||
});
|
||||
|
|
@ -306,8 +334,8 @@ export default class StandingBook extends React.Component {
|
|||
dialogProps: {
|
||||
...this.state.dialogProps,
|
||||
title: "",
|
||||
visible: false,
|
||||
},
|
||||
visible: false
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -315,29 +343,29 @@ export default class StandingBook extends React.Component {
|
|||
this.setState({
|
||||
tableParams: {
|
||||
...this.state.tableParams,
|
||||
[type]: val,
|
||||
},
|
||||
[type]: val && moment(val).format("YYYY-MM")
|
||||
}
|
||||
});
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
[type]: val,
|
||||
current: this.state.current,
|
||||
[type]: val && moment(val).format("YYYY-MM"),
|
||||
current: this.state.current
|
||||
});
|
||||
};
|
||||
|
||||
handlePageChange(value) {
|
||||
this.setState({current: value})
|
||||
this.setState({ current: value });
|
||||
this.pageInfo.current = value;
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
...this.pageInfo,
|
||||
...this.pageInfo
|
||||
});
|
||||
}
|
||||
|
||||
handleShowSizeChange(pageInfo) {
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
...pageInfo,
|
||||
...pageInfo
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -353,7 +381,7 @@ export default class StandingBook extends React.Component {
|
|||
showSearchAd,
|
||||
getTableDatas,
|
||||
doSearch,
|
||||
setShowSearchAd,
|
||||
setShowSearchAd
|
||||
} = standingBookStore;
|
||||
const { list, columns, total } = this.state.tableData;
|
||||
const { startTime, endTime } = this.state.tableParams;
|
||||
|
|
@ -376,8 +404,8 @@ export default class StandingBook extends React.Component {
|
|||
dialogProps: {
|
||||
...this.state.dialogProps,
|
||||
title: "核算",
|
||||
visible: true,
|
||||
},
|
||||
visible: true
|
||||
}
|
||||
});
|
||||
}}>
|
||||
核算
|
||||
|
|
@ -385,12 +413,12 @@ export default class StandingBook extends React.Component {
|
|||
];
|
||||
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 = {
|
||||
// 收藏功能配置
|
||||
|
|
@ -398,38 +426,7 @@ export default class StandingBook extends React.Component {
|
|||
favouritetype: 1,
|
||||
objid: 0,
|
||||
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 topTab = [];
|
||||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div></div>;
|
||||
};
|
||||
|
||||
const pagination = {
|
||||
total,
|
||||
current: this.state.current,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
onChange: (current) => {
|
||||
this.setState({ current });
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
current,
|
||||
});
|
||||
},
|
||||
importantlevel: 1
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
@ -440,7 +437,7 @@ export default class StandingBook extends React.Component {
|
|||
>
|
||||
<WeaTop
|
||||
title="社保福利台账" // 文字
|
||||
icon={<i className="icon-coms-meeting" />} // 左侧图标
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
buttons={showOperateBtn ? rightBtns : []}
|
||||
// showDropIcon={true} // 是否显示下拉按钮
|
||||
|
|
@ -449,37 +446,43 @@ export default class StandingBook extends React.Component {
|
|||
>
|
||||
<div className="billDateWrapper">
|
||||
<div>账单月份:</div>
|
||||
<WeaDatePicker
|
||||
<MonthPicker
|
||||
value={startTime}
|
||||
format="YYYY-MM"
|
||||
disabledDate={(current) => {
|
||||
return current && endTime && current.getTime() > new Date(endTime).getTime();
|
||||
}}
|
||||
onChange={(val) => this.handleChangeMonth("startTime", val)}
|
||||
/>
|
||||
<span className="to">至</span>
|
||||
<WeaDatePicker
|
||||
<MonthPicker
|
||||
value={endTime}
|
||||
format="YYYY-MM"
|
||||
disabledDate={(current) => {
|
||||
return current && startTime && current.getTime() < new Date(startTime).getTime();
|
||||
}}
|
||||
onChange={(val) => this.handleChangeMonth("endTime", val)}
|
||||
/>
|
||||
</div>
|
||||
<CustomPaginationTable
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={_.filter(columns, (it) => it.dataIndex !== "id").map(item => {
|
||||
item.width = "150px"
|
||||
if(item.dataIndex ==='billMonth') item.fixed= 'left';
|
||||
return item
|
||||
item.width = "150px";
|
||||
if (item.dataIndex === "billMonth") item.fixed = "left";
|
||||
return item;
|
||||
})}
|
||||
dataSource={list}
|
||||
total={total}
|
||||
current={this.state.current}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={(value) => {
|
||||
this.handlePageChange(value)
|
||||
this.handlePageChange(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = {current, pageSize}
|
||||
this.handleShowSizeChange(this.pageInfo)
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
scroll={{x: 2300}}
|
||||
scroll={{ x: 2300 }}
|
||||
/>
|
||||
|
||||
{dialogProps.visible && (
|
||||
|
|
@ -498,14 +501,16 @@ export default class StandingBook extends React.Component {
|
|||
drawerProps: {
|
||||
...this.state.drawerProps,
|
||||
title: "",
|
||||
visible: false,
|
||||
},
|
||||
visible: false
|
||||
}
|
||||
});
|
||||
}}
|
||||
columns={abnormalColumns}
|
||||
dataSource={this.state.dbnormalTableData.list}
|
||||
total={this.state.dbnormalTableData.total}
|
||||
onPageChange={(value) => {this.handlePageChange(value)}}
|
||||
onPageChange={(value) => {
|
||||
this.handlePageChange(value);
|
||||
}}
|
||||
// onOk={this.handleOk}
|
||||
loading={inspectLoading}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { toJS } from "mobx";
|
|||
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import ProgressModal from "../../../../components/progressModal";
|
||||
import _ from "lodash";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -22,6 +23,7 @@ export default class NormalIndex extends Component {
|
|||
this.state = {
|
||||
date: "",
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
selectedRowKeys: [],
|
||||
addProps: {
|
||||
title: "",
|
||||
|
|
@ -32,8 +34,11 @@ export default class NormalIndex extends Component {
|
|||
columns: [],
|
||||
total: 0
|
||||
},
|
||||
searchValue: ""
|
||||
searchValue: "",
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
};
|
||||
this.timer = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
@ -44,6 +49,13 @@ export default class NormalIndex extends Component {
|
|||
: this.getSupplementaryList({ billMonth, current, paymentOrganization });
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
// 清除轮询
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.selectedKey != this.props.selectedKey) {
|
||||
const { billMonth, paymentOrganization } = nextProps;
|
||||
|
|
@ -290,25 +302,42 @@ export default class NormalIndex extends Component {
|
|||
|
||||
// 核算按钮点击
|
||||
handleCommonAccountClick() {
|
||||
const { remarks, billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { billMonth, selectedKey, paymentOrganization } = this.props;
|
||||
const { commonAccount } = this.props.standingBookStore;
|
||||
commonAccount({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
includes: []
|
||||
}).then(() => {
|
||||
message.success("核算成功");
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
});
|
||||
this.setState({
|
||||
progressVisible: true
|
||||
}, () => {
|
||||
this.timer = setInterval(() => {
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: this.state.progress + 20
|
||||
});
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
message.success("核算成功");
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
paymentOrganization,
|
||||
current: this.state.current
|
||||
});
|
||||
}
|
||||
}, 800);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -341,13 +370,31 @@ export default class NormalIndex extends Component {
|
|||
total,
|
||||
current: this.state.current,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
onChange: current => {
|
||||
this.setState({ current });
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ current, pageSize });
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({ billMonth, current, paymentOrganization })
|
||||
? this.getNormalList({ billMonth, current, pageSize, paymentOrganization })
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current,
|
||||
pageSize,
|
||||
paymentOrganization
|
||||
});
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ current });
|
||||
selectedKey === "1"
|
||||
? this.getNormalList({
|
||||
billMonth, current,
|
||||
pageSize: this.state.pageSize, paymentOrganization
|
||||
})
|
||||
: this.getSupplementaryList({
|
||||
billMonth,
|
||||
current,
|
||||
pageSize: this.state.pageSize,
|
||||
paymentOrganization
|
||||
});
|
||||
}
|
||||
|
|
@ -423,6 +470,14 @@ export default class NormalIndex extends Component {
|
|||
{selectedKey === "1" && this.props.type !== "detail" && <Button type="primary" onClick={() => {
|
||||
this.handleCommonAccountClick();
|
||||
}}>核算</Button>}
|
||||
{/*核算进度条*/}
|
||||
<ProgressModal
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
}}
|
||||
progress={this.state.progress}
|
||||
/>
|
||||
<Tooltip title="导出全部">
|
||||
<i className="icon-coms02-coms2-export" style={{ color: "#2db7f5", fontSize: 18 }}
|
||||
onClick={this.handleExport}/>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ export default class OverViewIndex extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: [],
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
tableData: {
|
||||
list: [],
|
||||
columns: [],
|
||||
|
|
@ -77,11 +79,22 @@ export default class OverViewIndex extends Component {
|
|||
const pagination = {
|
||||
total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
onShowSizeChange(current, pageSize) {
|
||||
console.log("Current: ", current, "; PageSize: ", pageSize);
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ current, pageSize });
|
||||
this.getOverViewList({
|
||||
billMonth, current,
|
||||
pageSize, paymentOrganization
|
||||
});
|
||||
},
|
||||
onChange(current) {
|
||||
console.log("Current: ", current);
|
||||
onChange: (current) => {
|
||||
this.setState({ current });
|
||||
this.getOverViewList({
|
||||
billMonth, current,
|
||||
pageSize: this.state.pageSize, paymentOrganization
|
||||
});
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { WeaForm, WeaTableNew } from "comsMobx";
|
|||
import { removePropertyCondition } from "../util/response";
|
||||
import _ from "lodash";
|
||||
|
||||
import * as API from "../apis/standingBook"; // 引入API接口文件
|
||||
import * as API from "../apis/standingBook";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
|
|
@ -362,7 +362,19 @@ export class StandingBookStore {
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@action("社保福利台账重新核算")
|
||||
socialSecurityBenefitsRecalculate = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.socialSecurityBenefitsRecalculate(params).then(res => {
|
||||
if(res.status) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(res.errormsg || "接口调用失败!");
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前管理员下的所有个税扣缴义务人
|
||||
|
|
|
|||
Loading…
Reference in New Issue