custom-艾志工业-合并个税

This commit is contained in:
黎永顺 2024-05-30 10:57:02 +08:00
parent 10099ab098
commit 93acc50d74
5 changed files with 36 additions and 14 deletions

View File

@ -38,6 +38,7 @@ class Calculate extends Component {
}
renderCalculateOpts = () => {
const { taxAgentStore: { showOperateBtn, isTaxDeclareAdmin } } = this.props;
const { queryParams, isRefresh, azOperate } = this.state;
let calculateOpts = [
<Button type="primary" onClick={() => this.setState({
@ -57,7 +58,8 @@ class Calculate extends Component {
queryParams: { ...queryParams, ...v }
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
];
return !azOperate ? calculateOpts.slice(1) : calculateOpts;
return (showOperateBtn || isTaxDeclareAdmin) ? calculateOpts : calculateOpts.slice(1);
// return !azOperate ? calculateOpts.slice(1) : calculateOpts;
};
onDropMenuClick = (key, targetid = "") => {
switch (key) {

View File

@ -5,6 +5,7 @@
* Date: 2023/8/18
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLeftRightLayout, WeaLocaleProvider, WeaTab } from "ecCom";
import { Button, message, Modal, Spin } from "antd";
import TaxDeclarationInfo from "./components/taxDeclarationInfo";
@ -46,6 +47,8 @@ const APIFox = {
cancelFeedback: taxdeclaratioGetCancelFeedback//作废反馈
};
@inject("taxAgentStore")
@observer
class Index extends Component {
constructor(props) {
super(props);
@ -347,6 +350,7 @@ class Index extends Component {
};
render() {
const { taxAgentStore: { showOperateBtn, isTaxDeclareAdmin } } = this.props;
const {
tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide,
editTabVisible, reportType, showLeft, azOperate
@ -390,7 +394,7 @@ class Index extends Component {
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>,
<Button type="ghost"
loading={loading.cancel}
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>,
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>
//艾志项目-去掉刷新缴款状态
// <Button type="ghost"
// loading={loading.refreshingPay}
@ -434,7 +438,8 @@ class Index extends Component {
onCollapse={showLeft => this.setState({ showLeft })}/>}
onCollapse={showLeft => this.setState({ showLeft })}>
<div className="declareDetail-layout">
<TaxDeclarationInfo declareInfo={declareInfo} onOperate={fun => this[fun]()} azOperate={azOperate}/>
<TaxDeclarationInfo declareInfo={declareInfo} onOperate={fun => this[fun]()}
azOperate={showOperateBtn || isTaxDeclareAdmin}/>
<div className="declareDetail-layout-content">
<WeaTab
keyParam="viewcondition" selectedKey={selectedKey} showAddBtn
@ -442,8 +447,8 @@ class Index extends Component {
onChange={(v) => this.setState({ selectedKey: v }, () => this.getDetailList())}
searchType={["base"]} searchsBasePlaceHolder={getLabel(26919, "请输入姓名")}
onSearchChange={keyword => this.setState({ keyword })}
onSearch={this.getDetailList} datas={_.map(tabs, o => ({ ...o, editable: azOperate }))}
buttons={azOperate ? btns : _.filter(btns, o=> o.props.children === getLabel(111, "导出"))}
onSearch={this.getDetailList} datas={_.map(tabs, o => ({ ...o, editable: showOperateBtn || isTaxDeclareAdmin }))}
buttons={(showOperateBtn || isTaxDeclareAdmin) ? btns : _.filter(btns, o => o.props.children === getLabel(111, "导出"))}
/>
{/*个税申报表-新增编辑框*/}
<IncomeTaxDeclarationPersonnelSlide

View File

@ -21,7 +21,8 @@ import {
employeedeclareList4Add,
employeedeclareList4Update,
employeedeclareRefresh,
employeeDelete, employeeInvalid,
employeeDelete,
employeeInvalid,
getDeclareFeedback
} from "../../apis/declare";
import { advanceConditions, submitStatus } from "./constants";
@ -163,7 +164,10 @@ class Index extends Component {
* Date: 2023/8/14
*/
queryEmployeeList = () => {
const { employeeDeclareStore: { advanceForm: form } } = this.props;
const {
employeeDeclareStore: { advanceForm: form },
taxAgentStore: { showOperateBtn, isTaxDeclareAdmin }
} = this.props;
const { pageInfo, declareStatus, taxCycle, selectedKey, selectedRowKeys } = this.state;
const { departmentIds, positionIds, ...formParams } = form.getFormParams();
const payload = {
@ -199,7 +203,7 @@ class Index extends Component {
})
};
this.postMessageToChild(payload);
if (!this.state.azOperate) {
if (!showOperateBtn && !isTaxDeclareAdmin) {
const style = document.createElement("style");
// 设置style内容例如添加CSS规则
style.innerHTML = `
@ -458,7 +462,9 @@ class Index extends Component {
selectedKey, showSearchAd, declareStatus, declareStatusList, taxCycle, declareEditDialog, loading,
pageInfo, adConditons, employmentTypeList, employmentStatusList, azOperate
} = this.state;
const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form, declareForm } } = this.props;
const {
taxAgentStore: { showOperateBtn, isTaxDeclareAdmin }, employeeDeclareStore: { advanceForm: form, declareForm }
} = this.props;
const menu = (
<Menu onClick={this.handleMenuClick}>
<Menu.Item key="1">{getLabel(32136, "批量删除")}</Menu.Item>
@ -530,13 +536,13 @@ class Index extends Component {
/>
];
// !showOperateBtn && tabBtns.shift();
(selectedKey !== "list" || !azOperate) && tabBtns.shift();
(selectedKey !== "list" || (!showOperateBtn && !isTaxDeclareAdmin)) && tabBtns.shift();
selectedKey !== "list" && tabBtns.shift();
return (
<WeaTop
title={getLabel(544289, "人员信息报送")} iconBgcolor="#F14A2D"
icon={<i className="icon-coms-fa"/>} className="declareWrapper"
buttons={azOperate ? buttons : buttons.slice(0, 1)}
buttons={(showOperateBtn || isTaxDeclareAdmin) ? buttons : buttons.slice(0, 1)}
// buttons={showOperateBtn ? buttons : []}
>
<div style={{ height: "100%", background: "#f6f6f6" }} className="flex flex-rollback">

View File

@ -54,13 +54,17 @@ class TaxAgentSlide extends Component {
const { taxAgentStore: { salarytaxAgentForm } } = this.props;
API.getTaxAgentForm({ id: taxAgentId }).then(({ status, data }) => {
if (status) {
const { name, description, adminUserIds, sortedIndex } = data;
const { name, description, adminUserIds, azTaxDeclareAdminUserIds, sortedIndex } = data;
salarytaxAgentForm.updateFields({
name: { value: name },
adminUserIds: {
value: _.map(adminUserIds, it => it.id.toString()).join(","),
valueSpan: _.map(adminUserIds, it => it.content).join(",")
},
azTaxDeclareAdminUserIds: {
value: _.map(azTaxDeclareAdminUserIds, it => it.id.toString()).join(","),
valueSpan: _.map(azTaxDeclareAdminUserIds, it => it.content).join(",")
},
sortedIndex: { value: sortedIndex },
description: { value: description }
});
@ -118,7 +122,8 @@ class TaxAgentSlide extends Component {
const formData = salarytaxAgentForm.getFormParams();
const payload = {
...formData,
adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : []
adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : [],
azTaxDeclareAdminUserIds: formData.azTaxDeclareAdminUserIds ? formData.azTaxDeclareAdminUserIds.split(",") : []
};
taxAgentId ? this.updateTaxAgent({ ...payload, id: taxAgentId }) : this.saveTaxAgent(payload);
} else {

View File

@ -26,6 +26,7 @@ export class TaxAgentStore {
@observable statisticsReportBtn = false; // 薪酬统计报表页面操作按钮显示权限
@observable payrollPermission = false; // 薪资核算显示权限
@observable isDepAuth = false; // 艾志薪资档案以及社保福利档案权限
@observable isTaxDeclareAdmin = false; // 艾志是否是个税申报管理员
@observable loading = false; // 数据加载状态
@observable modalVisiable = false; // EditModal 模态框
@observable columns = [];
@ -50,6 +51,7 @@ export class TaxAgentStore {
@action setStatisticsReportBtn = bool => (this.statisticsReportBtn = bool);//薪酬统计报表权限
@action setPayrollPermission = bool => (this.payrollPermission = bool);// 薪资核算页面权限
@action setIsDepAuth = bool => (this.isDepAuth = bool);// 艾志薪资档案以及社保福利档案权限
@action setIsTaxDeclareAdmin = bool => (this.isTaxDeclareAdmin = bool);// 艾志是否是个税申报管理员设置
@action setSalarytaxAgentForm = () => (this.salarytaxAgentForm = new WeaForm());//薪资项目权限
@ -151,7 +153,7 @@ export class TaxAgentStore {
return new Promise((resolve, reject) => {
API.getPermission(params).then(({ status, data }) => {
if (status) {
const { isAdminEnable, isChief, isOpenDevolution, isDepAuth } = data;
const { isAdminEnable, isChief, isOpenDevolution, isDepAuth, isTaxDeclareAdmin } = data;
this.setShowOperateBtn(
!isOpenDevolution ? true : isAdminEnable ? true : false
);
@ -162,6 +164,8 @@ export class TaxAgentStore {
this.setPayrollPermission((isOpenDevolution && isAdminEnable) || !isOpenDevolution);
//艾志薪资档案以及社保福利档案权限---权限调整去掉这个逻辑
// this.setIsDepAuth(isDepAuth);
//艾志是否是个税申报管理员设置
this.setIsTaxDeclareAdmin(isTaxDeclareAdmin);
resolve({ status, data });
} else {
reject();