From 1ea3529b5a9958f5d2343bf46bd0e1d762f67915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Sat, 14 Sep 2024 13:56:02 +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 --- .../lingyue/historyVouncherSummary/index.js | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/historyVouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/historyVouncherSummary/index.js index 1b70f6c2..657e1bf2 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/historyVouncherSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/historyVouncherSummary/index.js @@ -9,12 +9,13 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaDatePicker, WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; +import { WeaDatePicker, WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSelect, WeaTable, WeaTop } from "ecCom"; import { message, Modal } from "antd"; import HistoryVouncherDetail from "./historyVouncherDetail"; import * as API from "../../../../apis/custom-apis/lingyue"; import { deleteHistoryVoucher } from "../../../../apis/custom-apis/lingyue"; import moment from "moment"; +import { commonEnumList } from "../../../../apis/ruleconfig"; const getLabel = WeaLocaleProvider.getLabel; @@ -25,14 +26,25 @@ class Index extends Component { super(props); this.state = { dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 }, - query: { salaryMonth: moment().format("YYYY-MM"), frzt: "" }, detail: { visible: false, id: "" } + query: { salaryMonth: moment().format("YYYY-MM"), frzt: "", pzlx: "" }, detail: { visible: false, id: "" }, + pzlxOptions: [] }; } componentDidMount() { + this.init(); this.getHistoryVoucherList(); } + init = () => { + commonEnumList({ enumClass: "com.engine.salary.enums.ly.LyPZTypeEnum" }).then(({ status, data }) => { + if (status) { + this.setState({ + pzlxOptions: _.map(data, item => ({ key: String(item.value), showname: item.defaultLabel })) + }); + } + }); + }; getHistoryVoucherList = () => { const { pageInfo, query } = this.state, { taxAgentStore: { salaryManager } } = this.props; const payload = { ...pageInfo, ...query }; @@ -80,8 +92,8 @@ class Index extends Component { }; render() { - const { query, dataSource, columns, pageInfo, loading, detail } = this.state; - const { salaryMonth, frzt } = query; + const { query, dataSource, columns, pageInfo, loading, detail, pzlxOptions } = this.state; + const { salaryMonth, frzt, pzlx } = query; const pagination = { ...pageInfo, showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`, @@ -109,6 +121,12 @@ class Index extends Component { pageInfo: { ...pageInfo, current: 1 } }, () => this.getHistoryVoucherList())}/> , + + this.setState({ + query: { ...query, pzlx: value }, + pageInfo: { ...pageInfo, current: 1 } + }, () => this.getHistoryVoucherList())}/> + , this.setState({ query: { ...query, frzt: value } })} onSearch={() => this.setState({