From c3d72e9fae9ed89bd606578492ccb95a91f849d8 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 24 Oct 2022 09:28:28 +0800 Subject: [PATCH 01/40] =?UTF-8?q?=20=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6-?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E7=BC=B4=E7=BA=B3=E9=9C=80=E8=A6=81=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=A1=B5=E9=9D=A2=E6=89=8D=E8=83=BD=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 18 +++++++++--------- .../standingBook/index.js | 1 - .../standingBookDetail/index.js | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 301fe673..860480b6 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -184,7 +184,7 @@ class Index extends Component { progressVisible: false, progress: 100 }); - message.success("加密成功"); + message.success("保存成功"); } else if(progress_statue === "in_progress" && this.timer){ this.setState({ progress: 10 * number @@ -197,7 +197,7 @@ class Index extends Component { progressVisible: false, progress: 100 }); - message.error(errormsg || "加密失败!"); + message.error(errormsg || "保存失败!"); } }); }, 1000); @@ -252,13 +252,13 @@ class Index extends Component { } showGroup center items={importItems}/> - {/**/} - {/* 加密规则*/} - {/* */} - {/* */} - {/* } showGroup center items={enctryItems}/>*/} + + 加密规则 + + + } showGroup center items={enctryItems}/> { this.state.progressVisible && { const { save } = this.props.standingBookStore; const { billMonth, ...extra } = formVal; - console.log("extra:", extra); const payload = { billMonth: moment(billMonth).format("YYYY-MM"), ...extra diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js index 360c972a..1155cb22 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js @@ -17,7 +17,7 @@ class StandingBookDetail extends Component { constructor(props) { super(props); this.state = { - selectedKey: "", + selectedKey: "1", tabList: [], remarks: "", billMonth: "" From 7384d124b2fcf6238c6437abe02ed985fc87e595 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 24 Oct 2022 11:24:09 +0800 Subject: [PATCH 02/40] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=8F=91?= =?UTF-8?q?=E6=94=BE=E9=A1=B5=E9=9D=A2=E6=8A=A5=E9=94=99=E7=9A=84bug?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/mobilePayroll/index.js | 15 ++++++++------- .../templatePreview/computerTemplate/index.js | 8 +++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 949412ed..5ea4e38e 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -11,9 +11,10 @@ import "../payroll/templatePreview/index.less"; export default class MobilePayroll extends React.Component { constructor(props) { super(props); - this.state= { + this.state = { mySalaryBillData: { - employeeInformation: {} + employeeInformation: {}, + salaryTemplate: [] } }; this.id = ""; @@ -31,13 +32,13 @@ export default class MobilePayroll extends React.Component { getMySalaryBill(id).then(result => { this.setState({ mySalaryBillData: result - }) - }) - } + }); + }); + }; render() { - const { mySalaryBillData }= this.state; + const { mySalaryBillData } = this.state; const type = getQueryString("type"); const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {}; const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : []; @@ -64,7 +65,7 @@ export default class MobilePayroll extends React.Component { isPreview isMsgPreview salaryTemplateShowSet={JSON.stringify(mySalaryBillData.salaryTemplate)} - salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []} + salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])} /> } diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index b6ddd000..f1616003 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -73,9 +73,11 @@ export default class ComputerTemplate extends React.Component { const { salaryTemplateShowSet, salaryItemSet } = this.state; return (
-
- {salaryTemplateShowSet.theme.replace("${companyName}", "").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))} -
+ {salaryTemplateShowSet.theme && +
+ {salaryTemplateShowSet.theme.replace("${companyName}", "").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))} +
+ } { salaryTemplateShowSet.background &&
From 8fa3b0918c46d5001e0f8bf8b88761c3078d2a42 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 24 Oct 2022 18:42:15 +0800 Subject: [PATCH 03/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E6=96=B0=E5=BB=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/appConfig/index.js | 5 +- .../pages/calculateDetail/userSure.js | 10 - .../pages/dataAcquisition/addItems.js | 178 +++++++ .../dataAcquisition/cumDeduct/columns.js | 346 ++++++++----- .../{ => components}/editSlideContent.js | 0 .../{ => components}/editSlideContent.less | 0 .../pages/dataAcquisition/cumDeduct/index.js | 120 +++-- .../dataAcquisition/cumSituation/columns.js | 473 +++++++++++------- .../dataAcquisition/cumSituation/index.js | 103 ++-- .../pages/dataAcquisition/index.less | 21 + .../dataAcquisition/otherDeduct/columns.js | 289 ++++++----- .../dataAcquisition/otherDeduct/index.js | 97 +++- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 6 +- pc4mobx/hrmSalary/stores/cumDeduct.js | 3 +- pc4mobx/hrmSalary/stores/cumSituation.js | 3 +- pc4mobx/hrmSalary/stores/otherDeduct.js | 3 +- 16 files changed, 1093 insertions(+), 564 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js rename pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/{ => components}/editSlideContent.js (100%) rename pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/{ => components}/editSlideContent.less (100%) create mode 100644 pc4mobx/hrmSalary/pages/dataAcquisition/index.less diff --git a/pc4mobx/hrmSalary/pages/appConfig/index.js b/pc4mobx/hrmSalary/pages/appConfig/index.js index d7754d54..e0b8ee63 100644 --- a/pc4mobx/hrmSalary/pages/appConfig/index.js +++ b/pc4mobx/hrmSalary/pages/appConfig/index.js @@ -84,12 +84,13 @@ export const CheckBox = payload => { }; export const PickDate = payload => { - const { label, onChange, value, viewAttr } = payload; + const { label, onChange, value, viewAttr, format, labelCol = { span: 8 }, wrapperCol = { span: 16 } } = payload; return ( - + onChange({ type: label, date })}/> ); diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index 5287c5bd..c6b0938a 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -69,16 +69,6 @@ export default class UserSure extends React.Component { { this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } }); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js new file mode 100644 index 00000000..bca10c14 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js @@ -0,0 +1,178 @@ +/* + * Author: 黎永顺 + * name: 新增数据采集项 + * Description: + */ +import React, { Component } from "react"; +import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom"; +import { getSearchs } from "../../util"; +import { Select } from "../ruleConfig"; +import { PickDate } from "../appConfig"; +import "./index.less"; + +class AddItems extends Component { + constructor(props) { + super(props); + this.state = { + baseInfo: { + taxablePeriod: "", + taxAgentor: "", + employee: "", + personArea: "", + username: "", + idcard: "" + } + }; + } + + render() { + const { taxAgentOption = [], form, condition = [], isCum } = this.props; + const { baseInfo } = this.state; + const items = [ + { + com: PickDate({ + label: "税款所属期", + viewAttr: 3, + labelCol: { span: 6 }, + wrapperCol: { span: 18 }, + format: "YYYY-MM", + value: baseInfo.taxablePeriod, + onChange: (data) => { + this.setState({ baseInfo: { ...baseInfo, taxablePeriod: data.date } }); + } + }) + }, + { + com: Select({ + label: "个税扣缴义务人", + viewAttr: 3, + options: taxAgentOption, + value: baseInfo.taxAgentor, + onChange: (data) => { + this.setState({ baseInfo: { ...baseInfo, taxAgentor: data.selected } }); + } + }) + }, + { + com: Browser({ + label: "人员", + viewAttr: 3, + onChange: (employee) => { + this.setState({ baseInfo: { ...baseInfo, employee } }); + } + }) + } + ]; + const cumSituationitems = [ + { + com: PickDate({ + label: "税款所属期", + viewAttr: 3, + labelCol: { span: 6 }, + wrapperCol: { span: 18 }, + format: "YYYY-MM", + value: baseInfo.taxablePeriod, + onChange: (data) => { + this.setState({ baseInfo: { ...baseInfo, taxablePeriod: data.date } }); + } + }) + }, + { + com: Select({ + label: "个税扣缴义务人", + viewAttr: 3, + options: taxAgentOption, + value: baseInfo.taxAgentor, + onChange: (data) => { + this.setState({ baseInfo: { ...baseInfo, taxAgentor: data.selected } }); + } + }) + }, + { + com: Select({ + label: "人员范围", + viewAttr: 3, + options: [ + { key: "ORGANIZATION", showname: "内部人员" }, { key: "EXT_EMPLOYEE", showname: "非系统人员" }], + value: baseInfo.personArea, + onChange: (data) => { + this.setState({ baseInfo: { ...baseInfo, personArea: data.selected } }); + } + }) + } + ]; + const insider = [{ + com: Browser({ + label: "人员", + viewAttr: 3, + onChange: (employee) => { + this.setState({ baseInfo: { ...baseInfo, employee } }); + } + }) + }]; + const noSysPerson = [ + { + com: InputCus({ + label: "姓名", + viewAttr: 2, + onChange: (username) => { + this.setState({ baseInfo: { ...baseInfo, username } }); + } + }) + }, + { + com: InputCus({ + label: "身份证号码", + viewAttr: 3, + onChange: (idcard) => { + this.setState({ baseInfo: { ...baseInfo, idcard } }); + } + }) + } + ]; + + return ( +
+ + { + getSearchs(form, condition, 2) + } + 若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据 +
+ ); + } +} + +export default AddItems; + +export const Browser = payload => { + const { label, onChange, viewAttr = 3 } = payload; + return ( + + + + ); +}; +export const InputCus = payload => { + const { label, onChange, value, viewAttr = 3 } = payload; + return ( + + + + ); +}; +export const Tips = payload => { + const { children } = payload; + return ( +
+
小提示
+
{children}
+
+ ); +}; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js index df2c591c..fed2a7cb 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js @@ -1,148 +1,220 @@ export const columns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "工号", - dataIndex: 'title', - key: 'title', - }, - { - title: "证件号码", - dataIndex: 'title', - key: 'title', - }, - { - title: "入职日期", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计子女教育", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计继续教育", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计住房贷款利息", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计住房租金", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计赡养老人", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'title', - key: 'title', - } -] + { + title: "姓名", + dataIndex: "title", + key: "title" + }, + { + title: "个税扣缴义务人", + dataIndex: "title", + key: "title" + }, + { + title: "部门", + dataIndex: "title", + key: "title" + }, + { + title: "手机号", + dataIndex: "title", + key: "title" + }, + { + title: "工号", + dataIndex: "title", + key: "title" + }, + { + title: "证件号码", + dataIndex: "title", + key: "title" + }, + { + title: "入职日期", + dataIndex: "title", + key: "title" + }, + { + title: "累计子女教育", + dataIndex: "title", + key: "title" + }, + { + title: "累计继续教育", + dataIndex: "title", + key: "title" + }, + { + title: "累计住房贷款利息", + dataIndex: "title", + key: "title" + }, + { + title: "累计住房租金", + dataIndex: "title", + key: "title" + }, + { + title: "累计赡养老人", + dataIndex: "title", + key: "title" + }, + { + title: "操作", + dataIndex: "title", + key: "title" + } +]; export const modalColumns = [ - { - title: "姓名", - dataIndex: 'username', - key: 'username', - }, - { - title: "个税扣缴义务人", - dataIndex: 'taxAgentName', - key: 'taxAgentName', - }, - { - title: "部门", - dataIndex: 'departmentName', - key: 'departmentName', - }, - { - title: "手机号", - dataIndex: 'mobile', - key: 'mobile', - }, - { - title: "工号", - dataIndex: 'jobNum', - key: 'jobNum', - }, - { - title: "证件号码", - dataIndex: 'idNo', - key: 'idNo', - }, - { - title: "入职日期", - dataIndex: 'hiredate', - key: 'hiredate', - }, - { - title: "累计子女教育", - dataIndex: 'addUpChildEducation', - key: 'addUpChildEducation', - }, - { - title: "累计继续教育", - dataIndex: 'addUpContinuingEducation', - key: 'addUpContinuingEducation', - }, - { - title: "累计住房贷款利息", - dataIndex: 'addUpHousingLoanInterest', - key: 'addUpHousingLoanInterest', - }, - { - title: "累计住房租金", - dataIndex: 'addUpHousingRent', - key: 'addUpHousingRent', - }, - { - title: "累计赡养老人", - dataIndex: 'addUpSupportElderly', - key: 'addUpSupportElderly', - }, - { - title: "累计婴幼儿照护", - dataIndex: 'addUpInfantCare', - key: 'addUpInfantCare', - }, - { - title: "累计大病医疗", - dataIndex: 'addUpIllnessMedical', - key: 'addUpIllnessMedical' - } -] + { + title: "姓名", + dataIndex: "username", + key: "username" + }, + { + title: "个税扣缴义务人", + dataIndex: "taxAgentName", + key: "taxAgentName" + }, + { + title: "部门", + dataIndex: "departmentName", + key: "departmentName" + }, + { + title: "手机号", + dataIndex: "mobile", + key: "mobile" + }, + { + title: "工号", + dataIndex: "jobNum", + key: "jobNum" + }, + { + title: "证件号码", + dataIndex: "idNo", + key: "idNo" + }, + { + title: "入职日期", + dataIndex: "hiredate", + key: "hiredate" + }, + { + title: "累计子女教育", + dataIndex: "addUpChildEducation", + key: "addUpChildEducation" + }, + { + title: "累计继续教育", + dataIndex: "addUpContinuingEducation", + key: "addUpContinuingEducation" + }, + { + title: "累计住房贷款利息", + dataIndex: "addUpHousingLoanInterest", + key: "addUpHousingLoanInterest" + }, + { + title: "累计住房租金", + dataIndex: "addUpHousingRent", + key: "addUpHousingRent" + }, + { + title: "累计赡养老人", + dataIndex: "addUpSupportElderly", + key: "addUpSupportElderly" + }, + { + title: "累计婴幼儿照护", + dataIndex: "addUpInfantCare", + key: "addUpInfantCare" + }, + { + title: "累计大病医疗", + dataIndex: "addUpIllnessMedical", + key: "addUpIllnessMedical" + } +]; export const dataSource = []; +export const dataCollectCondition = [ + { + items: [ + { + conditionType: "INPUT", + domkey: ["addUpChildEducation"], + fieldcol: 14, + label: "累计子女教育", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpContinuingEducation"], + fieldcol: 14, + label: "累计继续教育", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpHousingLoanInterest"], + fieldcol: 14, + label: "累计住房贷款利息", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpHousingRent"], + fieldcol: 14, + label: "累计住房租金", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpSupportElderly"], + fieldcol: 14, + label: "累计赡养老人", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpIllnessMedical"], + fieldcol: 14, + label: "累计大病医疗", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpInfantCare"], + fieldcol: 14, + label: "累计婴幼儿照护", + labelcol: 8, + value: "", + viewAttr: 2 + } + ], + title: '数据采集', + defaultshow: true + } +]; + diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js similarity index 100% rename from pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js rename to pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.less similarity index 100% rename from pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.less rename to pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.less diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index de9baa19..95631d17 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -1,17 +1,18 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Col, Dropdown, Menu, message, Row } from "antd"; +import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd"; import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; -import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import ImportModal from "../../../components/importModal"; -import { modalColumns } from "./columns"; +import { dataCollectCondition, modalColumns } from "./columns"; import { optionAddAll } from "../../../util/options"; +import SlideModalTitle from "../../../components/slideModalTitle"; +import EditSlideContent from "./components/editSlideContent"; +import AddItems from "../addItems"; import "./index.less"; -import SlideModalTitle from "../../../components/slideModalTitle"; -import EditSlideContent from "./editSlideContent"; @inject("cumDeductStore", "taxAgentStore") @observer @@ -19,6 +20,7 @@ export default class CumDeduct extends React.Component { constructor(props) { super(props); this.state = { + addVisible: false, value: "", selectedKey: [], slideSelectedKey: [], //详情表格的选中项 @@ -37,9 +39,10 @@ export default class CumDeduct extends React.Component { componentWillMount() { // 初始化渲染页面 const { - cumDeductStore: { doInit }, + cumDeductStore: { doInit, addForm }, taxAgentStore: { fetchTaxAgentOption, getTaxAgentSelectListAsAdmin } } = this.props; + addForm.initFormFields(dataCollectCondition); doInit({ declareMonth: [this.state.monthValue], taxAgentId: "" }); getTaxAgentSelectListAsAdmin(); fetchTaxAgentOption().then((res) => { @@ -264,14 +267,14 @@ export default class CumDeduct extends React.Component { } render() { - const { modalParam, slideSelectedKey, monthValue, taxAgentId } = this.state; + const { modalParam, slideSelectedKey, monthValue, taxAgentId, addVisible } = this.state; const { cumDeductStore, taxAgentStore } = this.props; const { loading, dataSource, columns, pageObj, - hasRight, + addForm, form, condition, tableStore, @@ -298,10 +301,6 @@ export default class CumDeduct extends React.Component { const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || []; - if (!hasRight && !loading) { - // 无权限处理 - return renderNoright(); - } const rightMenu = [ // 右键菜单 @@ -335,14 +334,8 @@ export default class CumDeduct extends React.Component { }; const handleButtonClick = () => { - // const { - // cumDeductStore: { exportCumDeductList }, - // } = this.props; - // exportCumDeductList(); - const { selectedKey } = this.state; const url = `${window.location - .origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${this.state.monthValue}&taxAgentId=${this.state - .taxAgentId == "All" + .origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${this.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All" ? "" : this.state.taxAgentId}`; window.open(url, "_self"); @@ -356,15 +349,10 @@ export default class CumDeduct extends React.Component { const url = `${window.location .origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${this.state.selectedKey.join( "," - )}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state - .taxAgentId == "All" + )}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All" ? "" : this.state.taxAgentId}`; window.open(url, "_self"); - // const { - // cumDeductStore: { exportCumDeductList }, - // } = this.props; - // exportCumDeductList(this.state.selectedKey.join(",")); }; const handleBtnImport = () => { @@ -392,6 +380,25 @@ export default class CumDeduct extends React.Component { } type="ghost"> 导出全部 + , + , + + 删除所选 + + } + type="ghost"> + 一键清空 ]; @@ -497,7 +504,9 @@ export default class CumDeduct extends React.Component { return { ...item, width: 150 }; } }); - + if (_.isEmpty(newColumns)) { + return renderLoading(); + } return (
+ buttons={showOperateBtn ? btns : []} + >
setShowSearchAd(bool)} //高级搜索面板受控 searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 @@ -573,37 +583,59 @@ export default class CumDeduct extends React.Component { /> )} - {slideVisiable && ( + {(slideVisiable || addVisible) && ( { - this.state.currentOperate == "add" ? doSave() : doUpdate(); + const { baseInfo } = this.addItemRef.state; + const bool = _.every(baseInfo, v => !_.isEmpty(v)); + if (!bool) { + Modal.warning({ + title: "信息确认", + content: "必要信息不完整,红色*为必填项!" + }); + return; + } + console.log(baseInfo); }} - editable={false} + editable={!!addVisible} showOperateBtn={showOperateBtn} - customOperate={showOperateBtn ? renderBtns() : []} + customOperate={(showOperateBtn && !addVisible) ? renderBtns() : []} /> } content={ - - this.setState({ slideSelectedKey: val }) - } - /> + addVisible ? + this.addItemRef = dom} taxAgentOption={taxAgentOption} form={addForm} + condition={dataCollectCondition}/> : + + this.setState({ slideSelectedKey: val }) + } + /> } - onClose={() => setSlideVisiable(false)} + onClose={() => { + setSlideVisiable(false); + this.setState({ + addVisible: false + }); + }} showMask={true} - closeMaskOnClick={() => setSlideVisiable(false)} + closeMaskOnClick={() => { + setSlideVisiable(false); + this.setState({ + addVisible: false + }); + }} /> )}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index 4fe10b63..93f13900 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -1,194 +1,293 @@ export const columns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "工号", - dataIndex: 'title', - key: 'title', - }, - { - title: "证件号码", - dataIndex: 'title', - key: 'title', - }, - { - title: "入职日期", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计子女教育", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计继续教育", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计住房贷款利息", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计住房租金", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计赡养老人", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'title', - key: 'title', - } -] + { + title: "姓名", + dataIndex: "title", + key: "title" + }, + { + title: "个税扣缴义务人", + dataIndex: "title", + key: "title" + }, + { + title: "部门", + dataIndex: "title", + key: "title" + }, + { + title: "手机号", + dataIndex: "title", + key: "title" + }, + { + title: "工号", + dataIndex: "title", + key: "title" + }, + { + title: "证件号码", + dataIndex: "title", + key: "title" + }, + { + title: "入职日期", + dataIndex: "title", + key: "title" + }, + { + title: "累计子女教育", + dataIndex: "title", + key: "title" + }, + { + title: "累计继续教育", + dataIndex: "title", + key: "title" + }, + { + title: "累计住房贷款利息", + dataIndex: "title", + key: "title" + }, + { + title: "累计住房租金", + dataIndex: "title", + key: "title" + }, + { + title: "累计赡养老人", + dataIndex: "title", + key: "title" + }, + { + title: "操作", + dataIndex: "title", + key: "title" + } +]; export const modalColumns = [ - { - title: "姓名", - dataIndex: 'username', - key: 'username', - }, - { - title: "个税扣缴义务人", - dataIndex: 'taxAgentName', - key: 'taxAgentName', - }, - { - title: "部门", - dataIndex: 'departmentName', - key: 'departmentName', - }, - { - title: "手机号", - dataIndex: 'mobile', - key: 'mobile', - }, - { - title: "工号", - dataIndex: 'jobNum', - key: 'jobNum', - }, - { - title: "证件号码", - dataIndex: 'idNo', - key: 'idNo', - }, - { - title: "入职日期", - dataIndex: 'hiredate', - key: 'hiredate', - }, - { - title: "累计收入额", - dataIndex: 'addUpIncome', - key: 'addUpIncome', - }, - { - title: "累计减除费用", - dataIndex: 'addUpSubtraction', - key: 'addUpSubtraction', - }, - { - title: "累计社保个人合计", - dataIndex: 'addUpSocialSecurityTotal', - key: 'addUpSocialSecurityTotal', - }, - { - title: "累计公积金个人合计", - dataIndex: 'addUpAccumulationFundTotal', - key: 'addUpAccumulationFundTotal', - }, - { - title: "累计子女教育", - dataIndex: 'addUpChildEducation', - key: 'addUpChildEducation', - }, - { - title: "累计继续教育", - dataIndex: 'addUpContinuingEducation', - key: 'addUpContinuingEducation', - }, - { - title: "累计住房贷款利息", - dataIndex: 'addUpHousingLoanInterest', - key: 'addUpHousingLoanInterest', - }, - { - title: "累计住房租金", - dataIndex: 'addUpHousingRent', - key: 'addUpHousingRent', - }, - { - title: "累计赡养老人", - dataIndex: 'addUpSupportElderly', - key: 'addUpSupportElderly', - }, - { - title: "累计企业(职业)年金及其他福利", - dataIndex: 'addUpEnterpriseAndOther', - key: 'addUpEnterpriseAndOther', - }, - { - title: "累计其他免税扣除", - dataIndex: 'addUpOtherDeduction', - key: 'addUpOtherDeduction', - }, - { - title: "累计免税收入", - dataIndex: 'addUpTaxExemptIncome', - key: 'addUpTaxExemptIncome', - }, - { - title: "累计准予扣除的捐赠额", - dataIndex: 'addUpAllowedDonation', - key: 'addUpAllowedDonation', - }, - { - title: "累计减免税额", - dataIndex: 'addUpTaxSavings', - key: 'addUpTaxSavings', - }, - { - title: "累计已预扣预缴税额", - dataIndex: 'addUpAdvanceTax', - key: 'addUpAdvanceTax', - }, - { - title: "累计婴幼儿照护", - dataIndex: 'addUpInfantCare', - key: 'addUpInfantCare', - }, - { - title: "累计大病医疗", - dataIndex: 'addUpIllnessMedical', - key: 'addUpIllnessMedical', - } + { + title: "姓名", + dataIndex: "username", + key: "username" + }, + { + title: "个税扣缴义务人", + dataIndex: "taxAgentName", + key: "taxAgentName" + }, + { + title: "部门", + dataIndex: "departmentName", + key: "departmentName" + }, + { + title: "手机号", + dataIndex: "mobile", + key: "mobile" + }, + { + title: "工号", + dataIndex: "jobNum", + key: "jobNum" + }, + { + title: "证件号码", + dataIndex: "idNo", + key: "idNo" + }, + { + title: "入职日期", + dataIndex: "hiredate", + key: "hiredate" + }, + { + title: "累计收入额", + dataIndex: "addUpIncome", + key: "addUpIncome" + }, + { + title: "累计减除费用", + dataIndex: "addUpSubtraction", + key: "addUpSubtraction" + }, + { + title: "累计社保个人合计", + dataIndex: "addUpSocialSecurityTotal", + key: "addUpSocialSecurityTotal" + }, + { + title: "累计公积金个人合计", + dataIndex: "addUpAccumulationFundTotal", + key: "addUpAccumulationFundTotal" + }, + { + title: "累计子女教育", + dataIndex: "addUpChildEducation", + key: "addUpChildEducation" + }, + { + title: "累计继续教育", + dataIndex: "addUpContinuingEducation", + key: "addUpContinuingEducation" + }, + { + title: "累计住房贷款利息", + dataIndex: "addUpHousingLoanInterest", + key: "addUpHousingLoanInterest" + }, + { + title: "累计住房租金", + dataIndex: "addUpHousingRent", + key: "addUpHousingRent" + }, + { + title: "累计赡养老人", + dataIndex: "addUpSupportElderly", + key: "addUpSupportElderly" + }, + { + title: "累计企业(职业)年金及其他福利", + dataIndex: "addUpEnterpriseAndOther", + key: "addUpEnterpriseAndOther" + }, + { + title: "累计其他免税扣除", + dataIndex: "addUpOtherDeduction", + key: "addUpOtherDeduction" + }, + { + title: "累计免税收入", + dataIndex: "addUpTaxExemptIncome", + key: "addUpTaxExemptIncome" + }, + { + title: "累计准予扣除的捐赠额", + dataIndex: "addUpAllowedDonation", + key: "addUpAllowedDonation" + }, + { + title: "累计减免税额", + dataIndex: "addUpTaxSavings", + key: "addUpTaxSavings" + }, + { + title: "累计已预扣预缴税额", + dataIndex: "addUpAdvanceTax", + key: "addUpAdvanceTax" + }, + { + title: "累计婴幼儿照护", + dataIndex: "addUpInfantCare", + key: "addUpInfantCare" + }, + { + title: "累计大病医疗", + dataIndex: "addUpIllnessMedical", + key: "addUpIllnessMedical" + } -] +]; export const dataSource = []; + +export const dataCollectCondition = [ + { + items: [ + { + conditionType: "INPUT", + domkey: ["addUpIncome"], + fieldcol: 14, + label: "累计收入额", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpSubtraction"], + fieldcol: 14, + label: "累计减除费用", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpSocialSecurityTotal"], + fieldcol: 14, + label: "累计社保个人合计", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpAccumulationFundTotal"], + fieldcol: 14, + label: "累计公积金个人合计", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpEnterpriseAndOther"], + fieldcol: 14, + label: "累计企业(职业)年金及其他福利", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpOtherDeduction"], + fieldcol: 14, + label: "累计其他免税扣除", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpTaxExemptIncome"], + fieldcol: 14, + label: "累计免税收入", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpAllowedDonation"], + fieldcol: 14, + label: "累计准予扣除的捐赠额", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpTaxSavings"], + fieldcol: 14, + label: "累计减免税额", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpAdvanceTax"], + fieldcol: 14, + label: "累计已预扣预缴税额", + labelcol: 8, + value: "", + viewAttr: 2 + }, + ], + title: "数据采集", + defaultshow: true + } +]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index d324b500..26f64f75 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -1,17 +1,17 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Col, Dropdown, Menu, message, Row } from "antd"; +import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd"; import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; -import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import ImportModal from "../../../components/importModal"; -import { modalColumns } from "./columns"; +import { dataCollectCondition, modalColumns } from "./columns"; import { optionAddAll } from "../../../util/options"; -import "./index.less"; - import SlideModalTitle from "../../../components/slideModalTitle"; import EditSlideContent from "./editSlideContent"; +import AddItems from "../addItems"; +import "./index.less"; @inject("cumSituationStore", "taxAgentStore") @@ -20,6 +20,7 @@ export default class CumSituation extends React.Component { constructor(props) { super(props); this.state = { + addVisible: false, value: "", selectedKey: [], slideSelectedKey: [], //详情表格的选中项 @@ -36,9 +37,10 @@ export default class CumSituation extends React.Component { componentWillMount() { // 初始化渲染页面 const { - cumSituationStore: { doInit }, + cumSituationStore: { doInit, addForm }, taxAgentStore: { fetchTaxAgentOption } } = this.props; + addForm.initFormFields(dataCollectCondition); doInit({ year: this.state.monthValue, taxAgentId: "" }); fetchTaxAgentOption().then(() => { this.setState({ @@ -242,7 +244,7 @@ export default class CumSituation extends React.Component { render() { const { cumSituationStore, taxAgentStore } = this.props; - const { slideSelectedKey } = this.state; + const { slideSelectedKey, addVisible } = this.state; const { loading, dataSource, @@ -250,6 +252,7 @@ export default class CumSituation extends React.Component { pageObj, hasRight, form, + addForm, condition, tableStore, showSearchAd, @@ -275,11 +278,6 @@ export default class CumSituation extends React.Component { const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; const { modalParam, monthValue, taxAgentId } = this.state; const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || []; - if (!hasRight && !loading) { - // 无权限处理 - return renderNoright(); - } - const rightMenu = [ // 右键菜单 // { @@ -373,6 +371,25 @@ export default class CumSituation extends React.Component { } type="ghost"> 导出全部 + , + , + + 删除所选 + + } + type="ghost"> + 一键清空 ]; @@ -476,13 +493,15 @@ export default class CumSituation extends React.Component { return { ...item, width: 150 }; } }); - + if (_.isEmpty(newColumns)) { + return renderLoading(); + } return (
} // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) @@ -542,36 +561,62 @@ export default class CumSituation extends React.Component { this.handleCancel(); }} />} - {slideVisiable && + {(slideVisiable || addVisible) && { - this.state.currentOperate == "add" ? doSave() : doUpdate(); + const { baseInfo } = this.addItemRef.state; + const bool = _.every(baseInfo, v => !_.isEmpty(v)); + if (!bool) { + Modal.warning({ + title: "信息确认", + content: "必要信息不完整,红色*为必填项!" + }); + return; + } + console.log(baseInfo); }} - editable={false} + editable={!!addVisible} showOperateBtn={showOperateBtn} - customOperate={showOperateBtn ? renderBtns() : []} + customOperate={(showOperateBtn && !addVisible) ? renderBtns() : []} /> } content={ - - this.setState({ slideSelectedKey: val })} - /> + addVisible ? + this.addItemRef = dom} + taxAgentOption={taxAgentOption} + form={addForm} + isCum + condition={dataCollectCondition}/> : + + this.setState({ slideSelectedKey: val })} + /> } - onClose={() => setSlideVisiable(false)} + onClose={() => { + setSlideVisiable(false); + this.setState({ + addVisible: false + }); + }} showMask={true} - closeMaskOnClick={() => setSlideVisiable(false)} + closeMaskOnClick={() => { + setSlideVisiable(false); + this.setState({ + addVisible: false + }); + }} />}
); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less new file mode 100644 index 00000000..fab55464 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less @@ -0,0 +1,21 @@ +.tipWrapper{ + display: flex; + flex-direction: column; + margin: 0 25px; + border: 1px solid #e5e5e5; + .title{ + border-bottom: 1px solid #e5e5e5; + height: 40px; + line-height: 40px; + padding-left: 16px; + background: #f6f6f6; + font-size: 14px; + } + .content{ + width: 100%; + display: flex; + flex-direction: column; + padding: 10px 16px; + color: #999; + } +} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js index e8eb6995..2d1dfb19 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js @@ -1,132 +1,177 @@ export const columns = [ - { - title: "姓名", - dataIndex: 'title', - key: 'title', - }, - { - title: "个税扣缴义务人", - dataIndex: 'title', - key: 'title', - }, - { - title: "部门", - dataIndex: 'title', - key: 'title', - }, - { - title: "手机号", - dataIndex: 'title', - key: 'title', - }, - { - title: "工号", - dataIndex: 'title', - key: 'title', - }, - { - title: "证件号码", - dataIndex: 'title', - key: 'title', - }, - { - title: "入职日期", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计子女教育", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计继续教育", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计住房贷款利息", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计住房租金", - dataIndex: 'title', - key: 'title', - }, - { - title: "累计赡养老人", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'title', - key: 'title', - } -] + { + title: "姓名", + dataIndex: "title", + key: "title" + }, + { + title: "个税扣缴义务人", + dataIndex: "title", + key: "title" + }, + { + title: "部门", + dataIndex: "title", + key: "title" + }, + { + title: "手机号", + dataIndex: "title", + key: "title" + }, + { + title: "工号", + dataIndex: "title", + key: "title" + }, + { + title: "证件号码", + dataIndex: "title", + key: "title" + }, + { + title: "入职日期", + dataIndex: "title", + key: "title" + }, + { + title: "累计子女教育", + dataIndex: "title", + key: "title" + }, + { + title: "累计继续教育", + dataIndex: "title", + key: "title" + }, + { + title: "累计住房贷款利息", + dataIndex: "title", + key: "title" + }, + { + title: "累计住房租金", + dataIndex: "title", + key: "title" + }, + { + title: "累计赡养老人", + dataIndex: "title", + key: "title" + }, + { + title: "操作", + dataIndex: "title", + key: "title" + } +]; export const modalColumns = [ - { - title: "姓名", - dataIndex: 'username', - key: 'username', - }, - { - title: "个税扣缴义务人", - dataIndex: 'taxAgentName', - key: 'taxAgentName', - }, - { - title: "部门", - dataIndex: 'departmentName', - key: 'departmentName', - }, - { - title: "手机号", - dataIndex: 'mobile', - key: 'mobile', - }, - { - title: "工号", - dataIndex: 'jobNum', - key: 'jobNum', - }, - { - title: "证件号码", - dataIndex: 'idNo', - key: 'idNo', - }, - { - title: "入职日期", - dataIndex: 'hiredate', - key: 'hiredate', - }, - { - title: "商业健康保险", - dataIndex: 'businessHealthyInsurance', - key: 'businessHealthyInsurance', - }, - { - title: "税延养老保险", - dataIndex: 'taxDelayEndowmentInsurance', - key: 'taxDelayEndowmentInsurance', - }, - { - title: "其他", - dataIndex: 'otherDeduction', - key: 'otherDeduction', - }, - { - title: "准予扣除的捐赠额", - dataIndex: 'deductionAllowedDonation', - key: 'deductionAllowedDonation', - } -] + { + title: "姓名", + dataIndex: "username", + key: "username" + }, + { + title: "个税扣缴义务人", + dataIndex: "taxAgentName", + key: "taxAgentName" + }, + { + title: "部门", + dataIndex: "departmentName", + key: "departmentName" + }, + { + title: "手机号", + dataIndex: "mobile", + key: "mobile" + }, + { + title: "工号", + dataIndex: "jobNum", + key: "jobNum" + }, + { + title: "证件号码", + dataIndex: "idNo", + key: "idNo" + }, + { + title: "入职日期", + dataIndex: "hiredate", + key: "hiredate" + }, + { + title: "商业健康保险", + dataIndex: "businessHealthyInsurance", + key: "businessHealthyInsurance" + }, + { + title: "税延养老保险", + dataIndex: "taxDelayEndowmentInsurance", + key: "taxDelayEndowmentInsurance" + }, + { + title: "其他", + dataIndex: "otherDeduction", + key: "otherDeduction" + }, + { + title: "准予扣除的捐赠额", + dataIndex: "deductionAllowedDonation", + key: "deductionAllowedDonation" + } +]; export const dataSource = []; +export const dataCollectCondition = [ + { + items: [ + { + conditionType: "INPUT", + domkey: ["businessHealthyInsurance"], + fieldcol: 14, + label: "商业健康保险", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["taxDelayEndowmentInsurance"], + fieldcol: 14, + label: "税延养老保险", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["otherDeduction"], + fieldcol: 14, + label: "其他", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["deductionAllowedDonation"], + fieldcol: 14, + label: "准予扣除的捐赠额", + labelcol: 8, + value: "", + viewAttr: 2 + } + ], + title: "数据采集", + defaultshow: true + } +]; + diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 4a191171..c5aeb54d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -1,17 +1,17 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Col, Dropdown, Menu, message, Row } from "antd"; +import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd"; import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; -import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 +import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import ImportModal from "../../../components/importModal"; -import { modalColumns } from "./columns"; -import "./index.less"; - +import { dataCollectCondition, modalColumns } from "./columns"; +import AddItems from "../addItems"; import SlideModalTitle from "../../../components/slideModalTitle"; import EditSlideContent from "./editSlideContent"; import { optionAddAll } from "../../../util/options"; +import "./index.less"; @inject("otherDeductStore", "taxAgentStore") @@ -20,6 +20,7 @@ export default class OtherDeduct extends React.Component { constructor(props) { super(props); this.state = { + addVisible: false, value: "", selectedKey: [], slideSelectedKey: [], //详情表格的选中项 @@ -36,9 +37,10 @@ export default class OtherDeduct extends React.Component { componentWillMount() { // 初始化渲染页面 const { - otherDeductStore: { doInit }, + otherDeductStore: { doInit, addForm }, taxAgentStore: { fetchTaxAgentOption } } = this.props; + addForm.initFormFields(dataCollectCondition); doInit({ declareMonth: [this.state.monthValue], taxAgentId: "" }); fetchTaxAgentOption().then(() => { this.setState({ @@ -251,7 +253,8 @@ export default class OtherDeduct extends React.Component { doSearch, setShowSearchAd, previewImport, - importFile + importFile, + addForm } = otherDeductStore; const { taxAgentOption, showOperateBtn } = taxAgentStore; const { @@ -267,13 +270,9 @@ export default class OtherDeduct extends React.Component { setPageObj } = otherDeductStore; const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; - const { modalParam, monthValue, taxAgentId, slideSelectedKey } = this.state; + const { modalParam, monthValue, taxAgentId, slideSelectedKey, addVisible } = this.state; const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || []; - if (!hasRight && !loading) { - // 无权限处理 - return renderNoright(); - } const rightMenu = [ // 右键菜单 @@ -364,6 +363,25 @@ export default class OtherDeduct extends React.Component { } type="ghost"> 导出全部 + , + , + + 删除所选 + + } + type="ghost"> + 一键清空 ]; @@ -468,6 +486,9 @@ export default class OtherDeduct extends React.Component { return { ...item }; } }); + if (_.isEmpty(newColumns)) { + return renderLoading(); + } return (
@@ -538,36 +559,58 @@ export default class OtherDeduct extends React.Component { this.handleCancel(); }} />} - {slideVisiable && + {(slideVisiable || addVisible) && { - this.state.currentOperate == "add" ? doSave() : doUpdate(); + const { baseInfo } = this.addItemRef.state; + const bool = _.every(baseInfo, v => !_.isEmpty(v)); + if (!bool) { + Modal.warning({ + title: "信息确认", + content: "必要信息不完整,红色*为必填项!" + }); + return; + } + console.log(baseInfo); }} - editable={false} + editable={!!addVisible} showOperateBtn={showOperateBtn} - customOperate={showOperateBtn ? renderBtns() : []} + customOperate={(showOperateBtn && !addVisible) ? renderBtns() : []} /> } content={ - - this.setState({ slideSelectedKey: val })} - /> + addVisible ? + this.addItemRef = dom} taxAgentOption={taxAgentOption} form={addForm} + condition={dataCollectCondition}/> : + + this.setState({ slideSelectedKey: val })} + /> } - onClose={() => setSlideVisiable(false)} + onClose={() => { + setSlideVisiable(false); + this.setState({ + addVisible: false + }); + }} showMask={true} - closeMaskOnClick={() => setSlideVisiable(false)} + closeMaskOnClick={() => { + setSlideVisiable(false); + this.setState({ + addVisible: false + }); + }} />}
); diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 301fe673..bafd5e0f 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -277,11 +277,11 @@ class Index extends Component { export default Index; -const Select = payload => { - const { label, onChange, value, options = [] } = payload; +export const Select = payload => { + const { label, onChange, value, options = [], viewAttr=3 } = payload; return ( - onChange({ type: label, selected })}/> ); diff --git a/pc4mobx/hrmSalary/stores/cumDeduct.js b/pc4mobx/hrmSalary/stores/cumDeduct.js index 6efa21bd..b276dd0b 100644 --- a/pc4mobx/hrmSalary/stores/cumDeduct.js +++ b/pc4mobx/hrmSalary/stores/cumDeduct.js @@ -10,7 +10,8 @@ const { TableStore } = WeaTableNew; export class CumDeductStore { @observable tableStore = new TableStore(); // new table @observable slideTableStore = new TableStore(); - @observable form = new WeaForm(); // nrew 一个form + @observable form = new WeaForm(); // new 一个form + @observable addForm = new WeaForm(); // 新增form @observable condition = []; // 存储后台得到的form数据 @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据 @observable showSearchAd = false; // 高级搜索面板显示 diff --git a/pc4mobx/hrmSalary/stores/cumSituation.js b/pc4mobx/hrmSalary/stores/cumSituation.js index 57bfbc50..082c6d3b 100644 --- a/pc4mobx/hrmSalary/stores/cumSituation.js +++ b/pc4mobx/hrmSalary/stores/cumSituation.js @@ -10,7 +10,8 @@ const { TableStore } = WeaTableNew; export class CumSituationStore { @observable tableStore = new TableStore(); // new table @observable slideTableStore = new TableStore(); - @observable form = new WeaForm(); // nrew 一个form + @observable form = new WeaForm(); // new 一个form + @observable addForm = new WeaForm(); // 新增form @observable condition = []; // 存储后台得到的form数据 @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据 @observable showSearchAd = false; // 高级搜索面板显示 diff --git a/pc4mobx/hrmSalary/stores/otherDeduct.js b/pc4mobx/hrmSalary/stores/otherDeduct.js index b922e168..91457537 100644 --- a/pc4mobx/hrmSalary/stores/otherDeduct.js +++ b/pc4mobx/hrmSalary/stores/otherDeduct.js @@ -11,7 +11,8 @@ const { TableStore } = WeaTableNew; export class OtherDeductStore { @observable tableStore = new TableStore(); // new table @observable slideTableStore = new TableStore(); - @observable form = new WeaForm(); // nrew 一个form + @observable form = new WeaForm(); // new 一个form + @observable addForm = new WeaForm(); // 新增form @observable condition = []; // 存储后台得到的form数据 @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据 @observable showSearchAd = false; // 高级搜索面板显示 From 0305c245567af0bdb1f7c3cf9c70bd199a29a602 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 24 Oct 2022 18:45:04 +0800 Subject: [PATCH 04/40] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payrollFiles/components/importMenu.js | 18 ++++-- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 63 +++++++++---------- 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index 04103886..5e9e6ae0 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -21,7 +21,12 @@ class ImportMenu extends Component { } salaryArchivePreview = (params) => { - params.importType = this.state.importParams.importType; + if (this.state.importParams.importType === "init" || this.state.importParams.importType === "salaryItemAdjust") { + params.importType = this.state.importParams.importType; + params.listType = "FIXED"; + } else { + params.listType = this.state.importParams.importType; + } API.salaryArchivePreview(params).then(({ status, data }) => { if (status) { const { headers, list } = data; @@ -77,16 +82,21 @@ class ImportMenu extends Component { handleInitModal = () => { // 清空列表数据 this.setState({ - previewDataSource:[], + previewDataSource: [], importParams: { ...this.state.importParams, - importResult:{}, + importResult: {} } }); }; // 导入档案 handleImportFile = (params) => { - params.importType = this.state.importParams.importType; + if (this.state.importParams.importType === "init" || this.state.importParams.importType === "salaryItemAdjust") { + params.importType = this.state.importParams.importType; + params.listType = "FIXED"; + } else { + params.listType = this.state.importParams.importType; + } API.importSalaryArchive(params).then(({ status, data }) => { if (status) { data.errorData = data.errorNotice; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 5ee14399..47405cca 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -223,7 +223,7 @@ class Index extends Component { onOk: () => { API.allGotoFixed({}).then(({ status, data, errormsg }) => { if (status) { - const { msg }= data; + const { msg } = data; message.info(msg || "操作成功!"); this.query(); } else { @@ -293,20 +293,12 @@ class Index extends Component { const { taxAgentStore: { showOperateBtn } } = this.props; if (selectedKey === "pending" && showOperateBtn) { return [ - it.id !== "salaryItemAdjust")} - refreshList={() => { - this.query(); - this.setState({ selectedRowKeys: [] }); - }}/>}> - - , - }> - , + }> + @@ -328,13 +320,14 @@ class Index extends Component { this.setState({ selectedRowKeys: [] }); }}/> }> - , - }> - @@ -365,20 +358,11 @@ class Index extends Component { } this.deleteSuspendTodo(selectedRowKeys); }}>批量删除待办, - it.id !== "salaryItemAdjust")} - refreshList={() => { - this.query(); - this.setState({ selectedRowKeys: [] }); - }}/> - }> - - , - }> + , + }> , - }> + }> , }> - @@ -380,14 +380,14 @@ class Index extends Component { }} /> }> - , }> - From 6b3c8aa272509aa63ccd75b36209e22be04670b1 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 26 Oct 2022 13:56:28 +0800 Subject: [PATCH 06/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=9A=84=E5=BE=85=E5=87=8F=E5=91=98=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8E=BB=E6=8E=89=E5=88=A0=E9=99=A4=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js | 2 ++ .../hrmSalary/pages/socialSecurityBenefits/archives/index.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index e3601c05..74dd4b0e 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -26,6 +26,7 @@ class ImportMenu extends Component { params.listType = "FIXED"; } else { params.listType = this.state.importParams.importType; + params.importType = ''; } API.salaryArchivePreview(params).then(({ status, data }) => { if (status) { @@ -95,6 +96,7 @@ class ImportMenu extends Component { params.importType = this.state.importParams.importType; params.listType = "FIXED"; } else { + params.importType = ''; params.listType = this.state.importParams.importType; } API.importSalaryArchive(params).then(({ status, data }) => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index dddddc66..a35a81e6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -175,7 +175,7 @@ export default class Archives extends React.Component { } }}> 减员 - 删除待办 + {/*删除待办*/} } title=""> From 86f002a636548f59b1638df6b12adff5f4aa053a Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 26 Oct 2022 15:46:39 +0800 Subject: [PATCH 07/40] =?UTF-8?q?=E5=8A=A0=E5=AF=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A1=AE=E8=AE=A4=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 88 +++++++++++---------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 860480b6..6e8e1909 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -159,49 +159,57 @@ class Index extends Component { } }); } else if (type === "ENCRYTION") { - this.setState({ loading: { ...this.state.loading, encry: true } }); - API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => { - this.setState({ loading: { ...this.state.loading, encry: false } }); - if (status) { - const { isSuccess, progressId, msg } = data; - if(!isSuccess){ - message.error(errormsg || msg || "保存失败!"); - return - } - this.setState({ - progressVisible: true - }, () => { - let number=1 ; - this.timer && clearInterval(this.timer); - this.timer = setInterval(() => { - API.getEncryptProgress({ progressId }).then(({status, data, errormsg}) => { - const { progress_statue }= data; - if (progress_statue === "success" && this.timer) { - clearInterval(this.timer); - this.timer = null; - number=1; - this.setState({ - progressVisible: false, - progress: 100 + Modal.confirm({ + title: "信息确认", + content: "开启/关闭加密前请做好数据库备份!!!逆向解密会花费几分钟时间,请耐心等待!!!", + onOk: () => { + this.setState({ loading: { ...this.state.loading, encry: true } }); + API.saveEncryptSetting({ isOpenEncrypt: saveParams.enctry }).then(({ data, status, errormsg }) => { + this.setState({ loading: { ...this.state.loading, encry: false } }); + if (status) { + const { isSuccess, progressId, msg } = data; + if(!isSuccess){ + message.error(errormsg || msg || "保存失败!"); + return + } + this.setState({ + progressVisible: true + }, () => { + let number=1 ; + this.timer && clearInterval(this.timer); + this.timer = setInterval(() => { + API.getEncryptProgress({ progressId }).then(({status, data, errormsg}) => { + const { progress_statue }= data; + if (progress_statue === "success" && this.timer) { + clearInterval(this.timer); + this.timer = null; + number=1; + this.setState({ + progressVisible: false, + progress: 100 + }); + message.success("保存成功"); + } else if(progress_statue === "in_progress" && this.timer){ + this.setState({ + progress: 10 * number + }, ()=> number++ ); + }else if (!status || (progress_statue === "fail" && this.timer)) { + clearInterval(this.timer); + this.timer = null; + number=1; + this.setState({ + progressVisible: false, + progress: 100 + }); + message.error(errormsg || "保存失败!"); + } }); - message.success("保存成功"); - } else if(progress_statue === "in_progress" && this.timer){ - this.setState({ - progress: 10 * number - }, ()=> number++ ); - }else if (!status || (progress_statue === "fail" && this.timer)) { - clearInterval(this.timer); - this.timer = null; - number=1; - this.setState({ - progressVisible: false, - progress: 100 - }); - message.error(errormsg || "保存失败!"); - } + }, 1000); }); - }, 1000); + } }); + }, + onCancel: () => { } }); } From df079f762f480a9f07df39ee5d1875ee76897615 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 26 Oct 2022 16:38:09 +0800 Subject: [PATCH 08/40] =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=84=E5=85=AC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salaryItem/formalFormModal.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 8d9cd46d..038056e1 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -73,6 +73,24 @@ export default class FormalFormModal extends React.Component { this.formulaDatasourceList(); } + triggerKeyDown = (e) => { + const { value } = this.state; + if (e.key === "Backspace" && value) { + let propsTextarea = this.contentProps.refs.textareaNormal.refs.input.refs.input; // 获取dom节点实例 + const { end } = this.getPositionForTextArea(propsTextarea); + const str = value.substring(end - 1, end); + if (str === "}") { + const index = value.lastIndexOf("{", end - 1); + const currentValue = value.substring(index, end); + console.log("currentValue", this.state.value, currentValue); + console.log(this.state.value.replace(currentValue, "}")); + this.setState({ + value: this.state.value.replace(currentValue, "}") + }); + } + } + }; + formulaDatasourceList = () => { const { salaryItemStore } = this.props; const { formulaDatasourceList } = salaryItemStore; @@ -274,6 +292,7 @@ export default class FormalFormModal extends React.Component { value={value} onChange={(value) => this.handleChange(value)} noResize={true} style={{ fontSize: "14px", lineHeight: 1.2 }} + onKeyDown={this.triggerKeyDown} />
From 1075625170f41c0e32256ad59de39d51a06b1940 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 26 Oct 2022 16:54:15 +0800 Subject: [PATCH 09/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/normal.js | 4 +++- .../pages/socialSecurityBenefits/standingBookDetail/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index f16b06a9..4a2e7f9f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -47,8 +47,10 @@ export default class NormalIndex extends Component { } componentDidMount() { - const { billMonth, selectedKey, paymentOrganization } = this.props; + const { selectedKey, location } = this.props; const { current } = this.state; + const billMonth = location.query.billMonth; + const paymentOrganization = location.query.paymentOrganization; selectedKey === "1" ? this.getNormalList({ billMonth, current, paymentOrganization }) : this.getSupplementaryList({ billMonth, current, paymentOrganization }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js index 1155cb22..9fa45933 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js @@ -62,7 +62,7 @@ class StandingBookDetail extends Component { { (selectedKey === "1" || selectedKey === "3") && + paymentOrganization={this.paymentOrganization} location={this.props.location}/> } { selectedKey === "2" && From 54da9eb8cdc310a92a62873bb532051e790c14cf Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 26 Oct 2022 17:55:16 +0800 Subject: [PATCH 10/40] =?UTF-8?q?=E8=96=AA=E8=B5=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salaryItem/formalFormModal.js | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 038056e1..27176264 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -74,18 +74,18 @@ export default class FormalFormModal extends React.Component { } triggerKeyDown = (e) => { - const { value } = this.state; - if (e.key === "Backspace" && value) { - let propsTextarea = this.contentProps.refs.textareaNormal.refs.input.refs.input; // 获取dom节点实例 + let propsTextarea = this.contentProps.refs.textareaNormal.refs.input.refs.input; // 获取dom节点实例 + if (e.key === "Backspace" && propsTextarea.value) { const { end } = this.getPositionForTextArea(propsTextarea); - const str = value.substring(end - 1, end); + const str = propsTextarea.value.substring(end - 1, end); if (str === "}") { - const index = value.lastIndexOf("{", end - 1); - const currentValue = value.substring(index, end); - console.log("currentValue", this.state.value, currentValue); - console.log(this.state.value.replace(currentValue, "}")); + const index = propsTextarea.value.lastIndexOf("{", end - 1); + const currentValue = propsTextarea.value.substring(index, end); this.setState({ - value: this.state.value.replace(currentValue, "}") + value: propsTextarea.value.replace(currentValue, "") + },()=>{ + console.log(this.state.value); + propsTextarea.value= 'this.state.value'; }); } } @@ -109,12 +109,13 @@ export default class FormalFormModal extends React.Component { // 多行文本编辑 handleChange(value) { + console.log(value); if (value && value.trim() == "") { this.parameters = []; } - this.setState({ - value - }); + // this.setState({ + // value + // }); } // 获取光标位置 @@ -289,7 +290,7 @@ export default class FormalFormModal extends React.Component { ref={(input) => this.contentProps = input} minRows={8} maxRows={8} - value={value} onChange={(value) => this.handleChange(value)} + // value={value} onChange={(value) => this.handleChange(value)} noResize={true} style={{ fontSize: "14px", lineHeight: 1.2 }} onKeyDown={this.triggerKeyDown} From aa7ec552943c87ec84cebf8f047afb2cfb3fc593 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 26 Oct 2022 18:40:25 +0800 Subject: [PATCH 11/40] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/declare/generateModal.js | 4 +++- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 18 ++++++++-------- pc4mobx/hrmSalary/stores/declare.js | 10 +++++---- pc4mobx/hrmSalary/stores/salaryItem.js | 21 +++++++++++-------- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declare/generateModal.js b/pc4mobx/hrmSalary/pages/declare/generateModal.js index 5ae0e1e1..8bc9e95e 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateModal.js +++ b/pc4mobx/hrmSalary/pages/declare/generateModal.js @@ -43,7 +43,8 @@ export default class GenerateModal extends React.Component { render() { const { - taxAgentStore: { taxAgentAdminOption } + taxAgentStore: { taxAgentAdminOption }, + declareStore: { loading } } = this.props; return ( { this.handleGenerate(); }}> diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index e654c674..e7fd1f95 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -350,14 +350,14 @@ class Index extends Component { verticalAlign: "middle" }}/> , - , + // , , @@ -446,7 +446,7 @@ class Index extends Component { placement="bottomRight" content={ this.handleMenuClick(e, record.id)}> 停薪 - 删除待办 + {/*删除待办*/} } title=""> diff --git a/pc4mobx/hrmSalary/stores/declare.js b/pc4mobx/hrmSalary/stores/declare.js index 2a6fd40a..c4e006d8 100644 --- a/pc4mobx/hrmSalary/stores/declare.js +++ b/pc4mobx/hrmSalary/stores/declare.js @@ -92,7 +92,9 @@ export class DeclareStore { @action saveDeclare = (params) => { return new Promise((resolve, reject) => { + this.loading= true; API.saveDeclare(params).then(res => { + this.loading= false; if(res.status) { message.success("生成成功") resolve(); @@ -102,8 +104,8 @@ export class DeclareStore { } }) }) - - } + + } //个税申报表-个税申报表相关信息 @action @@ -139,6 +141,6 @@ export class DeclareStore { } - -} \ No newline at end of file + +} diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js index e1c329d3..96d60416 100644 --- a/pc4mobx/hrmSalary/stores/salaryItem.js +++ b/pc4mobx/hrmSalary/stores/salaryItem.js @@ -79,18 +79,21 @@ export class SalaryItemStore { setDeleteItemVisible = deleteItemVisible => this.deleteItemVisible = deleteItemVisible; @action - setSystemItemVisible = systemItemVisible => this.systemItemVisible = systemItemVisible; + setSystemItemVisible = systemItemVisible => { + this.systemItemVisible = systemItemVisible; + this.sysListTableStore = new TableStore(); + }; // 存储分页以及关键字信息 @action - setPageInfo = (pageInfo) => this.pageInfo = {...this.pageInfo,...pageInfo}; + setPageInfo = (pageInfo) => this.pageInfo = { ...this.pageInfo, ...pageInfo }; // 渲染table数据 @action getTableDatas = (params) => { this.loading = true; - return new Promise((resolve, reject)=>{ - API.getItemList({...params, ...this.pageInfo}).then(action(res => { + return new Promise((resolve, reject) => { + API.getItemList({ ...params, ...this.pageInfo }).then(action(res => { this.loading = false; if (res.status) { // 接口请求成功/失败处理 this.tableDataSource = res.data.list; @@ -101,7 +104,7 @@ export class SalaryItemStore { reject(); } })); - }) + }); }; @action @@ -202,7 +205,7 @@ export class SalaryItemStore { @action deleteItemRequest = (ids) => { - return new Promise((resolve, reject)=>{ + return new Promise((resolve, reject) => { API.deleteItem(ids).then(res => { if (res.status) { this.deleteItemVisible = false; @@ -213,7 +216,7 @@ export class SalaryItemStore { reject(); } }); - }) + }); }; validateForm(params) { @@ -252,7 +255,7 @@ export class SalaryItemStore { //薪资项目-新增薪资项目 @action saveItem = (params, continueFlag) => { - return new Promise((resolve, reject)=>{ + return new Promise((resolve, reject) => { if (!this.validateForm(params)) { return; } @@ -269,7 +272,7 @@ export class SalaryItemStore { reject(); } }); - }) + }); }; // 获取公式变量类型 From 216f8c8b932b69d20a6f17054ef0b9be611b24dc Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Thu, 27 Oct 2022 09:46:28 +0800 Subject: [PATCH 12/40] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payrollFiles/index.js | 25 ++++++---- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 50 ++++++++++++------- 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index e7fd1f95..b79884ca 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -400,18 +400,21 @@ class Index extends Component { const { pageInfo, selectedKey } = this.state; const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props; let columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true"); - return _.map([{ - title: "序号", - dataIndex: "index", - align: "left", - oldWidth: 60, - render: (text, record, index) => { - const { current, pageSize } = pageInfo; - return (current - 1) * pageSize + index + 1; - } - }, ...columns], (item, index) => { + return _.map([ + // { + // title: "序号", + // dataIndex: "index", + // align: "left", + // oldWidth: 60, + // render: (text, record, index) => { + // const { current, pageSize } = pageInfo; + // return (current - 1) * pageSize + index + 1; + // } + // }, + ...columns], (item, index) => { if (index === 0) { - return { ...item, width: item.oldWidth, fixed: "left" }; + // , fixed: "left" + return { ...item, width: item.oldWidth }; } if (item.dataIndex === "operate") { return { diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index 6e8e1909..a54c69f5 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -168,38 +168,51 @@ class Index extends Component { this.setState({ loading: { ...this.state.loading, encry: false } }); if (status) { const { isSuccess, progressId, msg } = data; - if(!isSuccess){ + if (!isSuccess) { message.error(errormsg || msg || "保存失败!"); - return + return; } this.setState({ - progressVisible: true + progressVisible: true, + progress: 0 }, () => { - let number=1 ; + let number = 1; this.timer && clearInterval(this.timer); this.timer = setInterval(() => { - API.getEncryptProgress({ progressId }).then(({status, data, errormsg}) => { - const { progress_statue }= data; + API.getEncryptProgress({ progressId }).then(({ status, data, errormsg }) => { + const { progress_statue } = data; if (progress_statue === "success" && this.timer) { clearInterval(this.timer); this.timer = null; - number=1; + number = 1; this.setState({ - progressVisible: false, - progress: 100 + progress: 100, + },()=>{ + this.setState({ + progressVisible: false, + }) }); message.success("保存成功"); - } else if(progress_statue === "in_progress" && this.timer){ - this.setState({ - progress: 10 * number - }, ()=> number++ ); - }else if (!status || (progress_statue === "fail" && this.timer)) { + } else if (progress_statue === "in_progress" && this.timer) { + if (this.state.progress === 90) { + this.setState({ + progress: this.state.progress + 90/100 + }); + } else { + this.setState({ + progress: 10 * number + }, () => number++); + } + } else if (!status || (progress_statue === "fail" && this.timer)) { clearInterval(this.timer); this.timer = null; - number=1; + number = 1; this.setState({ - progressVisible: false, - progress: 100 + progress: 100, + },()=>{ + this.setState({ + progressVisible: false, + }) }); message.error(errormsg || "保存失败!"); } @@ -257,7 +270,8 @@ class Index extends Component { title={
人员校验规则 - +
} showGroup center items={importItems}/> Date: Thu, 27 Oct 2022 10:29:13 +0800 Subject: [PATCH 13/40] =?UTF-8?q?=E5=85=AC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salaryItem/formalFormModal.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 27176264..c79eff3d 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -80,12 +80,13 @@ export default class FormalFormModal extends React.Component { const str = propsTextarea.value.substring(end - 1, end); if (str === "}") { const index = propsTextarea.value.lastIndexOf("{", end - 1); - const currentValue = propsTextarea.value.substring(index, end); + const currentValue = propsTextarea.value.substring(index + 1, end); + console.log(currentValue); + console.log(propsTextarea.value.replace(currentValue, "")); this.setState({ value: propsTextarea.value.replace(currentValue, "") },()=>{ - console.log(this.state.value); - propsTextarea.value= 'this.state.value'; + propsTextarea.value= this.state.value; }); } } @@ -109,13 +110,12 @@ export default class FormalFormModal extends React.Component { // 多行文本编辑 handleChange(value) { - console.log(value); if (value && value.trim() == "") { this.parameters = []; } - // this.setState({ - // value - // }); + this.setState({ + value + }); } // 获取光标位置 @@ -290,7 +290,8 @@ export default class FormalFormModal extends React.Component { ref={(input) => this.contentProps = input} minRows={8} maxRows={8} - // value={value} onChange={(value) => this.handleChange(value)} + value={value} + onChange={(value) => this.handleChange(value)} noResize={true} style={{ fontSize: "14px", lineHeight: 1.2 }} onKeyDown={this.triggerKeyDown} From 558db4220b553794abea2d598f5493feeb8e03e2 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Thu, 27 Oct 2022 13:58:23 +0800 Subject: [PATCH 14/40] =?UTF-8?q?hotfix/v2-bug=E4=BF=AE=E5=A4=8D-1024?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/ledger/calcRulesForm.js | 11 +++- .../pages/ledger/step4/RuleEditModal.js | 8 +-- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 20 +++---- .../archives/accumulationFundForm.js | 4 +- .../archives/otherForm.js | 4 +- .../archives/socialSecurityForm.js | 4 +- .../standingBook/index.js | 55 +++++++++++++------ pc4mobx/hrmSalary/stores/archives.js | 8 +-- 8 files changed, 71 insertions(+), 43 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js b/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js index 4306a345..5958e987 100644 --- a/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js +++ b/pc4mobx/hrmSalary/pages/ledger/calcRulesForm.js @@ -5,6 +5,7 @@ import { slideStep4Columns } from "./columns"; import "./index.less"; import RuleEditModal from "./step4/RuleEditModal"; import { inject, observer } from "mobx-react"; +import { toJS } from 'mobx'; @inject("ledgerStore") @observer @@ -48,8 +49,13 @@ export default class CalRulesForm extends React.Component { } convertAdjustmentType(index) { - let nameList = ["取调整后薪资", "分段计薪", "取平均"]; - return nameList[Number(index) - 1]; + let nameList = { + 1: '取调薪前薪资', + 2: '取调薪后薪资', + 3: '平均值', + 4: '分段计薪', + }; + return nameList[Number(index)]; } getSalaryItemName(salaryItemId) { @@ -75,7 +81,6 @@ export default class CalRulesForm extends React.Component { rule: resultStr }; }); - } render() { diff --git a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js index 5b5e28ff..bf8876cc 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js @@ -15,7 +15,7 @@ export default class RuleEditModal extends React.Component { this.state = { itemValue: "", effectiveDate: "", - beforeAdjustmentType: 1, + beforeAdjustmentType: 2, afterAdjustmentType: 1, initedSelect: false }; @@ -150,8 +150,8 @@ export default class RuleEditModal extends React.Component { { this.beforeAdjustmentTypeChange(value); }} value={beforeAdjustmentType}> - 取调整后薪资 - 分段计薪取调整后薪资 + 分段计薪 取调整前薪资 - 分段计薪分段计薪{ + progress: 100 + }, () => { this.setState({ - progressVisible: false, - }) + progressVisible: false + }); }); message.success("保存成功"); } else if (progress_statue === "in_progress" && this.timer) { - if (this.state.progress === 90) { + if (this.state.progress >= 90) { this.setState({ - progress: this.state.progress + 90/100 + progress: this.state.progress + (0.001 * this.state.progress) }); } else { this.setState({ @@ -208,11 +208,11 @@ class Index extends Component { this.timer = null; number = 1; this.setState({ - progress: 100, - },()=>{ + progress: 100 + }, () => { this.setState({ - progressVisible: false, - }) + progressVisible: false + }); }); message.error(errormsg || "保存失败!"); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index 0e1d8e91..f7c8ce98 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -12,8 +12,8 @@ export default class AccumulationFundForm extends React.Component { componentWillMount() { const { archivesStore: { getBaseForm, getPaymentForm } } = this.props; - getBaseForm(this.props.employeeId, "ACCUMULATION_FUND"); - getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId); + getBaseForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.paymentOrganization); + getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId, this.props.record.paymentOrganization); } // 表单变化 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index ceff0bf9..5d02b807 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -19,8 +19,8 @@ export default class OtherForm extends React.Component { componentWillMount() { const { archivesStore: { getBaseForm, getPaymentForm } } = this.props; - getBaseForm(this.props.employeeId, "OTHER"); - getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId); + getBaseForm(this.props.employeeId, "OTHER", this.props.record.paymentOrganization); + getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId, this.props.record.paymentOrganization); } // 获取基数表单 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 016cea47..10c16fb5 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -14,8 +14,8 @@ export default class SocialSecurityForm extends React.Component { componentWillMount() { const { archivesStore } = this.props; const { getBaseForm, getPaymentForm } = archivesStore; - getBaseForm(this.props.employeeId, "SOCIAL_SECURITY"); - getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId); + getBaseForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.paymentOrganization); + getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId, this.props.record.paymentOrganization); } // 表单变化 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index 2c0a7610..3d2fa3ce 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -11,8 +11,7 @@ import AbnormalDrawer from "./components/abnormalDrawer"; import CustomPaginationTable from "../../../components/customPaginationTable"; import moment from "moment"; import _ from "lodash"; - -// import { columns, dataSource } from './columns'; +import ProgressModal from "../../../components/progressModal"; import "./index.less"; const MonthPicker = DatePicker.MonthPicker; @@ -49,7 +48,9 @@ export default class StandingBook extends React.Component { list: [], total: 0 }, - adminData: {} + adminData: {}, + progressVisible: false, + progress: 0 }; this.payload = {}; this.pageInfo = { current: 1, pageSize: 10 }; @@ -248,13 +249,6 @@ export default class StandingBook extends React.Component { `/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}` ); } - - setTimeout(() => { - this.getCommonList({ - ...this.state.tableParams, - current: this.state.current - }); - }, 3000); }; handleOperate = (payload) => { const { siaccountFile, siaccountDelete, deleteLoading } = @@ -318,13 +312,31 @@ export default class StandingBook extends React.Component { ...extra }; save(payload).then(() => { - message.success("核算成功"); - this.handleClose(); - this.getCommonList({ - ...this.state.tableParams, - current: this.state.current + this.setState({ + progressVisible: true + }, () => { + this.timer = setInterval(() => { + if (this.state.progress !== 100) { + this.setState({ + progress: this.state.progress + 10 + }); + } else { + clearInterval(this.timer); + this.setState({ + progressVisible: false, + progress: 0 + },()=>{ + message.success("核算成功"); + this.handleClose(); + this.getCommonList({ + ...this.state.tableParams, + current: this.state.current + }); + this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : ""); + }); + } + }, 1000); }); - this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : ""); }); }; @@ -492,6 +504,17 @@ export default class StandingBook extends React.Component { loading={loading} /> )} + {/*核算进度条*/} + { + this.state.progressVisible && + { + this.setState({ progressVisible: false, progress: 0 }); + }} + progress={this.state.progress} + /> + } {drawerProps.visible && ( { - API.getBaseForm({employeeId, welfareTypeEnum}).then(action(res => { + getBaseForm = (employeeId, welfareTypeEnum ="", paymentOrganization="") => { + API.getBaseForm({employeeId, welfareTypeEnum, paymentOrganization}).then(action(res => { if(res.status) { if(welfareTypeEnum == "") { this.baseFormData = res.data.data @@ -166,8 +166,8 @@ export class ArchivesStore { // 查询档案缴纳基数表单 @action - getPaymentForm = (employeeId, welfareTypeEnum, schemeId) => { - API.getPaymentForm({employeeId, welfareTypeEnum, schemeId}).then(res => { + getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization="") => { + API.getPaymentForm({employeeId, welfareTypeEnum, schemeId, paymentOrganization}).then(res => { if(welfareTypeEnum == "SOCIAL_SECURITY") { this.socialSecurityPaymentForm = res.data } else if(welfareTypeEnum == "ACCUMULATION_FUND") { From 91a131913828878996126933a26bb33cbb549a91 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Thu, 27 Oct 2022 15:07:47 +0800 Subject: [PATCH 15/40] =?UTF-8?q?feature/v2-=E8=96=AA=E8=B5=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=85=AC=E5=BC=8F=E6=B7=BB=E5=8A=A0-1026?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/salaryItem/formalFormModal.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index c79eff3d..5b01e4b1 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -24,6 +24,7 @@ export default class FormalFormModal extends React.Component { this.field = {}; this.parameters = []; this.referenceType = ""; + this.timer = null; } componentWillMount() { @@ -73,20 +74,28 @@ export default class FormalFormModal extends React.Component { this.formulaDatasourceList(); } + componentWillUnmount() { + clearTimeout(this.timer); + } + triggerKeyDown = (e) => { let propsTextarea = this.contentProps.refs.textareaNormal.refs.input.refs.input; // 获取dom节点实例 - if (e.key === "Backspace" && propsTextarea.value) { + const { value } = this.state; + if (e.key === "Backspace" && value) { const { end } = this.getPositionForTextArea(propsTextarea); - const str = propsTextarea.value.substring(end - 1, end); + const str = value.substring(end - 1, end); if (str === "}") { - const index = propsTextarea.value.lastIndexOf("{", end - 1); - const currentValue = propsTextarea.value.substring(index + 1, end); - console.log(currentValue); - console.log(propsTextarea.value.replace(currentValue, "")); + e.preventDefault(); + const index = value.lastIndexOf("{", end - 1); + const currentValue = value.substring(index, end); this.setState({ - value: propsTextarea.value.replace(currentValue, "") - },()=>{ - propsTextarea.value= this.state.value; + value: value.replace(currentValue, "") + }, () => { + if (propsTextarea.setSelectionRange) { + this.timer = setTimeout(() => { + propsTextarea.setSelectionRange(index, index); + }, 0); + } }); } } From 08ab6de7a47ad981f55b279d2f6139edff783d4f Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Fri, 28 Oct 2022 17:12:03 +0800 Subject: [PATCH 16/40] =?UTF-8?q?hotfix/v2-bug=E4=BF=AE=E5=A4=8D-1024?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/ruleconfig.js | 4 + pc4mobx/hrmSalary/pages/ledger/index.js | 1 - pc4mobx/hrmSalary/pages/ledger/index.less | 4 + .../hrmSalary/pages/ledger/slideRefereUser.js | 1 + pc4mobx/hrmSalary/pages/payrollFiles/index.js | 15 +- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 14 +- .../pages/salaryFile/saralyFileViewSlide.js | 2 +- .../socialSecurityBenefits/archives/index.js | 28 +-- .../standingBook/index.less | 2 +- pc4mobx/hrmSalary/pages/taxAgent/index.js | 1 + pc4mobx/hrmSalary/stores/archives.js | 230 +++++++++--------- 11 files changed, 159 insertions(+), 143 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 09f8ebba..13f2e0eb 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -31,6 +31,10 @@ export const queryAppsetting = (params) => { export const saveEncryptSetting = (params) => { return postFetch('/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting', params); } +//加密配置保存 +export const appSettingSave = (params) => { + return postFetch('/api/bs/hrmsalary/sys/app/setting/save', params); +} //获取加密进度条 export const getEncryptProgress = params => { return WeaTools.callApi('/api/bs/hrmsalary/sys/app/getEncryptProgress', 'GET', params); diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index 5051c138..80474093 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -16,7 +16,6 @@ import SlideModalTitle from "../../components/slideModalTitle"; import CopyFormModal from "./copyFormModal"; import "./index.less"; - @inject("ledgerStore", "taxAgentStore") @observer export default class Ledger extends React.Component { diff --git a/pc4mobx/hrmSalary/pages/ledger/index.less b/pc4mobx/hrmSalary/pages/ledger/index.less index f735565b..219586a4 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.less +++ b/pc4mobx/hrmSalary/pages/ledger/index.less @@ -326,3 +326,7 @@ border-radius: 0; } } + +//.ant-modal-body { +// overflow: auto; +//} diff --git a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js index 58645741..b55ed5a4 100644 --- a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js +++ b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js @@ -50,6 +50,7 @@ export default class SlideRefereUser extends React.Component { } = this.props; getLedgerPersonRangeInclude({ salarySobId: salarySobId }); if (edit) getLedgerBasicForm(); + // window.setLayoutWindow=window; } onSelectChange = selectedRowKeys => { diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index b79884ca..bee13a3e 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/index.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -414,12 +414,14 @@ class Index extends Component { ...columns], (item, index) => { if (index === 0) { // , fixed: "left" - return { ...item, width: item.oldWidth }; + // , width: item.oldWidth + return { ...item }; } if (item.dataIndex === "operate") { return { - ...item, fixed: "right", - width: 150, + ...item, + // fixed: "right", + // width: 150, render: (text, record) => { if (!showOperateBtn) { return
@@ -471,7 +473,8 @@ class Index extends Component { } }; } - return { ...item, width: item.oldWidth }; + // , width: item.oldWidth + return { ...item }; }); }; handleEdit = (record) => { @@ -551,7 +554,7 @@ class Index extends Component { handleSave = () => { const { paysetParams, selectedKey } = this.state; const { salaryFileStore: { adjustSalaryItems, detailForm } } = this.props; - if ((selectedKey === "pending" && _.isEmpty(paysetParams.payStartDate)) || (selectedKey !== "pending" && _.isEmpty(paysetParams.payEndDate))) { + if ((selectedKey === "pending" && _.isEmpty(paysetParams.payStartDate)) || (selectedKey === "suspend" && _.isEmpty(paysetParams.payEndDate))) { Modal.warning({ title: "信息确认", content: "必要信息不完整,红色*为必填项!" @@ -722,7 +725,7 @@ class Index extends Component { columns={this.getColumns()} dataSource={dataSource} pagination={pagination} // rowClassName={(record) => record.archiveStatus === "ARCHIVE" ? "archiveRow" : ""} rowSelection={rowSelection} - scroll={{ x: 1200 }} + // scroll={{ x: 1200 }} /> 保存
} showGroup center items={importItems}/> - - 加密规则 - -
- } showGroup center items={enctryItems}/> + {/**/} + {/* 加密规则*/} + {/* */} + {/*
*/} + {/* } showGroup center items={enctryItems}/>*/} { this.state.progressVisible && { - if(key === "addMember"){ + content={ { + if (key === "addMember") { this.stayAddToPay([record.baseInfo]); - }else{ + } else { Modal.warning({ title: "信息确认", content: `确定要删除该条待办人员吗?`, @@ -200,23 +200,23 @@ export default class Archives extends React.Component { } // 保存 - handleEditSlideSave() { + handleEditSlideSave = () => { const { selectedTab } = this.state; const { archivesStore: { save } } = this.props; if (selectedTab == 1) { - save("SOCIAL_SECURITY"); + save("SOCIAL_SECURITY").then(() => { + this.query(); + }); } else if (selectedTab == 2) { - save("ACCUMULATION_FUND"); + save("ACCUMULATION_FUND").then(() => { + this.query(); + }); } else if (selectedTab == 3) { - save("OTHER"); + save("OTHER").then(() => { + this.query(); + }); } - } - - handlePageChnage(value) { - const { archivesStore: { form, getTableDatas } } = this.props; - this.pageInfo.current = value; - getTableDatas(this.pageInfo); - } + }; // 导入 handleBtnImport(runStatus) { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less index 0acd026f..10130c20 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less @@ -1,6 +1,5 @@ .standingbookWrapper { .wea-new-top-content { - padding: 0 16px; .wea-new-table { .ant-table-row:hover { .more { @@ -23,6 +22,7 @@ display: flex; align-items: center; height: 46px; + padding: 0 16px; .to { padding: 0 8px; } diff --git a/pc4mobx/hrmSalary/pages/taxAgent/index.js b/pc4mobx/hrmSalary/pages/taxAgent/index.js index fda157e0..f7024ec0 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/index.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/index.js @@ -43,6 +43,7 @@ export default class TaxAgent extends React.Component { const { doInit } = taxAgentStore; doInit(); this.getPermission(); + // window.setLayoutWindow=window; } getPermission = () => { diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js index b01de4fe..db02436d 100644 --- a/pc4mobx/hrmSalary/stores/archives.js +++ b/pc4mobx/hrmSalary/stores/archives.js @@ -1,17 +1,17 @@ -import { observable, action, toJS } from 'mobx'; -import { message } from 'antd'; -import { WeaForm, WeaTableNew } from 'comsMobx'; -import { removePropertyCondition } from '../util/response' +import { action, observable } from "mobx"; +import { message } from "antd"; +import { WeaForm, WeaTableNew } from "comsMobx"; +import { removePropertyCondition } from "../util/response"; -import * as API from '../apis/welfareArchive'; // 引入API接口文件 +import * as API from "../apis/welfareArchive"; // 引入API接口文件 const { TableStore } = WeaTableNew; export class ArchivesStore { @observable tableStore = new TableStore( - // {dataHandle: (datas) => { - // return dataSource; - // }} + // {dataHandle: (datas) => { + // return dataSource; + // }} ); @observable form = new WeaForm(); // nrew 一个form @observable condition = []; // 存储后台得到的form数据 @@ -22,9 +22,9 @@ export class ArchivesStore { @observable dataSource = []; // Slide 表单 - @observable baseFormData = {} - @observable socialSecurityForm = {} // 社保表单 - @observable accumulationFundForm = {} // 公积金表单 + @observable baseFormData = {}; + @observable socialSecurityForm = {}; // 社保表单 + @observable accumulationFundForm = {}; // 公积金表单 @observable otherForm = {}; // 其他福利表单 // 基数表单 @@ -34,35 +34,35 @@ export class ArchivesStore { @observable pageInfo = {}; // 导入预览 - @observable previewCurDataList = {} - @observable previewCurDataColumns = [] - @observable previewCurDataDataSource = [] - @observable importResult = {} + @observable previewCurDataList = {}; + @observable previewCurDataColumns = []; + @observable previewCurDataDataSource = []; + @observable importResult = {}; @action initImportParams = () => { this.previewCurDataList = {}; this.previewCurDataColumns = []; this.previewCurDataDataSource = []; - this.importResult = {} - } + this.importResult = {}; + }; // ** 设置导入参数 start ** @action setPreviewCurDataColumns = (previewCurDataColumns) => { - this.previewCurDataColumns = previewCurDataColumns - } + this.previewCurDataColumns = previewCurDataColumns; + }; @action setPreviewCurDataDataSource = (previewCurDataDataSource) => { - this.previewCurDataDataSource = previewCurDataDataSource - } + this.previewCurDataDataSource = previewCurDataDataSource; + }; @action setImportResult = (importResult) => { - this.importResult = importResult - } + this.importResult = importResult; + }; // ** 设置导入参数 end ** // 社保表单 @@ -71,66 +71,66 @@ export class ArchivesStore { // 公积金表单 @action - setAccumulationFundForm = accumulationFundForm => this.accumulationFundForm = accumulationFundForm + setAccumulationFundForm = accumulationFundForm => this.accumulationFundForm = accumulationFundForm; // 其他福利表单 @action - setOtherForm = otherForm => this.otherForm = otherForm + setOtherForm = otherForm => this.otherForm = otherForm; // 社保表单 @action - setSocialSecurityPaymentForm = socialSecurityPaymentForm => this.socialSecurityPaymentForm = socialSecurityPaymentForm + setSocialSecurityPaymentForm = socialSecurityPaymentForm => this.socialSecurityPaymentForm = socialSecurityPaymentForm; // 公积金表单 @action - setAccumulationFundPaymentForm = accumulationFundPaymentForm => this.accumulationFundPaymentForm = accumulationFundPaymentForm + setAccumulationFundPaymentForm = accumulationFundPaymentForm => this.accumulationFundPaymentForm = accumulationFundPaymentForm; // 其他福利基数表单 @action - setOtherPaymentForm = otherPaymentForm => this.otherPaymentForm = otherPaymentForm + setOtherPaymentForm = otherPaymentForm => this.otherPaymentForm = otherPaymentForm; // 初始化操作 @action doInit = () => { this.getCondition(); // this.getTableDatas(); - } + }; // 获得高级搜索表单数据 @action getCondition = () => { API.getCondition().then(action(res => { if (res.status) { // 接口请求成功/失败处理 - let condition = removePropertyCondition(res.data.condition) + let condition = removePropertyCondition(res.data.condition); this.condition = condition; this.form.initFormFields(condition); // 渲染高级搜索form表单 } else { - message.error(res.msg || '接口调用失败!') + message.error(res.msg || "接口调用失败!"); } })); - } + }; // 渲染table数据 @action getTableDatas = (params = {}) => { this.loading = true; const formParams = this.form.getFormParams() || {}; - params = {...formParams, ...params}; + params = { ...formParams, ...params }; API.getTable(params).then(action(res => { if (res.status) { // 接口请求成功/失败处理 this.dataSource = res.data.datas.map(item => { - item = {...item} - item.key = item.employeeId + item = { ...item }; + item.key = item.employeeId; return item; - }) + }); // this.columns = res.data.columns; - this.tableStore.getDatas(res.data.dataKey.datas) - this.pageInfo = res.data.pageInfo + this.tableStore.getDatas(res.data.dataKey.datas); + this.pageInfo = res.data.pageInfo; } else { - message.error(res.msg || '接口调用失败!') + message.error(res.msg || "接口调用失败!"); } this.loading = false; })); - } + }; @action setShowSearchAd = bool => this.showSearchAd = bool; @@ -139,124 +139,128 @@ export class ArchivesStore { @action doSearch = () => { this.getTableDatas(); this.showSearchAd = false; - } + }; // 查询档案基本信息表单 @action - getBaseForm = (employeeId, welfareTypeEnum ="", paymentOrganization="") => { - API.getBaseForm({employeeId, welfareTypeEnum, paymentOrganization}).then(action(res => { - if(res.status) { - if(welfareTypeEnum == "") { - this.baseFormData = res.data.data - } else if(welfareTypeEnum == "SOCIAL_SECURITY"){ - this.socialSecurityForm = res.data - } else if(welfareTypeEnum == "ACCUMULATION_FUND") { - this.accumulationFundForm = res.data - } else if(welfareTypeEnum == "OTHER") { - this.otherForm = res.data - } - // if(res.data && res.data.data && res.data.data.id) { - // this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id) - // } - } else { - message.error(res.errormsg || "获取失败") + getBaseForm = (employeeId, welfareTypeEnum = "", paymentOrganization = "") => { + API.getBaseForm({ employeeId, welfareTypeEnum, paymentOrganization }).then(action(res => { + if (res.status) { + if (welfareTypeEnum == "") { + this.baseFormData = res.data.data; + } else if (welfareTypeEnum == "SOCIAL_SECURITY") { + this.socialSecurityForm = res.data; + } else if (welfareTypeEnum == "ACCUMULATION_FUND") { + this.accumulationFundForm = res.data; + } else if (welfareTypeEnum == "OTHER") { + this.otherForm = res.data; } - })) - } + // if(res.data && res.data.data && res.data.data.id) { + // this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id) + // } + } else { + message.error(res.errormsg || "获取失败"); + } + })); + }; // 查询档案缴纳基数表单 @action - getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization="") => { - API.getPaymentForm({employeeId, welfareTypeEnum, schemeId, paymentOrganization}).then(res => { - if(welfareTypeEnum == "SOCIAL_SECURITY") { - this.socialSecurityPaymentForm = res.data - } else if(welfareTypeEnum == "ACCUMULATION_FUND") { - this.accumulationFundPaymentForm = res.data - } else if(welfareTypeEnum == "OTHER") { - this.otherPaymentForm = res.data + getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization = "") => { + API.getPaymentForm({ employeeId, welfareTypeEnum, schemeId, paymentOrganization }).then(res => { + if (welfareTypeEnum == "SOCIAL_SECURITY") { + this.socialSecurityPaymentForm = res.data; + } else if (welfareTypeEnum == "ACCUMULATION_FUND") { + this.accumulationFundPaymentForm = res.data; + } else if (welfareTypeEnum == "OTHER") { + this.otherPaymentForm = res.data; } - }) - } + }); + }; // 保存表单 @action save = (welfareType) => { - let baseForm = "" - let paymentForm = "" - if(welfareType == "SOCIAL_SECURITY") { - baseForm = JSON.stringify(this.socialSecurityForm.data) - paymentForm = JSON.stringify(this.socialSecurityPaymentForm.data) - } else if(welfareType == "ACCUMULATION_FUND") { - baseForm = JSON.stringify(this.accumulationFundForm.data) - paymentForm = JSON.stringify(this.accumulationFundPaymentForm.data) - } else if(welfareType == "OTHER") { - baseForm = JSON.stringify(this.otherForm.data) - paymentForm = JSON.stringify(this.otherPaymentForm.data) + let baseForm = ""; + let paymentForm = ""; + if (welfareType == "SOCIAL_SECURITY") { + baseForm = JSON.stringify(this.socialSecurityForm.data); + paymentForm = JSON.stringify(this.socialSecurityPaymentForm.data); + } else if (welfareType == "ACCUMULATION_FUND") { + baseForm = JSON.stringify(this.accumulationFundForm.data); + paymentForm = JSON.stringify(this.accumulationFundPaymentForm.data); + } else if (welfareType == "OTHER") { + baseForm = JSON.stringify(this.otherForm.data); + paymentForm = JSON.stringify(this.otherPaymentForm.data); } - API.save({welfareType, baseForm, paymentForm}).then(res => { - if(res.status) { - message.success("保存成功", 1) - this.getTableDatas() - } else { - message.error(res.errormsg || "保存失败", 1) - } - }) - } + return new Promise((resolve, reject) => { + API.save({ welfareType, baseForm, paymentForm }).then(res => { + if (res.status) { + message.success("保存成功", 1); + resolve(); + // this.getTableDatas() + } else { + message.error(res.errormsg || "保存失败", 1); + reject(); + } + }); + }); + }; // 导入模板下载 @action exportTempateDownload = (params = {}) => { - API.exportCurData(params) - } + API.exportCurData(params); + }; // 导入预览 @action previewCurData = (params) => { API.previewCurData(params).then(res => { - if(res.status) { - this.previewCurDataList = res.data + if (res.status) { + this.previewCurDataList = res.data; this.previewCurDataColumns = res.data.headers.map((item, index) => { - let column = {} + let column = {}; column.title = item; column.dataIndex = "" + index; - column.key = index + "" - return column - }) + column.key = index + ""; + return column; + }); this.previewCurDataDataSource = res.data.list.map((item) => { - let data = {} + let data = {}; item.map((i, index) => { - data[index + ''] = i - }) - return data - }) + data[index + ""] = i; + }); + return data; + }); } else { message.error(res.errormsg || "获取失败", 1); } - }) - } + }); + }; // 导入 @action importBatch = (params) => { return new Promise((resolve, reject) => { API.importBatch(params).then(res => { - if(res.status) { - this.importResult = res.data + if (res.status) { + this.importResult = res.data; resolve(); } else { - message.error(res.errormsg || "导入失败", 1) + message.error(res.errormsg || "导入失败", 1); reject(); } - }) - }) + }); + }); - } + }; // 导出档案 @action exportArchives = (ids = "") => { - API.exportArchives(ids) - } + API.exportArchives(ids); + }; } From e8dbd3e350e71a5feab128a741a0052447053a8c Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 31 Oct 2022 09:12:18 +0800 Subject: [PATCH 17/40] =?UTF-8?q?hotfix/v2-bug=E4=BF=AE=E5=A4=8D-1024?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index b309c9d4..450ff8d2 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -274,13 +274,13 @@ class Index extends Component { loading={loading.employee}>保存
} showGroup center items={importItems}/> - {/**/} - {/* 加密规则*/} - {/* */} - {/* */} - {/* } showGroup center items={enctryItems}/>*/} + + 加密规则 + + + } showGroup center items={enctryItems}/> { this.state.progressVisible && Date: Mon, 31 Oct 2022 13:55:49 +0800 Subject: [PATCH 18/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/cumDeduct.js | 19 ++ pc4mobx/hrmSalary/apis/cumSituation.js | 17 ++ pc4mobx/hrmSalary/apis/otherDeduct.js | 18 ++ .../pages/dataAcquisition/addItems.js | 39 ++-- .../pages/dataAcquisition/cumDeduct/index.js | 169 ++++++++++++++-- .../dataAcquisition/cumDeduct/index.less | 49 +++-- .../dataAcquisition/cumSituation/index.js | 155 ++++++++++++++- .../dataAcquisition/cumSituation/index.less | 59 ++++-- .../dataAcquisition/otherDeduct/index.js | 180 +++++++++++++++--- .../dataAcquisition/otherDeduct/index.less | 51 +++-- pc4mobx/hrmSalary/pages/ruleConfig/index.js | 2 +- pc4mobx/hrmSalary/stores/otherDeduct.js | 1 - 12 files changed, 662 insertions(+), 97 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/cumDeduct.js b/pc4mobx/hrmSalary/apis/cumDeduct.js index ada3f3b9..f7a094e6 100644 --- a/pc4mobx/hrmSalary/apis/cumDeduct.js +++ b/pc4mobx/hrmSalary/apis/cumDeduct.js @@ -1,4 +1,5 @@ import { WeaTools } from "ecCom"; +import { postFetch } from '../util/request'; //数据采集-累计专项附加扣除列表 export const getCumDeductList = (params) => { @@ -100,3 +101,21 @@ export const importCumDeductPreview = (params) => { body: JSON.stringify(params), }).then((res) => res.json()); }; + + +//新增累计专项附加扣除 +export const createAddUpDeduction = (params) => { + return postFetch('/api/bs/hrmsalary/addUpDeduction/createAddUpDeduction', params); +} +//编辑累计专项附加扣除 +export const editAddUpDeduction = (params) => { + return postFetch('/api/bs/hrmsalary/addUpDeduction/editAddUpDeduction', params); +} +//批量删除累计专项附加扣除 +export const deleteSelectAddUpDeduction = (params) => { + return postFetch('/api/bs/hrmsalary/addUpDeduction/deleteSelectAddUpDeduction', params); +} +//一键清空累计专项附加扣除 +export const deleteAllAddUpDeduction = (params) => { + return postFetch('/api/bs/hrmsalary/addUpDeduction/deleteAllAddUpDeduction', params); +} diff --git a/pc4mobx/hrmSalary/apis/cumSituation.js b/pc4mobx/hrmSalary/apis/cumSituation.js index 237d81ac..d8f84017 100644 --- a/pc4mobx/hrmSalary/apis/cumSituation.js +++ b/pc4mobx/hrmSalary/apis/cumSituation.js @@ -1,4 +1,5 @@ import { WeaTools } from "ecCom"; +import { postFetch } from '../util/request'; //数据采集-累计情况列表 export const getCumSituationList = (params) => { @@ -100,3 +101,19 @@ export const importCumSituationPreview = (params) => { body: JSON.stringify(params), }).then((res) => res.json()); }; +//新建往期累计情况 +export const createAddUpSituation = (params) => { + return postFetch('/api/bs/hrmsalary/addUpSituation/createAddUpSituation', params); +} +//编辑往期累计情况 +export const editAddUpSituation = (params) => { + return postFetch('/api/bs/hrmsalary/addUpSituation/editAddUpSituation', params); +} +//删除所选往期累计情况 +export const deleteSelectAddUpSituation = (params) => { + return postFetch('/api/bs/hrmsalary/addUpSituation/deleteSelectAddUpSituation', params); +} +//一键清空往期累计情况 +export const deleteAllAddUpSituation = (params) => { + return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params); +} diff --git a/pc4mobx/hrmSalary/apis/otherDeduct.js b/pc4mobx/hrmSalary/apis/otherDeduct.js index 972c641a..4b8fa0a9 100644 --- a/pc4mobx/hrmSalary/apis/otherDeduct.js +++ b/pc4mobx/hrmSalary/apis/otherDeduct.js @@ -1,4 +1,5 @@ import { WeaTools } from "ecCom"; +import { postFetch } from '../util/request'; //数据采集-其他免税扣除列表 export const getOtherDeductList = (params) => { @@ -105,3 +106,20 @@ export const importOtherDeductionPreview = (params) => { body: JSON.stringify(params), }).then((res) => res.json()); }; + +//新增其他免税扣除 +export const createData = (params) => { + return postFetch('/api/bs/hrmsalary/otherDeduction/createData', params); +} +//编辑其他免税扣除 +export const editData = (params) => { + return postFetch('/api/bs/hrmsalary/otherDeduction/editData', params); +} +//批量删除其他免税扣除 +export const deleteSelectData = (params) => { + return postFetch('/api/bs/hrmsalary/otherDeduction/deleteSelectData', params); +} +//一键清空其他免税扣除 +export const deleteAllData = (params) => { + return postFetch('/api/bs/hrmsalary/otherDeduction/deleteAllData', params); +} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js index bca10c14..a9ee5124 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js @@ -15,9 +15,10 @@ class AddItems extends Component { super(props); this.state = { baseInfo: { - taxablePeriod: "", - taxAgentor: "", - employee: "", + declareMonth: "", + taxAgentId: "", + taxAgentName: "", + employeeId: "", personArea: "", username: "", idcard: "" @@ -25,6 +26,10 @@ class AddItems extends Component { }; } + componentDidMount() { + console.log('123',this.props.editId); + } + render() { const { taxAgentOption = [], form, condition = [], isCum } = this.props; const { baseInfo } = this.state; @@ -36,9 +41,9 @@ class AddItems extends Component { labelCol: { span: 6 }, wrapperCol: { span: 18 }, format: "YYYY-MM", - value: baseInfo.taxablePeriod, + value: baseInfo.declareMonth, onChange: (data) => { - this.setState({ baseInfo: { ...baseInfo, taxablePeriod: data.date } }); + this.setState({ baseInfo: { ...baseInfo, declareMonth: data.date } }); } }) }, @@ -47,9 +52,9 @@ class AddItems extends Component { label: "个税扣缴义务人", viewAttr: 3, options: taxAgentOption, - value: baseInfo.taxAgentor, + value: baseInfo.taxAgentId, onChange: (data) => { - this.setState({ baseInfo: { ...baseInfo, taxAgentor: data.selected } }); + this.setState({ baseInfo: { ...baseInfo, taxAgentId: data.selected, taxAgentName: data.showName } }); } }) }, @@ -57,8 +62,8 @@ class AddItems extends Component { com: Browser({ label: "人员", viewAttr: 3, - onChange: (employee) => { - this.setState({ baseInfo: { ...baseInfo, employee } }); + onChange: (employeeId) => { + this.setState({ baseInfo: { ...baseInfo, employeeId } }); } }) } @@ -71,9 +76,9 @@ class AddItems extends Component { labelCol: { span: 6 }, wrapperCol: { span: 18 }, format: "YYYY-MM", - value: baseInfo.taxablePeriod, + value: baseInfo.declareMonth, onChange: (data) => { - this.setState({ baseInfo: { ...baseInfo, taxablePeriod: data.date } }); + this.setState({ baseInfo: { ...baseInfo, declareMonth: data.date } }); } }) }, @@ -82,9 +87,9 @@ class AddItems extends Component { label: "个税扣缴义务人", viewAttr: 3, options: taxAgentOption, - value: baseInfo.taxAgentor, + value: baseInfo.taxAgentId, onChange: (data) => { - this.setState({ baseInfo: { ...baseInfo, taxAgentor: data.selected } }); + this.setState({ baseInfo: { ...baseInfo, taxAgentId: data.selected, taxAgentName: data.showName } }); } }) }, @@ -93,7 +98,9 @@ class AddItems extends Component { label: "人员范围", viewAttr: 3, options: [ - { key: "ORGANIZATION", showname: "内部人员" }, { key: "EXT_EMPLOYEE", showname: "非系统人员" }], + { key: "ORGANIZATION", showname: "内部人员" }, + // { key: "EXT_EMPLOYEE", showname: "非系统人员" } + ], value: baseInfo.personArea, onChange: (data) => { this.setState({ baseInfo: { ...baseInfo, personArea: data.selected } }); @@ -105,8 +112,8 @@ class AddItems extends Component { com: Browser({ label: "人员", viewAttr: 3, - onChange: (employee) => { - this.setState({ baseInfo: { ...baseInfo, employee } }); + onChange: (employeeId) => { + this.setState({ baseInfo: { ...baseInfo, employeeId } }); } }) }]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 95631d17..2b2ab785 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd"; +import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd"; import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 @@ -11,6 +11,7 @@ import { optionAddAll } from "../../../util/options"; import SlideModalTitle from "../../../components/slideModalTitle"; import EditSlideContent from "./components/editSlideContent"; import AddItems from "../addItems"; +import * as API from "../../../apis/cumDeduct"; import "./index.less"; @@ -21,6 +22,8 @@ export default class CumDeduct extends React.Component { super(props); this.state = { addVisible: false, + editId: "", + saveLoading: false, value: "", selectedKey: [], slideSelectedKey: [], //详情表格的选中项 @@ -253,7 +256,7 @@ export default class CumDeduct extends React.Component { }); }; - handleSearch() { + handleSearch = () => { const { cumDeductStore: { getTableDatas } } = this.props; const { monthValue, taxAgentId } = this.state; let params = {}; @@ -264,10 +267,123 @@ export default class CumDeduct extends React.Component { params.taxAgentId = taxAgentId; } getTableDatas(params); - } + }; + + //新功能 + createAddUpDeduction = (payload) => { + this.setState({ saveLoading: true }); + API.createAddUpDeduction(payload).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("新增成功"); + this.setState({ + addVisible: false + }, () => { + const { cumDeductStore: { doSearch, addForm } } = this.props; + const { monthValue, taxAgentId } = this.state; + doSearch({ + declareMonth: [monthValue], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + addForm.resetForm(); + }); + } else { + message.error("新增失败"); + } + }); + }; + deleteSelectAddUpDeduction = () => { + const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state; + const { cumDeductStore: { doSearch } } = this.props; + if (selectedKey.length === 0) { + message.warning("未选择条目"); + return; + } + const payload = { + declareMonth, + ids: selectedKey + }; + Modal.confirm({ + title: "信息确认", + content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", + onOk: () => { + API.deleteSelectAddUpDeduction(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + }, + onCancel: () => { + } + }); + + }; + deleteAllAddUpDeduction = () => { + const { monthValue: declareMonth, taxAgentId } = this.state; + const { cumDeductStore: { doSearch } } = this.props; + const payload = { + declareMonth, + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }; + Modal.confirm({ + title: "信息确认", + content: `确定清空税款所属期为${declareMonth}的所有累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + onOk: () => { + API.deleteAllAddUpDeduction(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + } + }); + }; + handleOperate = ({ key }, row) => { + const { monthValue: declareMonth, taxAgentId } = this.state; + const { cumDeductStore: { doSearch } } = this.props; + if (key === "edit") { + this.setState({ + addVisible: true, + editId: row.id + }); + } else if (key === "delete") { + const payload = { + declareMonth, + ids: [row.id] + }; + Modal.confirm({ + title: "信息确认", + content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + onOk: () => { + API.deleteSelectAddUpDeduction(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + } + }); + } + }; render() { - const { modalParam, slideSelectedKey, monthValue, taxAgentId, addVisible } = this.state; + const { modalParam, slideSelectedKey, monthValue, taxAgentId, addVisible, editId, saveLoading } = this.state; const { cumDeductStore, taxAgentStore } = this.props; const { loading, @@ -385,15 +501,16 @@ export default class CumDeduct extends React.Component { type="primary" onClick={() => { this.setState({ - addVisible: true + addVisible: true, + editId: "" }); }}> 新建 , + 删除所选 } @@ -497,6 +614,18 @@ export default class CumDeduct extends React.Component { this.onEdit(record)}> 查看明细 + { + showOperateBtn && + this.handleOperate(e, record)}> + 编辑 + 删除 + } title=""> + + + } ) }; @@ -594,10 +723,11 @@ export default class CumDeduct extends React.Component { measure="%" title={ { const { baseInfo } = this.addItemRef.state; - const bool = _.every(baseInfo, v => !_.isEmpty(v)); + const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v)); if (!bool) { Modal.warning({ title: "信息确认", @@ -605,7 +735,11 @@ export default class CumDeduct extends React.Component { }); return; } - console.log(baseInfo); + const payload = { + ..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]), + ...addForm.getFormParams() + }; + this.createAddUpDeduction(payload); }} editable={!!addVisible} showOperateBtn={showOperateBtn} @@ -614,8 +748,13 @@ export default class CumDeduct extends React.Component { } content={ addVisible ? - this.addItemRef = dom} taxAgentOption={taxAgentOption} form={addForm} - condition={dataCollectCondition}/> : + this.addItemRef = dom} + taxAgentOption={taxAgentOption} + form={addForm} + editId={editId} + condition={dataCollectCondition} + /> : @@ -626,14 +765,16 @@ export default class CumDeduct extends React.Component { onClose={() => { setSlideVisiable(false); this.setState({ - addVisible: false + addVisible: false, + editId: "" }); }} showMask={true} closeMaskOnClick={() => { setSlideVisiable(false); this.setState({ - addVisible: false + addVisible: false, + editId: "" }); }} /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less index d6caad16..dc458e34 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less @@ -37,6 +37,11 @@ .linkWapper { a { color: #4d7ad8; + margin-right: 8px; + } + + i { + cursor: pointer; } a:hover { @@ -45,6 +50,26 @@ } } +.moreIconWrapper { + .ant-popover-inner { + min-width: 106px + } + + .ant-popover-inner-content { + padding: 0; + + .ant-menu { + .ant-menu-item { + border-right: none; + height: 30px; + line-height: 30px; + text-align: center; + padding: 0; + } + } + } +} + .wea-new-table { .ant-table-tbody { tr { @@ -56,30 +81,32 @@ } } -.slideOuterWrapper{ - .wea-slide-modal-title{ +.slideOuterWrapper { + .wea-slide-modal-title { height: initial; line-height: initial; text-align: left; } - .rodal-close{ + + .rodal-close { z-index: 99; - top: 10px!important; + top: 10px !important; } } -@media (min-width: 1260px){ - .slideOuterWrapper{ - .reqTopWrapper .wea-new-top-req-title>div:first-child>div{ - max-width: 100%!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; + .slideOuterWrapper { + .reqTopWrapper .wea-new-top-req-title > div:first-child > div { + max-width: calc(100% - 96px) !important; } } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 26f64f75..265385d2 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd"; +import { Button, Col, Dropdown, Menu, message, Modal, Row, Popover } from "antd"; import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 @@ -11,6 +11,7 @@ import { optionAddAll } from "../../../util/options"; import SlideModalTitle from "../../../components/slideModalTitle"; import EditSlideContent from "./editSlideContent"; import AddItems from "../addItems"; +import * as API from "../../../apis/cumSituation"; import "./index.less"; @@ -20,7 +21,9 @@ export default class CumSituation extends React.Component { constructor(props) { super(props); this.state = { + saveLoading: false, addVisible: false, + editId: "", value: "", selectedKey: [], slideSelectedKey: [], //详情表格的选中项 @@ -229,7 +232,7 @@ export default class CumSituation extends React.Component { }; // 搜索 - handleSearch() { + handleSearch = () => { const { cumSituationStore: { getTableDatas } } = this.props; const { monthValue, taxAgentId } = this.state; let params = {}; @@ -240,11 +243,124 @@ export default class CumSituation extends React.Component { params.taxAgentId = taxAgentId; } getTableDatas(params); + }; + //新功能 + createAddUpSituation= (payload)=>{ + this.setState({ saveLoading: true }); + API.createAddUpSituation(payload).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("新增成功"); + this.setState({ + addVisible: false, + editId: "" + }, () => { + const { cumSituationStore: { doSearch, addForm } } = this.props; + const { monthValue, taxAgentId } = this.state; + doSearch({ + declareMonth: [monthValue], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + addForm.resetForm(); + }); + } else { + message.error("新增失败"); + } + }); } + handleOperate = ({ key }, row) => { + const { monthValue: declareMonth, taxAgentId } = this.state; + const { cumSituationStore: { doSearch } } = this.props; + if (key === "edit") { + this.setState({ + addVisible: true, + editId: row.id + }); + } else if (key === "delete") { + const payload = { + declareMonth, + ids: [row.id] + }; + Modal.confirm({ + title: "信息确认", + content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的往期累计情况数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + onOk: () => { + API.deleteSelectAddUpSituation(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + } + }); + } + }; + deleteSelectAddUpSituation = () => { + const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state; + const { cumSituationStore: { doSearch } } = this.props; + if (selectedKey.length === 0) { + message.warning("未选择条目"); + return; + } + const payload = { + declareMonth, + ids: selectedKey + }; + Modal.confirm({ + title: "信息确认", + content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", + onOk: () => { + API.deleteSelectAddUpSituation(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + }, + onCancel: () => { + } + }); + + }; + deleteAllAddUpSituation = () => { + const { monthValue: declareMonth, taxAgentId } = this.state; + const { cumSituationStore: { doSearch } } = this.props; + const payload = { + declareMonth, + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }; + Modal.confirm({ + title: "信息确认", + content: `确定清空税款所属期为${declareMonth}的所有往期累计情况的数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + onOk: () => { + API.deleteAllAddUpSituation(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + } + }); + }; render() { const { cumSituationStore, taxAgentStore } = this.props; - const { slideSelectedKey, addVisible } = this.state; + const { slideSelectedKey, addVisible, editId, saveLoading } = this.state; const { loading, dataSource, @@ -382,9 +498,9 @@ export default class CumSituation extends React.Component { 新建 , + 删除所选 } @@ -487,6 +603,18 @@ export default class CumSituation extends React.Component { this.onEdit(record)}> 查看明细 + { + showOperateBtn && + this.handleOperate(e, record)}> + 编辑 + 删除 + } title=""> + + + } }; } else { @@ -572,10 +700,11 @@ export default class CumSituation extends React.Component { measure="%" title={ { const { baseInfo } = this.addItemRef.state; - const bool = _.every(baseInfo, v => !_.isEmpty(v)); + const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v)); if (!bool) { Modal.warning({ title: "信息确认", @@ -583,7 +712,11 @@ export default class CumSituation extends React.Component { }); return; } - console.log(baseInfo); + const payload = { + ..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]), + ...addForm.getFormParams() + }; + this.createAddUpSituation(payload); }} editable={!!addVisible} showOperateBtn={showOperateBtn} @@ -607,14 +740,16 @@ export default class CumSituation extends React.Component { onClose={() => { setSlideVisiable(false); this.setState({ - addVisible: false + addVisible: false, + editId: "" }); }} showMask={true} closeMaskOnClick={() => { setSlideVisiable(false); this.setState({ - addVisible: false + addVisible: false, + editId: "" }); }} />} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less index 8049f9cb..833b1df9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.less @@ -1,27 +1,64 @@ -.slideOuterWrapper{ - .wea-slide-modal-title{ +.slideOuterWrapper { + .wea-slide-modal-title { height: initial; line-height: initial; text-align: left; } - .rodal-close{ + + .rodal-close { z-index: 99; - top: 10px!important; + top: 10px !important; + } + + .linkWapper { + a { + color: #4d7ad8; + margin-right: 8px; + } + + i { + cursor: pointer; + } + + a:hover { + text-decoration: none; + } } } -@media (min-width: 1260px){ - .slideOuterWrapper{ - .reqTopWrapper .wea-new-top-req-title>div:first-child>div{ - max-width: 100%!important; +.moreIconWrapper { + .ant-popover-inner { + min-width: 106px + } + + .ant-popover-inner-content { + padding: 0; + + .ant-menu { + .ant-menu-item { + border-right: none; + height: 30px; + line-height: 30px; + text-align: center; + padding: 0; + } } } } + +@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; + .slideOuterWrapper { + .reqTopWrapper .wea-new-top-req-title > div:first-child > div { + max-width: calc(100% - 96px) !important; } } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index c5aeb54d..9728b74d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd"; +import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd"; import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 @@ -11,7 +11,9 @@ import AddItems from "../addItems"; import SlideModalTitle from "../../../components/slideModalTitle"; import EditSlideContent from "./editSlideContent"; import { optionAddAll } from "../../../util/options"; +import * as API from "../../../apis/otherDeduct"; import "./index.less"; +import { deleteAllData, deleteSelectData } from "../../../apis/otherDeduct"; @inject("otherDeductStore", "taxAgentStore") @@ -20,7 +22,9 @@ export default class OtherDeduct extends React.Component { constructor(props) { super(props); this.state = { + saveLoading: false, addVisible: false, + editId: "", value: "", selectedKey: [], slideSelectedKey: [], //详情表格的选中项 @@ -224,7 +228,7 @@ export default class OtherDeduct extends React.Component { }); }; - handleSearch() { + handleSearch = () => { const { otherDeductStore: { getTableDatas } } = this.props; const { monthValue, taxAgentId } = this.state; let params = {}; @@ -235,7 +239,121 @@ export default class OtherDeduct extends React.Component { params.taxAgentId = taxAgentId; } getTableDatas(params); - } + }; + + //新功能 + createData = (payload) => { + this.setState({ saveLoading: true }); + API.createData(payload).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("新增成功"); + this.setState({ + addVisible: false, + editId: "" + }, () => { + const { otherDeductStore: { doSearch, addForm } } = this.props; + const { monthValue, taxAgentId } = this.state; + doSearch({ + declareMonth: [monthValue], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + addForm.resetForm(); + }); + } else { + message.error("新增失败"); + } + }); + }; + handleOperate = ({ key }, row) => { + const { monthValue: declareMonth, taxAgentId } = this.state; + const { otherDeductStore: { doSearch } } = this.props; + if (key === "edit") { + this.setState({ + addVisible: true, + editId: row.id + }); + } else if (key === "delete") { + const payload = { + declareMonth, + ids: [row.id] + }; + Modal.confirm({ + title: "信息确认", + content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + onOk: () => { + API.deleteSelectData(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + } + }); + } + }; + deleteSelectData = () => { + const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state; + const { otherDeductStore: { doSearch } } = this.props; + if (selectedKey.length === 0) { + message.warning("未选择条目"); + return; + } + const payload = { + declareMonth, + ids: selectedKey + }; + Modal.confirm({ + title: "信息确认", + content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", + onOk: () => { + API.deleteSelectData(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + }, + onCancel: () => { + } + }); + + }; + deleteAllData = () => { + const { monthValue: declareMonth, taxAgentId } = this.state; + const { otherDeductStore: { doSearch } } = this.props; + const payload = { + declareMonth, + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }; + Modal.confirm({ + title: "信息确认", + content: `确定清空税款所属期为${declareMonth}的所有其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, + onOk: () => { + API.deleteAllData(payload).then(({ status }) => { + if (status) { + message.success("删除成功"); + doSearch({ + declareMonth: [declareMonth], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + } else { + message.error("删除失败"); + } + }); + } + }); + }; render() { const { otherDeductStore, taxAgentStore } = this.props; @@ -270,7 +388,7 @@ export default class OtherDeduct extends React.Component { setPageObj } = otherDeductStore; const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; - const { modalParam, monthValue, taxAgentId, slideSelectedKey, addVisible } = this.state; + const { modalParam, monthValue, taxAgentId, slideSelectedKey, addVisible, editId, saveLoading } = this.state; const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || []; @@ -368,15 +486,16 @@ export default class OtherDeduct extends React.Component { type="primary" onClick={() => { this.setState({ - addVisible: true + addVisible: true, + editId: "" }); }}> 新建 , + 删除所选 } @@ -455,8 +574,6 @@ export default class OtherDeduct extends React.Component { if (item.dataIndex === "username") { return { ...item, - width: 100, - fixed: "left", render: (text, record) =>
this.onEdit(record)}> @@ -466,20 +583,28 @@ export default class OtherDeduct extends React.Component { }; } else if (item.dataIndex === "taxAgentName") { return { - ...item, - width: 180, - fixed: "left" + ...item }; } else if (item.dataIndex === "operate") { return { ...item, - width: 100, - fixed: "right", render: (text, record) =>
this.onEdit(record)}> 查看明细 + { + showOperateBtn && + this.handleOperate(e, record)}> + 编辑 + 删除 + } title=""> + + + }
}; } else { @@ -522,7 +647,6 @@ export default class OtherDeduct extends React.Component { dataSource={dataSource} pagination={pagination} loading={loading} - scroll={{ x: 1300 }} /> @@ -570,10 +694,10 @@ export default class OtherDeduct extends React.Component { measure="%" title={ { const { baseInfo } = this.addItemRef.state; - const bool = _.every(baseInfo, v => !_.isEmpty(v)); + const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v)); if (!bool) { Modal.warning({ title: "信息确认", @@ -581,8 +705,13 @@ export default class OtherDeduct extends React.Component { }); return; } - console.log(baseInfo); + const payload = { + ..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]), + ...addForm.getFormParams() + }; + this.createData(payload); }} + loading={saveLoading} editable={!!addVisible} showOperateBtn={showOperateBtn} customOperate={(showOperateBtn && !addVisible) ? renderBtns() : []} @@ -590,8 +719,13 @@ export default class OtherDeduct extends React.Component { } content={ addVisible ? - this.addItemRef = dom} taxAgentOption={taxAgentOption} form={addForm} - condition={dataCollectCondition}/> : + this.addItemRef = dom} + taxAgentOption={taxAgentOption} + form={addForm} + editId={editId} + condition={dataCollectCondition} + /> : @@ -601,14 +735,16 @@ export default class OtherDeduct extends React.Component { onClose={() => { setSlideVisiable(false); this.setState({ - addVisible: false + addVisible: false, + editId: "" }); }} showMask={true} closeMaskOnClick={() => { setSlideVisiable(false); this.setState({ - addVisible: false + addVisible: false, + editId: "" }); }} />} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less index eba96b4d..081d0280 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.less @@ -2,6 +2,11 @@ .linkWapper { a { color: #4d7ad8; + margin-right: 8px; + } + + i { + cursor: pointer; } a:hover { @@ -9,30 +14,54 @@ } } } -.slideOuterWrapper{ - .wea-slide-modal-title{ + +.moreIconWrapper { + .ant-popover-inner { + min-width: 106px + } + + .ant-popover-inner-content { + padding: 0; + + .ant-menu { + .ant-menu-item { + border-right: none; + height: 30px; + line-height: 30px; + text-align: center; + padding: 0; + } + } + } +} + + +.slideOuterWrapper { + .wea-slide-modal-title { height: initial; line-height: initial; text-align: left; } - .rodal-close{ + + .rodal-close { z-index: 99; - top: 10px!important; + top: 10px !important; } } -@media (min-width: 1260px){ - .slideOuterWrapper{ - .reqTopWrapper .wea-new-top-req-title>div:first-child>div{ - max-width: 100%!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; + .slideOuterWrapper { + .reqTopWrapper .wea-new-top-req-title > div:first-child > div { + max-width: calc(100% - 96px) !important; } } } diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index bafd5e0f..590aebc4 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -282,7 +282,7 @@ export const Select = payload => { return ( onChange({ type: label, selected })}/> + onChange={(selected, showName) => onChange({ type: label, selected, showName })}/> ); }; diff --git a/pc4mobx/hrmSalary/stores/otherDeduct.js b/pc4mobx/hrmSalary/stores/otherDeduct.js index 91457537..2f413560 100644 --- a/pc4mobx/hrmSalary/stores/otherDeduct.js +++ b/pc4mobx/hrmSalary/stores/otherDeduct.js @@ -4,7 +4,6 @@ import { WeaForm, WeaTableNew } from "comsMobx"; import { removePropertyCondition } from "../util/response"; import * as API from "../apis/otherDeduct"; // 引入API接口文件 -import * as TaxAgentApi from "../apis/taxAgent"; const { TableStore } = WeaTableNew; From 24b24c2652d8786d3dc0f588fc2dd7109095ac08 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 31 Oct 2022 14:49:24 +0800 Subject: [PATCH 19/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/components/TipLabel/index.js | 32 +-- .../socialSecurityBenefits/archives/index.js | 44 +++ .../programme/columns.js | 252 +++++++++--------- .../programme/defaultSlideForm.js | 24 +- .../socialSecurityBenefits/programme/index.js | 2 +- 5 files changed, 215 insertions(+), 139 deletions(-) diff --git a/pc4mobx/hrmSalary/components/TipLabel/index.js b/pc4mobx/hrmSalary/components/TipLabel/index.js index 5d111c33..5671fb88 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.js +++ b/pc4mobx/hrmSalary/components/TipLabel/index.js @@ -1,18 +1,18 @@ -import React from 'react'; -import "./index.less" +import React from "react"; +import "./index.less"; export default class TipLabel extends React.Component { - render() { - return ( -
-
- {this.props.title ? this.props.title : "小提示"} -
-
- {this.props.tipList && this.props.tipList.map(item =>
{item}
)} - {this.props.children} -
-
- ) - } -} \ No newline at end of file + render() { + return ( +
+
+ {this.props.title ? this.props.title : "小提示"} +
+
+ {this.props.tipList && this.props.tipList.map(item =>
{item}
)} + {this.props.children} +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index bf54f956..a48b9557 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -12,6 +12,7 @@ import OtherForm from "./otherForm"; import { tabCondition } from "./config"; import * as API from "../../../apis/welfareArchive"; import ImportModal from "../../../components/importModal"; +import TipLabel from "../../../components/TipLabel"; import "./index.less"; @inject("archivesStore", "taxAgentStore") @@ -433,6 +434,48 @@ export default class Archives extends React.Component { }); }; + getTipChildren = () => { + const { selectedKey } = this.state; + let dom = null; + switch (selectedKey) { + case "pending": + dom =
+
1、新入职人员、返聘人员和个税扣缴义务人发生变更从【待减员】中减员操作的会进入【待增员】;
+
2、返聘人员默认返聘前的社保福利缴纳方案、缴纳账号、缴纳组织数据,其他数据会清空;
+
3、个税扣缴义务人变更进入【待增员】的,保留所有最新版本数据;若修改了数据再增员则修改的数据作为新版本保存;
+
4、维护好员工的社保福利档案数据后,点击【增员】,数据会进入【在缴员工】;
+
5、若不需给该员工缴纳,可点击【删除待办】进入【停缴员工】;进入【停缴员工】后,可以点击【取消停缴】再次进入【待增员】;
+
6、不管起始缴纳月维护到哪个月,都可以进行增员,不影响核算判断;若维护了最后缴纳月,且小于等于当前月,则增员失败;
+
7、增员失败情况:①终止缴纳月小于等于当前月;②其他的个税扣缴义务人下的在缴员工中存在该员工,在缴员工未进入停缴员工;
+
; + break; + case "fixed": + dom =
+
1、需缴纳社保福利的员工维护在【在缴员工】;
+
2、可使用更新导入,调整档案数据;
+
3、若维护了最后缴纳月且小于等于当前月,则自动进入【待减员】;
+
4、核算人员范围为,【在缴员工】中的起始缴纳月和最后缴纳月区间包含当前月的人员;
+
; + break; + case "suspend": + dom =
+
1、数据进入【待减员】规则:①员工的人事状态属性从在职变成非在职,且在【在缴员工】里;②【在缴员工】里档案维护了缴纳终止月且小于等于当前月;③个税扣缴义务人发生调整;④某员工分权时在原个税扣缴义务人下处于【在缴员工】里但又将该员工添加到其他的个税扣缴义务人下的情况;
+
2、【待减员】为是否不再缴纳的待办状态,数据是从【在缴员工】中复制的,若不处理列表中的待办数据,也不影响社保福利核算;【待减员】维护的数据和【在缴员工】数据是同步的;
+
3、点击【减员】前先维护最后缴纳月,所有有起始缴纳月的福利项的最后缴纳月都小于等于当前月且无未归档的核算数据的档案才能减员成功,减员成功后数据进入【停缴员工】;
+
4、数据进入【待减员】规则的第四种情况下,若还需要在当前个税扣缴义务人下进行缴纳的话,当前该员工的【待减员】数据进行【删除待办】操作即可;若不在该个税扣缴义务人下继续缴纳,维护好最后缴纳月后进行【减员】操作,员工进入【停缴员工】;
+
; + break; + default: + dom =
+
1、不需要缴纳社保福利的员工,保存在【停缴员工】;
+
2、【停缴员工】点击取消停缴,数据会回退到上次的位置(从【待减员】减员到停缴员工的,点击停缴返回到【在缴员工】,不返回到【待减员】);
+
3、若员工的社保福利从一个个税扣缴义务人下转到另一个个税扣缴义务人下去缴纳,则在转后的个税扣缴义务人的【待增员】中进行增员操作成功后,员工进入待【在缴员工】,而在原个税扣缴义务人下的【停缴员工】中,该员工数据将会被删除;是否开启分权员工的档案数据都只保存一份;
+
; + break; + } + return dom; + }; + render() { const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props; const { selectedTab, selectedRowKeys, selectedKey, dataSource: dataSourceActive, pageInfo, tabCount } = this.state; @@ -658,6 +701,7 @@ export default class Archives extends React.Component { rowSelection={rowSelection} scroll={{ x: 1200 }} /> + {this.getTipChildren()} { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js index 349ea720..5a3004ee 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js @@ -1,144 +1,154 @@ // 社保 export const socialSecurityColumns = [{ - title: "方案名称", - dataIndex: 'title', - key: 'title', + title: "方案名称", + dataIndex: "title", + key: "title" }, { - title: '缴纳类型', - dataIndex: 'username', - key: 'username', + title: "缴纳类型", + dataIndex: "username", + key: "username" }, { - title: '缴纳范围', - dataIndex: 'projectName', - key: 'projectName', + title: "缴纳范围", + dataIndex: "projectName", + key: "projectName" }, { - title: '备注', - dataIndex: 'customer', - key: 'customer', + title: "备注", + dataIndex: "customer", + key: "customer" }, { - title: '操作', - dataIndex: 'customer', - key: 'customer', + title: "操作", + dataIndex: "customer", + key: "customer" }]; // 公积金 -export const accumulationFundColumns= [{ - title: "方案名称", - dataIndex: 'title', - key: 'title', +export const accumulationFundColumns = [{ + title: "方案名称", + dataIndex: "title", + key: "title" }, { - title: '缴纳类型', - dataIndex: 'username', - key: 'username', + title: "缴纳类型", + dataIndex: "username", + key: "username" }, { - title: '缴纳范围', - dataIndex: 'projectName', - key: 'projectName', + title: "缴纳范围", + dataIndex: "projectName", + key: "projectName" }, { - title: '备注', - dataIndex: 'customer', - key: 'customer', + title: "备注", + dataIndex: "customer", + key: "customer" }, { - title: '操作', - dataIndex: 'customer', - key: 'customer', -}] + title: "操作", + dataIndex: "customer", + key: "customer" +}]; // 企业年金及其他福利 export const otherBenefitsColumns = [ - { - title: "方案名称", - dataIndex: 'title', - key: 'title', - - }, - { - title: "缴纳类型", - dataIndex: 'title', - key: 'title', - }, - { - title: "缴纳范围", - dataIndex: 'title', - key: 'title', - }, - { - title: "备注", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'title', - key: 'title', - } -] + { + title: "方案名称", + dataIndex: "title", + key: "title" + + }, + { + title: "缴纳类型", + dataIndex: "title", + key: "title" + }, + { + title: "缴纳范围", + dataIndex: "title", + key: "title" + }, + { + title: "备注", + dataIndex: "title", + key: "title" + }, + { + title: "操作", + dataIndex: "title", + key: "title" + } +]; export const CustomBenefitsColumns = [ - { - title: "福利名称", - dataIndex: 'title', - key: 'title', - }, - { - title: "启用", - dataIndex: 'title', - key: 'title', - }, - { - title: "类型", - dataIndex: 'title', - key: 'title', - }, - { - title: "缴纳对象", - dataIndex: 'title', - key: 'title', - }, - { - title: "操作", - dataIndex: 'title', - key: 'title', - } -] + { + title: "福利名称", + dataIndex: "title", + key: "title" + }, + { + title: "启用", + dataIndex: "title", + key: "title" + }, + { + title: "类型", + dataIndex: "title", + key: "title" + }, + { + title: "缴纳对象", + dataIndex: "title", + key: "title" + }, + { + title: "操作", + dataIndex: "title", + key: "title" + } +]; export const insertUpdateColumns = [ - { - title: "类型名称", - dataIndex: "insuranceName", - key: "insuranceName" - }, - { - title: "是否缴费", - dataIndex: "isPayment", - key: "isPayment" - }, - { - title: "缴纳对象", - dataIndex: "paymentScope", - key: "paymentScope" - }, - { - title: "缴纳比例%", - dataIndex: "paymentProportion", - key: "paymentProportion" - }, - { - title: "固定费用", - dataIndex: "fixedCost", - key: "fixedCost" - }, - { - title: "有效小数位", - dataIndex: "validNum", - key: "validNum" - }, - { - title: "进位规则", - dataIndex: "rententionRule", - key: "rententionRule" - }, -] + { + title: "类型名称", + dataIndex: "insuranceName", + key: "insuranceName" + }, + { + title: "是否缴费", + dataIndex: "isPayment", + key: "isPayment" + }, + { + title: "缴纳对象", + dataIndex: "paymentScope", + key: "paymentScope" + }, + { + title: "缴纳比例%", + dataIndex: "paymentProportion", + key: "paymentProportion" + }, + { + title: "固定费用", + dataIndex: "fixedCost", + key: "fixedCost" + }, + { + title: "基数上限", + dataIndex: "upperLimit", + key: "upperLimit" + }, + { + title: "基数下限", + dataIndex: "lowerLimit", + key: "lowerLimit" + }, + { + title: "有效小数位", + dataIndex: "validNum", + key: "validNum" + }, + { + title: "进位规则", + dataIndex: "rententionRule", + key: "rententionRule" + } +]; export const dataSource = []; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js index f3c77655..fc3467b3 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js @@ -1,6 +1,6 @@ import React from "react"; import { WeaSelect, WeaInput, WeaTable } from "ecCom"; -import { Table, Row, Col, Switch } from "antd"; +import { Row, Col, Switch } from "antd"; import { insertUpdateColumns } from "./columns"; import { inject, observer } from "mobx-react"; import SmallTab from "../../../components/smallTab"; @@ -123,6 +123,28 @@ export default class DefaultSlideForm extends React.Component { /> ); }; + } else if (item.dataIndex == "upperLimit") { + item.render = (text, record) => { + return ( + { + this.updateDataSource(record, v, "upperLimit"); + }} + /> + ); + }; + } else if (item.dataIndex == "lowerLimit") { + item.render = (text, record) => { + return ( + { + this.updateDataSource(record, v, "lowerLimit"); + }} + /> + ); + }; } }); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index 8f7c1585..3afd55cc 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -538,7 +538,7 @@ export default class Programme extends React.Component { className="slideOuterWrapper" visible={this.state.slideVisiable} top={0} - width={50} + width={60} height={100} direction={"right"} measure={"%"} From d4ecfb3a1e7373cdfa6562ee172fecdef5db469a Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 31 Oct 2022 17:35:21 +0800 Subject: [PATCH 20/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/cumDeduct.js | 4 + pc4mobx/hrmSalary/apis/otherDeduct.js | 4 + .../pages/dataAcquisition/addItems.js | 52 ++++++++--- .../cumDeduct/components/editSlideContent.js | 2 +- .../pages/dataAcquisition/cumDeduct/index.js | 90 ++++++++++++------ .../dataAcquisition/cumSituation/index.js | 14 +-- .../otherDeduct/editSlideContent.js | 2 +- .../dataAcquisition/otherDeduct/index.js | 93 ++++++++++++------- 8 files changed, 173 insertions(+), 88 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/cumDeduct.js b/pc4mobx/hrmSalary/apis/cumDeduct.js index f7a094e6..18ddb1a5 100644 --- a/pc4mobx/hrmSalary/apis/cumDeduct.js +++ b/pc4mobx/hrmSalary/apis/cumDeduct.js @@ -107,6 +107,10 @@ export const importCumDeductPreview = (params) => { export const createAddUpDeduction = (params) => { return postFetch('/api/bs/hrmsalary/addUpDeduction/createAddUpDeduction', params); } +//查看信息 +export const getAddUpDeduction = (params) => { + return postFetch('/api/bs/hrmsalary/addUpDeduction/getAddUpDeduction', params); +} //编辑累计专项附加扣除 export const editAddUpDeduction = (params) => { return postFetch('/api/bs/hrmsalary/addUpDeduction/editAddUpDeduction', params); diff --git a/pc4mobx/hrmSalary/apis/otherDeduct.js b/pc4mobx/hrmSalary/apis/otherDeduct.js index 4b8fa0a9..b7f2ad31 100644 --- a/pc4mobx/hrmSalary/apis/otherDeduct.js +++ b/pc4mobx/hrmSalary/apis/otherDeduct.js @@ -111,6 +111,10 @@ export const importOtherDeductionPreview = (params) => { export const createData = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/createData', params); } +//查看信息 +export const getData = (params) => { + return postFetch('/api/bs/hrmsalary/otherDeduction/getData', params); +} //编辑其他免税扣除 export const editData = (params) => { return postFetch('/api/bs/hrmsalary/otherDeduction/editData', params); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js index a9ee5124..5ed7b58a 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js @@ -19,6 +19,7 @@ class AddItems extends Component { taxAgentId: "", taxAgentName: "", employeeId: "", + employeeName: "", personArea: "", username: "", idcard: "" @@ -26,18 +27,37 @@ class AddItems extends Component { }; } - componentDidMount() { - console.log('123',this.props.editId); + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.editId !== this.props.editId) { + this.setState({ + baseInfo: { + ...this.state.baseInfo, + declareMonth: nextProps.editId.declareMonth, + taxAgentId: nextProps.editId.taxAgentId, + taxAgentName: nextProps.editId.taxAgentName, + employeeId: nextProps.editId.employeeId, + employeeName: nextProps.editId.username, + } + }); + const fields= _.map(nextProps.condition[0].items, it =>{ + return it.domkey[0] + }) + fields.map(item => { + nextProps.form.updateFields({ + [item]: nextProps.editId[item] + }) + }) + } } render() { - const { taxAgentOption = [], form, condition = [], isCum } = this.props; + const { taxAgentOption = [], form, condition = [], isCum, editId } = this.props; const { baseInfo } = this.state; const items = [ { com: PickDate({ label: "税款所属期", - viewAttr: 3, + viewAttr: _.isEmpty(editId) ? 3 : 1, labelCol: { span: 6 }, wrapperCol: { span: 18 }, format: "YYYY-MM", @@ -50,7 +70,7 @@ class AddItems extends Component { { com: Select({ label: "个税扣缴义务人", - viewAttr: 3, + viewAttr: _.isEmpty(editId) ? 3 : 1, options: taxAgentOption, value: baseInfo.taxAgentId, onChange: (data) => { @@ -61,9 +81,11 @@ class AddItems extends Component { { com: Browser({ label: "人员", - viewAttr: 3, - onChange: (employeeId) => { - this.setState({ baseInfo: { ...baseInfo, employeeId } }); + viewAttr: _.isEmpty(editId) ? 3 : 1, + value: baseInfo.employeeId, + valueSpan: baseInfo.employeeName, + onChange: ({ids, names}) => { + this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } }); } }) } @@ -98,7 +120,7 @@ class AddItems extends Component { label: "人员范围", viewAttr: 3, options: [ - { key: "ORGANIZATION", showname: "内部人员" }, + { key: "ORGANIZATION", showname: "内部人员" } // { key: "EXT_EMPLOYEE", showname: "非系统人员" } ], value: baseInfo.personArea, @@ -112,8 +134,8 @@ class AddItems extends Component { com: Browser({ label: "人员", viewAttr: 3, - onChange: (employeeId) => { - this.setState({ baseInfo: { ...baseInfo, employeeId } }); + onChange: ({ids, names}) => { + this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } }); } }) }]; @@ -142,7 +164,7 @@ class AddItems extends Component {
{ getSearchs(form, condition, 2) @@ -156,13 +178,15 @@ class AddItems extends Component { export default AddItems; export const Browser = payload => { - const { label, onChange, viewAttr = 3 } = payload; + const { label, onChange, viewAttr = 3, value, valueSpan } = payload; return ( + value={value} + valueSpan={valueSpan} + onChange={(ids, names)=> onChange({ids, names})}/> ); }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js index 63f96c64..becf4328 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js @@ -144,7 +144,7 @@ export default class EditSlideContent extends React.Component { {currentRecord.username} - 申报月份 + 税款所属期
- 申报月份: + 税款所属期: { + handleSaveDeduction = (payload) => { + const { editId } = this.state; this.setState({ saveLoading: true }); - API.createAddUpDeduction(payload).then(({ status }) => { - this.setState({ saveLoading: false }); - if (status) { - message.success("新增成功"); - this.setState({ - addVisible: false - }, () => { - const { cumDeductStore: { doSearch, addForm } } = this.props; - const { monthValue, taxAgentId } = this.state; - doSearch({ - declareMonth: [monthValue], - taxAgentId: taxAgentId === "All" ? "" : taxAgentId + if (!_.isEmpty(editId)) { + API.editAddUpDeduction({ ...payload, id: editId.id }).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("编辑成功"); + this.setState({ + addVisible: false, + editId: {} + }, () => { + const { cumDeductStore: { doSearch, addForm } } = this.props; + const { monthValue, taxAgentId } = this.state; + doSearch({ + declareMonth: [monthValue], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + addForm.resetForm(); }); - addForm.resetForm(); - }); - } else { - message.error("新增失败"); - } - }); + } else { + message.error("编辑成功"); + } + }); + } else { + API.createAddUpDeduction(payload).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("新增成功"); + this.setState({ + addVisible: false, + editId: {} + }, () => { + const { cumDeductStore: { doSearch, addForm } } = this.props; + const { monthValue, taxAgentId } = this.state; + doSearch({ + declareMonth: [monthValue], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + addForm.resetForm(); + }); + } else { + message.error("新增失败"); + } + }); + } }; deleteSelectAddUpDeduction = () => { const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state; @@ -354,8 +379,13 @@ export default class CumDeduct extends React.Component { const { cumDeductStore: { doSearch } } = this.props; if (key === "edit") { this.setState({ - addVisible: true, - editId: row.id + addVisible: true + }, () => { + API.getAddUpDeduction({ id: row.id }).then(({ status, data }) => { + if (status) { + this.setState({ editId: data }); + } + }); }); } else if (key === "delete") { const payload = { @@ -502,8 +532,8 @@ export default class CumDeduct extends React.Component { onClick={() => { this.setState({ addVisible: true, - editId: "" - }); + editId: {} + },()=>addForm.resetForm()); }}> 新建 , @@ -723,12 +753,12 @@ export default class CumDeduct extends React.Component { measure="%" title={ { const { baseInfo } = this.addItemRef.state; const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v)); - if (!bool) { + if (!bool && _.isEmpty(editId)) { Modal.warning({ title: "信息确认", content: "必要信息不完整,红色*为必填项!" @@ -739,7 +769,7 @@ export default class CumDeduct extends React.Component { ..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]), ...addForm.getFormParams() }; - this.createAddUpDeduction(payload); + this.handleSaveDeduction(payload); }} editable={!!addVisible} showOperateBtn={showOperateBtn} @@ -766,7 +796,7 @@ export default class CumDeduct extends React.Component { setSlideVisiable(false); this.setState({ addVisible: false, - editId: "" + editId: {} }); }} showMask={true} @@ -774,7 +804,7 @@ export default class CumDeduct extends React.Component { setSlideVisiable(false); this.setState({ addVisible: false, - editId: "" + editId: {} }); }} /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 265385d2..bd4241e2 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -30,6 +30,7 @@ export default class CumSituation extends React.Component { visiable: false, inited: false, monthValue: moment(new Date()).format("YYYY"), + taxYearMonth: moment(new Date()).format("YYYY-MM"), taxAgentId: "All", modalParam: { taxYearMonth: "" @@ -202,14 +203,6 @@ export default class CumSituation extends React.Component { setStep(0); } - onOperatesClick = (record, index, operate, flag) => { - switch (operate.index.toString()) { - case "0": // 查看明细 - this.onEdit(record); - break; - } - }; - showColumn = () => { const { cumSituationStore: { tableStore } } = this.props; tableStore.setColSetVisible(true); @@ -360,7 +353,7 @@ export default class CumSituation extends React.Component { render() { const { cumSituationStore, taxAgentStore } = this.props; - const { slideSelectedKey, addVisible, editId, saveLoading } = this.state; + const { slideSelectedKey, addVisible, editId, saveLoading, taxYearMonth } = this.state; const { loading, dataSource, @@ -713,7 +706,8 @@ export default class CumSituation extends React.Component { return; } const payload = { - ..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]), + taxYearMonth: baseInfo.declareMonth, + ..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]), ...addForm.getFormParams() }; this.createAddUpSituation(payload); diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js index 96d3f6b4..dcb1709d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js @@ -144,7 +144,7 @@ export default class EditSlideContent extends React.Component { {currentRecord.username} - 申报月份 + 税款所属期
- 申报月份: + 税款所属期: { + handleCreateData = (payload) => { + const { editId }= this.state; this.setState({ saveLoading: true }); - API.createData(payload).then(({ status }) => { - this.setState({ saveLoading: false }); - if (status) { - message.success("新增成功"); - this.setState({ - addVisible: false, - editId: "" - }, () => { - const { otherDeductStore: { doSearch, addForm } } = this.props; - const { monthValue, taxAgentId } = this.state; - doSearch({ - declareMonth: [monthValue], - taxAgentId: taxAgentId === "All" ? "" : taxAgentId + if (!_.isEmpty(editId)) { + API.editData({ ...payload, id: editId.id }).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("编辑成功"); + this.setState({ + addVisible: false, + editId: {} + }, () => { + const { otherDeductStore: { doSearch, addForm } } = this.props; + const { monthValue, taxAgentId } = this.state; + doSearch({ + declareMonth: [monthValue], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + addForm.resetForm(); }); - addForm.resetForm(); - }); - } else { - message.error("新增失败"); - } - }); + } else { + message.error("编辑失败"); + } + }); + } else { + API.createData(payload).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("新增成功"); + this.setState({ + addVisible: false, + editId: {} + }, () => { + const { otherDeductStore: { doSearch, addForm } } = this.props; + const { monthValue, taxAgentId } = this.state; + doSearch({ + declareMonth: [monthValue], + taxAgentId: taxAgentId === "All" ? "" : taxAgentId + }); + addForm.resetForm(); + }); + } else { + message.error("新增失败"); + } + }); + } }; handleOperate = ({ key }, row) => { const { monthValue: declareMonth, taxAgentId } = this.state; const { otherDeductStore: { doSearch } } = this.props; if (key === "edit") { this.setState({ - addVisible: true, - editId: row.id + addVisible: true + },()=>{ + API.getData({ id: row.id }).then(({ status, data }) => { + if (status) { + this.setState({ editId: data }); + } + }); }); } else if (key === "delete") { const payload = { @@ -487,8 +516,8 @@ export default class OtherDeduct extends React.Component { onClick={() => { this.setState({ addVisible: true, - editId: "" - }); + editId: {} + },()=>addForm.resetForm()); }}> 新建 , @@ -694,11 +723,11 @@ export default class OtherDeduct extends React.Component { measure="%" title={ { const { baseInfo } = this.addItemRef.state; const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v)); - if (!bool) { + if (!bool && _.isEmpty(editId)) { Modal.warning({ title: "信息确认", content: "必要信息不完整,红色*为必填项!" @@ -709,7 +738,7 @@ export default class OtherDeduct extends React.Component { ..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]), ...addForm.getFormParams() }; - this.createData(payload); + this.handleCreateData(payload); }} loading={saveLoading} editable={!!addVisible} @@ -736,7 +765,7 @@ export default class OtherDeduct extends React.Component { setSlideVisiable(false); this.setState({ addVisible: false, - editId: "" + editId: {} }); }} showMask={true} @@ -744,7 +773,7 @@ export default class OtherDeduct extends React.Component { setSlideVisiable(false); this.setState({ addVisible: false, - editId: "" + editId: {} }); }} />} From 3c5b564ccb33ab1078923ce1802ff8f7971bb11b Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 31 Oct 2022 17:58:56 +0800 Subject: [PATCH 21/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialSecurityBenefits/archives/accumulationFundForm.js | 2 +- .../pages/socialSecurityBenefits/archives/otherForm.js | 2 +- .../pages/socialSecurityBenefits/archives/socialSecurityForm.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index f7c8ce98..0fece0ec 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -30,7 +30,7 @@ export default class AccumulationFundForm extends React.Component { // 获取基数表单 handleFetchPaymentForm(fundName) { const { archivesStore: { getPaymentForm } } = this.props; - getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName); + getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName, this.props.record.paymentOrganization); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index 5d02b807..f8a24dba 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -26,7 +26,7 @@ export default class OtherForm extends React.Component { // 获取基数表单 handleFetchPaymentForm(value) { const { archivesStore: { getPaymentForm } } = this.props; - getPaymentForm(this.props.employeeId, "OTHER", value); + getPaymentForm(this.props.employeeId, "OTHER", value, this.props.record.paymentOrganization); } // 表单变化 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 10c16fb5..6ab3793e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -31,7 +31,7 @@ export default class SocialSecurityForm extends React.Component { // 获取基数表单 handleFetchPaymentForm(value) { const { archivesStore: { getPaymentForm } } = this.props; - getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", value); + getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", value, this.props.record.paymentOrganization); } //基数变化 From 023f70e692084162f65a08f0c2a84b1204f32cff Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Tue, 1 Nov 2022 10:35:59 +0800 Subject: [PATCH 22/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialSecurityBenefits/archives/index.js | 10 +++-- .../programme/columns.js | 20 ++++----- .../programme/defaultSlideForm.js | 44 +++++++++++-------- 3 files changed, 43 insertions(+), 31 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index a48b9557..0c825a73 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -285,6 +285,7 @@ export default class Archives extends React.Component { const { pageInfo } = this.state; this.setState({ selectedKey, + selectedRowKeys:[], editSlideVisible: false, pageInfo: { ...pageInfo, @@ -527,7 +528,7 @@ export default class Archives extends React.Component { url = `${url}&runStatuses=3`; break; default: - url = `${url}&runStatuses=4`; + url = `${url}&runStatuses=4,5`; break; } window.open(url, "_self"); @@ -553,7 +554,7 @@ export default class Archives extends React.Component { url = `${url}&runStatuses=3`; break; default: - url = `${url}&runStatuses=4`; + url = `${url}&runStatuses=4,5`; break; } window.open(url, "_self"); @@ -701,7 +702,10 @@ export default class Archives extends React.Component { rowSelection={rowSelection} scroll={{ x: 1200 }} /> - {this.getTipChildren()} + { + !_.isEmpty(this.getColumns()) && + {this.getTipChildren()} + } { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js index 5a3004ee..369e6b5a 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js @@ -118,16 +118,6 @@ export const insertUpdateColumns = [ dataIndex: "paymentScope", key: "paymentScope" }, - { - title: "缴纳比例%", - dataIndex: "paymentProportion", - key: "paymentProportion" - }, - { - title: "固定费用", - dataIndex: "fixedCost", - key: "fixedCost" - }, { title: "基数上限", dataIndex: "upperLimit", @@ -138,6 +128,16 @@ export const insertUpdateColumns = [ dataIndex: "lowerLimit", key: "lowerLimit" }, + { + title: "缴纳比例%", + dataIndex: "paymentProportion", + key: "paymentProportion" + }, + { + title: "固定费用", + dataIndex: "fixedCost", + key: "fixedCost" + }, { title: "有效小数位", dataIndex: "validNum", diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js index fc3467b3..b85a779b 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js @@ -160,20 +160,35 @@ export default class DefaultSlideForm extends React.Component { } = this.props; let result = { ...record }; result[key] = e; - if (this.state.selectItem == "个人") { - let dataSource = [...defaultPersonDataSource]; + if(key === 'upperLimit' || key === 'lowerLimit'){ + let dataSource = [...defaultPersonDataSource], + dataSource_company = [...defaultCompanyDataSource]; dataSource = dataSource.map(item => { - if (item.id == result.id) return result; + if (item.insuranceName === result.insuranceName) return {...item, [key]: e, }; + else return item; + }); + dataSource_company = dataSource_company.map(item => { + if (item.insuranceName === result.insuranceName) return {...item, [key]: e }; else return item; }); setDefaultPersonDataSource(dataSource); - } else { - let dataSource = [...defaultCompanyDataSource]; - dataSource = dataSource.map(item => { - if (item.id == result.id) return result; - else return item; - }); - setDefaultCompanyDataSource(dataSource); + setDefaultCompanyDataSource(dataSource_company); + }else{ + if (this.state.selectItem == "个人") { + let dataSource = [...defaultPersonDataSource]; + dataSource = dataSource.map(item => { + if (item.id == result.id) return result; + else return item; + }); + setDefaultPersonDataSource(dataSource); + } else { + let dataSource = [...defaultCompanyDataSource]; + dataSource = dataSource.map(item => { + if (item.id == result.id) return result; + else return item; + }); + setDefaultCompanyDataSource(dataSource); + } } } @@ -189,10 +204,7 @@ export default class DefaultSlideForm extends React.Component { const { programmeStore, salaryFileStore, taxAgentStore } = this.props; const { userStatusList } = salaryFileStore; const { taxAgentAdminOption,getTaxAgentSelectListAsAdmin } = taxAgentStore; - const { - defaultPersonDataSource, - defaultCompanyDataSource, - } = programmeStore; + const { defaultPersonDataSource, defaultCompanyDataSource } = programmeStore; const options = [ { key: "", @@ -212,13 +224,9 @@ export default class DefaultSlideForm extends React.Component { ]; const handleSmallTabChange = item => { - // let paymentArea = item == "paymentArea" ? "1": "2" - // let requestParams = {...this.props.requestParams} - // requestParams.paymentArea = paymentArea this.setState({ selectItem: item.value }); - // this.props.onChange(requestParams) }; return ( From 8a964d7e40af4e068493bcdf0fb4ebe660cb8352 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Tue, 1 Nov 2022 14:06:06 +0800 Subject: [PATCH 23/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/cumSituation.js | 4 + .../pages/dataAcquisition/addItems.js | 12 +- .../pages/dataAcquisition/attendance/index.js | 4 +- .../dataAcquisition/cumDeduct/index.less | 1 - .../dataAcquisition/cumSituation/columns.js | 58 +++++- .../dataAcquisition/cumSituation/index.js | 174 +++++++++++------- .../pages/dataAcquisition/index.less | 2 +- .../dataAcquisition/otherDeduct/index.js | 1 - 8 files changed, 173 insertions(+), 83 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/cumSituation.js b/pc4mobx/hrmSalary/apis/cumSituation.js index d8f84017..512f3d14 100644 --- a/pc4mobx/hrmSalary/apis/cumSituation.js +++ b/pc4mobx/hrmSalary/apis/cumSituation.js @@ -117,3 +117,7 @@ export const deleteSelectAddUpSituation = (params) => { export const deleteAllAddUpSituation = (params) => { return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params); } +//查看信息 +export const getAddUpSituation = (params) => { + return postFetch('/api/bs/hrmsalary/addUpSituation/getAddUpSituation', params); +} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js index 5ed7b58a..751934a9 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js @@ -20,7 +20,7 @@ class AddItems extends Component { taxAgentName: "", employeeId: "", employeeName: "", - personArea: "", + personArea: "ORGANIZATION", username: "", idcard: "" } @@ -94,7 +94,7 @@ class AddItems extends Component { { com: PickDate({ label: "税款所属期", - viewAttr: 3, + viewAttr: _.isEmpty(editId) ? 3 : 1, labelCol: { span: 6 }, wrapperCol: { span: 18 }, format: "YYYY-MM", @@ -107,7 +107,7 @@ class AddItems extends Component { { com: Select({ label: "个税扣缴义务人", - viewAttr: 3, + viewAttr: _.isEmpty(editId) ? 3 : 1, options: taxAgentOption, value: baseInfo.taxAgentId, onChange: (data) => { @@ -118,7 +118,7 @@ class AddItems extends Component { { com: Select({ label: "人员范围", - viewAttr: 3, + viewAttr: _.isEmpty(editId) ? 3 : 1, options: [ { key: "ORGANIZATION", showname: "内部人员" } // { key: "EXT_EMPLOYEE", showname: "非系统人员" } @@ -133,7 +133,9 @@ class AddItems extends Component { const insider = [{ com: Browser({ label: "人员", - viewAttr: 3, + viewAttr: _.isEmpty(editId) ? 3 : 1, + value: baseInfo.employeeId, + valueSpan: baseInfo.employeeName, onChange: ({ids, names}) => { this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } }); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index d942b925..e568b84a 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -159,8 +159,8 @@ export default class Attendance extends React.Component { handleFinish() { this.setState({ modalVisiable: false }); const { attendanceStore: { getAttendanceList, step } } = this.props; - if (step == 2) { - this.getAttendanceList({ ...this.pageInfo }); + if (step === 2) { + getAttendanceList({ ...this.pageInfo }); } } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less index dc458e34..46ce46d5 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.less @@ -3,7 +3,6 @@ position: relative; .searchConditionWrapper { - width: 600px; margin-left: 10px; margin-top: 8px; } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index 93f13900..ce99e24c 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -66,7 +66,6 @@ export const columns = [ } ]; - export const modalColumns = [ { title: "姓名", @@ -285,9 +284,64 @@ export const dataCollectCondition = [ labelcol: 8, value: "", viewAttr: 2 - }, + } ], title: "数据采集", defaultshow: true } ]; + +export const taxOptions = [ + { + key: "", + showname: "" + }, + { + key: "01", + showname: "一月", + }, + { + key: "02", + showname: "二月" + }, + { + key: "03", + showname: "三月" + }, + { + key: "04", + showname: "四月" + }, + { + key: "05", + showname: "五月" + }, + { + key: "06", + showname: "六月" + }, + { + key: "07", + showname: "七月" + }, + { + key: "08", + showname: "八月" + }, + { + key: "09", + showname: "九月" + }, + { + key: "10", + showname: "十月" + }, + { + key: "11", + showname: "十一月" + }, + { + key: "12", + showname: "十二月" + }, +]; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index bd4241e2..82849f06 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -1,12 +1,12 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Col, Dropdown, Menu, message, Modal, Row, Popover } from "antd"; +import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd"; import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import moment from "moment"; import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import ImportModal from "../../../components/importModal"; -import { dataCollectCondition, modalColumns } from "./columns"; +import { dataCollectCondition, modalColumns, taxOptions } from "./columns"; import { optionAddAll } from "../../../util/options"; import SlideModalTitle from "../../../components/slideModalTitle"; import EditSlideContent from "./editSlideContent"; @@ -14,7 +14,6 @@ import AddItems from "../addItems"; import * as API from "../../../apis/cumSituation"; import "./index.less"; - @inject("cumSituationStore", "taxAgentStore") @observer export default class CumSituation extends React.Component { @@ -23,14 +22,14 @@ export default class CumSituation extends React.Component { this.state = { saveLoading: false, addVisible: false, - editId: "", + editId: {}, value: "", selectedKey: [], slideSelectedKey: [], //详情表格的选中项 visiable: false, inited: false, monthValue: moment(new Date()).format("YYYY"), - taxYearMonth: moment(new Date()).format("YYYY-MM"), + taxYearMonth: moment(new Date()).month() + 1 > 10 ? (moment(new Date()).month() + 1) + "" : "0" + (moment(new Date()).month() + 1), taxAgentId: "All", modalParam: { taxYearMonth: "" @@ -45,7 +44,11 @@ export default class CumSituation extends React.Component { taxAgentStore: { fetchTaxAgentOption } } = this.props; addForm.initFormFields(dataCollectCondition); - doInit({ year: this.state.monthValue, taxAgentId: "" }); + doInit({ + year: this.state.monthValue, + taxAgentId: "", + taxYearMonth: this.state.monthValue + "-" + this.state.taxYearMonth + }); fetchTaxAgentOption().then(() => { this.setState({ inited: true @@ -54,7 +57,7 @@ export default class CumSituation extends React.Component { } getSearchsAdQuick() { - const { monthValue, taxAgentId } = this.state; + const { monthValue, taxAgentId, taxYearMonth } = this.state; const { taxAgentStore: { taxAgentOption }, cumSituationStore: { form, getTableDatas } @@ -67,22 +70,21 @@ export default class CumSituation extends React.Component { value={monthValue} format="YYYY" width={200} - onChange={v => { - this.setState({ monthValue: v }); + onChange={c => { + this.setState({ monthValue: c, taxYearMonth: "01" }); let params = {}; if (taxAgentId == "All") { params.taxAgentId = ""; } else { params.taxAgentId = taxAgentId; } - if (v != null && v != "") { - params.year = v; + if (c != null && c !== "") { + params.year = c; } - getTableDatas(params); + getTableDatas({ ...params, taxYearMonth: c + "-" + taxYearMonth }); }} />
-
+
+ 税款所属期: + { + this.setState({ taxYearMonth: v }); + let params = {}; + if (taxAgentId == "All") { + params.taxAgentId = ""; + } else { + params.taxAgentId = taxAgentId; + } + if (v != null && v != "") { + params.taxYearMonth = monthValue + "-" + v; + } + getTableDatas({ ...params, year: monthValue }); + }} + /> +
个税扣缴义务人: {this.state.inited && @@ -101,15 +124,15 @@ export default class CumSituation extends React.Component { value={taxAgentId} onChange={v => { let params = {}; - if (v == "All") { + if (v === "All") { params.taxAgentId = ""; } else { params.taxAgentId = v; } - if (monthValue != null && monthValue != "") { + if (monthValue != null && monthValue !== "") { params.year = monthValue; } - getTableDatas(params); + getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth }); this.setState({ taxAgentId: v }); }} />} @@ -227,7 +250,7 @@ export default class CumSituation extends React.Component { // 搜索 handleSearch = () => { const { cumSituationStore: { getTableDatas } } = this.props; - const { monthValue, taxAgentId } = this.state; + const { monthValue, taxAgentId, taxYearMonth } = this.state; let params = {}; if (monthValue != null && monthValue !== "") { params.year = monthValue; @@ -235,43 +258,63 @@ export default class CumSituation extends React.Component { if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") { params.taxAgentId = taxAgentId; } - getTableDatas(params); + getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth }); }; //新功能 - createAddUpSituation= (payload)=>{ + handleCreateUpSituation = (payload) => { + const { editId } = this.state; this.setState({ saveLoading: true }); - API.createAddUpSituation(payload).then(({ status }) => { - this.setState({ saveLoading: false }); - if (status) { - message.success("新增成功"); - this.setState({ - addVisible: false, - editId: "" - }, () => { - const { cumSituationStore: { doSearch, addForm } } = this.props; - const { monthValue, taxAgentId } = this.state; - doSearch({ - declareMonth: [monthValue], - taxAgentId: taxAgentId === "All" ? "" : taxAgentId + if (!_.isEmpty(editId)) { + API.editAddUpSituation({ ...payload, id: editId.id }).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("编辑成功"); + this.setState({ + addVisible: false, + editId: {} + }, () => { + const { cumSituationStore: { addForm } } = this.props; + this.handleSearch(); + addForm.resetForm(); }); - addForm.resetForm(); - }); - } else { - message.error("新增失败"); - } - }); - } + } else { + message.error("编辑失败"); + } + }); + } else { + API.createAddUpSituation(payload).then(({ status }) => { + this.setState({ saveLoading: false }); + if (status) { + message.success("新增成功"); + this.setState({ + addVisible: false, + editId: {} + }, () => { + const { cumSituationStore: { addForm } } = this.props; + this.handleSearch(); + addForm.resetForm(); + }); + } else { + message.error("新增失败"); + } + }); + } + }; handleOperate = ({ key }, row) => { - const { monthValue: declareMonth, taxAgentId } = this.state; - const { cumSituationStore: { doSearch } } = this.props; + const { monthValue: declareMonth, taxYearMonth } = this.state; if (key === "edit") { this.setState({ - addVisible: true, - editId: row.id + addVisible: true + }, () => { + API.getAddUpSituation({ id: row.id }).then(({ status, data }) => { + if (status) { + this.setState({ editId: data }); + } + }); }); } else if (key === "delete") { const payload = { - declareMonth, + taxYearMonth: declareMonth + "-" + taxYearMonth, ids: [row.id] }; Modal.confirm({ @@ -281,10 +324,7 @@ export default class CumSituation extends React.Component { API.deleteSelectAddUpSituation(payload).then(({ status }) => { if (status) { message.success("删除成功"); - doSearch({ - declareMonth: [declareMonth], - taxAgentId: taxAgentId === "All" ? "" : taxAgentId - }); + this.handleSearch(); } else { message.error("删除失败"); } @@ -294,14 +334,13 @@ export default class CumSituation extends React.Component { } }; deleteSelectAddUpSituation = () => { - const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state; - const { cumSituationStore: { doSearch } } = this.props; + const { monthValue: declareMonth, selectedKey, taxYearMonth } = this.state; if (selectedKey.length === 0) { message.warning("未选择条目"); return; } const payload = { - declareMonth, + taxYearMonth: declareMonth + "-" + taxYearMonth, ids: selectedKey }; Modal.confirm({ @@ -311,10 +350,7 @@ export default class CumSituation extends React.Component { API.deleteSelectAddUpSituation(payload).then(({ status }) => { if (status) { message.success("删除成功"); - doSearch({ - declareMonth: [declareMonth], - taxAgentId: taxAgentId === "All" ? "" : taxAgentId - }); + this.handleSearch(); } else { message.error("删除失败"); } @@ -326,11 +362,9 @@ export default class CumSituation extends React.Component { }; deleteAllAddUpSituation = () => { - const { monthValue: declareMonth, taxAgentId } = this.state; - const { cumSituationStore: { doSearch } } = this.props; + const { monthValue: declareMonth, taxYearMonth } = this.state; const payload = { - declareMonth, - taxAgentId: taxAgentId === "All" ? "" : taxAgentId + taxYearMonth: declareMonth + "-" + taxYearMonth }; Modal.confirm({ title: "信息确认", @@ -339,10 +373,7 @@ export default class CumSituation extends React.Component { API.deleteAllAddUpSituation(payload).then(({ status }) => { if (status) { message.success("删除成功"); - doSearch({ - declareMonth: [declareMonth], - taxAgentId: taxAgentId === "All" ? "" : taxAgentId - }); + this.handleSearch(); } else { message.error("删除失败"); } @@ -353,7 +384,7 @@ export default class CumSituation extends React.Component { render() { const { cumSituationStore, taxAgentStore } = this.props; - const { slideSelectedKey, addVisible, editId, saveLoading, taxYearMonth } = this.state; + const { slideSelectedKey, addVisible, editId, saveLoading } = this.state; const { loading, dataSource, @@ -406,7 +437,7 @@ export default class CumSituation extends React.Component { }; const adBtn = [ // 高级搜索内部按钮 - , , @@ -694,11 +725,11 @@ export default class CumSituation extends React.Component { title={ { const { baseInfo } = this.addItemRef.state; const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v)); - if (!bool) { + if (!bool && _.isEmpty(editId)) { Modal.warning({ title: "信息确认", content: "必要信息不完整,红色*为必填项!" @@ -710,7 +741,7 @@ export default class CumSituation extends React.Component { ..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]), ...addForm.getFormParams() }; - this.createAddUpSituation(payload); + this.handleCreateUpSituation(payload); }} editable={!!addVisible} showOperateBtn={showOperateBtn} @@ -724,6 +755,7 @@ export default class CumSituation extends React.Component { taxAgentOption={taxAgentOption} form={addForm} isCum + editId={!_.isEmpty(editId) ? { ...editId, declareMonth: editId.taxYearMonth } : editId} condition={dataCollectCondition}/> : } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less index fab55464..b583068d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/index.less +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less @@ -1,7 +1,7 @@ .tipWrapper{ display: flex; flex-direction: column; - margin: 0 25px; + margin: 0 25px 20px 25px; border: 1px solid #e5e5e5; .title{ border-bottom: 1px solid #e5e5e5; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index 9b7a19d4..ca12c043 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -13,7 +13,6 @@ import EditSlideContent from "./editSlideContent"; import { optionAddAll } from "../../../util/options"; import * as API from "../../../apis/otherDeduct"; import "./index.less"; -import { getData } from "../../../apis/otherDeduct"; @inject("otherDeductStore", "taxAgentStore") From abd8f2b9f417cce5c4a9c4ca8b13b3fdd2b6e63b Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Tue, 1 Nov 2022 15:50:54 +0800 Subject: [PATCH 24/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/welfareScheme.js | 1 - .../archives/accumulationFundForm.js | 26 ++++++++-------- .../socialSecurityBenefits/archives/index.js | 5 ++-- .../archives/otherForm.js | 25 ++++++++-------- .../archives/socialSecurityForm.js | 25 +++++++--------- .../programme/columns.js | 10 +++---- .../programme/defaultSlideForm.js | 14 +++++---- .../socialSecurityBenefits/programme/index.js | 22 +++++++------- .../standingBookDetail/components/normal.js | 30 +++++++++++-------- 9 files changed, 83 insertions(+), 75 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/welfareScheme.js b/pc4mobx/hrmSalary/apis/welfareScheme.js index b46fe837..d0e0b11c 100644 --- a/pc4mobx/hrmSalary/apis/welfareScheme.js +++ b/pc4mobx/hrmSalary/apis/welfareScheme.js @@ -25,7 +25,6 @@ export const createScheme = params => { }).then(res => res.json()) }; export const updateScheme = params => { - return fetch('/api/bs/hrmsalary/scheme/update', { method: 'POST', mode: 'cors', diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index 0fece0ec..a7465898 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Col, Row, Select } from "antd"; -import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom"; +import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom"; import GroupCard from "../../../components/groupCard"; import cs from "classnames"; import "./index.less"; @@ -80,18 +80,20 @@ export default class AccumulationFundForm extends React.Component { 公积金方案名称: - { - this.handleFormChange({ otherName: value }); - this.handleFetchPaymentForm(value); - }}> - { - items && items[0].items && items[0].items[0] && items[0].items[0].options.map(item => ( - - )) - } - + { + this.handleFormChange({ otherName: showname, otherSchemeId: value }); + this.handleFetchPaymentForm(value); + }}/> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 6ab3793e..5007ef86 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -1,7 +1,7 @@ import React from "react"; import GroupCard from "../../../components/groupCard"; import { Col, Row, Select } from "antd"; -import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom"; +import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom"; import { inject, observer } from "mobx-react"; import cs from "classnames"; import "./index.less"; @@ -84,21 +84,18 @@ export default class SocialSecurityForm extends React.Component { 社保方案名称: - + /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js index 369e6b5a..2f45ede4 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/columns.js @@ -118,16 +118,16 @@ export const insertUpdateColumns = [ dataIndex: "paymentScope", key: "paymentScope" }, - { - title: "基数上限", - dataIndex: "upperLimit", - key: "upperLimit" - }, { title: "基数下限", dataIndex: "lowerLimit", key: "lowerLimit" }, + { + title: "基数上限", + dataIndex: "upperLimit", + key: "upperLimit" + }, { title: "缴纳比例%", dataIndex: "paymentProportion", diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js index b85a779b..2b04f02c 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js @@ -1,5 +1,5 @@ import React from "react"; -import { WeaSelect, WeaInput, WeaTable } from "ecCom"; +import { WeaSelect, WeaInput, WeaTable, WeaInputNumber } from "ecCom"; import { Row, Col, Switch } from "antd"; import { insertUpdateColumns } from "./columns"; import { inject, observer } from "mobx-react"; @@ -104,7 +104,8 @@ export default class DefaultSlideForm extends React.Component { } else if (item.dataIndex == "paymentProportion") { item.render = (text, record) => { return ( - { this.updateDataSource(record, v, "paymentProportion"); @@ -115,7 +116,8 @@ export default class DefaultSlideForm extends React.Component { } else if (item.dataIndex == "fixedCost") { item.render = (text, record) => { return ( - { this.updateDataSource(record, v, "fixedCost"); @@ -126,7 +128,8 @@ export default class DefaultSlideForm extends React.Component { } else if (item.dataIndex == "upperLimit") { item.render = (text, record) => { return ( - { this.updateDataSource(record, v, "upperLimit"); @@ -137,7 +140,8 @@ export default class DefaultSlideForm extends React.Component { } else if (item.dataIndex == "lowerLimit") { item.render = (text, record) => { return ( - { this.updateDataSource(record, v, "lowerLimit"); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index 3afd55cc..f66751f8 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -224,7 +224,7 @@ export default class Programme extends React.Component { } } - onCustomEdit=(record)=> { + onCustomEdit = (record) => { const { programmeStore: { getCustomForm, setCustomNewVisible, setCustomRequest }, taxAgentStore: { showOperateBtn } @@ -242,10 +242,10 @@ export default class Programme extends React.Component { insuranceName: record["insurance_name"], id: record.id, isUse: record.is_use, - paymentScope: record["payment_scope"].split(",").map(item => paymentScopeEnum[item]).join(','), + paymentScope: record["payment_scope"].split(",").map(item => paymentScopeEnum[item]).join(","), welfareType: welfareTypeEnum[record.welfare_type] }); - } + }; // 页面跳转 handlePageChange(value) { @@ -405,7 +405,6 @@ export default class Programme extends React.Component { ...defaultCompanyDataSource ] }; - if (currentOperate == "add") { createScheme(request).then(res => { if (res.status) this.setState({ slideVisiable: false }); @@ -554,13 +553,14 @@ export default class Programme extends React.Component { /> } content={ - { - setRequestParams(requestParams); - }} - /> + this.state.slideVisiable ? + { + setRequestParams(requestParams); + }} + /> : null } onClose={() => { handleSlideClose(); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 4a2e7f9f..67abafe6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -9,7 +9,7 @@ import { Button, Icon, message, Modal, Spin, Tooltip } from "antd"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom"; -import { getSearchs, calcPageNo } from "../../../../util"; +import { calcPageNo, getSearchs } from "../../../../util"; import { getQueryString } from "../../../../util/url"; import ProgressModal from "../../../../components/progressModal"; import AcctResultImportModal from "../../../calculateDetail/acctResult/importModal/acctResultImportModal"; @@ -67,8 +67,8 @@ export default class NormalIndex extends Component { if (nextProps.selectedKey != this.props.selectedKey) { const { billMonth, paymentOrganization } = nextProps; this.setState({ - current: 1, - }, ()=>{ + current: 1 + }, () => { const { current } = this.state; nextProps.selectedKey === "1" ? this.getNormalList({ billMonth, current, paymentOrganization }) @@ -77,7 +77,7 @@ export default class NormalIndex extends Component { current, paymentOrganization }); - }) + }); } } @@ -282,11 +282,11 @@ export default class NormalIndex extends Component { ? this.getNormalList({ billMonth, paymentOrganization, - current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length) + current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length) }) : this.getSupplementaryList({ billMonth, - current: calcPageNo(this.state.tableData.total,this.state.current, 10, includes.length), + current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length), paymentOrganization }); }); @@ -495,7 +495,7 @@ export default class NormalIndex extends Component { selectedKey === "1" && } @@ -510,8 +510,11 @@ export default class NormalIndex extends Component { { this.props.type !== "detail" && - this.setState({ importParams: { ...importParams, visible: true } })}/> + this.setState({ importParams: { ...importParams, visible: true } })} + /> } {/*导入弹框*/} @@ -526,7 +529,7 @@ export default class NormalIndex extends Component { }); }} onCancel={() => { - this.setState({ importParams: { ...importParams, visible: false },fieldData: {} }, () => { + this.setState({ importParams: { ...importParams, visible: false }, fieldData: {} }, () => { const { billMonth, selectedKey, paymentOrganization } = this.props; const { current } = this.state; selectedKey === "1" @@ -540,8 +543,11 @@ export default class NormalIndex extends Component { } - + Date: Tue, 1 Nov 2022 16:52:55 +0800 Subject: [PATCH 25/40] =?UTF-8?q?=E8=80=83=E5=8B=A4=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E5=BA=8F=E5=8F=B7=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/attendance/index.js | 16 +++++++++++++++- .../socialSecurityBenefits/archives/index.js | 18 +++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index d942b925..c747b794 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -604,7 +604,18 @@ export default class Attendance extends React.Component { // ) // } // }) - return newColumns; + return [ + { + title: "序号", + dataIndex: "index", + width: 80, + render: (text, record, index) => { + const { current, pageSize } = this.pageInfo; + return (current - 1) * pageSize + index + 1; + } + }, + ...newColumns + ]; }; // 保存回调 @@ -692,6 +703,7 @@ export default class Attendance extends React.Component { topTab={topTab} searchOperationItem={renderSearchOperationItem()} onChange={v => { + this.pageInfo = { current: 1, pageSize: 10 }; handleTabChange(v); }} /> @@ -725,6 +737,8 @@ export default class Attendance extends React.Component { onChange={v => { this.setState({ tabSelectedKey: v + },()=>{ + this.pageInfo = { current: 1, pageSize: 10 }; }); }} /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index c71a37ea..1f340ea1 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -441,13 +441,13 @@ export default class Archives extends React.Component { switch (selectedKey) { case "pending": dom =
-
1、新入职人员、返聘人员和个税扣缴义务人发生变更从【待减员】中减员操作的会进入【待增员】;
-
2、返聘人员默认返聘前的社保福利缴纳方案、缴纳账号、缴纳组织数据,其他数据会清空;
-
3、个税扣缴义务人变更进入【待增员】的,保留所有最新版本数据;若修改了数据再增员则修改的数据作为新版本保存;
-
4、维护好员工的社保福利档案数据后,点击【增员】,数据会进入【在缴员工】;
-
5、若不需给该员工缴纳,可点击【删除待办】进入【停缴员工】;进入【停缴员工】后,可以点击【取消停缴】再次进入【待增员】;
-
6、不管起始缴纳月维护到哪个月,都可以进行增员,不影响核算判断;若维护了最后缴纳月,且小于等于当前月,则增员失败;
-
7、增员失败情况:①终止缴纳月小于等于当前月;
+ {/*
1、新入职人员、返聘人员和个税扣缴义务人发生变更从【待减员】中减员操作的会进入【待增员】;
*/} + {/*
2、返聘人员默认返聘前的社保福利缴纳方案、缴纳账号、缴纳组织数据,其他数据会清空;
*/} +
1、个税扣缴义务人变更进入【待增员】的,保留所有最新版本数据;若修改了数据再增员则修改的数据作为新版本保存;
+
2、维护好员工的社保福利档案数据后,点击【增员】,数据会进入【在缴员工】;
+
3、若不需给该员工缴纳,可点击【删除待办】进入【停缴员工】;进入【停缴员工】后,可以点击【取消停缴】再次进入【待增员】;
+
4、不管起始缴纳月维护到哪个月,都可以进行增员,不影响核算判断;若维护了最后缴纳月,且小于等于当前月,则增员失败;
+
5、增员失败情况:①终止缴纳月小于等于当前月;
{/* ②其他的个税扣缴义务人下的在缴员工中存在该员工,在缴员工未进入停缴员工;*/}
; break; @@ -464,14 +464,14 @@ export default class Archives extends React.Component {
1、数据进入【待减员】规则:①员工的人事状态属性从在职变成非在职,且在【在缴员工】里;②【在缴员工】里档案维护了缴纳终止月且小于等于当前月;③个税扣缴义务人发生调整;④某员工分权时在原个税扣缴义务人下处于【在缴员工】里但又将该员工添加到其他的个税扣缴义务人下的情况;
2、【待减员】为是否不再缴纳的待办状态,数据是从【在缴员工】中复制的,若不处理列表中的待办数据,也不影响社保福利核算;【待减员】维护的数据和【在缴员工】数据是同步的;
3、点击【减员】前先维护最后缴纳月,所有有起始缴纳月的福利项的最后缴纳月都小于等于当前月且无未归档的核算数据的档案才能减员成功,减员成功后数据进入【停缴员工】;
-
4、数据进入【待减员】规则的第四种情况下,若还需要在当前个税扣缴义务人下进行缴纳的话,当前该员工的【待减员】数据进行【删除待办】操作即可;若不在该个税扣缴义务人下继续缴纳,维护好最后缴纳月后进行【减员】操作,员工进入【停缴员工】;
+ {/*
4、数据进入【待减员】规则的第四种情况下,若还需要在当前个税扣缴义务人下进行缴纳的话,当前该员工的【待减员】数据进行【删除待办】操作即可;若不在该个税扣缴义务人下继续缴纳,维护好最后缴纳月后进行【减员】操作,员工进入【停缴员工】;
*/}
; break; default: dom =
1、不需要缴纳社保福利的员工,保存在【停缴员工】;
2、【停缴员工】点击取消停缴,数据会回退到上次的位置(从【待减员】减员到停缴员工的,点击停缴返回到【在缴员工】,不返回到【待减员】);
-
3、若员工的社保福利从一个个税扣缴义务人下转到另一个个税扣缴义务人下去缴纳,则在转后的个税扣缴义务人的【待增员】中进行增员操作成功后,员工进入待【在缴员工】,而在原个税扣缴义务人下的【停缴员工】中,该员工数据将会被删除;是否开启分权员工的档案数据都只保存一份;
+ {/*
3、若员工的社保福利从一个个税扣缴义务人下转到另一个个税扣缴义务人下去缴纳,则在转后的个税扣缴义务人的【待增员】中进行增员操作成功后,员工进入待【在缴员工】,而在原个税扣缴义务人下的【停缴员工】中,该员工数据将会被删除;是否开启分权员工的档案数据都只保存一份;
*/}
; break; } From bd0923e3a6f199913ae0c3655d740652a5a8af01 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Tue, 1 Nov 2022 17:18:41 +0800 Subject: [PATCH 26/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=93=8D=E4=BD=9C=E5=88=97=E8=A1=A8=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js | 2 +- pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index 717910dd..b345f310 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -637,7 +637,7 @@ export default class CumDeduct extends React.Component { } else if (item.dataIndex === "operate") { return { ...item, - width: 100, + width: 120, fixed: "right", render: (text, record) => (
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index 82849f06..be8a4c86 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -620,7 +620,7 @@ export default class CumSituation extends React.Component { } else if (item.dataIndex === "operate") { return { ...item, - width: 100, + width: 120, fixed: "right", render: (text, record) =>
From 794cfc1615b5a0fc8986a1670335e5b0aff2b850 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 2 Nov 2022 09:28:27 +0800 Subject: [PATCH 27/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=93=8D=E4=BD=9C=E5=88=97=E8=A1=A8=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/attendance/index.js | 4 +- .../cumDeduct/components/editSlideContent.js | 42 ++++++----------- .../cumSituation/editSlideContent.js | 45 ++++++------------- .../otherDeduct/editSlideContent.js | 12 +---- 4 files changed, 30 insertions(+), 73 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index e568b84a..8bc844d2 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -815,7 +815,7 @@ export default class Attendance extends React.Component { setFieldSettingAttendList(value); }} items={fieldSettingAttendList} - title={"考勤模块"} + title="考勤模块" /> { @@ -872,7 +872,7 @@ export default class Attendance extends React.Component { className="slideOuterWrapper" visible={slideVisiable} top={0} - width={40} + width={60} height={100} direction={"right"} measure={"%"} diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js index becf4328..37ea5920 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/editSlideContent.js @@ -1,13 +1,7 @@ import React from "react"; -import { Row, Col, Table, DatePicker } from "antd"; +import { Col, DatePicker, Row } from "antd"; import { inject, observer } from "mobx-react"; -import { - WeaInput, - WeaTextarea, - WeaSearchGroup, - WeaSelect, - WeaTable, -} from "ecCom"; +import { WeaTable } from "ecCom"; import "./editSlideContent.less"; import moment from "moment"; @@ -21,7 +15,7 @@ let emptyItem = { taxableIncomeLl: "0.00", taxableIncomeUl: "0.00", taxRate: "0.00", - taxDeduction: "0.00", + taxDeduction: "0.00" }; @inject("cumDeductStore", "taxAgentStore") @@ -34,21 +28,21 @@ export default class EditSlideContent extends React.Component { startDate: "", endDate: "", editable: - this.props.editable === undefined ? "true" : this.props.editable, + this.props.editable === undefined ? "true" : this.props.editable }; } componentWillMount() { // 初始化渲染页面 const { - taxAgentStore: { fetchTaxAgentOption }, + taxAgentStore: { fetchTaxAgentOption } } = this.props; fetchTaxAgentOption(); } addItem() { const { - taxRateStore: { setDataSource }, + taxRateStore: { setDataSource } } = this.props; let dataSource = [...this.props.taxRateStore.dataSource]; let indexNum = 1; @@ -78,7 +72,7 @@ export default class EditSlideContent extends React.Component { declareMonth.push(endDate); } let item = { - taxAgentId: taxAgentId, + taxAgentId: taxAgentId }; if (declareMonth.length != 0) { item.declareMonth = declareMonth; @@ -93,7 +87,7 @@ export default class EditSlideContent extends React.Component { render() { const { - taxAgentStore: { taxAgentOption }, + taxAgentStore: { taxAgentOption } } = this.props; const { cumDeductStore } = this.props; const { @@ -103,7 +97,7 @@ export default class EditSlideContent extends React.Component { slidePageObj, slideTableDataSource, setSlidePageObj, - slideLoading, + slideLoading } = cumDeductStore; const { startDate, endDate, taxAgentId } = this.state; @@ -118,24 +112,14 @@ export default class EditSlideContent extends React.Component { setSlidePageObj({ ...slidePageObj, current, - pageSize: slidePageObj.pageSize, + pageSize: slidePageObj.pageSize }); - }, - }; - const newColumns = _.map([...slideColumns], (item) => { - if (item.dataIndex === "declareMonth") { - return { - ...item, - width: 120, - fixed: "left", - }; - } else { - return { ...item }; } - }); + }; + const newColumns = _.map([...slideColumns], (item) => ({ ...item })); const rowSelection = { selectedRowKeys: this.props.slideSelectedKey, - onChange: this.onSelectChange, + onChange: this.onSelectChange }; return (
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js index 584278c1..0c374c99 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js @@ -1,14 +1,7 @@ import React from "react"; -import { Row, Col, Table, DatePicker } from "antd"; +import { Col, DatePicker, Row } from "antd"; import { inject, observer } from "mobx-react"; -import { - WeaInput, - WeaTextarea, - WeaSearchGroup, - WeaSelect, - WeaTable, -} from "ecCom"; -import { slideColumns } from "./columns"; +import { WeaTable } from "ecCom"; import "./editSlideContent.less"; import moment from "moment"; @@ -22,7 +15,7 @@ let emptyItem = { taxableIncomeLl: "0.00", taxableIncomeUl: "0.00", taxRate: "0.00", - taxDeduction: "0.00", + taxDeduction: "0.00" }; @inject("cumSituationStore", "taxAgentStore") @@ -35,21 +28,21 @@ export default class EditSlideContent extends React.Component { startDate: "", endDate: "", editable: - this.props.editable === undefined ? "true" : this.props.editable, + this.props.editable === undefined ? "true" : this.props.editable }; } componentWillMount() { // 初始化渲染页面 const { - taxAgentStore: { fetchTaxAgentOption }, + taxAgentStore: { fetchTaxAgentOption } } = this.props; fetchTaxAgentOption(); } addItem() { const { - taxRateStore: { setDataSource }, + taxRateStore: { setDataSource } } = this.props; let dataSource = [...this.props.taxRateStore.dataSource]; let indexNum = 1; @@ -79,7 +72,7 @@ export default class EditSlideContent extends React.Component { declareMonth.push(endDate); } let item = { - taxAgentId: taxAgentId, + taxAgentId: taxAgentId }; if (declareMonth.length != 0) { item.taxYearMonth = declareMonth; @@ -94,7 +87,7 @@ export default class EditSlideContent extends React.Component { render() { const { - taxAgentStore: { taxAgentOption }, + taxAgentStore: { taxAgentOption } } = this.props; const { cumSituationStore } = this.props; const { @@ -104,7 +97,7 @@ export default class EditSlideContent extends React.Component { slidePageObj, slideTableDataSource, setSlidePageObj, - slideLoading, + slideLoading } = cumSituationStore; const { startDate, endDate, taxAgentId } = this.state; @@ -119,24 +112,14 @@ export default class EditSlideContent extends React.Component { setSlidePageObj({ ...slidePageObj, current, - pageSize: slidePageObj.pageSize, + pageSize: slidePageObj.pageSize }); - }, - }; - const newColumns = _.map([...slideColumns], (item) => { - if (item.dataIndex === "declareMonth") { - return { - ...item, - width: 120, - fixed: "left", - }; - } else { - return { ...item }; } - }); + }; + const newColumns = _.map([...slideColumns], (item) => ({ ...item })); const rowSelection = { selectedRowKeys: this.props.slideSelectedKey, - onChange: this.onSelectChange, + onChange: this.onSelectChange }; return (
@@ -213,7 +196,7 @@ export default class EditSlideContent extends React.Component { dataSource={slideTableDataSource} pagination={pagination} loading={slideLoading} - scroll={{ x: newColumns ? newColumns.length * 150 : 900}} + scroll={{ x: newColumns ? newColumns.length * 150 : 900 }} />
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js index dcb1709d..3079fa7b 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js @@ -122,17 +122,7 @@ export default class EditSlideContent extends React.Component { }); }, }; - const newColumns = _.map([...slideColumns], (item) => { - if (item.dataIndex === "declareMonth") { - return { - ...item, - width: 120, - fixed: "left", - }; - } else { - return { ...item }; - } - }); + const newColumns = _.map([...slideColumns], (item) => ({ ...item })); const rowSelection = { selectedRowKeys: this.props.slideSelectedKey, onChange: this.onSelectChange, From d09230b2ca7fc125d8799f33c7897685c25e7347 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 2 Nov 2022 09:49:03 +0800 Subject: [PATCH 28/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/addItems.js | 2 +- .../dataAcquisition/cumSituation/columns.js | 63 +++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js index 751934a9..836fb1a8 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js @@ -44,7 +44,7 @@ class AddItems extends Component { }) fields.map(item => { nextProps.form.updateFields({ - [item]: nextProps.editId[item] + [item]: nextProps.editId[item] || '' }) }) } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index ce99e24c..0f825cfd 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -231,6 +231,60 @@ export const dataCollectCondition = [ value: "", viewAttr: 2 }, + { + conditionType: "INPUT", + domkey: ["addUpChildEducation"], + fieldcol: 14, + label: "累计子女教育", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpContinuingEducation"], + fieldcol: 14, + label: "累计继续教育", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpHousingLoanInterest"], + fieldcol: 14, + label: "累计住房贷款利息", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpHousingRent"], + fieldcol: 14, + label: "累计住房租金", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpSupportElderly"], + fieldcol: 14, + label: "累计赡养老人", + labelcol: 8, + value: "", + viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpIllnessMedical"], + fieldcol: 14, + label: "累计大病医疗", + labelcol: 8, + value: "", + viewAttr: 2 + }, { conditionType: "INPUT", domkey: ["addUpEnterpriseAndOther"], @@ -284,6 +338,15 @@ export const dataCollectCondition = [ labelcol: 8, value: "", viewAttr: 2 + }, + { + conditionType: "INPUT", + domkey: ["addUpInfantCare"], + fieldcol: 14, + label: "累计婴幼儿照护", + labelcol: 8, + value: "", + viewAttr: 2 } ], title: "数据采集", From 66debb47087afcbdaa062623820f7edbe7c645a6 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 2 Nov 2022 10:41:12 +0800 Subject: [PATCH 29/40] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=20=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/dataAcquisition/cumDeduct/index.js | 22 +++++++++---------- .../dataAcquisition/cumSituation/columns.js | 4 ---- .../dataAcquisition/cumSituation/index.js | 20 ++++++++--------- .../dataAcquisition/otherDeduct/index.js | 20 ++++++++--------- 4 files changed, 31 insertions(+), 35 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index b345f310..f3861c66 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -274,7 +274,7 @@ export default class CumDeduct extends React.Component { const { editId } = this.state; this.setState({ saveLoading: true }); if (!_.isEmpty(editId)) { - API.editAddUpDeduction({ ...payload, id: editId.id }).then(({ status }) => { + API.editAddUpDeduction({ ...payload, id: editId.id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("编辑成功"); @@ -291,11 +291,11 @@ export default class CumDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("编辑成功"); + message.error(errormsg || "编辑失败"); } }); } else { - API.createAddUpDeduction(payload).then(({ status }) => { + API.createAddUpDeduction(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("新增成功"); @@ -312,7 +312,7 @@ export default class CumDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("新增失败"); + message.error(errormsg || "新增失败"); } }); } @@ -332,7 +332,7 @@ export default class CumDeduct extends React.Component { title: "信息确认", content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", onOk: () => { - API.deleteSelectAddUpDeduction(payload).then(({ status }) => { + API.deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -340,7 +340,7 @@ export default class CumDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); }, @@ -360,7 +360,7 @@ export default class CumDeduct extends React.Component { title: "信息确认", content: `确定清空税款所属期为${declareMonth}的所有累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteAllAddUpDeduction(payload).then(({ status }) => { + API.deleteAllAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -368,7 +368,7 @@ export default class CumDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -396,7 +396,7 @@ export default class CumDeduct extends React.Component { title: "信息确认", content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteSelectAddUpDeduction(payload).then(({ status }) => { + API.deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -404,7 +404,7 @@ export default class CumDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -533,7 +533,7 @@ export default class CumDeduct extends React.Component { this.setState({ addVisible: true, editId: {} - },()=>addForm.resetForm()); + }, () => addForm.resetForm()); }}> 新建 , diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index 0f825cfd..45fab4e4 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -355,10 +355,6 @@ export const dataCollectCondition = [ ]; export const taxOptions = [ - { - key: "", - showname: "" - }, { key: "01", showname: "一月", diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index be8a4c86..98a90fa4 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -265,7 +265,7 @@ export default class CumSituation extends React.Component { const { editId } = this.state; this.setState({ saveLoading: true }); if (!_.isEmpty(editId)) { - API.editAddUpSituation({ ...payload, id: editId.id }).then(({ status }) => { + API.editAddUpSituation({ ...payload, id: editId.id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("编辑成功"); @@ -278,11 +278,11 @@ export default class CumSituation extends React.Component { addForm.resetForm(); }); } else { - message.error("编辑失败"); + message.error(errormsg || "编辑失败"); } }); } else { - API.createAddUpSituation(payload).then(({ status }) => { + API.createAddUpSituation(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("新增成功"); @@ -295,7 +295,7 @@ export default class CumSituation extends React.Component { addForm.resetForm(); }); } else { - message.error("新增失败"); + message.error(errormsg || "新增失败"); } }); } @@ -321,12 +321,12 @@ export default class CumSituation extends React.Component { title: "信息确认", content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的往期累计情况数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteSelectAddUpSituation(payload).then(({ status }) => { + API.deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); this.handleSearch(); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -347,12 +347,12 @@ export default class CumSituation extends React.Component { title: "信息确认", content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", onOk: () => { - API.deleteSelectAddUpSituation(payload).then(({ status }) => { + API.deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); this.handleSearch(); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); }, @@ -370,12 +370,12 @@ export default class CumSituation extends React.Component { title: "信息确认", content: `确定清空税款所属期为${declareMonth}的所有往期累计情况的数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteAllAddUpSituation(payload).then(({ status }) => { + API.deleteAllAddUpSituation(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); this.handleSearch(); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js index ca12c043..4534eafa 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js @@ -245,7 +245,7 @@ export default class OtherDeduct extends React.Component { const { editId }= this.state; this.setState({ saveLoading: true }); if (!_.isEmpty(editId)) { - API.editData({ ...payload, id: editId.id }).then(({ status }) => { + API.editData({ ...payload, id: editId.id }).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("编辑成功"); @@ -262,11 +262,11 @@ export default class OtherDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("编辑失败"); + message.error(errormsg || "编辑失败"); } }); } else { - API.createData(payload).then(({ status }) => { + API.createData(payload).then(({ status, errormsg }) => { this.setState({ saveLoading: false }); if (status) { message.success("新增成功"); @@ -283,7 +283,7 @@ export default class OtherDeduct extends React.Component { addForm.resetForm(); }); } else { - message.error("新增失败"); + message.error(errormsg || "新增失败"); } }); } @@ -310,7 +310,7 @@ export default class OtherDeduct extends React.Component { title: "信息确认", content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteSelectData(payload).then(({ status }) => { + API.deleteSelectData(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -318,7 +318,7 @@ export default class OtherDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } @@ -340,7 +340,7 @@ export default class OtherDeduct extends React.Component { title: "信息确认", content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。", onOk: () => { - API.deleteSelectData(payload).then(({ status }) => { + API.deleteSelectData(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -348,7 +348,7 @@ export default class OtherDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); }, @@ -368,7 +368,7 @@ export default class OtherDeduct extends React.Component { title: "信息确认", content: `确定清空税款所属期为${declareMonth}的所有其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`, onOk: () => { - API.deleteAllData(payload).then(({ status }) => { + API.deleteAllData(payload).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); doSearch({ @@ -376,7 +376,7 @@ export default class OtherDeduct extends React.Component { taxAgentId: taxAgentId === "All" ? "" : taxAgentId }); } else { - message.error("删除失败"); + message.error(errormsg || "删除失败"); } }); } From 0110c3d19c42b6263e285ba3455cb30098f95bf7 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Wed, 2 Nov 2022 13:44:24 +0800 Subject: [PATCH 30/40] =?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=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=8C=89=E9=92=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/taxAgent/editModal.js | 6 ++++-- pc4mobx/hrmSalary/pages/taxAgent/index.js | 19 +++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/taxAgent/editModal.js b/pc4mobx/hrmSalary/pages/taxAgent/editModal.js index 34fd1bf0..687ca334 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/editModal.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/editModal.js @@ -103,7 +103,8 @@ export default class EditModal extends React.Component { saveloading, onClose, onChangeTab, - taxAgentStore + taxAgentStore, + isChief } = this.props; const { form } = taxAgentStore; return ( @@ -118,7 +119,8 @@ export default class EditModal extends React.Component {
{title}
- {editType !== "set" && ( + {/*总管理权限*/} + {(editType !== "set" && isChief) && (
; break; From 985eb1edb01b7126e981bce038b095714044c3b4 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Thu, 3 Nov 2022 20:38:57 +0800 Subject: [PATCH 34/40] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/calculate/baseFormModal.js | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js index 44761173..49f9c212 100644 --- a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js +++ b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js @@ -1,5 +1,5 @@ import React from "react"; -import { Button, Col, message, Row } from "antd"; +import { Button, Col, Row } from "antd"; import { inject, observer } from "mobx-react"; import { WeaDatePicker, WeaDialog, WeaError, WeaInput, WeaSelect } from "ecCom"; import { notNull } from "../../util/validate"; @@ -16,7 +16,8 @@ export default class baseFormModal extends React.Component { inited: false, selectOptions: [], salarySob: "", - description: "" + description: "", + loading: false }; } @@ -52,12 +53,15 @@ export default class baseFormModal extends React.Component { description: this.state.description }; const { calculateStore: { saveBasic } } = this.props; - + this.setState({ loading: true }); saveBasic(params).then((id) => { + this.setState({ loading: false }); this.props.onCancel(); this.props.onRefresh(); window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/calculateDetail?id=" + id); - }); + }).catch(()=>{ + this.setState({ loading: false }); + }) } validate() { @@ -77,7 +81,7 @@ export default class baseFormModal extends React.Component { } render() { - const { description } = this.state; + const { description, loading } = this.state; return ( { this.props.onCancel(); }} - buttons={[]} + buttons={[ + + ]} > 薪酬所属月 @@ -106,7 +116,7 @@ export default class baseFormModal extends React.Component { viewAttr={3} value={this.state.salaryMonthStr} onChange={value => { - if(value === '') this.refs.weaError.showError(); + if (value === "") this.refs.weaError.showError(); this.setState({ salaryMonthStr: value }); @@ -130,8 +140,8 @@ export default class baseFormModal extends React.Component { viewAttr={3} options={this.state.selectOptions} onChange={(value) => { - if(value === '') this.refs.weaError1.showError(); - this.handleSelectChange(value) + if (value === "") this.refs.weaError1.showError(); + this.handleSelectChange(value); }} value={this.state.salarySob} style={{ width: "100%" }}/> From 459ec32c68a48e158588138af530269bc3f3e8ad Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Thu, 3 Nov 2022 21:03:33 +0800 Subject: [PATCH 35/40] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archives/accumulationFundForm.js | 19 ++++++++---------- .../archives/otherForm.js | 16 +++++++-------- .../archives/socialSecurityForm.js | 20 ++++++------------- 3 files changed, 22 insertions(+), 33 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index a7465898..c3ba2ac6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -120,17 +120,14 @@ export default class AccumulationFundForm extends React.Component { 公积金个人实际承担方: - + { + this.handleFormChange({ underTake: value }); + }} + /> {/**/} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index c698478d..7b2a5c1f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -111,14 +111,14 @@ export default class OtherForm extends React.Component { 其他福利个人实际承担方: - + { + this.handleFormChange({ underTake: value }); + }} + /> {/**/} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 5007ef86..4712540f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -132,22 +132,14 @@ export default class SocialSecurityForm extends React.Component { {/**/} 社保个人实际承担方: - + onChange={(value) => { + this.handleFormChange({ underTake: value }); + }} + /> From 3390630d745e276b3c3e7d942b1de4e0e9cc1d93 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Fri, 4 Nov 2022 09:26:38 +0800 Subject: [PATCH 36/40] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=AD=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/TipLabel/index.less | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/components/TipLabel/index.less b/pc4mobx/hrmSalary/components/TipLabel/index.less index 7f8a20a0..addc7741 100644 --- a/pc4mobx/hrmSalary/components/TipLabel/index.less +++ b/pc4mobx/hrmSalary/components/TipLabel/index.less @@ -13,9 +13,7 @@ background-color: #f7fbfe; } .tipContentWrapper { - padding-bottom: 10px; - padding-left: 10px; - padding-right: 10px; + padding: 10px; } .tipContentItem { line-height: 20px; @@ -35,4 +33,4 @@ overflow: hidden; } -} \ No newline at end of file +} From ba11b69e310e7488b2c47b336e6d1b2bd2ff7d59 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Fri, 4 Nov 2022 13:51:41 +0800 Subject: [PATCH 37/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archives/accumulationFundForm.js | 9 +++++---- .../pages/socialSecurityBenefits/archives/otherForm.js | 7 ++++--- .../archives/socialSecurityForm.js | 6 ++++-- .../socialSecurityBenefits/programme/defaultSlideForm.js | 4 ++++ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index c3ba2ac6..f2c96c63 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Col, Row, Select } from "antd"; -import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom"; +import { Col, Row } from "antd"; +import { WeaCheckbox, WeaDatePicker, WeaInput, WeaInputNumber, WeaSelect } from "ecCom"; import GroupCard from "../../../components/groupCard"; import cs from "classnames"; import "./index.less"; @@ -159,13 +159,14 @@ export default class AccumulationFundForm extends React.Component { className={cs("formItem", "borderR-none")}>{item.label}: - { this.handlePaymentChange({ [item.domkey[0]]: value }); }} /> - diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index 7b2a5c1f..a4f87187 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -1,7 +1,7 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { Col, Row, Select } from "antd"; -import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom"; +import { WeaCheckbox, WeaDatePicker, WeaInputNumber, WeaSelect } from "ecCom"; import GroupCard from "../../../components/groupCard"; import "./index.less"; @@ -149,13 +149,14 @@ export default class OtherForm extends React.Component { {item.label}: - { this.handlePaymentChange({ [item.domkey[0]]: value }); }} /> - diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 4712540f..b6fb1103 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -1,7 +1,7 @@ import React from "react"; import GroupCard from "../../../components/groupCard"; import { Col, Row, Select } from "antd"; -import { WeaCheckbox, WeaDatePicker, WeaInput, WeaSelect } from "ecCom"; +import { WeaCheckbox, WeaDatePicker, WeaInput, WeaInputNumber, WeaSelect } from "ecCom"; import { inject, observer } from "mobx-react"; import cs from "classnames"; import "./index.less"; @@ -160,7 +160,9 @@ export default class SocialSecurityForm extends React.Component { "borderR-none": idx === 0 || idx === 2, "borderB-none": idx === 0 || idx === 2 || idx === 1 })}> - { this.handlePaymentChange({ [item.domkey[0]]: value }); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js index 2b04f02c..622e9929 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/defaultSlideForm.js @@ -105,6 +105,7 @@ export default class DefaultSlideForm extends React.Component { item.render = (text, record) => { return ( { @@ -117,6 +118,7 @@ export default class DefaultSlideForm extends React.Component { item.render = (text, record) => { return ( { @@ -129,6 +131,7 @@ export default class DefaultSlideForm extends React.Component { item.render = (text, record) => { return ( { @@ -141,6 +144,7 @@ export default class DefaultSlideForm extends React.Component { item.render = (text, record) => { return ( { From 926c9685b25333a97402f69fd05ae698385c92f2 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Fri, 4 Nov 2022 14:40:37 +0800 Subject: [PATCH 38/40] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archives/accumulationFundForm.js | 4 ++-- .../socialSecurityBenefits/archives/index.js | 16 +++++++++++----- .../socialSecurityBenefits/archives/otherForm.js | 4 ++-- .../archives/socialSecurityForm.js | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index f2c96c63..40a60d6c 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -162,9 +162,9 @@ export default class AccumulationFundForm extends React.Component { { - this.handlePaymentChange({ [item.domkey[0]]: value }); + this.handlePaymentChange({ [item.domkey[0]]: String(value) }); }} /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 53c9f651..a862556e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -480,16 +480,22 @@ export default class Archives extends React.Component { render() { const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props; - const { selectedTab, selectedRowKeys, selectedKey, dataSource: dataSourceActive, pageInfo, tabCount } = this.state; const { - loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd, - previewCurDataColumns, previewCurDataDataSource, importResult, initImportParams + selectedTab, + selectedRowKeys, + selectedKey, + dataSource: dataSourceActive, + pageInfo, + tabCount, + loading + } = this.state; + const { + form, condition, showSearchAd, setShowSearchAd, + previewCurDataColumns, previewCurDataDataSource, importResult } = archivesStore; - const { dataSource } = archivesStore; if (_.isEmpty(this.getColumns())) { // 无权限处理 return renderLoading(); } - const rightMenu = [// 右键菜单 // { // key: 'BTN_COLUMN', diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index a4f87187..1ae6ccf6 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -152,9 +152,9 @@ export default class OtherForm extends React.Component { { - this.handlePaymentChange({ [item.domkey[0]]: value }); + this.handlePaymentChange({ [item.domkey[0]]: String(value) }); }} /> diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index b6fb1103..7226fe0e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -163,9 +163,9 @@ export default class SocialSecurityForm extends React.Component { { - this.handlePaymentChange({ [item.domkey[0]]: value }); + this.handlePaymentChange({ [item.domkey[0]]: String(value) }); }} /> From 12d6fc73cf92d0402c1587335e1166a7548be437 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Fri, 4 Nov 2022 15:56:49 +0800 Subject: [PATCH 39/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=88=87=E6=8D=A2tab=20bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialSecurityBenefits/archives/accumulationFundForm.js | 4 +++- .../pages/socialSecurityBenefits/archives/index.js | 6 +++--- .../pages/socialSecurityBenefits/archives/otherForm.js | 4 +++- .../socialSecurityBenefits/archives/socialSecurityForm.js | 4 +++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index 40a60d6c..85faec6e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -18,13 +18,15 @@ export default class AccumulationFundForm extends React.Component { // 表单变化 handleFormChange(params) { - const { archivesStore: { accumulationFundForm, setAccumulationFundForm, getPaymentForm } } = this.props; + const { archivesStore: { accumulationFundForm, setAccumulationFundForm }, onChangeRecordFundSchemeId } = this.props; const { data } = accumulationFundForm; let request = { ...data, ...params }; request.fundName = request.fundSchemeId; let form = { ...accumulationFundForm }; form.data = request; setAccumulationFundForm(form); + Object.keys(params).length>1 && + onChangeRecordFundSchemeId(params.fundSchemeId) } // 获取基数表单 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index a862556e..8dc5139c 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -752,14 +752,14 @@ export default class Archives extends React.Component { } { selectedTab == 1 && - + this.record= {...this.record,siSchemeId}}/> } { selectedTab == 2 && - + this.record= {...this.record,fundSchemeId}}/> } { - selectedTab == 3 && + selectedTab == 3 && this.record= {...this.record,otherSchemeId}}/> }
} onClose={() => this.setState({ editSlideVisible: false }, () => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index 1ae6ccf6..c60da390 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -31,12 +31,14 @@ export default class OtherForm extends React.Component { // 表单变化 handleFormChange(params) { - const { archivesStore: { otherForm, setOtherForm } } = this.props; + const { archivesStore: { otherForm, setOtherForm }, onChangeRecordOtherSchemeId } = this.props; const { data } = otherForm; let request = { ...data, ...params }; let form = { ...otherForm }; form.data = request; setOtherForm(form); + Object.keys(params).length>1 && + onChangeRecordOtherSchemeId(params.otherSchemeId) } //基数变化 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 7226fe0e..8e4ab2fb 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -20,12 +20,14 @@ export default class SocialSecurityForm extends React.Component { // 表单变化 handleFormChange(params) { - const { archivesStore: { socialSecurityForm, setSocialSecurityForm } } = this.props; + const { archivesStore: { socialSecurityForm, setSocialSecurityForm }, onChangeRecordSchemeId } = this.props; const { data } = socialSecurityForm; let request = { ...data, ...params }; let form = { ...socialSecurityForm }; form.data = request; setSocialSecurityForm(form); + Object.keys(params).length>1 && + onChangeRecordSchemeId(params.socialSchemeId) } // 获取基数表单 From 7a9672b8a41c9b0ba5b5f1912b7006596d3856d2 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 7 Nov 2022 14:03:45 +0800 Subject: [PATCH 40/40] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E4=BF=A1=E6=81=AF=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js index 3ed6ced7..03be2c76 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js @@ -48,7 +48,7 @@ export default class BaseForm extends React.Component { {baseFormData.telephone} - 离职时间: + 合同到期日期: {baseFormData.dimissionDate}