salary-management-front/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/accountDialog.js

91 lines
2.4 KiB
JavaScript

/*
* Author: 黎永顺
* Description: 核算弹框
* Date: 2022-04-21 15:16:18
* LastEditTime: 2022-06-28 15:52:31
*/
import React, { Component } from "react";
import { Button, Form, Input } from "antd";
import { WeaDatePicker, WeaDialog, WeaSelect } from "ecCom";
import "./index.less";
const createForm = Form.create;
const FormItem = Form.Item;
class Accountdialog extends Component {
constructor(props) {
super(props);
this.state = {};
}
handleSubmit = e => {
const { onOk } = this.props;
e.preventDefault();
this.props.form.validateFields((errors, values) => {
if (!!errors) {
return;
}
onOk(values);
});
};
render() {
const { getFieldProps } = this.props.form;
const formItemLayout = {
labelCol: { span: 7 },
wrapperCol: { span: 12 }
};
return (
<WeaDialog
{...this.props}
style={{ width: 520 }}
initLoadCss
className="accountDialogWrapper"
buttons={[
<Button
type="primary"
onClick={this.handleSubmit}
loading={this.props.loading}>
保存并进入核算
</Button>
]}>
<Form horizontal form={this.props.form} style={{ marginTop: 16 }}>
<FormItem {...formItemLayout} label="账单月份">
<WeaDatePicker
viewAttr={3}
style={{ width: "100%" }}
format="YYYY-MM"
{...getFieldProps("billMonth", {
initialValue: new Date(),
rules: [{ required: true, message: "请选择日期" }]
})}
/>
</FormItem>
{/* {
this.props.isAdmin && */}
<FormItem {...formItemLayout} label="个税扣缴义务人">
<WeaSelect
style={{ width: "100%" }}
viewAttr={3}
options={this.props.options}
{...getFieldProps("paymentOrganization", {
initialValue: "",
rules: [{ required: true, message: "请选择个税扣缴义务人" }]
})}
/>
</FormItem>
{/* } */}
<FormItem {...formItemLayout} label="备注">
<Input
type="textarea"
{...getFieldProps("remarks", { initialValue: "" })}
/>
</FormItem>
</Form>
</WeaDialog>
);
}
}
export default createForm()(Accountdialog);