diff --git a/pc4mobx/hrmSalary/pages/salary/components/comHint.js b/pc4mobx/hrmSalary/pages/salary/components/comHint.js index da3f5fb0..aea13257 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/comHint.js +++ b/pc4mobx/hrmSalary/pages/salary/components/comHint.js @@ -5,8 +5,11 @@ * Date: 2022/11/22 */ import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; + class ComHint extends Component { /* * Author: 黎永顺 @@ -18,9 +21,10 @@ class ComHint extends Component { const { isChief = true } = this.props; if (isChief) { return [ -

1、个税扣缴义务人与档案中的个税扣缴义务人匹配,修改个税扣缴义务人名称,薪资档案的个税扣缴义务人数据同步更新;

, -

2、删除个税扣缴义务人需先确认档案里无人员使用该个税扣缴义务人,否则不予删除;

, -

3、开启分权,需维护个税扣缴义务人的管理员;当前总管理员默认有管理员的权限;

+

{getLabel(111, "1、个税扣缴义务人与档案中的个税扣缴义务人匹配,修改个税扣缴义务人名称,薪资档案的个税扣缴义务人数据同步更新;")}

, +

{getLabel(111, "2、删除个税扣缴义务人需先确认档案里无人员使用该个税扣缴义务人,否则不予删除;")}

, +

{getLabel(111, "3、只有薪酬总管理员能够操作个税扣缴义务人的增减和开启/关闭分权;")}

, +

{getLabel(111, "4、开启分权,需维护个税扣缴义务人的管理员;当前总管理员默认有管理员的权限;")}

]; } else { return []; @@ -30,7 +34,7 @@ class ComHint extends Component { render() { return (
-
小提示
+
{getLabel(111, "小提示")}
{this.renderTips()}
diff --git a/pc4mobx/hrmSalary/pages/salary/components/index.less b/pc4mobx/hrmSalary/pages/salary/components/index.less index be539899..0bd7ee92 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/index.less +++ b/pc4mobx/hrmSalary/pages/salary/components/index.less @@ -28,6 +28,7 @@ width: 100%; margin: 16px 0; border: 1px solid #e5e5e5; + background: #FFF; .hintHeader { background: #f6f6f6; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index 97ebff1e..074d2590 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -229,7 +229,6 @@ class TaxAgentSlide extends Component { handleChangeSlideTab = (current) => { this.setState({ current: Number(current) }); }; - handleSubmit = (selectKey) => { const { taxFilingInfoDialofg, taxAgentId } = this.state; const { fieldForm } = this.taxInfoRef.state; @@ -267,14 +266,48 @@ class TaxAgentSlide extends Component { }; render() { - const tabs = [ - { key: 0, title: getLabel(82751, "基础设置") }, - { key: 1, title: getLabel(544342, "报税信息") }, - { key: 2, title: getLabel(124810, "人员范围") } + const { + isEdit, title, visible, onCancel, salaryOn, decentralization, isChief, taxAgentStore: { showOperateBtn } + } = this.props; + const { current, taxAgentId, taxFilingInfoDialofg, loading, verifyLoading } = this.state; + let tabs = [ + { + key: 0, title: getLabel(82751, "基础设置"), + createBtns: [ + + ], + editBtns: [ + + ], + children: + }, + { + key: 1, title: getLabel(544342, "报税信息"), + createBtns: [ + , + + ], + editBtns: [ + + ], + children: this.taxInfoRef = dom} taxAgentId={taxAgentId} isChief={isChief}/> + }, + { + key: 2, title: getLabel(124810, "人员范围"), + createBtns: [ + + ], + editBtns: [], + children: + } ]; - const { isEdit, title, visible, onCancel, salaryOn, taxAgentStore: { showOperateBtn } } = this.props; - const { current, taxAgentId, taxFilingInfoDialofg } = this.state; - const tabData = !salaryOn ? _.filter(tabs, it => it.key !== 1) : tabs; + tabs = !salaryOn ? _.filter(tabs, it => it.key !== 1) : tabs; return ( { - _.map(tabData, item => { + _.map(tabs, item => { const { key, title } = item; return ; }) } } - { - this.renderChildren() - } + {_.find(tabs, o => current === o.key).children}
- onOperate("edit", record.id)}>{getLabel(501169, "编辑")} { isChief && - onOperate("delete", record.id)}>{getLabel(535052, "删除")} } - onOperate("log", record.id)}>{getLabel(545781, "操作日志")} diff --git a/pc4mobx/hrmSalary/pages/salary/index.less b/pc4mobx/hrmSalary/pages/salary/index.less index de04ce9f..6c63517f 100644 --- a/pc4mobx/hrmSalary/pages/salary/index.less +++ b/pc4mobx/hrmSalary/pages/salary/index.less @@ -1,5 +1,37 @@ .salaryAgentWrapper { + .wea-new-top-content { + background: #f6f6f6; + padding: 8px 16px 0; + } + + .wea-new-top { + .wea-input-focus { + height: 31.36px; + line-height: 0; + } + } + .comContent { + .wea-search-group:first-child { + margin-bottom: 16px; + } + + .wea-search-group { + padding: 0; + background: #fff; + + .wea-title { + padding: 0 10px; + } + + .wea-content { + padding: 0; + + .wea-form-item { + padding-left: 18px; + } + } + } .customTitleWrapper { width: 100%; diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js index 03e55f5d..300037c3 100644 --- a/pc4mobx/hrmSalary/pages/salary/taxAgent.js +++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js @@ -5,8 +5,8 @@ import { WeaCheckbox, WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchG import ComHint from "./components/comHint"; import TaxAgentTable from "./components/taxAgentTable"; import TaxAgentSlide from "./components/taxAgentSlide"; -import * as API from "../../apis/taxAgent"; import LogDialog from "../../components/logViewModal"; +import * as API from "../../apis/taxAgent"; import "./index.less"; const { getLabel } = WeaLocaleProvider; @@ -20,10 +20,9 @@ class TaxAgent extends Component { syncLoading: false, //同步人员范围loading searchValue: "", decentralization: "0", //启用分权 - permission: {}, taxAgentSlideProps: { isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"), - taxAgentId: "", current: 0, salaryOn: true + taxAgentId: "", current: 0, salaryOn: false }, logDialogVisible: false, filterConditions: "[]" @@ -33,7 +32,6 @@ class TaxAgent extends Component { componentDidMount() { this.getTaxAgentBaseForm(); - this.getPermission(); } getTaxAgentBaseForm = () => { @@ -44,14 +42,6 @@ class TaxAgent extends Component { } }); }; - getPermission = () => { - const { taxAgentStore: { getPermission } } = this.props; - getPermission().then(({ status, data }) => { - if (status) { - this.setState({ permission: data }); - } - }); - }; /* * Author: 黎永顺 * Description:开启关闭个税扣缴义务人开关 @@ -71,7 +61,6 @@ class TaxAgent extends Component { if (status) { message.success(`${devolutionStatus === "0" ? "停用" : "启用"}分权成功`); this.getTaxAgentBaseForm(); - this.getPermission(); this.taxAgentTableRef.getTaxAgentList(); setSalarytaxAgentForm(); } else { @@ -172,9 +161,9 @@ class TaxAgent extends Component { }; render() { + const { taxAgentStore: { PageAndOptAuth: permission } } = this.props; const { - searchValue, decentralization, taxAgentSlideProps, - permission, syncLoading, logDialogVisible, filterConditions + searchValue, decentralization, taxAgentSlideProps, syncLoading, logDialogVisible, filterConditions } = this.state; const btns = [
; + const showOperateBtn = permission.opts.includes("admin"); return (
} iconBgcolor="#F14A2D" - buttons={btns} + buttons={showOperateBtn ? btns : btns.slice(1)} showDropIcon onDropMenuClick={key => this.handleOperate(key)} dropMenuDatas={[ { @@ -214,13 +204,13 @@ class TaxAgent extends Component {
{ permission.isChief && - + } - + this.taxAgentTableRef = dom}/> diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index 94d9898f..d4e25ec5 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -9,6 +9,11 @@ import { PAGE } from "../config"; const { TableStore } = WeaTableNew; export class TaxAgentStore { + @observable salarytaxAgentForm = new WeaForm(); //新版个税扣缴义务人表单实体 + @observable taxfillInfoForm = new WeaForm(); //报税信息查看form + @action setTaxfillInfoForm = () => this.taxfillInfoForm = new WeaForm(); //报税信息form初始化 + @observable deptfillInfoForm = new WeaForm(); //报税信息部门备案form + @action initDeptfillInfoForm = () => this.deptfillInfoForm = new WeaForm(); //报税信息部门备案form初始化 @observable advanceForm = new WeaForm(); //权限-角色高级搜索form表单 @observable roleForm = new WeaForm(); //权限-角色form表单 @action initRoleForm = () => this.roleForm = new WeaForm(); @@ -52,6 +57,8 @@ export class TaxAgentStore { @action setStatisticsReportBtn = bool => (this.statisticsReportBtn = bool);//薪酬统计报表权限 @action setPayrollPermission = bool => (this.payrollPermission = bool);// 薪资核算页面权限 + @action setSalarytaxAgentForm = () => (this.salarytaxAgentForm = new WeaForm());//薪资项目权限 + // 初始化操作 @action doInit = params => {