diff --git a/pc4mobx/hrmSalary/components/CustomSelect/index.js b/pc4mobx/hrmSalary/components/CustomSelect/index.js index 477836fa..afe25b5c 100644 --- a/pc4mobx/hrmSalary/components/CustomSelect/index.js +++ b/pc4mobx/hrmSalary/components/CustomSelect/index.js @@ -55,7 +55,7 @@ class Index extends Component { transitionName="" animation="" multiple={true} - notFoundContent="" + notFoundContent={getLabel(111, "暂无数据")} defaultActiveFirstOption={true} showArrow={true} filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js index 9703cf73..f2fbdfe8 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/generateVouchersDialog.js @@ -48,8 +48,8 @@ class GenerateVouchersDialog extends Component { }); }; save = () => { - const { LYStore: { form }, ffgsqc, salaryMonth, ffgsqcLabel } = this.props; - let payload = { ...form.getFormParams(), salaryMonth, ffgsqc }; + const { LYStore: { form }, ffgsqc, fycdgsqc, jtStatus, ffStatus, salaryMonth, ffgsqcLabel } = this.props; + let payload = { ...form.getFormParams(), salaryMonth, ffgsqc, fycdgsqc, jtStatus, ffStatus }; if (!salaryMonth) { message.warning(getLabel(111, "薪资所属月参数不能为空")); return; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js index 2de53e80..89004519 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/components/list.js @@ -97,7 +97,12 @@ class List extends Component { getLYList = (isSum = true) => { const { query, type, onInit } = this.props, { pageInfo, selectedRowKeys } = this.state; - const payload = { ...pageInfo, ...query, ffgsqc: query.ffgsqc ? query.ffgsqc.split(",") : [] }; + const payload = { + ...pageInfo, ...query, ffgsqc: query.ffgsqc ? query.ffgsqc.split(",") : [], + fycdgsqc: query.fycdgsqc ? query.fycdgsqc.split(",") : [], + ffStatus: query.ffStatus ? query.ffStatus.split(",") : [], + jtStatus: query.jtStatus ? query.jtStatus.split(",") : [] + }; this.setState({ loading: true }); interfaceType[type]["list"](payload).then(async ({ status, data, errormsg }) => { this.setState({ loading: false }); @@ -158,7 +163,10 @@ class List extends Component { message.success(getLabel(111, "操作成功!")); this.setState({ selectedRowKeys: [], pageInfo: { ...this.state.pageInfo, current: 1 } - }, () => this.getLYList()); + }, () => { + this.props.onChangeReport && this.props.onChangeReport(); + this.getLYList(); + }); } else { message.error(errormsg); } @@ -181,7 +189,10 @@ class List extends Component { this.setState({ selectedRowKeys: [], pageInfo: { ...this.state.pageInfo, current: current > totalPage ? totalPage : current } - }, () => this.getLYList()); + }, () => { + this.props.onChangeReport && this.props.onChangeReport(); + this.getLYList(); + }); } else { message.error(errormsg); } @@ -212,7 +223,10 @@ class List extends Component { /> this.setState({ visible: false })} - onSearch={this.getLYList}/> + onSearch={() => { + this.props.onChangeReport && this.props.onChangeReport(); + this.getLYList(); + }}/> this.setState({ voucherDialog: { ...this.state.voucherDialog, visible: false } }, () => this.getLYList())}/> diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js index c7449075..40e21518 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/fundSummary/index.js @@ -19,8 +19,8 @@ class Index extends Component { constructor(props) { super(props); this.state = { - query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "" }, isQuery: false, lyAuth: false, - companyOpts: [] + query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "", fycdgsqc: "", jtStatus: "", ffStatus: "" }, + companyOpts: [], costCompanyOpts: [], isQuery: false, lyAuth: false }; this.listRef = null; } @@ -34,7 +34,10 @@ class Index extends Component { 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 })) }); + if (status) this.setState({ + companyOpts: _.map(data.gmgs, o => ({ ...o, name: o.content })), + costCompanyOpts: _.map(data.fycdgs, o => ({ ...o, name: o.content })) + }); }); }; @@ -45,13 +48,15 @@ class Index extends Component { }); render() { - const { query, isQuery, lyAuth, companyOpts } = this.state; + const { query, isQuery, lyAuth, companyOpts, costCompanyOpts } = this.state; return ( + companyOpts={companyOpts} listRef={this.listRef} costCompanyOpts={costCompanyOpts} + isQuery={isQuery} lyAuth={lyAuth} ffgsqcLabel={getLabel(111, "购买公司全称")} + fycdgsqcLabel={getLabel(111, "费用承担公司")}> this.listRef = dom} - onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "购买公司全称")}/> + onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "购买公司全称")} + onChangeReport={this.getSIReportGmgsList}/> ); } diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/index.less b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/index.less index a52868ad..4d393c35 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/index.less +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/index.less @@ -13,16 +13,15 @@ .lingyue-query { display: flex; - padding: 8px 24px; + flex-wrap: wrap; + padding: 8px 24px 0 24px; background: #FFF; margin-bottom: 16px; - .wea-form-item:last-child { - width: 358px !important; - } - .wea-form-item { - width: 300px; + width: 240px; + margin-right: 8px; + margin-bottom: 8px; .customMuiSelect .ant-select-selection--multiple { max-height: 110px !important; diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js index 7f67e348..6911a3f9 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js @@ -9,9 +9,10 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaDatePicker, WeaFormItem, WeaLocaleProvider, WeaTop } from "ecCom"; -import { Button, Dropdown, Menu } from "antd"; +import { WeaDatePicker, WeaFormItem, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom"; +import { commonEnumList } from "../../../apis/ruleconfig"; import CustomSelect from "../../../components/CustomSelect"; +import { Button, Dropdown, Menu } from "antd"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; @@ -19,12 +20,27 @@ const getLabel = WeaLocaleProvider.getLabel; @inject("taxAgentStore") @observer class Layout extends Component { + constructor(props) { + super(props); + this.state = { options: [] }; + } + + componentDidMount() { + this.getOptions(); + } + + getOptions = () => { + commonEnumList({ enumClass: "com.engine.salary.enums.ly.LyPushStatusEnum" }).then(({ status, data }) => { + if (status) this.setState({ options: _.map(data, o => ({ key: String(o.value), showname: o.defaultLabel })) }); + }); + }; + render() { const { title, query, onChange, listRef, isQuery, lyAuth = false, ffgsqcLabel, taxAgentStore: { salaryManager }, - companyOpts - } = this.props; - const { salaryMonth, ffgsqc } = query; + companyOpts, costCompanyOpts, fycdgsqcLabel + } = this.props, { options } = this.state; + const { salaryMonth, ffgsqc, fycdgsqc, jtStatus, ffStatus } = query; let buttons = [ , listRef.handleOperate("ALLDEL")} @@ -49,10 +65,22 @@ class Layout extends Component { onChange({ ...query, salaryMonth: value, isQuery: !isQuery })}/> - + onChange({ ...query, ffgsqc: value, isQuery: !isQuery })}/> + + onChange({ ...query, fycdgsqc: value, isQuery: !isQuery })}/> + + + onChange({ ...query, jtStatus: value, isQuery: !isQuery })}/> + + + onChange({ ...query, ffStatus: value, isQuery: !isQuery })}/> + {this.props.children} diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/salarySummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/salarySummary/index.js index 147bca7a..5e725f9d 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/salarySummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/salarySummary/index.js @@ -20,8 +20,8 @@ class Index extends Component { constructor(props) { super(props); this.state = { - query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "" }, isQuery: false, lyAuth: false, - companyOpts: [] + query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "", fycdgsqc: "", jtStatus: "", ffStatus: "" }, + companyOpts: [], costCompanyOpts: [], isQuery: false, lyAuth: false }; this.listRef = null; } @@ -35,7 +35,10 @@ class Index extends Component { const { query } = this.state; const { salaryMonth } = query; API.getSalaryReportFFgsList({ salaryMonth }).then(({ status, data }) => { - if (status) this.setState({ companyOpts: _.map(data, o => ({ ...o, name: o.content })) }); + if (status) this.setState({ + companyOpts: _.map(data.ffgs, o => ({ ...o, name: o.content })), + costCompanyOpts: _.map(data.fycdgs, o => ({ ...o, name: o.content })) + }); }); }; handleLayoutChange = ({ isQuery, ...val }) => this.setState({ query: { ...this.state.query, ...val } }, @@ -45,13 +48,15 @@ class Index extends Component { }); render() { - const { query, isQuery, lyAuth, companyOpts } = this.state; + const { query, isQuery, lyAuth, companyOpts, costCompanyOpts } = this.state; return ( + companyOpts={companyOpts} listRef={this.listRef} costCompanyOpts={costCompanyOpts} + isQuery={isQuery} lyAuth={lyAuth} ffgsqcLabel={getLabel(111, "发放公司全称")} + fycdgsqcLabel={getLabel(111, "费用承担公司")}> this.listRef = dom} - onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "发放公司全称")}/> + onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "发放公司全称")} + onChangeReport={this.getSalaryReportFFgsList}/> ); } diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialSummary/index.js index 1b4a0d22..3f697d74 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/socialSummary/index.js @@ -19,8 +19,8 @@ class Index extends Component { constructor(props) { super(props); this.state = { - query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "" }, isQuery: false, lyAuth: false, - companyOpts: [] + query: { salaryMonth: moment().format("YYYY-MM"), ffgsqc: "", fycdgsqc: "", jtStatus: "", ffStatus: "" }, + companyOpts: [], costCompanyOpts: [], isQuery: false, lyAuth: false }; this.listRef = null; } @@ -34,7 +34,10 @@ class Index extends Component { const { query } = this.state; const { salaryMonth } = query; API.getSIReportGmgsList({ salaryMonth }).then(({ status, data }) => { - if (status) this.setState({ companyOpts: _.map(data, o => ({ ...o, name: o.content })) }); + if (status) this.setState({ + companyOpts: _.map(data.gmgs, o => ({ ...o, name: o.content })), + costCompanyOpts: _.map(data.fycdgs, o => ({ ...o, name: o.content })) + }); }); }; @@ -45,13 +48,15 @@ class Index extends Component { }); render() { - const { query, isQuery, lyAuth, companyOpts } = this.state; + const { query, isQuery, lyAuth, companyOpts, costCompanyOpts } = this.state; return ( + companyOpts={companyOpts} listRef={this.listRef} costCompanyOpts={costCompanyOpts} + isQuery={isQuery} lyAuth={lyAuth} ffgsqcLabel={getLabel(111, "购买公司全称")} + fycdgsqcLabel={getLabel(111, "费用承担公司")}> this.listRef = dom} - onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "购买公司全称")}/> + onInit={() => this.forceUpdate()} ffgsqcLabel={getLabel(111, "购买公司全称")} + onChangeReport={this.getSIReportGmgsList}/> ); } diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js index 9ead71b2..f7d33908 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/vouncherSummary/index.js @@ -36,7 +36,8 @@ class Index extends Component { const pzlx = getQueryString("pzlx"); const payload = { ...getURLParameters(window.location.hash), - ffgsqc: decodeURI(getURLParameters(window.location.hash).ffgsqc) + ffgsqc: decodeURI(getURLParameters(window.location.hash).ffgsqc), + fycdgsqc: decodeURI(getURLParameters(window.location.hash).fycdgsqc) }; WeaLoadingGlobal.start(); API.genAndPreveiw(payload).then(({ status, data, errormsg }) => {