From 9fd9860e4ad463cd91d8385e3e76edc5cfbbb9ab Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 21 Oct 2024 11:12:31 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E9=A2=86=E6=82=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apis/custom-apis/lingyue/index.js | 18 ++++++ pc4mobx/hrmSalary/pages/custom-pages/index.js | 9 ++- .../lingyue/components/generateDataDialog.js | 4 +- .../components/generateVouchersDialog.js | 3 +- .../custom-pages/lingyue/components/list.js | 6 ++ .../custom-pages/lingyue/fundSummary/index.js | 60 +++++++++++++++++++ .../index.js | 4 +- 7 files changed, 97 insertions(+), 7 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js rename pc4mobx/hrmSalary/pages/custom-pages/lingyue/{socialFundSummary => socialSummary}/index.js (92%) diff --git a/pc4mobx/hrmSalary/apis/custom-apis/lingyue/index.js b/pc4mobx/hrmSalary/apis/custom-apis/lingyue/index.js index 4165fdb8..b4056d31 100644 --- a/pc4mobx/hrmSalary/apis/custom-apis/lingyue/index.js +++ b/pc4mobx/hrmSalary/apis/custom-apis/lingyue/index.js @@ -22,18 +22,33 @@ export const exportSalaryReport = (params) => { export const generateSIReport = (params) => { return postFetch("/api/bs/hrmsalary/ly/SIReport/generate", params); }; +export const generateFundReport = (params) => { + return postFetch("/api/bs/hrmsalary/ly/FundReport/generate", params); +}; export const getLYSIReportList = (params) => { return postFetch("/api/bs/hrmsalary/ly/SIReport/list", params); }; +export const getLYFundReportList = (params) => { + return postFetch("/api/bs/hrmsalary/ly/FundReport/list", params); +}; export const getLYSIReportGenerateListSum = (params) => { return postFetch("/api/bs/hrmsalary/ly/SIReport/sum", params); }; +export const getLYFundReportGenerateListSum = (params) => { + return postFetch("/api/bs/hrmsalary/ly/FundReport/sum", params); +}; export const batchDeleteSIReport = (params) => { return postFetch("/api/bs/hrmsalary/ly/SIReport/batchDelete", params); }; +export const batchDeleteFundReport = (params) => { + return postFetch("/api/bs/hrmsalary/ly/FundReport/batchDelete", params); +}; export const exportSIReport = (params) => { return postExportFetch("/api/bs/hrmsalary/ly/socialReport/export", params); }; +export const exportFundReport = (params) => { + return postExportFetch("/api/bs/hrmsalary/ly/fundReport/export", params); +}; export const genAndPreveiw = (params) => { return postFetch("/api/bs/hrmsalary/ly/PZ/genAndPreveiw", params); }; @@ -55,3 +70,6 @@ export const getSalaryReportFFgsList = (params) => { export const getSIReportGmgsList = (params) => { return postFetch("/api/bs/hrmsalary/ly/SIReport/gmgsList", params); }; +export const getFundReportGmgsList = (params) => { + return postFetch("/api/bs/hrmsalary/ly/FundReport/gmgsList", params); +}; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/index.js b/pc4mobx/hrmSalary/pages/custom-pages/index.js index 7fbeb7aa..aefaad67 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/index.js @@ -1,15 +1,18 @@ import React from "react"; import Route from "react-router/lib/Route"; import CustomSalarySummary from "./lingyue/salarySummary"; -import CustomSocialFundSummary from "./lingyue/socialFundSummary"; +import CustomSISummary from "./lingyue/socialSummary"; +import CustomFundSummary from "./lingyue/fundSummary"; import VouncherSummary from "./lingyue/vouncherSummary"; import HistoryVouncherSummary from "./lingyue/historyVouncherSummary"; const CustomRoutes = [ , - , + , + , , diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js index 38ee0712..447224b6 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateDataDialog.js @@ -14,11 +14,13 @@ import { Button, message } from "antd"; import { getSearchs } from "../../../../util"; import * as API from "../../../../apis/custom-apis/lingyue"; import { dataConditions } from "./conditions"; +import { generateFundReport } from "../../../../apis/custom-apis/lingyue"; const getLabel = WeaLocaleProvider.getLabel; const APIFOX = { "salarySum": API.generateSalaryReport, - "socialFundSum": API.generateSIReport + "socialFundSum": API.generateSIReport, + "fundSum": API.generateFundReport }; @inject("LYStore") diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js index 4ae5f7dc..9703cf73 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js @@ -30,7 +30,8 @@ class GenerateVouchersDialog extends Component { commonEnumList({ enumClass: "com.engine.salary.enums.ly.LyPZTypeEnum" }) .then(({ status, data }) => { type === "salarySum" && (data = data.filter(item => !["SBJTPZ", "SBFFPZ", "GJJJTPZ", "GJJFFPZ"].includes(item.enum))); - type === "socialFundSum" && (data = data.filter(item => !["XZJTPZ", "XZFFPZ"].includes(item.enum))); + type === "socialFundSum" && (data = data.filter(item => !["XZJTPZ", "XZFFPZ", "GJJJTPZ", "GJJFFPZ"].includes(item.enum))); + type === "fundSum" && (data = data.filter(item => !["XZJTPZ", "XZFFPZ", "SBJTPZ", "SBFFPZ"].includes(item.enum))); if (status) { this.setState({ conditions: _.map(vouchersConditions, item => ({ diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js index fb9697f2..47986ea3 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js @@ -27,6 +27,12 @@ const interfaceType = { sum: API.getLYSIReportGenerateListSum, export: API.exportSIReport, batchDel: API.batchDeleteSIReport + }, + "fundSum": { + list: API.getLYFundReportList, + sum: API.getLYFundReportGenerateListSum, + export: API.exportFundReport, + batchDel: API.batchDeleteFundReport } }; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js new file mode 100644 index 00000000..c7449075 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js @@ -0,0 +1,60 @@ +/* + * + * 公积金汇总表 + * @Author: 黎永顺 + * @Date: 2024/8/28 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import Layout from "../layout"; +import List from "../components/list"; +import * as API from "../../../../apis/custom-apis/lingyue"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "" }, isQuery: false, lyAuth: false, + companyOpts: [] + }; + this.listRef = null; + } + + componentDidMount() { + API.getLYPermission().then(({ status, data }) => this.setState({ lyAuth: !!status && !!data })); + this.getSIReportGmgsList(); + } + + getSIReportGmgsList = () => { + const { query } = this.state; + const { salaryMonth } = query; + API.getFundReportGmgsList({ salaryMonth }).then(({ status, data }) => { + if (status) this.setState({ companyOpts: _.map(data, o => ({ ...o, name: o.content })) }); + }); + }; + + handleLayoutChange = ({ isQuery, ...val }) => this.setState({ query: { ...this.state.query, ...val } }, + () => { + this.getSIReportGmgsList(); + this.setState({ isQuery }); + }); + + render() { + const { query, isQuery, lyAuth, companyOpts } = this.state; + return ( + + this.listRef = dom} + onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "购买公司全称")}/> + + ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialFundSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialSummary/index.js similarity index 92% rename from pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialFundSummary/index.js rename to pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialSummary/index.js index f40b4d58..1b4a0d22 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialFundSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialSummary/index.js @@ -1,6 +1,6 @@ /* * - * 社保公积金汇总表 + * 社保汇总表 * @Author: 黎永顺 * @Date: 2024/8/28 * @Wechat: @@ -47,7 +47,7 @@ class Index extends Component { render() { const { query, isQuery, lyAuth, companyOpts } = this.state; return ( - this.listRef = dom}