diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js index e4f24fcbb..efcc936d4 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js @@ -118,7 +118,6 @@ export default { // 验证表单项输入是否正确,返回一个包含所有错误信息的数组 verifyForm() { - console.log(this.scheme) const result = [] Object.entries(this.scheme).forEach(([tableName, tableItem]) => { if ('__GIRDTABLE__' in tableItem) { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/list.vue index ff8f178a2..60503478a 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/list.vue @@ -12,57 +12,26 @@ - 学年度: - {{ displayListItem(item, 'AcademicYearNo') }} - - - - 学期: - {{ displayListItem(item, 'Semester') }} - - - - 学号: - {{ displayListItem(item, 'StuNo') }} - - - - 姓名: - {{ displayListItem(item, 'StuName') }} - - - - 年级: - {{ displayListItem(item, 'Grade') }} - - - - 系所码: - {{ displayListItem(item, 'DeptNo') }} - - - - 系名: - {{ displayListItem(item, 'DeptName') }} - - - - 专业码: - {{ displayListItem(item, 'MajorNo') }} - - - - 专业名: - {{ displayListItem(item, 'MajorName') }} - - - - 所在行政班号: - {{ displayListItem(item, 'ClassNo') }} - - - - + 请假类型: + {{ displayListItem(item, 'LeaveType') }} + + + 请假时间: + {{ displayListItem(item, 'StartTime') }} + + + 返校时间: + {{ displayListItem(item, 'EndTime') }} + + + 请假天数: + {{ displayListItem(item, 'LeaveDay') }} + + + 审核状态: + {{ displayListItem(item, 'CheckStatus') || '--' }} + + @@ -77,7 +46,7 @@ - + /> --> + + + + @@ -98,7 +83,17 @@ - + + + 审核 + + 同意 + 不同意 + 取消 + + + + @@ -131,28 +126,28 @@ export default { return { // 数据项的数据类型、结构 scheme: { - AcademicYearNo: { type: 'text' }, - Semester: { type: 'text' }, - StuNo: { type: 'text' }, - StuName: { type: 'text' }, - Grade: { type: 'text' }, - DeptNo: { type: 'text' }, - DeptName: { type: 'text' }, - MajorNo: { type: 'text' }, - MajorName: { type: 'text' }, - ClassNo: { type: 'text' }, + LeaveType:{ type: 'select', title: '请假类型' }, + StartTime:{ type: 'datetime', title: '开始时间', dateformat: '1' }, + EndTime:{ type: 'datetime', title: '返校时间', dateformat: '1' }, + LeaveDay:{ type: 'text', title: '请假天数' }, + // Files:{ type: 'upload', title: '附件上传'}, + // LeaveReason:{ type: 'textarea', title: '请假事由'} + CheckStatus:{ type: 'select', title: '审核状态' }, }, // 查询条件 searchData: {}, defaultQueryData: {}, - queryData: { - StuNo: '', - StuName: '', - }, + queryData: { + CheckStatus:'', + LeaveType:'' + }, // 数据源 dataSource: { + LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({ value: t.value, text: t.text })), + // CheckStatus:Object.values(this.GET_GLOBAL('dataDictionary').AuditStatus).map(t => ({ value: t.value, text: t.text })), + CheckStatus:[{text:'草稿',value:'0'},{text:'审核中',value:'1'},{text:'通过',value:'2'},{text:'不通过',value:'3'}] }, // 页面相关参数 @@ -164,7 +159,12 @@ export default { // 列表与分页信息 page: 1, total: 2, - list: [] + list: [], + + checkDisable:true, + // 审核弹框 + modal:false, + selectItem:'', } }, @@ -178,6 +178,10 @@ export default { methods: { // 页面初始化 async init() { + console.log(this.GET_GLOBAL('loginUser')) + if(['教师','管理员'].includes(this.GET_GLOBAL('loginUser').Description)){ + this.checkDisable = false + } this.ON('EducationalAdministrationStuAttendanceLeave-list-change', this.refreshList) // 拉取加载列表和数据源 @@ -193,15 +197,15 @@ export default { }, // 拉取列表 - async fetchList() { + async fetchList(isConcat=true) { if (this.page > this.total) { return } const result = await this.HTTP_GET( - 'learun/adms/EducationalAdministration/StuAttendanceLeave/pagelist', + 'learun/adms/stuleavemanagement/pagelist', { // 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) // 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序 - pagination: { rows: 10, page: this.page, sidx: 'Id', sord: 'DESC' }, + pagination: { rows: 10, page: this.page, sidx: 'CreateTime', sord: 'DESC' }, queryJson: JSON.stringify(this.searchData) }, '加载数据时出错' @@ -211,19 +215,19 @@ export default { this.total = result.total this.page = result.page + 1 - this.list = this.list.concat(result.rows) + this.list = isConcat?this.list.concat(result.rows):result.rows; this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' }, // 刷新清空列表 - async refreshList() { + async refreshList(isConcat=true) { this.page = 1 this.total = 2 this.list = [] - await this.fetchList() + await this.fetchList(isConcat) }, // 列表下拉 @@ -242,7 +246,7 @@ export default { Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) this.searchData = result - await this.refreshList() + await this.refreshList(false) }, // 点击「清空查询条件」按钮 @@ -271,12 +275,29 @@ export default { return } - this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/delete', id, '删除失败').then(success => { + this.HTTP_POST('learun/adms/stuleavemanagement/delete', id, '删除失败').then(success => { if(!success) { return } this.TOAST('删除成功', 'success') this.refreshList() }) return + + case 'check': + this.selectItem = id + this.modal = true + return + + case 'checkAgree': + // if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) { + // return + // } + this.modal = false + this.HTTP_POST('learun/adms/stuleavemanagement/savecheck', {...this.selectItem,CheckStatus:id}, '提交失败').then(success => { + if(!success) { return } + this.TOAST('提交成功', 'success') + this.refreshList() + }) + return default: return diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/single.vue index bcdee1878..b48a97802 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/single.vue @@ -1,146 +1,58 @@ @@ -173,7 +85,7 @@ /** * 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 * 请在移动端 /pages.json 中的 pages 字段中添加一条记录: - * { "path": "pages/EducationalAdministration/StuAttendanceLeave/single", "style": { "navigationBarTitleText": "表单详情页" } } + * { "path": "pages/EducationalAdministration/StuMail/single", "style": { "navigationBarTitleText": "表单详情页" } } * * (navigationBarTitleText 字段为本页面的标题文本,可以修改) * (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件) @@ -201,39 +113,23 @@ export default { // 表单项数据结构 scheme: { - StuAttendanceLeave: { - AcademicYearNo: { type: 'text', title: '学年度' }, - Semester: { type: 'text', title: '学期' }, - StuNo: { type: 'text', title: '学号' }, - StuName: { type: 'text', title: '姓名' }, - Grade: { type: 'text', title: '年级' }, - EmpNo: { type: 'text', title: '教师号' }, - DeptNo: { type: 'text', title: '系所码' }, - DeptName: { type: 'text', title: '系名' }, - MajorNo: { type: 'text', title: '专业码' }, - MajorName: { type: 'text', title: '专业名' }, - ClassNo: { type: 'text', title: '所在行政班号' }, - ClassName: { type: 'text', title: '班级名称' }, - LessonNo: { type: 'text', title: '课程号' }, - LessonName: { type: 'text', title: '课程名称' }, - LessonSortNo: { type: 'text', title: '课程类别码' }, - LessonSortName: { type: 'text', title: '课程类别' }, - LessonDate: { type: 'text', title: '原上课日期' }, - LessonTime: { type: 'text', title: '上课时间' }, - PlanWeek: { type: 'text', title: '教学周次' }, - LeaveType: { type: 'select', title: '请假类型', itemCode: 'LeaveType', dataSource: '0' }, - Remark: { type: 'textarea', title: '备注' }, - IsCheck: { type: 'select', title: '下拉框', itemCode: 'LeaveCheck', dataSource: '0' }, - TecRemark: { type: 'textarea', title: '备注' }, + StuMail: { + LeaveType:{ type: 'select', title: '请假类型', verify: 'NotNull' }, + StartTime:{ type: 'datetime', title: '开始时间', dateformat: '1' }, + EndTime:{ type: 'datetime', title: '返校时间', dateformat: '1' }, + LeaveDay:{ title: '请假天数', verify: 'Num' }, + Files:{ type: 'upload', title: '附件上传'}, + LeaveReason:{ type: 'textarea', title: '请假事由'}, + // CheckStatus:{ type: 'select', title: '审核状态' }, }, }, // 数据源 dataSource: { - StuAttendanceLeave: { + StuMail: { LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({ value: t.value, text: t.text })), - IsCheck: Object.values(this.GET_GLOBAL('dataDictionary').LeaveCheck).map(t => ({ value: t.value, text: t.text })), + // CheckStatus:Object.values(this.GET_GLOBAL('dataDictionary').AuditStatus).map(t => ({ value: t.value, text: t.text })), }, } @@ -270,7 +166,7 @@ export default { if (this.mode === 'create') { this.origin = await this.getDefaultForm() } else { - const result = await this.HTTP_GET('learun/adms/EducationalAdministration/StuAttendanceLeave/form', this.id) + const result = await this.HTTP_GET('learun/adms/stuleavemanagement/form', this.id) this.origin = await this.formatFormData(result) } this.current = this.COPY(this.origin) @@ -290,6 +186,7 @@ export default { case 'save': const verifyResult = this.verifyForm() + console.log(this.scheme) if (verifyResult.length > 0) { this.CONFIRM('表单验证失败', verifyResult.join('\n')) return @@ -302,7 +199,7 @@ export default { this.LOADING('正在提交...') const postData = await this.getPostData(this.id) - this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/save', postData, '表单提交保存失败').then(success => { + this.HTTP_POST('learun/adms/stuleavemanagement/save', postData, '表单提交保存失败').then(success => { this.HIDE_LOADING() if (!success) { return @@ -320,7 +217,7 @@ export default { } this.LOADING('提交删除中...') - this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/delete', this.id, '删除失败').then(success => { + this.HTTP_POST('learun/adms/stuleavemanagement/delete', this.id, '删除失败').then(success => { this.HIDE_LOADING() if (!success) { return diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave_old/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave_old/list.vue new file mode 100644 index 000000000..ff8f178a2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave_old/list.vue @@ -0,0 +1,322 @@ + + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave_old/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave_old/single.vue new file mode 100644 index 000000000..2d4ae1bf7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave_old/single.vue @@ -0,0 +1,350 @@ + + + + \ No newline at end of file