From 1de3de5fb52678b8f4e38b727c2c843aeafa0c9d Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Tue, 8 Mar 2022 16:45:33 +0800
Subject: [PATCH] =?UTF-8?q?cumDeduct=E5=88=97=E8=A1=A8=E5=8F=8A=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/importModal/modalStep1.js | 27 ++++++++----
.../pages/dataAcquisition/cumDeduct/index.js | 43 +++++++++++--------
pc4mobx/hrmSalary/stores/cumDeduct.js | 8 ++--
3 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep1.js b/pc4mobx/hrmSalary/components/importModal/modalStep1.js
index ca620e26..c9bf0b1c 100644
--- a/pc4mobx/hrmSalary/components/importModal/modalStep1.js
+++ b/pc4mobx/hrmSalary/components/importModal/modalStep1.js
@@ -1,20 +1,30 @@
import React from 'react'
-import { WeaSteps, WeaDatePicker, WeaInput } from 'ecCom';
+import { WeaSteps, WeaDatePicker, WeaInput, WeaSelect } from 'ecCom';
+import { inject, observer } from 'mobx-react';
import { Upload, Icon, Row, Col, Button } from "antd";
import uploadImg from './upload.svg'
const Dragger = Upload.Dragger;
+@inject("taxAgentStore")
+@observer
export default class ModalStep1 extends React.Component {
constructor(props) {
super(props)
this.state = {
datetime: "",
- personValue: ""
+ taxAgentId: ""
}
}
+
+ componentWillMount() { // 初始化渲染页面
+ const { taxAgentStore: {fetchTaxAgentOption} } = this.props;
+ fetchTaxAgentOption();
+ }
+
render() {
- const { datetime, personValue } = this.state
+ const { datetime, taxAgentId } = this.state
+ const { taxAgentStore: {taxAgentOption} } = this.props;
return (
@@ -34,12 +44,13 @@ export default class ModalStep1 extends React.Component {
个税扣缴义务人
-
{
- this.setState({ personValue: value });
+ options={taxAgentOption}
+ value={taxAgentId}
+ onChange={v => {
+ this.setState({ taxAgentId: v });
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index 96b5d0fe..5c6586a1 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -32,16 +32,17 @@ export default class CumDeduct extends React.Component {
taxAgentId: ""
}
}
-
+
componentWillMount() { // 初始化渲染页面
- const { cumDeductStore: { doInit }, taxAgentStore: {fetchTaxAgentOption} } = this.props;
+ const { cumDeductStore: { doInit }, taxAgentStore: { fetchTaxAgentOption } } = this.props;
doInit();
fetchTaxAgentOption();
}
getSearchsAdQuick() {
const { monthValue, taxAgentId } = this.state;
- const { taxAgentStore: {taxAgentOption }} = this.props;
+
+ const { taxAgentStore: { taxAgentOption }, cumDeductStore: {form, getTableDatas} } = this.props;
return (
@@ -50,7 +51,10 @@ export default class CumDeduct extends React.Component {
value={monthValue}
format="YYYY-MM"
width={200}
- onChange={value => this.setState({ monthValue: value })}
+ onChange={v => {
+ this.setState({monthValue: v})
+ getTableDatas({ declareMonth: [v] })
+ }}
/>
@@ -70,25 +74,26 @@ export default class CumDeduct extends React.Component {
options={taxAgentOption}
value={taxAgentId}
onChange={v => {
- this.setState({ taxAgentId: v });
+ this.setState({taxAgentId: v})
+ getTableDatas({ taxAgentId: v })
}}
/>
- )
+ )
}
render() {
const { cumDeductStore, taxAgentStore } = this.props;
- const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = cumDeductStore;
+ const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = cumDeductStore;
const { taxAgentOption } = taxAgentStore
-
+
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
}
const rightMenu = [// 右键菜单
- {
+ {
key: 'BTN_COLUMN',
icon:
,
content: '显示列定制',
@@ -127,7 +132,7 @@ export default class CumDeduct extends React.Component {
visiable: true
})
}
-
+
const menu = (