wuzhen update
This commit is contained in:
commit
0037cb4e7d
1503 files changed
+74822
-196654
No files matched your search
@@ -149,8 +149,11 @@
|
||||
<el-table-column prop="studentCode" label="学号" width="120" />
|
||||
<el-table-column prop="studentName" label="姓名" width="100" />
|
||||
<el-table-column prop="gender" label="性别" width="80" />
|
||||
<<<<<<< HEAD
|
||||
<el-table-column prop="collegeName" label="学院" width="120" />
|
||||
<el-table-column prop="majorName" label="专业" width="120" />
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
<el-table-column prop="phone" label="联系方式" width="130" />
|
||||
<el-table-column prop="email" label="邮箱" />
|
||||
<el-table-column label="在校状态" width="100">
|
||||
|
||||
@@ -12,20 +12,34 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="学号" prop="studentNo">
|
||||
<el-input
|
||||
v-model="queryParams.studentNo"
|
||||
=======
|
||||
<el-form-item label="学号" prop="studentCode">
|
||||
<el-input
|
||||
v-model="queryParams.studentCode"
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
placeholder="请输入学号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="申请状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择申请状态" clearable>
|
||||
<el-option label="草稿" value="draft" />
|
||||
<el-option label="待审核" value="waiting" />
|
||||
<el-option label="已完成" value="complete" />
|
||||
<el-option label="已拒绝" value="rejected" />
|
||||
=======
|
||||
<el-form-item label="申请状态" prop="applicationStatus">
|
||||
<el-select v-model="queryParams.applicationStatus" placeholder="请选择申请状态" clearable>
|
||||
<el-option label="草稿" value="draft" />
|
||||
<el-option label="已提交" value="submitted" />
|
||||
<el-option label="已审核" value="reviewed" />
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -75,6 +89,7 @@
|
||||
<el-col :span="24">
|
||||
<el-table v-loading="loading" :data="applicationList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<<<<<<< HEAD
|
||||
<el-table-column label="学号" align="center" prop="studentNo" min-width="120" />
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
|
||||
<el-table-column label="学院" align="center" prop="collegeName" min-width="120" />
|
||||
@@ -104,11 +119,41 @@
|
||||
<el-table-column label="申请时间" align="center" prop="createTime" min-width="160">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
=======
|
||||
<el-table-column label="学号" align="center" prop="studentCode" min-width="120" />
|
||||
<el-table-column label="学生姓名" align="center" prop="studentName" min-width="100" />
|
||||
<el-table-column label="班级" align="center" prop="className" min-width="120" />
|
||||
<el-table-column label="奖学金类型" align="center" prop="scholarshipType" min-width="120" />
|
||||
<el-table-column label="等级" align="center" prop="scholarshipLevel" min-width="80" />
|
||||
<el-table-column label="金额" align="center" prop="amount" min-width="100">
|
||||
<template #default="scope">
|
||||
<span class="text-primary font-bold">¥{{ scope.row.amount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请状态" align="center" prop="applicationStatus" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.applicationStatus === 'draft'" type="info">草稿</el-tag>
|
||||
<el-tag v-else-if="scope.row.applicationStatus === 'submitted'" type="warning">已提交</el-tag>
|
||||
<el-tag v-else-if="scope.row.applicationStatus === 'reviewed'" type="success">已审核</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" align="center" prop="auditStatus" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.auditStatus === 'pending'" type="warning">待审核</el-tag>
|
||||
<el-tag v-else-if="scope.row.auditStatus === 'approved'" type="success">通过</el-tag>
|
||||
<el-tag v-else-if="scope.row.auditStatus === 'rejected'" type="danger">拒绝</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" prop="applicationTime" min-width="160">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.applicationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<<<<<<< HEAD
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@@ -116,6 +161,9 @@
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['jcbt:scholarshipApplication:edit']"
|
||||
></el-button>
|
||||
=======
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['jcbt:scholarshipApplication:edit']"></el-button>
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['jcbt:scholarshipApplication:remove']"></el-button>
|
||||
@@ -169,6 +217,7 @@
|
||||
v-for="type in availableScholarshipTypes"
|
||||
:key="type.id"
|
||||
class="mr-2 mb-2"
|
||||
<<<<<<< HEAD
|
||||
:type="getQuotaStatusType(type)"
|
||||
>
|
||||
<div class="flex flex-col">
|
||||
@@ -207,6 +256,14 @@
|
||||
总选择学生数: {{ selectedStudents.length }} 人
|
||||
</div>
|
||||
</div>
|
||||
=======
|
||||
type="success"
|
||||
>
|
||||
{{ type.name }} - {{ type.levelType }} (¥{{ type.amount }})
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -278,11 +335,16 @@
|
||||
<div class="flex items-start space-x-4">
|
||||
<el-checkbox
|
||||
:model-value="isStudentSelected(student.id)"
|
||||
<<<<<<< HEAD
|
||||
@change="(val) => toggleStudentSelection(student, !!val)"
|
||||
=======
|
||||
@change="toggleStudentSelection(student, $event)"
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
/>
|
||||
<div class="flex-1">
|
||||
<div class="student-basic-info flex items-center space-x-4 mb-2">
|
||||
<span class="font-bold">{{ student.studentName }}</span>
|
||||
<<<<<<< HEAD
|
||||
<span class="text-gray-600">{{ student.studentNo }}</span>
|
||||
<span class="text-gray-500">{{ student.gender }}</span>
|
||||
<span class="text-gray-500">{{ student.phone }}</span>
|
||||
@@ -293,6 +355,12 @@
|
||||
<span v-if="student.className">{{ student.className }}</span>
|
||||
<span v-if="student.grade">{{ student.grade }}级</span>
|
||||
</div>
|
||||
=======
|
||||
<span class="text-gray-600">{{ student.studentCode }}</span>
|
||||
<span class="text-gray-500">{{ student.gender }}</span>
|
||||
<span class="text-gray-500">{{ student.phone }}</span>
|
||||
</div>
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
|
||||
<div v-if="isStudentSelected(student.id)" class="scholarship-selection mt-3 p-3 bg-gray-50 rounded">
|
||||
<div class="grid grid-cols-3 gap-4">
|
||||
@@ -309,7 +377,10 @@
|
||||
:key="type.id"
|
||||
:label="`${type.name} (¥${type.amount})`"
|
||||
:value="type"
|
||||
<<<<<<< HEAD
|
||||
:disabled="isScholarshipTypeDisabled(student, type)"
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -317,7 +388,11 @@
|
||||
<label class="block text-sm font-medium mb-1">等级</label>
|
||||
<el-input
|
||||
v-model="student.selectedLevel"
|
||||
<<<<<<< HEAD
|
||||
:value="String(student.selectedScholarshipType?.levelType || '')"
|
||||
=======
|
||||
:value="student.selectedScholarshipType?.levelType || ''"
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
readonly
|
||||
/>
|
||||
</div>
|
||||
@@ -361,8 +436,11 @@
|
||||
|
||||
<script setup name="ScholarshipApplication" lang="ts">
|
||||
import { ref, reactive, computed, getCurrentInstance, ComponentInternalInstance, onMounted, nextTick } from 'vue';
|
||||
<<<<<<< HEAD
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ElMessage } from 'element-plus';
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
import type { FormInstance, DateModelType } from 'element-plus';
|
||||
import { Search, Plus, Edit, Delete, Refresh } from '@element-plus/icons-vue';
|
||||
|
||||
@@ -377,7 +455,10 @@ import {
|
||||
getClassInfoByTeacher,
|
||||
getClassStudents,
|
||||
getScholarshipTypesByBatch,
|
||||
<<<<<<< HEAD
|
||||
getScholarshipTypesWithQuota,
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
batchSubmitByTeacher
|
||||
} from '@/api/jcbt/scholarshipApplication';
|
||||
|
||||
@@ -386,27 +467,45 @@ import {
|
||||
getScholarshipBatchByStatus
|
||||
} from '@/api/jcbt/scholarshipBatch';
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 导入用户状态管理
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
|
||||
// 导入路由
|
||||
const router = useRouter();
|
||||
|
||||
=======
|
||||
// 导入通用类型
|
||||
import type { PageQuery } from '@/utils/ruoyi';
|
||||
|
||||
// 导入用户状态管理
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
// 本地类型定义
|
||||
interface ScholarshipApplicationVO {
|
||||
id?: number | string;
|
||||
batchId?: number | string;
|
||||
<<<<<<< HEAD
|
||||
studentId?: string | number;
|
||||
studentName?: string;
|
||||
studentNo?: string;
|
||||
=======
|
||||
studentId?: string;
|
||||
studentName?: string;
|
||||
studentCode?: string;
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
classId?: number | string;
|
||||
scholarshipTypeId?: number | string;
|
||||
scholarshipLevel?: string;
|
||||
amount?: number;
|
||||
applicationStatus?: string;
|
||||
auditStatus?: string;
|
||||
<<<<<<< HEAD
|
||||
currentStatus?: string;
|
||||
status?: string; // 前端兼容字段,与currentStatus保持一致
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
applicationTime?: string;
|
||||
createTime?: string;
|
||||
}
|
||||
@@ -415,6 +514,7 @@ interface QueryParams {
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
studentName?: string;
|
||||
<<<<<<< HEAD
|
||||
studentNo?: string;
|
||||
status?: string;
|
||||
}
|
||||
@@ -434,6 +534,15 @@ interface ScholarshipApplicationQuery {
|
||||
studentNo?: string;
|
||||
studentName?: string;
|
||||
applicantId?: string | number;
|
||||
=======
|
||||
studentCode?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
interface BatchQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
status?: string;
|
||||
}
|
||||
|
||||
@@ -448,6 +557,15 @@ interface ScholarshipBatchVO {
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
interface ScholarshipBatchQuery {
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
// 用户状态管理
|
||||
@@ -467,7 +585,11 @@ const queryParams = ref<QueryParams>({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentName: '',
|
||||
<<<<<<< HEAD
|
||||
studentNo: '',
|
||||
=======
|
||||
studentCode: '',
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
status: ''
|
||||
});
|
||||
|
||||
@@ -528,6 +650,7 @@ const rules = reactive({
|
||||
/** 查询奖学金申请列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
<<<<<<< HEAD
|
||||
const res = await listScholarshipApplication(queryParams.value);
|
||||
console.log('=== API响应调试 ===');
|
||||
console.log('完整响应:', res);
|
||||
@@ -536,6 +659,22 @@ const getList = async () => {
|
||||
applicationList.value = res.rows || [];
|
||||
total.value = res.total || 0;
|
||||
loading.value = false;
|
||||
=======
|
||||
try {
|
||||
const res: any = await listScholarshipApplication(queryParams.value);
|
||||
// 处理响应数据结构
|
||||
if (res.data) {
|
||||
applicationList.value = res.data.rows || res.data.list || res.data || [];
|
||||
total.value = res.data.total || 0;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取列表失败:', error);
|
||||
applicationList.value = [];
|
||||
total.value = 0;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
@@ -608,6 +747,7 @@ const handleAdd = async () => {
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: ScholarshipApplicationVO) => {
|
||||
<<<<<<< HEAD
|
||||
if (!row || !row.id) {
|
||||
ElMessage.error('请选择要修改的申请记录');
|
||||
return;
|
||||
@@ -621,6 +761,9 @@ const handleUpdate = async (row?: ScholarshipApplicationVO) => {
|
||||
|
||||
// 跳转到编辑页面
|
||||
router.push(`/jcbt/scholarship/application/form/${row.id}`);
|
||||
=======
|
||||
console.log('修改功能暂未实现', row);
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
@@ -701,7 +844,11 @@ const getTeacherClassInfo = async () => {
|
||||
/** 设置默认的班级信息 */
|
||||
const setDefaultClassInfo = () => {
|
||||
classInfo.value = {
|
||||
<<<<<<< HEAD
|
||||
teacherId: String(userStore.userId || ''),
|
||||
=======
|
||||
teacherId: userStore.userId || '',
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
collegeName: '',
|
||||
majorName: '',
|
||||
className: '',
|
||||
@@ -763,6 +910,7 @@ const handleBatchChange = async (batch: ScholarshipBatchVO) => {
|
||||
if (batch) {
|
||||
form.value.batchId = batch.id;
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 获取该批次可申请的奖学金类型(带名额信息)
|
||||
try {
|
||||
console.log('🎯 获取奖学金类型,批次ID:', batch.id, '班级ID:', classInfo.value.classId);
|
||||
@@ -780,11 +928,20 @@ const handleBatchChange = async (batch: ScholarshipBatchVO) => {
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('❌ 获取奖学金类型失败:', error);
|
||||
=======
|
||||
// 获取该批次可申请的奖学金类型
|
||||
try {
|
||||
const res: any = await getScholarshipTypesByBatch(batch.id);
|
||||
availableScholarshipTypes.value = res.data || [];
|
||||
} catch (error) {
|
||||
console.error('获取奖学金类型失败:', error);
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
availableScholarshipTypes.value = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
/** 获取名额状态对应的标签类型 */
|
||||
const getQuotaStatusType = (type: any) => {
|
||||
if (!type.hasQuota && type.quotaStatus === 'unlimited') {
|
||||
@@ -946,6 +1103,8 @@ const isScholarshipTypeDisabled = (student: any, scholarshipType: any) => {
|
||||
return false;
|
||||
};
|
||||
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
/** 筛选学生 */
|
||||
const filterStudents = () => {
|
||||
if (!studentKeyword.value) {
|
||||
@@ -953,7 +1112,11 @@ const filterStudents = () => {
|
||||
} else {
|
||||
filteredStudents.value = classStudents.value.filter((student: any) =>
|
||||
student.studentName?.includes(studentKeyword.value) ||
|
||||
<<<<<<< HEAD
|
||||
student.studentNo?.includes(studentKeyword.value)
|
||||
=======
|
||||
student.studentCode?.includes(studentKeyword.value)
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -968,6 +1131,7 @@ const toggleStudentSelection = (student: any, checked: boolean) => {
|
||||
console.log('🔄 切换学生选择状态:', { student, checked });
|
||||
|
||||
if (checked) {
|
||||
<<<<<<< HEAD
|
||||
// 直接使用原始学生对象,初始化奖学金相关字段
|
||||
student.selectedScholarshipType = null;
|
||||
student.selectedLevel = '';
|
||||
@@ -986,12 +1150,22 @@ const toggleStudentSelection = (student: any, checked: boolean) => {
|
||||
ElMessage.warning(`${scholarshipType.name} 名额已满,无法自动选择`);
|
||||
}
|
||||
}
|
||||
=======
|
||||
selectedStudents.value.push({
|
||||
...student,
|
||||
selectedScholarshipType: null,
|
||||
selectedLevel: '',
|
||||
selectedAmount: ''
|
||||
});
|
||||
console.log('✅ 添加学生到选择列表:', student.studentName);
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
} else {
|
||||
const index = selectedStudents.value.findIndex((s: any) => s.id === student.id);
|
||||
if (index > -1) {
|
||||
selectedStudents.value.splice(index, 1);
|
||||
console.log('❌ 从选择列表移除学生:', student.studentName);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
// 清理原始学生对象的奖学金相关字段
|
||||
student.selectedScholarshipType = null;
|
||||
student.selectedLevel = '';
|
||||
@@ -1004,6 +1178,11 @@ const toggleStudentSelection = (student: any, checked: boolean) => {
|
||||
nextTick(() => {
|
||||
// 强制更新响应式数据
|
||||
});
|
||||
=======
|
||||
}
|
||||
|
||||
console.log('📊 当前选择的学生数量:', selectedStudents.value.length);
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
};
|
||||
|
||||
/** 全选学生 */
|
||||
@@ -1032,6 +1211,7 @@ const clearSelectedStudents = () => {
|
||||
|
||||
/** 更新奖学金信息 */
|
||||
const updateScholarshipInfo = (student: any) => {
|
||||
<<<<<<< HEAD
|
||||
console.log('🔄 更新奖学金信息:', { studentName: student.studentName, selectedType: student.selectedScholarshipType?.name });
|
||||
|
||||
if (student.selectedScholarshipType) {
|
||||
@@ -1062,20 +1242,29 @@ const updateScholarshipInfo = (student: any) => {
|
||||
// 清空选择时也要清空相关字段
|
||||
student.selectedLevel = '';
|
||||
student.selectedAmount = '';
|
||||
=======
|
||||
if (student.selectedScholarshipType) {
|
||||
student.selectedLevel = student.selectedScholarshipType.level;
|
||||
student.selectedAmount = student.selectedScholarshipType.amount;
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
}
|
||||
};
|
||||
|
||||
/** 提交批量申请 */
|
||||
const submitBatchApplication = async () => {
|
||||
try {
|
||||
<<<<<<< HEAD
|
||||
console.log('🚀 开始批量申请提交流程');
|
||||
console.log('📊 当前选择的学生数据:', selectedStudents.value);
|
||||
console.log('📋 可用奖学金类型数据:', availableScholarshipTypes.value);
|
||||
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
// 表单验证
|
||||
await scholarshipApplicationRef.value?.validate();
|
||||
|
||||
if (selectedStudents.value.length === 0) {
|
||||
<<<<<<< HEAD
|
||||
console.error('❌ 请至少选择一名学生');
|
||||
return;
|
||||
}
|
||||
@@ -1092,6 +1281,19 @@ const submitBatchApplication = async () => {
|
||||
|
||||
console.log('✅ 奖学金类型选择验证通过');
|
||||
|
||||
=======
|
||||
console.error('请至少选择一名学生');
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查每个学生是否都选择了奖学金类型
|
||||
const invalidStudents = selectedStudents.value.filter((s: any) => !s.selectedScholarshipType);
|
||||
if (invalidStudents.length > 0) {
|
||||
console.error('请为所有选择的学生指定奖学金类型');
|
||||
return;
|
||||
}
|
||||
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
submitLoading.value = true;
|
||||
|
||||
// 检查是否所有学生都选择了相同的奖学金类型(根据后端接口要求)
|
||||
@@ -1107,12 +1309,20 @@ const submitBatchApplication = async () => {
|
||||
const batchId = form.value.batchId;
|
||||
const classId = classInfo.value.classId;
|
||||
const studentApplications = selectedStudents.value.map((s: any) => ({
|
||||
<<<<<<< HEAD
|
||||
studentId: String(s.studentId || s.id),
|
||||
studentName: s.studentName,
|
||||
studentNo: s.studentNo,
|
||||
scholarshipTypeId: s.selectedScholarshipType.id,
|
||||
deptId: classInfo.value.deptId,
|
||||
applicationReason: `班主任批量申请 - ${s.selectedScholarshipType.name}`,
|
||||
=======
|
||||
studentId: s.studentId,
|
||||
studentName: s.studentName,
|
||||
studentCode: s.studentCode,
|
||||
scholarshipTypeId: s.selectedScholarshipType.id,
|
||||
applicationReason: `班主任批量申请 - ${s.selectedScholarshipType.name}`,
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
applicationDescription: `申请等级:${s.selectedScholarshipType.levelType},金额:${s.selectedScholarshipType.amount}元`
|
||||
}));
|
||||
|
||||
@@ -1120,7 +1330,10 @@ const submitBatchApplication = async () => {
|
||||
await batchSubmitByTeacher(batchId, scholarshipTypeId, classId, studentApplications);
|
||||
|
||||
console.log('批量申请提交成功');
|
||||
<<<<<<< HEAD
|
||||
ElMessage.success('批量申请提交成功');
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
dialog.value.visible = false;
|
||||
|
||||
// 刷新列表
|
||||
@@ -1128,7 +1341,10 @@ const submitBatchApplication = async () => {
|
||||
|
||||
} catch (error) {
|
||||
console.error('提交失败:', error);
|
||||
<<<<<<< HEAD
|
||||
ElMessage.error('提交失败,请重试');
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
} finally {
|
||||
submitLoading.value = false;
|
||||
}
|
||||
@@ -1254,6 +1470,7 @@ onMounted(() => {
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
@@ -1314,4 +1531,6 @@ onMounted(() => {
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
}
|
||||
=======
|
||||
>>>>>>> 4b9dbe40fb94a83d379f7d16211dec6d78c23755
|
||||
</style>
|
||||
Reference in new issue
Block a user