custom/陕西万众-薪资账套薪资核算配置

新增模板查询功能
This commit is contained in:
黎永顺 2024-01-08 11:37:53 +08:00
parent bc1fd3f5dc
commit 0b8c335f0f
2 changed files with 7 additions and 5 deletions

View File

@ -57,8 +57,8 @@ class Index extends Component {
}))
]
}, () => {
isRefresh && this.setState({
selectedKey: _.last(this.state.tabInfo).tabKey
!_.isNil(isRefresh) && this.setState({
selectedKey: isRefresh ? this.state.selectedKey : _.last(this.state.tabInfo).tabKey
}, () => this.calcTableRef.wrappedInstance.queryCalcResultList());
});
}
@ -157,7 +157,7 @@ class Index extends Component {
onCancel={(isRefresh) => this.setState({
sxwzTemplDialog: { ...sxwzTemplDialog, visible: false, templateId: "" }
}, () => {
isRefresh && this.init(isRefresh);
!_.isNil(isRefresh) && this.init(isRefresh);
})}/>
</div>
);

View File

@ -33,7 +33,9 @@ class SxwzEstablishTempDialog extends Component {
const { calculateStore: { tmplForm, initTmplForm }, salaryAcctRecordId, templateId } = nextProps;
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { data } = await getImportField({ salaryAcctRecordId });
const { data: formData } = templateId ? await getTemplateForm({ templateId }) : { data: {} };
const { data: formData } = templateId ?
await getTemplateForm({ templateId, salaryAcctRecordId }) :
{ data: {} };
const { itemsByGroup } = data;
this.setState({
conditions: _.map(sxwzTempConditions, item => ({
@ -127,7 +129,7 @@ class SxwzEstablishTempDialog extends Component {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功"));
this.props.onCancel(true);
this.props.onCancel(Boolean(id));
} else {
message.error(errormsg);
}