Merge branch 'custom-艾志工业' into custom-艾志工业-合并个税
This commit is contained in:
commit
11b685c5e6
|
|
@ -181,7 +181,7 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
handleReceive = ({ data }) => {
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
|
||||
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
||||
dataIndex: it.dataIndex,
|
||||
width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150,
|
||||
|
|
@ -193,8 +193,8 @@ class Index extends Component {
|
|||
const { dataSource, pageInfo, selectedKey, selectedRowKeys } = this.state;
|
||||
if (type === "init") {
|
||||
this.postMessageToChild({
|
||||
columns, dataSource, showOperateBtn, selectedKey,
|
||||
showSum: false, pageInfo, selectedRowKeys
|
||||
columns, dataSource, showOperateBtn: isDepAuth || showOperateBtn,
|
||||
selectedKey, showSum: false, pageInfo, selectedRowKeys
|
||||
});
|
||||
} else if (type === "turn") {
|
||||
if (id === "PAGEINFO") {
|
||||
|
|
@ -261,7 +261,7 @@ class Index extends Component {
|
|||
};
|
||||
queryList = (url) => {
|
||||
const { loading, pageInfo, searchItemsValue, selectedKey } = this.state;
|
||||
const { payrollFilesStore: { tableStore, queryList }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { payrollFilesStore: { tableStore, queryList }, taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
|
||||
const payload = { ...pageInfo };
|
||||
this.setState({
|
||||
loading: { ...loading, query: true }
|
||||
|
|
@ -397,8 +397,8 @@ class Index extends Component {
|
|||
};
|
||||
getRightOptionBtns = () => {
|
||||
const { selectedKey, importType, selectedRowKeys, searchItemsValue, pageInfo } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
if (selectedKey === "pending" && showOperateBtn) {
|
||||
const { taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
|
||||
if (selectedKey === "pending" && (isDepAuth || showOperateBtn)) {
|
||||
return [
|
||||
<Button type="primary" onClick={() => {
|
||||
this.importRef.handleMenuClick({ key: "PENDING" });
|
||||
|
|
@ -425,7 +425,7 @@ class Index extends Component {
|
|||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "fixed" && showOperateBtn) {
|
||||
} else if (selectedKey === "fixed" && (isDepAuth || showOperateBtn)) {
|
||||
return [
|
||||
<WeaHelpfulTip
|
||||
width={300}
|
||||
|
|
@ -454,7 +454,7 @@ class Index extends Component {
|
|||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "suspend" && showOperateBtn) {
|
||||
} else if (selectedKey === "suspend" && (isDepAuth || showOperateBtn)) {
|
||||
return [
|
||||
<Dropdown overlay={
|
||||
<AllWithoutPay
|
||||
|
|
@ -491,7 +491,7 @@ class Index extends Component {
|
|||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "stop" && showOperateBtn) {
|
||||
} else if (selectedKey === "stop" && (isDepAuth || showOperateBtn)) {
|
||||
return [
|
||||
<Dropdown overlay={
|
||||
<BatchSuspendsPay
|
||||
|
|
@ -516,7 +516,7 @@ class Index extends Component {
|
|||
}}/></Button>
|
||||
</Dropdown>
|
||||
];
|
||||
} else if (selectedKey === "ext" && showOperateBtn) {
|
||||
} else if (selectedKey === "ext" && (isDepAuth || showOperateBtn)) {
|
||||
return [
|
||||
<WeaHelpfulTip
|
||||
width={300}
|
||||
|
|
@ -542,7 +542,7 @@ class Index extends Component {
|
|||
return [];
|
||||
};
|
||||
getColumns = () => {
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
|
||||
const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({
|
||||
dataIndex: it.dataIndex,
|
||||
width: (it.dataIndex === "username" || it.dataIndex === "operate") ? 150 : it.dataIndex === "taxAgentName" ? 176 : 150,
|
||||
|
|
@ -551,7 +551,7 @@ class Index extends Component {
|
|||
ellipsis: true
|
||||
}));
|
||||
this.postMessageToChild({
|
||||
columns, showOperateBtn, selectedKey: this.state.selectedKey,
|
||||
columns, showOperateBtn: isDepAuth || showOperateBtn, selectedKey: this.state.selectedKey,
|
||||
dataSource: this.state.dataSource, selectedRowKeys: this.state.selectedRowKeys,
|
||||
showSum: false, pageInfo: this.state.pageInfo
|
||||
});
|
||||
|
|
@ -614,17 +614,17 @@ class Index extends Component {
|
|||
};
|
||||
// 查看 Slide 头部操作按钮
|
||||
renderEditSlideOperate = () => {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
|
||||
const { slideParams: { id }, salaryAdjustmentInfo, selectedKey } = this.state;
|
||||
const { isShow, url } = salaryAdjustmentInfo;
|
||||
let arrList = [];
|
||||
if (showOperateBtn && isShow === "true" && selectedKey === "fixed") {
|
||||
if ((isDepAuth || showOperateBtn) && isShow === "true" && selectedKey === "fixed") {
|
||||
arrList.push(<Button type="primary" onClick={() => {
|
||||
const linkUrl = url.indexOf("http") !== -1 ? url : `${window.location.origin}${url}`;
|
||||
window.open(`${linkUrl}&salaryArchiveId=${id}`);
|
||||
}}>发起调薪</Button>);
|
||||
}
|
||||
if (showOperateBtn && (selectedKey === "fixed" || selectedKey === "ext")) {
|
||||
if ((isDepAuth || showOperateBtn) && (selectedKey === "fixed" || selectedKey === "ext")) {
|
||||
arrList.push(<Button type="primary" onClick={() => {
|
||||
this.setState({
|
||||
adjLogRecordDialog: {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ export default class Archives extends React.Component {
|
|||
|
||||
getColumns = () => {
|
||||
const { columns, salaryArchiveDelete, selectedKey } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
|
||||
let tmpV = _.map(columns.filter(item => item.display === "TRUE"), item => {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -149,29 +149,29 @@ export default class Archives extends React.Component {
|
|||
return (
|
||||
<div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? "编辑" : "查看"}</a>
|
||||
onClick={() => this.handleEdit(record)}>{((isDepAuth || showOperateBtn) && selectedKey !== "stop") ? "编辑" : "查看"}</a>
|
||||
{
|
||||
showOperateBtn && selectedKey === "pending" &&
|
||||
(isDepAuth || showOperateBtn) && selectedKey === "pending" &&
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.stayAddToPay([record.baseInfo])}>增员</a>
|
||||
}
|
||||
{
|
||||
showOperateBtn && selectedKey === "suspend" &&
|
||||
(isDepAuth || showOperateBtn) && selectedKey === "suspend" &&
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.stayDelToStop([record.baseInfo])}>减员</a>
|
||||
}
|
||||
{
|
||||
showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
|
||||
(isDepAuth || showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" &&
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.deleteSocialArchive([record.baseInfo])}>删除档案</a>
|
||||
}
|
||||
{
|
||||
showOperateBtn && selectedKey === "stop" && salaryArchiveDelete !== "1" &&
|
||||
(isDepAuth || showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete !== "1" &&
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.cancelStopPayment([record.baseInfo])}>取消停缴</a>
|
||||
}
|
||||
{
|
||||
showOperateBtn && selectedKey === "pending" &&
|
||||
(isDepAuth || showOperateBtn) && selectedKey === "pending" &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
|
|
@ -209,7 +209,7 @@ export default class Archives extends React.Component {
|
|||
</Popover>
|
||||
}
|
||||
{
|
||||
showOperateBtn && selectedKey === "suspend" &&
|
||||
(isDepAuth || showOperateBtn) && selectedKey === "suspend" &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
|
|
@ -228,7 +228,7 @@ export default class Archives extends React.Component {
|
|||
</Popover>
|
||||
}
|
||||
{
|
||||
showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
|
||||
(isDepAuth || showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
|
|
@ -603,7 +603,7 @@ export default class Archives extends React.Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { archivesStore, taxAgentStore: { showOperateBtn, isDepAuth } } = this.props;
|
||||
const {
|
||||
selectedTab,
|
||||
selectedRowKeys,
|
||||
|
|
@ -806,7 +806,7 @@ export default class Archives extends React.Component {
|
|||
>
|
||||
<WeaTab
|
||||
datas={tabCondition}
|
||||
buttons={showOperateBtn ? btns : []}
|
||||
buttons={(isDepAuth || showOperateBtn) ? btns : []}
|
||||
counts={tabCount}
|
||||
countParam="groupid" //数量
|
||||
keyParam="viewcondition" //主键
|
||||
|
|
@ -872,9 +872,9 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
editable={false}
|
||||
selectedTab={selectedTab}
|
||||
showOperateBtn={showOperateBtn}
|
||||
showOperateBtn={isDepAuth || showOperateBtn}
|
||||
customOperate={
|
||||
(showOperateBtn && selectedKey !== "stop" && selectedTab != 0) ?
|
||||
((isDepAuth || showOperateBtn) && selectedKey !== "stop" && selectedTab != 0) ?
|
||||
[<Button type="primary" onClick={() => this.handleEditSlideSave()}>保存</Button>] : []
|
||||
}
|
||||
subItemChange={selectedTab => this.setState({ selectedTab })}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export class TaxAgentStore {
|
|||
@observable showSalaryItemBtn = false; // 薪资项目管理页面操作按钮显示权限
|
||||
@observable statisticsReportBtn = false; // 薪酬统计报表页面操作按钮显示权限
|
||||
@observable payrollPermission = false; // 薪资核算显示权限
|
||||
@observable isDepAuth = false; // 艾志薪资档案以及社保福利档案权限
|
||||
@observable loading = false; // 数据加载状态
|
||||
@observable modalVisiable = false; // EditModal 模态框
|
||||
@observable columns = [];
|
||||
|
|
@ -47,6 +48,7 @@ export class TaxAgentStore {
|
|||
@action setSalaryItemBtn = bool => (this.showSalaryItemBtn = bool);//薪资项目权限
|
||||
@action setStatisticsReportBtn = bool => (this.statisticsReportBtn = bool);//薪酬统计报表权限
|
||||
@action setPayrollPermission = bool => (this.payrollPermission = bool);// 薪资核算页面权限
|
||||
@action setIsDepAuth = bool => (this.isDepAuth = bool);// 艾志薪资档案以及社保福利档案权限
|
||||
|
||||
@action setSalarytaxAgentForm = () => (this.salarytaxAgentForm = new WeaForm());//薪资项目权限
|
||||
|
||||
|
|
@ -148,7 +150,7 @@ export class TaxAgentStore {
|
|||
return new Promise((resolve, reject) => {
|
||||
API.getPermission(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { isAdminEnable, isChief, isOpenDevolution } = data;
|
||||
const { isAdminEnable, isChief, isOpenDevolution, isDepAuth } = data;
|
||||
this.setShowOperateBtn(
|
||||
!isOpenDevolution ? true : isAdminEnable ? true : false
|
||||
);
|
||||
|
|
@ -157,6 +159,8 @@ export class TaxAgentStore {
|
|||
this.setStatisticsReportBtn(!isOpenDevolution ? true : !!(isAdminEnable || isChief));
|
||||
//薪资核算详情页面查看权限
|
||||
this.setPayrollPermission(isAdminEnable && isOpenDevolution || !isOpenDevolution);
|
||||
//艾志薪资档案以及社保福利档案权限
|
||||
this.setIsDepAuth(isDepAuth);
|
||||
resolve({ status, data });
|
||||
} else {
|
||||
reject();
|
||||
|
|
|
|||
Loading…
Reference in New Issue