From 2c8ce14def27b29ffae941636cec1790fc99cec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 9 Aug 2023 15:02:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=AF=B9=E6=8E=A5e10?= =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../intelligentCalculateSalarySettings.js | 4 +++ pc4mobx/hrmSalary/apis/taxAgent.js | 16 ++++----- .../pages/salary/components/constants.js | 35 +++++++++++++------ .../pages/salary/components/taxAgentSlide.js | 18 +++++----- .../salary/components/taxDeclarationInfo.js | 35 +++++++++++-------- pc4mobx/hrmSalary/pages/salary/taxAgent.js | 15 +++++--- 6 files changed, 74 insertions(+), 49 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js index 9ce1d575..d545b9bb 100644 --- a/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js +++ b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js @@ -5,6 +5,10 @@ import { postFetch } from "../util/request"; export const apiflowBillingConfigGet = (params) => { return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/get", "GET", params); }; +//智能算薪-查询计费配置开关状态 +export const apiflowBillingConfigStatus = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/status", "GET", params); +}; //智能算薪-计费配置保存 export const apiflowBillingConfigSave = (params) => { return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/save", params); diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index 3ca3a72d..38852581 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -1,5 +1,5 @@ import { WeaTools } from "ecCom"; -import { formPost, postFetch } from "../util/request"; +import { postFetch } from "../util/request"; //个税扣缴义务人列表 export const getTaxAgentList = (params) => { @@ -7,9 +7,9 @@ export const getTaxAgentList = (params) => { method: "POST", mode: "cors", headers: { - "Content-Type": "application/json", + "Content-Type": "application/json" }, - body: JSON.stringify(params), + body: JSON.stringify(params) }).then((res) => res.json()); }; //同步人员范围 @@ -18,9 +18,9 @@ export const taxAgentRangeSync = (params) => { method: "POST", mode: "cors", headers: { - "Content-Type": "application/json", + "Content-Type": "application/json" }, - body: JSON.stringify(params), + body: JSON.stringify(params) }).then((res) => res.json()); }; @@ -122,9 +122,5 @@ export const hasIconInTax = (params) => { }; //获取报税信息表单 export const taxReturnGetForm = (params) => { - return WeaTools.callApi( - "/api/bs/hrmsalary/taxReturn/getForm", - "GET", - params - ); + return WeaTools.callApi("/api/bs/hrmsalary/taxReturn/getForm", "GET", params); }; diff --git a/pc4mobx/hrmSalary/pages/salary/components/constants.js b/pc4mobx/hrmSalary/pages/salary/components/constants.js index 0d0eede3..5e4fc6c7 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/constants.js +++ b/pc4mobx/hrmSalary/pages/salary/components/constants.js @@ -2,58 +2,68 @@ export const fieldList = [ { key: "name", label: "名称", + lanId: 33439, type: "TEXT", viewAttr: 1 }, { - key: "dutyParagraph", + key: "taxCode", label: "税号", + lanId: 111, type: "TEXT", viewAttr: 3 }, { - key: "taxDeclarationRegion", + key: "city", label: "报税所属区域", + lanId: 111, type: "SELECT", viewAttr: 3 }, { - key: "areaNumber", + key: "areaCode", label: "行政区划代码", + lanId: 111, type: "TEXT", viewAttr: 3 }, { - key: "passwordVerifyType", + key: "passwordType", label: "密码校验类型", + lanId: 111, type: "RADIO", viewAttr: 3, options: [ { - key: "0", - showname: "个税网报密码" + key: "TAX_NET_PASSWORD", + showname: "个税网报密码", + lanId: 111, }, { - key: "2", - showname: "实名账号密码" + key: "REAL_NAME_PASSWORD", + showname: "实名账号密码", + lanId: 111, } ] }, { - key: "realNameAccount", + key: "account", label: "实名账号", + lanId: 111, type: "TEXT", viewAttr: 3 }, { - key: "realNameAccountPassword", + key: "realNamePassword", label: "实名账号密码", + lanId: 111, type: "PASSWORD", viewAttr: 3 }, { - key: "taxOnlinePassword", + key: "netPassword", label: "个税网报密码", + lanId: 111, type: "PASSWORD", viewAttr: 3 }, @@ -61,17 +71,20 @@ export const fieldList = [ key: "registrationNo", label: "登记序号", type: "TEXT", + lanId: 111, viewAttr: 1 }, { key: "departmentCode", label: "部门编码", + lanId: 111, type: "TEXT", viewAttr: 1 }, { key: "taxInforVerifiyStatus", label: "报税信息验证状态", + lanId: 111, type: "TEXT", viewAttr: 1 } diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index e80e33e4..f760a72d 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -18,11 +18,6 @@ import "./index.less"; const { getLabel } = WeaLocaleProvider; const Step = WeaSteps.Step; -const tabs = [ - { key: 0, title: getLabel(82751, "基础设置") }, - { key: 1, title: getLabel(111, "报税信息") }, - { key: 2, title: getLabel(124810, "人员范围") } -]; @inject("taxAgentStore") @observer @@ -74,7 +69,7 @@ class TaxAgentSlide extends Component { * Date: 2022/12/1 */ saveTaxAgent = (payload) => { - const { onOk } = this.props; + const { onOk, salaryOn } = this.props; const { current } = this.state; this.setState({ loading: true }); API.saveTaxAgent(payload).then(({ status, data, errormsg }) => { @@ -82,7 +77,7 @@ class TaxAgentSlide extends Component { if (status) { message.success(getLabel(22619, "保存成功")); this.setState({ - current: true ? current + 2 : current + 1, + current: !salaryOn ? current + 2 : current + 1, taxAgentId: data }, () => onOk()); } else { @@ -189,9 +184,14 @@ class TaxAgentSlide extends Component { }; render() { - const { isEdit, title, visible, onCancel, taxAgentStore: { showOperateBtn } } = this.props; + const tabs = [ + { key: 0, title: getLabel(82751, "基础设置") }, + { key: 1, title: getLabel(544342, "报税信息") }, + { key: 2, title: getLabel(124810, "人员范围") } + ]; + const { isEdit, title, visible, onCancel, salaryOn, taxAgentStore: { showOperateBtn } } = this.props; const { current, taxAgentId } = this.state; - const tabData = true && _.filter(tabs, it => it.key !== 1); + const tabData = !salaryOn ? _.filter(tabs, it => it.key !== 1) : tabs; return ( it.key !== "realNameAccount" && it.key !== "realNameAccountPassword") + fieldItem: _.filter(_.map(fieldList, item => ({ + ...item, + label: getLabel(item.lanId, item.label) + })), it => it.key !== "account" && it.key !== "realNamePassword") }, () => { this.taxReturnGetForm(); }); @@ -52,14 +57,14 @@ class TaxDeclarationInfo extends Component { [key]: value } }, () => { - if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "2") { + if (key === "passwordType" && this.state.fieldForm.passwordType === "REAL_NAME_PASSWORD") { this.setState({ - fieldItem: _.filter(fieldList, it => it.key !== "taxOnlinePassword"), + fieldItem: _.filter(fieldList, it => it.key !== "netPassword"), fieldForm: { ...this.state.fieldForm, realNameAccount: "", realNameAccountPassword: "" } }); - } else if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "0") { + } else if (key === "passwordType" && this.state.fieldForm.passwordType === "TAX_NET_PASSWORD") { this.setState({ - fieldItem: _.filter(fieldList, it => it.key !== "realNameAccount" && it.key !== "realNameAccountPassword"), + fieldItem: _.filter(fieldList, it => it.key !== "account" && it.key !== "realNamePassword"), fieldForm: { ...this.state.fieldForm, taxOnlinePassword: "" } }); } @@ -87,7 +92,9 @@ class TaxDeclarationInfo extends Component { } { type === "RADIO" && - ({ ...it, showname: getLabel(it.lanId, it.showname) }))} + viewAttr={viewAttr} onChange={(v) => this.handleChangeValue(key, v)}/> } ; diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js index 3c611e6f..4cd931fc 100644 --- a/pc4mobx/hrmSalary/pages/salary/taxAgent.js +++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js @@ -2,6 +2,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { Button, message, Modal } from "antd"; import { WeaCheckbox, WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup, WeaTop } from "ecCom"; +import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalarySettings"; import ComHint from "./components/comHint"; import TaxAgentTable from "./components/taxAgentTable"; import TaxAgentSlide from "./components/taxAgentSlide"; @@ -21,11 +22,8 @@ class TaxAgent extends Component { decentralization: "0", //启用分权 permission: {}, taxAgentSlideProps: { - isEdit: false, - visible: false, - title: getLabel(543629, "新增个税扣缴义务人"), - taxAgentId: "", - current: 0 + isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"), + taxAgentId: "", current: 0, salaryOn: true } }; this.taxAgentTableRef = null; @@ -34,6 +32,7 @@ class TaxAgent extends Component { componentDidMount() { this.getTaxAgentBaseForm(); this.getPermission(); + this.apiflowBillingConfigStatus(); } getTaxAgentBaseForm = () => { @@ -52,6 +51,12 @@ class TaxAgent extends Component { } }); }; + apiflowBillingConfigStatus = () => { + const { taxAgentSlideProps } = this.state; + apiflowBillingConfigStatus().then(({ status, data }) => { + if (status) this.setState({ taxAgentSlideProps: { ...taxAgentSlideProps, salaryOn: data } }); + }); + }; /* * Author: 黎永顺 * Description:开启关闭个税扣缴义务人开关