Compare commits

...

9 Commits

11 changed files with 767 additions and 216 deletions

View File

@@ -102,8 +102,8 @@
<el-form-item label="所属班级" prop="studentClass">
<el-input v-model="getStudentClass" placeholder="请输入所属班级" :readonly="redingData" />
</el-form-item>
<el-form-item label="族" prop="nation">
<el-input v-model="getNation" placeholder="请输入族" :readonly="redingData" />
<el-form-item label="族" prop="nation">
<el-input v-model="getNation" placeholder="请输入族" :readonly="redingData" />
</el-form-item>
<el-form-item label="出生日期" prop="birthData">
<span v-if="form.birthData != null" class="readonly-label">{{ formatDate(form.birthData) }}</span>

View File

@@ -11,7 +11,7 @@
</el-alert>
<!-- 核心表单 -->
<el-form :model="form" :rules="formRules" ref="formRef" class="form-wrapper" v-loading="loading">
<el-form ref="formRef" v-loading="loading" :model="form" :rules="formRules" class="form-wrapper">
<!-- 基本信息卡片 -->
<el-card shadow="hover" style="margin-bottom: 20px">
<el-descriptions title="基本信息" :column="3" border label-width="120px">
@@ -33,8 +33,8 @@
<el-descriptions-item label="性别" required>
<el-form-item prop="gender" class="no-label-form-item">
<el-select v-model="form.gender" placeholder="请选择性别" clearable style="width: 100%">
<el-option label="男" value="1"></el-option>
<el-option label="女" value="0"></el-option>
<el-option label="男" value="1" />
<el-option label="女" value="0" />
</el-select>
</el-form-item>
</el-descriptions-item>
@@ -112,7 +112,7 @@
<!-- 佐证附件 -->
<el-descriptions-item label="佐证附件" required>
<el-form-item prop="affixId" class="no-label-form-item">
<AffixIndex ref="affixComponent" v-model="form.affixId" @input="handleAffix" @fileUploaded="handleAffix"
<AffixIndex ref="affixComponent" v-model="form.affixId" @input="getffix" @fileUploaded="handleAffix"
@delete-file="handleDeleteFile" />
<div class="el-upload__tip">
支持上传jpg/png/pdf格式文件单个文件不超过10MB如病例住房证明等
@@ -131,8 +131,7 @@
<!-- <img :src="baseUrl + form.studentSignature" alt="电子签名"
style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee" /> -->
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + form.studentSignature" :preview-src-list="[baseUrl + form.studentSignature]">
</el-image>
:src="baseUrl + form.studentSignature" :preview-src-list="[baseUrl + form.studentSignature]" />
</div>
</div>
</el-form-item>
@@ -196,7 +195,7 @@
<!-- <file-upload v-model="form.parentSignAttachment" :text="`上传文件`" /> -->
<el-upload class="upload-demo" :action="uploadImgUrl" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :file-list="fileList" list-type="picture">
<el-button size="small" type="primary"><i class='el-icon-upload2'></i>点击上传</el-button>
<el-button size="small" type="primary"><i class="el-icon-upload2" />点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过2M</div>
</el-upload>
</el-form-item>
@@ -232,7 +231,7 @@
<el-card shadow="hover" style="margin-bottom: 20px">
<el-descriptions title="本人承诺" :column="1" border label-width="120px">
<el-descriptions-item label="承诺内容">
<el-card shadow="none" class="promise-card" v-if="form.promiseContent == ''">
<el-card v-if="form.promiseContent == ''" shadow="none" class="promise-card">
<p>1. 自觉遵守国家法律法规</p>
<p>2. 自觉遵守学生行为规范和学校的规章制度遵守社会公德</p>
<p>3. 自觉遵守外宿住址所在社区的有关管理规定</p>
@@ -240,8 +239,7 @@
4. 本人申请外宿属个人自愿行为外宿期间发生的一切事故造成本人他人或集体的人身财产损害的学校不负责任
</p>
</el-card>
<el-card shadow="none" class="promise-card" v-else v-html="form.promiseContent">
</el-card>
<el-card v-else shadow="none" class="promise-card" v-html="form.promiseContent" />
</el-descriptions-item>
<!-- 承诺签名 -->
@@ -255,8 +253,7 @@
<!-- <img :src="baseUrl + form.studentPromiseSign" alt="承诺签名"
style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee" /> -->
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + form.studentPromiseSign" :preview-src-list="[baseUrl + form.studentPromiseSign]">
</el-image>
:src="baseUrl + form.studentPromiseSign" :preview-src-list="[baseUrl + form.studentPromiseSign]" />
</div>
<el-form-item prop="promiseDate" class="no-label-form-item date-item">
<el-date-picker v-model="form.promiseDate" type="date" value-format="yyyy-MM-dd" placeholder="签署日期"
@@ -274,11 +271,11 @@
<i class="el-icon-folder" />
保存
</el-button>
<el-button type="primary" size="medium" @click="submitForm(1)" v-if="form.status == 0">
<el-button v-if="form.status == 0" type="primary" size="medium" @click="submitForm(1)">
<i class="el-icon-check" />
提交申请
</el-button>
<el-button type="default" size="medium" @click="resetForm" style="margin-left: 10px" v-if="!currentId">
<el-button v-if="!currentId" type="default" size="medium" style="margin-left: 10px" @click="resetForm">
<i class="el-icon-refresh" />
重置表单
</el-button>
@@ -294,7 +291,7 @@
</div>
<div class="sign-modal-body">
<!-- 纯原生Canvas无任何框架包裹 -->
<canvas id="studentCanvas" width="400" height="200" style="border: 1px solid #ccc; background: #fff"></canvas>
<canvas id="studentCanvas" width="400" height="200" style="border: 1px solid #ccc; background: #fff" />
</div>
<div class="sign-modal-footer">
<button class="btn-clear" @click="clearStudentCanvas">清除</button>
@@ -311,7 +308,7 @@
<span class="close-btn" @click="closePromiseSignModal">×</span>
</div>
<div class="sign-modal-body">
<canvas id="promiseCanvas" width="400" height="200" style="border: 1px solid #ccc; background: #fff"></canvas>
<canvas id="promiseCanvas" width="400" height="200" style="border: 1px solid #ccc; background: #fff" />
</div>
<div class="sign-modal-footer">
<button class="btn-clear" @click="clearPromiseCanvas">清除</button>
@@ -323,20 +320,20 @@
</template>
<script>
import { getOwnLog } from '@/api/dormitory/new/stuDom'
import {
addOutsideAccommodationApply,
getOutsideAccommodationApply,
getOwnInfo,
listStudent,
getOutsideAccommodationApply,
updateOutsideAccommodationApply,
addOutsideAccommodationApply
updateOutsideAccommodationApply
} from '@/api/dormitory/outsideAccommodation/outsideAccommodationApply'
import { batchAddOutsideAccommodationAttachment, deleteOutsideAccommodationAttachmentNameAndStuName } from "@/api/dormitory/outsideAccommodation/outsideAccommodationAttachment";
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
import { getOwnLog } from '@/api/dormitory/new/stuDom'
import { batchAddOutsideAccommodationAttachment, deleteOutsideAccommodationAttachmentNameAndStuName } from '@/api/dormitory/outsideAccommodation/outsideAccommodationAttachment'
import { getUserProfile } from '@/api/system/user'; // 获取当前登录用户
import AffixIndex from '@/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/affix/index'
import {
pcaTextArr // 省市区联动数据,纯汉字
} from 'element-china-area-data'
import AffixIndex from "@/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/affix/index"
export default {
name: 'OutsideAccommodationApply',
@@ -411,7 +408,7 @@ export default {
promiseDate: [{ required: true, message: '请选择签署日期', trigger: 'change' }],
studentSignature: [{ required: true, message: '请完成电子签名', trigger: 'change' }],
studentPromiseSign: [{ required: true, message: '请完成承诺签名', trigger: 'change' }],
affixId: [{ required: true, message: '请上传佐证材料', trigger: 'blur' }],
affixId: [{ required: true, message: '请上传佐证材料', trigger: 'change' }],
parentSignAttachment: [
{
required: true,
@@ -442,12 +439,12 @@ export default {
},
watch: {
// 监听路由参数变化,只要有新的 id 就更新
"$route.query.id": {
'$route.query.id': {
immediate: true, // 初始化时立即执行一次
handler(newId, oldId) {
if (newId) {
this.loading = true;
this.currentId = newId;
this.loading = true
this.currentId = newId
// 调用接口加载数据
getOutsideAccommodationApply(this.currentId).then(res => {
this.form = {
@@ -455,7 +452,7 @@ export default {
// 字符串转回数组(按后端存储的分隔符拆分),地址
address: res.data.address ? res.data.address.split('/') : [],
parentAddress: res.data.parentAddress ? res.data.parentAddress.split('/') : []
};
}
const fileName = this.form.parentSignAttachment.split('/').pop()
// 回显家长签字附件
this.fileList = [{ name: fileName, url: this.baseUrl + this.form.parentSignAttachment }]
@@ -464,7 +461,7 @@ export default {
})
} else {
// 若 id 为空,可做清空处理
this.currentId = null;
this.currentId = null
// 延迟执行重置,确保 formRef 已挂载
this.$nextTick(() => {
this.resetForm()
@@ -528,7 +525,7 @@ export default {
}
} else {
// 匹配记录无学年名称
this.form.accommodationFee = `已交未知年度住宿费 暂无有效学年信息`
this.form.accommodationFee = '已交未知年度住宿费 暂无有效学年信息'
}
} else {
// 无匹配roomId的记录兜底处理
@@ -709,9 +706,9 @@ export default {
if (valid) {
// 生成申请编号等逻辑不变
if (!this.form.applyNo) {
const year = new Date().getFullYear();
const randomNo = Math.floor(Math.random() * 1000000).toString().padStart(6, '0');
this.form.applyNo = `WS${year}${randomNo}`;
const year = new Date().getFullYear()
const randomNo = Math.floor(Math.random() * 1000000).toString().padStart(6, '0')
this.form.applyNo = `WS${year}${randomNo}`
}
this.form.endDate = this.getOutsideDefaultEndTime()
this.form.promiseContent = `
@@ -725,36 +722,36 @@ export default {
address: this.form.address ? this.form.address.join('/') : '',
parentAddress: this.form.parentAddress ? this.form.parentAddress.join('/') : '',
status: this.form.status != 0 ? this.form.status : status
};
}
this.loading = true;
this.loading = true
// 封装请求逻辑为Promise确保完成后再操作
const requestPromise = this.form.id != null
? updateOutsideAccommodationApply(submitForm)
: addOutsideAccommodationApply(submitForm);
: addOutsideAccommodationApply(submitForm)
requestPromise.then((response) => {
// 附件处理逻辑不变
if (this.reasonFileList && this.reasonFileList.length > 0) {
this.reasonFileList.forEach(element => {
element.applyId = this.form.id || response.data.id;
});
batchAddOutsideAccommodationAttachment(this.reasonFileList);
element.applyId = this.form.id || response.data.id
})
batchAddOutsideAccommodationAttachment(this.reasonFileList)
}
this.loading = false;
this.$modal.msgSuccess(this.form.id ? '修改成功' : '新增成功');
this.loading = false
this.$modal.msgSuccess(this.form.id ? '修改成功' : '新增成功')
// 延迟跳转:给后端数据落地留时间(关键!)
setTimeout(() => {
this.goBack();
}, 800); // 800ms延迟确保后端写入完成
this.goBack()
}, 800) // 800ms延迟确保后端写入完成
}).catch(error => {
this.loading = false;
this.$message.error('提交失败:' + (error.msg || '服务器处理异常'));
this.loading = false
this.$message.error('提交失败:' + (error.msg || '服务器处理异常'))
// 失败时不跳转,避免用户重复操作
// this.goBack();
})
} else {
this.loading = false;
this.loading = false
this.$message.error('表单填写有误,请检查!')
}
})
@@ -768,49 +765,54 @@ export default {
}
this.reasonFileList = []
this.fileList = []
this.form.affixId = ""
this.form.affixId = ''
this.form.studentSignature = ''
this.form.studentPromiseSign = ''
this.clearStudentCanvas()
this.clearPromiseCanvas()
},
handleAffix(affixId) {
getffix(affixId) {
this.form.affixId = affixId
},
// 处理组件传递的文件信息
handleAffix(fileInfo) {
// 处理 AffixIndex 组件回传:支持文件信息对象
handleAffix(payload) {
// if (typeof payload === 'string' || typeof payload === 'number') {
// this.form.affixId = payload
// return
// }
const fileInfo = payload
if (!fileInfo || !fileInfo.fileName || !fileInfo.filePath) {
console.warn('无效的文件信息,跳过添加')
return // 不添加空数据
this.$message.warning('附件标识异常或文件信息缺失,请重新上传')
return
}
// 构建与后端实体匹配的data对象
let data = {
const data = {
// id: null, // 主键(后端自增)
applyId: this.form.id || null, // 关联申请表ID从主表单获取
attachmentName: fileInfo.fileName, // 文件名(从组件传递的信息中获取)
attachmentUrl: fileInfo.filePath, // 文件路径相对路径关联sys_file表
filePath: fileInfo.filePath, // 文件路径相对路径关联sys_file表
fileSize: fileInfo.originalFile?.size || 0, // 若需要可从fileInfo.originalFile.size获取单位字节
fileSuffix: fileInfo.fileType, // 文件类型如docx、pdf
processInstanceId: this.form.processInstanceId || '', // 申请编号(从主表单获取)
studentName: this.form.studentName || '', // 学生姓名(从主表单获取)
studentNo: this.form.studentNo || '' // 学号(从主表单获取)
}
}
// 避免重复添加根据filePath去重
const isDuplicate = this.reasonFileList.some((item) => item.filePath === data.filePath)
if (!isDuplicate) {
this.reasonFileList.push(data)
console.log('附件添加成功:', this.reasonFileList)
} else {
if (isDuplicate) {
this.$message.warning('该文件已添加,请勿重复上传')
return
}
this.reasonFileList.push(data)
},
// 处理子组件传递的删除文件事件
handleDeleteFile(fileName) {
// 接收文件名后,可执行后续逻辑,删除在数据库的数据
if (fileName) {
deleteOutsideAccommodationAttachmentNameAndStuName({ attachmentName: fileName, studentName: this.form.studentName }).then(res => {
this.$message.success(`成功删除文件:${fileName}`);
this.$message.success(`成功删除文件:${fileName}`)
})
}
},
@@ -819,15 +821,15 @@ export default {
this.$nextTick(() => {
// 如果Affix组件有ref比如ref="affixComponent"主动调用clearData
if (this.$refs.affixComponent) {
this.$refs.affixComponent.clearData();
this.$refs.affixComponent.clearData()
}
// 2. 优化退出逻辑先关闭tab再返回避免重复操作
this.$tab.closePage().then(() => {
// 仅当需要返回上一页时执行(根据业务场景选择)
// this.$router.back();
});
});
})
})
},
// 保存学生签名
saveStudentSignature() {
@@ -957,30 +959,30 @@ export default {
}
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg' || 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2;
const isJPG = file.type === 'image/jpeg' || 'image/png'
const isLt2M = file.size / 1024 / 1024 < 2
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG、PNG 格式!');
this.$message.error('上传头像图片只能是 JPG、PNG 格式!')
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
this.$message.error('上传头像图片大小不能超过 2MB!')
}
return isJPG && isLt2M;
return isJPG && isLt2M
},
/**
* 生成外宿默认结束时间次年8月31日
* @returns {String} 格式化日期yyyy-MM-dd
*/
getOutsideDefaultEndTime() {
const now = new Date();
const currentYear = now.getFullYear();
const now = new Date()
const currentYear = now.getFullYear()
// 计算次年(当前年+1
const nextYear = currentYear + 1;
const nextYear = currentYear + 1
// 8月对应的索引是70=1月1=2月...7=8月
const endDate = new Date(nextYear, 7, 31); // 次年8月31日
const endDate = new Date(nextYear, 7, 31) // 次年8月31日
// 格式化为 yyyy-MM-dd适配 el-date-picker 的 value-format
return this.formatDate(endDate);
return this.formatDate(endDate)
},
/**
@@ -989,10 +991,10 @@ export default {
* @returns {String} yyyy-MM-dd
*/
formatDate(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份补零
const day = String(date.getDate()).padStart(2, '0'); // 日期补零
return `${year}-${month}-${day}`;
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0') // 月份补零
const day = String(date.getDate()).padStart(2, '0') // 日期补零
return `${year}-${month}-${day}`
}
}
}

View File

@@ -104,6 +104,22 @@ export default {
this.loadData(newVal)
}
}
},
// 关键监听affixId变化确保外部能捕获
affixId: {
immediate: true,
handler(newVal, oldVal) {
if (newVal !== oldVal || newVal) {
// 使用$nextTick确保DOM更新后再emit
this.$nextTick(() => {
this.$emit('input', newVal)
// 额外触发change事件方便外部监听
this.$emit('affixId-change', newVal)
// 更新v-model绑定兼容不同Vue版本
this.$emit('update:value', newVal)
})
}
}
}
},
beforeUnmount() {
@@ -119,22 +135,29 @@ export default {
},
isImageURL(url) {
// 修复正则:原正则会匹配以这些字符结尾,但写法有问题(少了\.
// 正则:原正则会匹配以这些字符结尾
const regex = /(\.jpg|\.jpeg|\.png|\.gif|\.webp)$/i
return regex.test(url)
},
// 处理上传请求(改为加入队列
// 处理上传请求(修复队列立即执行逻辑
handleUpload(file) {
// 生成统一的UID确保和beforeUpload中的UID一致
const fileUid = file.file.uid || Date.now() + Math.random()
file.file.uid = fileUid
// 将文件加入上传队列
this.uploadQueue.push(file)
// 若未在上传,则执行队列
if (!this.isUploading) {
this.processUploadQueue()
}
// 立即执行队列(修复第一次上传不触发的问题)
this.$nextTick(() => {
if (!this.isUploading) {
this.processUploadQueue()
}
})
},
// 串行处理上传队列(核心修复并发问题)
// 串行处理上传队列(核心修复第一次上传问题)
async processUploadQueue() {
// 队列为空则结束
if (this.uploadQueue.length === 0) {
@@ -146,17 +169,12 @@ export default {
this.isUploading = true
// 取出队列第一个文件
const file = this.uploadQueue.shift()
const currentFileUid = file.file.uid || Date.now() + Math.random()
// 使用文件自带的UID和beforeUpload中保持一致
const currentFileUid = file.file.uid
// 确保affixId存在
if (!this.affixId) {
this.affixId = this.$tool.uuid()
// 若后端需要先创建affix主记录取消注释并调整根据实际情况
// await this.createAffixRecord(this.affixId)
this.$nextTick(() => {
this.$emit('input', this.affixId)
this.$emit('change', this.affixId)
})
}
try {
@@ -165,7 +183,7 @@ export default {
this.uploadCnt--
if (res.code === 200) {
// 通过uid匹配文件解决同名文件问题)
// 通过uid匹配文件修复匹配不到的问题)
const fileIndex = this.fileList.findIndex(item =>
item.uid === currentFileUid && item.status === 1
)
@@ -173,13 +191,13 @@ export default {
if (fileIndex > -1) {
const savePath = this.baseurl + res.savePath
// 更新文件信息
this.fileList[fileIndex] = {
this.fileList.splice(fileIndex, 1, {
...this.fileList[fileIndex],
id: res.id,
status: 2,
savePath: savePath,
trueName: res.trueName
}
})
// 预览列表去重添加
if (this.isImageURL(savePath) && !this.previewList.includes(savePath)) {
@@ -201,6 +219,9 @@ export default {
fileList: JSON.parse(JSON.stringify(this.fileList)),
previewList: JSON.parse(JSON.stringify(this.previewList))
}
// 强制更新视图
this.$forceUpdate()
}
} else {
this.$message.error(res.message || '上传失败')
@@ -236,7 +257,7 @@ export default {
}
}
// 处理下一个文件
// 立即处理下一个文件(移除异步延迟)
this.processUploadQueue()
},
@@ -247,6 +268,7 @@ export default {
)
if (fileIndex > -1) {
this.fileList.splice(fileIndex, 1)
this.$forceUpdate() // 确保视图更新
}
},
@@ -254,6 +276,7 @@ export default {
async createAffixRecord(affixId) {
try {
// await createAffix({ affixId: affixId })
// 创建成功后自动触发watch
} catch (err) {
this.$message.error('创建附件记录失败:' + err.message)
}
@@ -269,10 +292,6 @@ export default {
// 生成affixId若不存在
if (!this.affixId) {
this.affixId = this.$tool.uuid()
// 若后端需要先创建affix主记录取消注释
// this.createAffixRecord(this.affixId).then(() => {
// this.$emit('input', this.affixId)
// })
}
// 校验文件大小
@@ -281,15 +300,26 @@ export default {
this.$message.error(`上传大小不能超过 ${this.maxSize}MB!`)
return false // 显式阻止上传
} else {
// 为文件添加唯一标识uid解决同名文件匹配问题
// 生成统一的UID确保和handleUpload中一致
const fileUid = file.uid || Date.now() + Math.random()
this.fileList.push({
file.uid = fileUid
// 立即添加文件到列表(确保视图能及时显示)
const newFile = {
name: file.name,
status: 1,
uid: fileUid,
rawFile: file
})
}
// 先清空同名未上传文件(避免重复)
this.fileList = this.fileList.filter(item => !(item.name === file.name && item.status === 1))
this.fileList.push(newFile)
// 立即更新视图
this.$forceUpdate()
this.uploadCnt++
return true
}
},
@@ -355,7 +385,6 @@ export default {
if (this.fileList.length === 0) {
delete this.cacheData[this.affixId]
this.affixId = ''
this.$emit('input', '')
} else {
// 更新缓存(深拷贝)
this.cacheData[this.affixId] = {
@@ -365,6 +394,7 @@ export default {
}
// 触发删除事件
this.$emit('delete-file', file.name)
this.$forceUpdate()
} else {
this.$message.error(res.message || '删除失败')
}
@@ -455,7 +485,23 @@ export default {
this.isUploading = false
// 清空缓存
delete this.cacheData[this.affixId]
this.$emit('input', '')
},
// 手动获取affixId的方法供外部调用
getAffixId() {
return new Promise((resolve) => {
if (this.affixId) {
resolve(this.affixId)
} else {
// 监听affixId变化直到有值
const unwatch = this.$watch('affixId', (newVal) => {
if (newVal) {
resolve(newVal)
unwatch() // 取消监听
}
}, { immediate: true })
}
})
}
}
}

View File

@@ -182,13 +182,13 @@
</div>
<div
style="display: flex;justify-content: center;align-items: center;min-width: 130px;text-align: left;">
<div>审批人 </div>
<div>签名 </div>
<div>
<!-- <el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + renderData.studentPromiseSign"
:preview-src-list="[baseUrl + renderData.studentPromiseSign]">
</el-image> -->
{{ item.approverName }}
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + item.signature"
:preview-src-list="[baseUrl + item.signature]" :alt="item.approverName">
</el-image>
<!-- {{ item.approverName }} -->
</div>
</div>
<div style="margin-left: 10px;">日期 {{ item.approvalTime }}</div>

View File

@@ -152,7 +152,7 @@
v-hasPermi="['dormitory:outsideAccommodationApply:edit']"
v-if="scope.row.status == 0 || getRejectInfo(scope.row.outsideAccommodationApprovals).isReject">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['dormitory:outsideAccommodationApply:remove']" v-if="scope.row.status == 0 && scope.row.processInstanceId == null">删除</el-button>
v-hasPermi="['dormitory:outsideAccommodationApply:remove']" v-if="scope.row.status == 0 || roleGroup.includes('管理员')">删除</el-button>
<el-button v-if="scope.row.applyStatus != 0" size="mini" type="text" icon="el-icon-info"
@click="detail(scope.row)">详情</el-button>
</template>

View File

@@ -313,6 +313,317 @@
{{ form.instructionSchoolHours }}
</el-descriptions-item>
</el-descriptions>
<!-- 入伍保留学籍表单 -->
<el-descriptions v-if="enlistmentReserveForm" class="margin-top" title="" :column="4" size="medium" border style="width: 100%">
<el-descriptions-item>
<template slot="label"> 姓名 </template>
{{ form.studentName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 性别 </template>
<span v-if="form.gender == 1"></span>
<span v-else></span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 民族 </template>
<!-- {{ form.nation }} -->
<dict-tag :options="dict.type.rt_nation" :value="form.nation" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 年级 </template>
{{ form.grade }}
</el-descriptions-item>
<el-descriptions-item span="2">
<template slot="label"> 专业名称 </template>
{{ form.major }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 学号 </template>
{{ form.studentNo }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 班级 </template>
{{ form.className }}
</el-descriptions-item>
<el-descriptions-item span="2">
<template slot="label"> 家庭地址 </template>
{{ form.familyAddress }}
</el-descriptions-item>
<el-descriptions-item span="2">
<template slot="label"> 家长电话 </template>
{{ form.parentPhone }}
</el-descriptions-item>
<el-descriptions-item span="4">
<template slot="label"> 附件材料 </template>
<Affix v-model="form.affixId" :disabled="true" />
</el-descriptions-item>
<el-descriptions-item span="4">
<template slot="label"> 申请原因 </template>
<div style="padding-top: 10px;">
{{ form.applyReason }}
</div>
<div style="padding: 20px;">
<div style="display: flex;justify-content: flex-end;align-items: center;">
<div style="padding: 0 10px;">申请人 {{ form.studentName }}</div>
<div style="padding: 0 10px;">日期 {{ form.createTime }}</div>
</div>
</div>
</el-descriptions-item>
<el-descriptions-item span="4" v-for="item in form.enlistmentReserveApprovalList" >
<template slot="label"> {{ item.opinionType }} </template>
<div style="padding-top: 10px;">
{{ item.approvalOpinion || "暂无意见" }}
</div>
<div style="padding: 20px;">
<div style="display: flex;justify-content: flex-end;align-items: center;">
<div style="padding: 0 10px;">
审批结果
<el-tag v-if="item.approvalResult == 1" type="success">通过</el-tag>
<el-tag v-else type="danger">驳回</el-tag>
</div>
<div
style="display: flex;justify-content: center;align-items: center;min-width: 130px;text-align: left;">
<div>签名 </div>
<div>
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + item.signature" :preview-src-list="[baseUrl + item.signature]"
:alt="item.approverName">
</el-image>
</div>
</div>
<div style="padding: 0 10px;">日期 {{ item.approvalTime }}</div>
</div>
</div>
</el-descriptions-item>
<!-- <el-descriptions-item span="3">
<template slot="label"> 辅导员联系情况 </template>
{{ form.ideologicalEducation }}
</el-descriptions-item> -->
<el-descriptions-item span="4">
<template slot="label"> 保留学籍时间和编号 </template>
{{ form.reserveNo }}
</el-descriptions-item>
</el-descriptions>
<!-- 外宿申请表单 -->
<div v-if="outsideAccommodationForm"><detailApply :formData="form" :isShwo="false"></detailApply></div>
<!-- 退伍复学表单 -->
<el-descriptions v-if="basicForm" class="margin-top" title="退伍复学申请表" :column="4" size="medium" border
style="width: 100%; ">
<el-descriptions-item>
<template slot="label"> 姓名 </template>
{{ form.stName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 性别 </template>
{{ form.sex }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 民族 </template>
<!-- {{ form.nation }} -->
<dict-tag :options="dict.type.rt_nation" :value="form.nations" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 年级 </template>
{{ form.grade }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 班级 </template>
{{ form.stClass }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 学号 </template>
{{ form.stId }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 专业 </template>
{{ form.majors }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 联系电话 </template>
{{ form.datab }}
</el-descriptions-item>
<el-descriptions-item span="4">
<template slot="label"> 申请理由 </template>
<div style="padding-top: 10px; line-height: 1.8;">
<p class="reason-text">本人于 {{ form.rwTime | formatDate }} 应征入伍 {{ form.dataa | formatDate }}
日退役退役后申请复学</p>
<p class="reason-text" v-if="form.conversion == 'Y'">是否申请转专业 </p>
<p class="reason-text" v-else>是否申请转专业 ×</p>
<p v-if="form.conversion === 'Y'" class="reason-text" style="color: red;">
原年级和专业:__{{ form.maList.length > 0 ? form.maList[0].oldgrade : '' }}__{{ form.maList.length > 0 ?
form.maList[0].oldmajor : '' }}__
申请转入年级和专业__{{ saveGradeName }}__{{ saveClassName }}__
</p>
<!-- 附件预览区域 -->
<div style="margin: 10px 0; display: flex; gap: 10px; flex-wrap: wrap;">
<image-preview v-if="form.maList.length > 0 && form.maList[0].proof" :src="form.maList[0].proof"
:width="240" :height="160" />
<image-preview v-if="form.maList.length > 0 && form.maList[0].idcard" :src="form.maList[0].idcard"
:width="240" :height="160" />
<image-preview v-if="form.maList.length > 0 && form.maList[0].material"
:src="form.maList[0].material" :width="240" :height="160" />
</div>
<!-- 申请人信息 -->
<div class="applicant-info right-align" style="padding: 20px 0 0 0;">
<span>申请人</span>
{{ form.stName }}
<span class="date-label" style="margin-left: 10px;">日期</span>
{{ form.times | formatDate }}
</div>
</div>
</el-descriptions-item>
<!-- 招生与就业处意见仅转专业时显示 -->
<el-descriptions-item span="4" v-if="form.conversion === 'Y'">
<template slot="label"> 招生与就业处意见 </template>
<div style="padding-top: 10px; line-height: 1.8;">
<p class="reason-text" style="color: red;">
符合转专业条件拟同意转入年级和专业__{{ saveGradeName }}__{{ saveClassName }}__
</p>
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
<span>审批结果</span>
<el-select v-model="form.zsStatus" placeholder="" class="short-select" disabled
style="width: 100px; margin: 0 5px;">
<el-option label="重新审核" value="0"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="退回" value="2"></el-option>
<el-option label="驳回" value="3"></el-option>
</el-select>
<span class="date-label">签名</span>
{{ form.zsIdea || '无' }}
<span class="date-label" style="margin-left: 10px;">日期</span>
{{ form.zsTime | formatDate }}
</div>
</div>
</el-descriptions-item>
<!-- 辅导员意见 -->
<el-descriptions-item span="4">
<template slot="label"> 辅导员意见 </template>
<div style="padding-top: 10px; line-height: 1.8;">
{{ form.fdIdea || '暂无意见' }}
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
<span>审批结果</span>
<el-select v-model="form.fdStatus" placeholder="待审核" class="short-select" disabled
style="width: 100px; margin: 0 5px;">
<el-option label="重新审核" value="0"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="退回" value="2"></el-option>
<el-option label="驳回" value="3"></el-option>
</el-select>
<span class="date-label">签名</span>
{{ form.fdQm || '无' }}
<span class="date-label" style="margin-left: 10px;">日期</span>
{{ form.fdTime | formatDate }}
</div>
</div>
</el-descriptions-item>
<!-- 学务意见 -->
<el-descriptions-item span="4">
<template slot="label"> 学务意见 </template>
<div style="padding-top: 10px; line-height: 1.8;">
{{ form.xwIdea || '暂无意见' }}
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
<span>审批结果</span>
<el-select v-model="form.xwStatus" placeholder="待审核" class="short-select" disabled
style="width: 100px; margin: 0 5px;">
<el-option label="重新审核" value="0"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="退回" value="2"></el-option>
<el-option label="驳回" value="3"></el-option>
</el-select>
<span class="date-label">签名</span>
{{ form.xwQm || '无' }}
<span class="date-label" style="margin-left: 10px;">日期</span>
{{ form.xwTime | formatDate }}
</div>
</div>
</el-descriptions-item>
<!-- 二级学院意见 -->
<el-descriptions-item span="4">
<template slot="label"> 二级学院意见 </template>
<div style="padding-top: 10px; line-height: 1.8;">
{{ form.twoIdea || '暂无意见' }}
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
<span>审批结果</span>
<el-select v-model="form.twoStatus" placeholder="待审核" class="short-select" disabled
style="width: 100px; margin: 0 5px;">
<el-option label="重新审核" value="0"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="退回" value="2"></el-option>
<el-option label="驳回" value="3"></el-option>
</el-select>
<span class="date-label">签名</span>
{{ form.erQm || '无' }}
<span class="date-label" style="margin-left: 10px;">日期</span>
{{ form.twoTime | formatDate }}
</div>
</div>
</el-descriptions-item>
<!-- 学籍管理科意见 -->
<el-descriptions-item span="4">
<template slot="label"> 学籍管理科意见 </template>
<div style="padding-top: 10px; line-height: 1.8;">
{{ form.xjIdea || '暂无意见' }}
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
<span>审批结果</span>
<el-select v-model="form.xjglStatus" placeholder="待审核" class="short-select" disabled
style="width: 100px; margin: 0 5px;">
<el-option label="重新审核" value="0"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="退回" value="2"></el-option>
<el-option label="驳回" value="3"></el-option>
</el-select>
<span class="date-label">签名</span>
{{ form.xjQm || '无' }}
<span class="date-label" style="margin-left: 10px;">日期</span>
{{ form.xjTime | formatDate }}
</div>
</div>
</el-descriptions-item>
<!-- 教务处主管领导意见 -->
<el-descriptions-item span="4">
<template slot="label"> 教务处主管领导意见 </template>
<div style="padding-top: 10px; line-height: 1.8;">
{{ form.jwIdea || '暂无意见' }}
<div class="signature-area right-align" style="padding: 10px 0 0 0;">
<span>审批结果</span>
<el-select v-model="form.jwStatus" placeholder="待审核" class="short-select" disabled
style="width: 100px; margin: 0 5px;">
<el-option label="重新审核" value="0"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="退回" value="2"></el-option>
<el-option label="驳回" value="3"></el-option>
</el-select>
<span class="date-label">签名</span>
{{ form.jwQm || '无' }}
<span class="date-label" style="margin-left: 10px;">日期</span>
{{ form.jwTime | formatDate }}
</div>
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</el-col>
</el-tab-pane>
@@ -375,7 +686,12 @@ import { getRtStuQuitSchoolByProcInsId } from '@/api/routine/rtStuQuitSchool'
import Parser from '@/components/parser/Parser'
import flow from '@/views/flowable/task/finished/detail/flow'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { getEnlistmentReserveByProcessInstanceId} from "@/api/routine/enlistmentReserve/enlistmentReserve";
import { getOutsideAccommodationApplyByProcessInstanceId } from "@/api/dormitory/outsideAccommodation/outsideAccommodationApply";
import detailApply from "@/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/detailApply" // 外宿申请表详细
import {getStname, getProcessId } from "@/api/routine/basic";
import { listStudent, getClassName } from '@/api/stuCQS/basedata/student'
import { listGrade } from '@/api/stuCQS/basedata/grade'
export default {
name: 'Record',
@@ -383,6 +699,7 @@ export default {
components: {
Parser,
flow,
detailApply
},
props: {},
data () {
@@ -424,6 +741,9 @@ export default {
disposalForm: false, // 处分表单
relieveForm: false, // 解除处分表单
quitSchoolForm: false, // 休学申请表单
enlistmentReserveForm: false, // 入伍保留学籍表单
outsideAccommodationForm: false, // 外宿申请表单
basicForm:false,//退伍复学表单
form: {},
// 学生基础信息
stuInfo: {},
@@ -448,6 +768,15 @@ export default {
} else if (this.category == 'quitSchool') {
this.quitSchoolForm = true
this.getRtStuQuitSchoolByProcInsId(this.taskForm.procInsId)
} else if (this.category == 'enlistmentReserve') { // 应征入伍表单
this.enlistmentReserveForm = true
this.getEnlistmentReserve(this.taskForm.procInsId)
} else if (this.category == 'outsideAccommodation') {
this.outsideAccommodationForm = true
this.getOutsideAccommodation(this.taskForm.procInsId)
}else if (this.category == '退伍复学') {
this.basicForm = true
this.getBasicApplication(this.taskForm.procInsId)
}
// 回显流程记录
// 流程任务重获取变量表单
@@ -491,6 +820,88 @@ export default {
// this.getStuInfo(this.form.stuNo) 先注释,因为已从后台返回给数据,如果没有在放开注释
})
},
// 请求 入伍保留学籍表单数据
getEnlistmentReserve(procInsId) {
getEnlistmentReserveByProcessInstanceId(procInsId.toString()).then((res) => {
this.form = res.data
// 处理审批意见列表,添加意见类型
if (this.form?.enlistmentReserveApprovalList) {
// 定义意见类型数组与索引对应0=辅导员1=学务2=二级学院3=学籍管理科4=教务处主管领导)
const opinionTypes = [
"辅导员意见",
"学务意见",
"二级学院意见",
"学籍管理科意见",
"教务处主管领导意见"
];
// 遍历审批列表,为每条数据添加 opinionType 字段
this.form.enlistmentReserveApprovalList.forEach((item, index) => {
// 只处理前5条数据超出部分不添加或可根据实际需求调整
if (index < opinionTypes.length) {
item.opinionType = opinionTypes[index];
} else {
// 若超过5条可设置默认值或不设置
item.opinionType = "其他意见";
}
});
}
})
},
// 请求 外宿申请表单数据
getOutsideAccommodation(procInsId) {
getOutsideAccommodationApplyByProcessInstanceId(procInsId.toString()).then((res) => {
this.form = res.data
})
},
// 退伍复学申请表单数据
getBasicApplication(procInsId) {
getProcessId(procInsId.toString()).then((res) => {
// console.log("后端返回原始数据:",res.data);
this.form = res.data
this.getClassNameList()
this.listGrade()
});
},
/** 获取班级名称列表 */
getClassNameList() {
getClassName().then(res => {
this.ClassNameList = res.data
// console.log(this.ClassNameList)
if (this.ClassNameList != null) {
this.ClassNameList.forEach(element => {
if (element.value == this.form.maList[0].data1) {
// console.log(element.label)
element.children.forEach(elementTwo => {
if (elementTwo.value == this.form.maList[0].data2) {
// console.log(elementTwo.label)
elementTwo.children.forEach(elementFree => {
this.saveClassName = elementFree.label
// console.log(elementFree.label)
});
}
});
}
});
}
})
},
/** 获取年级列表 */
async listGrade() {
try {
let res = await listGrade()
if (res.code == 200) {
this.grade_list = [...res.rows]
console.log(this.grade_list)
this.grade_list.forEach(element => {
if(element.gradeId == this.form.maList[0].newgrade){
this.saveGradeName = element.gradeName
}
});
}
} catch (error) {
console.error('获取年级列表失败:', error)
}
},
getStuInfo (stuNo) {
getStuInfo(stuNo).then((res) => {
if (res.code == 200) {

View File

@@ -374,7 +374,16 @@
<el-tag v-if="item.approvalResult == 1" type="success">通过</el-tag>
<el-tag v-else type="danger">驳回</el-tag>
</div>
<div style="padding: 0 10px;">签名 {{ item.approverName }}</div>
<div
style="display: flex;justify-content: center;align-items: center;min-width: 130px;text-align: left;">
<div>签名 </div>
<div>
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + item.signature" :preview-src-list="[baseUrl + item.signature]"
:alt="item.approverName">
</el-image>
</div>
</div>
<div style="padding: 0 10px;">日期 {{ item.approvalTime }}</div>
</div>
</div>

View File

@@ -413,7 +413,16 @@
<el-tag v-if="item.approvalResult == 1" type="success">通过</el-tag>
<el-tag v-else type="danger">驳回</el-tag>
</div>
<div style="padding: 0 10px;">签名 {{ item.approverName }}</div>
<div
style="display: flex;justify-content: center;align-items: center;min-width: 130px;text-align: left;">
<div>签名 </div>
<div>
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + item.signature" :preview-src-list="[baseUrl + item.signature]"
:alt="item.approverName">
</el-image>
</div>
</div>
<div style="padding: 0 10px;">日期 {{ item.approvalTime }}</div>
</div>
</div>
@@ -431,7 +440,9 @@
</el-descriptions>
<!-- 外宿申请表单 -->
<div v-if="outsideAccommodationForm"><detailApply :formData="form" :isShwo="false"></detailApply></div>
<div v-if="outsideAccommodationForm">
<detailApply :formData="form" :isShwo="false"></detailApply>
</div>
<!-- 退伍复学表单 -->
<el-descriptions v-if="basicForm" class="margin-top" title="退伍复学申请表" :column="4" size="medium" border
@@ -739,7 +750,7 @@
<h1>休学证明</h1>
<h4>桂水电院 {{ form.quitYear }} 休字第 {{ form.quitNumber }}</h4>
<p>{{ form.stuName }},{{ form.gender }},{{ form.mz }},{{ form.birthday }}出生,{{ form.jg }},{{ form.className
}}学生,学号:{{ form.stuNo }}.该生于个人原因-{{ form.reasonApplying }},申请休学.经学校研究,同意休学,时间从{{ form.quitStartTime }}{{
}}学生,学号:{{ form.stuNo }}.该生于个人原因-{{ form.reasonApplying }},申请休学.经学校研究,同意休学,时间从{{ form.quitStartTime }}{{
form.quitEndTime }}.</p>
<p>抄送:教务处财务处{{ form.departmentName }}</p>
<div class="stamp">
@@ -907,6 +918,8 @@ import { getOutsideAccommodationApplyByProcessInstanceId, updateOutsideAccommoda
import { listBasic, getBasic, delBasic, addBasic, updateBasic, getStname, getProcessId } from "@/api/routine/basic";
import detailApply from "@/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/detailApply" // 外宿申请表详细
import { addOrUpdateAccommodationApproval } from "@/api/dormitory/outsideAccommodation/outsideAccommodationApproval";
import { listStudent, getClassName } from '@/api/stuCQS/basedata/student'
import { listGrade } from '@/api/stuCQS/basedata/grade'
export default {
name: 'Record',
@@ -944,6 +957,10 @@ export default {
flowRecordList: [], // 流程流转数据
formConfCopy: {},
src: null,
// 班级名称
saveClassName: null,
// 年级名称
saveGradeName: null,
rules: {
penaltyNumber: [{ required: true, message: '请输入处分文号', trigger: 'blur' }],
letterServiceContent: [{ required: true, message: '请输入送达书', trigger: 'blur' }],
@@ -976,7 +993,8 @@ export default {
variables: {},
approvalOpinion: '', // 必须初始化,避免 null 报错
approvalResult: '',
targetNodeName: ''
targetNodeName: '',
signature: ''
},
penaltyNumber: '',
letterServiceContent: '',
@@ -1031,7 +1049,7 @@ export default {
outsideAccommodationForm: false, // 外宿申请表单
basicForm: false,//退伍复学表单
BasicTestData: 0, // 新增默认0仅退回学生申请时改为1
user: [], // 当前登录用户
}
},
created() {
@@ -1086,9 +1104,15 @@ export default {
} else if (this.category == 'enlistmentReserve') {
this.enlistmentReserveForm = true
this.getEnlistmentReserve(this.taskForm.procInsId)
getUserProfile().then(res => {
this.user = res.data
})
} else if (this.category == 'outsideAccommodation') {
this.outsideAccommodationForm = true
this.getOutsideAccommodation(this.taskForm.procInsId)
getUserProfile().then(res => {
this.user = res.data
})
} else if (this.category == '退伍复学') {
this.basicForm = true
this.getBasicApplication(this.startUser)
@@ -1178,12 +1202,55 @@ export default {
// 退伍复学申请表单数据
getBasicApplication(startUser) {
let newName = this.startUser.replace(/-/g, "");
// let newName = this.startUser.replace(/-/g, "");
let newName = this.startUser.split('-')[0].trim();
getStname(newName).then((res) => {
// console.log("后端返回原始数据:",res.data);
this.form = res.data
this.getClassNameList()
this.listGrade()
});
},
/** 获取班级名称列表 */
getClassNameList() {
getClassName().then(res => {
this.ClassNameList = res.data
// console.log(this.ClassNameList)
if (this.ClassNameList != null) {
this.ClassNameList.forEach(element => {
if (element.value == this.form.maList[0].data1) {
// console.log(element.label)
element.children.forEach(elementTwo => {
if (elementTwo.value == this.form.maList[0].data2) {
// console.log(elementTwo.label)
elementTwo.children.forEach(elementFree => {
this.saveClassName = elementFree.label
// console.log(elementFree.label)
});
}
});
}
});
}
})
},
/** 获取年级列表 */
async listGrade() {
try {
let res = await listGrade()
if (res.code == 200) {
this.grade_list = [...res.rows]
console.log(this.grade_list)
this.grade_list.forEach(element => {
if (element.gradeId == this.form.maList[0].newgrade) {
this.saveGradeName = element.gradeName
}
});
}
} catch (error) {
console.error('获取年级列表失败:', error)
}
},
getStuInfo(stuNo) {
getStuInfo(stuNo).then((res) => {
@@ -1300,6 +1367,8 @@ export default {
// this.completeOpen = true;
// this.completeTitle = "流程审批";
this.submitForm(null)
// 获取当前用户的签名并赋值给this.taskForm.variables.signature传入监听器
this.taskForm.variables.signature = this.user.signature
},
/** 用户审批任务 */
taskComplete() {
@@ -1366,17 +1435,16 @@ export default {
} else if (this.category == "退伍复学") {
// updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {})
var stNameData = ''
let newName = this.startUser.replace(/-/g, "");
let newName = this.startUser.split('-')[0].trim();
// console.log(this.taskForm.procInsId)
// 异步请求的回调内处理后续逻辑
getStname(newName).then(response => {
stNameData = response.data;
// console.log("这个是审批数据:", stNameData)
// console.log("stNameData.id:", stNameData.id);
// console.log("stNameData.newgrade" + stNameData.maList[0].data1)
// console.log("stNameData.newmajor" + stNameData.maList[0].data2)
// 招生与就业处
if (this.taskName == "招生与就业处") {
const currentFlowItem = this.flowRecordList.find(item => item.taskName === this.taskName);
@@ -1387,7 +1455,8 @@ export default {
// zsIdea: this.taskForm.comment,
zsTime: new Date(),
// zsIdea字段缺失改为zsIdea字段
zsIdea: assigneeName
zsIdea: assigneeName,
processId: this.taskForm.procInsId
}).then(response => {
this.$modal.msgSuccess(response.msg)
})
@@ -1403,7 +1472,8 @@ export default {
fdStatus: "1",
fdIdea: this.taskForm.comment,
fdTime: new Date(),
fdQm: assigneeName
fdQm: assigneeName,
processId: this.taskForm.procInsId
}).then(response => {
this.$modal.msgSuccess(response.msg)
})
@@ -1553,7 +1623,8 @@ export default {
else if (this.category == "退伍复学") {
// updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {})
var stNameData = ''
let newName = this.startUser.replace(/-/g, "");
// let newName = this.startUser.replace(/-/g, "");
let newName = this.startUser.split('-')[0].trim();
// 异步请求的回调内处理后续逻辑
getStname(newName).then(response => {
stNameData = response.data;
@@ -1664,23 +1735,23 @@ export default {
},
// 监听退回节点选择变化
handleReturnNodeChange(val) {
// 1. 找到选中的节点
const selectedNode = this.returnTaskList.find(item => item.id === val);
if (!selectedNode) {
this.BasicTestData = 0;
return;
}
// 监听退回节点选择变化
handleReturnNodeChange(val) {
// 1. 找到选中的节点
const selectedNode = this.returnTaskList.find(item => item.id === val);
if (!selectedNode) {
this.BasicTestData = 0;
return;
}
// 2. 仅退伍复学场景 + 节点name是“学生申请” → testData=1
if (this.category === "退伍复学" && selectedNode.name === "学生申请") {
this.BasicTestData = 1;
// console.log("已选中学生申请testData=", this.testData); // 调试
} else {
this.BasicTestData = 0;
}
},
// 2. 仅退伍复学场景 + 节点name是“学生申请” → testData=1
if (this.category === "退伍复学" && selectedNode.name === "学生申请") {
this.BasicTestData = 1;
// console.log("已选中学生申请testData=", this.testData); // 调试
} else {
this.BasicTestData = 0;
}
},
/** 可退回任务列表 */
handleReturn() {
@@ -1709,10 +1780,11 @@ export default {
else if (this.category == "退伍复学") {
console.log("数据",this.returnTaskList)
console.log("数据", this.returnTaskList)
// updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {})
var stNameData = ''
let newName = this.startUser.replace(/-/g, "");
// let newName = this.startUser.replace(/-/g, "");
let newName = this.startUser.split('-')[0].trim();
// 异步请求的回调内处理后续逻辑
getStname(newName).then(response => {
stNameData = response.data;
@@ -1829,7 +1901,8 @@ export default {
else if (this.category == "退伍复学") {
// updateBasic({stuId:this.form.stuId,fdStatus:"1",fdIdea:this.taskForm.comment}).then(response => {})
var stNameData = ''
let newName = this.startUser.replace(/-/g, "");
// let newName = this.startUser.replace(/-/g, "");
let newName = this.startUser.split('-')[0].trim();
// 异步请求的回调内处理后续逻辑
getStname(newName).then(response => {
stNameData = response.data;
@@ -2008,7 +2081,8 @@ export default {
variables: {}, // 保留原有的嵌套 variables 结构(后端可能依赖)
approvalOpinion: '', // 初始化审批意见为空白
approvalResult: '', // 审批状态
targetNodeName: '' // 审批节点
targetNodeName: '', // 审批节点
signature: '' // 签名
}
} else {
// 情况2variables 已存在 → 保留原有字段,补充 approvalOpinion无则添加有则保留原值
@@ -2016,74 +2090,73 @@ export default {
...this.taskForm.variables, // 展开原有所有字段(如 variables、其他自定义字段
approvalOpinion: this.taskForm.variables.approvalOpinion || '', // 兜底:若原有未定义则设为空白
approvalResult: this.taskForm.variables.approvalResult || '',
targetNodeName: this.taskForm.variables.targetNodeName || ''
targetNodeName: this.taskForm.variables.targetNodeName || '',
signature: this.taskForm.variables.signature || '',
}
}
},
// 退回或驳回的时候生成入伍保留学籍申请审核
taskReturnApproval(text) {
getUserProfile().then(res => {
let data = {
applyId: this.form.id,
processInstanceId: this.form.processInstanceId,
taskId: this.taskForm.taskId,
nodeName: this.taskName,
approverId: res.data.userId,
approverName: res.data.nickName,
approvalOpinion: this.taskForm.comment,
approvalResult: 2,
studentName: this.form.studentName,
studentNo: this.form.studentNo
}
// 生成审核记录
insertOrUpdateByStuAndApprover(data).then(ress => {
// 审核记录生成之后,判断退回或驳回是不是到学生申请,如果是则更新申请表状态
// if (text == '退回') {
// let nodeName = ''
// this.returnTaskList.forEach(element => {
// if (element.id == this.taskForm.targetKey) { // 如果选中的节点id等于列表里面的id就将节点名称获取到nodeName
// nodeName = element.documentation
// }
// });
// if (nodeName == '学生申请') { // 如果退回选择的是学生节点更新申请表状态
// this.form.applyStatus = 0
// updateEnlistmentReserve(this.form).then(result => {
// this.$modal.closeLoading()
// })
// }
// } else {
// // 驳回
// if (this.taskName == '辅导员审批') { // 当前节点如果是辅导员审批,证明驳回就到了学生,所以更新申请表状态
// this.form.applyStatus = 0
// updateEnlistmentReserve(this.form).then(result => {
// this.$modal.closeLoading()
// })
// }
// }
this.$modal.closeLoading()
})
let data = {
applyId: this.form.id,
processInstanceId: this.form.processInstanceId,
taskId: this.taskForm.taskId,
nodeName: this.taskName,
approverId: this.user.userId,
approverName: this.user.nickName,
approvalOpinion: this.taskForm.comment,
approvalResult: 2,
studentName: this.form.studentName,
studentNo: this.form.studentNo,
signature: this.user.signature
}
// 生成审核记录
insertOrUpdateByStuAndApprover(data).then(ress => {
// 审核记录生成之后,判断退回或驳回是不是到学生申请,如果是则更新申请表状态
// if (text == '退回') {
// let nodeName = ''
// this.returnTaskList.forEach(element => {
// if (element.id == this.taskForm.targetKey) { // 如果选中的节点id等于列表里面的id就将节点名称获取到nodeName
// nodeName = element.documentation
// }
// });
// if (nodeName == '学生申请') { // 如果退回选择的是学生节点更新申请表状态
// this.form.applyStatus = 0
// updateEnlistmentReserve(this.form).then(result => {
// this.$modal.closeLoading()
// })
// }
// } else {
// // 驳回
// if (this.taskName == '辅导员审批') { // 当前节点如果是辅导员审批,证明驳回就到了学生,所以更新申请表状态
// this.form.applyStatus = 0
// updateEnlistmentReserve(this.form).then(result => {
// this.$modal.closeLoading()
// })
// }
// }
this.$modal.closeLoading()
})
},
// 退回或驳回的时候生成外宿申请审核
taskReturnAccommodationApproval() {
getUserProfile().then(res => {
let data = {
applyId: this.form.id,
processInstanceId: this.form.processInstanceId,
applyNo: this.form.applyNo,
approvalNode: this.taskName,
approverId: res.data.userId,
approverName: res.data.nickName,
approvalOpinion: this.taskForm.comment,
approvalResult: 0,
studentName: this.form.studentName,
studentNo: this.form.studentNo
}
// 生成审核记录
addOrUpdateAccommodationApproval(data).then(ress => {
// 退回或者驳回生产审批记录之后,更新申请表里面的驳回信息
updateOutsideAccommodationApply({id: this.form.id, rejectReason: this.taskForm.comment})
})
let data = {
applyId: this.form.id,
processInstanceId: this.form.processInstanceId,
applyNo: this.form.applyNo,
approvalNode: this.taskName,
approverId: this.user.userId,
approverName: this.user.nickName,
approvalOpinion: this.taskForm.comment,
approvalResult: 0,
studentName: this.form.studentName,
studentNo: this.form.studentNo,
signature: this.user.signature
}
// 生成审核记录
addOrUpdateAccommodationApproval(data).then(ress => {
// 退回或者驳回生产审批记录之后,更新申请表里面的驳回信息
updateOutsideAccommodationApply({ id: this.form.id, rejectReason: this.taskForm.comment })
})
}
},

View File

@@ -205,7 +205,7 @@
<td class="input-cell" colspan="8" rowspan="4">
<!-- <el-input v-model="form.xwIdea" type="textarea" :rows="3" placeholder="请填写意见..."
class="opinion-textarea"></el-input> -->
{{ form.xwIdea }}
{{ form.xwIdea }}拟编入___
<div class="signature-area right-align">
<span>审批结果</span>
<el-select v-model="form.xwStatus" placeholder="待审核" class="short-select" disabled>

View File

@@ -83,7 +83,16 @@
<el-tag v-if="item.approvalResult == 1" type="success">通过</el-tag>
<el-tag v-else type="danger">驳回</el-tag>
</div>
<div style="padding: 0 10px;">签名 {{ item.approverName }}</div>
<div
style="display: flex;justify-content: center;align-items: center;min-width: 130px;text-align: left;">
<div>签名 </div>
<div>
<el-image style="width: 100px; height: 50px; margin-left: 10px; border: 1px solid #eee"
:src="baseUrl + item.signature" :preview-src-list="[baseUrl + item.signature]"
:alt="item.approverName">
</el-image>
</div>
</div>
<div style="padding: 0 10px;">日期 {{ item.approvalTime }}</div>
</div>
</div>
@@ -372,7 +381,8 @@ export default {
createTime: '',
updateTime: '',
remark: '',
affixId: null
affixId: null,
baseUrl: process.env.VUE_APP_BASE_API,
},
enlistmentReserveAttachList: [],
formRules: {
@@ -595,7 +605,7 @@ export default {
};
if (this.formData.id != null) {
updateEnlistmentReserve(submitData.formData).then(response => {
// 填写附件里面的申请编号
this.enlistmentReserveAttachList.forEach(element => {
element.applyNo = this.formData.applyNo
@@ -608,12 +618,12 @@ export default {
this.loading = false;
this.$modal.msgSuccess("修改成功");
this.goBack()
});
} else {
addEnlistmentReserve(submitData.formData).then(response => {
// 申请表新增成功之后,进行附件的添加
if (response.code == 200) {
// 填写附件里面的申请编号
@@ -691,7 +701,7 @@ export default {
this.$message.success(`成功删除文件:${fileName}`);
})
}
}
}
}
};
</script>
@@ -887,4 +897,4 @@ export default {
padding-bottom: 8px !important;
}
}
</style>
</style>

View File

@@ -135,7 +135,7 @@
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['routine:enlistmentReserve:edit']" v-if="scope.row.applyStatus == 0 || getRejectInfo(scope.row.enlistmentReserveApprovalList).isReject">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['routine:enlistmentReserve:remove']" v-if="scope.row.applyStatus == 0 && scope.row.processInstanceId == ''">删除</el-button>
v-hasPermi="['routine:enlistmentReserve:remove']" v-if="scope.row.applyStatus == 0 || roleGroup.includes('管理员')">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-info"
@click="detail(scope.row)">详情</el-button>
</template>