101 lines
3.0 KiB
JavaScript
101 lines
3.0 KiB
JavaScript
import React from "react";
|
|
import { WeaDatePicker, WeaDialog, WeaFormItem, WeaHelpfulTip, WeaSelect } from "ecCom";
|
|
import { Button } from "antd";
|
|
import { inject, observer } from "mobx-react";
|
|
import "./index.less";
|
|
|
|
@inject("declareStore", "taxAgentStore")
|
|
@observer
|
|
export default class GenerateModal extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.state = {
|
|
date: "",
|
|
taxAgentId: ""
|
|
};
|
|
}
|
|
|
|
// 生成申报表
|
|
handleGenerate() {
|
|
const {
|
|
declareStore: { saveDeclare }
|
|
} = this.props;
|
|
const { date, taxAgentId } = this.state;
|
|
saveDeclare({ salaryMonthStr: date, taxAgentId }).then(() => {
|
|
this.props.onGenerate();
|
|
});
|
|
}
|
|
|
|
render() {
|
|
const {
|
|
taxAgentStore: { taxAgentAdminOption }
|
|
} = this.props;
|
|
return (
|
|
<WeaDialog
|
|
visible={this.props.visible}
|
|
onCancel={() => this.props.onCancel()}
|
|
initLoadCss
|
|
maxHeight={250}
|
|
className={"generateWapper"}
|
|
buttons={
|
|
[<Button
|
|
type="primary"
|
|
onClick={() => {
|
|
this.handleGenerate();
|
|
}}>
|
|
生成申报表
|
|
</Button>]
|
|
}>
|
|
<div
|
|
style={{
|
|
height: "47px",
|
|
lineHeight: "47px",
|
|
borderBottom: "1px solid #eee"
|
|
}}>
|
|
<span style={{ fontSize: "14px", marginLeft: "20px" }}>申报</span>
|
|
<WeaHelpfulTip
|
|
style={{ float: "right", marginRight: "40px" }}
|
|
width={200}
|
|
title="提示:一个薪资所属月下一个个税扣缴义务人的所有核算数据都归档后才可以申报"
|
|
placement="topLeft"
|
|
/>
|
|
</div>
|
|
<div style={{ marginTop: "10px", padding: "20px 20%" }}>
|
|
<WeaFormItem
|
|
label="薪资所属月"
|
|
style={{ marginBottom: 10 }}
|
|
labelCol={{ span: 8 }}
|
|
wrapperCol={{ span: 16 }}>
|
|
<WeaDatePicker
|
|
style={{ width: "100%" }}
|
|
format="yyyy-MM"
|
|
value={this.state.date}
|
|
onChange={(value) => this.setState({ date: value })}
|
|
/>
|
|
</WeaFormItem>
|
|
<WeaFormItem
|
|
label="个税扣缴义务人"
|
|
style={{ marginBottom: 10 }}
|
|
labelCol={{ span: 8 }}
|
|
wrapperCol={{ span: 16 }}>
|
|
<WeaSelect
|
|
showSearch // 设置select可搜索
|
|
options={taxAgentAdminOption}
|
|
value={this.state.taxAgentId}
|
|
onChange={(taxAgentId) => {
|
|
this.setState({ taxAgentId });
|
|
}}
|
|
/>
|
|
<WeaHelpfulTip
|
|
style={{ position: "absolute", bottom: "8px", right: 0 }}
|
|
width={200}
|
|
title="提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;"
|
|
placement="topLeft"
|
|
/>
|
|
</WeaFormItem>
|
|
</div>
|
|
</WeaDialog>
|
|
);
|
|
}
|
|
}
|