diff --git a/pc4mobx/hrmSalary/apis/payrollFiles.js b/pc4mobx/hrmSalary/apis/payrollFiles.js new file mode 100644 index 00000000..cd60d850 --- /dev/null +++ b/pc4mobx/hrmSalary/apis/payrollFiles.js @@ -0,0 +1,55 @@ +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; + +//获取薪资档案各tab的人数 +export const queryTabTotal = (params) => { + return WeaTools.callApi("/api/bs/hrmsalary/salaryArchive/queryTabTotal", "GET", params); +}; +//待定薪列表 +export const queryList = ({ url, ...params }) => { + return postFetch(url, params); +}; +// 导入档案 +export const importSalaryArchive = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/importSalaryArchive', params); +} +// 薪资档案预览 +export const salaryArchivePreview = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/preview', params); +} +// 公共枚举接口 +export const commonEnumList = (params) => { + return WeaTools.callApi('/api/bs/hrmsalary/common/enum/list', 'GET', params); +} +// 获取导入类型 +export const getImportTypes = () => { + return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getImportTypes', 'GET', {}); +} +// 发起调薪地址 +export const salaryAdjustmentInfo = (params) => { + return WeaTools.callApi('/api/bs/hrmsalary/process/salaryAdjustmentInfo', 'GET', params); +} +// 停薪 +export const stopSalary = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/stopSalary', params); +} +// 一键全部设为定薪员工 +export const allGotoFixed = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoFixed', params); +} +// 设为定薪员工 +export const gotoFixed = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/gotoFixed', params); +} +// 停薪 +export const gotoStop = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/gotoStop', params); +} +//全部停薪 +export const allGotoStop = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/allGotoStop', params); +} +// 取消停薪 +export const cancelStop = (params) => { + return postFetch('/api/bs/hrmsalary/salaryArchive/cancelStop', params); +} diff --git a/pc4mobx/hrmSalary/apis/ruleconfig.js b/pc4mobx/hrmSalary/apis/ruleconfig.js index 8fdd9c9a..09f8ebba 100644 --- a/pc4mobx/hrmSalary/apis/ruleconfig.js +++ b/pc4mobx/hrmSalary/apis/ruleconfig.js @@ -31,3 +31,7 @@ export const queryAppsetting = (params) => { export const saveEncryptSetting = (params) => { return postFetch('/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting', params); } +//获取加密进度条 +export const getEncryptProgress = params => { + return WeaTools.callApi('/api/bs/hrmsalary/sys/app/getEncryptProgress', 'GET', params); +} diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js index c25281de..31a26441 100644 --- a/pc4mobx/hrmSalary/apis/welfareArchive.js +++ b/pc4mobx/hrmSalary/apis/welfareArchive.js @@ -1,4 +1,5 @@ import { WeaTools } from 'ecCom'; +import { postFetch } from "../util/request"; export const tips = params => { return WeaTools.callApi('/api/bs/hrmsalary/archives/tips', 'get', params); @@ -8,13 +9,25 @@ export const getCondition = params => { return WeaTools.callApi('/api/bs/hrmsalary/archives/getSearchCondition', 'get', params); }; +//社保福利档案列表 +export const queryList = (params) => { + return postFetch('/api/bs/hrmsalary/archives/getTable', params); +}; +//社保福利档案列表 +export const queryInsuranceTabTotal = (params) => { + return WeaTools.callApi('/api/bs/hrmsalary/archives/queryInsuranceTabTotal', params); +}; +//删除待办 +export const updateRunStatus = (params) => { + return postFetch('/api/bs/hrmsalary/archives/updateRunStatus', params); +}; export const getTable = params => { return fetch('/api/bs/hrmsalary/archives/getTable', { method: 'POST', mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.json()) }; @@ -34,7 +47,7 @@ export const save = params => { mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.json()) }; @@ -56,12 +69,12 @@ export const exportCurData = params => { mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.blob().then(blob => { var filename=`社保福利档案模板.xlsx` var a = document.createElement('a'); - var url = window.URL.createObjectURL(blob); + var url = window.URL.createObjectURL(blob); a.href = url; a.download = filename; a.click(); @@ -76,7 +89,7 @@ export const previewCurData = (params) => { mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.json()) } @@ -88,7 +101,7 @@ export const importBatch = (params) => { mode: 'cors', headers: { 'Content-Type': 'application/json' - }, + }, body: JSON.stringify(params) }).then(res => res.json()) } @@ -98,7 +111,7 @@ export const exportArchives = (ids) => { fetch('/api/bs/hrmsalary/scheme/export?ids=' + ids).then(res => res.blob().then(blob => { var filename=`社保福利档案.xlsx` var a = document.createElement('a'); - var url = window.URL.createObjectURL(blob); + var url = window.URL.createObjectURL(blob); a.href = url; a.download = filename; a.click(); diff --git a/pc4mobx/hrmSalary/components/customForm/index.js b/pc4mobx/hrmSalary/components/customForm/index.js index d98bb96b..5041a53d 100644 --- a/pc4mobx/hrmSalary/components/customForm/index.js +++ b/pc4mobx/hrmSalary/components/customForm/index.js @@ -2,7 +2,6 @@ import React from "react"; import { Col, Row } from "antd"; import { WeaInput, WeaSelect } from "ecCom"; - export default class CustomForm extends React.Component { handleChange(params) { let request = { ...this.props.request, ...params }; @@ -23,31 +22,31 @@ export default class CustomForm extends React.Component { { - item.conditionType == "INPUT" && - { this.handleChange({ [item.domkey[0]]: value }); }}/> } { - item.conditionType == "RADIO" && item.options && + item.conditionType === "RADIO" && item.options && this.handleChange({ [item.domkey[0]]: value })} options={item.options.map(o => ({ showname: o.showname, key: o.key }))} /> } { - item.conditionType == "CHECKBOX" && + item.conditionType === "CHECKBOX" && item.options && ({ showname: o.showname, key: o.key }))} onChange={(value) => this.handleChange({ [item.domkey[0]]: value })}/> diff --git a/pc4mobx/hrmSalary/components/importModal/index.js b/pc4mobx/hrmSalary/components/importModal/index.js index 05e6481a..8e47ef9a 100644 --- a/pc4mobx/hrmSalary/components/importModal/index.js +++ b/pc4mobx/hrmSalary/components/importModal/index.js @@ -42,7 +42,7 @@ export default class ImportModal extends React.Component { const { params } = this.props; let flag = true; try { - if(this.props.renderFormComponent){ + if (this.props.renderFormComponent) { params && Object.keys(params).forEach((key) => { if (!params[key] || params[key] == "") { message.warning("请完善导入选项"); @@ -99,11 +99,14 @@ export default class ImportModal extends React.Component { } render() { - const { step, slideDataSource, isInit, isStandingBook, params,needimportSelected } = this.props; + const { step, slideDataSource, isInit, isStandingBook, params, needimportSelected } = this.props; return ( { + localStorage.removeItem("fileList"); + this.props.onCancel(); + }} style={{ width: 850 }} className="importModalWrapper" initLoadCss @@ -117,7 +120,10 @@ export default class ImportModal extends React.Component { this.hanleImportData(); }}>下一步 ] : [ - + ] } > diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep1.js b/pc4mobx/hrmSalary/components/importModal/modalStep1.js index da10cd5d..9aa7bf59 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep1.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep1.js @@ -1,7 +1,7 @@ import React from "react"; -import { WeaCheckbox } from "ecCom"; +import { WeaCheckbox,WeaTools } from "ecCom"; import { inject, observer } from "mobx-react"; -import { Button, Icon, Upload, message } from "antd"; +import { Icon, message, Upload } from "antd"; const Dragger = Upload.Dragger; @@ -14,7 +14,7 @@ export default class ModalStep1 extends React.Component { datetime: "", taxAgentId: "", hasData: "0", - fileList: [] + fileList: WeaTools.ls.getJSONObj('fileList') || [] }; } @@ -48,9 +48,11 @@ export default class ModalStep1 extends React.Component { if (fileList && fileList.length > 0 && fileList[0].response && fileList[0].response.status === 1) { this.props.onFileIdChange(fileList[0].response.data.fileid); + } else if (fileList && fileList.length === 0) { + this.props.onFileIdChange(""); } - this.setState({ fileList }); + this.setState({ fileList },()=>localStorage.setItem("fileList", JSON.stringify(this.state.fileList))); } render() { @@ -70,7 +72,7 @@ export default class ModalStep1 extends React.Component { } }; return ( -
+
{ this.props.formComponent &&
@@ -110,19 +112,19 @@ export default class ModalStep1 extends React.Component {

1. 第一步,请选择导出的Excel文件或 { (typeof this.props.templateLink) == "string" ? - { - let url= `${this.props.templateLink}${downloadExtra}`; - if(needimportSelected){ + { + let url = `${this.props.templateLink}${downloadExtra}`; + if (needimportSelected) { try { params && Object.keys(params).forEach((key) => { if (!params[key] || params[key] == "") { message.warning("请完善导入选项,再下载!"); throw new Error("请完善导入选项,再下载!"); - }else{ - if(url.indexOf("?")>0){ - url= `${url}&${key}=${params[key]}` - }else{ - url= `${url}?${key}=${params[key]}` + } else { + if (url.indexOf("?") > 0) { + url = `${url}&${key}=${params[key]}`; + } else { + url = `${url}?${key}=${params[key]}`; } } }); @@ -130,7 +132,7 @@ export default class ModalStep1 extends React.Component { return; } } - window.open(url,"_blank") + window.open(url, "_blank"); }}>点击这里下载模板 : { diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep3.js b/pc4mobx/hrmSalary/components/importModal/modalStep3.js index c3532c07..004ff029 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep3.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep3.js @@ -53,6 +53,7 @@ export default class ModalStep3 extends React.Component { columns={this.columns} dataSource={importResult.errorData} pagination={false} + scroll={{ y: `calc(100vh - 387px)` }} /> }

diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 63686c8c..edea0f0a 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -9,6 +9,7 @@ import StandingBookDetail from "./pages/socialSecurityBenefits/standingBookDetai import StandingBookOfflineComparison from "./pages/socialSecurityBenefits/standingBookOfflineComparison"; import SalaryItem from "./pages/salaryItem"; import SalaryFile from "./pages/salaryFile"; +import PayrollFiles from "./pages/payrollFiles"; import CumDeduct from "./pages/dataAcquisition/cumDeduct"; import OtherDeduct from "./pages/dataAcquisition/otherDeduct"; import CumSituation from "./pages/dataAcquisition/cumSituation"; @@ -101,7 +102,7 @@ const Routes = ( /> - + { ); }; + +export const PickDate = payload => { + const { label, onChange, value, viewAttr } = payload; + return ( + + onChange({ type: label, date })}/> + + ); +}; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js new file mode 100644 index 00000000..ce196157 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/allWithoutPay.js @@ -0,0 +1,44 @@ +import React, { Component } from "react"; +import * as API from "../../../apis/payrollFiles"; +import { Menu, message } from "antd"; +import "../index.less"; + +class AllWithoutPay extends Component { + handleClick = ({ key }) => { + const { selectedRowKeys = [], refreshList } = this.props; + if (key === "batchWithoutpay") { + if (selectedRowKeys.length === 0) { + message.warning("未选择条目"); + return; + } + API.gotoStop(selectedRowKeys).then(({ status, errormsg }) => { + if (status) { + message.success("操作成功!"); + refreshList(); + } else { + message.error(errormsg || "操作失败!"); + } + }); + }else{ + API.allGotoStop().then(({ status, errormsg }) => { + if (status) { + message.success("操作成功!"); + refreshList(); + } else { + message.error(errormsg || "操作失败!"); + } + }); + } + }; + + render() { + return ( + + 全部停薪 + 批量停薪 + + ); + } +} + +export default AllWithoutPay; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/batchSuspendsPay.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/batchSuspendsPay.js new file mode 100644 index 00000000..6e524fba --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/batchSuspendsPay.js @@ -0,0 +1,32 @@ +import React, { Component } from "react"; +import { Menu, message } from "antd"; +import * as API from "../../../apis/payrollFiles"; +import "../index.less"; + +class BatchSuspendpay extends Component { + handleClick = ({ key }) => { + const { selectedRowKeys, refreshList } = this.props; + if (selectedRowKeys.length === 0) { + message.warning("未选择条目"); + return; + } + API.cancelStop(selectedRowKeys).then(({ status, errormsg }) => { + if (status) { + message.success("操作成功!"); + refreshList(); + } else { + message.error(errormsg || "操作失败!"); + } + }); + }; + + render() { + return ( + + 批量取消停薪 + + ); + } +} + +export default BatchSuspendpay; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js new file mode 100644 index 00000000..ff790e1e --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/exportMenu.js @@ -0,0 +1,38 @@ +import React, { Component } from "react"; +import { Menu, message } from "antd"; +import "../index.less"; + +class ExportMenu extends Component { + componentDidMount() {} + + handleClick = ({ key }) => this[key](); + handleExportAll = () => { + let url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=`; + const { searchItemsValue } = this.props; + const fileds = Object.keys(searchItemsValue); + _.forEach(fileds, it => { + url = `${url}&${it}=${searchItemsValue[it]}`; + }); + window.open(url, "_self"); + }; + handleExportSelect = () => { + const { selectedRowKeys } = this.props; + if (selectedRowKeys.length === 0) { + message.warning("未选择条目"); + return; + } + const url = `${window.location.origin}/api/bs/hrmsalary/salaryArchive/exportList?ids=${selectedRowKeys.join(",")}`; + window.open(url, "_self"); + }; + + render() { + return ( + + 导出全部 + 导出选中 + + ); + } +} + +export default ExportMenu; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js new file mode 100644 index 00000000..04103886 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/importMenu.js @@ -0,0 +1,151 @@ +import React, { Component } from "react"; +import ImportModal from "../../../components/importModal"; +import * as API from "../../../apis/payrollFiles"; +import { Menu, Modal } from "antd"; +import "../index.less"; + +class ImportMenu extends Component { + constructor(props) { + super(props); + this.state = { + previewColumns: [], + previewDataSource: [], + importParams: { + visible: false, + step: 0, + isInit: false, + importType: "", + importResult: {} + } + }; + } + + salaryArchivePreview = (params) => { + params.importType = this.state.importParams.importType; + API.salaryArchivePreview(params).then(({ status, data }) => { + if (status) { + const { headers, list } = data; + this.setState({ + previewColumns: headers.map((item, index) => { + return { + key: index, + title: item, + dataIndex: index + }; + }), + previewDataSource: list.map(item => { + let result = {}; + item.map((i, index) => { + result[index] = i; + }); + return result; + }) + }); + } + }); + }; + handleMenuClick = (e) => { + const { key } = e; + if (key === "init") { + Modal.confirm({ + title: "信息确认", + content: `若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入,点击确定继续导入`, + onOk: () => { + this.setState({ + importParams: { + ...this.state.importParams, + importType: key, + isInit: true, + visible: true, + step: 0 + } + }); + } + }); + } else { + this.setState({ + importParams: { + ...this.state.importParams, + importType: key, + isInit: true, + visible: true, + step: 0 + } + }); + } + }; + handleInitModal = () => { + // 清空列表数据 + this.setState({ + previewDataSource:[], + importParams: { + ...this.state.importParams, + importResult:{}, + } + }); + }; + // 导入档案 + handleImportFile = (params) => { + params.importType = this.state.importParams.importType; + API.importSalaryArchive(params).then(({ status, data }) => { + if (status) { + data.errorData = data.errorNotice; + this.setState({ + importParams: { + ...this.state.importParams, + importResult: data + } + }); + } + }); + }; + + render() { + const { importType, refreshList } = this.props; + const { importParams, previewColumns, previewDataSource } = this.state; + return ( + + + {_.filter(importType, it => it.id !== "taxAgentAdjust").map((item) => ( + {item.content} + ))} + + {importParams.visible && ( + { + this.handleInitModal(); + }} + isInit={importParams.isInit} + columns={previewColumns} + slideDataSource={previewDataSource} + step={importParams.step} + setStep={(step) => { + this.setState({ importParams: { ...this.state.importParams, step } }); + }} + importResult={importParams.importResult} + onFinish={() => { + this.setState({ + importParams: { + ...this.state.importParams, + visible: false + } + }, () => refreshList()); + }} + previewImport={(params) => this.salaryArchivePreview(params)} + importFile={(params) => this.handleImportFile(params)} + templateLink={ + "/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" + + importParams.importType + } + visiable={importParams.visible} + onCancel={() => { + this.setState({ importParams: { ...this.state.importParams, visible: false } }); + }} + /> + )} + + ); + } +} + +export default ImportMenu; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js new file mode 100644 index 00000000..5440dcd5 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js @@ -0,0 +1,30 @@ +export const tabCondition = [ + { + color: "#000000", + groupid: "PENDING", + showcount: true, + title: "待定薪", + viewcondition: "pending" + }, + { + color: "#000000", + groupid: "FIXED", + showcount: true, + title: "发薪员工", + viewcondition: "fixed" + }, + { + color: "#000000", + groupid: "SUSPEND", + showcount: true, + title: "待停薪", + viewcondition: "suspend" + }, + { + color: "#000000", + groupid: "STOP", + showcount: true, + title: "停薪员工", + viewcondition: "stop" + } +]; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/index.js new file mode 100644 index 00000000..c88ed3a2 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.js @@ -0,0 +1,705 @@ +/* + * Author: 黎永顺 + * name:薪资档案 + * Description: + * Date: 2022-10-10 17:53:44 + */ +import React, { Component } from "react"; +import { toJS } from "mobx"; +import { inject, observer } from "mobx-react"; +import { tabCondition } from "./config"; +import * as API from "../../apis/payrollFiles"; +import { + WeaBrowser, + WeaFormItem, + WeaHelpfulTip, + WeaInput, + WeaSearchGroup, + WeaSelect, + WeaSlideModal, + WeaTab, + WeaTable, + WeaTop +} from "ecCom"; +import { WeaTableNew } from "comsMobx"; +import { Button, Dropdown, Menu, message, Modal, Popover } from "antd"; +import ImportMenu from "./components/importMenu"; +import ExportMenu from "./components/exportMenu"; +import AllWithoutPay from "./components/allWithoutPay"; +import BatchSuspendsPay from "./components/batchSuspendsPay"; +import SlideModalTitle from "../../components/slideModalTitle"; +import SalaryFileViewSlide from "../salaryFile/saralyFileViewSlide"; +import ChangeSalaryModal from "../salaryFile/changeSalaryModal"; +import "./index.less"; + +const WeaTableComx = WeaTableNew.WeaTable; + +@inject("payrollFilesStore", "taxAgentStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "pending", + showSearchAd: false, + dataSource: [], + archiveStatusList: [], + userStatusList: [], + importType: [], + selectedRowKeys: [], + tabCount: { + SUSPEND: 0, + STOP: 0, + FIXED: 0, + PENDING: 0 + }, + loading: { + query: false, + add: false, + update: false + }, + pageInfo: { + current: 1, + pageSize: 10, + total: 0 + }, + searchItemsValue: { + username: "", + departmentIds: "", + positionIds: "", + userstatus: "", + // archiveStatus: "EFFICIENT", + taxAgentId: "", + subcompanyIds: "" + }, + salaryAdjustmentInfo: {}, + changeSalaryVisible: false, + noPayDate: "", + slideParams: { + visible: false, + id: "" + }, + paysetParams: { + startPaydate: "", + lastPaydate: "" + } + }; + } + + Input = (value, key) => { + const { username } = this.state.searchItemsValue; + return ( + + this.setState({ + searchItemsValue: { + ...this.state.searchItemsValue, + [key]: val + } + })}/> + + ); + }; + Browser = (value, key) => { + const { positionIds, departmentIds, subcompanyIds } = this.state.searchItemsValue; + return ( + + { + this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } }); + }}/> + + ); + }; + Select = (value, key) => { + const { taxAgentStore } = this.props; + const { userstatus, archiveStatus, taxAgentId } = this.state.searchItemsValue; + const { archiveStatusList, userStatusList } = this.state; + const { taxAgentAdminOption } = taxAgentStore; + return ( + + this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/> + + ); + }; + + componentDidMount() { + const { taxAgentStore } = this.props; + const { getTaxAgentSelectListAsAdmin } = taxAgentStore; + getTaxAgentSelectListAsAdmin(); + const init = this.init(); + this.queryTabTotal(); + this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList"); + } + + init = async () => { + const { data: archiveStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" }); + const { data: userStatusList } = await this.commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }); + this.setState({ + archiveStatusList: [{ + key: "", + showname: "" + }, ..._.map(archiveStatusList, it => ({ + key: String(it.value), + showname: it.defaultLabel + }))], + userStatusList: [{ + key: "", + showname: "" + }, ..._.map(userStatusList, it => ({ + key: String(it.value), + showname: it.defaultLabel + }))] + }, () => + this.getImportTypes()); + }; + + salaryAdjustmentInfo = () => { + API.salaryAdjustmentInfo().then(({ status, data }) => { + if (status) { + this.setState({ salaryAdjustmentInfo: data }); + } + }); + }; + queryTabTotal = () => { + API.queryTabTotal().then(({ data = {}, status }) => { + if (status) { + this.setState({ tabCount: { ...this.state.tabCount, ...data } }); + } + }); + }; + queryList = (url) => { + const { loading, pageInfo, searchItemsValue } = this.state; + const { payrollFilesStore: { tableStore, queryList } } = this.props; + const payload = { ...pageInfo }; + this.setState({ loading: { ...loading, query: true } }); + queryList(payload, searchItemsValue, url).then(({ data, status }) => { + this.setState({ loading: { ...loading, query: false } }); + if (status) { + const { dataKey, pageInfo: paganition } = data; + const { datas } = dataKey; + const { list: dataSource, total, pageNum: current, pageSize } = paganition; + // tableStore.getDatas(datas); + this.setState({ + dataSource, + pageInfo: { + ...pageInfo, + total, + current, + pageSize + } + }); + } + }); + }; + //一键全部设为定薪员工 + allGotoFixed = () => { + const { pageInfo } = this.state; + if (pageInfo.total === 0) { + message.warning("您没有需要处理的待定薪人员!"); + return; + } + Modal.warning({ + title: "信息确认", + content: `确定要将所有待定薪人员(共${pageInfo.total}条数据)设为发薪人员吗?`, + onOk: () => { + API.allGotoFixed().then(({ status, errormsg }) => { + if (status) { + message.success("操作成功!"); + this.query(); + this.queryTabTotal(); + } else { + message.error(errormsg || "操作失败!"); + } + }).catch(err => { + console.log(err); + }); + } + }); + }; + commonEnumList = (params) => { + return API.commonEnumList(params); + }; + getImportTypes = () => { + API.getImportTypes().then(({ data, status }) => { + if (status) { + this.setState({ + importType: data + }); + } + }); + }; + getRightOptionBtns = () => { + const { selectedKey, importType, selectedRowKeys, searchItemsValue } = this.state; + const { taxAgentStore: { showOperateBtn } } = this.props; + if (selectedKey === "pending") { + return [ + it.id !== "salaryItemAdjust")} + refreshList={() => { + this.query(); + this.queryTabTotal(); + }}/>}> + + , + }> + + , + + ]; + } else if (selectedKey === "fixed" && showOperateBtn) { + return [ + } + placement="topLeft" + />, + { + this.query(); + this.queryTabTotal(); + }}/> + }> + + , + }> + + + ]; + } else if (selectedKey === "suspend" && showOperateBtn) { + return [ + { + this.query(); + this.queryTabTotal(); + }} + /> + }> + + , + it.id !== "salaryItemAdjust")} + refreshList={() => { + this.query(); + this.queryTabTotal(); + }}/> + }> + + + ]; + } else if (selectedKey === "stop" && showOperateBtn) { + return [ + { + this.query(); + this.queryTabTotal(); + }} + /> + }> + + , + }> + + + ]; + } + return []; + }; + getColumns = () => { + const { pageInfo, selectedKey } = this.state; + const { payrollFilesStore: { tableStore } } = 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) => { + if (index === 0) { + return { ...item, width: item.oldWidth, fixed: "left" }; + } + if (item.dataIndex === "operate") { + return { + ...item, fixed: "right", + width: 150, + render: (text, record) => { + if (selectedKey === "pending") { + return
+ this.handleEdit(record)}>编辑 + this.handleMenuClick(e, record.id)}> + 设为发薪人员 + } title=""> + + +
; + } else if (selectedKey === "fixed") { + return this.handleEdit(record)}>调薪; + } else if (selectedKey === "suspend") { + return
+ this.handleEdit(record)}>编辑 + this.handleMenuClick(e, record.id)}> + 停薪 + } title=""> + + +
; + } else { + return
+ this.handleEdit(record)}>取消停薪 + + 查看 + } title=""> + + +
; + } + } + }; + } + return { ...item, width: item.oldWidth }; + }); + }; + handleEdit = (record) => { + this.setState({ + slideParams: { + ...this.state.slideParams, + visible: true, + id: record.id + } + }, () => this.salaryAdjustmentInfo()); + }; + //列表操作 + handleMenuClick = (e, id) => { + const { key } = e; + if (key === "payroll") { + //设为定薪员工 + API.gotoFixed([id]).then(({ status, errormsg }) => { + if (status) { + message.success("操作成功!"); + this.queryTabTotal(); + this.query(); + } else { + message.error(errormsg || "操作失败!"); + } + }); + } else if (key === "stopSalary") { + //停薪 + API.gotoStop([id]).then(({ status, errormsg }) => { + if (status) { + message.success("操作成功!"); + this.queryTabTotal(); + this.query(); + } else { + message.error(errormsg || "操作失败!"); + } + }); + } + }; + // 查看 Slide 头部操作按钮 + renderEditSlideOperate = () => { + const { taxAgentStore: { showOperateBtn } } = this.props; + const { slideParams: { id }, salaryAdjustmentInfo, selectedKey } = this.state; + const { isShow, url } = salaryAdjustmentInfo; + let arrList = []; + if (showOperateBtn && isShow === "true" && selectedKey === "fixed") { + arrList.push(); + } + if (showOperateBtn && selectedKey === "fixed") { + arrList.push(); + } + selectedKey !== "stop" && arrList.push(); + return arrList; + }; + //切换tab + handleChangeTab = (selectedKey) => { + const { slideParams } = this.state; + this.setState({ + slideParams: { ...slideParams, visible: false, id: "" }, + selectedKey + }, () => this.query()); + }; + //编辑保存 + handleSave = () => { + const { paysetParams } = this.state; + if (_.isEmpty(paysetParams.startPaydate)) { + Modal.warning({ + title: "信息确认", + content: "必要信息不完整,红色*为必填项!" + }); + return; + } + // TODO: 薪资档案保存 + }; + //发薪设置 + handleSetpay = (params) => { + const { type, date } = params; + const { paysetParams } = this.state; + if (type === "起始发薪日期") { + this.setState({ paysetParams: { ...paysetParams, startPaydate: date } }); + } else if (type === "最后发薪日期") { + this.setState({ paysetParams: { ...paysetParams, lastPayDate: date } }); + } + }; + query = () => { + const { selectedKey } = this.state; + switch (selectedKey) { + case "pending": + this.queryList("/api/bs/hrmsalary/salaryArchive/pendingList"); + break; + case "fixed": + this.queryList("/api/bs/hrmsalary/salaryArchive/fixedList"); + break; + case "suspend": + this.queryList("/api/bs/hrmsalary/salaryArchive/suspendList"); + break; + default: + this.queryList("/api/bs/hrmsalary/salaryArchive/stopList"); + break; + } + }; + + render() { + const { + tabCount, + selectedKey, + loading, + dataSource, + pageInfo, + showSearchAd, + selectedRowKeys, + slideParams, + changeSalaryVisible + } = this.state; + const { payrollFilesStore: { tableStore } } = this.props; + const pagination = { + total: pageInfo.total, + showTotal: total => `共 ${total} 条`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => { + this.query(); + }); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => { + this.query(); + }); + } + }; + const renderSearch = () => { + const searchItems = [ + { com: this.Input("姓名", "username") }, + { com: this.Browser("分部", "subcompanyIds") }, + { com: this.Browser("部门", "departmentIds") }, + { com: this.Browser("岗位", "positionIds") }, + { com: this.Select("人员状态", "userstatus") }, + // { com: this.Select("档案状态", "archiveStatus") }, + { com: this.Select("个税扣缴义务人", "taxAgentId") } + ]; + return ; + }; + const adBtn = [ + // 高级搜索内部按钮 + , + , + + ]; + const rightMenu = [ + // 右键菜单 + { + key: "BTN_COLUMN", + icon: , + content: "显示列定制", + onClick: () => { + tableStore.setColSetVisible(true); + tableStore.tableColSet(true); + } + } + ]; + const rowSelection = { + selectedRowKeys, + onChange: (selectedRowKeys) => this.setState({ selectedRowKeys }) + }; + return ( +
+ } // 左侧图标 + iconBgcolor="#F14A2D" // 左侧图标背景色 + showDropIcon={true} // 是否显示下拉按钮 + dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) + > + this.setState({ showSearchAd: bool })} //高级搜索面板受控 + searchsAd={renderSearch()} // 高级搜索内部数据g1etSearchs(form, toJS(condition), 2) + buttonsAd={adBtn} // 高级搜索内部按钮 + onSearch={this.query} // 点搜索按钮时的回调this.handleSearch() + searchsBasePlaceHolder={"请输入姓名"} + onSearchChange={(v) => this.setState({ + searchItemsValue: { + ...this.state.searchItemsValue, + username: v + } + })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值form.updateFields({ username: v }) + searchsBaseValue={this.state.searchItemsValue.username} + /> + record.archiveStatus === "ARCHIVE" ? "archiveRow" : ""} + rowSelection={rowSelection} + scroll={{ x: 1200 }} + /> + + + {slideParams.visible && ( + + } + content={} + onClose={() => { + this.setState({ slideParams: { ...slideParams, visible: false, id: "" } }); + }} + showMask={true} + closeMaskOnClick={() => { + this.setState({ slideParams: { ...slideParams, visible: false, id: "" } }); + }} + /> + )} + {changeSalaryVisible && ( + { + this.setState({ changeSalaryVisible: false }); + }} + /> + )} +
+ ); + } +} + +export default Index; + +const HelpfulDiv = () => { + return
+ 导入按钮使用场景说明: + 1.档案初始化: + + a.初次使用薪酬模块,全量导入员工的薪资档案数据; + b.员工入职,导入新入职的员工的薪资档案数据(若导入表格中的人员已存在在薪资档案中,初始化导入会将档案中该人员的数据清除再导入); + c.返聘人员使用调薪功能调整薪资档案值或使用调整个税扣缴; + + 2.调薪:档案中已存在的人员批量调整薪资项目值(包括返聘人员的情况); + 3.调整个税扣缴义务人:档案中已存在的人员批量调整个税扣缴义务人(包括返聘人员的情况); +
; +}; diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/index.less b/pc4mobx/hrmSalary/pages/payrollFiles/index.less new file mode 100644 index 00000000..a00fe052 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/payrollFiles/index.less @@ -0,0 +1,88 @@ +.payrollFilesWrapper { + .archiveRow { + background: #F1F3F4; + } + + .optWrapper { + display: flex; + align-items: center; + + i { + cursor: pointer; + } + } +} + +.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; + } + } + } +} + +//提示语 +.helpWrapper { + display: flex; + flex-direction: column; + + .pl10 { + padding-left: 10px; + } +} + +//下拉框菜单样式 +.dropdownMenuWrapper { + .ant-menu-item { + border-right: none; + padding: 0 16px; + height: 30px; + line-height: 30px; + } +} + +//侧拉框样式 +.slideOuterWrapper { + .wea-slide-modal-title { + height: initial; + line-height: initial; + text-align: left; + } + .wea-slide-modal-title + div { + padding-bottom: 70px!important; + } + + .rodal-close { + z-index: 99; + top: 10px !important; + } + +} + +@media (min-width: 1260px) { + .slideOuterWrapper { + .reqTopWrapper .wea-new-top-req-title > div:first-child > div { + max-width: 100% !important; + } + } +} + +@media screen and (min-width: 1060px) and (max-width: 1260px) { + .slideOuterWrapper { + .reqTopWrapper .wea-new-top-req-title > div:first-child > div { + max-width: calc(100% - 96px) !important; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/index.js b/pc4mobx/hrmSalary/pages/ruleConfig/index.js index d69c36be..5ce6247a 100644 --- a/pc4mobx/hrmSalary/pages/ruleConfig/index.js +++ b/pc4mobx/hrmSalary/pages/ruleConfig/index.js @@ -10,6 +10,7 @@ import { CheckBox } from "../appConfig"; import { Button, message, Modal } from "antd"; import * as API from "../../apis/ruleconfig"; import "./index.less"; +import ProgressModal from "../../components/progressModal"; class Index extends Component { constructor(props) { @@ -28,7 +29,9 @@ class Index extends Component { ascOrDesc: "", rule: "", enctry: "" - } + }, + progressVisible: false, + progress: 50 }; } @@ -127,9 +130,9 @@ class Index extends Component { }); return; } - this.setState({ loading: {...this.state.loading, order: true} }); + this.setState({ loading: { ...this.state.loading, order: true } }); API.updateOrderRule(_.pick(saveParams, ["orderRule", "ascOrDesc"])).then(({ status, errormsg }) => { - this.setState({ loading: {...this.state.loading, order: false} }); + this.setState({ loading: { ...this.state.loading, order: false } }); if (status) { message.success("保存成功!"); let sysSetting = this.getSysSetting(); @@ -145,9 +148,9 @@ class Index extends Component { }); return; } - this.setState({ loading: {...this.state.loading, employee: true} }); + this.setState({ loading: { ...this.state.loading, employee: true } }); API.saveMatchEmployeeModeRule(_.pick(saveParams, ["rule"])).then(({ status, errormsg }) => { - this.setState({ loading: {...this.state.loading, employee: false} }); + this.setState({ loading: { ...this.state.loading, employee: false } }); if (status) { message.success("保存成功!"); let sysSetting = this.getSysSetting(); @@ -156,12 +159,49 @@ class Index extends Component { } }); } else if (type === "ENCRYTION") { - this.setState({ loading: {...this.state.loading, encry: true} }); + 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} }); + this.setState({ loading: { ...this.state.loading, encry: false } }); if (status) { - const { isSuccess } = data; - isSuccess ? message.success("保存成功!") : message.error(errormsg || "保存失败!"); + 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 || "加密失败!"); + } + }); + }, 1000); + }); } }); } @@ -219,6 +259,16 @@ class Index extends Component {
} showGroup center items={enctryItems}/> + { + this.state.progressVisible && + { + this.setState({ progressVisible: false, progress: 0 }); + }} + progress={this.state.progress} + /> + }
); } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.less b/pc4mobx/hrmSalary/pages/salaryFile/index.less index 4cca6976..506beb63 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.less +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.less @@ -3,14 +3,17 @@ min-height: 50vh; max-height: 60vh; overflow-y: auto; - .wea-select{ + + .wea-select { display: inline-block; position: relative; } - .wea-select,.ant-select,.ant-select-selection{ + + .wea-select, .ant-select, .ant-select-selection { width: 100%; } - .ant-select-selection{ + + .ant-select-selection { border-radius: 0; height: 30px; } @@ -38,7 +41,8 @@ .rightIconWrapper { display: inline-block; float: right; - .ant-btn{ + + .ant-btn { margin-left: 10px; border-radius: 0; padding: 0; @@ -47,10 +51,12 @@ font-size: 20px; line-height: 20px; } - .ant-btn.ant-btn-primary[disabled]{ + + .ant-btn.ant-btn-primary[disabled] { color: #d8d8d8; } - .ant-btn.ant-btn-primary{ + + .ant-btn.ant-btn-primary { color: #55a1f8; } } @@ -87,6 +93,36 @@ padding-left: 20px; padding-right: 20px; } + + .baseInfoWrapper { + width: 100%; + table-layout: fixed; + border-collapse: collapse; + border: 1px solid #e8e8e8; + + .descriptions-row { + border-bottom: 1px solid #e8e8e8; + + .descriptions-label { + background-color: #fafafa; + padding: 10px 8px; + color: rgba(0, 0, 0, .85); + font-weight: 400; + border-right: 1px solid #e8e8e8; + } + + .descriptions-value { + padding: 10px 8px; + border-right: 1px solid #e8e8e8; + } + } + } + + .tableGroupWrapper { + .wea-form-cell-wrapper { + width: 100% !important; + } + } } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js index 6c91528c..e1ab8be7 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js @@ -1,80 +1,82 @@ -import React from 'react'; -import { Table } from 'antd' -import { WeaTable } from 'ecCom' -import { inject, observer } from 'mobx-react'; -import ChangeSalaryModal from './changeSalaryModal' +import React from "react"; +import { WeaTable } from "ecCom"; +import { inject, observer } from "mobx-react"; +import ChangeSalaryModal from "./changeSalaryModal"; -@inject('salaryFileStore') +@inject("salaryFileStore") @observer export default class SalaryItemChangeList extends React.Component { - constructor(props) { - super(props) - this.state = { - changeSalaryVisible: false, - recordId: "" + constructor(props) { + super(props); + this.state = { + changeSalaryVisible: false, + recordId: "" + }; + this.searchParams = {}; + } + + componentWillMount() { + const { salaryFileStore: { fetchSingleSalaryItemList }, id } = this.props; + this.searchParams = { salaryArchiveId: this.props.id, current: 1 }; + fetchSingleSalaryItemList(this.searchParams); + } + + handleEdit(record) { + this.setState({ + recordId: record.id + }, () => { + this.setState({ + changeSalaryVisible: true + }); + }); + } + + // 获取Columns + getColumns() { + const { salaryFileStore: { singleSalaryItemList } } = this.props; + let columns = []; + if (singleSalaryItemList.columns) { + columns = [...singleSalaryItemList.columns]; + } + return columns; + } + + // 页面跳转 + handlePageChange(value) { + this.searchParams.current = value; + const { salaryFileStore: { fetchSingleSalaryItemList } } = this.props; + fetchSingleSalaryItemList(this.searchParams); + } + + render() { + const { salaryFileStore } = this.props; + const { singleSalaryItemList } = salaryFileStore; + return ( +
+ { + this.handlePageChange(value); + }, + total: singleSalaryItemList.total, + showTotal: (total) => `共 ${total} 条`, + current: singleSalaryItemList.pageNum + }} + /> + { + this.state.changeSalaryVisible && { + this.setState({ changeSalaryVisible: false }); + }} + /> } - this.searchParams = {} - } - - componentWillMount() { - const { salaryFileStore: { fetchSingleSalaryItemList }, id} = this.props; - this.searchParams = {salaryArchiveId: this.props.id, current: 1} - fetchSingleSalaryItemList(this.searchParams) - } - - handleEdit(record) { - this.setState({ - recordId: record.id - }, () => { - this.setState({ - changeSalaryVisible: true - }) - }) - } - - // 获取Columns - getColumns() { - const { salaryFileStore: {singleSalaryItemList} } = this.props; - let columns = [] - if(singleSalaryItemList.columns) { - columns = [...singleSalaryItemList.columns] - } - return columns - } - - // 页面跳转 - handlePageChange(value) { - this.searchParams.current = value - const { salaryFileStore: {fetchSingleSalaryItemList} } = this.props; - fetchSingleSalaryItemList(this.searchParams) - } - - render() { - const { salaryFileStore } = this.props; - const { singleSalaryItemList } = salaryFileStore - return ( -
- { -this.handlePageChange(value) -}, - total: singleSalaryItemList.total, - showTotal: (total) => `共 ${total} 条`, - current: singleSalaryItemList.pageNum - }} - /> - { - this.state.changeSalaryVisible && { -this.setState({changeSalaryVisible: false}) -}} - /> - } -
- ) - } -} \ No newline at end of file +
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js index e9817832..58e4670b 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js @@ -1,22 +1,53 @@ 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"; +import { PickDate } from "../appConfig"; +import "./index.less"; const selectedTabItems = [ { key: "0", name: "薪资调整记录" + } +]; +const baseInfolist = [ + { + id: 1, + items: [ + { + label: "姓名", + value: "username" + }, + { + label: "部门", + value: "department" + }, + { + label: "岗位", + value: "position" + } + ] }, - {/*暂时去掉调整个税扣缴义务人导入按钮*/ } - // { - // key: "1", - // name: "个税扣缴义务人调整记录" - // } + { + id: 2, + items: [ + { + label: "入职时间", + value: "hiredate" + }, + { + label: "手机号", + value: "mobile" + }, + { + label: "个税扣缴义务人", + value: "taxAgent" + } + ] + } ]; @inject("salaryFileStore") @@ -25,9 +56,7 @@ export default class SalaryFileViewSlide extends React.Component { constructor(props) { super(props); this.state = { - baseInfoVisible: true, - salaryItemVisible: true, - selectedTab: "0", + selectedTab: "0" }; } @@ -35,7 +64,7 @@ export default class SalaryFileViewSlide extends React.Component { const { salaryFileStore: { getArchiveForm, fetchSingleSalaryItemList, salaryAdjustmentInfo } } = this.props; getArchiveForm(this.props.id); fetchSingleSalaryItemList({ salaryArchiveId: this.props.id }); - salaryAdjustmentInfo() + salaryAdjustmentInfo(); } // tab页签切换回调 @@ -44,91 +73,97 @@ export default class SalaryFileViewSlide extends React.Component { } render() { - const { salaryFileStore: { detailForm } } = this.props; + const { salaryFileStore: { detailForm }, selectedKey, handleSetpay } = this.props; const { baseInfo, adjustSalaryItems } = detailForm; + const items = [ + { + com: PickDate({ + label: "起始发薪日期", + viewAttr: 3, + value: "", + onChange: handleSetpay + }) + }, + { + com: PickDate({ + label: "最后发薪日期", + viewAttr: 2, + value: "", + onChange: handleSetpay + }) + } + ]; 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}
-
- )) + _.map(baseInfolist, item => { + const { id, items } = item; + return + { + _.map(items, it => { + const { label, value } = it; + return + + + ; + }) + } + ; + }) } - - } + +
{label}{baseInfo && baseInfo["employee"][value]}
+
+ - { - this.handleTabChange(item); - }}/>} items={[]} onVisibleChange={(value) => { - this.setState({ salaryItemVisible: value }); - }}/> + + 薪资档案 + + + } items={[]} needTigger showGroup center> + { +
+ { + !_.isEmpty(adjustSalaryItems) ? adjustSalaryItems.map(item => ( +
+
{item.name}
+
{item.value}
+
+ )) :
暂无数据
+ } +
+ } +
{ - this.state.selectedTab == "0" ? : - + selectedKey !== "pending" && + { + this.handleTabChange(item); + }}/> + } + items={[]} + needTigger showGroup center + > + { + this.state.selectedTab === "0" ? + : + + } + } -
- -
); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js new file mode 100644 index 00000000..de89e096 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js @@ -0,0 +1,30 @@ +export const tabCondition = [ + { + color: "#000000", + groupid: "stayAdd", + showcount: true, + title: "待增员", + viewcondition: "pending" + }, + { + color: "#000000", + groupid: "paying", + showcount: true, + title: "在缴员工", + viewcondition: "fixed" + }, + { + color: "#000000", + groupid: "stayDel", + showcount: true, + title: "待减员", + viewcondition: "suspend" + }, + { + color: "#000000", + groupid: "stopPay", + showcount: true, + title: "停缴员工", + viewcondition: "stop" + } +]; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 4950f621..1468031b 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -1,15 +1,16 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, Dropdown, Menu, message } from "antd"; -import { WeaRightMenu, WeaSlideModal, WeaTab, WeaTop } from "ecCom"; +import { Button, Dropdown, Menu, message, Popover, Modal } from "antd"; +import { WeaHelpfulTip, WeaRightMenu, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom"; import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import BaseForm from "./baseForm"; import SlideModalTitle from "../../../components/slideModalTitle"; import SocialSecurityForm from "./socialSecurityForm"; import AccumulationFundForm from "./accumulationFundForm"; import OtherForm from "./otherForm"; -import CustomPaginationTable from "../../../components/customPaginationTable"; +import { tabCondition } from "./config"; +import * as API from "../../../apis/welfareArchive"; import ImportModal from "../../../components/importModal"; import "./index.less"; @@ -20,25 +21,77 @@ export default class Archives extends React.Component { super(props); this.state = { value: "", - selectedKey: "0", + selectedKey: "pending", selectedTab: 0, editSlideVisible: false, employeeId: "", importVisible: false, modalParam: {}, step: 0, - selectedRowKeys: [] + selectedRowKeys: [], + dataSource: [], + columns: [], + loading: { + query: false, + add: false, + update: false + }, + tabCount: { + stayAdd: 0, + paying: 0, + stayDel: 0, + stopPay: 0 + }, + pageInfo: { + current: 1, + pageSize: 10, + total: 0 + } }; this.record = {}; this.pageInfo = { current: 1, pageSize: 10 }; } - componentWillMount() { + componentDidMount() { const { archivesStore: { doInit } } = this.props; doInit(); + this.queryList({ runStatuses: ["1"] }); + this.queryInsuranceTabTotal(); } + queryInsuranceTabTotal = () => { + API.queryInsuranceTabTotal().then(({ data = {}, status }) => { + if (status) { + this.setState({ tabCount: { ...this.state.tabCount, ...data } }); + } + }); + }; + queryList = (params) => { + const { loading, pageInfo } = this.state; + const { archivesStore: { form } } = this.props; + const formParams = form.getFormParams() || {}; + const payload = { ...pageInfo }; + this.setState({ loading: { ...loading, query: true } }); + API.queryList({ ...formParams, ...payload, ...params }).then(({ data, status }) => { + this.setState({ loading: { ...loading, query: false } }); + if (status) { + const { pageInfo: paganition, columns, datas: dataSource } = data; + const { total, pageNum: current, pageSize } = paganition; + this.setState({ + dataSource: _.map(dataSource, it => ({ ...it, id: it.employeeId })), + columns, + pageInfo: { + ...pageInfo, + total, + current, + pageSize + } + }); + } + }); + }; + handleEdit(record) { this.record = record; this.setState({ employeeId: record.employeeId, editSlideVisible: true }); @@ -49,25 +102,60 @@ export default class Archives extends React.Component { } getColumns() { - const { archivesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props; - let columns = [...tableStore.columns]; - columns = columns.filter(item => item.hide == "false"); - columns.map(item => { - item.width = "150px"; - }); - columns.push({ - title: "操作", - dataIndex: "operate", - fixed: "right", - width: "100px", - height: "auto", - render: (text, record) => { - return ( { - this.handleEdit(record); - }}>{showOperateBtn ? "编辑" : "查看"}); + const { columns, pageInfo, selectedKey } = this.state; + const { taxAgentStore: { showOperateBtn } } = this.props; + let tmpV = _.map(columns.filter(item => item.display === "TRUE"), (item, index) => { + if (index === 0) { + return { + ...item, dataIndex: item.column, + fixed: "left", + title: item.text + }; } + return { ...item, dataIndex: item.column, title: item.text }; }); - return columns; + return tmpV.length > 0 ? [ + { + title: "序号", + dataIndex: "index", + width: 60, + fixed: "left", + render: (text, record, index) => { + const { current, pageSize } = pageInfo; + return (current - 1) * pageSize + index + 1; + } + }, + ...tmpV, { + title: "操作", + dataIndex: "operate", + fixed: "right", + width: "120px", + render: (text, record) => { + return ( +
+ this.handleEdit(record)}>{showOperateBtn ? "编辑" : "查看"} + { + showOperateBtn && selectedKey === 'pending' && + { + Modal.warning({ + title: "信息确认", + content: `确定要删除该条待办人员吗?`, + onOk: () => this.deleteTodoList({runStatus: "4", ids: [record.baseInfo]}) + }); + }}> + 删除待办 + } title=""> + + + } +
+ ); + } + }] : []; } // 保存 @@ -145,20 +233,79 @@ export default class Archives extends React.Component { this.setState({ importVisible: false, step: 0 }); } - handleSearch() { - const { archivesStore: { getTableDatas } } = this.props; - getTableDatas({ ...this.pageInfo, current: 1 }); - } + //切换tab + handleChangeTab = (selectedKey) => { + this.setState({ selectedKey }, () => this.query()); + }; + + query = () => { + const { selectedKey } = this.state; + switch (selectedKey) { + case "pending": + this.queryList({ runStatuses: ["1"] }); + break; + case "fixed": + this.queryList({ runStatuses: ["2", "3"] }); + break; + case "suspend": + this.queryList({ runStatuses: ["3"] }); + break; + default: + this.queryList({ runStatuses: ["4", "5"] }); + break; + } + }; + handleMenuBtnClick = () => { + const { selectedKey } = this.state; + if (selectedKey === "pending") { + console.log("全量增员"); + } + }; + handleMenuItemClick = ({ key }) => { + const { selectedRowKeys, selectedKey } = this.state; + if (selectedRowKeys.length === 0) { + message.warning("未选择任何条目", 1); + return; + } + switch (selectedKey) { + case "pending": + if (key === "4") { + const payload = { + runStatus: key, + ids: selectedRowKeys + }; + this.deleteTodoList(payload); + } else { + console.log(11111); + } + break; + default: + break; + } + }; + //删除待办 + deleteTodoList = (payload) => { + API.updateRunStatus(payload).then(({ status, errormsg }) => { + if (status) { + message.success("操作成功"); + this.query(); + this.queryInsuranceTabTotal(); + this.onSelectChange([]); + } else { + message.error(errormsg || "操作失败"); + } + }); + }; render() { const { archivesStore, taxAgentStore: { showOperateBtn } } = this.props; - const { selectedTab, selectedRowKeys } = this.state; + const { selectedTab, selectedRowKeys, selectedKey, dataSource: dataSourceActive, pageInfo, tabCount } = this.state; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd, previewCurDataColumns, previewCurDataDataSource, importResult, initImportParams } = archivesStore; - const { dataSource, pageInfo } = archivesStore; - if (!hasRight && !loading) { // 无权限处理 + const { dataSource } = archivesStore; + if (_.isEmpty(this.getColumns())) { // 无权限处理 return renderNoright(); } @@ -178,14 +325,29 @@ export default class Archives extends React.Component { importantlevel: 1 }; const adBtn = [ // 高级搜索内部按钮 - , + , , ]; // 导出全部 const handleButtonClick = () => { - const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`; + const { selectedKey } = this.state; + let url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=`; + switch (selectedKey) { + case "pending": + url = `${url}&runStatuses=1`; + break; + case "fixed": + url = `${url}&runStatuses=2,3`; + break; + case "suspend": + url = `${url}&runStatuses=3`; + break; + default: + url = `${url}&runStatuses=4`; + break; + } window.open(url, "_self"); }; @@ -197,11 +359,25 @@ export default class Archives extends React.Component { return; } let ids = selectedRowKeys.join(","); - const url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=${ids}`; + let url = `${window.location.origin}/api/bs/hrmsalary/scheme/export?ids=${ids}`; + switch (selectedKey) { + case "pending": + url = `${url}&runStatuses=1`; + break; + case "fixed": + url = `${url}&runStatuses=2,3`; + break; + case "suspend": + url = `${url}&runStatuses=3`; + break; + default: + url = `${url}&runStatuses=4`; + break; + } window.open(url, "_self"); }; - const btns = [ + const btns = selectedKey === "fixed" ? [ , @@ -212,8 +388,77 @@ export default class Archives extends React.Component { } type="ghost"> 导出全部 + ] : selectedKey === "pending" ? [ + 提示:缴纳月份区间包含起始缴纳月,不包含最后缴纳月; 若员工离职时还未增员进入在缴员工,则数据会自动清除, + 因此若确认缴纳,请及时维护档案数据并增员操作。若清除后还需缴纳,需先在个税扣缴义务人菜单将员工按离职状态添加回来,会重新出现在待增员。
} + placement="topLeft" + />, + + 批量增员 + 批量删除待办 + + } type="ghost"> + 全量增员 + , + , + + 导出选中 + + } type="ghost"> + 导出全部 + + ] : selectedKey === "suspend" ? [ + } + placement="topLeft" + />, + + 批量减员 + + } type="ghost"> + 全量减员 + , + + 导出选中 + + } type="ghost"> + 导出全部 + + ] : [ + + 导出选中 + + } type="ghost"> + 导出全部 + ]; + const pagination = { + total: pageInfo.total, + showTotal: total => `共 ${total} 条`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => { + this.query(); + }); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => { + this.query(); + }); + } + }; + const rowSelection = { selectedRowKeys, onChange: this.onSelectChange @@ -231,38 +476,49 @@ export default class Archives extends React.Component { showDropIcon={false} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 - buttons={showOperateBtn ? btns : []} > setShowSearchAd(bool)} //高级搜索面板受控 searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据 buttonsAd={adBtn} // 高级搜索内部按钮 searchsBasePlaceHolder={"请输入姓名"} - onSearch={() => { - this.handleSearch(); - }} // 点搜索按钮时的回调 + onSearch={this.query} // 点搜索按钮时的回调 onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 /> - 0 ? this.getColumns().length * 150 : 1000 }} - onPageChange={(value) => { - this.handlePageChnage(value); - }} - onShowSizeChange={(current, pageSize) => { - this.pageInfo = { current, pageSize }; - getTableDatas(this.pageInfo); - }} + scroll={{ x: 1200 }} /> + {/* 0 ? this.getColumns().length * 150 : 1000 }}*/} + {/* onPageChange={(value) => {*/} + {/* this.handlePageChnage(value);*/} + {/* }}*/} + {/* onShowSizeChange={(current, pageSize) => {*/} + {/* this.pageInfo = { current, pageSize };*/} + {/* getTableDatas(this.pageInfo);*/} + {/* }}*/} + {/*/>*/} @@ -314,12 +570,12 @@ export default class Archives extends React.Component { selectedTab == 3 && }
} - onClose={() => this.setState({ editSlideVisible: false },()=>{ - this.setState({ selectedTab: '0' }); + onClose={() => this.setState({ editSlideVisible: false }, () => { + this.setState({ selectedTab: "0" }); })} showMask={true} - closeMaskOnClick={() => this.setState({ editSlideVisible: false },()=>{ - this.setState({ selectedTab: '0' }); + closeMaskOnClick={() => this.setState({ editSlideVisible: false }, () => { + this.setState({ selectedTab: "0" }); })}/> } { @@ -356,3 +612,12 @@ export default class Archives extends React.Component { ); } } + + +const HelpfulDiv = () => { + return
+ 1、缴纳月份区间包含起始缴纳月,不包含最后缴纳月; + 2、维护的所有的最后缴纳月都大于当前月,则该待办数据自动清除,不显示在待减员列表; + 3、减员失败情况:①有起始缴纳月却未维护最后缴纳月;②员工存在未归档的核算数据; +
; +}; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less index ebbc0a7c..37c3a4f7 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less @@ -23,6 +23,25 @@ border-bottom: none; } } +.mySalaryBenefitsWrapper{ + .optWrapper { + display: flex; + align-items: center; + + i { + cursor: pointer; + } + } +} +//提示语 +.helpWrapper { + display: flex; + flex-direction: column; + + .pl10 { + padding-left: 10px; + } +} .slideOuterWrapper{ .wea-slide-modal-title{ diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js index 58d557e7..95339fb1 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customNewModal.js @@ -30,20 +30,23 @@ export default class CustomNewModal extends React.Component { return ( this.props.onCancel()} - title="新建自定义福利" + title={this.props.edit ? "编辑自定义福利" : "新建自定义福利"} style={{ height: "auto!important" }} buttons={[ , ]} > - { - setCustomRequest(value); - }}/> + { + setCustomRequest(value); + }}/> ); } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index a2b6aba5..8f7c1585 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -145,7 +145,7 @@ export default class Programme extends React.Component { getCustomColumns = columns => { const { taxAgentStore: { showOperateBtn } } = this.props; let newColumns = []; - newColumns = _.filter(columns, it => it.dataIndex != "operate").map(column => { + newColumns = columns.map(column => { let newColumn = column; newColumn.render = (text, record, index) => { //前端元素转义 @@ -157,6 +157,7 @@ export default class Programme extends React.Component { case "operate": return ( { this.onCustomEdit(record); }}> @@ -223,7 +224,7 @@ export default class Programme extends React.Component { } } - onCustomEdit(record) { + onCustomEdit=(record)=> { const { programmeStore: { getCustomForm, setCustomNewVisible, setCustomRequest }, taxAgentStore: { showOperateBtn } @@ -241,9 +242,7 @@ 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]), + paymentScope: record["payment_scope"].split(",").map(item => paymentScopeEnum[item]).join(','), welfareType: welfareTypeEnum[record.welfare_type] }); } @@ -431,12 +430,12 @@ export default class Programme extends React.Component { const handleCopyModalSave = () => { const { programmeStore: { copyScheme } } = this.props; const { copyId, copyModalValue } = this.state; - if(_.isEmpty(this.refs.copyRef.state.value)){ + if (_.isEmpty(this.refs.copyRef.state.value)) { this.refs.copyRef.refs.weaError.showError(); - }else{ + } else { copyScheme({ id: copyId, schemeName: copyModalValue }).then(() => { this.setState({ copyModalVisible: false }); - }) + }); } }; @@ -574,7 +573,7 @@ export default class Programme extends React.Component { {this.state.copyModalVisible && it.viewcondition === selectedKey)[0].title} visible={this.state.copyModalVisible} value={this.state.copyModalValue} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js index bca6db74..b49bc29f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookOfflineComparison/index.js @@ -57,7 +57,7 @@ class StandingBookOfflineComparison extends Component { columns: _.map(columns, (it, idx) => ({ ...it, width: 150, - fixed: idx < 5 ? "left" : false, + fixed: idx < 2 ? "left" : false, render: (text, record) => { if (Object.prototype.toString.call(text) === "[object Object]") { return diff --git a/pc4mobx/hrmSalary/pages/sysConfig/index.js b/pc4mobx/hrmSalary/pages/sysConfig/index.js index 7cbf6f59..a2898680 100644 --- a/pc4mobx/hrmSalary/pages/sysConfig/index.js +++ b/pc4mobx/hrmSalary/pages/sysConfig/index.js @@ -86,7 +86,7 @@ export default class SysConfig extends React.Component { }); form.initFormFields(sysConditions); } else { - message.success(errormsg); + message.error(errormsg); } }); }; @@ -102,7 +102,7 @@ export default class SysConfig extends React.Component { form.reset(); }); } else { - message.success(errormsg || "新增失败"); + message.error(errormsg || "新增失败"); } }); }; @@ -118,7 +118,7 @@ export default class SysConfig extends React.Component { form.reset(); }); } else { - message.success(errormsg || "更新失败"); + message.error(errormsg || "更新失败"); } }); }; @@ -147,6 +147,7 @@ export default class SysConfig extends React.Component { const pagination = { total: pageInfo.total, showTotal: total => `共 ${total} 条`, + showQuickJumper: true, showSizeChanger: true, pageSizeOptions: ["10", "20", "50", "100"], onShowSizeChange: (current, pageSize) => { diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js index 834d5788..76456491 100644 --- a/pc4mobx/hrmSalary/stores/archives.js +++ b/pc4mobx/hrmSalary/stores/archives.js @@ -92,7 +92,7 @@ export class ArchivesStore { @action doInit = () => { this.getCondition(); - this.getTableDatas(); + // this.getTableDatas(); } // 获得高级搜索表单数据 diff --git a/pc4mobx/hrmSalary/stores/index.js b/pc4mobx/hrmSalary/stores/index.js index 74ad8911..e07529c7 100644 --- a/pc4mobx/hrmSalary/stores/index.js +++ b/pc4mobx/hrmSalary/stores/index.js @@ -16,6 +16,7 @@ import { payrollStore } from "./payroll"; import { calculateStore } from "./calculate"; import { DeclareStore } from "./declare"; import { StandingBookStore } from "./StandingBook"; +import {PayrollFilesStore} from './payrollFiles'; module.exports = { baseFormStore: new BaseFormStore(), @@ -36,4 +37,5 @@ module.exports = { calculateStore: new calculateStore(), declareStore: new DeclareStore(), standingBookStore: new StandingBookStore(), + payrollFilesStore: new PayrollFilesStore(), }; diff --git a/pc4mobx/hrmSalary/stores/payrollFiles.js b/pc4mobx/hrmSalary/stores/payrollFiles.js new file mode 100644 index 00000000..752b63e6 --- /dev/null +++ b/pc4mobx/hrmSalary/stores/payrollFiles.js @@ -0,0 +1,23 @@ +import { observable, action } from "mobx"; +import { WeaTableNew } from "comsMobx"; +import * as API from '../apis/payrollFiles'; + +const { TableStore } = WeaTableNew; + +export class PayrollFilesStore { + @observable tableStore = new TableStore(); + @action("列表查询") + queryList= (payload={}, searchItemsValue={}, url='')=>{ + return new Promise((resolve, reject)=>{ + API.queryList({ ...payload, ...searchItemsValue, url }).then(res=>{ + const {data, status}= res; + if(status){ + const { dataKey } = data; + const { datas } = dataKey; + this.tableStore.getDatas(datas); // table 请求数据 + } + resolve(res) + }).catch(()=>{reject()}) + }) + } +} diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js index 88b54388..5fb31470 100644 --- a/pc4mobx/hrmSalary/stores/programme.js +++ b/pc4mobx/hrmSalary/stores/programme.js @@ -322,7 +322,7 @@ export class ProgrammeStore { @action updateCustomCategory = (params) => { return new Promise((resolve, reject) => { - API.updateCustomCategory(params).then(res => { + API.updateCustomCategory({...params, paymentScope: params.paymentScope.split(",")}).then(res => { if(res.status) { message.success("编辑成功") resolve() diff --git a/pc4mobx/hrmSalary/stores/salaryFile.js b/pc4mobx/hrmSalary/stores/salaryFile.js index aeaaa57d..76ab9cf8 100644 --- a/pc4mobx/hrmSalary/stores/salaryFile.js +++ b/pc4mobx/hrmSalary/stores/salaryFile.js @@ -52,7 +52,7 @@ export class salaryFileStore { // this.getCondition(); this.getTableDatas(params); this.getImportTypes(); - this.commonEnumList("archive", { enumClass: "com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum" }); + this.commonEnumList("archive", { enumClass: "com.engine.salary.enums.salaryarchive.ArchiveStatusEnum" }); this.commonEnumList("user", { enumClass: "com.engine.salary.enums.UserStatusEnum" }); };