release/2.18.2.2412.02-个税
This commit is contained in:
parent
420104e131
commit
e8f820058b
|
|
@ -21,7 +21,7 @@ export default class FormInfo extends Component {
|
||||||
style: { marginLeft: 0 },
|
style: { marginLeft: 0 },
|
||||||
tipPosition: "bottom",
|
tipPosition: "bottom",
|
||||||
labelCol: { span: labelCol },
|
labelCol: { span: labelCol },
|
||||||
wrapperCol: { span: 24 - labelCol }
|
wrapperCol: { span: 22 - labelCol }
|
||||||
};
|
};
|
||||||
const textAreaProps = { minRows: 4, maxRows: 4 };
|
const textAreaProps = { minRows: 4, maxRows: 4 };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ export const taxDetailSettingsConditions = {
|
||||||
domkey: ["freeProperty"],
|
domkey: ["freeProperty"],
|
||||||
fieldcol: 14,
|
fieldcol: 14,
|
||||||
label: "免税性质",
|
label: "免税性质",
|
||||||
labelcol: 4,
|
labelcol: 8,
|
||||||
value: "",
|
value: "",
|
||||||
rules: "required|string",
|
rules: "required|string",
|
||||||
viewAttr: 3
|
viewAttr: 3
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,12 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
import FormInfo from "../../../components/FormInfo";
|
import FormInfo from "../../../components/FormInfo";
|
||||||
import { taxDetailSettingsConditions } from "./columns";
|
import { taxDetailSettingsConditions } from "./columns";
|
||||||
import * as API from "../../../apis/otherDeduct";
|
import * as API from "../../../apis/otherDeduct";
|
||||||
import { Button, message } from "antd";
|
import { Button, message } from "antd";
|
||||||
|
import { toDecimal_n } from "../../../util";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -42,7 +44,7 @@ class DetailSettingsDialog extends Component {
|
||||||
const payload = settingsForm.getFormParams();
|
const payload = settingsForm.getFormParams();
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
API.saveFreeIncome({ ...payload, mainId }).then(({ status, errormsg }) => {
|
API.saveFreeIncome({ ...payload, mainId }).then(({ status, errormsg }) => {
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success(getLabel(111, "操作成功!"));
|
message.success(getLabel(111, "操作成功!"));
|
||||||
this.props.onCancel(this.props.onSuccess());
|
this.props.onCancel(this.props.onSuccess());
|
||||||
|
|
@ -58,6 +60,13 @@ class DetailSettingsDialog extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { otherDeductStore: { settingsForm }, dataType } = this.props, { loading } = this.state;
|
const { otherDeductStore: { settingsForm }, dataType } = this.props, { loading } = this.state;
|
||||||
|
const itemRender = {
|
||||||
|
freeAmount: (field, textAreaProps, form, formParams) => {
|
||||||
|
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }}
|
||||||
|
form={form} formParams={formParams}
|
||||||
|
onBlur={(v) => v && form.updateFields({ freeAmount: { value: toDecimal_n(v, 2) } })}/>);
|
||||||
|
}
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<WeaDialog
|
<WeaDialog
|
||||||
{...this.props} style={{ width: 480, height: 174 }} initLoadCss title={getLabel(111, "明细设置")}
|
{...this.props} style={{ width: 480, height: 174 }} initLoadCss title={getLabel(111, "明细设置")}
|
||||||
|
|
@ -66,7 +75,7 @@ class DetailSettingsDialog extends Component {
|
||||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>
|
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<FormInfo className="form-dialog-layout" center={false}
|
<FormInfo className="form-dialog-layout" center={false} itemRender={itemRender}
|
||||||
form={settingsForm} formFields={taxDetailSettingsConditions[dataType] || []}/>
|
form={settingsForm} formFields={taxDetailSettingsConditions[dataType] || []}/>
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,16 @@ class TaxSetDialog extends Component {
|
||||||
if (status) {
|
if (status) {
|
||||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||||
this.setState({
|
this.setState({
|
||||||
columns,
|
dataSource, pageInfo: { current, pageSize, total },
|
||||||
dataSource, pageInfo: { current, pageSize, total }
|
columns: _.map(columns, o => ({
|
||||||
|
...o, width: o.dataIndex === "operate" && 120,
|
||||||
|
render: (text, record) => o.dataIndex === "operate" ?
|
||||||
|
(<div className="space_div">
|
||||||
|
<a href="javascript:void(0);">{getLabel(111, "编辑")}</a>
|
||||||
|
<a href="javascript:void(0);">{getLabel(111, "删除")}</a>
|
||||||
|
</div>) :
|
||||||
|
(<span>{text}</span>)
|
||||||
|
}))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -93,7 +101,7 @@ class TaxSetDialog extends Component {
|
||||||
</div>
|
</div>
|
||||||
<WeaTable columns={columns} dataSource={dataSource} pagination={pagination} bordered
|
<WeaTable columns={columns} dataSource={dataSource} pagination={pagination} bordered
|
||||||
rowSelection={rowSelection} loading={loading}
|
rowSelection={rowSelection} loading={loading}
|
||||||
scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 112 : 600 }}/>
|
scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 156 : 600 }}/>
|
||||||
<DetailSettingsDialog {...detailSettingsDialog} onCancel={() => this.setState({
|
<DetailSettingsDialog {...detailSettingsDialog} onCancel={() => this.setState({
|
||||||
detailSettingsDialog: { ...detailSettingsDialog, visible: false }
|
detailSettingsDialog: { ...detailSettingsDialog, visible: false }
|
||||||
})} onSuccess={this.getList}/>
|
})} onSuccess={this.getList}/>
|
||||||
|
|
|
||||||
|
|
@ -152,3 +152,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//公共表格操作按钮间距
|
||||||
|
.space_div {
|
||||||
|
a:not(:last-child) {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue