From 510e46045e174eef78caebca58e0649f286807a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 23 Oct 2023 18:06:09 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42310.01-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archives/config/index.js | 44 +++++++++++++++++-- .../archives/index.less | 14 ++++++ .../archives/operateLogDialog/index.js | 10 ++--- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js index 84443fb2..e4e94622 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/config/index.js @@ -1,3 +1,10 @@ +import { WeaSwitch } from "comsMobx"; +import { Button } from "antd"; +import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom"; + +const getKey = WeaTools.getKey; +const getLabel = WeaLocaleProvider.getLabel; + export const tabCondition = [ { color: "#000000", @@ -61,10 +68,10 @@ export const logConditions = [ type: "1" }, domkey: ["employeeId"], - fieldcol: 10, + fieldcol: 17, label: "对象", lanId: 106, - labelcol: 4, + labelcol: 7, value: "" }, { @@ -90,13 +97,42 @@ export const logConditions = [ type: "1" }, domkey: ["operator"], - fieldcol: 10, + fieldcol: 17, label: "操作人", lanId: 111, - labelcol: 4, + labelcol: 7, value: "" } ], defaultshow: true } ]; +export const getLogSearchsForm = (form, condition, onSearch = () => void (0)) => { + const { isFormInit } = form; + const formParams = form.getFormParams(); + let group = []; + isFormInit && condition && condition.map(c => { + let items = []; + c.items.map(fields => { + items.push({ + com: ( + + + { + getKey(fields) === "operator" && + {getLabel(388113, "搜索")} + } + ), + colSpan: 1 + }); + }); + group.push( + ); + }); + return group; +}; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less index 6d62dff0..59293057 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less @@ -99,6 +99,20 @@ width: 100%; height: 100%; + .wea-search-group { + padding: 0; + margin-bottom: 10px; + background: #FFF; + + .wea-form-cell { + padding: 0; + + .wea-form-item { + padding: 10px; + } + } + } + .logTable { background: #FFFFFF; } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/operateLogDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/operateLogDialog/index.js index 99f93e32..d7f65def 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/operateLogDialog/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/operateLogDialog/index.js @@ -8,8 +8,7 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom"; import { getAdjustHistoryList } from "../../../../apis/archive"; -import { logConditions } from "../config"; -import { getSearchs } from "../../../../util"; +import { getLogSearchsForm, logConditions } from "../config"; import moment from "moment"; const getLabel = WeaLocaleProvider.getLabel; @@ -46,7 +45,8 @@ class Index extends Component { getAdjustHistoryList = () => { const { pageInfo } = this.state; - const payload = { ...pageInfo }; + const { archivesStore: { logForm } } = this.props; + const payload = { ...pageInfo, ...logForm.getFormParams() }; this.setState({ loading: true }); getAdjustHistoryList(payload).then(({ status, data }) => { this.setState({ loading: false }); @@ -86,7 +86,7 @@ class Index extends Component { }, () => this.getAdjustHistoryList()); } }; - const scrollHeight = this.logRef ? this.logRef.state.height - 135 : 606.6; + const scrollHeight = this.logRef ? this.logRef.state.height - 210 : 606.6; return ( - {getSearchs(logForm, conditions, 4, false)} + {getLogSearchsForm(logForm, conditions, () => this.getAdjustHistoryList())}