feature/2.9.42311.02-社保核算以及薪资账套查询优化
This commit is contained in:
parent
115a0ee64f
commit
23f15bd423
|
|
@ -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: (
|
||||||
|
<WeaFormItem label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||||
|
tipPosition="bottom"
|
||||||
|
>
|
||||||
|
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||||
|
</WeaFormItem>),
|
||||||
|
colSpan: 2
|
||||||
|
});
|
||||||
|
});
|
||||||
|
group.push(
|
||||||
|
<WeaSearchGroup col={2} needTigger={true} title={c.title} showGroup={c.defaultshow} center={false}
|
||||||
|
items={items}/>);
|
||||||
|
});
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { ledgerStore: { searchForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<div className="ledgerSearch-Wrapper">
|
||||||
|
{this.formRender(searchForm, searchConditions)}
|
||||||
|
<Button type="primary">{getLabel(388113, "搜索")}</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LedgerSearchComp;
|
||||||
|
|
@ -27,6 +27,38 @@ export const copyConditions = [
|
||||||
defaultshow: true
|
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 = [
|
export const categoryConditions = [
|
||||||
{
|
{
|
||||||
items: [
|
items: [
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import { WeaInputSearch, WeaTop } from "ecCom";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import LedgerTable from "./components/ledgerTable";
|
import LedgerTable from "./components/ledgerTable";
|
||||||
import LedgerSlide from "./components/ledgerSlide";
|
import LedgerSlide from "./components/ledgerSlide";
|
||||||
|
import LedgerSearchComp from "./components/ledgerSearchComp";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
@inject("taxAgentStore")
|
@inject("taxAgentStore")
|
||||||
|
|
@ -60,11 +61,12 @@ class Index extends Component {
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}
|
onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}
|
||||||
>新建</Button>,
|
>新建</Button>,
|
||||||
<WeaInputSearch
|
<LedgerSearchComp />
|
||||||
value={searchVal} placeholder="请输入薪资账套名称"
|
// <WeaInputSearch
|
||||||
onChange={searchVal => this.setState({ searchVal })}
|
// value={searchVal} placeholder="请输入薪资账套名称"
|
||||||
onSearch={() => this.setState({ doSearch: !doSearch })}
|
// onChange={searchVal => this.setState({ searchVal })}
|
||||||
/>
|
// onSearch={() => this.setState({ doSearch: !doSearch })}
|
||||||
|
// />
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<WeaTop
|
<WeaTop
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,34 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ledgerSearch-Wrapper {
|
||||||
|
min-width: 350px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: 70px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
& > 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export class LedgerStore {
|
||||||
//重构薪资账套
|
//重构薪资账套
|
||||||
@observable copyForm = new WeaForm(); // 复制form
|
@observable copyForm = new WeaForm(); // 复制form
|
||||||
@observable categoryForm = new WeaForm(); // 新增分类form
|
@observable categoryForm = new WeaForm(); // 新增分类form
|
||||||
|
@observable searchForm = new WeaForm(); // 查询form
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue