From 6768649ac43373a45bbcf8603ae59bd0bddab4fa Mon Sep 17 00:00:00 2001 From: liyongshun <971387674@qq.com> Date: Thu, 25 Aug 2022 17:54:18 +0800 Subject: [PATCH] =?UTF-8?q?bug=E7=9A=84=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/archive.js | 4 + .../components/importModal/modalStep2.js | 44 ++- .../importModal/acctResultImportModal.js | 4 +- .../importModal/selectFieldModal.js | 369 +++++++++++------- .../hrmSalary/pages/calculateDetail/index.js | 5 +- .../pages/calculateDetail/salaryDetail.js | 7 +- .../pages/calculateDetail/userSure.js | 6 +- .../dataAcquisition/cumSituation/columns.js | 15 +- pc4mobx/hrmSalary/pages/ledger/index.js | 15 +- pc4mobx/hrmSalary/pages/ledger/index.less | 12 + .../hrmSalary/pages/ledger/salaryItemForm.js | 12 +- .../hrmSalary/pages/ledger/slideRefereUser.js | 63 ++- .../pages/ledger/step3/canMoveItem.js | 62 ++- .../pages/ledger/step4/RuleEditModal.js | 4 +- pc4mobx/hrmSalary/pages/salaryFile/index.js | 58 ++- .../pages/salaryFile/saralyFileViewSlide.js | 247 ++++++------ pc4mobx/hrmSalary/pages/salaryItem/options.js | 7 +- .../archives/otherForm.js | 63 +-- .../archives/socialSecurityForm.js | 2 +- .../programme/defaultSlideForm.js | 60 ++- .../socialSecurityBenefits/programme/index.js | 101 ++--- pc4mobx/hrmSalary/stores/ledger.js | 7 +- pc4mobx/hrmSalary/stores/programme.js | 64 +-- pc4mobx/hrmSalary/stores/salaryFile.js | 13 +- 24 files changed, 760 insertions(+), 484 deletions(-) diff --git a/pc4mobx/hrmSalary/apis/archive.js b/pc4mobx/hrmSalary/apis/archive.js index 8e36b859..4a568959 100644 --- a/pc4mobx/hrmSalary/apis/archive.js +++ b/pc4mobx/hrmSalary/apis/archive.js @@ -139,6 +139,10 @@ export const getImportTypes = () => { export const commonEnumList = (params) => { return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params); } +// 发起调薪地址 +export const salaryAdjustmentInfo = (params) => { + return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', params); +} // 导入预览 export const importPreview = (params) => { diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep2.js b/pc4mobx/hrmSalary/components/importModal/modalStep2.js index d6b343a6..dc2cdefa 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep2.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep2.js @@ -1,24 +1,26 @@ -import React from 'react' -import { Table, Button } from 'antd' -import { WeaTable } from "ecCom" +import React from "react"; +import { Button } from "antd"; +import { WeaTable } from "ecCom"; export default class ModalStep2 extends React.Component { - componentWillMount() { - this.props.onPreviewDate(); - } - render() { - const {dataSource, columns} = this.props; - return ( -
-
- -
-
- - -
-
- ) - } -} \ No newline at end of file + componentWillMount() { + this.props.onPreviewDate(); + } + + render() { + const { dataSource, columns } = this.props; + return ( +
+
+ +
+
+ + +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js index 5e344002..33eed951 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/acctResultImportModal.js @@ -31,12 +31,12 @@ export default class AcctResultImportModal extends React.Component { // 获取模板 handleAccResultTemplateLink() { - const { calculateStore: { getImportTemplate } } = this.props; if (_.isEmpty(this.state.modalParam.salaryItemIds)) { message.warning("请选择表单字段"); return; } - getImportTemplate(this.state.modalParam.salaryItemIds, this.state.modalParam.salaryAcctRecordId); + const url= `${window.location.origin}/api/bs/hrmsalary/salaryacct/acctresult/importtemplate/export?salaryItemIds=${this.state.modalParam.salaryItemIds}&salaryAcctRecordId=${this.state.modalParam.salaryAcctRecordId}`; + window.open(url, "_self"); } // 设置步骤 diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js index 5109d9d0..b22122cb 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/acctResult/importModal/selectFieldModal.js @@ -1,165 +1,232 @@ -import React from 'react' -import { Modal, Row, Col, Button } from 'antd' -import { inject, observer } from 'mobx-react'; -import { WeaCheckbox } from 'ecCom' +import React from "react"; +import { Button, Col, Modal, Row } from "antd"; +import { inject, observer } from "mobx-react"; +import { WeaCheckbox } from "ecCom"; -@inject('calculateStore') +@inject("calculateStore") @observer export default class SelectFieldModal extends React.Component { - constructor(props) { - super(props) - this.state = { - fieldData: {} + constructor(props) { + super(props); + this.state = { + fieldData: {} + }; + } + + componentWillMount() { + const { calculateStore: { getImportField } } = this.props; + getImportField(this.props.id).then(data => { + let fieldData = {}; + let formulaItems = []; + formulaItems = data.formulaItems; + if (this.props.fieldData.formulaItems) { + formulaItems = this.props.fieldData.formulaItems; + } + let inputItems = []; + inputItems = data.inputItems; + if (this.props.fieldData.inputItems) { + inputItems = this.props.fieldData.inputItems; + } + let sqlItems = []; + sqlItems = data.sqlItems; + if (this.props.fieldData.inputItems) { + sqlItems = this.props.fieldData.sqlItems; + } + fieldData.formulaItems = formulaItems; + fieldData.inputItems = inputItems; + fieldData.sqlItems = sqlItems; + + this.setState({ + fieldData + }); + this.fieldData = fieldData; + }); + } + + // 公式项改变 + handleFormalChange(item, value, flag) { + item.checked = value == 1 ? true : false; + let fieldData = { ...this.state.fieldData }; + if (flag === "formluma") { // 公式项 + fieldData.formulaItems.map(fieldItem => { + if (item.salaryItemId === fieldItem.salaryItemId) { + fieldItem.checked = item.checked; } - } - - componentWillMount() { - const {calculateStore: { getImportField } } = this.props; - getImportField(this.props.id).then(data => { - let fieldData = {}; - let formulaItems = [] - formulaItems = data.formulaItems - if(this.props.fieldData.formulaItems) { - formulaItems = this.props.fieldData.formulaItems - } - let inputItems = [] - inputItems = data.inputItems - if(this.props.fieldData.inputItems) { - inputItems = this.props.fieldData.inputItems - } - fieldData.formulaItems = formulaItems; - fieldData.inputItems = inputItems; - - this.setState({ - fieldData - }) - this.fieldData = fieldData - }) - } - - // 公式项改变 - handleFormalChange(item, value, flag) { - item.checked = value == 1 ? true: false - let fieldData = {...this.state.fieldData} - if(flag) { // 公式项 - fieldData.formulaItems.map(fieldItem => { - if(item.salaryItemId == fieldItem.salaryItemId) { - fieldItem.checked = item.checked - } - }) - } else { // 输入项 - fieldData.inputItems.map(fieldItem => { - if(item.salaryItemId == fieldItem.salaryItemId) { - fieldItem.checked = item.checked - } - }) + }); + } else if (flag === "inputs") { // 输入项 + fieldData.inputItems.map(fieldItem => { + if (item.salaryItemId === fieldItem.salaryItemId) { + fieldItem.checked = item.checked; } - this.setState({ - fieldData - }) - this.fieldData = fieldData - } - - // 添加按钮点击回调 - handleAddClick() { - this.props.onAdd(this.fieldData) - this.props.onCancel() - } - - // 标题checkbox点击 - handleTitleCheckboxChange(value, flag) { - let checked = value == 1 ? true: false - let fieldData = {...this.state.fieldData} - if(flag === 'formula') { - fieldData.formulaItems.map(fieldItem => { - fieldItem.checked = checked - }) - } else if(flag === "input") { - fieldData.inputItems.map(fieldItem => { - fieldItem.checked = checked - }) + }); + } else if (flag === "sql") { // sql项 + fieldData.sqlItems.map(fieldItem => { + if (item.salaryItemId === fieldItem.salaryItemId) { + fieldItem.checked = item.checked; } - this.setState({ - fieldData - }) + }); + } + this.setState({ + fieldData + }); + this.fieldData = fieldData; + } - this.fieldData = fieldData; + // 添加按钮点击回调 + handleAddClick() { + this.props.onAdd(this.fieldData); + this.props.onCancel(); + } + + // 标题checkbox点击 + handleTitleCheckboxChange(value, flag) { + let checked = value == 1 ? true : false; + let fieldData = { ...this.state.fieldData }; + if (flag === "formula") { + fieldData.formulaItems.map(fieldItem => { + fieldItem.checked = checked; + }); + } else if (flag === "input") { + fieldData.inputItems.map(fieldItem => { + fieldItem.checked = checked; + }); + } else if (flag === "sql") { + fieldData.sqlItems.map(fieldItem => { + fieldItem.checked = checked; + }); + } + this.setState({ + fieldData + }); + + this.fieldData = fieldData; + } + + // 只显示已选中 + showSelectedChange(value) { + let checked = value == 1 ? true : false; + let fieldData = { ...this.fieldData }; + if (checked) { + if (fieldData.formulaItems) { + fieldData.formulaItems = fieldData.formulaItems.filter(fieldItem => fieldItem.checked); + } + if (fieldData.inputItems) { + fieldData.inputItems = fieldData.inputItems.filter(fieldItem => fieldItem.checked); + } + if (fieldData.sqlItems) { + fieldData.sqlItems = fieldData.sqlItems.filter(fieldItem => fieldItem.checked); + } } - // 只显示已选中 - showSelectedChange(value) { - let checked = value == 1 ? true: false - let fieldData = {...this.fieldData} - if(checked) { - if(fieldData.formulaItems) { - fieldData.formulaItems = fieldData.formulaItems.filter(fieldItem => fieldItem.checked) - } - if(fieldData.inputItems) { - fieldData.inputItems = fieldData.inputItems.filter(fieldItem => fieldItem.checked) - } - } - - this.setState({ - fieldData - }) - } + this.setState({ + fieldData + }); + } + render() { + const { fieldData } = this.state; + return ( + { + this.props.onCancel(); + }} + footer={null} + > +
+ 添加表头字段 + +
+
+
+ { + this.handleTitleCheckboxChange(value, "formula"); + }}/> +
+
+ + {fieldData.formulaItems && fieldData.formulaItems.map(item => ( + + { + this.handleFormalChange(item, value, "formula"); + }}/> + ))} + +
+
- render() { - const { fieldData } = this.state; - return ( - { -this.props.onCancel() -}} - footer={null} - > -
- 添加表头字段 - -
-
-
- { -this.handleTitleCheckboxChange(value, "formula") -}}/> -
-
- - { fieldData.formulaItems && fieldData.formulaItems.map(item => ( - { - this.handleFormalChange(item, value, true) - }}/> - ))} - -
-
+
+
+ { + this.handleTitleCheckboxChange(value, "input"); + }}/> +
+
+ + {fieldData.inputItems && fieldData.inputItems.map(item => ( + + { + this.handleFormalChange(item, value, "input"); + }}/> + ))} + +
+
-
-
- { -this.handleTitleCheckboxChange(value, "input") -}}/> -
-
- - { fieldData.inputItems && fieldData.inputItems.map(item => ( - { - this.handleFormalChange(item, value, true) - }}/> - ))} - -
-
+
+
+ { + this.handleTitleCheckboxChange(value, "sql"); + }}/> +
+
+ + {fieldData.sqlItems && fieldData.sqlItems.map(item => ( + + { + this.handleFormalChange(item, value, "sql"); + }}/> + ))} + +
+
-
- { -this.showSelectedChange(value) -}}/> -
-
- ) - } -} \ No newline at end of file +
+ { + this.showSelectedChange(value); + }}/> +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index b93e0980..7bcad934 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -234,10 +234,7 @@ export default class CalculateDetail extends React.Component { } render() { - const { selectedKey, modalParam, acctResultImportVisiable, showSearchAd } = this.state; - const { calculateStore } = this.props; - const { calculateProgress } = calculateStore; - + const { selectedKey, acctResultImportVisiable, showSearchAd } = this.state; const menu = ( 导入 diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index f5eef357..c0cd6fb1 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -134,9 +134,10 @@ export default class SalaryDetail extends React.Component { 引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`} placement="topLeft" /> - { - this.setState({ visible: true }); - }}>校验异常:0 + {/*暂时隐藏*/} + {/* {*/} + {/* this.setState({ visible: true });*/} + {/*}}>校验异常:0*/}
公式= diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js index 65e960d1..1a47e1a9 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js @@ -16,7 +16,7 @@ export default class UserSure extends React.Component { employeeName: "", departmentIds: "", positionIds: "", - status: "" + status: 0 }, selectedKey: "0", selectedRowKeys: [], // table 选中项 @@ -96,9 +96,9 @@ export default class UserSure extends React.Component { wrapperCol={{ span: 18 }} > this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> + onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: Number(val) } })}/> ); }; diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js index 47a6fb4f..4fe10b63 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js @@ -134,27 +134,27 @@ export const modalColumns = [ key: 'addUpContinuingEducation', }, { - title: "累计住房租金", + title: "累计住房贷款利息", dataIndex: 'addUpHousingLoanInterest', key: 'addUpHousingLoanInterest', }, { - title: "累计赡养老人", + title: "累计住房租金", dataIndex: 'addUpHousingRent', key: 'addUpHousingRent', }, { - title: "累计企业(职业)年金及其他福利", + title: "累计赡养老人", dataIndex: 'addUpSupportElderly', key: 'addUpSupportElderly', }, { - title: "累计住房租金", + title: "累计企业(职业)年金及其他福利", dataIndex: 'addUpEnterpriseAndOther', key: 'addUpEnterpriseAndOther', }, { - title: "累计其他扣除", + title: "累计其他免税扣除", dataIndex: 'addUpOtherDeduction', key: 'addUpOtherDeduction', }, @@ -168,6 +168,11 @@ export const modalColumns = [ dataIndex: 'addUpAllowedDonation', key: 'addUpAllowedDonation', }, + { + title: "累计减免税额", + dataIndex: 'addUpTaxSavings', + key: 'addUpTaxSavings', + }, { title: "累计已预扣预缴税额", dataIndex: 'addUpAdvanceTax', diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index 4db4d6c2..f7504a42 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -42,19 +42,6 @@ export default class Ledger extends React.Component { getTableDatas({ name: value }); } - refereUser() { - this.setState({ - editSlideVisible: true, - selectedTab: 1 - }); - } - - onEdit() { - this.setState({ - editSlideVisible: true - }); - } - componentWillMount() { const { ledgerStore: { doInit }, @@ -538,7 +525,7 @@ export default class Ledger extends React.Component { tr > td { + padding: 10px 8px; + } + + .ant-table-thead th { + font-weight: 400; + border-bottom: 2px solid #e2ecf2; + background-color: #f7fbfe; + } +} diff --git a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js index bb2a6aa2..3a587be2 100644 --- a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js @@ -16,7 +16,8 @@ export default class SalaryItemForm extends React.Component { super(props); this.state = { addCategoryVisible: false, - previewVisible: false + previewVisible: false, + date: '' }; const { ledgerStore: { empFieldList } } = this.props; empFieldList(); @@ -41,6 +42,7 @@ export default class SalaryItemForm extends React.Component { } }); setItemGroups(groups); + this.setState({date: new Date()}) } // 薪资项目 @@ -112,8 +114,6 @@ export default class SalaryItemForm extends React.Component { const { ledgerStore: { itemGroups, - salaryItems, - empBrowserList, setAddCategoryVisible, addCategoryVisible, baseInfoRequest @@ -143,15 +143,12 @@ export default class SalaryItemForm extends React.Component { 预览
- {/*
- -
*/}
- 员工信息{" "} + 员工信息
- {itemGroups && diff --git a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js index 1d2e9ece..99119893 100644 --- a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js +++ b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js @@ -1,9 +1,9 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { Icon, Table, message, Modal } from "antd"; +import { Icon, message, Modal, Table } from "antd"; import { WeaInputSearch } from "ecCom"; -import { slideStep2Columns, dataSource } from "./columns"; import AddUserModal from "./addUserModal"; +import "./index.less"; @inject("ledgerStore") @observer @@ -15,6 +15,11 @@ export default class SlideRefereUser extends React.Component { selectedRowKeys: [], searchValue: "" }; + this.pageInfo = { + current: 1, + pageSize: 10, + total: 0 + }; } handleTabClick(tab) { @@ -63,7 +68,8 @@ export default class SlideRefereUser extends React.Component { onOk: () => { deleteLedgerPersonRange(this.state.selectedRowKeys); }, - onCancel: () => {} + onCancel: () => { + } }); }; @@ -79,12 +85,14 @@ export default class SlideRefereUser extends React.Component { if (includeType == 1) { getLedgerPersonRangeInclude({ salarySobId: salarySobId, - targetName: value + targetName: value, + ...this.pageInfo }); } else { getLedgerPersonRangeExclude({ salarySobId: salarySobId, - targetName: value + targetName: value, + ...this.pageInfo }); } }; @@ -92,11 +100,15 @@ export default class SlideRefereUser extends React.Component { render() { const { ledgerStore: { + loading, includeType, + salarySobId, userTableStore, addUserModalVisible, setAddUserModalVisible, - baseInfoRequest + baseInfoRequest, + getLedgerPersonRangeInclude, + getLedgerPersonRangeExclude } } = this.props; const { canEdit = "true" } = baseInfoRequest; @@ -122,8 +134,8 @@ export default class SlideRefereUser extends React.Component { this.handleTabClick(1); }}> 关联人员范围 - {" "} - {" "} | {" "}{" "} + + | { @@ -160,15 +172,46 @@ export default class SlideRefereUser extends React.Component { /> } -
+
`共 ${total} 条`, - current: userTableStore.pageNum + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.pageInfo = { ...this.pageInfo, current, pageSize }; + if (includeType == 1) { + getLedgerPersonRangeInclude({ + salarySobId: salarySobId, + ...this.pageInfo + }); + } else { + getLedgerPersonRangeExclude({ + salarySobId: salarySobId, + ...this.pageInfo + }); + } + }, + onChange: current => { + this.pageInfo = { ...this.pageInfo, current }; + if (includeType == 1) { + getLedgerPersonRangeInclude({ + salarySobId: salarySobId, + ...this.pageInfo + }); + } else { + getLedgerPersonRangeExclude({ + salarySobId: salarySobId, + ...this.pageInfo + }); + } + } }} /> diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js index 0da8b5bd..f5b7d72f 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js +++ b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js @@ -1,6 +1,6 @@ import React, { Fragment } from "react"; import { Icon, message, Modal } from "antd"; -import { WeaHelpfulTip, WeaTable } from "ecCom"; +import { WeaHelpfulTip, WeaTable, WeaCheckbox } from "ecCom"; import { slideStep3Columns } from "../columns"; import AddSalaryItemModal from "./AddSalaryItemModal"; import { inject, observer } from "mobx-react"; @@ -12,7 +12,7 @@ const helpContent = () => { return 1、新建薪资账套时,核算公式与【薪资项目管理】菜单一致;
2、取值方式为公式的薪资项目,核算公式显示为具体公式;点击公式可编辑公式,核算时,按照当前薪资项目的公式进行核算;
- 3、薪资账套内的薪资项目的取值方式的修改或公式的修改,都不影响【薪资项目管理】菜单的薪资项目取值方式或公式,只对当前账套生效;
+ 3、薪资账套内的薪资项目的公式或SQL的修改或公式的修改,都不影响【薪资项目管理】菜单的薪资项目取值方式或公式,只对当前账套生效;
; }; @@ -69,6 +69,34 @@ export default class CanMoveItem extends React.Component { this.title = ""; } + handleChangeItem= (value,id)=>{ + const { dataSource } = this.props; + let result = [...dataSource]; + this.props.onChange( + _.map(result, item => { + if(id === item.id){ + return { + ...item, + itemHide: String(value) + } + } + return {...item} + }) + ); + } + handleChangeAllItem= (value)=>{ + const { dataSource } = this.props; + let result = [...dataSource]; + this.props.onChange( + _.map(result, item => { + return { + ...item, + itemHide: String(value) + } + }) + ); + } + // 编辑公式 handleFormulaClick(formulaId, record) { this.formulaId = formulaId; @@ -90,7 +118,7 @@ export default class CanMoveItem extends React.Component { handleDelete = () => { const { selectedRowKeys } = this.state; if (selectedRowKeys.length == 0) { - message.warning("为选择任何条目"); + message.warning("未选择任何条目"); return; } Modal.confirm({ @@ -155,10 +183,13 @@ export default class CanMoveItem extends React.Component { sortedIndex, ledgerStore: { setAddItemVisible, addItemVisible, itemGroups = [] } } = this.props; + console.log(this.props.dataSource) + const checkValue= _.every(this.props.dataSource, it => it.itemHide && it.itemHide === '1' ) ? "1" : "0"; const { selectedRowKeys, formalModalVisible, - addCategoryVisible + addCategoryVisible, + columns } = this.state; const rowSelection = { selectedRowKeys, @@ -167,6 +198,27 @@ export default class CanMoveItem extends React.Component { disabled: !record.canDelete }) }; + console.log(checkValue) + + const newColumns= [...columns,{ + title: + { + this.handleChangeAllItem(value) + }} + /> + 隐藏 + , + dataIndex: 'itemHide', + key: 'itemHide', + render: (text,record) => { + this.handleChangeItem(value, record.id) + }} + />, + }] return (
@@ -253,7 +305,7 @@ export default class CanMoveItem extends React.Component { ({ index, moveRow: record diff --git a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js index edcf5363..a60abb6b 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/step4/RuleEditModal.js @@ -101,11 +101,11 @@ export default class RuleEditModal extends React.Component { this.props.onCancel(); }} className="rule-modal-wrapper" - footer={} + }}>保存]} >
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.js b/pc4mobx/hrmSalary/pages/salaryFile/index.js index 7a58edca..4dab4e91 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.js @@ -54,7 +54,8 @@ export default class SalaryFile extends React.Component { departmentIds: "", positionIds: "", userstatus: "", - archiveStatus: "" + archiveStatus: "", + taxAgentId: "" } }; this.pageInfo = { current: 1, pageSize: 10 }; @@ -116,9 +117,10 @@ export default class SalaryFile extends React.Component { ); }; Select = (value, key) => { - const { salaryFileStore } = this.props; - const { userstatus, archiveStatus } = this.state.searchItemsValue; + const { salaryFileStore, taxAgentStore } = this.props; + const { userstatus, archiveStatus, taxAgentId } = this.state.searchItemsValue; const { archiveStatusList, userStatusList } = salaryFileStore; + const { taxAgentAdminOption } = taxAgentStore; return ( this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> ); }; componentWillMount() { - const { - salaryFileStore: { doInit } - } = this.props; + const { salaryFileStore: { doInit }, taxAgentStore: { getTaxAgentSelectListAsAdmin } } = this.props; doInit({ ...this.state.searchItemsValue }); + getTaxAgentSelectListAsAdmin(); } // 设置导入步数 @@ -234,13 +238,23 @@ export default class SalaryFile extends React.Component { } // 查看 Slide 头部操作按钮 - renderEditSlideOperate() { - const { taxAgentStore: { showOperateBtn } } = this.props; + renderEditSlideOperate = () => { + const { taxAgentStore: { showOperateBtn }, salaryFileStore: { salaryIncreaseUrl, currentId } } = this.props; + const { isShow, url } = salaryIncreaseUrl; return (
- + { + showOperateBtn && isShow === "true" && + + } + { + showOperateBtn && + + } {/*暂时去掉调整个税扣缴义务人导入按钮*/} {/*{*/} {/* showOperateBtn &&*/} @@ -259,7 +273,7 @@ export default class SalaryFile extends React.Component { {/*}*/}
); - } + }; // table选中条目 onSelectChange = (selectedRowKeys) => { @@ -323,7 +337,8 @@ export default class SalaryFile extends React.Component { showSearchAd, getTableDatas, doSearch, - setShowSearchAd + setShowSearchAd, + setSalaryIncreaseUrl } = salaryFileStore; const { importType, @@ -500,7 +515,8 @@ export default class SalaryFile extends React.Component { { com: this.Browser("部门", "departmentIds") }, { com: this.Browser("岗位", "positionIds") }, { com: this.Select("人员状态", "userstatus") }, - { com: this.Select("档案状态", "archiveStatus") } + { com: this.Select("档案状态", "archiveStatus") }, + { com: this.Select("个税扣缴义务人", "taxAgentId") } ]; return ; }; @@ -701,9 +717,15 @@ export default class SalaryFile extends React.Component { /> } content={} - onClose={() => this.setState({ editSlideVisible: false })} + onClose={() => { + this.setState({ editSlideVisible: false }); + setSalaryIncreaseUrl({}); + }} showMask={true} - closeMaskOnClick={() => this.setState({ editSlideVisible: false })} + closeMaskOnClick={() => { + setSalaryIncreaseUrl({}); + this.setState({ editSlideVisible: false }); + }} /> )}
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js index 6bc09e65..e9817832 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js @@ -1,134 +1,135 @@ -import React from "react" -import { Row, Col } from 'antd' -import { WeaHelpfulTip, WeaSearchGroup } from 'ecCom' -import GroupCard from "../../components/groupCard" -import { inject, observer } from 'mobx-react'; -import "./index.less" -import SelectedTab from '../../components/selectedTab' +import React from "react"; +import { Col, Row } from "antd"; +import { WeaHelpfulTip, WeaSearchGroup } from "ecCom"; +import { inject, observer } from "mobx-react"; +import "./index.less"; +import SelectedTab from "../../components/selectedTab"; import SalaryItemChangeList from "./salaryItemChangeList"; import TaxAgentChangeList from "./taxAgentChangeList"; const selectedTabItems = [ - { - key: '0', - name: "薪资调整记录" - }, - {/*暂时去掉调整个税扣缴义务人导入按钮*/} - // { - // key: "1", - // name: "个税扣缴义务人调整记录" - // } -] + { + key: "0", + name: "薪资调整记录" + }, + {/*暂时去掉调整个税扣缴义务人导入按钮*/ } + // { + // key: "1", + // name: "个税扣缴义务人调整记录" + // } +]; -@inject('salaryFileStore') +@inject("salaryFileStore") @observer export default class SalaryFileViewSlide extends React.Component { - constructor(props) { - super(props) - this.state = { - baseInfoVisible: true, - salaryItemVisible: true, - selectedTab: "0" + constructor(props) { + super(props); + this.state = { + baseInfoVisible: true, + salaryItemVisible: true, + selectedTab: "0", + }; + } + + componentWillMount() { + const { salaryFileStore: { getArchiveForm, fetchSingleSalaryItemList, salaryAdjustmentInfo } } = this.props; + getArchiveForm(this.props.id); + fetchSingleSalaryItemList({ salaryArchiveId: this.props.id }); + salaryAdjustmentInfo() + } + + // tab页签切换回调 + handleTabChange(item) { + this.setState({ selectedTab: item.key }); + } + + render() { + const { salaryFileStore: { detailForm } } = this.props; + const { baseInfo, adjustSalaryItems } = detailForm; + return ( +
+ { + this.setState({ baseInfoVisible: value }); + }}/> + { + this.state.baseInfoVisible &&
+ +
+ + 姓名 + {baseInfo && baseInfo.employee && baseInfo.employee.username} + + + + + 部门 + {baseInfo && baseInfo.employee && baseInfo.employee.department} + + + + + 岗位 + {baseInfo && baseInfo.employee && baseInfo.employee.position} + + + + + + + + 入职时间 + {baseInfo && baseInfo.employee && baseInfo.employee.hiredate} + + + + + 手机号 + {baseInfo && baseInfo.employee && baseInfo.employee.mobile} + + + + + 个税扣缴义务人 + {baseInfo && baseInfo.employee && baseInfo.employee.taxAgent} + + + + } - } - - componentWillMount() { - const { salaryFileStore: {getArchiveForm, fetchSingleSalaryItemList} } = this.props; - getArchiveForm(this.props.id) - fetchSingleSalaryItemList({salaryArchiveId: this.props.id}) - } - - // tab页签切换回调 - handleTabChange(item) { - this.setState({ selectedTab: item.key}) - } - - render() { - const { salaryFileStore: {detailForm} } = this.props; - const { baseInfo, adjustSalaryItems } = detailForm; - return ( -
- { -this.setState({baseInfoVisible: value}) -}}/> - { - this.state.baseInfoVisible &&
- -
- - 姓名 - {baseInfo && baseInfo.employee && baseInfo.employee.username} - - - - - 部门 - {baseInfo && baseInfo.employee && baseInfo.employee.department} - - - - - 岗位 - {baseInfo && baseInfo.employee && baseInfo.employee.position} - - - - - - - - 入职时间 - {baseInfo && baseInfo.employee && baseInfo.employee.hiredate} - - - - - 手机号 - {baseInfo && baseInfo.employee && baseInfo.employee.mobile} - - - - - 个税扣缴义务人 - {baseInfo && baseInfo.employee && baseInfo.employee.taxAgent} - - - - - } - - 薪资档案 } items={[]} onVisibleChange={(value) => { -this.setState({salaryItemVisible: value}) -}}/> - { - this.state.salaryItemVisible &&
- { - adjustSalaryItems && adjustSalaryItems.map(item => ( -
-
{item.name}
-
{item.value}
-
- )) - } -
- } - - { -this.handleTabChange(item) -}}/>} items={[]} onVisibleChange={(value) => { -this.setState({salaryItemVisible: value}) -}}/> - { - this.state.selectedTab == "0" ? : - } -
+ 薪资档案 } items={[]} onVisibleChange={(value) => { + this.setState({ salaryItemVisible: value }); + }}/> + { + this.state.salaryItemVisible &&
+ { + adjustSalaryItems && adjustSalaryItems.map(item => ( +
+
{item.name}
+
{item.value}
-
- ) - } + )) + } +
+ } + + { + this.handleTabChange(item); + }}/>} items={[]} onVisibleChange={(value) => { + this.setState({ salaryItemVisible: value }); + }}/> + { + this.state.selectedTab == "0" ? : + + } +
+ +
+ + ); + } } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/options.js b/pc4mobx/hrmSalary/pages/salaryItem/options.js index 64fed561..1d7d0521 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/options.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/options.js @@ -18,6 +18,11 @@ export const roundingModeOptions = [ key: "4", selected: false, showname: "向下舍入" + }, + { + key: "5", + selected: false, + showname: "见分进角" } ]; @@ -65,4 +70,4 @@ export const dataTypeOptions = [ showname: "字符", selected: false }, -] \ No newline at end of file +] diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index 7514c06e..f5815e01 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -109,7 +109,7 @@ export default class OtherForm extends React.Component { } -
社保个人实际承担方: + 其他福利个人实际承担方: