学生资助、学生奖惩等内容提交
This commit is contained in:
@@ -325,14 +325,51 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
reader.onload = (e) => {
|
||||
let data = e.target.result
|
||||
let workbook = XLSX.read(data, { //手动转化
|
||||
type: 'binary'
|
||||
let workbook = XLSX.read(data, {
|
||||
type: 'array'
|
||||
})
|
||||
//获取json格式的Excel数据
|
||||
let jsonData = XLSX.utils.sheet_to_json(workbook.Sheets[workbook
|
||||
.SheetNames[0]], {
|
||||
defval: 'null' //单元格为空时的默认值
|
||||
let ws = workbook.Sheets[workbook.SheetNames[0]]
|
||||
let jsonData = XLSX.utils.sheet_to_json(ws, {
|
||||
defval: '',
|
||||
raw: false
|
||||
})
|
||||
const toDateString = (v) => {
|
||||
const pad = (n) => (n < 10 ? '0' + n : '' + n)
|
||||
const serialToDate = (s) => {
|
||||
const epoch = Date.UTC(1899, 11, 30)
|
||||
const day = Math.floor(s)
|
||||
const ms = Math.round((s - day) * 86400000)
|
||||
return new Date(epoch + day * 86400000 + ms)
|
||||
}
|
||||
if (v === null || v === undefined) return ''
|
||||
if (typeof v === 'number') {
|
||||
const d = serialToDate(v)
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
}
|
||||
if (Object.prototype.toString.call(v) === '[object Date]') {
|
||||
const d = v
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
}
|
||||
if (typeof v === 'string') {
|
||||
const s = v.replace(/\./g, '/').trim()
|
||||
let m = s.match(/^(\d{4})[\/-](\d{1,2})[\/-](\d{1,2})$/)
|
||||
if (m) return `${m[1]}-${pad(parseInt(m[2]))}-${pad(parseInt(m[3]))}`
|
||||
m = s.match(/^(\d{1,2})[\/-](\d{1,2})[\/-](\d{2,4})$/)
|
||||
if (m) {
|
||||
const y = m[3].length === 2 ? 2000 + parseInt(m[3]) : parseInt(m[3])
|
||||
return `${y}-${pad(parseInt(m[1]))}-${pad(parseInt(m[2]))}`
|
||||
}
|
||||
return s
|
||||
}
|
||||
return ''
|
||||
}
|
||||
jsonData = jsonData.map(r => ({
|
||||
...r,
|
||||
'学生个人申请时间': toDateString(r['学生个人申请时间']),
|
||||
'辅导员审核时间': toDateString(r['辅导员审核时间']),
|
||||
'系书记审核时间': toDateString(r['系书记审核时间']),
|
||||
'学院审核时间': toDateString(r['学院审核时间'])
|
||||
}))
|
||||
resolve(jsonData)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<el-input v-model="auditForm.fdyCmt" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false" :file-list="upload.fileList" :on-success="handleAvatarSuccess">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" :limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false" :file-list="upload.fileList" :on-success="handleAvatarSuccess">
|
||||
<img v-if="auditForm.fdySign" :src="baseurl + auditForm.fdySign" width="200px" height="50px" class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
@@ -178,7 +178,7 @@
|
||||
<el-upload style="display: inline;" :before-upload="boolImg"
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess"
|
||||
:file-list="upload.fileList" :on-success="handleEditSignSuccess"
|
||||
>
|
||||
<img v-if="editForm.applySign" :src="baseurl + editForm.applySign" width="200px" height="50px"
|
||||
class="avatar"
|
||||
@@ -225,7 +225,7 @@ import { getTokenKeySessionStorage as getToken } from '@/utils/auth'
|
||||
import GlApply from '@/views/comprehensive/knzzGlApply/cpnt/GlApply.vue'
|
||||
import GlLook from '@/views/comprehensive/knzzGlApply/cpnt/GlLook.vue'
|
||||
|
||||
import { listFdy as listView, doAudit, doMany, doEdit, getKnzzGlApply } from '@/api/comprehensive/knzzGlApply'
|
||||
import { listFdy as listView, doAudit, doMany, doEdit, getKnzzGlApply, updateKnzzGlApply } from '@/api/comprehensive/knzzGlApply'
|
||||
import { getOwnSign } from '@/api/workstudy/post'
|
||||
|
||||
export default {
|
||||
@@ -243,6 +243,8 @@ export default {
|
||||
lookV: false,
|
||||
editMode: false,
|
||||
|
||||
originalApplySign: null,
|
||||
|
||||
editForm: {
|
||||
id: null,
|
||||
xm: '',
|
||||
@@ -464,10 +466,12 @@ export default {
|
||||
sdata.hardType = sdata.hardType[0] || ''
|
||||
}
|
||||
const loading = fullLoading(this)
|
||||
const res =await doEdit(sdata)
|
||||
const api = sdata.applySign !== this.originalApplySign ? updateKnzzGlApply : doEdit
|
||||
const res = await api(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('保存成功')
|
||||
this.originalApplySign = sdata.applySign || null
|
||||
this.editV = false
|
||||
this.getList()
|
||||
} else {
|
||||
@@ -535,6 +539,7 @@ export default {
|
||||
} else {
|
||||
this.editForm.hardType = ''
|
||||
}
|
||||
this.originalApplySign = this.editForm.applySign || null
|
||||
this.editV = true
|
||||
} else {
|
||||
this.$message.error(res.msg || '获取详情失败')
|
||||
@@ -561,6 +566,16 @@ export default {
|
||||
break
|
||||
}
|
||||
},
|
||||
handleEditSignSuccess(response, file, fileList) {
|
||||
// 确保属性响应式存在
|
||||
if (!Object.prototype.hasOwnProperty.call(this.editForm, 'applySign')) {
|
||||
this.$set(this.editForm, 'applySign', response.fileName)
|
||||
} else {
|
||||
this.editForm.applySign = response.fileName
|
||||
}
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="applyStatus">
|
||||
<el-select v-model="queryParams.applyStatus" placeholder="请选择审核状态" clearable>
|
||||
<el-option v-for="dict in dict.type.knzz_tufa_apply_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<el-option v-for="dict in statusOptions" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@@ -46,12 +44,15 @@
|
||||
<el-table-column label="姓名" align="center" prop="stuName" />
|
||||
<el-table-column label="审核状态" align="center" prop="applyStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.knzz_tufa_apply_status" :value="scope.row.applyStatus" />
|
||||
<dict-tag :options="statusOptions" :value="scope.row.applyStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="lookVClick(scope.row)">查看</el-button>
|
||||
<!-- 撤回按钮:applyStatus 不等于 1 时显示 -->
|
||||
<el-button v-if="scope.row.applyStatus != 1" size="mini" type="text" icon="el-icon-refresh-left"
|
||||
@click="handleRevoke(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -138,7 +139,7 @@ import * as XLSX from 'xlsx' // 引入 xlsx 库
|
||||
import TufaApply from '@/views/comprehensive/knzzTufaApply/cpnt/TufaApply.vue'
|
||||
import TufaLook from '@/views/comprehensive/knzzTufaApply/cpnt/TufaLook.vue'
|
||||
|
||||
import { listFdyAll as listView } from '@/api/comprehensive/knzzTufaApply'
|
||||
import { listFdyAll as listView, doEdit } from '@/api/comprehensive/knzzTufaApply'
|
||||
|
||||
|
||||
export default {
|
||||
@@ -234,6 +235,34 @@ export default {
|
||||
this.lookV = true
|
||||
},
|
||||
|
||||
// 撤回到“已提交审核”(applyStatus=1)
|
||||
async handleRevoke(row) {
|
||||
try {
|
||||
await this.$confirm('确定撤回该申请至“已提交审核”状态吗?', '提示', { type: 'warning' })
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
const loading = this.$loading({ lock: true, text: '撤回中…' })
|
||||
try {
|
||||
const payload = { id: row.id, applyStatus: 1 }
|
||||
const res = await doEdit(payload)
|
||||
if (res.code === 200) {
|
||||
this.$message.success('撤回成功,状态已变更为:已提交审核')
|
||||
const idx = this.tableData.findIndex(x => x.id === row.id)
|
||||
if (idx !== -1) {
|
||||
this.$set(this.tableData[idx], 'applyStatus', 1)
|
||||
}
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error(res.msg || '撤回失败')
|
||||
}
|
||||
} catch (err) {
|
||||
this.$message.error(`撤回失败:${err?.message || '网络错误'}`)
|
||||
} finally {
|
||||
loading.close && loading.close()
|
||||
}
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('comprehensive/knzzTufaApply/exportFdyAll', {
|
||||
@@ -241,6 +270,20 @@ export default {
|
||||
}, `user_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
}
|
||||
,computed:{
|
||||
statusOptions(){
|
||||
const opts = (this.dict && this.dict.type && this.dict.type.knzz_tufa_apply_status) || []
|
||||
if (opts && opts.length) return opts
|
||||
return [
|
||||
{ label: '已提交审核', value: '1', raw: { listClass: 'warning', cssClass: '' } },
|
||||
{ label: '辅导员通过', value: '2', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '院系通过', value: '3', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '学工通过', value: '4', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '校领导通过', value: '5', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '驳回', value: '10', raw: { listClass: 'danger', cssClass: '' } },
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -250,4 +293,4 @@ export default {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,14 +5,10 @@
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="stuName">
|
||||
<el-input v-model="queryParams.stuName" placeholder="请输入姓名" clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.stuName" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@@ -33,19 +29,19 @@
|
||||
<el-table-column label="姓名" align="center" prop="stuName" />
|
||||
<el-table-column label="审核状态" align="center" prop="applyStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.knzz_tufa_apply_status" :value="scope.row.applyStatus" />
|
||||
<dict-tag :options="statusOptions" :value="scope.row.applyStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="lookVClick(scope.row)">审核</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openEdit(scope.row)">修改数据</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<el-dialog title="审核" :visible.sync="lookV" :fullscreen="true" :destroy-on-close="true" @close="getList">
|
||||
<el-row>
|
||||
@@ -65,13 +61,11 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg"
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess"
|
||||
>
|
||||
<img v-if="auditForm.fdySign" :src="baseurl + auditForm.fdySign" width="200px"
|
||||
height="50px" class="avatar"
|
||||
>
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false" :file-list="upload.fileList"
|
||||
:on-success="handleAvatarSuccess">
|
||||
<img v-if="auditForm.fdySign" :src="baseurl + auditForm.fdySign" width="200px" height="50px"
|
||||
class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -81,42 +75,36 @@
|
||||
</el-form>
|
||||
<hr>
|
||||
<el-timeline>
|
||||
<el-timeline-item v-if="lookForm.fdyCmt && lookForm.fdyDate" :timestamp="lookForm.fdyDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.fdyCmt && lookForm.fdyDate" :timestamp="lookForm.fdyDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>辅导员审核</strong>
|
||||
<div>{{ lookForm.fdyCmt }}</div>
|
||||
<img v-if="lookForm.fdySign" :src="baseurl +lookForm.fdySign" alt="辅导员签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
<img v-if="lookForm.fdySign" :src="baseurl + lookForm.fdySign" alt="辅导员签名"
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item v-if="lookForm.deptCmt && lookForm.deptDate" :timestamp="lookForm.deptDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.deptCmt && lookForm.deptDate" :timestamp="lookForm.deptDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>院系审核</strong>
|
||||
<div>{{ lookForm.deptCmt }}</div>
|
||||
<img v-if="lookForm.deptSign" :src="baseurl +lookForm.deptSign" alt="院系签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
<img v-if="lookForm.deptSign" :src="baseurl + lookForm.deptSign" alt="院系签名"
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item v-if="lookForm.xgCmt && lookForm.xgDate" :timestamp="lookForm.xgDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.xgCmt && lookForm.xgDate" :timestamp="lookForm.xgDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>学校审核</strong>
|
||||
<div>{{ lookForm.xgCmt }}</div>
|
||||
<img v-if="lookForm.xgSign" :src="baseurl +lookForm.xgSign" alt="学校签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
<img v-if="lookForm.xgSign" :src="baseurl + lookForm.xgSign" alt="学校签名"
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -137,6 +125,70 @@
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="修改数据" :visible.sync="editV" width="800px" :destroy-on-close="true" @close="getList">
|
||||
<el-form label-width="120px" size="mini">
|
||||
<el-form-item label="学号">
|
||||
<el-input v-model="editForm.stuNo" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="editForm.stuName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="曾获资助/奖励">
|
||||
<el-input v-model="editForm.helpHis" type="textarea" placeholder="无则填无" />
|
||||
</el-form-item>
|
||||
<el-form-item label="农行卡号">
|
||||
<el-input v-model="editForm.bankCard" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="家庭户口">
|
||||
<el-radio-group v-model="editForm.jthk">
|
||||
<el-radio label="城镇">城镇</el-radio>
|
||||
<el-radio label="农村">农村</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="困难程度">
|
||||
<el-radio-group v-model="editForm.hardCondition">
|
||||
<el-radio label="特别困难">特别困难</el-radio>
|
||||
<el-radio label="比较困难">比较困难</el-radio>
|
||||
<el-radio label="一般困难">一般困难</el-radio>
|
||||
<el-radio label="突发困难">突发困难</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="家庭年总收入">
|
||||
<el-input v-model="editForm.yearMoney" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人均月收入">
|
||||
<el-input v-model="editForm.monthMoney" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收入来源">
|
||||
<el-input v-model="editForm.moneySource" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="家庭详细地址">
|
||||
<el-input v-model="editForm.familyAddr" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="邮政编码">
|
||||
<el-input v-model="editForm.postCode" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请理由(100-150字)">
|
||||
<el-input v-model="editForm.applyReason" type="textarea" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" accept="image/jpg,image/jpeg,image/png,image/bmp"
|
||||
:limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="editSignSuccess">
|
||||
<img v-if="editForm.applySign" :src="baseurl + editForm.applySign" width="200px" height="50px"
|
||||
class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="困难佐证材料">
|
||||
<FileUpload v-model="editForm.hardFile" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain @click="submitEdit">保存修改</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="批量审核" :visible.sync="manyV" :destroy-on-close="true">
|
||||
<el-form label-width="120px" size="mini" class="lookForm">
|
||||
<el-form-item label="是否通过">
|
||||
@@ -149,11 +201,9 @@
|
||||
<el-input v-model="manyCmt" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg"
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess1"
|
||||
>
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" accept="image/jpg,image/jpeg,image/png,image/bmp"
|
||||
:limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess1">
|
||||
<img v-if="manySign" :src="baseurl + manySign" width="200px" height="50px" class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
@@ -171,250 +221,342 @@
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { boolImg, CheckImgExists, isEmpty, fullLoading } from '@/api/helpFunc'
|
||||
import { boolImg, fullLoading, isEmpty } from '@/api/helpFunc'
|
||||
import { getTokenKeySessionStorage as getToken } from '@/utils/auth'
|
||||
|
||||
|
||||
import FileUpload from '@/components/FileUpload/index.vue'
|
||||
import TufaApply from '@/views/comprehensive/knzzTufaApply/cpnt/TufaApply.vue'
|
||||
import TufaLook from '@/views/comprehensive/knzzTufaApply/cpnt/TufaLook.vue'
|
||||
|
||||
import { listFdy as listView, doAudit, doMany } from '@/api/comprehensive/knzzTufaApply'
|
||||
import { doAudit, doMany, doEdit, listFdy as listView } from '@/api/comprehensive/knzzTufaApply'
|
||||
|
||||
import { getOwnSign } from '@/api/workstudy/post'
|
||||
|
||||
export default {
|
||||
name: 'TufaFdy',
|
||||
dicts: ['knzz_tufa_apply_status'],
|
||||
components: {
|
||||
TufaApply,
|
||||
TufaLook
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: 'TufaFdy',
|
||||
dicts: ['knzz_tufa_apply_status'],
|
||||
components: {
|
||||
TufaApply,
|
||||
TufaLook,
|
||||
FileUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
lookForm: {},
|
||||
lookV: false,
|
||||
lookForm: {},
|
||||
lookV: false,
|
||||
|
||||
auditForm: {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
},
|
||||
auditRes: null,
|
||||
auditForm: {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
},
|
||||
auditRes: null,
|
||||
|
||||
upload: {
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
url: process.env.VUE_APP_BASE_API + '/common/upload',
|
||||
fileList: []
|
||||
},
|
||||
baseurl: process.env.VUE_APP_BASE_API + '/',
|
||||
boolImg,
|
||||
upload: {
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
url: process.env.VUE_APP_BASE_API + '/common/upload',
|
||||
fileList: []
|
||||
},
|
||||
baseurl: process.env.VUE_APP_BASE_API + '/',
|
||||
boolImg,
|
||||
|
||||
manyV: false,
|
||||
ids: [],
|
||||
manyStatus: null,
|
||||
manyCmt: '',
|
||||
manyRes: null,
|
||||
manySign: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getOwnSign()
|
||||
},
|
||||
methods: {
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
handleAvatarSuccess1(response, file, fileList) {
|
||||
this.manySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
changeManyRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.manyStatus = 2
|
||||
this.manyCmt = '情况属实,同意资助 元'
|
||||
break
|
||||
case '驳回':
|
||||
this.manyStatus = 10
|
||||
this.manyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.manyStatus = null
|
||||
this.manyCmt = ''
|
||||
break
|
||||
}
|
||||
},
|
||||
manyVClick() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$message.info('请至少选择一条数据')
|
||||
return
|
||||
} else {
|
||||
this.manyV = true
|
||||
}
|
||||
},
|
||||
async doMany() {
|
||||
if (isEmpty(this.manyRes)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
let sdata = []
|
||||
this.ids.map(x => {
|
||||
let temp = {
|
||||
id: x,
|
||||
applyStatus: this.manyStatus,
|
||||
fdyCmt: this.manyCmt,
|
||||
fdySign: this.manySign
|
||||
}
|
||||
sdata.push(temp)
|
||||
})
|
||||
let loading = fullLoading(this)
|
||||
let res = await doMany(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg)
|
||||
this.manyV = false
|
||||
this.getList()
|
||||
this.ids = []
|
||||
}
|
||||
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
},
|
||||
async doNext() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
let data = [...res.rows]
|
||||
if (data.length > 0) {
|
||||
let row = data[0]
|
||||
this.lookVClick(row)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit() {
|
||||
let sdata = { ...this.auditForm }
|
||||
if (isEmpty(sdata.applyStatus)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
|
||||
let loading = fullLoading(this)
|
||||
let res = await doAudit(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('审核成功')
|
||||
this.lookV = false
|
||||
await this.doNext()
|
||||
}
|
||||
|
||||
},
|
||||
async getOwnSign() {
|
||||
let res = await getOwnSign()
|
||||
if (res.code == 200) {
|
||||
let data = { ...res.data }
|
||||
if (isEmpty(data.signature)) {
|
||||
this.$confirm('您的签名尚未上传', '提示', {
|
||||
confirmButtonText: '点我前往',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$router.push('/user/profile')
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} else {
|
||||
this.auditForm.fdySign = data.signature
|
||||
this.manySign = data.signature
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleAvatarSuccess(response, file, fileList) {
|
||||
this.auditForm.fdySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async getList() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
this.tableData = [...res.rows]
|
||||
this.total = res.total
|
||||
}
|
||||
|
||||
},
|
||||
async lookVClick(row) {
|
||||
this.auditRes = null
|
||||
this.lookForm = {}
|
||||
this.lookForm = { ...row }
|
||||
this.auditForm = {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
}
|
||||
this.auditForm.id = row.id
|
||||
await this.getOwnSign()
|
||||
this.lookV = true
|
||||
},
|
||||
|
||||
changeAuditRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.auditForm.applyStatus = 2
|
||||
this.auditForm.fdyCmt = '情况属实,同意申请'
|
||||
break
|
||||
case '驳回':
|
||||
this.auditForm.applyStatus = 10
|
||||
this.auditForm.fdyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.auditForm.applyStatus = null
|
||||
this.auditForm.fdyCmt = ''
|
||||
break
|
||||
}
|
||||
}
|
||||
manyV: false,
|
||||
ids: [],
|
||||
manyStatus: null,
|
||||
manyCmt: '',
|
||||
manyRes: null,
|
||||
manySign: '',
|
||||
|
||||
editV: false,
|
||||
editForm: {
|
||||
id: null,
|
||||
stuNo: '',
|
||||
stuName: '',
|
||||
helpHis: '',
|
||||
bankCard: '',
|
||||
jthk: '',
|
||||
hardCondition: '',
|
||||
yearMoney: '',
|
||||
monthMoney: '',
|
||||
moneySource: '',
|
||||
familyAddr: '',
|
||||
postCode: '',
|
||||
applyReason: '',
|
||||
applySign: '',
|
||||
hardFile: ''
|
||||
},
|
||||
}
|
||||
}, computed: {
|
||||
statusOptions() {
|
||||
const opts = (this.dict && this.dict.type && this.dict.type.knzz_tufa_apply_status) || []
|
||||
if (opts && opts.length) return opts
|
||||
return [
|
||||
{ label: '已提交审核', value: '1', raw: { listClass: 'warning', cssClass: '' } },
|
||||
{ label: '辅导员通过', value: '2', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '院系通过', value: '3', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '学工通过', value: '4', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '校领导通过', value: '5', raw: { listClass: 'success', cssClass: '' } },
|
||||
{ label: '驳回', value: '10', raw: { listClass: 'danger', cssClass: '' } },
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getOwnSign()
|
||||
},
|
||||
methods: {
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
handleAvatarSuccess1(response, file, fileList) {
|
||||
this.manySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
changeManyRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.manyStatus = 2
|
||||
this.manyCmt = '情况属实,同意资助 元'
|
||||
break
|
||||
case '驳回':
|
||||
this.manyStatus = 10
|
||||
this.manyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.manyStatus = null
|
||||
this.manyCmt = ''
|
||||
break
|
||||
}
|
||||
},
|
||||
manyVClick() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$message.info('请至少选择一条数据')
|
||||
return
|
||||
} else {
|
||||
this.manyV = true
|
||||
}
|
||||
},
|
||||
async doMany() {
|
||||
if (isEmpty(this.manyRes)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
let sdata = []
|
||||
this.ids.map(x => {
|
||||
let temp = {
|
||||
id: x,
|
||||
applyStatus: this.manyStatus,
|
||||
fdyCmt: this.manyCmt,
|
||||
fdySign: this.manySign
|
||||
}
|
||||
sdata.push(temp)
|
||||
})
|
||||
let loading = fullLoading(this)
|
||||
let res = await doMany(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg)
|
||||
this.manyV = false
|
||||
this.getList()
|
||||
this.ids = []
|
||||
}
|
||||
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
},
|
||||
async doNext() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
let data = [...res.rows]
|
||||
if (data.length > 0) {
|
||||
let row = data[0]
|
||||
this.lookVClick(row)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit() {
|
||||
let sdata = { ...this.auditForm }
|
||||
if (isEmpty(sdata.applyStatus)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
|
||||
let loading = fullLoading(this)
|
||||
let res = await doAudit(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('审核成功')
|
||||
this.lookV = false
|
||||
await this.doNext()
|
||||
}
|
||||
|
||||
},
|
||||
async getOwnSign() {
|
||||
let res = await getOwnSign()
|
||||
if (res.code == 200) {
|
||||
let data = { ...res.data }
|
||||
if (isEmpty(data.signature)) {
|
||||
this.$confirm('您的签名尚未上传', '提示', {
|
||||
confirmButtonText: '点我前往',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$router.push('/user/profile')
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} else {
|
||||
this.auditForm.fdySign = data.signature
|
||||
this.manySign = data.signature
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleAvatarSuccess(response, file, fileList) {
|
||||
this.auditForm.fdySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async getList() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
this.tableData = [...res.rows]
|
||||
this.total = res.total
|
||||
}
|
||||
|
||||
},
|
||||
async lookVClick(row) {
|
||||
this.auditRes = null
|
||||
this.lookForm = {}
|
||||
this.lookForm = { ...row }
|
||||
this.auditForm = {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
}
|
||||
this.auditForm.id = row.id
|
||||
await this.getOwnSign()
|
||||
this.lookV = true
|
||||
},
|
||||
|
||||
openEdit(row) {
|
||||
this.editForm = {
|
||||
id: row.id,
|
||||
stuNo: row.stuNo || '',
|
||||
stuName: row.stuName || '',
|
||||
helpHis: row.helpHis || '',
|
||||
bankCard: row.bankCard || '',
|
||||
jthk: row.jthk || '',
|
||||
hardCondition: row.hardCondition || '',
|
||||
yearMoney: row.yearMoney || '',
|
||||
monthMoney: row.monthMoney || '',
|
||||
moneySource: row.moneySource || '',
|
||||
familyAddr: row.familyAddr || '',
|
||||
postCode: row.postCode || '',
|
||||
applyReason: row.applyReason || '',
|
||||
applySign: row.applySign || '',
|
||||
hardFile: row.hardFile || ''
|
||||
}
|
||||
this.editV = true
|
||||
},
|
||||
editSignSuccess(response) {
|
||||
this.editForm.applySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async submitEdit() {
|
||||
const s = { ...this.editForm }
|
||||
if (!s.id) {
|
||||
this.$message.error('缺少ID')
|
||||
return
|
||||
}
|
||||
if (!s.helpHis) { this.$message.info('请填写曾获资助/奖励'); return }
|
||||
if (!s.bankCard) { this.$message.info('请填写农行卡号'); return }
|
||||
if (!s.jthk) { this.$message.info('请选择家庭户口'); return }
|
||||
if (!s.hardCondition) { this.$message.info('请选择困难程度'); return }
|
||||
if (!s.yearMoney) { this.$message.info('请填写年收入'); return }
|
||||
if (!s.monthMoney) { this.$message.info('请填写月收入'); return }
|
||||
if (!s.moneySource) { this.$message.info('请填写收入来源'); return }
|
||||
if (!s.familyAddr) { this.$message.info('请填写家庭详细地址'); return }
|
||||
if (!s.postCode) { this.$message.info('请填写邮政编码'); return }
|
||||
if (!s.applyReason || s.applyReason.length < 100 || s.applyReason.length > 150) {
|
||||
this.$message.info('申请理由字数需在100-150字之间'); return
|
||||
}
|
||||
if (!s.applySign) { this.$message.info('请上传申请人签名'); return }
|
||||
if (!s.hardFile) { this.$message.info('请上传困难证明材料'); return }
|
||||
const loading = fullLoading(this)
|
||||
const res = await doEdit(s)
|
||||
loading.close()
|
||||
if (res.code === 200) {
|
||||
this.$message.success('已保存')
|
||||
this.editV = false
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error(res.msg || '保存失败')
|
||||
}
|
||||
},
|
||||
|
||||
changeAuditRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.auditForm.applyStatus = 2
|
||||
this.auditForm.fdyCmt = '情况属实,同意申请'
|
||||
break
|
||||
case '驳回':
|
||||
this.auditForm.applyStatus = 10
|
||||
this.auditForm.fdyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.auditForm.applyStatus = null
|
||||
this.auditForm.fdyCmt = ''
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -5,25 +5,18 @@
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="stuName">
|
||||
<el-input v-model="queryParams.stuName" placeholder="请输入姓名" clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.stuName" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学院" prop="deptName">
|
||||
<el-input v-model="queryParams.deptName" placeholder="请输入学院" clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.deptName" placeholder="请输入学院" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="applyStatus">
|
||||
<el-select v-model="queryParams.applyStatus" placeholder="请选择审核状态" clearable>
|
||||
<el-option v-for="dict in dict.type.knzz_tufa_apply_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@@ -33,9 +26,7 @@
|
||||
</el-form-item>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini"
|
||||
@click="handleExport"
|
||||
>导出execl</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出execl</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -53,13 +44,15 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="lookVClick(scope.row)">查看</el-button>
|
||||
<!-- 撤回按钮:applyStatus 不等于 1 时显示 -->
|
||||
<el-button v-if="scope.row.applyStatus != 1" size="mini" type="text" icon="el-icon-refresh-left"
|
||||
@click="handleRevoke(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<el-dialog title="查看" :visible.sync="lookV" :fullscreen="true" :destroy-on-close="true" @close="getList">
|
||||
<el-row>
|
||||
@@ -70,60 +63,43 @@
|
||||
<!-- 中职毕业证下载 -->
|
||||
<el-form v-if="lookForm.diplomaCertificate" label-width="120px">
|
||||
<el-form-item label="中职毕业证">
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" @click="downloadDiploma">下载毕业证
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-view" @click="lookBiye">预览毕业证
|
||||
</el-button>
|
||||
|
||||
<el-dialog :visible.sync="lookBiyeV" :destroy-on-close="true" append-to-body>
|
||||
<span slot="title">中职毕业证预览</span>
|
||||
<iframe v-if="lookBiyeUrl" :src="lookBiyeUrl" style="width: 100%; height: 80vh;"
|
||||
frameborder="0"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" @click="downloadDiploma">下载文件</el-button>
|
||||
</el-form-item>
|
||||
<FileUpload v-model="lookForm.diplomaCertificate" />
|
||||
</el-form>
|
||||
<el-button v-print="printContent">打印</el-button>
|
||||
<hr>
|
||||
<el-timeline>
|
||||
<el-timeline-item v-if="lookForm.fdyCmt && lookForm.fdyDate" :timestamp="lookForm.fdyDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.fdyCmt && lookForm.fdyDate" :timestamp="lookForm.fdyDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>辅导员审核</strong>
|
||||
<div>{{ lookForm.fdyCmt }}</div>
|
||||
<img v-if="lookForm.fdySign" :src="baseurl + lookForm.fdySign" alt="辅导员签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item v-if="lookForm.xwCmt && lookForm.xwDate" :timestamp="lookForm.xwDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.xwCmt && lookForm.xwDate" :timestamp="lookForm.xwDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>院系审核</strong>
|
||||
<div>{{ lookForm.xwCmt }}</div>
|
||||
<img v-if="lookForm.xwSign" :src="baseurl + lookForm.xwSign" alt="院系签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item v-if="lookForm.xgCmt && lookForm.xgDate" :timestamp="lookForm.xgDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.xgCmt && lookForm.xgDate" :timestamp="lookForm.xgDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>学工审核</strong>
|
||||
<div>{{ lookForm.xgCmt }}</div>
|
||||
<img v-if="lookForm.xgSign" :src="baseurl + lookForm.xgSign" alt="学工签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -146,137 +122,175 @@ import { getTokenKeySessionStorage as getToken } from '@/utils/auth'
|
||||
import TufaApply from '@/views/comprehensive/knzzZsgApply/cpnt/TufaApply.vue'
|
||||
import TufaLook from '@/views/comprehensive/knzzZsgApply/cpnt/TufaLook.vue'
|
||||
|
||||
import { listFdyAll as listView, doAudit } from '@/api/comprehensive/knzzZsgApply'
|
||||
import { listFdyAll as listView, doAudit, doEdit } from '@/api/comprehensive/knzzZsgApply'
|
||||
|
||||
import { getOwnSign } from '@/api/workstudy/post'
|
||||
|
||||
export default {
|
||||
name: 'TufaFdy',
|
||||
dicts: ['knzz_tufa_apply_status'],
|
||||
components: {
|
||||
TufaApply,
|
||||
TufaLook
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: 'TufaFdy',
|
||||
dicts: ['knzz_tufa_apply_status'],
|
||||
components: {
|
||||
TufaApply,
|
||||
TufaLook
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
lookForm: {},
|
||||
lookV: false,
|
||||
lookForm: {},
|
||||
lookV: false,
|
||||
|
||||
upload: {
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
url: process.env.VUE_APP_BASE_API + '/common/upload',
|
||||
fileList: []
|
||||
},
|
||||
baseurl: process.env.VUE_APP_BASE_API + '/',
|
||||
boolImg,
|
||||
upload: {
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
url: process.env.VUE_APP_BASE_API + '/common/upload',
|
||||
fileList: []
|
||||
},
|
||||
baseurl: process.env.VUE_APP_BASE_API + '/',
|
||||
boolImg,
|
||||
|
||||
printContent: {
|
||||
id: 'printDiv',
|
||||
extraCss: '',
|
||||
extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
|
||||
previewBeforeOpenCallback() {
|
||||
console.log('正在加载预览窗口')
|
||||
},
|
||||
previewOpenCallback() {
|
||||
console.log('已经加载完预览窗口')
|
||||
},
|
||||
beforeOpenCallback(vue) {
|
||||
vue.printLoading = true
|
||||
console.log('打开之前')
|
||||
},
|
||||
openCallback(vue) {
|
||||
vue.printLoading = false
|
||||
console.log('执行了打印')
|
||||
},
|
||||
closeCallback() {
|
||||
console.log('关闭了打印工具')
|
||||
},
|
||||
clickMounted(vue) {
|
||||
console.log('点击了打印按钮')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
lookBiyeV: false,
|
||||
lookBiyeUrl: ''
|
||||
printContent: {
|
||||
id: 'printDiv',
|
||||
extraCss: '',
|
||||
extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
|
||||
previewBeforeOpenCallback() {
|
||||
console.log('正在加载预览窗口')
|
||||
},
|
||||
previewOpenCallback() {
|
||||
console.log('已经加载完预览窗口')
|
||||
},
|
||||
beforeOpenCallback(vue) {
|
||||
vue.printLoading = true
|
||||
console.log('打开之前')
|
||||
},
|
||||
openCallback(vue) {
|
||||
vue.printLoading = false
|
||||
console.log('执行了打印')
|
||||
},
|
||||
closeCallback() {
|
||||
console.log('关闭了打印工具')
|
||||
},
|
||||
clickMounted(vue) {
|
||||
console.log('点击了打印按钮')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
lookBiye() {
|
||||
const isAbsoluteUrl = this.lookForm.diplomaCertificate.startsWith('http')
|
||||
const pdfUrl = isAbsoluteUrl
|
||||
? this.lookForm.diplomaCertificate
|
||||
: `${this.baseurl}${this.lookForm.diplomaCertificate}`
|
||||
this.lookBiyeUrl = pdfUrl
|
||||
this.lookBiyeV = true
|
||||
},
|
||||
getFileName(path) {
|
||||
if (!path) return ''
|
||||
return path.split('/').pop()
|
||||
},
|
||||
downloadDiploma() {
|
||||
if (!this.lookForm.diplomaCertificate) return
|
||||
const isAbsoluteUrl = this.lookForm.diplomaCertificate.startsWith('http')
|
||||
const pdfUrl = isAbsoluteUrl
|
||||
? this.lookForm.diplomaCertificate
|
||||
: `${this.baseurl}${this.lookForm.diplomaCertificate}`
|
||||
const link = document.createElement('a')
|
||||
link.href = pdfUrl
|
||||
link.download = this.getFileName(this.lookForm.diplomaCertificate)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
async getList() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
this.tableData = [...res.rows]
|
||||
this.total = res.total
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
async lookVClick(row) {
|
||||
this.lookForm = {}
|
||||
this.lookForm = { ...row }
|
||||
|
||||
this.lookV = true
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('/comprehensive/knzzZsgApply/export', {
|
||||
...this.queryParams
|
||||
}, `apply_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
lookBiyeV: false,
|
||||
lookBiyeUrl: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
downloadDiploma() {
|
||||
const raw = this.lookForm.hardFile
|
||||
if (!raw) return
|
||||
// 支持逗号分隔的多个文件
|
||||
const files = String(raw)
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean)
|
||||
|
||||
const triggerDownload = (href, filename) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = href
|
||||
// 设置下载文件名(跨域时可能被浏览器忽略,但不影响触发下载/打开)
|
||||
link.download = filename || ''
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
||||
files.forEach((file, idx) => {
|
||||
const isAbsoluteUrl = /^https?:\/\//i.test(file)
|
||||
const url = isAbsoluteUrl ? file : `${this.baseurl}${file}`
|
||||
const name = this.getFileName(file)
|
||||
// 轻微延时,避免浏览器对一次事件同时触发多个下载的限制
|
||||
setTimeout(() => triggerDownload(url, name), idx * 200)
|
||||
})
|
||||
},
|
||||
lookBiye() {
|
||||
const isAbsoluteUrl = this.lookForm.diplomaCertificate.startsWith('http')
|
||||
const pdfUrl = isAbsoluteUrl
|
||||
? this.lookForm.diplomaCertificate
|
||||
: `${this.baseurl}${this.lookForm.diplomaCertificate}`
|
||||
this.lookBiyeUrl = pdfUrl
|
||||
this.lookBiyeV = true
|
||||
},
|
||||
getFileName(path) {
|
||||
if (!path) return ''
|
||||
return path.split('/').pop()
|
||||
},
|
||||
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
async getList() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
this.tableData = [...res.rows]
|
||||
this.total = res.total
|
||||
}
|
||||
|
||||
},
|
||||
async lookVClick(row) {
|
||||
this.lookForm = {}
|
||||
this.lookForm = { ...row }
|
||||
|
||||
this.lookV = true
|
||||
},
|
||||
// 撤回到“已提交审核”(applyStatus=1)
|
||||
async handleRevoke(row) {
|
||||
try {
|
||||
await this.$confirm('确定撤回该申请至“已提交审核”状态吗?', '提示', { type: 'warning' })
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
const loading = this.$loading({ lock: true, text: '撤回中…' })
|
||||
try {
|
||||
const payload = { id: row.id, applyStatus: 1 }
|
||||
const res = await doEdit(payload)
|
||||
if (res.code === 200) {
|
||||
this.$message.success('撤回成功,状态已变更为:已提交审核')
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error(res.msg || '撤回失败')
|
||||
}
|
||||
} catch (err) {
|
||||
this.$message.error(`撤回失败:${err?.message || '网络错误'}`)
|
||||
} finally {
|
||||
loading.close && loading.close()
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('/comprehensive/knzzZsgApply/export', {
|
||||
...this.queryParams
|
||||
}, `apply_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,14 +5,10 @@
|
||||
<el-input v-model="queryParams.stuNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="stuName">
|
||||
<el-input v-model="queryParams.stuName" placeholder="请输入姓名" clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.stuName" placeholder="请输入姓名" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级" prop="className">
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.className" placeholder="请输入班级" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@@ -24,9 +20,7 @@
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="manyVClick">批量通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini"
|
||||
@click="handleExport"
|
||||
>导出execl</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出execl</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange">
|
||||
@@ -44,16 +38,13 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="lookVClick(scope.row)">审核</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
@click="editVClick(scope.row)"
|
||||
>修改学生填写的信息</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="editVClick(scope.row)">修改学生填写的信息</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<el-dialog title="审核" :visible.sync="lookV" :fullscreen="true" :destroy-on-close="true" @close="getList">
|
||||
<el-row>
|
||||
@@ -62,7 +53,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- 中职毕业证下载 -->
|
||||
<el-form v-if="lookForm.diplomaCertificate" label-width="120px">
|
||||
<!-- <el-form v-if="lookForm.diplomaCertificate" label-width="120px">
|
||||
<el-form-item label="中职毕业证">
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" @click="downloadDiploma">下载毕业证
|
||||
</el-button>
|
||||
@@ -72,12 +63,18 @@
|
||||
|
||||
<el-dialog :visible.sync="lookBiyeV" :destroy-on-close="true" append-to-body>
|
||||
<span slot="title">中职毕业证预览</span>
|
||||
<iframe v-if="lookBiyeUrl" :src="lookBiyeUrl" style="width: 100%; height: 80vh;"
|
||||
frameborder="0"
|
||||
/>
|
||||
<iframe v-if="lookBiyeUrl" :src="lookBiyeUrl" style="width: 100%; height: 80vh;" frameborder="0" />
|
||||
</el-dialog>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
-->
|
||||
<!-- 证明材料下载 -->
|
||||
<el-form v-if="lookForm.diplomaCertificate" label-width="120px">
|
||||
<el-form-item label="中职毕业证">
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" @click="downloadDiploma">下载文件</el-button>
|
||||
</el-form-item>
|
||||
<FileUpload v-model="lookForm.diplomaCertificate" />
|
||||
</el-form>
|
||||
<el-form label-width="200px" size="mini" class="lookForm">
|
||||
<el-form-item label="是否通过">
|
||||
@@ -91,13 +88,11 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg"
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess"
|
||||
>
|
||||
<img v-if="auditForm.fdySign" :src="baseurl + auditForm.fdySign" width="200px"
|
||||
height="50px" class="avatar"
|
||||
>
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false" :file-list="upload.fileList"
|
||||
:on-success="handleAvatarSuccess">
|
||||
<img v-if="auditForm.fdySign" :src="baseurl + auditForm.fdySign" width="200px" height="50px"
|
||||
class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@@ -107,42 +102,36 @@
|
||||
</el-form>
|
||||
<hr>
|
||||
<el-timeline>
|
||||
<el-timeline-item v-if="lookForm.fdyCmt && lookForm.fdyDate" :timestamp="lookForm.fdyDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.fdyCmt && lookForm.fdyDate" :timestamp="lookForm.fdyDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>辅导员审核</strong>
|
||||
<div>{{ lookForm.fdyCmt }}</div>
|
||||
<img v-if="lookForm.fdySign" :src="baseurl + lookForm.fdySign" alt="辅导员签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item v-if="lookForm.xwCmt && lookForm.xwDate" :timestamp="lookForm.xwDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.xwCmt && lookForm.xwDate" :timestamp="lookForm.xwDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>院系审核</strong>
|
||||
<div>{{ lookForm.xwCmt }}</div>
|
||||
<img v-if="lookForm.xwSign" :src="baseurl + lookForm.xwSign" alt="院系签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item v-if="lookForm.xgCmt && lookForm.xgDate" :timestamp="lookForm.xgDate"
|
||||
color="green" placement="top"
|
||||
>
|
||||
<el-timeline-item v-if="lookForm.xgCmt && lookForm.xgDate" :timestamp="lookForm.xgDate" color="green"
|
||||
placement="top">
|
||||
<el-card>
|
||||
<div>
|
||||
<strong>学工审核</strong>
|
||||
<div>{{ lookForm.xgCmt }}</div>
|
||||
<img v-if="lookForm.xgSign" :src="baseurl + lookForm.xgSign" alt="学工签名"
|
||||
style="max-width:100px;margin-top:8px;"
|
||||
>
|
||||
style="max-width:100px;margin-top:8px;">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
@@ -165,11 +154,9 @@
|
||||
<el-input v-model="manyCmt" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg"
|
||||
accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader"
|
||||
:action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess1"
|
||||
>
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" accept="image/jpg,image/jpeg,image/png,image/bmp"
|
||||
:limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleAvatarSuccess1">
|
||||
<img v-if="manySign" :src="baseurl + manySign" width="200px" height="50px" class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
@@ -219,12 +206,9 @@
|
||||
|
||||
<el-form-item label="申请理由">
|
||||
<p style="line-height:18pt; margin:0pt; orphans:0; text-align:justify; widows:0">
|
||||
<span style="font-family:仿宋; font-size:12pt">本人基于如下第</span><span
|
||||
style="font-family:仿宋; font-size:12pt;"
|
||||
>
|
||||
<input v-model="editForm.applyReasonNum" style="width: 40px;" type="text"
|
||||
class="underline-input" placeholder="请输入"
|
||||
>
|
||||
<span style="font-family:仿宋; font-size:12pt">本人基于如下第</span><span style="font-family:仿宋; font-size:12pt;">
|
||||
<input v-model="editForm.applyReasonNum" style="width: 40px;" type="text" class="underline-input"
|
||||
placeholder="请输入">
|
||||
</span><span style="font-family:仿宋; font-size:12pt">种原因,符合学费补助申请条件,特提出申请,请审核.</span>
|
||||
</p>
|
||||
<p style="line-height:18pt; margin:0pt; orphans:0; text-align:justify; widows:0">
|
||||
@@ -256,6 +240,15 @@
|
||||
<el-form-item label="申请理由补充说明(填写)">
|
||||
<el-input v-model="editForm.applyExtraReason" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" accept="image/jpg,image/jpeg,image/png,image/bmp"
|
||||
:limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false"
|
||||
:file-list="upload.fileList" :on-success="handleEditSignSuccess">
|
||||
<img v-if="editForm.applySign" :src="baseurl + editForm.applySign" width="200px" height="50px"
|
||||
class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" plain @click="doEdit">提交修改</el-button>
|
||||
</el-form-item>
|
||||
@@ -278,353 +271,390 @@ import { listFdy as listView, doAudit, doMany, fdyEdit as doEdit } from '@/api/c
|
||||
import { getOwnSign } from '@/api/workstudy/post'
|
||||
|
||||
export default {
|
||||
name: 'TufaFdy',
|
||||
dicts: ['knzz_tufa_apply_status'],
|
||||
components: {
|
||||
TufaApply,
|
||||
TufaLook
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: 'TufaFdy',
|
||||
dicts: ['knzz_tufa_apply_status'],
|
||||
components: {
|
||||
TufaApply,
|
||||
TufaLook
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
lookForm: {},
|
||||
lookV: false,
|
||||
lookForm: {},
|
||||
lookV: false,
|
||||
|
||||
auditForm: {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
},
|
||||
auditRes: null,
|
||||
auditForm: {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
},
|
||||
auditRes: null,
|
||||
|
||||
upload: {
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
url: process.env.VUE_APP_BASE_API + '/common/upload',
|
||||
fileList: []
|
||||
},
|
||||
baseurl: process.env.VUE_APP_BASE_API + '/',
|
||||
boolImg,
|
||||
upload: {
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
url: process.env.VUE_APP_BASE_API + '/common/upload',
|
||||
fileList: []
|
||||
},
|
||||
baseurl: process.env.VUE_APP_BASE_API + '/',
|
||||
boolImg,
|
||||
|
||||
manyV: false,
|
||||
ids: [],
|
||||
manyStatus: null,
|
||||
manyCmt: '',
|
||||
manyRes: null,
|
||||
manySign: '',
|
||||
manyV: false,
|
||||
ids: [],
|
||||
manyStatus: null,
|
||||
manyCmt: '',
|
||||
manyRes: null,
|
||||
manySign: '',
|
||||
|
||||
editForm: {},
|
||||
editV: false,
|
||||
editForm: {},
|
||||
editV: false,
|
||||
|
||||
lookBiyeV: false,
|
||||
lookBiyeUrl: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getOwnSign()
|
||||
},
|
||||
methods: {
|
||||
lookBiye() {
|
||||
const isAbsoluteUrl = this.lookForm.diplomaCertificate.startsWith('http')
|
||||
const pdfUrl = isAbsoluteUrl
|
||||
? this.lookForm.diplomaCertificate
|
||||
: `${this.baseurl}${this.lookForm.diplomaCertificate}`
|
||||
this.lookBiyeUrl = pdfUrl
|
||||
this.lookBiyeV = true
|
||||
},
|
||||
|
||||
changeApplyReason(v) {
|
||||
if (v != '1.监测对象家庭学生(脱贫不稳定家庭学生、边缘易致贫家庭学生、突发严重困难家庭学生):') {
|
||||
this.editForm.applyReason1 = ''
|
||||
}
|
||||
},
|
||||
async doEdit() {
|
||||
let sdata = { ...this.editForm }
|
||||
if (isEmpty(sdata.inTime)) {
|
||||
this.$message.info('请填写入学时间')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.stuPhone)) {
|
||||
this.$message.info('请填写联系电话')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.bankCard)) {
|
||||
this.$message.info('请填写银行卡号')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.bankAddr)) {
|
||||
this.$message.info('请填写开户行')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.zzxx)) {
|
||||
this.$message.info('请填写就读中职学校')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.familyNum)) {
|
||||
this.$message.info('请填写家庭人口数')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.monthMoney)) {
|
||||
this.$message.info('请填写家庭月收入')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.perMoney)) {
|
||||
this.$message.info('请填写人均月收入')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.moneySrc)) {
|
||||
this.$message.info('请填写收入来源')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.applyReasonNum)) {
|
||||
this.$message.info('请填写申请理由序号')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.applyReason)) {
|
||||
this.$message.info('请填写申请理由')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.diplomaCertificate)) {
|
||||
this.$message.info('请上传中职毕业证pdf')
|
||||
return false
|
||||
}
|
||||
if (sdata.applyReason && sdata.applyReason.indexOf('1.监测对象家庭学生') === 0 && isEmpty(sdata.applyReason1)) {
|
||||
this.$message.info('请选择监测对象家庭学生的风险情况')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.applySign)) {
|
||||
this.$message.info('请上传申请人签名')
|
||||
return false
|
||||
}
|
||||
let loading = fullLoading(this)
|
||||
let res = await doEdit(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('修改成功')
|
||||
this.editV = false
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
editVClick(row) {
|
||||
console.log(row)
|
||||
this.editForm = {}
|
||||
this.editForm = { ...row }
|
||||
this.editV = true
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
handleAvatarSuccess1(response, file, fileList) {
|
||||
this.manySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
changeManyRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.manyStatus = 2
|
||||
this.manyCmt = '经班级评审小组评议,同意推荐该同学申请广西中等职业学校毕业生升入高等学校就读的家庭经济困难学生学费补助.'
|
||||
break
|
||||
case '驳回':
|
||||
this.manyStatus = 10
|
||||
this.manyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.manyStatus = null
|
||||
this.manyCmt = ''
|
||||
break
|
||||
}
|
||||
},
|
||||
manyVClick() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$message.info('请至少选择一条数据')
|
||||
return
|
||||
} else {
|
||||
this.manyV = true
|
||||
}
|
||||
},
|
||||
async doMany() {
|
||||
if (isEmpty(this.manyRes)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
let sdata = []
|
||||
this.ids.map(x => {
|
||||
let temp = {
|
||||
id: x,
|
||||
applyStatus: this.manyStatus,
|
||||
fdyCmt: this.manyCmt,
|
||||
fdySign: this.manySign
|
||||
}
|
||||
sdata.push(temp)
|
||||
})
|
||||
let loading = fullLoading(this)
|
||||
let res = await doMany(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg)
|
||||
this.manyV = false
|
||||
this.getList()
|
||||
this.ids = []
|
||||
}
|
||||
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
},
|
||||
getFileName(path) {
|
||||
if (!path) return ''
|
||||
return path.split('/').pop()
|
||||
},
|
||||
downloadDiploma() {
|
||||
if (!this.lookForm.diplomaCertificate) return
|
||||
const isAbsoluteUrl = this.lookForm.diplomaCertificate.startsWith('http')
|
||||
const pdfUrl = isAbsoluteUrl
|
||||
? this.lookForm.diplomaCertificate
|
||||
: `${this.baseurl}${this.lookForm.diplomaCertificate}`
|
||||
const link = document.createElement('a')
|
||||
link.href = pdfUrl
|
||||
link.download = this.getFileName(this.lookForm.diplomaCertificate)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
},
|
||||
async doNext() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
let data = [...res.rows]
|
||||
if (data.length > 0) {
|
||||
let row = data[0]
|
||||
this.lookVClick(row)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit() {
|
||||
let sdata = { ...this.auditForm }
|
||||
if (isEmpty(sdata.applyStatus)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
|
||||
let loading = fullLoading(this)
|
||||
let res = await doAudit(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('审核成功')
|
||||
this.lookV = false
|
||||
await this.doNext()
|
||||
}
|
||||
|
||||
},
|
||||
async getOwnSign() {
|
||||
let res = await getOwnSign()
|
||||
if (res.code == 200) {
|
||||
let data = { ...res.data }
|
||||
if (isEmpty(data.signature)) {
|
||||
this.$confirm('您的签名尚未上传', '提示', {
|
||||
confirmButtonText: '点我前往',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$router.push('/user/profile')
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} else {
|
||||
this.auditForm.fdySign = data.signature
|
||||
this.manySign = data.signature
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleAvatarSuccess(response, file, fileList) {
|
||||
this.auditForm.fdySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async getList() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
this.tableData = [...res.rows]
|
||||
this.total = res.total
|
||||
}
|
||||
|
||||
},
|
||||
async lookVClick(row) {
|
||||
this.auditRes = null
|
||||
this.lookForm = {}
|
||||
this.lookForm = { ...row }
|
||||
this.auditForm = {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
}
|
||||
this.auditForm.id = row.id
|
||||
await this.getOwnSign()
|
||||
this.lookV = true
|
||||
},
|
||||
|
||||
changeAuditRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.auditForm.applyStatus = 2
|
||||
this.auditForm.fdyCmt = '经班级评审小组评议,同意推荐该同学申请广西中等职业学校毕业生升入高等学校就读的家庭经济困难学生学费补助.'
|
||||
break
|
||||
case '驳回':
|
||||
this.auditForm.applyStatus = 10
|
||||
this.auditForm.fdyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.auditForm.applyStatus = null
|
||||
this.auditForm.fdyCmt = ''
|
||||
break
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('/comprehensive/knzzZsgApply/export', {
|
||||
...this.queryParams
|
||||
}, `apply_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
lookBiyeV: false,
|
||||
lookBiyeUrl: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getOwnSign()
|
||||
},
|
||||
methods: {
|
||||
downloadDiploma() {
|
||||
const raw = this.lookForm.hardFile
|
||||
if (!raw) return
|
||||
// 支持逗号分隔的多个文件
|
||||
const files = String(raw)
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean)
|
||||
|
||||
const triggerDownload = (href, filename) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = href
|
||||
// 设置下载文件名(跨域时可能被浏览器忽略,但不影响触发下载/打开)
|
||||
link.download = filename || ''
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
||||
files.forEach((file, idx) => {
|
||||
const isAbsoluteUrl = /^https?:\/\//i.test(file)
|
||||
const url = isAbsoluteUrl ? file : `${this.baseurl}${file}`
|
||||
const name = this.getFileName(file)
|
||||
// 轻微延时,避免浏览器对一次事件同时触发多个下载的限制
|
||||
setTimeout(() => triggerDownload(url, name), idx * 200)
|
||||
})
|
||||
},
|
||||
handleEditSignSuccess(response, file, fileList) {
|
||||
// 确保属性响应式存在
|
||||
if (!Object.prototype.hasOwnProperty.call(this.editForm, 'applySign')) {
|
||||
this.$set(this.editForm, 'applySign', response.fileName)
|
||||
} else {
|
||||
this.editForm.applySign = response.fileName
|
||||
}
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
lookBiye() {
|
||||
const isAbsoluteUrl = this.lookForm.diplomaCertificate.startsWith('http')
|
||||
const pdfUrl = isAbsoluteUrl
|
||||
? this.lookForm.diplomaCertificate
|
||||
: `${this.baseurl}${this.lookForm.diplomaCertificate}`
|
||||
this.lookBiyeUrl = pdfUrl
|
||||
this.lookBiyeV = true
|
||||
},
|
||||
|
||||
changeApplyReason(v) {
|
||||
if (v != '1.监测对象家庭学生(脱贫不稳定家庭学生、边缘易致贫家庭学生、突发严重困难家庭学生):') {
|
||||
this.editForm.applyReason1 = ''
|
||||
}
|
||||
},
|
||||
async doEdit() {
|
||||
let sdata = { ...this.editForm }
|
||||
if (isEmpty(sdata.inTime)) {
|
||||
this.$message.info('请填写入学时间')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.stuPhone)) {
|
||||
this.$message.info('请填写联系电话')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.bankCard)) {
|
||||
this.$message.info('请填写银行卡号')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.bankAddr)) {
|
||||
this.$message.info('请填写开户行')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.zzxx)) {
|
||||
this.$message.info('请填写就读中职学校')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.familyNum)) {
|
||||
this.$message.info('请填写家庭人口数')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.monthMoney)) {
|
||||
this.$message.info('请填写家庭月收入')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.perMoney)) {
|
||||
this.$message.info('请填写人均月收入')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.moneySrc)) {
|
||||
this.$message.info('请填写收入来源')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.applyReasonNum)) {
|
||||
this.$message.info('请填写申请理由序号')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.applyReason)) {
|
||||
this.$message.info('请填写申请理由')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.diplomaCertificate)) {
|
||||
this.$message.info('请上传中职毕业证pdf')
|
||||
return false
|
||||
}
|
||||
if (sdata.applyReason && sdata.applyReason.indexOf('1.监测对象家庭学生') === 0 && isEmpty(sdata.applyReason1)) {
|
||||
this.$message.info('请选择监测对象家庭学生的风险情况')
|
||||
return false
|
||||
}
|
||||
if (isEmpty(sdata.applySign)) {
|
||||
this.$message.info('请上传申请人签名')
|
||||
return false
|
||||
}
|
||||
let loading = fullLoading(this)
|
||||
let res = await doEdit(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('修改成功')
|
||||
this.editV = false
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
editVClick(row) {
|
||||
console.log(row)
|
||||
this.editForm = {}
|
||||
this.editForm = { ...row }
|
||||
this.editV = true
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
handleAvatarSuccess1(response, file, fileList) {
|
||||
this.manySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
changeManyRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.manyStatus = 2
|
||||
this.manyCmt = '经班级评审小组评议,同意推荐该同学申请广西中等职业学校毕业生升入高等学校就读的家庭经济困难学生学费补助.'
|
||||
break
|
||||
case '驳回':
|
||||
this.manyStatus = 10
|
||||
this.manyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.manyStatus = null
|
||||
this.manyCmt = ''
|
||||
break
|
||||
}
|
||||
},
|
||||
manyVClick() {
|
||||
if (this.ids.length == 0) {
|
||||
this.$message.info('请至少选择一条数据')
|
||||
return
|
||||
} else {
|
||||
this.manyV = true
|
||||
}
|
||||
},
|
||||
async doMany() {
|
||||
if (isEmpty(this.manyRes)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(this.manySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
let sdata = []
|
||||
this.ids.map(x => {
|
||||
let temp = {
|
||||
id: x,
|
||||
applyStatus: this.manyStatus,
|
||||
fdyCmt: this.manyCmt,
|
||||
fdySign: this.manySign
|
||||
}
|
||||
sdata.push(temp)
|
||||
})
|
||||
let loading = fullLoading(this)
|
||||
let res = await doMany(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success(res.msg)
|
||||
this.manyV = false
|
||||
this.getList()
|
||||
this.ids = []
|
||||
}
|
||||
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
},
|
||||
getFileName(path) {
|
||||
if (!path) return ''
|
||||
return path.split('/').pop()
|
||||
},
|
||||
downloadDiploma() {
|
||||
if (!this.lookForm.diplomaCertificate) return
|
||||
const isAbsoluteUrl = this.lookForm.diplomaCertificate.startsWith('http')
|
||||
const pdfUrl = isAbsoluteUrl
|
||||
? this.lookForm.diplomaCertificate
|
||||
: `${this.baseurl}${this.lookForm.diplomaCertificate}`
|
||||
const link = document.createElement('a')
|
||||
link.href = pdfUrl
|
||||
link.download = this.getFileName(this.lookForm.diplomaCertificate)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
},
|
||||
async doNext() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
let data = [...res.rows]
|
||||
if (data.length > 0) {
|
||||
let row = data[0]
|
||||
this.lookVClick(row)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit() {
|
||||
let sdata = { ...this.auditForm }
|
||||
if (isEmpty(sdata.applyStatus)) {
|
||||
this.$message.info('请选择是否通过')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdyCmt)) {
|
||||
this.$message.info('请输入意见')
|
||||
return
|
||||
}
|
||||
if (isEmpty(sdata.fdySign)) {
|
||||
this.$message.info('请上传签名图片')
|
||||
return
|
||||
}
|
||||
|
||||
let loading = fullLoading(this)
|
||||
let res = await doAudit(sdata)
|
||||
loading.close()
|
||||
if (res.code == 200) {
|
||||
this.$message.success('审核成功')
|
||||
this.lookV = false
|
||||
await this.doNext()
|
||||
}
|
||||
|
||||
},
|
||||
async getOwnSign() {
|
||||
let res = await getOwnSign()
|
||||
if (res.code == 200) {
|
||||
let data = { ...res.data }
|
||||
if (isEmpty(data.signature)) {
|
||||
this.$confirm('您的签名尚未上传', '提示', {
|
||||
confirmButtonText: '点我前往',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$router.push('/user/profile')
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} else {
|
||||
this.auditForm.fdySign = data.signature
|
||||
this.manySign = data.signature
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleAvatarSuccess(response, file, fileList) {
|
||||
this.auditForm.fdySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async getList() {
|
||||
this.loading = true
|
||||
let res = await listView(this.queryParams)
|
||||
this.loading = false
|
||||
if (res.code == 200) {
|
||||
this.tableData = [...res.rows]
|
||||
this.total = res.total
|
||||
}
|
||||
|
||||
},
|
||||
async lookVClick(row) {
|
||||
this.auditRes = null
|
||||
this.lookForm = {}
|
||||
this.lookForm = { ...row }
|
||||
this.auditForm = {
|
||||
fdySign: '',
|
||||
fdyCmt: ''
|
||||
}
|
||||
this.auditForm.id = row.id
|
||||
await this.getOwnSign()
|
||||
this.lookV = true
|
||||
},
|
||||
|
||||
changeAuditRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
this.auditForm.applyStatus = 2
|
||||
this.auditForm.fdyCmt = '经班级评审小组评议,同意推荐该同学申请广西中等职业学校毕业生升入高等学校就读的家庭经济困难学生学费补助.'
|
||||
break
|
||||
case '驳回':
|
||||
this.auditForm.applyStatus = 10
|
||||
this.auditForm.fdyCmt = '驳回,驳回原因:'
|
||||
break
|
||||
default:
|
||||
this.auditForm.applyStatus = null
|
||||
this.auditForm.fdyCmt = ''
|
||||
break
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('/comprehensive/knzzZsgApply/export', {
|
||||
...this.queryParams
|
||||
}, `apply_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.lookForm {
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="lookVClick(scope.row)">查看</el-button>
|
||||
<el-button v-if="scope.row.applyStatus != 1" size="mini" type="text" icon="el-icon-refresh-left" @click="handleRevoke(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -121,7 +122,7 @@ import {getTokenKeySessionStorage as getToken} from '@/utils/auth'
|
||||
import TufaApply from '@/views/comprehensive/knzzZzqApply/cpnt/TufaApply.vue'
|
||||
import TufaLook from '@/views/comprehensive/knzzZzqApply/cpnt/TufaLook.vue'
|
||||
|
||||
import {listFdyAll as listView, doAudit} from '@/api/comprehensive/knzzZzqApply'
|
||||
import {listFdyAll as listView, doEdit} from '@/api/comprehensive/knzzZzqApply'
|
||||
|
||||
import {getOwnSign} from '@/api/workstudy/post'
|
||||
|
||||
@@ -212,6 +213,29 @@ export default {
|
||||
|
||||
this.lookV = true
|
||||
},
|
||||
// 撤回到“已提交审核”(applyStatus=1)
|
||||
async handleRevoke(row) {
|
||||
try {
|
||||
await this.$confirm('确定撤回该申请至“已提交审核”状态吗?', '提示', { type: 'warning' })
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
const loading = this.$loading({ lock: true, text: '撤回中…' })
|
||||
try {
|
||||
const payload = { id: row.id, applyStatus: 1 }
|
||||
const res = await doEdit(payload)
|
||||
if (res.code === 200) {
|
||||
this.$message.success('撤回成功,状态已变更为:已提交审核')
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error(res.msg || '撤回失败')
|
||||
}
|
||||
} catch (err) {
|
||||
this.$message.error(`撤回失败:${err?.message || '网络错误'}`)
|
||||
} finally {
|
||||
loading.close && loading.close()
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('/comprehensive/knzzZzqApply/export', {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="lookVClick(scope.row)">审核</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openEdit(scope.row)">修改数据</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -164,7 +165,58 @@
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- 修改数据弹窗 -->
|
||||
<el-dialog title="修改" :visible.sync="editV" width="900px" @close="getList">
|
||||
<el-form label-width="200px" size="mini" class="lookForm">
|
||||
<el-form-item label="入学时间">
|
||||
<el-input v-model="editForm.inTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="曾获何种奖励">
|
||||
<el-input v-model="editForm.helpHis" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专业名次">
|
||||
<el-input v-model="editForm.majorRank" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专业总人数">
|
||||
<el-input v-model="editForm.majorNum" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否实行综合考评排名">
|
||||
<el-radio-group v-model="editForm.isCph">
|
||||
<el-radio :label="'是'">是</el-radio>
|
||||
<el-radio :label="'否'">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="必修课门数">
|
||||
<el-input v-model="editForm.bxk" />
|
||||
</el-form-item>
|
||||
<el-form-item label="及格门数">
|
||||
<el-input v-model="editForm.jg" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级排名">
|
||||
<el-input v-model="editForm.classRank" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班级总人数">
|
||||
<el-input v-model="editForm.classNum" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请理由">
|
||||
<el-input v-model="editForm.applyReason" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请材料">
|
||||
<FileUpload v-model="editForm.applyFile" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人签名">
|
||||
<el-upload style="display: inline;" :before-upload="boolImg" accept="image/jpg,image/jpeg,image/png,image/bmp" :limit="1" class="avatar-uploader" :action="upload.url" :headers="upload.headers" :show-file-list="false" :file-list="upload.fileList" :on-success="handleEditSignSuccess">
|
||||
<img v-if="editForm.applySign" :src="baseurl + editForm.applySign" width="200px" height="50px" class="avatar">
|
||||
<span v-else> 点击上传</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" plain @click="handleEditSave">提交修改</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -175,7 +227,7 @@ import {getTokenKeySessionStorage as getToken} from '@/utils/auth'
|
||||
import TufaApply from '@/views/comprehensive/knzzZzqApply/cpnt/TufaApply.vue'
|
||||
import TufaLook from '@/views/comprehensive/knzzZzqApply/cpnt/TufaLook.vue'
|
||||
|
||||
import {listFdy as listView, doAudit, doMany} from '@/api/comprehensive/knzzZzqApply'
|
||||
import {listFdy as listView, doAudit, doMany, doEdit, getKnzzZzqApply, updateKnzzZzqApply} from '@/api/comprehensive/knzzZzqApply'
|
||||
|
||||
import {getOwnSign} from '@/api/workstudy/post'
|
||||
|
||||
@@ -199,6 +251,23 @@ export default {
|
||||
|
||||
lookForm: {},
|
||||
lookV: false,
|
||||
editV: false,
|
||||
editForm: {
|
||||
id: null,
|
||||
inTime: '',
|
||||
helpHis: '',
|
||||
majorRank: '',
|
||||
majorNum: '',
|
||||
isCph: '',
|
||||
bxk: '',
|
||||
jg: '',
|
||||
classRank: '',
|
||||
classNum: '',
|
||||
applyReason: '',
|
||||
applyFile: '',
|
||||
applySign: ''
|
||||
},
|
||||
originalEditForm: {},
|
||||
|
||||
auditForm: {
|
||||
fdySign: '',
|
||||
@@ -388,6 +457,47 @@ export default {
|
||||
this.lookV = true
|
||||
},
|
||||
|
||||
async openEdit(row) {
|
||||
const loading = fullLoading(this)
|
||||
try {
|
||||
const res = await getKnzzZzqApply(row.id)
|
||||
if (res.code === 200) {
|
||||
this.editForm = { ...res.data }
|
||||
this.originalEditForm = { ...res.data }
|
||||
this.editV = true
|
||||
} else {
|
||||
this.$message.error(res.msg || '获取详情失败')
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error('获取详情异常,请稍后重试')
|
||||
} finally {
|
||||
loading.close()
|
||||
}
|
||||
},
|
||||
handleEditSignSuccess(response, file, fileList) {
|
||||
this.editForm.applySign = response.fileName
|
||||
this.upload.fileList = []
|
||||
this.$forceUpdate()
|
||||
},
|
||||
async handleEditSave() {
|
||||
const sdata = { ...this.editForm }
|
||||
const loading = fullLoading(this)
|
||||
try {
|
||||
const res = await doEdit(sdata)
|
||||
if (res.code == 200) {
|
||||
this.$message.success('保存成功')
|
||||
this.editV = false
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.error(res.msg || '保存失败')
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error('保存异常,请稍后重试')
|
||||
} finally {
|
||||
loading.close()
|
||||
}
|
||||
},
|
||||
|
||||
changeAuditRes(v) {
|
||||
switch (v) {
|
||||
case '通过':
|
||||
|
||||
@@ -325,14 +325,51 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
reader.onload = (e) => {
|
||||
let data = e.target.result
|
||||
let workbook = XLSX.read(data, { //手动转化
|
||||
type: 'binary'
|
||||
let workbook = XLSX.read(data, {
|
||||
type: 'array'
|
||||
})
|
||||
//获取json格式的Excel数据
|
||||
let jsonData = XLSX.utils.sheet_to_json(workbook.Sheets[workbook
|
||||
.SheetNames[0]], {
|
||||
defval: 'null' //单元格为空时的默认值
|
||||
let ws = workbook.Sheets[workbook.SheetNames[0]]
|
||||
let jsonData = XLSX.utils.sheet_to_json(ws, {
|
||||
defval: '',
|
||||
raw: false
|
||||
})
|
||||
const toDateString = (v) => {
|
||||
const pad = (n) => (n < 10 ? '0' + n : '' + n)
|
||||
const serialToDate = (s) => {
|
||||
const epoch = Date.UTC(1899, 11, 30)
|
||||
const day = Math.floor(s)
|
||||
const ms = Math.round((s - day) * 86400000)
|
||||
return new Date(epoch + day * 86400000 + ms)
|
||||
}
|
||||
if (v === null || v === undefined) return ''
|
||||
if (typeof v === 'number') {
|
||||
const d = serialToDate(v)
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
}
|
||||
if (Object.prototype.toString.call(v) === '[object Date]') {
|
||||
const d = v
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
}
|
||||
if (typeof v === 'string') {
|
||||
const s = v.replace(/\./g, '/').trim()
|
||||
let m = s.match(/^(\d{4})[\/-](\d{1,2})[\/-](\d{1,2})$/)
|
||||
if (m) return `${m[1]}-${pad(parseInt(m[2]))}-${pad(parseInt(m[3]))}`
|
||||
m = s.match(/^(\d{1,2})[\/-](\d{1,2})[\/-](\d{2,4})$/)
|
||||
if (m) {
|
||||
const y = m[3].length === 2 ? 2000 + parseInt(m[3]) : parseInt(m[3])
|
||||
return `${y}-${pad(parseInt(m[1]))}-${pad(parseInt(m[2]))}`
|
||||
}
|
||||
return s
|
||||
}
|
||||
return ''
|
||||
}
|
||||
jsonData = jsonData.map(r => ({
|
||||
...r,
|
||||
'学生个人申请时间': toDateString(r['学生个人申请时间']),
|
||||
'辅导员审核时间': toDateString(r['辅导员审核时间']),
|
||||
'系书记审核时间': toDateString(r['系书记审核时间']),
|
||||
'学院审核时间': toDateString(r['学院审核时间'])
|
||||
}))
|
||||
resolve(jsonData)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user