diff --git a/pc4mobx/hrmSalary/apis/archive.js b/pc4mobx/hrmSalary/apis/archive.js index 3fd8ea55..e581e07d 100644 --- a/pc4mobx/hrmSalary/apis/archive.js +++ b/pc4mobx/hrmSalary/apis/archive.js @@ -76,7 +76,7 @@ export const saveTaxAgent = params => { //薪资档案-删除个税扣缴义务人调整 export const deleteTaxAgent = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/deleteTaxAgent', 'POST', params); + return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/deleteTaxAgent', 'GET', params); } //薪资档案操作记录-薪资项目操作记录列表 diff --git a/pc4mobx/hrmSalary/apis/item.js b/pc4mobx/hrmSalary/apis/item.js index c8648ad5..7859e16f 100644 --- a/pc4mobx/hrmSalary/apis/item.js +++ b/pc4mobx/hrmSalary/apis/item.js @@ -82,14 +82,7 @@ export const updateItem = params => { //薪资项目-薪资项目详情 export const getItemForm = params => { - return fetch('/api/bs/hrmsalary/salaryitem/getSalaryForm', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) + return WeaTools.callApi('/api/bs/hrmsalary/salaryitem/getSalaryForm', 'GET', params); } //薪资项目-添加系统薪资项目 diff --git a/pc4mobx/hrmSalary/apis/ledger.js b/pc4mobx/hrmSalary/apis/ledger.js index 59e62d18..2d411cd3 100644 --- a/pc4mobx/hrmSalary/apis/ledger.js +++ b/pc4mobx/hrmSalary/apis/ledger.js @@ -1,242 +1,270 @@ -import { WeaTools } from 'ecCom'; -import {postFetch} from '../util/request' +import { WeaTools } from "ecCom"; +import { postFetch } from "../util/request"; //薪资帐套列表 export const getLedgerList = params => { - return postFetch("/api/bs/hrmsalary/salarysob/list", params) -} + return postFetch("/api/bs/hrmsalary/salarysob/list", params); +}; //启用/禁用薪资帐套 export const changeLedgerStatus = params => { - return fetch('/api/bs/hrmsalary/salarysob/disable', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/disable", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //复制薪资帐套 export const duplicateLedger = params => { - return fetch('/api/bs/hrmsalary/salarysob/duplicate', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} - + return fetch("/api/bs/hrmsalary/salarysob/duplicate", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //删除薪资帐套 export const deleteLedger = params => { - return fetch('/api/bs/hrmsalary/salarysob/delete', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/delete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套基本信息表单 export const getLedgerBasicForm = params => { - return fetch('/api/bs/hrmsalary/salarysob/basic/getForm', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return WeaTools.callApi( + "/api/bs/hrmsalary/salarysob/basic/getForm", + "get", + params + ); + // return fetch('/api/bs/hrmsalary/salarysob/basic/getForm', { + // method: 'POST', + // mode: 'cors', + // headers: { + // 'Content-Type': 'application/json' + // }, + // body: JSON.stringify(params) + // }).then(res => res.json()) +}; //保存薪资帐套基本信息 export const saveLedgerBasic = params => { - return fetch('/api/bs/hrmsalary/salarysob/basic/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/basic/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套人员范围(包含)列表 export const getLedgerPersonRangeInclude = params => { - return fetch('/api/bs/hrmsalary/salarysob/range/listInclude', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/range/listInclude", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套人员范围(排除)列表 export const getLedgerPersonRangeExclude = params => { - return fetch('/api/bs/hrmsalary/salarysob/range/listExclude', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/range/listExclude", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套人员范围表单 export const getLedgerPersonRangeForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salarysob/range/getForm', 'get', params); -} + return WeaTools.callApi( + "/api/bs/hrmsalary/salarysob/range/getForm", + "get", + params + ); +}; //保存薪资帐套人员范围 export const saveLedgerPersonRange = params => { - return fetch('/api/bs/hrmsalary/salarysob/range/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/range/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //删除薪资帐套人员范围 export const deleteLedgerPersonRange = params => { - return fetch('/api/bs/hrmsalary/salarysob/range/delete', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/range/delete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套项目分组的详情 export const getLedgerItemGroupForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salarysob/item/group/getForm', 'get', params); -} + return WeaTools.callApi( + "/api/bs/hrmsalary/salarysob/item/group/getForm", + "get", + params + ); +}; //保存薪资帐套薪资项目 export const saveLedgerItem = params => { - return fetch('/api/bs/hrmsalary/salarysob/item/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/item/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套薪资项目详情 export const getLedgerItemForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salarysob/item/getForm', 'get', params); -} + return WeaTools.callApi( + "/api/bs/hrmsalary/salarysob/item/getForm", + "get", + params + ); +}; //薪资帐套校验规则列表 export const getLedgerRuleList = params => { - return fetch('/api/bs/hrmsalary/salarysob/checkrule/list', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/checkrule/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //薪资帐套校验规则表单 export const getLedgerRuleForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salarysob/checkrule/getForm', 'get', params); -} + return WeaTools.callApi( + "/api/bs/hrmsalary/salarysob/checkrule/getForm", + "get", + params + ); +}; //保存薪资帐套校验规则 export const saveLedgerRule = params => { - return fetch('/api/bs/hrmsalary/salarysob/checkrule/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/checkrule/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; //编辑薪资帐套校验规则公式 export const updateLedgerRuleFormula = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salarysob/checkrule/formula/update', 'POST', params); -} + return WeaTools.callApi( + "/api/bs/hrmsalary/salarysob/checkrule/formula/update", + "POST", + params + ); +}; //删除薪资帐套校验规则 export const deleteLedgerRule = params => { - return fetch('/api/bs/hrmsalary/salarysob/checkrule/delete', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/checkrule/delete", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; -// 薪资项目可选列表 +// 薪资项目可选列表 export const listSalaryItem = params => { - return fetch('/api/bs/hrmsalary/salarysob/item/listSalaryItem', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/item/listSalaryItem", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 员工信息字段列表 export const empFieldList = () => { - return WeaTools.callApi('/api/bs/hrmsalary/salarysob/empField/list', 'GET', {}); -} + return WeaTools.callApi( + "/api/bs/hrmsalary/salarysob/empField/list", + "GET", + {} + ); +}; // 调薪计薪规则可选的薪资项目列表 -export const listSalarySobItem = (params) => { - return fetch('/api/bs/hrmsalary/salarysob/adjustmentrule/listSalarySobItem', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} +export const listSalarySobItem = params => { + return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/listSalarySobItem", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 调薪计薪规则保存 -export const saveAdjustmentRule = (params) => { - return fetch('/api/bs/hrmsalary/salarysob/adjustmentrule/save', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} +export const saveAdjustmentRule = params => { + return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/save", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; // 调薪计薪规则列表 export const listAdjustmentRule = params => { - return fetch('/api/bs/hrmsalary/salarysob/adjustmentrule/list', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }).then(res => res.json()) -} + return fetch("/api/bs/hrmsalary/salarysob/adjustmentrule/list", { + method: "POST", + mode: "cors", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(params) + }).then(res => res.json()); +}; diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js index 2cabd8bb..f5446fa6 100644 --- a/pc4mobx/hrmSalary/apis/welfareArchive.js +++ b/pc4mobx/hrmSalary/apis/welfareArchive.js @@ -59,7 +59,7 @@ export const exportCurData = params => { }, body: JSON.stringify(params) }).then(res => res.blob().then(blob => { - var filename=`福利档案模板.xlsx` + var filename=`社保福利档案模板.xlsx` var a = document.createElement('a'); var url = window.URL.createObjectURL(blob); a.href = url; diff --git a/pc4mobx/hrmSalary/components/customPaginationTable/index.js b/pc4mobx/hrmSalary/components/customPaginationTable/index.js index 8b265977..b903f388 100644 --- a/pc4mobx/hrmSalary/components/customPaginationTable/index.js +++ b/pc4mobx/hrmSalary/components/customPaginationTable/index.js @@ -1,25 +1,29 @@ -import React from 'react' -import { WeaTable } from 'ecCom' -import CustomTable from '../../components/customTable' +import React from "react"; +import { WeaTable } from "ecCom"; +import CustomTable from "../../components/customTable"; export default class CustomPaginationTable extends React.Component { - render() { - return ( - {this.props.onPageChange(value)}, - total: this.props.total, - showTotal: (total) => `共 ${total} 条`, - current: this.props.current, - showSizeChanger: true, - showQuickJumper: true, - pageSize: this.props.pageSize, - onShowSizeChange: (current, pageSize) => { - this.props.onShowSizeChange && this.props.onShowSizeChange(current, pageSize); - } - }} - /> - ) - } -} \ No newline at end of file + render() { + return ( + { + this.props.onPageChange(value); + }, + total: this.props.total, + showTotal: total => `共 ${total} 条`, + current: this.props.current, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + showQuickJumper: true, + pageSize: this.props.pageSize, + onShowSizeChange: (current, pageSize) => { + this.props.onShowSizeChange && + this.props.onShowSizeChange(current, pageSize); + } + }} + /> + ); + } +} diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep3.js b/pc4mobx/hrmSalary/components/importModal/modalStep3.js index 238d09e6..12600f8b 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep3.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep3.js @@ -1,47 +1,76 @@ -import React from "react" -import successImg from "./success.svg" -import { Button, Table, Spin } from "antd" -import { WeaTable } from 'ecCom' +import React from "react"; +import successImg from "./success.svg"; +import { Button, Table, Spin } from "antd"; +import { WeaTable } from "ecCom"; export default class ModalStep3 extends React.Component { + componentWillMount() { + this.columns = [ + { + title: "错误信息", + dataIndex: "message", + key: "message" + } + ]; + } - componentWillMount() { - this.columns = [ + render() { + const { importResult } = this.props; + return ( +
+
+ {importResult.successCount === undefined + ?
+ + 正在导入请稍后... +
+ :
+ +
+ 数据导入完成 +
+
+ 已导入{" "} + + {" "}{importResult.successCount}{" "} + {" "} + 条数据,失败 + {" "}{importResult.errorCount}{" "} + 条数据 +
+
} +
{ - title: "错误信息", - dataIndex: 'message', - key: 'message', + } - ] - } - - render() { - const { importResult } = this.props; - return ( -
-
- { - importResult.successCount === undefined ? -
- - 正在导入请稍后... -
- :
- -
数据导入完成
-
已导入 {importResult.successCount} 条数据,失败 {importResult.errorCount} 条数据
-
- } -
- { - - } -
-
-
- -
-
- ) - } -} \ No newline at end of file +
+
+
+ +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js index 1deacd94..c3a1ed45 100644 --- a/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js +++ b/pc4mobx/hrmSalary/pages/calculate/baseFormModal.js @@ -81,7 +81,7 @@ export default class baseFormModal extends React.Component { 薪酬所属月 {this.setState({ @@ -96,7 +96,7 @@ export default class baseFormModal extends React.Component { { this.state.inited &&