From 23f15bd4235577f2ba2bf60bfbb4e647e35c4b86 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, 27 Nov 2023 19:17:44 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42311.02-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E8=B4=A6?= =?UTF-8?q?=E5=A5=97=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ledgerPage/components/ledgerSearchComp.js | 66 +++++++++++++++++++ pc4mobx/hrmSalary/pages/ledgerPage/config.js | 32 +++++++++ pc4mobx/hrmSalary/pages/ledgerPage/index.js | 12 ++-- pc4mobx/hrmSalary/pages/ledgerPage/index.less | 31 +++++++++ pc4mobx/hrmSalary/stores/ledger.js | 1 + 5 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js new file mode 100644 index 00000000..7756173c --- /dev/null +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js @@ -0,0 +1,66 @@ +/* + * Author: 黎永顺 + * name: 薪资账套查询 + * Description: + * Date: 2023/11/27 + */ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import { WeaSwitch } from "comsMobx"; +import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import { Button } from "antd"; +import { searchConditions } from "../config"; + +const getLabel = WeaLocaleProvider.getLabel; + +@inject("ledgerStore") +@observer +class LedgerSearchComp extends Component { + constructor(props) { + super(props); + this.state = { + conditions: [] + }; + } + + componentDidMount() { + const { ledgerStore: { searchForm } } = this.props; + searchForm.initFormFields(searchConditions); + } + + formRender = (form, condition) => { + const { isFormInit } = form, formParams = form.getFormParams(); + let group = []; + isFormInit && condition && condition.map(c => { + let items = []; + c.items.map(fields => { + items.push({ + com: ( + + + ), + colSpan: 2 + }); + }); + group.push( + ); + }); + return group; + }; + + render() { + const { ledgerStore: { searchForm } } = this.props; + return ( +
+ {this.formRender(searchForm, searchConditions)} + +
+ ); + } +} + +export default LedgerSearchComp; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/config.js b/pc4mobx/hrmSalary/pages/ledgerPage/config.js index 1a9f3717..0c56f799 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/config.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/config.js @@ -27,6 +27,38 @@ export const copyConditions = [ defaultshow: true } ]; +export const searchConditions = [ + { + items: [ + { + colSpan: 1, + conditionType: "INPUT", + domkey: ["name"], + fieldcol: 24, + otherParams: { + placeholder: "请输入薪资账套名称" + }, + lanId: 543431, + labelcol: 0, + value: "", + viewAttr: 2 + }, + { + colSpan: 1, + conditionType: "SELECT", + domkey: ["taxAgentId"], + fieldcol: 24, + placeholder: "请选择个税扣缴义务人", + lanId: 543234, + label: "", + labelcol: 0, + value: "", + viewAttr: 2 + } + ], + defaultshow: true + } +]; export const categoryConditions = [ { items: [ diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/index.js b/pc4mobx/hrmSalary/pages/ledgerPage/index.js index 9cef3433..30db032d 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/index.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/index.js @@ -10,6 +10,7 @@ import { WeaInputSearch, WeaTop } from "ecCom"; import { Button } from "antd"; import LedgerTable from "./components/ledgerTable"; import LedgerSlide from "./components/ledgerSlide"; +import LedgerSearchComp from "./components/ledgerSearchComp"; import "./index.less"; @inject("taxAgentStore") @@ -60,11 +61,12 @@ class Index extends Component { type="primary" onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })} >新建, - this.setState({ searchVal })} - onSearch={() => this.setState({ doSearch: !doSearch })} - /> + + // this.setState({ searchVal })} + // onSearch={() => this.setState({ doSearch: !doSearch })} + // /> ]; return ( button { + position: absolute; + right: -70px; + top: 0; + } + + .wea-search-group, .wea-content { + padding: 0; + } + + .wea-form-cell-wrapper { + & > div.wea-form-cell { + padding: 0; + + .wea-form-item { + padding: 0; + } + } + + & > div.wea-form-cell:first-child { + padding-right: 10px; + } + } +} diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js index d1a0860c..8dc46dc8 100644 --- a/pc4mobx/hrmSalary/stores/ledger.js +++ b/pc4mobx/hrmSalary/stores/ledger.js @@ -12,6 +12,7 @@ export class LedgerStore { //重构薪资账套 @observable copyForm = new WeaForm(); // 复制form @observable categoryForm = new WeaForm(); // 新增分类form + @observable searchForm = new WeaForm(); // 查询form /*******************************************************/