feature/2.12.1.2403.02-薪资核算自定义导出模板设置
This commit is contained in:
parent
8a7f3fcb7a
commit
3ab97c5a70
|
|
@ -31,7 +31,7 @@ class Index extends Component {
|
|||
itemsCheckeds: [], showOnlyChecked: false, tempMangeDialog: { visible: false, salaryAcctRecordId: "" },
|
||||
tempDialog: { visible: false, salaryAcctRecordId: "", id: "", salaryItemIds: [] },
|
||||
tempOptions: [
|
||||
{ key: "", showname: "" },
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
};
|
||||
|
|
@ -45,7 +45,7 @@ class Index extends Component {
|
|||
} else {
|
||||
this.setState({
|
||||
tempOptions: [
|
||||
{ key: "", showname: "" },
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
});
|
||||
|
|
@ -106,8 +106,8 @@ class Index extends Component {
|
|||
const { data: { checkItems: checkeds } } = await getExportField({ salaryAcctRecordId });
|
||||
this.setState({ itemsCheckeds: checkeds });
|
||||
break;
|
||||
case "":
|
||||
this.setState({ itemsCheckeds: "" });
|
||||
case "NULL":
|
||||
this.setState({ itemsCheckeds: [] });
|
||||
break;
|
||||
default:
|
||||
const { data: { checkItems } } = await getExportTemplateForm({ id });
|
||||
|
|
@ -134,7 +134,8 @@ class Index extends Component {
|
|||
}
|
||||
const titleComp = <div className="setHeaderWrapper">
|
||||
<span>{getLabel(111, "选择字段")}</span>
|
||||
<WeaSelect options={tempOptions} style={{ width: 200 }} onChange={this.handleChangeExpTemp}/>
|
||||
<WeaSelect defaultValue="system" options={tempOptions} style={{ width: 200 }}
|
||||
onChange={this.handleChangeExpTemp}/>
|
||||
</div>;
|
||||
return (
|
||||
<WeaDialog
|
||||
|
|
@ -153,11 +154,19 @@ class Index extends Component {
|
|||
buttons={[
|
||||
<Button type="primary" onClick={this.customExportClick}>{getLabel(17416, "导出")}</Button>,
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
tempDialog: { visible: true, salaryAcctRecordId, id: "", salaryItemIds: itemsCheckeds }
|
||||
tempDialog: { visible: true, salaryAcctRecordId, id: "", salaryItemIds: itemsCheckeds },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
})}>{getLabel(111, "存为模板")}</Button>,
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({
|
||||
tempMangeDialog: { visible: true, salaryAcctRecordId }
|
||||
tempMangeDialog: { visible: true, salaryAcctRecordId },
|
||||
tempOptions: [
|
||||
{ key: "NULL", showname: "" },
|
||||
{ key: "system", showname: getLabel(111, "系统模板") }
|
||||
]
|
||||
})}>{getLabel(111, "模板管理")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(31129, "取消")}</Button>
|
||||
]}
|
||||
|
|
@ -196,9 +205,9 @@ class Index extends Component {
|
|||
}, () => this.getExportTemplateList(this.props))}
|
||||
/>
|
||||
{/*模板保存*/}
|
||||
<TempDialog {...tempDialog} onCancel={(isRefresh) => this.setState({
|
||||
<TempDialog {...tempDialog} onCancel={() => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false }
|
||||
})}/>
|
||||
}, () => this.getExportTemplateList(this.props))}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue