{{ student.studentName }}
- {{ student.studentNo }}
+ {{ student.studentCode }}
{{ student.gender }}
{{ student.phone }}
@@ -963,7 +964,7 @@ const filterStudents = () => {
filteredStudents.value = classStudents.value;
} else {
filteredStudents.value = classStudents.value.filter(
- (student: any) => student.studentName?.includes(studentKeyword.value) || student.studentNo?.includes(studentKeyword.value)
+ (student: any) => student.studentName?.includes(studentKeyword.value) || student.studentCode?.includes(studentKeyword.value)
);
}
};
@@ -989,7 +990,8 @@ const toggleStudentSelection = (student: any, checked: boolean) => {
if (availableScholarshipTypes.value.length === 1) {
const scholarshipType = availableScholarshipTypes.value[0];
if (canSelectScholarshipType(student, scholarshipType)) {
- student.selectedScholarshipType = scholarshipType;
+ // ✅ 创建对象副本,避免引用问题
+ student.selectedScholarshipType = { ...scholarshipType };
updateScholarshipInfo(student);
console.log('🎯 自动选择唯一可用的奖学金类型:', scholarshipType.name);
} else {
@@ -1042,12 +1044,25 @@ const clearSelectedStudents = () => {
/** 更新奖学金信息 */
const updateScholarshipInfo = (student: any) => {
- console.log('🔄 更新奖学金信息:', { studentName: student.studentName, selectedType: student.selectedScholarshipType?.name });
+ console.log('🔄 更新奖学金信息:', {
+ studentName: student.studentName,
+ selectedType: student.selectedScholarshipType?.name,
+ originalType: student.selectedScholarshipType
+ });
if (student.selectedScholarshipType) {
+ // ✅ 立即创建对象副本,确保 v-model 绑定的是副本而不是原始引用
+ student.selectedScholarshipType = { ...student.selectedScholarshipType };
+
+ // 使用副本更新相关字段
student.selectedLevel = student.selectedScholarshipType.levelType;
student.selectedAmount = student.selectedScholarshipType.amount;
+ console.log('✅ 创建奖学金类型副本:', {
+ copy: student.selectedScholarshipType,
+ name: student.selectedScholarshipType.name
+ });
+
// 检查名额是否足够
if (!canSelectScholarshipType(student, student.selectedScholarshipType)) {
ElMessage.warning(`${student.selectedScholarshipType.name} 名额不足,请选择其他类型`);
@@ -1120,7 +1135,7 @@ const submitBatchApplication = async () => {
const studentApplications = selectedStudents.value.map((s: any) => ({
studentId: String(s.studentId || s.id),
studentName: s.studentName,
- studentNo: s.studentNo,
+ studentNo: s.studentCode, // ✅ 修复:使用后端返回的 studentCode 字段作为学号
scholarshipTypeId: s.selectedScholarshipType.id,
deptId: classInfo.value.deptId,
applicationReason: `班主任批量申请 - ${s.selectedScholarshipType.name}`,
diff --git a/web/src/views/jcbt/scholarship/review/index.vue b/web/src/views/jcbt/scholarship/review/index.vue
index ae0ba405..9d8b5300 100644
--- a/web/src/views/jcbt/scholarship/review/index.vue
+++ b/web/src/views/jcbt/scholarship/review/index.vue
@@ -114,6 +114,7 @@
+
@@ -194,6 +195,7 @@
教师推荐
学生申请
+ 教师推荐
自动评定
直接指定
{{ scope.row.applicationType }}
@@ -684,14 +686,25 @@ function handleReview(row) {
console.log('🔍 [DEBUG] handleReview 开始执行');
console.log('🔍 [DEBUG] 传入的row数据:', JSON.stringify(row, null, 2));
- reviewForm.value = {
- id: row.id,
- status: 'APPROVED',
- reviewComment: ''
- };
+ // 先获取完整的申请数据
+ getScholarshipApplication(row.id)
+ .then((response) => {
+ console.log('🔍 [DEBUG] 获取到完整申请数据:', response.data);
- console.log('🔍 [DEBUG] 设置的reviewForm:', JSON.stringify(reviewForm.value, null, 2));
- reviewOpen.value = true;
+ // 设置完整的审核表单数据
+ reviewForm.value = {
+ ...response.data, // 包含所有申请信息
+ status: 'APPROVED', // 默认审核状态
+ reviewComment: '' // 审核意见
+ };
+
+ console.log('🔍 [DEBUG] 设置的完整reviewForm:', JSON.stringify(reviewForm.value, null, 2));
+ reviewOpen.value = true;
+ })
+ .catch((error) => {
+ console.error('❌ [ERROR] 获取申请详情失败:', error);
+ proxy.$modal.msgError('获取申请详情失败');
+ });
}
/** 查看详情 */
diff --git a/web/src/views/jcbt/workstudy/Application/index.vue b/web/src/views/jcbt/workstudy/Application/index.vue
index f3ea20fa..e5da76b0 100644
--- a/web/src/views/jcbt/workstudy/Application/index.vue
+++ b/web/src/views/jcbt/workstudy/Application/index.vue
@@ -171,6 +171,9 @@
@cancel="applyDialogVisible = false"
/>
+
+
+