From 80f61812194697afdaaed9a5953ee9f3fea9d7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 22 Nov 2022 10:54:59 +0800 Subject: [PATCH 001/165] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E9=A1=B5=E9=9D=A2=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 3 +- .../pages/salary/components/comHint.js | 42 +++++++++++++++++++ .../pages/salary/components/index.less | 24 +++++++++++ pc4mobx/hrmSalary/pages/salary/index.less | 7 ++++ pc4mobx/hrmSalary/pages/salary/taxAgent.js | 25 +++++++++++ 5 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/hrmSalary/pages/salary/components/comHint.js create mode 100644 pc4mobx/hrmSalary/pages/salary/components/index.less create mode 100644 pc4mobx/hrmSalary/pages/salary/index.less create mode 100644 pc4mobx/hrmSalary/pages/salary/taxAgent.js diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 626b9ca2..fdfd4990 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -21,7 +21,8 @@ import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; import Declare from "./pages/declare"; import TaxRate from "./pages/taxRate"; -import TaxAgent from "./pages/taxAgent"; +// import TaxAgent from "./pages/taxAgent"; +import TaxAgent from "./pages/salary/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail"; import CompareDetail from "./pages/calculateDetail/compareDetail"; diff --git a/pc4mobx/hrmSalary/pages/salary/components/comHint.js b/pc4mobx/hrmSalary/pages/salary/components/comHint.js new file mode 100644 index 00000000..da3f5fb0 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/comHint.js @@ -0,0 +1,42 @@ +/* + * Author: 黎永顺 + * name: 个税扣缴义务人小提示组件 + * Description: + * Date: 2022/11/22 + */ +import React, { Component } from "react"; +import "./index.less"; + +class ComHint extends Component { + /* + * Author: 黎永顺 + * Description: 提示语注释 + * Params: isChief=总管理员 + * Date: 2022/11/22 + */ + renderTips = () => { + const { isChief = true } = this.props; + if (isChief) { + return [ +

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

, +

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

, +

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

+ ]; + } else { + return []; + } + }; + + render() { + return ( +
+
小提示
+
+ {this.renderTips()} +
+
+ ); + } +} + +export default ComHint; diff --git a/pc4mobx/hrmSalary/pages/salary/components/index.less b/pc4mobx/hrmSalary/pages/salary/components/index.less new file mode 100644 index 00000000..ec181e16 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/index.less @@ -0,0 +1,24 @@ +.comHint { + width: 100%; + margin: 16px 0; + border: 1px solid #e5e5e5; + + .hintHeader { + background: #f6f6f6; + height: 40px; + border-bottom: 1px solid #e5e5e5; + padding-left: 16px; + line-height: 40px; + } + + .hintTips { + width: 100%; + color: #999; + line-height: 20px; + padding: 0 16px; + display: inline-block; + p{ + margin: 1rem 0; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/salary/index.less b/pc4mobx/hrmSalary/pages/salary/index.less new file mode 100644 index 00000000..b9c1951d --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/index.less @@ -0,0 +1,7 @@ +.salaryAgentWrapper{ + .comContent{ + .wea-search-group{ + padding: 0; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js new file mode 100644 index 00000000..eaa8fc0c --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js @@ -0,0 +1,25 @@ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaSearchGroup, WeaTop } from "ecCom"; +import ComHint from "./components/comHint"; +import "./index.less"; + +@inject("taxAgentStore") +@observer +class TaxAgent extends Component { + render() { + return ( +
+ } iconBgcolor="#F14A2D"> +
+ + +
+ +
+
+ ); + } +} + +export default TaxAgent; From 9fcf7c1b260b0f603c38e6146489a65f7215c59e 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, 30 Nov 2022 17:38:01 +0800 Subject: [PATCH 002/165] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salary/components/baseSettings.js | 34 ++++ .../pages/salary/components/index.less | 33 +++- .../pages/salary/components/personalScope.js | 136 ++++++++++++++ .../salary/components/personalScopeModal.js | 119 +++++++++++++ .../salary/components/personalScopeTable.js | 135 ++++++++++++++ .../pages/salary/components/taxAgentSlide.js | 162 +++++++++++++++++ .../pages/salary/components/taxAgentTable.js | 116 ++++++++++++ pc4mobx/hrmSalary/pages/salary/index.less | 39 +++- pc4mobx/hrmSalary/pages/salary/taxAgent.js | 167 +++++++++++++++++- pc4mobx/hrmSalary/stores/taxAgent.js | 6 + pc4mobx/hrmSalary/util/index.js | 1 + 11 files changed, 939 insertions(+), 9 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/salary/components/baseSettings.js create mode 100644 pc4mobx/hrmSalary/pages/salary/components/personalScope.js create mode 100644 pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js create mode 100644 pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js create mode 100644 pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js create mode 100644 pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js diff --git a/pc4mobx/hrmSalary/pages/salary/components/baseSettings.js b/pc4mobx/hrmSalary/pages/salary/components/baseSettings.js new file mode 100644 index 00000000..ffdd7870 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/baseSettings.js @@ -0,0 +1,34 @@ +/* + * Author: 黎永顺 + * name: 基础设置 + * Description: + * Date: 2022/11/29 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions"; +import { getSearchs } from "../../../util"; + +@inject("taxAgentStore") +@observer +class BaseSettings extends Component { + + componentDidMount() { + + } + + render() { + const { taxAgentStore: { salarytaxAgentForm }, decentralization } = this.props; + return ( +
+ { + decentralization === "0" ? + getSearchs(salarytaxAgentForm, decentralizationConditions, 1, true) : + getSearchs(salarytaxAgentForm, editConditions, 1, true) + } +
+ ); + } +} + +export default BaseSettings; diff --git a/pc4mobx/hrmSalary/pages/salary/components/index.less b/pc4mobx/hrmSalary/pages/salary/components/index.less index ec181e16..e1bcdfe8 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/index.less +++ b/pc4mobx/hrmSalary/pages/salary/components/index.less @@ -17,8 +17,39 @@ line-height: 20px; padding: 0 16px; display: inline-block; - p{ + + p { margin: 1rem 0; } } } + +.slideOuterWrapper { + .wea-slide-modal-title { + height: initial; + line-height: initial; + text-align: left; + } + + .rodal-close { + z-index: 99; + top: 10px !important; + } + +} + +@media (min-width: 1260px) { + .slideOuterWrapper { + .reqTopWrapper .wea-new-top-req-title > div:first-child > div { + max-width: 100% !important; + } + } +} + +@media screen and (min-width: 1060px) and (max-width: 1260px) { + .slideOuterWrapper { + .reqTopWrapper .wea-new-top-req-title > div:first-child > div { + max-width: calc(100% - 96px) !important; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScope.js b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js new file mode 100644 index 00000000..7486aa81 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js @@ -0,0 +1,136 @@ +/* + * Author: 黎永顺 + * name: 人员范围 + * Description: + * Date: 2022/11/30 + */ +import React, { Component } from "react"; +import { message, Modal } from "antd"; +import { inject, observer } from "mobx-react"; +import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom"; +import { taxAgentRangeDelete } from "../../../apis/taxAgent"; +import PersonalScopeTable from "./personalScopeTable"; +import PersonalScopeModal from "./personalScopeModal"; + + +@inject("taxAgentStore") +@observer +class PersonalScope extends Component { + constructor(props) { + super(props); + this.state = { + searchValue: "", + selectedKey: "listInclude", + rowKeys: [], + personalAddModal: { + visible: false, + title: "关联人员" + } + }; + this.personalScopeTableRef = null; + } + + componentDidMount() { + const { taxAgentStore: { hasIconInTax } } = this.props; + hasIconInTax(); + } + + /* + * Author: 黎永顺 + * Description: 删除人员范围 + * Params: + * Date: 2022/11/30 + */ + taxAgentRangeDelete = () => { + Modal.confirm({ + title: "信息确认", + content: "确认要删除吗?", + onOk: () => { + taxAgentRangeDelete(this.state.rowKeys).then(({ status, errormsg }) => { + if (status) { + message.success("删除成功"); + this.setState({ rowKeys: [] }, () => { + this.personalScopeTableRef.clearRowkeys(); + }); + } else { + message.error(errormsg || "删除失败"); + } + }); + }, + onCancel: () => { + } + }); + }; + /* + * Author: 黎永顺 + * Description:新增人员范围 + * Params: + * Date: 2022/11/30 + */ + handleAddPersonal = () => { + const { personalAddModal } = this.state; + this.setState({ + personalAddModal: { ...personalAddModal, visible: true } + }); + }; + + render() { + const { selectedKey, searchValue, rowKeys, personalAddModal } = this.state; + const { taxAgentStore: { hideIconInTax, showSalaryItemBtn } } = this.props; + const topTab = [ + { + title: "管理范围", + viewcondition: "listInclude" + }, + { + title: "从范围中排除", + viewcondition: "listExclude" + } + ]; + const btns = (hideIconInTax || showSalaryItemBtn) ? [ + , + , + this.setState({ searchValue })} + placeholder="请输入对象" + onSearch={() => this.personalScopeTableRef.getPersonalScopeList()} + /> + ] : [ this.setState({ searchValue })} + placeholder="请输入对象" + onSearch={() => this.personalScopeTableRef.getPersonalScopeList()} + />]; + return ( +
+ this.setState({ selectedKey })} + /> + this.personalScopeTableRef = dom} + tabActive={selectedKey} + searchValue={searchValue} + onChangeSelectKey={rowKeys => this.setState({ rowKeys })} + /> + + this.setState({ + personalAddModal: { ...personalAddModal, visible: false } + })}/> +
+ ); + } +} + +export default PersonalScope; diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js new file mode 100644 index 00000000..0dcaa106 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js @@ -0,0 +1,119 @@ +/* + * Author: 黎永顺 + * name: 新增人员范围弹框 + * Description: + * Date: 2022/11/30 + */ +import React, { Component } from "react"; +import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; +import { Button } from "antd"; +import { getTaxAgentRangeForm } from "../../../apis/taxAgent"; + +class PersonalScopeModal extends Component { + constructor(props) { + super(props); + this.state = { + employeeStatus: [], + targetTypeList: [], + targetType: "EMPLOYEE", + targetTypeIds: "" + }; + } + + componentDidMount() { + this.getTaxAgentRangeForm(); + } + + getTaxAgentRangeForm = () => { + getTaxAgentRangeForm().then(({ status, data }) => { + if (status) { + const { employeeStatus, targetTypeList } = data; + this.setState({ + targetTypeList: _.map(targetTypeList, it => ({ key: it.id, showname: it.name })), + employeeStatus + }); + } + }); + }; + renderBrowser = () => { + const { targetType, targetTypeIds } = this.state; + let browserType = {}; + switch (targetType) { + case "EMPLOYEE": + browserType = { ...browserType, type: 17, title: "人员选择" }; + break; + case "DEPT": + browserType = { ...browserType, type: 57, title: "部门选择" }; + break; + case "SUBCOMPANY": + browserType = { ...browserType, type: 164, title: "分部选择" }; + break; + case "POSITION": + browserType = { ...browserType, type: 278, title: "岗位选择" }; + break; + default: + break; + } + return { + this.setState({ ids }); + }} + />; + }; + handleChangeTargetType = (targetType) => { + this.setState({ + targetType + }); + }; + + render() { + const { onCancel, title, visible } = this.props; + const { employeeStatus, targetTypeList, targetType } = this.state; + const buttons = [ + , + + ]; + return ( + + + +
+ + {this.renderBrowser()} +
+
+ + +
+
+ ); + } +} + +export default PersonalScopeModal; diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js b/pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js new file mode 100644 index 00000000..faa84352 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js @@ -0,0 +1,135 @@ +/* + * Author: 黎永顺 + * name: 人员范围列表数据 + * Description: + * Date: 2022/11/30 + */ +import React, { Component } from "react"; +import { WeaTable } from "ecCom"; +import { getTaxAgentRangeListExclude, getTaxAgentRangeListInclude } from "../../../apis/taxAgent"; +import "./index.less"; +import { calcPageNo } from "../../../util"; + +const APIFox = { + listInclude: getTaxAgentRangeListInclude, + listExclude: getTaxAgentRangeListExclude +}; + +class PersonalScopeTable extends Component { + constructor(props) { + super(props); + this.state = { + loading: { + query: false + }, + dataSource: [], + columns: [], + selectedRowKeys: [], + pageInfo: { + current: 1, + pageSize: 10, + total: 0 + } + }; + } + + componentDidMount() { + this.getPersonalScopeList(); + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.tabActive !== this.props.tabActive) { + this.setState({ selectedRowKeys: [] }, () => { + this.getPersonalScopeList(nextProps.tabActive); + nextProps.onChangeSelectKey([]); + }); + } + } + + getPersonalScopeList = (tabActive = this.props.tabActive) => { + const { searchValue } = this.props; + const { pageInfo, loading } = this.state; + const payload = { + targetName: searchValue, + ...pageInfo + }; + this.setState({ loading: { ...loading, query: true } }); + APIFox[tabActive](payload).then(({ status, data }) => { + this.setState({ loading: { ...loading, query: false } }); + if (status) { + const { pageNum: current, pageSize, total, columns, list: dataSource } = data; + this.setState({ + pageInfo: { ...pageInfo, current, pageSize, total }, + dataSource, + columns: _.map(columns, item => { + return { + ...item, + render: (text) => { + return {text}; + } + }; + }) + }); + } + }).catch(() => { + this.setState({ loading: { ...loading, query: false } }); + }); + }; + + /* + * Author: 黎永顺 + * Description: 清空选中项 + * Params: + * Date: 2022/11/30 + */ + clearRowkeys = () => { + const { pageInfo, selectedRowKeys } = this.state; + this.setState({ + selectedRowKeys: [], + pageInfo: { + ...pageInfo, + current: calcPageNo(pageInfo.total, pageInfo.current, 10, selectedRowKeys.length) + } + }, () => { + this.getPersonalScopeList(); + }); + }; + + render() { + const { dataSource, columns, pageInfo, loading, selectedRowKeys } = this.state; + const { onChangeSelectKey } = this.props; + const pagination = { + ...pageInfo, + showTotal: total => `共 ${total} 条`, + showQuickJumper: true, + pageSizeOptions: ["10", "20", "50", "100"], + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => { + this.getPersonalScopeList(); + }); + } + }; + const rowSelection = { + selectedRowKeys, + onChange: (selectedRowKeys) => { + this.setState({ selectedRowKeys }, () => { + onChangeSelectKey(this.state.selectedRowKeys); + }); + } + }; + return ( + + ); + } +} + +export default PersonalScopeTable; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js new file mode 100644 index 00000000..7e6259fd --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -0,0 +1,162 @@ +/* + * Author: 黎永顺 + * name: 新增/编辑个税扣缴义务人 + * Description: + * Date: 2022/11/29 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { Button } from "antd"; +import { WeaSlideModal, WeaSteps } from "ecCom"; +import SlideModalTitle from "../../../components/slideModalTitle"; +import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions"; +import BaseSettings from "./baseSettings"; +import PersonalScope from "./personalScope"; +import "./index.less"; + +const Step = WeaSteps.Step; +const tabs = [ + { key: 0, title: "基础设置" }, + { key: 1, title: "报税信息" }, + { key: 2, title: "人员范围" } +]; + +@inject("taxAgentStore") +@observer +class TaxAgentSlide extends Component { + constructor(props) { + super(props); + this.state = { + current: 0 + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible || nextProps.decentralization !== this.props.decentralization) { + const { taxAgentStore: { salarytaxAgentForm }, decentralization } = nextProps; + decentralization === "0" ? + salarytaxAgentForm.setCondition(decentralizationConditions, true) : + salarytaxAgentForm.setCondition(editConditions, true); + this.setState({ current: nextProps.current }); + } + } + + handleSave = () => { + const { taxAgentStore: { salarytaxAgentForm } } = this.props; + // salarytaxAgentForm.updateFields({ + // name: { value: "data.name" }, + // description: { value: "123", hide: true }, + // }); + // salarytaxAgentForm.setField("adminUserIds", { + // hide: true + // }); + + salarytaxAgentForm.validateForm().then((f) => { + if (f.isValid) { + const formData = salarytaxAgentForm.getFormParams(); + console.log(formData); + } else { + f.showErrors(); + } + }); + }; + renderChildren = () => { + const { current } = this.state; + const { decentralization } = this.props; + let CurrentDom = null; + switch (current) { + case 0: + CurrentDom = ; + break; + case 2: + CurrentDom = ; + break; + default: + CurrentDom = null; + break; + } + return CurrentDom; + }; + renderCustomOperate = () => { + const { taxAgentId, taxAgentStore: { showOperateBtn } } = this.props; + const { current } = this.state; + let CurrentDom = []; + if(showOperateBtn){ + switch (current) { + case 0: + CurrentDom = [ + + ]; + break; + case 1: + const tmpV = []; + const tmpJ = [ + , + + ]; + CurrentDom = taxAgentId ? tmpV : [...tmpV, ...tmpJ]; + break; + case 2: + CurrentDom = !taxAgentId ? [] : []; + break; + default: + break; + } + } + return CurrentDom; + }; + handleChangeSlideTab = (current) => { + this.setState({ current: Number(current) }); + }; + + render() { + const { title, visible, onCancel, taxAgentId, taxAgentStore: { showOperateBtn } } = this.props; + const { current } = this.state; + return ( + { + }} + selectedTab={current} + customOperate={this.renderCustomOperate()} + subItemChange={this.handleChangeSlideTab} + /> + } + content={ +
+ { + !taxAgentId && + + { + _.map(tabs, item => { + const { key, title } = item; + return ; + }) + } + + } + { + this.renderChildren() + } +
+ } + onClose={onCancel} + /> + ); + } +} + +export default TaxAgentSlide; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js new file mode 100644 index 00000000..8d9b2465 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js @@ -0,0 +1,116 @@ +/* + * Author: 黎永顺 + * name: 个税扣缴义务人列表 + * Description: + * Date: 2022/11/29 + */ +import React, { Component } from "react"; +import { WeaTable } from "ecCom"; +import * as API from "../../../apis/taxAgent"; +import "./index.less"; + +class TaxAgentTable extends Component { + constructor(props) { + super(props); + this.state = { + loading: { + query: false + }, + dataSource: [], + columns: [], + pageInfo: { + current: 1, + pageSize: 10, + total: 0 + } + }; + } + + componentDidMount() { + this.getTaxAgentList(); + } + + getTaxAgentList = () => { + const { pageInfo, loading } = this.state; + const { searchValue, onOperate } = this.props; + const payload = { + name: searchValue, + ...pageInfo + }; + this.setState({ loading: { ...loading, query: true } }); + API.getTaxAgentList(payload).then(({ status, data }) => { + this.setState({ loading: { ...loading, query: false } }); + if (status) { + const { pageNum: current, pageSize, total, columns, list: dataSource } = data; + this.setState({ + pageInfo: { ...pageInfo, current, pageSize, total }, + dataSource, + columns: _.map(columns, item => { + if (item.dataIndex === "employeeRange") { + return { + ...item, + render: (text, record) => { + return onOperate("edit", record.id, 2)}>{text}; + } + }; + } + return { + ...item, + render: (text) => { + return {text}; + } + }; + }) + }); + } + }).catch(() => { + this.setState({ loading: { ...loading, query: false } }); + }); + }; + + render() { + const { dataSource, columns, pageInfo, loading } = this.state; + const { onOperate } = this.props; + const pagination = { + ...pageInfo, + showTotal: total => `共 ${total} 条`, + showSizeChanger: true, + showQuickJumper: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }, () => { + this.getTaxAgentList(); + }); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }, () => { + this.getTaxAgentList(); + }); + } + }; + return ( + + + } + ]} + /> + ); + } +} + +export default TaxAgentTable; diff --git a/pc4mobx/hrmSalary/pages/salary/index.less b/pc4mobx/hrmSalary/pages/salary/index.less index b9c1951d..d77e6909 100644 --- a/pc4mobx/hrmSalary/pages/salary/index.less +++ b/pc4mobx/hrmSalary/pages/salary/index.less @@ -1,7 +1,40 @@ -.salaryAgentWrapper{ - .comContent{ - .wea-search-group{ +.salaryAgentWrapper { + .comContent { + .wea-search-group { padding: 0; } + + .customTitleWrapper { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + + .ant-btn { + margin-left: 10px; + border-radius: 0; + padding: 0; + background: transparent; + border: none; + font-size: 20px; + line-height: 20px; + } + + .ant-btn.ant-btn-primary[disabled] { + color: #d8d8d8; + } + + .ant-btn.ant-btn-primary { + color: #55a1f8; + } + } + + .tdEllipsis { + display: inline-block; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } } } diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js index eaa8fc0c..5037f0c4 100644 --- a/pc4mobx/hrmSalary/pages/salary/taxAgent.js +++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js @@ -1,21 +1,178 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaSearchGroup, WeaTop } from "ecCom"; +import { Button, message, Modal } from "antd"; +import { WeaCheckbox, WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTop } from "ecCom"; import ComHint from "./components/comHint"; +import TaxAgentTable from "./components/taxAgentTable"; +import TaxAgentSlide from "./components/taxAgentSlide"; +import * as API from "../../apis/taxAgent"; import "./index.less"; @inject("taxAgentStore") @observer class TaxAgent extends Component { + constructor(props) { + super(props); + this.state = { + searchValue: "", + decentralization: "0", //启用分权 + permission: {}, + taxAgentSlideProps: { + visible: false, + title: "新增个税扣缴义务人", + taxAgentId: "", + current: 0 + } + }; + this.taxAgentTableRef = null; + } + + componentDidMount() { + this.getTaxAgentBaseForm(); + this.getPermission(); + } + + getTaxAgentBaseForm = () => { + API.getTaxAgentBaseForm().then(({ status, data }) => { + if (status) { + const { devolutionStatus } = data; + this.setState({ decentralization: String(devolutionStatus || 0) }); + } + }); + }; + getPermission = () => { + const { taxAgentStore: { getPermission } } = this.props; + getPermission().then(({ status, data }) => { + if (status) { + this.setState({ permission: data }); + } + }); + }; + /* + * Author: 黎永顺 + * Description:开启关闭个税扣缴义务人开关 + * Params: + * Date: 2022/11/29 + */ + taxAgentBaseSave = devolutionStatus => { + this.setState({ decentralization: this.state.decentralization }, () => { + Modal.confirm({ + title: "信息确认", + content: `确认${devolutionStatus === "0" ? "停用" : "启用"}分权?`, + onOk: () => { + const paylaod = { devolutionStatus }; + const { taxAgentStore } = this.props; + const { taxAgentBaseSave, setSalarytaxAgentForm } = taxAgentStore; + taxAgentBaseSave(paylaod).then(({ status, errormsg }) => { + if (status) { + message.success(`${devolutionStatus === "0" ? "停用" : "启用"}分权成功`); + this.getTaxAgentBaseForm(); + this.getPermission(); + this.taxAgentTableRef.getTaxAgentList(); + setSalarytaxAgentForm(); + } else { + message.error(errormsg || `${devolutionStatus === "0" ? "停用" : "启用"}分权失败`); + } + }); + }, + onCancel() { + } + }); + }); + }; + /* + * Author: 黎永顺 + * Description: + * Params:添加个税扣缴义务人 + * Date: 2022/11/29 + */ + handleAddTaxAgent = () => { + this.setState({ + taxAgentSlideProps: { + ...this.state.taxAgentSlideProps, + visible: true, current: 0 + } + }); + }; + handelResetSlide = () => { + const { taxAgentStore } = this.props; + const { salarytaxAgentForm } = taxAgentStore; + this.setState({ + taxAgentSlideProps: { + ...this.state.taxAgentSlideProps, + visible: false, + title: "新增个税扣缴义务人", + taxAgentId: "", + current: 0 + } + }, () => salarytaxAgentForm.resetForm()); + }; + handleOperate = (type, itemId, current = 0) => { + switch (type) { + case "edit": + this.setState({ + taxAgentSlideProps: { + ...this.state.taxAgentSlideProps, + visible: true, title: "编辑个税扣缴义务人", + taxAgentId: itemId, current + } + }); + break; + default: + break; + } + }; + render() { + const { searchValue, decentralization, taxAgentSlideProps, permission } = this.state; + const { taxAgentStore: { showOperateBtn } } = this.props; + const btns = [ + , + this.setState({ searchValue })} + placeholder="请输入个税扣缴义务人名称" + onSearch={() => this.taxAgentTableRef.getTaxAgentList()} + /> + ]; + const customTitle =
+ 个税扣缴义务人 + { + permission.isChief && + + } +
; return (
- } iconBgcolor="#F14A2D"> + } + iconBgcolor="#F14A2D" + buttons={btns} + >
- - + { + permission.isChief && + + + + + + } + + this.taxAgentTableRef = dom}/> +
- + +
); diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index 3a042247..1d6052c8 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -9,6 +9,10 @@ import { hasIconInTax } from "../apis/taxAgent"; const { TableStore } = WeaTableNew; export class TaxAgentStore { + @observable salarytaxAgentForm = new WeaForm(); //新版个税扣缴义务人表单实体 + + + @observable tableStore = new TableStore(); // new table @observable form = new WeaForm(); //表单实体 @observable formDecentralization = new WeaForm(); //关闭分权表单 @@ -39,6 +43,8 @@ export class TaxAgentStore { @action setSalaryItemBtn = bool => (this.showSalaryItemBtn = bool);//薪资项目权限 + @action setSalarytaxAgentForm = () => (this.salarytaxAgentForm = new WeaForm());//薪资项目权限 + // 初始化操作 @action doInit = params => { diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js index ffaa1956..d132c64e 100644 --- a/pc4mobx/hrmSalary/util/index.js +++ b/pc4mobx/hrmSalary/util/index.js @@ -70,6 +70,7 @@ export const getSearchs = (form, condition, col, isCenter) => { /> ), colSpan:1, + hide: fields.hide }) }); group.push( From 2899e32909210eb1f10342894e821dd35855240e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 1 Dec 2022 09:24:03 +0800 Subject: [PATCH 003/165] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salary/components/index.less | 15 +++ .../pages/salary/components/personalScope.js | 32 +++-- .../salary/components/personalScopeModal.js | 116 ++++++++++++++---- .../pages/salary/components/taxAgentSlide.js | 11 +- pc4mobx/hrmSalary/pages/salary/taxAgent.js | 27 +++- 5 files changed, 165 insertions(+), 36 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salary/components/index.less b/pc4mobx/hrmSalary/pages/salary/components/index.less index e1bcdfe8..a0dcddd6 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/index.less +++ b/pc4mobx/hrmSalary/pages/salary/components/index.less @@ -53,3 +53,18 @@ } } } + +//添加关联人员弹框中的下拉框样式 +.personalScopeModalWrapper{ + .wea-select,.ant-select-selection,.ant-select{ + width: 100%; + } + .wea-select{ + display: inline-block; + position: relative; + } + .ant-select-selection{ + height: 30px; + border-radius: 0; + } +} diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScope.js b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js index 7486aa81..4bbf53c9 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/personalScope.js +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js @@ -24,7 +24,9 @@ class PersonalScope extends Component { rowKeys: [], personalAddModal: { visible: false, - title: "关联人员" + title: "关联人员", + includeType: "", + taxAgentId: "" } }; this.personalScopeTableRef = null; @@ -68,9 +70,15 @@ class PersonalScope extends Component { * Date: 2022/11/30 */ handleAddPersonal = () => { - const { personalAddModal } = this.state; + const { personalAddModal, selectedKey } = this.state; + const { taxAgentId } = this.props; this.setState({ - personalAddModal: { ...personalAddModal, visible: true } + personalAddModal: { + ...personalAddModal, + visible: true, + includeType: selectedKey === "listInclude" ? 1 : 0, + taxAgentId + } }); }; @@ -124,10 +132,20 @@ class PersonalScope extends Component { searchValue={searchValue} onChangeSelectKey={rowKeys => this.setState({ rowKeys })} /> - - this.setState({ - personalAddModal: { ...personalAddModal, visible: false } - })}/> + this.personalScopeTableRef.getPersonalScopeList()} + onCancel={() => + this.setState({ + personalAddModal: { + ...personalAddModal, + visible: false, + taxAgentId: "", + includeType: "" + } + }) + } + /> ); } diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js index 0dcaa106..9e4c09af 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js @@ -6,17 +6,23 @@ */ import React, { Component } from "react"; import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; -import { Button } from "antd"; -import { getTaxAgentRangeForm } from "../../../apis/taxAgent"; +import { Button, message, Modal } from "antd"; +import { getTaxAgentRangeForm, taxAgentRangeSave } from "../../../apis/taxAgent"; +import { SelectWithAll } from "../../socialSecurityBenefits/standingBookDetail/components/regAddEmployee"; +import "./index.less"; class PersonalScopeModal extends Component { constructor(props) { super(props); this.state = { + loading: false, employeeStatus: [], targetTypeList: [], targetType: "EMPLOYEE", - targetTypeIds: "" + targetTypeIds: "", + targetTypeIdsNames: "", + status: "", + statusAll: "" }; } @@ -30,13 +36,42 @@ class PersonalScopeModal extends Component { const { employeeStatus, targetTypeList } = data; this.setState({ targetTypeList: _.map(targetTypeList, it => ({ key: it.id, showname: it.name })), - employeeStatus + employeeStatus: _.map(employeeStatus, it => ({ key: it.id, showname: it.name })) }); } }); }; + taxAgentRangeSave = () => { + const { status, targetTypeIds, targetType } = this.state; + const { includeType, taxAgentId, onSuccess, onCancel } = this.props; + if (_.isEmpty(status) || _.isEmpty(targetTypeIds)) { + Modal.warning({ + title: "信息确认", + content: "必要信息不完整,红色*为必填项!" + }); + return; + } + const payload = { + employeeStatus: status.split(","), + includeType, + targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })), + taxAgentId + }; + this.setState({ loading: true }); + taxAgentRangeSave(payload).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success("保存成功"); + this.handleReset(); + onSuccess(); + onCancel(); + } else { + message.error(errormsg || "保存失败"); + } + }).catch(() => this.setState({ loading: true })); + }; renderBrowser = () => { - const { targetType, targetTypeIds } = this.state; + const { targetType, targetTypeIds, targetTypeIdsNames } = this.state; let browserType = {}; switch (targetType) { case "EMPLOYEE": @@ -59,34 +94,41 @@ class PersonalScopeModal extends Component { viewAttr={3} isSingle={false} value={targetTypeIds} + valueSpan={targetTypeIdsNames} inputStyle={{ width: 200 }} - onChange={(ids, names, datas) => { - this.setState({ ids }); + onChange={(targetTypeIds, targetTypeIdsNames) => { + this.setState({ targetTypeIds, targetTypeIdsNames }); }} />; }; - handleChangeTargetType = (targetType) => { + handleReset = () => { this.setState({ - targetType + targetType: "EMPLOYEE", + targetTypeIds: "", + status: "", + statusAll: "" }); }; render() { const { onCancel, title, visible } = this.props; - const { employeeStatus, targetTypeList, targetType } = this.state; + const { employeeStatus, targetTypeList, targetType, status, statusAll, loading } = this.state; const buttons = [ - , - + , + ]; return ( { + this.handleReset(); + onCancel(); + }} > this.setState({ targetType })} /> {this.renderBrowser()} - - + { + SelectWithAll({ + label: "选择员工状态", + options: employeeStatus, + detailtype: 2, + valueAll: statusAll, + value: status, + onChangeAll: ({ selected }) => { + if (selected) { + this.setState({ + status: _.map(employeeStatus, it => it.key).join(","), + statusAll: selected + }); + } else { + this.setState({ + status: "", + statusAll: selected + }); + } + }, + onChange: ({ selected }) => { + const bool = _.every(_.map(employeeStatus, it => it.key), item => selected.split(",").includes(item)); + if (bool) { + this.setState({ + status: selected, + statusAll: "0" + }); + } else { + this.setState({ + status: selected, + statusAll: "" + }); + } + } + }) + } ); diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index 7e6259fd..85ca5855 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -62,14 +62,14 @@ class TaxAgentSlide extends Component { }; renderChildren = () => { const { current } = this.state; - const { decentralization } = this.props; + const { decentralization, taxAgentId } = this.props; let CurrentDom = null; switch (current) { case 0: CurrentDom = ; break; case 2: - CurrentDom = ; + CurrentDom = ; break; default: CurrentDom = null; @@ -78,10 +78,11 @@ class TaxAgentSlide extends Component { return CurrentDom; }; renderCustomOperate = () => { - const { taxAgentId, taxAgentStore: { showOperateBtn } } = this.props; - const { current } = this.state; + const { taxAgentId, isChief } = this.props; + const { current, per } = this.state; let CurrentDom = []; - if(showOperateBtn){ + //总管理员权限 + if (isChief) { switch (current) { case 0: CurrentDom = [ diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js index 5037f0c4..aa4e84b8 100644 --- a/pc4mobx/hrmSalary/pages/salary/taxAgent.js +++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js @@ -14,6 +14,7 @@ class TaxAgent extends Component { constructor(props) { super(props); this.state = { + syncLoading: false, //同步人员范围loading searchValue: "", decentralization: "0", //启用分权 permission: {}, @@ -94,6 +95,26 @@ class TaxAgent extends Component { } }); }; + /* + * Author: 黎永顺 + * Description:启用分权 + * Params: + * Date: 2022/12/1 + */ + taxAgentRangeSync = () => { + const { taxAgentStore } = this.props; + const { taxAgentRangeSync } = taxAgentStore; + this.setState({ syncLoading: true }); + taxAgentRangeSync({}).then(({ status, data, errormsg }) => { + this.setState({ syncLoading: false }); + if (status) { + message.success(data || "操作成功"); + this.taxAgentTableRef.getTaxAgentList(); + } else { + message.error(data || errormsg || "操作失败"); + } + }); + }; handelResetSlide = () => { const { taxAgentStore } = this.props; const { salarytaxAgentForm } = taxAgentStore; @@ -124,10 +145,11 @@ class TaxAgent extends Component { }; render() { - const { searchValue, decentralization, taxAgentSlideProps, permission } = this.state; + const { searchValue, decentralization, taxAgentSlideProps, permission, syncLoading } = this.state; const { taxAgentStore: { showOperateBtn } } = this.props; const btns = [ - , + , From e11631e6ba69d8a7672c38360c8c5b4ba32bd782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 1 Dec 2022 11:47:20 +0800 Subject: [PATCH 004/165] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salary/components/personalScope.js | 8 +- .../salary/components/personalScopeTable.js | 3 +- .../pages/salary/components/taxAgentSlide.js | 108 ++++++++++++++---- pc4mobx/hrmSalary/pages/salary/taxAgent.js | 23 ++-- 4 files changed, 107 insertions(+), 35 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScope.js b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js index 4bbf53c9..0e4b71c0 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/personalScope.js +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js @@ -26,7 +26,6 @@ class PersonalScope extends Component { visible: false, title: "关联人员", includeType: "", - taxAgentId: "" } }; this.personalScopeTableRef = null; @@ -71,20 +70,18 @@ class PersonalScope extends Component { */ handleAddPersonal = () => { const { personalAddModal, selectedKey } = this.state; - const { taxAgentId } = this.props; this.setState({ personalAddModal: { ...personalAddModal, visible: true, includeType: selectedKey === "listInclude" ? 1 : 0, - taxAgentId } }); }; render() { const { selectedKey, searchValue, rowKeys, personalAddModal } = this.state; - const { taxAgentStore: { hideIconInTax, showSalaryItemBtn } } = this.props; + const { taxAgentStore: { hideIconInTax, showSalaryItemBtn }, taxAgentId } = this.props; const topTab = [ { title: "管理范围", @@ -128,19 +125,20 @@ class PersonalScope extends Component { /> this.personalScopeTableRef = dom} + taxAgentId={taxAgentId} tabActive={selectedKey} searchValue={searchValue} onChangeSelectKey={rowKeys => this.setState({ rowKeys })} /> this.personalScopeTableRef.getPersonalScopeList()} onCancel={() => this.setState({ personalAddModal: { ...personalAddModal, visible: false, - taxAgentId: "", includeType: "" } }) diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js b/pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js index faa84352..e1212e9c 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScopeTable.js @@ -47,9 +47,10 @@ class PersonalScopeTable extends Component { } getPersonalScopeList = (tabActive = this.props.tabActive) => { - const { searchValue } = this.props; + const { searchValue, taxAgentId } = this.props; const { pageInfo, loading } = this.state; const payload = { + taxAgentId, targetName: searchValue, ...pageInfo }; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index 85ca5855..159a2a96 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -6,12 +6,13 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { Button } from "antd"; +import { Button, message } from "antd"; import { WeaSlideModal, WeaSteps } from "ecCom"; import SlideModalTitle from "../../../components/slideModalTitle"; import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions"; import BaseSettings from "./baseSettings"; import PersonalScope from "./personalScope"; +import * as API from "../../../apis/taxAgent"; import "./index.less"; const Step = WeaSteps.Step; @@ -27,7 +28,9 @@ class TaxAgentSlide extends Component { constructor(props) { super(props); this.state = { - current: 0 + current: 0, + loading: false, + taxAgentId: "" }; } @@ -37,24 +40,83 @@ class TaxAgentSlide extends Component { decentralization === "0" ? salarytaxAgentForm.setCondition(decentralizationConditions, true) : salarytaxAgentForm.setCondition(editConditions, true); - this.setState({ current: nextProps.current }); + this.setState({ current: nextProps.current, taxAgentId: nextProps.taxAgentId }, () => { + if (this.state.taxAgentId) this.getTaxAgentForm(); + }); } } + getTaxAgentForm = () => { + const { taxAgentId } = this.state; + const { taxAgentStore: { salarytaxAgentForm } } = this.props; + API.getTaxAgentForm({ id: taxAgentId }).then(({ status, data }) => { + if (status) { + const { name, description, adminUserIds } = data; + salarytaxAgentForm.updateFields({ + name: { value: name, viewAttr: 1 }, + adminUserIds: { + value: _.map(adminUserIds, it => it.id.toString()).join(","), + valueSpan: _.map(adminUserIds, it => it.content).join(",") + }, + description: { value: description } + }); + } + }); + }; + /* + * Author: 黎永顺 + * Description: 保存个税扣缴义务人 + * Params: + * Date: 2022/12/1 + */ + saveTaxAgent = (payload) => { + const { onOk } = this.props; + const { current } = this.state; + this.setState({ loading: true }); + API.saveTaxAgent(payload).then(({ status, data, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success("保存成功"); + this.setState({ + current: current + 1, + taxAgentId: data + }, () => onOk()); + } else { + message.error(errormsg || "保存失败"); + } + }).catch(() => this.setState({ loading: false })); + }; + /* + * Author: 黎永顺 + * Description: 编辑个税扣缴义务人 + * Params: + * Date: 2022/12/1 + */ + updateTaxAgent = (payload) => { + const { onCancel } = this.props; + this.setState({ loading: true }); + API.updateTaxAgent(payload).then(({ status, data, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success("更新成功"); + onCancel(true); + } else { + message.error(errormsg || "更新失败"); + } + }).catch(() => this.setState({ loading: false })); + }; + handleSave = () => { const { taxAgentStore: { salarytaxAgentForm } } = this.props; - // salarytaxAgentForm.updateFields({ - // name: { value: "data.name" }, - // description: { value: "123", hide: true }, - // }); - // salarytaxAgentForm.setField("adminUserIds", { - // hide: true - // }); - + const { taxAgentId } = this.state; salarytaxAgentForm.validateForm().then((f) => { if (f.isValid) { const formData = salarytaxAgentForm.getFormParams(); - console.log(formData); + const payload = { + ...formData, + adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : [] + }; + taxAgentId ? this.updateTaxAgent({ ...payload, id: taxAgentId }) : this.saveTaxAgent(payload); } else { f.showErrors(); } @@ -62,7 +124,8 @@ class TaxAgentSlide extends Component { }; renderChildren = () => { const { current } = this.state; - const { decentralization, taxAgentId } = this.props; + const { decentralization } = this.props; + const { taxAgentId } = this.state; let CurrentDom = null; switch (current) { case 0: @@ -78,27 +141,30 @@ class TaxAgentSlide extends Component { return CurrentDom; }; renderCustomOperate = () => { - const { taxAgentId, isChief } = this.props; - const { current, per } = this.state; + const { isChief, isEdit } = this.props; + const { current, loading } = this.state; let CurrentDom = []; //总管理员权限 if (isChief) { switch (current) { case 0: CurrentDom = [ - + ]; break; case 1: const tmpV = []; const tmpJ = [ , - + ]; - CurrentDom = taxAgentId ? tmpV : [...tmpV, ...tmpJ]; + CurrentDom = isEdit ? tmpV : [...tmpV, ...tmpJ]; break; case 2: - CurrentDom = !taxAgentId ? [] : []; + CurrentDom = !isEdit ? + [] + : []; break; default: break; @@ -111,8 +177,8 @@ class TaxAgentSlide extends Component { }; render() { - const { title, visible, onCancel, taxAgentId, taxAgentStore: { showOperateBtn } } = this.props; - const { current } = this.state; + const { title, visible, onCancel, taxAgentStore: { showOperateBtn } } = this.props; + const { current, taxAgentId } = this.state; return ( { + handelResetSlide = (isUpdate = false) => { const { taxAgentStore } = this.props; const { salarytaxAgentForm } = taxAgentStore; this.setState({ taxAgentSlideProps: { ...this.state.taxAgentSlideProps, + isEdit: false, visible: false, title: "新增个税扣缴义务人", taxAgentId: "", current: 0 } - }, () => salarytaxAgentForm.resetForm()); + }, () => { + isUpdate && this.taxAgentTableRef.getTaxAgentList(); + salarytaxAgentForm.resetForm(); + }); }; handleOperate = (type, itemId, current = 0) => { switch (type) { @@ -135,7 +140,7 @@ class TaxAgent extends Component { taxAgentSlideProps: { ...this.state.taxAgentSlideProps, visible: true, title: "编辑个税扣缴义务人", - taxAgentId: itemId, current + taxAgentId: itemId, current, isEdit: true } }); break; @@ -145,11 +150,12 @@ class TaxAgent extends Component { }; render() { - const { searchValue, decentralization, taxAgentSlideProps, permission, syncLoading } = this.state; - const { taxAgentStore: { showOperateBtn } } = this.props; + const { + searchValue, decentralization, taxAgentSlideProps, + permission, syncLoading + } = this.state; const btns = [ - , + , this.taxAgentTableRef.getTaxAgentList()} + onCancel={(isUpdate = false) => this.handelResetSlide(isUpdate)} /> From 08e2213b79cb60d7231c60be50b78a96894f700e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 2 Dec 2022 09:39:29 +0800 Subject: [PATCH 005/165] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8A=A5=E7=A8=8E=E4=BF=A1=E6=81=AF=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/taxAgent.js | 8 ++ .../pages/salary/components/constants.js | 78 ++++++++++++++ .../pages/salary/components/taxAgentSlide.js | 12 ++- .../salary/components/taxDeclarationInfo.js | 100 ++++++++++++++++++ 4 files changed, 196 insertions(+), 2 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/salary/components/constants.js create mode 100644 pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index d68e965d..1c5b7670 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -112,3 +112,11 @@ export const hasIconInTax = (params) => { params ); }; +//获取报税信息表单 +export const taxReturnGetForm = (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 new file mode 100644 index 00000000..0d0eede3 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/constants.js @@ -0,0 +1,78 @@ +export const fieldList = [ + { + key: "name", + label: "名称", + type: "TEXT", + viewAttr: 1 + }, + { + key: "dutyParagraph", + label: "税号", + type: "TEXT", + viewAttr: 3 + }, + { + key: "taxDeclarationRegion", + label: "报税所属区域", + type: "SELECT", + viewAttr: 3 + }, + { + key: "areaNumber", + label: "行政区划代码", + type: "TEXT", + viewAttr: 3 + }, + { + key: "passwordVerifyType", + label: "密码校验类型", + type: "RADIO", + viewAttr: 3, + options: [ + { + key: "0", + showname: "个税网报密码" + }, + { + key: "2", + showname: "实名账号密码" + } + ] + }, + { + key: "realNameAccount", + label: "实名账号", + type: "TEXT", + viewAttr: 3 + }, + { + key: "realNameAccountPassword", + label: "实名账号密码", + type: "PASSWORD", + viewAttr: 3 + }, + { + key: "taxOnlinePassword", + label: "个税网报密码", + type: "PASSWORD", + viewAttr: 3 + }, + { + key: "registrationNo", + label: "登记序号", + type: "TEXT", + viewAttr: 1 + }, + { + key: "departmentCode", + label: "部门编码", + type: "TEXT", + viewAttr: 1 + }, + { + key: "taxInforVerifiyStatus", + label: "报税信息验证状态", + type: "TEXT", + viewAttr: 1 + } +]; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index 159a2a96..eac13735 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -12,6 +12,7 @@ import SlideModalTitle from "../../../components/slideModalTitle"; import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions"; import BaseSettings from "./baseSettings"; import PersonalScope from "./personalScope"; +import TaxDeclarationInfo from "./taxDeclarationInfo"; import * as API from "../../../apis/taxAgent"; import "./index.less"; @@ -32,6 +33,7 @@ class TaxAgentSlide extends Component { loading: false, taxAgentId: "" }; + this.taxInfoRef = null; } componentWillReceiveProps(nextProps, nextContext) { @@ -53,7 +55,7 @@ class TaxAgentSlide extends Component { if (status) { const { name, description, adminUserIds } = data; salarytaxAgentForm.updateFields({ - name: { value: name, viewAttr: 1 }, + name: { value: name }, adminUserIds: { value: _.map(adminUserIds, it => it.id.toString()).join(","), valueSpan: _.map(adminUserIds, it => it.content).join(",") @@ -122,6 +124,9 @@ class TaxAgentSlide extends Component { } }); }; + handleSaveAndVerify = () => { + console.log(this.taxInfoRef); + }; renderChildren = () => { const { current } = this.state; const { decentralization } = this.props; @@ -131,6 +136,9 @@ class TaxAgentSlide extends Component { case 0: CurrentDom = ; break; + case 1: + CurrentDom = this.taxInfoRef = dom} taxAgentId={taxAgentId}/>; + break; case 2: CurrentDom = ; break; @@ -154,7 +162,7 @@ class TaxAgentSlide extends Component { ]; break; case 1: - const tmpV = []; + const tmpV = []; const tmpJ = [ , diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js new file mode 100644 index 00000000..f4b77ad0 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js @@ -0,0 +1,100 @@ +/* + * Author: 黎永顺 + * name: 报税信息 + * Description: + * Date: 2022/12/1 + */ +import React, { Component } from "react"; +import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom"; +import { fieldList } from "./constants"; +import { taxReturnGetForm } from "../../../apis/taxAgent"; + +class TaxDeclarationInfo extends Component { + constructor(props) { + super(props); + this.state = { + fieldForm: { + name: "", + dutyParagraph: "", + taxDeclarationRegion: "", + areaNumber: "", + passwordVerifyType: "0", + realNameAccount: "", + realNameAccountPassword: "", + taxOnlinePassword: "", + registrationNo: "", + departmentCode: "", + taxInforVerifiyStatus: "" + }, + fieldItem: [] + }; + } + + componentDidMount() { + this.setState({ + fieldItem: _.filter(fieldList, it => it.key !== "realNameAccount" && it.key !== "realNameAccountPassword") + }, () => { + this.taxReturnGetForm(); + }); + } + + taxReturnGetForm = () => { + const { taxAgentId } = this.props; + taxReturnGetForm({ taxAgentId }).then((status, data) => { + console.log(data); + }); + }; + handleChangeValue = (key, value) => { + const { fieldForm } = this.state; + this.setState({ + fieldForm: { + ...fieldForm, + [key]: value + } + }, () => { + if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "2") { + this.setState({ + fieldItem: _.filter(fieldList, it => it.key !== "taxOnlinePassword"), + fieldForm: { ...this.state.fieldForm, realNameAccount: "", realNameAccountPassword: "" } + }); + } else if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "0") { + this.setState({ + fieldItem: _.filter(fieldList, it => it.key !== "realNameAccount" && it.key !== "realNameAccountPassword"), + fieldForm: { ...this.state.fieldForm, taxOnlinePassword: "" } + }); + } + }); + }; + + render() { + const { fieldItem, fieldForm } = this.state; + return ( + + { + _.map(fieldItem, item => { + const { key, label, type, viewAttr, options = [] } = item; + return + { + (type === "TEXT" || type === "PASSWORD") && + this.handleChangeValue(key, v)}/> + } + { + type === "SELECT" && + this.handleChangeValue(key, v)}/> + } + { + type === "RADIO" && + this.handleChangeValue(key, v)}/> + } + ; + }) + } + + ); + } +} + +export default TaxDeclarationInfo; From e214150639cbe3f1cf197882fea5b48e1658424e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 16 Feb 2023 10:25:27 +0800 Subject: [PATCH 006/165] =?UTF-8?q?=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97?= =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E7=94=B3=E6=8A=A5=E5=AD=97=E6=AE=B5=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ledger.js | 8 ++++ .../ledgerPage/components/incomeTaxFields.js | 40 +++++++++++++++++++ .../ledgerPage/components/ledgerSlide.js | 25 +++++++++++- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFields.js diff --git a/pc4mobx/hrmSalary/apis/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js index 6e7a3f17..a50b63b0 100644 --- a/pc4mobx/hrmSalary/apis/ledger.js +++ b/pc4mobx/hrmSalary/apis/ledger.js @@ -278,6 +278,10 @@ export const getAggregate = params => { export const getBackitemForm = params => { return WeaTools.callApi("/api/bs/hrmsalary/salarysob/backitem/getForm", "GET", params); }; +//查询个税映射规则 +export const getMappingFields = params => { + return WeaTools.callApi("/api/bs/hrmsalary/salarysob/tax/getMappingFields", "GET", params); +}; //保存回算薪资项目详情 export const salarysobBackitemSave = params => { return postFetch("/api/bs/hrmsalary/salarysob/backitem/save", params); @@ -290,3 +294,7 @@ export const salarysobRangePreview = params => { export const salarysobRangeImportData = params => { return postFetch("/api/bs/hrmsalary/salarysob/range/importData", params); }; +//保存薪资账套个税字段 +export const saveTaxMapping = params => { + return postFetch("/api/bs/hrmsalary/salarysob/tax/saveTaxMapping", params); +}; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFields.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFields.js new file mode 100644 index 00000000..1d828d94 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/incomeTaxFields.js @@ -0,0 +1,40 @@ +/* + * Author: 黎永顺 + * name: 个税申报字段对应 + * Description: + * Date: 2023/2/16 + */ +import React, { Component } from "react"; +import { WeaSearchGroup } from "ecCom"; +import { getMappingFields } from "../../../apis/ledger"; + +class IncomeTaxFields extends Component { + constructor(props) { + super(props); + this.state = {}; + } + + componentDidMount() { + this.getMappingFields(); + } + + getMappingFields = () => { + const { editId: salarySobId } = this.props; + const payload = { salarySobId }; + getMappingFields(payload).then(({ status, data }) => { + if (status) { + console.log(data); + } + }); + }; + + render() { + return ( + + + + ); + } +} + +export default IncomeTaxFields; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js index 8ea71c01..802c0c98 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js @@ -14,6 +14,7 @@ import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel"; import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules"; import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem"; import LedgerSalaryItem from "./ledgerSalaryItem"; +import IncomeTaxFields from "./incomeTaxFields"; import { saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger"; import "./index.less"; @@ -23,7 +24,8 @@ const tabs = [ { key: 1, title: "关联人员" }, { key: 2, title: "薪资项目" }, { key: 3, title: "回算薪资项目" }, - { key: 4, title: "调薪计薪规则" } + { key: 4, title: "个税申报字段对应" }, + { key: 5, title: "调薪计薪规则" } ]; @inject("taxAgentStore") @@ -179,6 +181,9 @@ class LedgerSlide extends Component { CurrentDom = ; break; case 4: + CurrentDom = ; + break; + case 5: CurrentDom = this.setState({ adjustRules })}/>; @@ -238,6 +243,24 @@ class LedgerSlide extends Component { ] : []; break; case 4: + CurrentDom = !editId ? + [ + , + , + + ] : [ + + ]; + break; + case 5: CurrentDom = !editId ? [ , From 64797acaea1e0f174eebaedbf7e60c73413a2cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Jul 2023 14:24:52 +0800 Subject: [PATCH 007/165] =?UTF-8?q?=E4=BA=A7=E5=93=81=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5-=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 3 +- .../pages/salary/components/baseSettings.js | 20 ++++- .../pages/salary/components/index.less | 36 ++++++++- .../pages/salary/components/personalScope.js | 75 +++++++++++++++++-- .../pages/salary/components/taxAgentSlide.js | 22 +++--- .../pages/salary/components/taxAgentTable.js | 8 +- .../salary/components/taxDeclarationInfo.js | 48 ++++++------ pc4mobx/hrmSalary/pages/salary/index.less | 3 - pc4mobx/hrmSalary/pages/salary/taxAgent.js | 21 +++++- 9 files changed, 183 insertions(+), 53 deletions(-) diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 29804d06..4b788091 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -21,7 +21,7 @@ import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; import Declare from "./pages/declare"; import TaxRate from "./pages/taxRate"; -// import TaxAgent from "./pages/taxAgent"; +import TaxAgents from "./pages/taxAgent"; import TaxAgent from "./pages/salary/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail"; @@ -156,6 +156,7 @@ const Routes = ( /> + diff --git a/pc4mobx/hrmSalary/pages/salary/components/baseSettings.js b/pc4mobx/hrmSalary/pages/salary/components/baseSettings.js index ffdd7870..5e24cb5c 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/baseSettings.js +++ b/pc4mobx/hrmSalary/pages/salary/components/baseSettings.js @@ -18,13 +18,13 @@ class BaseSettings extends Component { } render() { - const { taxAgentStore: { salarytaxAgentForm }, decentralization } = this.props; + const { taxAgentStore: { salarytaxAgentForm }, decentralization, isChief } = this.props; return (
{ decentralization === "0" ? - getSearchs(salarytaxAgentForm, decentralizationConditions, 1, true) : - getSearchs(salarytaxAgentForm, editConditions, 1, true) + getSearchs(salarytaxAgentForm, convertConditon(decentralizationConditions, !isChief), 1, false) : + getSearchs(salarytaxAgentForm, convertConditon(editConditions, !isChief), 1, false) }
); @@ -32,3 +32,17 @@ class BaseSettings extends Component { } export default BaseSettings; + +export const convertConditon = (condition, bool) => { + return _.map(condition, item => { + return { + ...item, + items: _.map(item.items, child => { + return { + ...child, + viewAttr: bool ? 1 : child.viewAttr + }; + }) + }; + }); +}; diff --git a/pc4mobx/hrmSalary/pages/salary/components/index.less b/pc4mobx/hrmSalary/pages/salary/components/index.less index a0dcddd6..0743a792 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/index.less +++ b/pc4mobx/hrmSalary/pages/salary/components/index.less @@ -1,3 +1,29 @@ +.taxAgentSlideContent { + .baseSettingWrapper, .taxDeclarationInfoWrapper { + padding: 12px 12px 12px 20px; + + .wea-search-group { + padding: 0; + border: 1px solid #e5e5e5; + border-bottom: none; + + .wea-content { + padding: 0; + + .wea-form-cell, .wea-form-item { + border-bottom: 1px solid #e5e5e5; + padding: 5px 10px 5px 30px; + + .wea-form-item { + padding: 0 !important; + border-bottom: none !important; + } + } + } + } + } +} + .comHint { width: 100%; margin: 16px 0; @@ -55,15 +81,17 @@ } //添加关联人员弹框中的下拉框样式 -.personalScopeModalWrapper{ - .wea-select,.ant-select-selection,.ant-select{ +.personalScopeModalWrapper { + .wea-select, .ant-select-selection, .ant-select { width: 100%; } - .wea-select{ + + .wea-select { display: inline-block; position: relative; } - .ant-select-selection{ + + .ant-select-selection { height: 30px; border-radius: 0; } diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScope.js b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js index 0e4b71c0..54ba7ccb 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/personalScope.js +++ b/pc4mobx/hrmSalary/pages/salary/components/personalScope.js @@ -5,12 +5,14 @@ * Date: 2022/11/30 */ import React, { Component } from "react"; -import { message, Modal } from "antd"; +import { Button, message, Modal } from "antd"; import { inject, observer } from "mobx-react"; import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom"; -import { taxAgentRangeDelete } from "../../../apis/taxAgent"; +import { taxAgentRangeDelete, taxAgentRangeImportData, taxAgentRangePreview } from "../../../apis/taxAgent"; import PersonalScopeTable from "./personalScopeTable"; import PersonalScopeModal from "./personalScopeModal"; +import ImportModal from "../../../components/importModal"; +import { importEmployColumns } from "../../taxAgent/columns"; @inject("taxAgentStore") @@ -25,7 +27,13 @@ class PersonalScope extends Component { personalAddModal: { visible: false, title: "关联人员", - includeType: "", + includeType: "" + }, + previewDataSource: [], + importParams: { + visible: false, + step: 0, + importResult: {} } }; this.personalScopeTableRef = null; @@ -74,13 +82,36 @@ class PersonalScope extends Component { personalAddModal: { ...personalAddModal, visible: true, - includeType: selectedKey === "listInclude" ? 1 : 0, + includeType: selectedKey === "listInclude" ? 1 : 0 + } + }); + }; + salaryArchivePreview = (params) => { + taxAgentRangePreview(params).then(({ status, data }) => { + if (status) { + const { preview } = data; + this.setState({ + previewDataSource: preview + }); + } + }); + }; + handleImportFile = (params) => { + const { taxAgentId } = this.props; + taxAgentRangeImportData({ ...params, taxAgentId }).then(({ status, data }) => { + if (status) { + this.setState({ + importParams: { + ...this.state.importParams, + importResult: data + } + }); } }); }; render() { - const { selectedKey, searchValue, rowKeys, personalAddModal } = this.state; + const { selectedKey, searchValue, rowKeys, personalAddModal, importParams, previewDataSource } = this.state; const { taxAgentStore: { hideIconInTax, showSalaryItemBtn }, taxAgentId } = this.props; const topTab = [ { @@ -93,6 +124,12 @@ class PersonalScope extends Component { } ]; const btns = (hideIconInTax || showSalaryItemBtn) ? [ + , this.personalScopeTableRef.getPersonalScopeList()} />]; + selectedKey === "listExclude" && btns.shift(); return (
+ {importParams.visible && ( + { + this.setState({ importParams: { ...this.state.importParams, step } }); + }} + importResult={importParams.importResult} + onFinish={() => { + this.setState({ + importParams: { + ...this.state.importParams, + visible: false + } + }, () => this.personalScopeTableRef.getPersonalScopeList()); + }} + previewImport={(params) => this.salaryArchivePreview(params)} + importFile={(params) => this.handleImportFile(params)} + templateLink={`/api/bs/hrmsalary/taxAgent/range/downloadTemplate?taxAgentId=${taxAgentId}`} + visiable={importParams.visible} + onCancel={() => { + this.setState({ importParams: { ...this.state.importParams, visible: false } }); + }} + /> + )}
); } diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index eac13735..e55ddf30 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -10,7 +10,7 @@ import { Button, message } from "antd"; import { WeaSlideModal, WeaSteps } from "ecCom"; import SlideModalTitle from "../../../components/slideModalTitle"; import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions"; -import BaseSettings from "./baseSettings"; +import BaseSettings, { convertConditon } from "./baseSettings"; import PersonalScope from "./personalScope"; import TaxDeclarationInfo from "./taxDeclarationInfo"; import * as API from "../../../apis/taxAgent"; @@ -38,10 +38,10 @@ class TaxAgentSlide extends Component { componentWillReceiveProps(nextProps, nextContext) { if (nextProps.visible !== this.props.visible || nextProps.decentralization !== this.props.decentralization) { - const { taxAgentStore: { salarytaxAgentForm }, decentralization } = nextProps; + const { taxAgentStore: { salarytaxAgentForm }, decentralization, isChief } = nextProps; decentralization === "0" ? - salarytaxAgentForm.setCondition(decentralizationConditions, true) : - salarytaxAgentForm.setCondition(editConditions, true); + salarytaxAgentForm.setCondition(convertConditon(decentralizationConditions, !isChief), true) : + salarytaxAgentForm.setCondition(convertConditon(editConditions, !isChief), true); this.setState({ current: nextProps.current, taxAgentId: nextProps.taxAgentId }, () => { if (this.state.taxAgentId) this.getTaxAgentForm(); }); @@ -53,13 +53,14 @@ class TaxAgentSlide extends Component { const { taxAgentStore: { salarytaxAgentForm } } = this.props; API.getTaxAgentForm({ id: taxAgentId }).then(({ status, data }) => { if (status) { - const { name, description, adminUserIds } = data; + const { name, description, adminUserIds, sortedIndex } = data; salarytaxAgentForm.updateFields({ name: { value: name }, adminUserIds: { value: _.map(adminUserIds, it => it.id.toString()).join(","), valueSpan: _.map(adminUserIds, it => it.content).join(",") }, + sortedIndex: { value: sortedIndex }, description: { value: description } }); } @@ -128,13 +129,12 @@ class TaxAgentSlide extends Component { console.log(this.taxInfoRef); }; renderChildren = () => { - const { current } = this.state; - const { decentralization } = this.props; - const { taxAgentId } = this.state; + const { current, taxAgentId } = this.state; + const { decentralization, isChief } = this.props; let CurrentDom = null; switch (current) { case 0: - CurrentDom = ; + CurrentDom = ; break; case 1: CurrentDom = this.taxInfoRef = dom} taxAgentId={taxAgentId}/>; @@ -192,7 +192,7 @@ class TaxAgentSlide extends Component { className="slideOuterWrapper" visible={visible} top={0} - width={50} + width={65} height={100} direction="right" measure="%" @@ -228,7 +228,7 @@ class TaxAgentSlide extends Component { } } - onClose={onCancel} + onClose={() => onCancel()} /> ); } diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js index 8d9b2465..bf34dbfd 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js @@ -70,7 +70,7 @@ class TaxAgentTable extends Component { render() { const { dataSource, columns, pageInfo, loading } = this.state; - const { onOperate } = this.props; + const { onOperate, isChief } = this.props; const pagination = { ...pageInfo, showTotal: total => `共 ${total} 条`, @@ -102,9 +102,15 @@ class TaxAgentTable extends Component { { title: "操作", key: "operation", + width: 120, render: (text, record) => } ]} diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js index f4b77ad0..a155dc49 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js @@ -69,30 +69,32 @@ class TaxDeclarationInfo extends Component { render() { const { fieldItem, fieldForm } = this.state; return ( - - { - _.map(fieldItem, item => { - const { key, label, type, viewAttr, options = [] } = item; - return - { - (type === "TEXT" || type === "PASSWORD") && - this.handleChangeValue(key, v)}/> - } - { - type === "SELECT" && - + + { + _.map(fieldItem, item => { + const { key, label, type, viewAttr, options = [] } = item; + return + { + (type === "TEXT" || type === "PASSWORD") && + this.handleChangeValue(key, v)}/> - } - { - type === "RADIO" && - this.handleChangeValue(key, v)}/> - } - ; - }) - } - + } + { + type === "SELECT" && + this.handleChangeValue(key, v)}/> + } + { + type === "RADIO" && + this.handleChangeValue(key, v)}/> + } + ; + }) + } + + ); } } diff --git a/pc4mobx/hrmSalary/pages/salary/index.less b/pc4mobx/hrmSalary/pages/salary/index.less index d77e6909..671f114e 100644 --- a/pc4mobx/hrmSalary/pages/salary/index.less +++ b/pc4mobx/hrmSalary/pages/salary/index.less @@ -1,8 +1,5 @@ .salaryAgentWrapper { .comContent { - .wea-search-group { - padding: 0; - } .customTitleWrapper { width: 100%; diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js index f32f2cba..07042e64 100644 --- a/pc4mobx/hrmSalary/pages/salary/taxAgent.js +++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js @@ -144,6 +144,22 @@ class TaxAgent extends Component { } }); break; + case "delete": + Modal.confirm({ + title: "信息确认", + content: `确认要删除吗?`, + onOk: () => { + API.deleteTaxAgent([itemId]).then(({ status, errormsg }) => { + if (status) { + message.success("删除成功"); + this.taxAgentTableRef.getTaxAgentList(); + } else { + message.error(errormsg || "删除失败"); + } + }); + } + }); + break; default: break; } @@ -184,7 +200,7 @@ class TaxAgent extends Component {
{ permission.isChief && - + @@ -192,13 +208,14 @@ class TaxAgent extends Component { } this.taxAgentTableRef = dom}/>
this.taxAgentTableRef.getTaxAgentList()} onCancel={(isUpdate = false) => this.handelResetSlide(isUpdate)} From d2e4ea61903788ac904133ccdd941ef4b8e3846b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Jul 2023 16:24:56 +0800 Subject: [PATCH 008/165] =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E5=AF=B9=E6=8E=A5-?= =?UTF-8?q?=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1=E4=BA=BA=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/salary/index.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/salary/index.less b/pc4mobx/hrmSalary/pages/salary/index.less index 671f114e..8373a244 100644 --- a/pc4mobx/hrmSalary/pages/salary/index.less +++ b/pc4mobx/hrmSalary/pages/salary/index.less @@ -34,4 +34,10 @@ white-space: nowrap; } } + + .ant-col-10 { + span:nth-child(2) { + margin-top: -6px; + } + } } From aabcbd2519cbec8b47ba08613ced82216d264201 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, 19 Jul 2023 17:27:39 +0800 Subject: [PATCH 009/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/TipLabel/index.less | 65 +++++++++-------- pc4mobx/hrmSalary/index.js | 4 ++ .../components/enableSettings.js | 69 +++++++++++++++++++ .../components/index.less | 58 ++++++++++++++++ .../components/insufficientTrafficAlert.js | 57 +++++++++++++++ .../index.js | 53 ++++++++++++++ 6 files changed, 276 insertions(+), 30 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js create mode 100644 pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js diff --git a/pc4mobx/hrmSalary/components/TipLabel/index.less b/pc4mobx/hrmSalary/components/TipLabel/index.less index addc7741..b88403e9 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.less +++ b/pc4mobx/hrmSalary/components/TipLabel/index.less @@ -1,36 +1,41 @@ .tipLabelWrapper { - border-left: 1px solid #e2ecf2; + border-left: 1px solid #e2ecf2; + border-bottom: 1px solid #e2ecf2; + border-right: 1px solid #e2ecf2; + border-radius: 0px 0px 5px 5px; + width: 100%; + overflow: hidden; + + .titleWrapper { + width: 100%; + line-height: 19.2px; + padding: 10px; border-bottom: 1px solid #e2ecf2; - border-right: 1px solid #e2ecf2; - border-radius: 0px 0px 5px 5px; + background-color: #f7fbfe; + } + + .tipContentWrapper { + padding: 10px; + background: #FFF; + } + + .tipContentItem { + line-height: 20px; + padding: 10px 16px 0px; + color: rgb(153, 153, 153); + } + + .tipContentItem:first-child { + padding-top: 0; + } + + .formLabel { + font-size: 14px; + } + + .contentWrapper { width: 100%; overflow: hidden; - .titleWrapper { - width: 100%; - line-height: 19.2px; - padding: 10px; - border-bottom: 1px solid #e2ecf2; - background-color: #f7fbfe; - } - .tipContentWrapper { - padding: 10px; - } - .tipContentItem { - line-height: 20px; - padding: 0px 16px; - padding-top: 10px; - color: rgb(153, 153, 153); - } - .tipContentItem:first { - padding-top: 0px; - } - - .formLabel { - font-size: 14px; - } - .contentWrapper { - width: 100%; - overflow: hidden; - } + } } diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 6c0597da..8fecd66f 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -37,6 +37,7 @@ import EmployeeList from "./pages/employeeView"; import ReportView from "./pages/reportView"; import MySalaryView from "./pages/mySalary/mySalaryView"; import WatermarkPreview from "./pages/payroll/watermarkPreview"; +import IntelligentCalculateSalarySettings from "./pages/intelligentCalculateSalarySettings"; import stores from "./stores"; import "./style/index"; @@ -86,6 +87,7 @@ const DataAcquisition = (props) => props.children; // fieldManagement 字段管理 // analysisOfSalaryStatistics 薪酬统计分析 // reportView 薪酬报表查看 +// intelligentCalculateSalarySettings 智能算薪 const Routes = ( + ); diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js new file mode 100644 index 00000000..a6990968 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -0,0 +1,69 @@ +/* + * Author: 黎永顺 + * name: 启用设置 + * Description: + * Date: 2023/7/19 + */ +import React, { Component } from "react"; +import { Button, Col, Row } from "antd"; +import TipLabel from "../../../components/TipLabel"; +import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class EnableSettings extends Component { + render() { + const tipList = [ + getLabel(111, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), + getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况;"), + getLabel(111, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), + getLabel(111, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") + ]; + const Input = label => { + return ( + + + + ); + }; + const InputPassword = label => { + return ( + + + + ); + }; + return ( + + +
+
+
{getLabel(111, "智能算薪")}
+
{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}
+
+
+
+
+
+ +
+
+
+ + + + +
+ ); + } +} + +export default EnableSettings; diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less new file mode 100644 index 00000000..461a27cc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/index.less @@ -0,0 +1,58 @@ +.enable-settings { + .swith-area, .userinfo { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 16px; + background-color: #fff; + box-sizing: border-box; + height: 80px; + border: 2px solid #e5e5e5; + border-left-color: #5d9cec; + + .left { + padding: 10px 0; + display: flex; + flex-direction: column; + justify-content: space-around; + + .title { + font-size: 14px; + margin-bottom: 4px; + } + + .info { + font-size: 12px; + color: #999; + } + } + } + + .userinfo { + margin-top: 16px; + + .left { + flex: 1 !important; + + .wea-search-group, .wea-form-cell { + padding: 0; + } + } + } +} + +.insufficientAlertWrapper { + background: #fff; + padding: 0; + border: 1px solid #f2f2f2; + border-bottom: none; + + .wea-content { + padding: 0; + + .wea-form-item { + padding: 5px 12px; + border-bottom: 1px solid #f2f2f2; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js new file mode 100644 index 00000000..7fde6b18 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js @@ -0,0 +1,57 @@ +/* + * Author: 黎永顺 + * name:流量不足提醒 + * Description: + * Date: 2023/7/19 + */ +import React, { Component } from "react"; +import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class InsufficientTrafficAlert extends Component { + constructor(props) { + super(props); + this.state = { + remind: "0" + }; + } + + render() { + const { remind } = this.state; + return ( + + + this.setState({ remind })}/> + + { + remind === "1" && + + + + + + + + + + } + + ); + } +} + +export default InsufficientTrafficAlert; diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js new file mode 100644 index 00000000..cfd7d7fc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/index.js @@ -0,0 +1,53 @@ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaReqTop } from "ecCom"; +import EnableSettings from "./components/enableSettings"; +import InsufficientTrafficAlert from "./components/insufficientTrafficAlert"; + +const getLabel = WeaLocaleProvider.getLabel; +const tabs = [ + { key: "ENABLE_SETTINGS", title: getLabel(111, "启用设置") }, + { key: "INTERFACE_FLOW_STATISTICS", title: getLabel(111, "接口流量统计") }, + { key: "INSUFFICIENT_TRAFFIC_ALERT", title: getLabel(111, "流量不足提醒") }, + { key: "TRAFFIC_USAGE_RECORD", title: getLabel(111, "流量使用记录") } +]; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "ENABLE_SETTINGS" + }; + } + + renderChildren = () => { + const { selectedKey } = this.state; + let CurrentDom = null; + switch (selectedKey) { + case "ENABLE_SETTINGS": + CurrentDom = ; + break; + case "INSUFFICIENT_TRAFFIC_ALERT": + CurrentDom = ; + break; + default: + CurrentDom = null; + break; + } + return CurrentDom; + }; + + render() { + const { selectedKey } = this.state; + return ( + } iconBgcolor="#F14A2D" + tabDatas={tabs} onChange={selectedKey => this.setState({ selectedKey })} + > +
{this.renderChildren()}
+
+ ); + } +} + +export default Index; From f6db0c18dd16a7b2ff2805ebde60d01e585214f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 21 Jul 2023 15:56:13 +0800 Subject: [PATCH 010/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/enableSettings.js | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js index a6990968..93c305f0 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -5,32 +5,43 @@ * Date: 2023/7/19 */ import React, { Component } from "react"; -import { Button, Col, Row } from "antd"; +import { Button, Col, Input, Row } from "antd"; import TipLabel from "../../../components/TipLabel"; -import { WeaCheckbox, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; class EnableSettings extends Component { + constructor(props) { + super(props); + this.state = { + enable: "1" + }; + } + + handleEnale = (enable) => { + }; + render() { + const { enable } = this.state; const tipList = [ getLabel(111, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况;"), getLabel(111, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), getLabel(111, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") ]; - const Input = label => { + const InputAccount = label => { return ( - + ); }; const InputPassword = label => { return ( - + ); }; @@ -43,14 +54,14 @@ class EnableSettings extends Component {
{getLabel(111, "开启智能算薪并输入正确的账号密码,且购买了智能算薪流量,才能正常使用智能算薪功能。")}
-
+
From 82b65d903ba96be477aeba165acfad557650bb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 24 Jul 2023 10:29:29 +0800 Subject: [PATCH 011/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=A5=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/index.js | 3 ++ .../hrmSalary/pages/employeedeclare/index.js | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 pc4mobx/hrmSalary/pages/employeedeclare/index.js diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index d004267c..8e9ff9d6 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -20,6 +20,7 @@ import Payroll from "./pages/payroll"; import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; import Declare from "./pages/declare"; +import Employeedeclare from "./pages/employeedeclare"; import TaxRate from "./pages/taxRate"; import TaxAgent from "./pages/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; @@ -88,6 +89,7 @@ const DataAcquisition = (props) => props.children; // analysisOfSalaryStatistics 薪酬统计分析 // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 +// employeedeclare 人员信息报送 const Routes = ( + } + buttons={[ + + ]} + > +
children
+ + ); + } +} + +export default Index; From 67d17fcbee3e9f71bc90873da1cb5e52b91b86e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 24 Jul 2023 10:49:30 +0800 Subject: [PATCH 012/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=A5=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/TipLabel/index.less | 65 ++++++++++--------- .../hrmSalary/pages/employeedeclare/index.js | 12 +++- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/pc4mobx/hrmSalary/components/TipLabel/index.less b/pc4mobx/hrmSalary/components/TipLabel/index.less index addc7741..b88403e9 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.less +++ b/pc4mobx/hrmSalary/components/TipLabel/index.less @@ -1,36 +1,41 @@ .tipLabelWrapper { - border-left: 1px solid #e2ecf2; + border-left: 1px solid #e2ecf2; + border-bottom: 1px solid #e2ecf2; + border-right: 1px solid #e2ecf2; + border-radius: 0px 0px 5px 5px; + width: 100%; + overflow: hidden; + + .titleWrapper { + width: 100%; + line-height: 19.2px; + padding: 10px; border-bottom: 1px solid #e2ecf2; - border-right: 1px solid #e2ecf2; - border-radius: 0px 0px 5px 5px; + background-color: #f7fbfe; + } + + .tipContentWrapper { + padding: 10px; + background: #FFF; + } + + .tipContentItem { + line-height: 20px; + padding: 10px 16px 0px; + color: rgb(153, 153, 153); + } + + .tipContentItem:first-child { + padding-top: 0; + } + + .formLabel { + font-size: 14px; + } + + .contentWrapper { width: 100%; overflow: hidden; - .titleWrapper { - width: 100%; - line-height: 19.2px; - padding: 10px; - border-bottom: 1px solid #e2ecf2; - background-color: #f7fbfe; - } - .tipContentWrapper { - padding: 10px; - } - .tipContentItem { - line-height: 20px; - padding: 0px 16px; - padding-top: 10px; - color: rgb(153, 153, 153); - } - .tipContentItem:first { - padding-top: 0px; - } - - .formLabel { - font-size: 14px; - } - .contentWrapper { - width: 100%; - overflow: hidden; - } + } } diff --git a/pc4mobx/hrmSalary/pages/employeedeclare/index.js b/pc4mobx/hrmSalary/pages/employeedeclare/index.js index 91e40529..c43be4b3 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclare/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclare/index.js @@ -6,11 +6,16 @@ */ import React, { Component } from "react"; import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom"; +import { Col, Row } from "antd"; +import TipLabel from "../../components/TipLabel"; const { getLabel } = WeaLocaleProvider; class Index extends Component { render() { + const tipList = [ + getLabel(111, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") + ]; return ( ]} > -
children
+
+ + + + +
); } From a3231c252d60f71b9ae54ec1c4a23bb9582592c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 27 Jul 2023 16:07:19 +0800 Subject: [PATCH 013/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=AF=B9=E6=8E=A5e1?= =?UTF-8?q?0=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1?= =?UTF-8?q?=E4=BA=BA=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salary/components/taxAgentSlide.js | 43 +++++++++++-------- .../pages/salary/components/taxAgentTable.js | 13 +++--- pc4mobx/hrmSalary/pages/salary/taxAgent.js | 43 ++++++++++--------- 3 files changed, 54 insertions(+), 45 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index e55ddf30..e80e33e4 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -7,7 +7,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { Button, message } from "antd"; -import { WeaSlideModal, WeaSteps } from "ecCom"; +import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom"; import SlideModalTitle from "../../../components/slideModalTitle"; import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions"; import BaseSettings, { convertConditon } from "./baseSettings"; @@ -16,11 +16,12 @@ import TaxDeclarationInfo from "./taxDeclarationInfo"; import * as API from "../../../apis/taxAgent"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; const Step = WeaSteps.Step; const tabs = [ - { key: 0, title: "基础设置" }, - { key: 1, title: "报税信息" }, - { key: 2, title: "人员范围" } + { key: 0, title: getLabel(82751, "基础设置") }, + { key: 1, title: getLabel(111, "报税信息") }, + { key: 2, title: getLabel(124810, "人员范围") } ]; @inject("taxAgentStore") @@ -79,13 +80,13 @@ class TaxAgentSlide extends Component { API.saveTaxAgent(payload).then(({ status, data, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("保存成功"); + message.success(getLabel(22619, "保存成功")); this.setState({ - current: current + 1, + current: true ? current + 2 : current + 1, taxAgentId: data }, () => onOk()); } else { - message.error(errormsg || "保存失败"); + message.error(errormsg || getLabel(22620, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -101,10 +102,10 @@ class TaxAgentSlide extends Component { API.updateTaxAgent(payload).then(({ status, data, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success("更新成功"); + message.success(getLabel(31439, "更新成功")); onCancel(true); } else { - message.error(errormsg || "更新失败"); + message.error(errormsg || getLabel(31825, "更新失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -158,20 +159,23 @@ class TaxAgentSlide extends Component { case 0: CurrentDom = [ + loading={loading}>{isEdit ? getLabel(537558, "保存") : getLabel(33199, "保存并进入下一步")} ]; break; case 1: - const tmpV = []; + const tmpV = []; const tmpJ = [ - , - + , + ]; CurrentDom = isEdit ? tmpV : [...tmpV, ...tmpJ]; break; case 2: - CurrentDom = !isEdit ? - [] + CurrentDom = (!isEdit && false) ? + [] : []; break; default: @@ -185,8 +189,9 @@ class TaxAgentSlide extends Component { }; render() { - const { title, visible, onCancel, taxAgentStore: { showOperateBtn } } = this.props; + const { isEdit, title, visible, onCancel, taxAgentStore: { showOperateBtn } } = this.props; const { current, taxAgentId } = this.state; + const tabData = true && _.filter(tabs, it => it.key !== 1); return ( { - !taxAgentId && + !isEdit && { - _.map(tabs, item => { + _.map(tabData, item => { const { key, title } = item; return ; }) diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js index bf34dbfd..8783090b 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentTable.js @@ -5,10 +5,12 @@ * Date: 2022/11/29 */ import React, { Component } from "react"; -import { WeaTable } from "ecCom"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; import * as API from "../../../apis/taxAgent"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; + class TaxAgentTable extends Component { constructor(props) { super(props); @@ -73,7 +75,7 @@ class TaxAgentTable extends Component { const { onOperate, isChief } = this.props; const pagination = { ...pageInfo, - showTotal: total => `共 ${total} 条`, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, showSizeChanger: true, showQuickJumper: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -100,16 +102,17 @@ class TaxAgentTable extends Component { columns={[ ...columns, { - title: "操作", + title: getLabel(30585, "操作"), key: "operation", width: 120, render: (text, record) =>
- onOperate("edit", record.id)}> 编辑 + onOperate("edit", record.id)}>{getLabel(501169, "编辑")} { isChief && onOperate("delete", record.id)}> 删除 + onClick={() => onOperate("delete", record.id)}>{getLabel(535052, "删除")} }
} diff --git a/pc4mobx/hrmSalary/pages/salary/taxAgent.js b/pc4mobx/hrmSalary/pages/salary/taxAgent.js index 07042e64..3c611e6f 100644 --- a/pc4mobx/hrmSalary/pages/salary/taxAgent.js +++ b/pc4mobx/hrmSalary/pages/salary/taxAgent.js @@ -1,13 +1,15 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { Button, message, Modal } from "antd"; -import { WeaCheckbox, WeaFormItem, WeaInputSearch, WeaSearchGroup, WeaTop } from "ecCom"; +import { WeaCheckbox, WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup, WeaTop } from "ecCom"; import ComHint from "./components/comHint"; import TaxAgentTable from "./components/taxAgentTable"; import TaxAgentSlide from "./components/taxAgentSlide"; import * as API from "../../apis/taxAgent"; import "./index.less"; +const { getLabel } = WeaLocaleProvider; + @inject("taxAgentStore") @observer class TaxAgent extends Component { @@ -21,7 +23,7 @@ class TaxAgent extends Component { taxAgentSlideProps: { isEdit: false, visible: false, - title: "新增个税扣缴义务人", + title: getLabel(543629, "新增个税扣缴义务人"), taxAgentId: "", current: 0 } @@ -59,8 +61,8 @@ class TaxAgent extends Component { taxAgentBaseSave = devolutionStatus => { this.setState({ decentralization: this.state.decentralization }, () => { Modal.confirm({ - title: "信息确认", - content: `确认${devolutionStatus === "0" ? "停用" : "启用"}分权?`, + title: getLabel(131329, "信息确认"), + content: `${getLabel(33703, "确认")}${devolutionStatus === "0" ? getLabel(26471, "停用") : getLabel(26472, "启用")}${getLabel(524044, "分权")}?`, onOk: () => { const paylaod = { devolutionStatus }; const { taxAgentStore } = this.props; @@ -76,8 +78,6 @@ class TaxAgent extends Component { message.error(errormsg || `${devolutionStatus === "0" ? "停用" : "启用"}分权失败`); } }); - }, - onCancel() { } }); }); @@ -109,10 +109,10 @@ class TaxAgent extends Component { taxAgentRangeSync({}).then(({ status, data, errormsg }) => { this.setState({ syncLoading: false }); if (status) { - message.success(data || "操作成功"); + message.success(data || getLabel(30700, "操作成功")); this.taxAgentTableRef.getTaxAgentList(); } else { - message.error(data || errormsg || "操作失败"); + message.error(data || errormsg || getLabel(30651, "操作失败")); } }); }; @@ -124,7 +124,7 @@ class TaxAgent extends Component { ...this.state.taxAgentSlideProps, isEdit: false, visible: false, - title: "新增个税扣缴义务人", + title: getLabel(543629, "新增个税扣缴义务人"), taxAgentId: "", current: 0 } @@ -139,22 +139,22 @@ class TaxAgent extends Component { this.setState({ taxAgentSlideProps: { ...this.state.taxAgentSlideProps, - visible: true, title: "编辑个税扣缴义务人", + visible: true, title: getLabel(543632, "编辑个税扣缴义务人"), taxAgentId: itemId, current, isEdit: true } }); break; case "delete": Modal.confirm({ - title: "信息确认", - content: `确认要删除吗?`, + title: getLabel(131329, "信息确认"), + content: getLabel(388758, "确认要删除吗?"), onOk: () => { API.deleteTaxAgent([itemId]).then(({ status, errormsg }) => { if (status) { - message.success("删除成功"); + message.success(getLabel(502230, "删除成功")); this.taxAgentTableRef.getTaxAgentList(); } else { - message.error(errormsg || "删除失败"); + message.error(errormsg || getLabel(20462, "删除失败")); } }); } @@ -171,28 +171,29 @@ class TaxAgent extends Component { permission, syncLoading } = this.state; const btns = [ - , + , this.setState({ searchValue })} - placeholder="请输入个税扣缴义务人名称" + placeholder={getLabel(543634, "请输入个税扣缴义务人名称")} onSearch={() => this.taxAgentTableRef.getTaxAgentList()} /> ]; const customTitle =
- 个税扣缴义务人 + {getLabel(537996, "个税扣缴义务人")} { permission.isChief && }
; return (
} iconBgcolor="#F14A2D" buttons={btns} @@ -200,8 +201,8 @@ class TaxAgent extends Component {
{ permission.isChief && - - + + From 9ae523ad878ead578e04bd506dcaada94971970f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 28 Jul 2023 09:23:35 +0800 Subject: [PATCH 014/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/enableSettings.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js index 93c305f0..bc24c71b 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -5,7 +5,7 @@ * Date: 2023/7/19 */ import React, { Component } from "react"; -import { Button, Col, Input, Row } from "antd"; +import { Button, Col, Input, Modal, Row } from "antd"; import TipLabel from "../../../components/TipLabel"; import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; import "./index.less"; @@ -21,6 +21,19 @@ class EnableSettings extends Component { } handleEnale = (enable) => { + if (enable === "1") { + this.setState({ enable }); + } else { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"), + onOk: () => { + }, + onCancel: () => { + this.setState({ enable: this.state.enable }); + } + }); + } }; render() { From 3645c524345dc68903c1e33134083d3da9c54cca 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 10:35:49 +0800 Subject: [PATCH 015/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E7=AE=97=E8=96=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../intelligentCalculateSalarySettings.js | 15 ++++ .../excelEditor/components/codeAction.js | 20 ++--- .../hrmSalary/components/excelEditor/index.js | 2 +- .../components/conditions.js | 16 ++-- .../components/dimensionSlide.js | 22 ++--- .../components/dimensionTable.js | 22 ++--- .../components/employeeDetails.js | 4 +- .../components/groupIndividualEditTable.js | 2 +- .../components/groupSpacingEditTable.js | 16 ++-- .../components/reportList.js | 16 ++-- .../components/statisticsModal.js | 6 +- .../components/enableSettings.js | 89 +++++++++++++++---- .../components/insufficientTrafficAlert.js | 8 +- 13 files changed, 155 insertions(+), 83 deletions(-) create mode 100644 pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js diff --git a/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js new file mode 100644 index 00000000..9ce1d575 --- /dev/null +++ b/pc4mobx/hrmSalary/apis/intelligentCalculateSalarySettings.js @@ -0,0 +1,15 @@ +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; + +//智能算薪-计费配置编辑表单 +export const apiflowBillingConfigGet = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/get", "GET", params); +}; +//智能算薪-计费配置保存 +export const apiflowBillingConfigSave = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/save", params); +}; +//智能算薪-计费配置开关 +export const apiflowBillingConfigEnable = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/enable", params); +}; diff --git a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js index bca61000..80d7df91 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js +++ b/pc4mobx/hrmSalary/components/excelEditor/components/codeAction.js @@ -123,10 +123,10 @@ class CodeAction extends Component {
-
{getLabel(111, "变量")}
+
{getLabel(33748, "变量")}
- this.setState({ variableText })}/> this.setState({ variItemText })} /> } @@ -166,10 +166,10 @@ class CodeAction extends Component {
-
{getLabel(111, "函数")}
+
{getLabel(30686, "函数")}
- this.setState({ funcText })}/>
- {!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(111, "提示")} + {!_.isEmpty(funcHoverItem) ? funcHoverItem.name : getLabel(558, "提示")}
@@ -232,12 +232,12 @@ const TipList = (props) => {
:
-
{getLabel(111, "语法")}
+
{getLabel(543403, "语法")}
{formatString}
{description}
-
{getLabel(111, "参数")}
+
{getLabel(561, "参数")}
{ _.map(paramDescs, it => { return
@@ -246,9 +246,9 @@ const TipList = (props) => {
; }) } -
{getLabel(111, "示例")}
+
{getLabel(82159, "示例")}
{example} -
{getLabel(111, "结果")}
+
{getLabel(356, "结果")}
{result}
; diff --git a/pc4mobx/hrmSalary/components/excelEditor/index.js b/pc4mobx/hrmSalary/components/excelEditor/index.js index 8b0fe4ae..c3a8fefc 100644 --- a/pc4mobx/hrmSalary/components/excelEditor/index.js +++ b/pc4mobx/hrmSalary/components/excelEditor/index.js @@ -157,7 +157,7 @@ class ExcelEditor extends Component {
} diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js index a622aefb..3fd68eba 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/conditions.js @@ -11,7 +11,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["dimType"], fieldcol: 14, - label: getLabel(111, "维度类型"), + label: getLabel(389137, "维度类型"), labelcol: 6, options: [], detailtype: 3, @@ -23,7 +23,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["setting4Qualitative"], fieldcol: 14, - label: getLabel(111, "统计维度"), + label: getLabel(506800, "统计维度"), labelcol: 6, options: [], rules: "required|string", @@ -34,7 +34,7 @@ export const condition = [ conditionType: "INPUT", domkey: ["dimName"], fieldcol: 14, - label: getLabel(111, "统计维度名称"), + label: getLabel(543321, "统计维度名称"), labelcol: 6, value: "", rules: "required|string", @@ -45,7 +45,7 @@ export const condition = [ conditionType: "SELECT", domkey: ["dimCode"], fieldcol: 14, - label: getLabel(111, "分组所属字段"), + label: getLabel(543322, "分组所属字段"), labelcol: 6, options: [], viewAttr: 2, @@ -57,13 +57,13 @@ export const condition = [ conditionType: "TEXTAREA", domkey: ["remark"], fieldcol: 14, - label: getLabel(111, "描述"), + label: getLabel(433, "描述"), labelcol: 6, value: "", viewAttr: 2 } ], - title: getLabel(111, "基础设置"), + title: getLabel(82751, "基础设置"), defaultshow: true } ]; @@ -75,7 +75,7 @@ export const reportCondition = [ conditionType: "INPUT", domkey: ["reportName"], fieldcol: 14, - label: getLabel(111, "报表名称"), + label: getLabel(15517, "报表名称"), labelcol: 6, value: "", rules: "required|string", @@ -86,7 +86,7 @@ export const reportCondition = [ conditionType: "SELECT", domkey: ["dimensionIds"], fieldcol: 14, - label: getLabel(111, "统计维度"), + label: getLabel(506800, "统计维度"), labelcol: 6, options: [], rules: "required|string", diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js index b7bd9c2e..8afc64d6 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/dimensionSlide.js @@ -89,8 +89,8 @@ class DimensionSlide extends Component { if (dimType === "QUALITATIVE") { if (!setting4Qualitative || !extraParams.dimName) { Modal.warning({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "必要信息不完整,红色*为必填项!") + title: getLabel(131329, "信息确认"), + content: getLabel(383779, "必要信息不完整,红色*为必填项!") }); return; } @@ -100,8 +100,8 @@ class DimensionSlide extends Component { } else { if (!extraParams.dimName) { Modal.warning({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "必要信息不完整,红色*为必填项!") + title: getLabel(131329, "信息确认"), + content: getLabel(383779, "必要信息不完整,红色*为必填项!") }); return; } @@ -109,7 +109,7 @@ class DimensionSlide extends Component { const { setting4RationGroupSpacing } = this.state; const bool = _.every(setting4RationGroupSpacing, it => it.startValue !== "" && it.endValue !== "" && it.startValue <= it.endValue); if (_.isEmpty(setting4RationGroupSpacing) || !bool) { - message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!")); + message.warning(getLabel(543318, "请完善分组设置相关数据!分组设置不能为空,起始值结束值必填,且起始值需小于结束值!")); return; } else { payload = { @@ -127,7 +127,7 @@ class DimensionSlide extends Component { const { setting4RationGroupIndividual } = this.state; const bool = _.every(setting4RationGroupIndividual, it => it.value !== ""); if (_.isEmpty(setting4RationGroupIndividual) || !bool) { - message.warning(getLabel(111, "请完善分组设置相关数据!分组设置不能为空,且数值必填")); + message.warning(getLabel(543319, "请完善分组设置相关数据!分组设置不能为空,且数值必填")); return; } else { payload = { @@ -141,11 +141,11 @@ class DimensionSlide extends Component { dimensionSave(payload).then(({ status, errormsg }) => { this.setState({ loading: false }); if (status) { - message.success(getLabel(111, "保存成功")); + message.success(getLabel(22619, "保存成功")); onCancel(true); this.props.form.resetForm(); } else { - message.error(errormsg || getLabel(111, "保存失败")); + message.error(errormsg || getLabel(22620, "保存失败")); } }).catch(() => this.setState({ loading: false })); }; @@ -176,15 +176,15 @@ class DimensionSlide extends Component { className="dimensionSlideWrapper" title={
- {formId ? getLabel(111, "编辑统计维度") : getLabel(111, "新建统计维度")} - + {formId ? getLabel(543407, "编辑统计维度") : getLabel(543314, "新建统计维度")} +
} > {getSearchs(form, condition, 1, false, this.formItemChange)} { dimType !== "QUALITATIVE" && - + { dimType === "RATION_GROUP_SPACING" && { Modal.confirm({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "确认要删除吗?"), + title: getLabel(131329, "信息确认"), + content: getLabel(388758, "确认要删除吗?"), onOk: () => { dimensionDelete(payload).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "删除成功")); + message.success(getLabel(502230, "删除成功")); this.dimensionList(); } else { - message.error(errormsg || getLabel(111, "删除失败")); + message.error(errormsg || getLabel(20462, "删除失败")); } }); } @@ -67,7 +67,7 @@ class DimensionTable extends Component { const { onEdit } = this.props; const pagination = { ...pageInfo, - showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], @@ -83,22 +83,22 @@ class DimensionTable extends Component { } }; const columns = [ - { dataIndex: "dimName", title: getLabel(111, "统计维度") }, - { dataIndex: "remark", title: getLabel(111, "描述") }, - { dataIndex: "dimType", title: getLabel(111, "维度类型") }, + { dataIndex: "dimName", title: getLabel(506800, "统计维度") }, + { dataIndex: "remark", title: getLabel(433, "描述") }, + { dataIndex: "dimType", title: getLabel(389137, "维度类型") }, { - dataIndex: "operate", title: getLabel(111, "操作"), + dataIndex: "operate", title: getLabel(30585, "操作"), render: (_, record) => { return ( { record.canEdit && - onEdit(record.id)}>{getLabel(111, "编辑")} + onEdit(record.id)}>{getLabel(501169, "编辑")} } { record.canDelete && this.dimensionDelete([record.id])}>{getLabel(111, "删除")} + onClick={() => this.dimensionDelete([record.id])}>{getLabel(535052, "删除")} } ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js index dc89547d..bbc6d643 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/employeeDetails.js @@ -55,7 +55,7 @@ class EmployeeDetails extends Component { width: 80, render: (_, record) => { return {getLabel(111, "查看")}; + href={`${window.location.origin}/spa/hrmSalary/static/index.html#/main/hrmSalary/analysisOfSalaryStatistics/${record.id}?name=${record.name}&dept=${record.department || ""}`}>{getLabel(33564, "查看")}; } }] }); @@ -67,7 +67,7 @@ class EmployeeDetails extends Component { const { dataSource, loading, columns, pageInfo } = this.state; const pagination = { ...pageInfo, - showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js index 1d709bc6..50b864b5 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupIndividualEditTable.js @@ -32,7 +32,7 @@ class GroupIndividualEditTable extends Component { const { dataSource } = this.state; const columns = [ { - title: getLabel(111, "分组设置值"), + title: getLabel(543320, "分组设置值"), dataIndex: "value", key: "value", com: [ diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js index c976cd93..3cb29022 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/groupSpacingEditTable.js @@ -39,7 +39,7 @@ class GroupSpacingEditTable extends Component { const { dataSource } = this.state; const columns = [ { - title: getLabel(111, "起始值"), + title: getLabel(541412, "起始值"), dataIndex: "startValue", key: "startValue", com: [ @@ -47,19 +47,19 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "含"), + title: getLabel(33864, "含"), dataIndex: "includeStart", key: "includeStart", com: [ { type: "CHECKBOX", key: "includeStart", - otherParams: { content: getLabel(111, "含") } + otherParams: { content: getLabel(33864, "含") } } ] }, { - title: getLabel(111, "至"), + title: getLabel(15322, "至"), dataIndex: "to", key: "to", com: [ @@ -67,7 +67,7 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "结束值"), + title: getLabel(508931, "结束值"), dataIndex: "endValue", key: "endValue", com: [ @@ -75,14 +75,14 @@ class GroupSpacingEditTable extends Component { ] }, { - title: getLabel(111, "含"), + title: getLabel(33864, "含"), dataIndex: "includeEnd", key: "includeEnd", com: [ { type: "CHECKBOX", key: "includeEnd", - otherParams: { content: getLabel(111, "含") } + otherParams: { content: getLabel(33864, "含") } } ] } @@ -90,7 +90,7 @@ class GroupSpacingEditTable extends Component { return ( ({ ...item, to: getLabel(111, "至") }))} + datas={_.map(dataSource, item => ({ ...item, to: getLabel(15322, "至") }))} showCopy={false} onChange={this.handleChangeTableData} /> ); diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js index 6510d5b1..0345cad3 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/reportList.js @@ -34,16 +34,16 @@ class ReportList extends Component { }; reportStatisticsReportDelete = (payload) => { Modal.confirm({ - title: getLabel(111, "信息确认"), - content: getLabel(111, "确认删除本条数据吗?"), + title: getLabel(131329, "信息确认"), + content: getLabel(543231, "确认删除本条数据吗?"), onOk: () => { const { reportName = "" } = this.props; reportStatisticsReportDelete(payload).then(({ status, errormsg }) => { if (status) { - message.success(getLabel(111, "删除成功")); + message.success(getLabel(502230, "删除成功")); this.reportStatisticsReportList({ reportName }); } else { - message.error(errormsg || getLabel(111, "删除失败")); + message.error(errormsg || getLabel(20462, "删除失败")); } }); } @@ -71,7 +71,7 @@ class ReportList extends Component { return ( { - _.isEmpty(dataSource) ?
{getLabel(111, "暂无数据")}
: + _.isEmpty(dataSource) ?
{getLabel(83553, "暂无数据")}
: _.map(dataSource, it => { const { reportName, dimension, id, dimensionId } = it; return this.handleGoReportView(id)}> @@ -80,15 +80,15 @@ class ReportList extends Component {
{reportName}
-
{getLabel(111, "统计维度")}:
+
{getLabel(506800, "统计维度")}:
{dimension}
this.handleOptsClick(e, id, dimensionId)}> - {getLabel(111, "编辑")} - {getLabel(111, "删除")} + {getLabel(501169, "编辑")} + {getLabel(535052, "删除")} }> diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js index c8920887..75595c3e 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js @@ -31,15 +31,15 @@ class StatisticsModal extends Component { this.setState({ loading: false }); if (status) { onCancel(true); - message.success(getLabel(111, "保存成功")); + message.success(getLabel(22619, "保存成功")); form.resetForm(); } else { - message.error(errormsg || getLabel(111, "保存失败")); + message.error(errormsg || getLabel(22620, "保存失败")); } }).catch(() => this.setState({ loading: false })); } else { Modal.warning({ - title: getLabel(111, "信息确认"), + title: getLabel(131329, "信息确认"), content: getLabel(111, "必要信息不完整,红色*为必填项!") }); } diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js index bc24c71b..ed849754 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/enableSettings.js @@ -5,9 +5,14 @@ * Date: 2023/7/19 */ import React, { Component } from "react"; -import { Button, Col, Input, Modal, Row } from "antd"; +import { Button, Col, Input, message, Modal, Row } from "antd"; import TipLabel from "../../../components/TipLabel"; import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { + apiflowBillingConfigEnable, + apiflowBillingConfigGet, + apiflowBillingConfigSave +} from "../../../apis/intelligentCalculateSalarySettings"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -16,45 +21,94 @@ class EnableSettings extends Component { constructor(props) { super(props); this.state = { - enable: "1" + enable: "1", id: "", + appKey: "", appSecret: "", + loading: false }; } + componentDidMount() { + this.apiflowBillingConfigGet(); + } + + apiflowBillingConfigGet = () => { + apiflowBillingConfigGet().then(({ status, data }) => { + if (status) { + const { id, appKey, appSecret, enable } = data; + this.setState({ + appKey, appSecret, enable: enable ? "1" : "0", id + }); + } + }); + }; + apiflowBillingConfigEnable = (enable) => { + apiflowBillingConfigEnable({ enable }).then(({ status, errormsg }) => { + if (status) { + message.success(enable === "OFF" ? getLabel(111, "关闭成功!") : getLabel(111, "开启成功!")); + enable === "OFF" && this.setState({ enable: "0" }); + } else { + message.error(errormsg || (enable === "OFF" ? getLabel(111, "关闭失败!") : getLabel(111, "开启失败!"))); + this.setState({ enable: this.state.enable }); + } + }); + }; + apiflowBillingConfigSave = () => { + const { enable, id, appKey, appSecret } = this.state; + const payload = { + id, appKey, appSecret, + enable: enable === "1" ? "ON" : "OFF" + }; + this.setState({ loading: true }); + apiflowBillingConfigSave(payload).then(({ status, errormsg }) => { + this.setState({ loading: false }); + if (status) { + message.success(getLabel(384521, "设置成功!")); + } else { + message.error(errormsg || getLabel(384522, "设置失败!")); + } + }).catch(() => this.setState({ loading: false })); + }; handleEnale = (enable) => { if (enable === "1") { - this.setState({ enable }); + this.setState({ enable }, () => this.apiflowBillingConfigEnable("ON")); } else { Modal.confirm({ title: getLabel(131329, "信息确认"), - content: getLabel(111, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"), - onOk: () => { - }, + content: getLabel(544344, "确定要关闭智能算薪功能吗?关闭后,将无法使用在线报送人员信息、在线获取专项附加扣除数据、在线个税申报等功能!"), + onOk: () => this.apiflowBillingConfigEnable("OFF"), onCancel: () => { this.setState({ enable: this.state.enable }); } }); } }; + handleChangeInput = (key, val) => this.setState({ [key]: val }); render() { - const { enable } = this.state; + const { enable, appKey, appSecret, loading } = this.state; const tipList = [ - getLabel(111, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), - getLabel(111, "2、您可在【接口流量统计】中查看接口流量使用情况;"), - getLabel(111, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), - getLabel(111, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") + getLabel(544282, "1、智能算薪默认是开启的,若购买了智能算薪,请先配置账号密码,在购买的流量足够的前提下即可正常使用;"), + getLabel(544283, "2、您可在【接口流量统计】中查看接口流量使用情况;"), + getLabel(544284, "3、您可以设置【流量不足提醒】,提前提醒可以避免次月要用时因流量不足无法使用的情况。"), + getLabel(544285, "4、如您需了解您购买的流量的使用明细,可查看【流量使用记录】;") ]; const InputAccount = label => { return ( - + this.handleChangeInput("appKey", e.target.value)} + /> ); }; const InputPassword = label => { return ( - + this.handleChangeInput("appSecret", e.target.value)} + /> ); }; @@ -74,12 +128,15 @@ class EnableSettings extends Component {
-
+
+ +
diff --git a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js index 7fde6b18..9649f2f2 100644 --- a/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js +++ b/pc4mobx/hrmSalary/pages/intelligentCalculateSalarySettings/components/insufficientTrafficAlert.js @@ -22,26 +22,26 @@ class InsufficientTrafficAlert extends Component { const { remind } = this.state; return ( - + this.setState({ remind })}/> { remind === "1" && Date: Wed, 9 Aug 2023 15:02:27 +0800 Subject: [PATCH 016/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E5=AF=B9=E6=8E=A5e1?= =?UTF-8?q?0=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4=E4=B9=89=E5=8A=A1?= =?UTF-8?q?=E4=BA=BA=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:开启关闭个税扣缴义务人开关 From d41687c3fb64fc80373c99b7eed4bad3a3a0f351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 10 Aug 2023 10:22:16 +0800 Subject: [PATCH 017/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/taxAgent.js | 7 +++++- .../pages/salary/components/taxAgentSlide.js | 21 +++++++++++++++-- .../salary/components/taxDeclarationInfo.js | 23 ++++++++++++++++--- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index 38852581..f22de23d 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -122,5 +122,10 @@ export const hasIconInTax = (params) => { }; //获取报税信息表单 export const taxReturnGetForm = (params) => { - return WeaTools.callApi("/api/bs/hrmsalary/taxReturn/getForm", "GET", params); + return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/taxReturn/getForm", "GET", params); +}; + +//个税信息-保存并验证报税信息 +export const saveAndCheck = (params) => { + return postFetch("/api/bs/hrmsalary/taxAgent/taxReturn/saveAndCheck", params); }; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index f760a72d..9f49ca38 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { Button, message } from "antd"; +import { Button, message, Modal } from "antd"; import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom"; import SlideModalTitle from "../../../components/slideModalTitle"; import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions"; @@ -122,7 +122,24 @@ class TaxAgentSlide extends Component { }); }; handleSaveAndVerify = () => { - console.log(this.taxInfoRef); + const { taxAgentId } = this.state; + const { fieldForm, fieldItem } = this.taxInfoRef.state; + const { city: cityVal, ...extra } = fieldForm; + const boolean = _.every(_.filter(fieldItem, item => item.viewAttr === 3), it => fieldForm[it.key]); + if (!boolean) { + Modal.warning({ + title: getLabel(131329, "信息确认"), + content: getLabel(518702, "必要信息不完整,红色*为必填项!") + }); + return; + } + const [nation, province, city] = cityVal ? cityVal.split("-") : []; + // requestType: 1:保存并验证 2:保存 + const payload = { + ...extra, nation, province, city, + taxAgentId, requestType: 1 + }; + console.log(_.omitBy(payload, val => _.isNil(val))); }; renderChildren = () => { const { current, taxAgentId } = this.state; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js index 5849e51b..cef52e95 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js @@ -45,8 +45,18 @@ class TaxDeclarationInfo extends Component { taxReturnGetForm = () => { const { taxAgentId } = this.props; - taxReturnGetForm({ taxAgentId }).then((status, data) => { - console.log(data); + taxReturnGetForm({ taxAgentId }).then(({ status, data }) => { + if (status) { + const { fieldForm } = this.state; + this.setState({ + fieldForm: { + ...fieldForm, + ..._.reduce(_.keys(fieldForm), (pre, cur) => { + return { ...pre, [cur]: data[cur] }; + }, {}) + } + }); + } }); }; handleChangeValue = (key, value) => { @@ -88,7 +98,14 @@ class TaxDeclarationInfo extends Component { { type === "SELECT" && this.handleChangeValue(key, v)}/> + onChange={(__, ___, datas) => { + if (!_.isEmpty(datas)) { + this.handleChangeValue(key, `1-${datas[0].pid}-${datas[0].id}`); + } else { + this.handleChangeValue(key, ""); + } + }} + /> } { type === "RADIO" && From bc91806e37a9fb27fb93b9d5e96ff963b6260254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 10 Aug 2023 11:11:23 +0800 Subject: [PATCH 018/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salary/components/taxAgentSlide.js | 31 +++++++++++++------ .../salary/components/taxDeclarationInfo.js | 8 ++--- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js index 9f49ca38..b3647225 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxAgentSlide.js @@ -27,6 +27,7 @@ class TaxAgentSlide extends Component { this.state = { current: 0, loading: false, + verifyLoading: false, taxAgentId: "" }; this.taxInfoRef = null; @@ -121,10 +122,10 @@ class TaxAgentSlide extends Component { } }); }; - handleSaveAndVerify = () => { + handleSaveAndVerify = (jumpAll = false) => { const { taxAgentId } = this.state; const { fieldForm, fieldItem } = this.taxInfoRef.state; - const { city: cityVal, ...extra } = fieldForm; + const { city: cityVal, netPassword, realNamePassword, ...extra } = fieldForm; const boolean = _.every(_.filter(fieldItem, item => item.viewAttr === 3), it => fieldForm[it.key]); if (!boolean) { Modal.warning({ @@ -137,9 +138,18 @@ class TaxAgentSlide extends Component { // requestType: 1:保存并验证 2:保存 const payload = { ...extra, nation, province, city, - taxAgentId, requestType: 1 + taxAgentId, requestType: 1, password: netPassword || realNamePassword }; - console.log(_.omitBy(payload, val => _.isNil(val))); + this.setState({ verifyLoading: true }); + API.saveAndCheck(_.omitBy(payload, val => _.isNil(val))).then(({ status, errormsg }) => { + this.setState({ verifyLoading: false }); + if (status) { + message.error(errormsg || getLabel(22619, "保存成功!")); + jumpAll ? this.props.onCancel(true) : this.props.onOk(); + } else { + message.error(errormsg || getLabel(22620, "保存失败!")); + } + }).catch(() => this.setState({ verifyLoading: false })); }; renderChildren = () => { const { current, taxAgentId } = this.state; @@ -162,8 +172,8 @@ class TaxAgentSlide extends Component { return CurrentDom; }; renderCustomOperate = () => { - const { isChief, isEdit } = this.props; - const { current, loading } = this.state; + const { isChief, isEdit, salaryOn } = this.props; + const { current, loading, verifyLoading } = this.state; let CurrentDom = []; //总管理员权限 if (isChief) { @@ -175,17 +185,18 @@ class TaxAgentSlide extends Component { ]; break; case 1: - const tmpV = []; + const tmpV = []; const tmpJ = [ - , + , ]; CurrentDom = isEdit ? tmpV : [...tmpV, ...tmpJ]; break; case 2: - CurrentDom = (!isEdit && false) ? + CurrentDom = (!isEdit && salaryOn) ? [] : []; diff --git a/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js index cef52e95..708bf93a 100644 --- a/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js +++ b/pc4mobx/hrmSalary/pages/salary/components/taxDeclarationInfo.js @@ -19,11 +19,11 @@ class TaxDeclarationInfo extends Component { name: "", taxCode: "", city: "", - areaCode: "", + areaCode: null, passwordType: "TAX_NET_PASSWORD", account: "", realNamePassword: "", - netPassword: "", + netPassword: null, registrationNo: "", departmentCode: "", taxInforVerifiyStatus: "" @@ -70,12 +70,12 @@ class TaxDeclarationInfo extends Component { if (key === "passwordType" && this.state.fieldForm.passwordType === "REAL_NAME_PASSWORD") { this.setState({ fieldItem: _.filter(fieldList, it => it.key !== "netPassword"), - fieldForm: { ...this.state.fieldForm, realNameAccount: "", realNameAccountPassword: "" } + fieldForm: { ...this.state.fieldForm, account: null, realNamePassword: null, netPassword: null } }); } else if (key === "passwordType" && this.state.fieldForm.passwordType === "TAX_NET_PASSWORD") { this.setState({ fieldItem: _.filter(fieldList, it => it.key !== "account" && it.key !== "realNamePassword"), - fieldForm: { ...this.state.fieldForm, taxOnlinePassword: "" } + fieldForm: { ...this.state.fieldForm, netPassword: null, account: null, realNamePassword: null } }); } }); From d43b31a5c2a4ff3c56fc68b63d73bfc708a1bb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 10 Aug 2023 14:07:18 +0800 Subject: [PATCH 019/165] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E4=B8=AA=E7=A8=8E?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/employeedeclare/index.js | 52 +++++++++++++++++-- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/employeedeclare/index.js b/pc4mobx/hrmSalary/pages/employeedeclare/index.js index c43be4b3..028f5961 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclare/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclare/index.js @@ -5,29 +5,71 @@ * Date: 2023/7/24 */ import React, { Component } from "react"; -import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom"; +import { WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; import { Col, Row } from "antd"; import TipLabel from "../../components/TipLabel"; const { getLabel } = WeaLocaleProvider; class Index extends Component { + constructor(props) { + super(props); + this.state = { + pageInfo: { current: 1, pageSize: 10, total: 0 }, + loading: false + }; + } + render() { + const { pageInfo } = this.state; const tipList = [ - getLabel(111, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") + getLabel(544290, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") ]; return ( } buttons={[ - ]} >
- + + ({getLabel(83110, "查看详情")}) + } + ]} + dataSource={[]} + pagination={{ + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ + pageInfo: { ...pageInfo, current, pageSize } + }); + }, + onChange: current => { + this.setState({ + pageInfo: { ...pageInfo, current } + }); + } + }} + /> +
From a2c2292e60741391b21e310b3ff03449c502466c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 11 Aug 2023 16:06:21 +0800 Subject: [PATCH 020/165] =?UTF-8?q?=E6=B1=89=E6=A1=91-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=E6=B7=BB=E5=8A=A0=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E5=AF=BC=E5=85=A5=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../importDialog/components/impStep1.js | 86 +++++++++++ .../importDialog/components/impStep3.js | 51 ++++++ .../components/importDialog/index.js | 135 ++++++++++++++++ .../components/importDialog/index.less | 145 ++++++++++++++++++ pc4mobx/hrmSalary/index.js | 3 + .../pages/employeedeclareDetail/index.js | 43 ++++++ .../pages/employeedeclareDetail/index.less | 18 +++ 7 files changed, 481 insertions(+) create mode 100644 pc4mobx/hrmSalary/components/importDialog/components/impStep1.js create mode 100644 pc4mobx/hrmSalary/components/importDialog/components/impStep3.js create mode 100644 pc4mobx/hrmSalary/components/importDialog/index.js create mode 100644 pc4mobx/hrmSalary/components/importDialog/index.less create mode 100644 pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js create mode 100644 pc4mobx/hrmSalary/pages/employeedeclareDetail/index.less diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js new file mode 100644 index 00000000..9e24dbf5 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -0,0 +1,86 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤一 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Icon, Upload, message } from "antd"; + +const Dragger = Upload.Dragger; +const { getLabel } = WeaLocaleProvider; + +class ImpStep1 extends Component { + constructor(props) { + super(props); + this.state = { + fileList: [] + }; + } + + handleChange = (data) => { + const { fileList, file } = data; + if (file.response && typeof (file.response) != "undefined") message.success(getLabel(111, "上传成功")); + this.setState({ fileList }); + }; + + render() { + const { fileList } = this.state; + const dragger = { + accept: ".xlsx", + name: "file", + multiple: false, + action: "/api/doc/upload/uploadFile", + fileList, + onChange: this.handleChange + }; + return ( +
+ {/* 导入选项 */} + { + this.props.importParams && +
+
{getLabel(543201, "导入选项")}
+ {this.props.importParams} +
+ } +
{getLabel(543202, "导入Excel")}
+

+ +

+

+

{getLabel(543203, "点击或将文件拖拽到此区域上传")}

+

{getLabel(543204, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}

+
+ +

+ +
+
{getLabel(27577, "操作步骤")}
+

+ {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}   + {getLabel(543207, "点击这里下载模板")} +

+

{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}

+

{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}

+

+ {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`} +

+
+ +
+
{getLabel(543223, "Excel文件说明")}
+

{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}

+

{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}

+

{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}

+
+ +
+ ); + } +} + +export default ImpStep1; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js new file mode 100644 index 00000000..481813b4 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -0,0 +1,51 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤3 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import successImg from "../../importModal/success.svg"; + +const getLabel = WeaLocaleProvider.getLabel; + +class ImpStep3 extends Component { + render() { + const { importResult } = this.props; + return ( +
+ { + !_.isEmpty(importResult) ? +
+

+

+ {getLabel(389249, "已导入")} + {importResult.successCount}   + {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} + {importResult.errorCount}  {getLabel(30690, "条数据")} +

+
: +
+

{getLabel(111, "导入失败")}

+
+ } + { + !_.isEmpty(importResult.errorData) && + + } +
+ ); + } +} + +export default ImpStep3; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.js b/pc4mobx/hrmSalary/components/importDialog/index.js new file mode 100644 index 00000000..49956e37 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.js @@ -0,0 +1,135 @@ +/* + * Author: 黎永顺 + * name: 导入弹框-步骤条 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { Button, message, Modal } from "antd"; +import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom"; +import ImpStep1 from "./components/impStep1"; +import ImpStep3 from "./components/impStep3"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; +const Step = WeaSteps.Step; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + current: 0 + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (JSON.stringify(nextProps.importResult) !== JSON.stringify(this.props.importResult)) { + this.setState({ + current: this.state.current + 1 + }); + } + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ current: 0 }); + } + + renderChildren = () => { + const { current } = this.state; + const { importParams, link, excludeKey, importResult } = this.props; + let CurrentDom = null; + switch (current) { + case 0: + CurrentDom = this.step1Ref = dom}/>; + break; + case 1: + CurrentDom = null; + if (excludeKey) { + CurrentDom = ; + } + break; + case 2: + CurrentDom = null; + break; + default: + CurrentDom = null; + break; + } + return CurrentDom; + }; + + /* + * Author: 黎永顺 + * Description: 下一步 + * Params: + * Date: 2023/8/11 + */ + handleNext = () => { + const { params } = this.props; + const { fileList } = this.step1Ref.state; + if (!_.isEmpty(params)) { + if (!Object.values(params).every(o => !!o)) { + Modal.warning({ + title: getLabel(131329, "信息确认"), + content: getLabel(518702, "必要信息不完整,红色*为必填项!") + }); + return; + } + } + if (_.isEmpty(fileList)) { + message.error(getLabel(111, "请先上传EXCEL文件")); + return; + } + const [file] = fileList; + const { response } = file; + this.props.nextCallback(response.data.fileid); + }; + + render() { + const { current } = this.state; + const stepData = [ + { key: 0, label: getLabel(543202, "上传EXCEL") }, + { key: 1, label: getLabel(543200, "数据预览") }, + { key: 2, label: getLabel(502835, "导入数据") } + ]; + const btns = [ + , + , + + ]; + return ( + +
+
+ + {/*this.props.key: 不需要展示的步骤*/} + { + _.map(_.filter(stepData, item => item.key !== this.props.excludeKey), it => ( + )) + } + +
+
+ { + this.renderChildren() + } +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less new file mode 100644 index 00000000..8e4dbb53 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -0,0 +1,145 @@ +.importBox { + .importCont { + padding: 16px 8px; + + .weapp-batch-impsteps-picker-content-imp-steps { + width: 80%; + margin: 0 auto; + } + + .weapp-batch-impsteps-picker { + margin: 16px auto; + + .weapp-batch-impsteps-picker-content-imp-step1 { + width: 98%; + background-color: #fff; + margin: 8px auto; + border-radius: 3px; + padding: 1px 12px; + + .weapp-batch-impsteps-picker-content-imp-step1 div { + color: #111; + line-height: 22px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param { + box-sizing: border-box; + padding: 16px; + height: auto; + flex-wrap: wrap; + width: 100%; + } + + .weapp-salary-import-param { + border: 1px solid #ebedf0; + padding: 8px; + margin: 4px 0 14px; + } + + .weapp-salary-tb-filter { + display: flex; + flex-wrap: wrap; + align-items: center; + height: 46px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param .tbf-item { + display: flex; + justify-content: flex-start !important; + } + + .weapp-salary-tb-filter .tbf-item { + padding: 0 20px 0 0; + display: flex; + align-items: center; + font-size: 12px; + color: #111; + height: 40px; + } + + .weapp-salary-tb-filter .tbf-item > .tbfi-label { + flex-basis: 100px; + flex-shrink: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 10px; + color: #666; + } + + .draggerUploadWrapper { + margin: 16px 0 0; + + .ant-upload-drag-container { + padding: 24px 0 16px; + + .iconUpload { + i { + color: #5d9cec; + font-size: 43px; + } + } + + .uplaod-title { + font-size: 14px; + color: #333; + height: 24px; + line-height: 24px; + margin-top: 8px; + } + + .uplaod-subTitle { + height: 22px; + font-size: 12px; + color: #666; + text-align: center; + line-height: 22px; + } + } + } + + .bottom-border, .description { + margin-top: 12px; + + p { + font-size: 12px; + color: #666; + line-height: 15px; + margin: 12px 0; + } + } + + .bottom-border { + border-bottom: 1px solid #e5e5e5; + + .weapp-salary-link { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: #5d9cec; + } + } + + } + } + + .weapp-batch-impsteps-picker-content-imp-step3 { + .weapp-batch-impsteps-picker-spinText { + position: relative; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + padding-top: 80px; + padding-bottom: 80px; + text-align: center; + + p { + margin: 14px 0; + } + } + } + + } +} diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 8e9ff9d6..d584c6e9 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -21,6 +21,7 @@ import PayrollGrant from "./pages/payroll/payrollGrant"; import PayrollDetail from "./pages/payroll/payrollDetail"; import Declare from "./pages/declare"; import Employeedeclare from "./pages/employeedeclare"; +import EmployeedeclareDetail from "./pages/employeedeclareDetail"; import TaxRate from "./pages/taxRate"; import TaxAgent from "./pages/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; @@ -90,6 +91,7 @@ const DataAcquisition = (props) => props.children; // reportView 薪酬报表查看 // externalPersonManage 非系统人员管理 // employeedeclare 人员信息报送 +// employeedeclareDetail 人员信息报送详情 const Routes = ( + {getLabel(111, "全部报送")}, + , + + , - , - + , + , + , + + )} + content={(
Content
)} + /> + ); + } +} + +export default EmployeeDeclareDetailSchemaEditDialog; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js index 0d821b12..ab5a82c6 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/constants.js @@ -25,3 +25,163 @@ export const submitStatus = [ lanId: 111 } ]; + +export const advanceConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["keyword"], + fieldcol: 18, + label: "姓名或工号", + lanId: 111, + labelcol: 6, + value: "" + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57" + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 18, + label: "部门", + lanId: 27511, + labelcol: 6 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: true, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "278" + }, + colSpan: 1, + conditionType: "BROWSER", + domkey: ["positionIds"], + fieldcol: 18, + label: "岗位", + lanId: 6086, + labelcol: 6 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentStatus"], + fieldcol: 18, + label: "人员状态", + lanId: 382300, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["employmentType"], + fieldcol: 18, + label: "任职受雇从业类型", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "RANGEPICKER", + domkey: ["fromEmploymentDate", "endEmploymentDate"], + fieldcol: 18, + label: "任职受雇日期", + lanId: 111, + labelcol: 6, + value: "" + }, + { + colSpan: 1, + conditionType: "RANGEPICKER", + domkey: ["fromDismissDate", "endDismissDate"], + fieldcol: 18, + label: "离职日期", + lanId: 111, + labelcol: 6, + value: "" + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["disability"], + fieldcol: 18, + label: "是否残疾", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["lonelyOld"], + fieldcol: 18, + label: "是否孤老", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["martyrDependents"], + fieldcol: 18, + label: "是否是烈属", + lanId: 111, + labelcol: 6, + value: "", + options: [] + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["deductExpenses"], + fieldcol: 18, + label: "是否扣除减除费用", + lanId: 111, + labelcol: 6, + value: "", + options: [] + } + ], + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js index a6565b04..10474d27 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js @@ -6,30 +6,59 @@ */ import React, { Component } from "react"; import { WeaDatePicker, WeaLocaleProvider, WeaSelect, WeaTab, WeaTop } from "ecCom"; -import { submitStatus } from "./constants"; -import { Button, Dropdown, Menu } from "antd"; +import { Button, Dropdown, Menu, Spin } from "antd"; +import BaseInfo from "./components/baseInfo"; +import { advanceConditions, submitStatus } from "./constants"; +import { getSearchs } from "../../util"; import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; import "./index.less"; const { getLabel } = WeaLocaleProvider; -@inject("taxAgentStore") +@inject("taxAgentStore", "employeeDeclareStore") @observer class Index extends Component { constructor(props) { super(props); this.state = { - selectedKey: "0" + selectedKey: "0", + showSearchAd: false, + declareStatus: "ALL", + taxCycle: new Date() }; } componentDidMount() { + const { employeeDeclareStore: { advanceForm } } = this.props; document.title = getLabel(544289, "人员信息报送"); + advanceForm.initFormFields(advanceConditions); + window.addEventListener("message", this.handleReceive, false); } + componentWillUnmount() { + window.removeEventListener("message", this.handleReceive, false); + } + + handleReceive = ({ data }) => { + const { type, payload: { id, params } = {} } = data; + if (type === "init") { + this.postMessageToChild({}); + } else if (type === "turn") { + if (id === "PAGEINFO") { + const { pageNum: current, size: pageSize } = params; + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }); + } + } + }; + postMessageToChild = (payload) => { + const childFrameObj = document.getElementById("atdTable"); + childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({}), "*"); + }; + render() { - const { selectedKey } = this.state; - const { taxAgentStore: { showOperateBtn } } = this.props; + const { selectedKey, showSearchAd, declareStatus, taxCycle } = this.state; + const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form } } = this.props; const menu = ( {getLabel(32136, "批量删除")} @@ -42,7 +71,8 @@ class Index extends Component { , , , - , + console.log(val)}/>, + } + type="primary">{getLabel(1421, "新增")}, ({ ...it, showname: getLabel(it.lanId, it.showname) }))}/> - ]} + value={declareStatus} + style={{ width: 150 }} + options={_.map(submitStatus, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))} + onChange={declareStatus => this.setState({ declareStatus })} + /> + ]} searchsBaseValue={form.getFormParams().keyword} + onSearchChange={(v) => form.updateFields({ keyword: v })} onChange={key => this.setState({ selectedKey: key })} + onAdReset={() => form.resetForm()} /> +
+ +