feat(员工信息): 添加转正记录查看功能并优化状态显示
- 在员工信息页面添加转正记录查看按钮和对话框 - 将超过90天未转正的状态显示从warning改为danger - 移除表单中未使用的备注和附件字段 - 修改综合报表的时间参数命名以保持一致性
This commit is contained in:
@@ -106,6 +106,7 @@
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button v-if="scope.row.isLeave === 0 && scope.row.isRegular === 0" size="mini" type="text" icon="el-icon-check"
|
||||
@click="handleResignation(scope.row)">转正</el-button>
|
||||
<el-button v-if="scope.row.isRegular === 1" size="mini" type="text" icon="el-icon-view" @click="handleViewRegular(scope.row)">转正记录</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -232,22 +233,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<!-- 备注和附件 -->
|
||||
<el-card class="mb-4" shadow="hover">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="!form.infoId">
|
||||
<el-form-item label="附件" prop="attachment">
|
||||
<file-upload v-model="attachment"></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -286,13 +271,34 @@
|
||||
<el-button @click="cancelResignation">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看转正记录对话框 -->
|
||||
<el-dialog title="转正记录" :visible.sync="regularRecordOpen" width="500px" append-to-body>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="转正时间">
|
||||
{{ regularRecord.changeTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="转正原因">
|
||||
{{ regularRecord.changeReason }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="负责人">
|
||||
{{ regularRecord.changeHandler }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-upload v-model="regularRecord.attachment"></file-upload>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
{{ regularRecord.remark }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmployeeInfo, getEmployeeInfo, delEmployeeInfo, updateEmployeeInfo } from "@/api/wms/employeeInfo";
|
||||
import { listDept } from "@/api/wms/dept";
|
||||
import { employeeEntry, employeeLeave, employeeRegular } from '@/api/wms/employeeChange'
|
||||
import { employeeEntry, employeeRegular, listEmployeeChange } from '@/api/wms/employeeChange'
|
||||
|
||||
export default {
|
||||
name: "EmployeeInfo",
|
||||
@@ -360,7 +366,17 @@ export default {
|
||||
}
|
||||
],
|
||||
},
|
||||
resignationAttachment: undefined
|
||||
resignationAttachment: undefined,
|
||||
// 转正记录相关
|
||||
regularRecordOpen: false,
|
||||
regularRecord: {
|
||||
name: undefined,
|
||||
changeTime: undefined,
|
||||
changeReason: undefined,
|
||||
changeHandler: undefined,
|
||||
attachment: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
};
|
||||
},
|
||||
dicts: ['hrm_employee_education'],
|
||||
@@ -383,6 +399,17 @@ export default {
|
||||
this.deptList = response.data;
|
||||
});
|
||||
},
|
||||
|
||||
/** 查询转正记录 */
|
||||
getRegularRecords() {
|
||||
listEmployeeChange({
|
||||
infoId: this.form.infoId,
|
||||
changeType: "2"
|
||||
}).then(response => {
|
||||
this.regularRecord = response.rows[0];
|
||||
});
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@@ -462,20 +489,6 @@ export default {
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
employeeEntry({
|
||||
changeType: 0,
|
||||
changeTime: this.form.entryTime,
|
||||
changeHandler: this.$store.getters.nickName,
|
||||
attachment: this.attachment,
|
||||
...this.form
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("员工入职成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -581,7 +594,7 @@ export default {
|
||||
type = 'info';
|
||||
} else if (diffDays >= 90) {
|
||||
// 3个月以上未转正
|
||||
type = 'warning';
|
||||
type = 'danger';
|
||||
}
|
||||
} else {
|
||||
// 已转正
|
||||
@@ -589,6 +602,20 @@ export default {
|
||||
}
|
||||
|
||||
return { days: diffDays, type, status };
|
||||
},
|
||||
|
||||
/** 查看转正记录 */
|
||||
handleViewRegular(row) {
|
||||
this.form = row;
|
||||
this.getRegularRecords();
|
||||
this.regularRecordOpen = true;
|
||||
},
|
||||
|
||||
/** 下载附件 */
|
||||
downloadAttachment(attachment) {
|
||||
if (attachment) {
|
||||
window.open(attachment);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -587,7 +587,7 @@ export default {
|
||||
type = 'info';
|
||||
} else if (diffDays >= 90) {
|
||||
// 3个月以上未转正
|
||||
type = 'warning';
|
||||
type = 'danger';
|
||||
}
|
||||
} else {
|
||||
// 已转正
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<el-row>
|
||||
<el-form label-width="80px" inline>
|
||||
<el-form-item label="开始时间" prop="startDate">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.startDate" type="date" value-format="yyyy-MM-dd"
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeStart" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="选择开始日期" @change="handleDateChange"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endDate">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.endDate" type="date" value-format="yyyy-MM-dd"
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeEnd" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="选择结束日期" @change="handleDateChange"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||
|
||||
Reference in New Issue
Block a user