考勤引用页面重构

This commit is contained in:
黎永顺 2023-03-01 18:07:49 +08:00
parent fe71ce161b
commit 3d67ee671f
2 changed files with 3 additions and 3 deletions

View File

@ -91,6 +91,7 @@ export const conditions = [
isQuickSearch: false,
label: "类型",
labelcol: 6,
valueList:[],
options: [
{
key: "NUMBER",
@ -110,7 +111,6 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["enableStatus"],
fieldcol: 14,
isQuickSearch: false,
label: "是否启用",
labelcol: 6,
viewAttr: 3,

View File

@ -22,7 +22,7 @@ class AttendanceCustomFieldsModal extends Component {
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible) this.handleResetForm();
if (nextProps.visible !== this.props.visible && nextProps.visible) this.handleResetForm();
}
@ -53,7 +53,7 @@ class AttendanceCustomFieldsModal extends Component {
};
handleResetForm = () => {
const { attendanceStore: { form } } = this.props;
form.resetForm();
form.updateFields({ fieldName: "", fieldType: "NUMBER", enableStatus: "0", description: "" });
};
render() {