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/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/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/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/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/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/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/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}> - 取调整后薪资 - 分段计薪取调整后薪资 + 分段计薪 取调整前薪资 - 分段计薪分段计薪 { 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 &&
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js index 04103886..74dd4b0e 100644 --- a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -21,7 +21,13 @@ 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; + params.importType = ''; + } API.salaryArchivePreview(params).then(({ status, data }) => { if (status) { const { headers, list } = data; @@ -77,16 +83,22 @@ 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.importType = ''; + params.listType = this.state.importParams.importType; + } API.importSalaryArchive(params).then(({ status, data }) => { if (status) { data.errorData = data.errorNotice; @@ -103,6 +115,12 @@ class ImportMenu extends Component { render() { const { importType, refreshList } = this.props; const { importParams, previewColumns, previewDataSource } = this.state; + let params = ""; + if (importParams.importType === "init" || importParams.importType === "salaryItemAdjust") { + params = importParams.importType + "&listType=FIXED"; + } else { + params = "" + "&listType=" + importParams.importType; + } return ( @@ -134,8 +152,7 @@ class ImportMenu extends Component { previewImport={(params) => this.salaryArchivePreview(params)} importFile={(params) => this.handleImportFile(params)} templateLink={ - "/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" + - importParams.importType + "/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" + params } visiable={importParams.visible} onCancel={() => { diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js index 5ee14399..bee13a3e 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: [] }); }}/> }> - , - }> - @@ -357,29 +350,20 @@ class Index extends Component { verticalAlign: "middle" }}/> , - , - it.id !== "salaryItemAdjust")} - refreshList={() => { - this.query(); - this.setState({ selectedRowKeys: [] }); - }}/> - }> - - , - }> - , + , + }> + @@ -396,13 +380,14 @@ class Index extends Component { }} /> }> - , - }> - @@ -415,29 +400,34 @@ 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" + // , 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){ + if (!showOperateBtn) { return ; - }else{ + } else { if (selectedKey === "pending") { return
this.handleEdit(record)}>编辑 @@ -461,7 +451,7 @@ class Index extends Component { placement="bottomRight" content={ this.handleMenuClick(e, record.id)}> 停薪 - 删除待办 + {/*删除待办*/} } title=""> @@ -483,7 +473,8 @@ class Index extends Component { } }; } - return { ...item, width: item.oldWidth }; + // , width: item.oldWidth + return { ...item }; }); }; handleEdit = (record) => { @@ -563,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: "必要信息不完整,红色*为必填项!" @@ -734,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 }} /> +
+ this.importRef = dom} + refreshList={() => { + this.query(); + this.setState({ selectedRowKeys: [] }); + }}/> +
{slideParams.visible && ( { - 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, + progress: 0 + }, () => { + 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({ + progress: 100 + }, () => { + this.setState({ + progressVisible: false + }); + }); + message.success("保存成功"); + } else if (progress_statue === "in_progress" && this.timer) { + if (this.state.progress >= 90) { + this.setState({ + progress: this.state.progress + (0.001 * this.state.progress) + }); + } else { + this.setState({ + progress: 10 * number + }, () => number++); + } + } else if (!status || (progress_statue === "fail" && this.timer)) { + clearInterval(this.timer); + this.timer = null; + number = 1; + this.setState({ + progress: 100 + }, () => { + this.setState({ + progressVisible: false + }); + }); + 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: () => { } }); } @@ -249,16 +270,17 @@ class Index extends Component { title={
人员校验规则 - +
} showGroup center items={importItems}/> - {/**/} - {/* 加密规则*/} - {/* */} - {/*
*/} - {/* } showGroup center items={enctryItems}/>*/} + + 加密规则 + +
+ } showGroup center items={enctryItems}/> { this.state.progressVisible && 公积金方案名称: - { - 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 016cea47..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"; @@ -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); } // 表单变化 @@ -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); } //基数变化 @@ -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 349ea720..2f45ede4 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: "lowerLimit", + key: "lowerLimit" + }, + { + title: "基数上限", + dataIndex: "upperLimit", + key: "upperLimit" + }, + { + title: "缴纳比例%", + dataIndex: "paymentProportion", + key: "paymentProportion" + }, + { + title: "固定费用", + dataIndex: "fixedCost", + key: "fixedCost" + }, + { + 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..2b04f02c 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 { WeaSelect, WeaInput, WeaTable, WeaInputNumber } from "ecCom"; +import { Row, Col, Switch } from "antd"; import { insertUpdateColumns } from "./columns"; import { inject, observer } from "mobx-react"; import SmallTab from "../../../components/smallTab"; @@ -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"); @@ -123,6 +125,30 @@ 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"); + }} + /> + ); + }; } }); } @@ -138,20 +164,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); + } } } @@ -167,10 +208,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: "", @@ -190,13 +228,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 ( diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index 8f7c1585..c6deee37 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -94,7 +94,6 @@ export default class Programme extends React.Component { } }); newColumns.push({ - title: "", key: "moreOperate", dataIndex: "moreOperate", render: (text, record) => { @@ -121,7 +120,12 @@ export default class Programme extends React.Component { }> - + + + + ); } @@ -224,7 +228,7 @@ export default class Programme extends React.Component { } } - onCustomEdit=(record)=> { + onCustomEdit = (record) => { const { programmeStore: { getCustomForm, setCustomNewVisible, setCustomRequest }, taxAgentStore: { showOperateBtn } @@ -242,10 +246,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 +409,6 @@ export default class Programme extends React.Component { ...defaultCompanyDataSource ] }; - if (currentOperate == "add") { createScheme(request).then(res => { if (res.status) this.setState({ slideVisiable: false }); @@ -538,7 +541,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={"%"} @@ -554,13 +557,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/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index bbb547ad..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 } = @@ -313,19 +307,36 @@ export default class StandingBook extends React.Component { handleOk = (formVal) => { const { save } = this.props.standingBookStore; const { billMonth, ...extra } = formVal; - console.log("extra:", extra); const payload = { billMonth: moment(billMonth).format("YYYY-MM"), ...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 : ""); }); }; @@ -493,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 && ( { + current: 1 + }, () => { const { current } = this.state; nextProps.selectedKey === "1" ? this.getNormalList({ billMonth, current, paymentOrganization }) @@ -75,7 +77,7 @@ export default class NormalIndex extends Component { current, paymentOrganization }); - }) + }); } } @@ -280,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 }); }); @@ -493,7 +495,7 @@ export default class NormalIndex extends Component { selectedKey === "1" && } @@ -508,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 } })} + /> } {/*导入弹框*/} @@ -524,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" @@ -538,8 +543,11 @@ export default class NormalIndex extends Component { } - + + paymentOrganization={this.paymentOrganization} location={this.props.location}/> } { selectedKey === "2" && 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) && (