前端学工处增加一键确认待确认的学生住宿费用功能

This commit is contained in:
MDSMO
2025-08-26 10:28:02 +08:00
parent c786b89e7f
commit 5fd821b08a
4 changed files with 76 additions and 18 deletions

View File

@@ -42,6 +42,7 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" icon="el-icon-check" size="mini" @click="fastConfirm">一键确认所有辅导员已确认的记录</el-button>
<el-button type="success" icon="el-icon-check" size="mini" @click="confirmUnconfirmedStudents">一键确认未进行住宿费用确认的学生</el-button>
</el-form-item>
</el-form>
@@ -152,7 +153,7 @@
</template>
<script>
import { fastConfirm, jwcConfirm, listNewRecord, getNewRecord, delNewRecord, addNewRecord, updateNewRecord } from "@/api/dormitory/new/record";
import { fastConfirm, jwcConfirm, listNewRecord, getNewRecord, delNewRecord, addNewRecord, updateNewRecord, confirmUnconfirmedStudents } from "@/api/dormitory/new/record";
import { listAllYear } from "@/api/stuCQS/basedata/year";
@@ -358,6 +359,26 @@ export default {
this.download('dormitory/newRecord/export', {
...this.queryParams
}, `newRecord_${new Date().getTime()}.xlsx`)
},
/** 一键确认未进行住宿费用确认的学生 */
confirmUnconfirmedStudents() {
this.$modal.confirm('确定要一键确认所有未进行住宿费用确认的学生吗?').then(() => {
this.loading = true;
confirmUnconfirmedStudents().then(response => {
this.loading = false;
if (response.code === 200) {
this.$modal.msgSuccess(response.msg || "确认成功");
this.getList();
} else {
this.$modal.msgError(response.msg || "确认失败");
}
}).catch(error => {
this.loading = false;
this.$modal.msgError("操作失败,请稍后重试");
});
}).catch(() => {
// 用户取消操作
});
}
}
};