2025-07-28 15:52:07 +08:00
< template >
2025-10-18 17:13:04 +08:00
< div class = "app-container" >
< el-form ref = "queryForm" class = "lookForm" :model = "queryParams" size = "mini" :inline = "true" label -width = " 140px " >
< el-form-item label = "学生姓名" prop = "stuName" >
< el-input v-model = "queryParams.stuName" placeholder="请输入学生姓名" clearable
@ keyup . enter . native = "handleQuery"
/ >
< / el-form-item >
< el-form-item label = "岗位名称" prop = "postName" >
< el-input v-model = "queryParams.postName" 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-form-item >
< el-form-item label = "审核状态" prop = "applyStatus" >
< el-select v-model = "queryParams.applyStatus" placeholder="请选择审核状态" clearable >
< el-option v-for = "dict in dict.type.qgzx_apply_status" :key="dict.value" :label="dict.label"
: value = "dict.value"
/ >
< / el-select >
< / el-form-item >
< el-form-item label = "结算月份" prop = "applyTime" >
< el-date-picker v-model = "queryParams.applyTime" clearable type="month" value-format="yyyy-MM-dd"
placeholder = "请选择结算月份"
/ >
< / el-form-item >
< el-form-item >
< el-button type = "primary" icon = "el-icon-search" size = "mini" @click ="handleQuery" > 搜索 < / el -button >
< el-button icon = "el-icon-refresh" size = "mini" @click ="resetQuery" > 重置 < / el -button >
< el-button type = "warning" plain icon = "el-icon-download" size = "mini" @click ="handleExport" > 导出 < / el -button >
< el-button type = "warning" plain icon = "el-icon-download" size = "mini" @click ="printVClick" > 打印 < / el -button >
< el-button type = "success" plain icon = "el-icon-plus" size = "mini" @click ="addVClick" > 添加学生薪资 < / el -button >
< el-button type = "success" plain icon = "el-icon-plus" size = "mini"
@ click = "addExtraVClick"
> 添加学生薪资 ( 未入岗学生 ) < / el-button >
< / el-form-item >
< / el-form >
< el-table v-loading = "loading" :data="tableData" >
< el-table-column label = "#" align = "center" prop = "id" / >
< el-table-column label = "学号" align = "center" prop = "stuNo" / >
< el-table-column label = "姓名" align = "center" prop = "stuName" / >
< el-table-column label = "学院" align = "center" prop = "stuDept" / >
< el-table-column label = "岗位名称" align = "center" prop = "postName" / >
< el-table-column label = "设岗部门" align = "center" prop = "deptName" / >
< el-table-column label = "岗位类型" align = "center" prop = "postType" / >
< el-table-column label = "工作时长" align = "center" >
< template # default = "{ row }" >
{ { row . postType == "固定岗位A" ? row . totalTime + "天" : row . totalTime + "小时" } }
< / template >
< / el-table-column >
< el-table-column label = "结算月份" align = "center" >
< template # default = "{ row }" >
{ { formatDate ( row . applyTime ) } }
< / template >
< / el-table-column >
<!-- < el-table-column label = "薪资" align = "center" prop = "applyStatus" >
2025-07-28 15:52:07 +08:00
< template slot -scope = " scope " >
{ { scope . row . totalTime * 15 } }
< / template >
< / el-table-column > -- >
2025-10-18 17:13:04 +08:00
< el-table-column label = "审核状态" align = "center" prop = "applyStatus" >
< template slot -scope = " scope " >
< dict-tag :options = "dict.type.qgzx_apply_status" :value = "scope.row.applyStatus" / >
< / template >
< / el-table-column >
< el-table-column label = "操作" width = "200" align = "center" >
< 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.auditRemark == '-资助办领导手动添加-'" size="mini" type="text"
icon = "el-icon-delete" @ click = "delExtra(scope.row)"
> 删除 < / el-button >
< el-button v-else size = "mini" type = "text" icon = "el-icon-edit"
@ click = "editVClick(scope.row)"
> 修改工作时长 < / el-button >
< el-button v-if = "scope.row.auditRemark != '-资助办领导手动添加-'" size="mini" type="text" icon="el-icon-edit"
@ click = "editPostTypeMoneyVClick(scope.row)"
> 修改岗位类型 | 工时 < / el-button >
< el-button v-if = "scope.row.auditRemark != '-资助办领导手动添加-'" size="mini" type="text" icon="el-icon-edit"
@ click = "editMonthVClick(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"
/ >
< el-dialog title = "查看" :visible.sync = "lookV" >
< el-steps :active = "getStep(lookForm)" >
< el-step title = "指导老师填报薪资" description = "" / >
< el-step title = "部门领导审批" : status = "isEmpty(lookForm.deptCmt) ? 'wait' : getStepStatus(lookForm.deptCmt)" >
< template slot = "description" >
< div >
{ { isEmpty ( lookForm . deptNoName ) ? '' : lookForm . deptNoName } }
< / div >
< div >
{ { isEmpty ( lookForm . deptCmt ) ? '' : lookForm . deptCmt } }
< / div >
< div >
{ { isEmpty ( lookForm . deptTime ) ? '' : lookForm . deptTime } }
< / div >
< / template >
< / el-step >
< el-step title = "资助办领导审批" : status = "isEmpty(lookForm.highCmt) ? 'wait' : getStepStatus(lookForm.highCmt)" >
< template slot = "description" >
< div >
{ { isEmpty ( lookForm . highName ) ? '' : lookForm . highName } }
< / div >
< div >
{ { isEmpty ( lookForm . highCmt ) ? '' : lookForm . highCmt } }
< / div >
< div >
{ { isEmpty ( lookForm . highTime ) ? '' : lookForm . highTime } }
< / div >
< / template >
< / el-step >
< el-step title = "学工领导审批"
: status = "isEmpty(lookForm.finalCmt) ? 'wait' : getStepStatus(lookForm.finalCmt)"
>
< template slot = "description" >
< div >
{ { isEmpty ( lookForm . finalName ) ? '' : lookForm . finalName } }
< / div >
< div >
{ { isEmpty ( lookForm . finalCmt ) ? '' : lookForm . finalCmt } }
< / div >
< div >
{ { isEmpty ( lookForm . finalTime ) ? '' : lookForm . finalTime } }
< / div >
< / template >
< / el-step >
< / el-steps >
< hr >
< el-form class = "lookForm" size = "mini" label -width = " 148px " >
< el-form-item label = "学生" >
< el-input v-model = "lookForm.stuName" readonly / >
< / el-form-item >
< el-form-item label = "岗位" >
< el-input v-model = "lookForm.postName" readonly / >
< / el-form-item >
< el-form-item label = "总工作时长" >
< el-input v-model = "lookForm.totalTime" readonly / >
< / el-form-item >
< el-form-item label = "个人签章" >
< img v-if = "lookForm.applySign" :src="baseurl + lookForm.applySign" width="200px" height="50px"
class = "avatar"
>
< / el-form-item >
< div v-if = "!isEmpty(lookForm.auditRemark)" >
< hr >
< el-form-item label = "审核备注" >
< el-input v-model = "lookForm.auditRemark" type="textarea" readonly / >
< / el-form-item >
< / div >
< hr >
< el-form-item v-if = "!isEmpty(lookForm.deptCmt)" label="部门意见" >
< el-input v-model = "lookForm.deptCmt" readonly / >
< / el-form-item >
< el-form-item v-if = "!isEmpty(lookForm.deptSign)" label="部门签章" >
< img v-if = "lookForm.deptSign" :src="baseurl + lookForm.deptSign" width="200px" height="50px"
class = "avatar"
>
< / el-form-item >
< hr >
< el-form-item v-if = "!isEmpty(lookForm.highCmt)" label="资助办意见" >
< el-input v-model = "lookForm.highCmt" readonly / >
< / el-form-item >
< el-form-item v-if = "!isEmpty(lookForm.highSign)" label="资助办签章" >
< img v-if = "lookForm.highSign" :src="baseurl + lookForm.highSign" width="200px" height="50px"
class = "avatar"
>
< / el-form-item >
< hr >
< el-form-item v-if = "!isEmpty(lookForm.finalCmt)" label="学工处意见" >
< el-input v-model = "lookForm.finalCmt" readonly / >
< / el-form-item >
< el-form-item v-if = "!isEmpty(lookForm.finalSign)" label="学工处签章" >
< img v-if = "lookForm.finalSign" :src="baseurl + lookForm.finalSign" width="200px" height="50px"
class = "avatar"
>
< / el-form-item >
< / el-form >
< / el-dialog >
< el-dialog fullscreen :visible.sync = "printV" >
< el-row >
< el-col :span = "4" >
< el-input v-model = "printQuery.postName" placeholder="请输入岗位名称" clearable / >
< / el-col >
< el-col :span = "4" >
< el-date-picker v-model = "printQuery.applyTime" clearable type="month" value-format="yyyy-MM-dd"
placeholder = "请选择需要打印的月份"
/ >
< / el-col >
< el-col :span = "4" >
< treeselect v-model = "printQuery.deptId" style="display: inline-block;width: 300px;"
: options = "deptOptions1" : normalizer = "normalizer" placeholder = "请选择设岗部门"
/ >
< / el-col >
< / el-row >
< el-button @click ="findPrint" > 查询 < / el -button >
< el-button v-print = "printContent" > 打印 < / el -button >
< hr >
< MoneyPrint id = "printDiv"
: month = "isEmpty(printQuery.applyTime) ? dayjs().format('YYYY年MM月') : dayjs(printQuery.applyTime).format('YYYY年MM月')"
: table - data = "print_list" : month - days = "printMonthDays"
/ >
< / el-dialog >
< el-dialog :visible.sync = "addV" title = "添加学生薪资" :close-on-click-modal = "false" >
< el-form ref = "addForm" size = "small" :model = "addForm" label -width = " 100px " >
< el-form-item label = "学生岗位" >
< AllStuPostSelect v-model = "addForm.stuPostId" / >
< / el-form-item >
< el-form-item label = "总工作时长" >
< el-input v-model = "addForm.totalTime" type="number" / >
< / el-form-item >
< el-form-item label = "月份" >
< el-date-picker v-model = "addForm.applyTime" clearable type="month" value-format="yyyy-MM-dd"
placeholder = "请选择申请月份"
/ >
< / el-form-item >
< el-form-item label = " " >
< el-button size = "mini" @click ="doAdd" > 添加 < / el -button >
< / el-form-item >
< / el-form >
< / el-dialog >
< el-dialog :visible.sync = "editV" title = "修改学生工作时长" :close-on-click-modal = "false" >
< el-form ref = "addForm" size = "small" :model = "addForm" label -width = " 100px " >
< el-form-item label = "学生岗位" >
< el-input readonly : value = "editForm.stuName + ' - ' + editForm.postName" / >
< / el-form-item >
< el-form-item label = "总工作时长" >
< el-input v-model = "editForm.totalTime" type="number" / >
< / el-form-item >
< el-form-item label = "月份" >
< el-date-picker v-model = "editForm.applyTime" readonly type="month" value-format="yyyy-MM-dd" / >
< / el-form-item >
< el-form-item label = " " >
< el-button size = "mini" @click ="doEdit" > 修改 < / el -button >
< / el-form-item >
< / el-form >
< / el-dialog >
< el-dialog :visible.sync = "extraV" title = "添加学生薪资(未入岗学生)" :close-on-click-modal = "false" >
< el-form class = "lookForm" size = "small" label -width = " 100px " >
< el-form-item label = "学号" >
< el-row >
< el-col :span = "8" >
< el-input v-model = "extraForm.stuNo" / >
< / el-col >
< el-col :span = "4" >
< el-button type = "primary" @click ="findStu" > 查询 < / el -button >
< / el-col >
< el-col :span = "12" >
学生姓名 : { { searchStuName } }
< / el-col >
< / el-row >
< / el-form-item >
< el-form-item label = "家庭经济情况" >
< el-select v-model = "extraForm.familyCondition" >
< el-option :label = "'特别困难'" :value = "'特别困难'" / >
< el-option :label = "'比较困难'" :value = "'比较困难'" / >
< el-option :label = "'一般困难'" :value = "'一般困难'" / >
< el-option :label = "'不困难'" :value = "'不困难'" / >
< / el-select >
< / el-form-item >
< el-form-item label = "岗位名称" >
< el-input v-model = "extraForm.postName" / >
< / el-form-item >
< el-form-item label = "设岗部门" >
< treeselect v-model = "extraForm.deptId" style="display: inline-block;width: 300px;"
: options = "deptOptions1" : normalizer = "normalizer" placeholder = "请选择设岗部门"
/ >
< / el-form-item >
< el-form-item label = "指导老师" >
< TeacherSelect v-model = "extraForm.zdlsNo" :value-props="{ value: 'employeeId', label: 'name' }" / >
< / el-form-item >
< el-form-item label = "工作内容" >
< el-input v-model = "extraForm.workNeed" type="textarea" / >
< / el-form-item >
< el-form-item label = "岗位类型" >
< el-select v-model = "extraForm.postType" clearable placeholder="请选择岗位类型" >
< el-option v-for = "dict in dict.type.qgzx_post_type" :key="dict.value" :label="dict.label"
: value = "dict.value"
/ >
< / el-select >
< / el-form-item >
< el-form-item label = "工作月份" >
< el-date-picker v-model = "extraForm.applyTime" type="month" value-format="yyyy-MM-dd HH:mm:ss" / >
< / el-form-item >
< el-form-item label = "工作时长" >
< el-input v-model = "extraForm.totalTime" type="number" / >
< / el-form-item >
< el-form-item label = "" >
< el-button @click ="doExtraAdd" > 添加 < / el -button >
< / el-form-item >
< / el-form >
< / el-dialog >
< el-dialog :visible.sync = "editPostTypeMoneyV" title = "修改学生工时(同时需要修改岗位类型)" >
< el-form label -width = " 100px " class = "lookForm" size = "mini" >
< el-form-item label = "学号" >
< el-input v-model = "editPostTypeMoneyForm.stuNo" readonly / >
< / el-form-item >
< el-form-item label = "学生姓名" >
< el-input v-model = "editPostTypeMoneyForm.stuName" readonly / >
< / el-form-item >
< el-form-item label = "岗位名称" >
< el-input v-model = "editPostTypeMoneyForm.postName" readonly / >
< / el-form-item >
< el-form-item label = "工作月份" >
< el-date-picker v-model = "editPostTypeMoneyForm.applyTime" readonly type="month"
value - format = "yyyy-MM-dd HH:mm:ss"
/ >
< / el-form-item >
< el-form-item label = "岗位类型" >
< el-select v-model = "editPostTypeMoneyForm.postType" clearable placeholder="请选择岗位类型" >
< el-option v-for = "dict in dict.type.qgzx_post_type" :key="dict.value" :label="dict.label"
: value = "dict.value"
/ >
< / el-select >
< / el-form-item >
< el-form-item label = "工作时长" >
< el-input v-model = "editPostTypeMoneyForm.totalTime" type="number" / >
< / el-form-item >
< el-form-item label = "" >
< el-button @click ="editPostTypeMoney" > 修改 < / el -button >
< / el-form-item >
< / el-form >
< / el-dialog >
< el-dialog :visible.sync = "editMonthV" title = "修改学生工作月份" >
< el-form label -width = " 100px " class = "lookForm" size = "mini" >
< el-form-item label = "学号" >
< el-input v-model = "editMonthForm.stuNo" readonly / >
< / el-form-item >
< el-form-item label = "学生姓名" >
< el-input v-model = "editMonthForm.stuName" readonly / >
< / el-form-item >
< el-form-item label = "岗位名称" >
< el-input v-model = "editMonthForm.postName" readonly / >
< / el-form-item >
< el-form-item label = "工作月份" >
< el-date-picker v-model = "editMonthForm.applyTime" type="month" value-format="yyyy-MM-dd HH:mm:ss" / >
< / el-form-item >
< el-form-item label = "岗位类型" >
< el-input v-model = "editMonthForm.postType" readonly / >
< / el-form-item >
< el-form-item label = "工作时长" >
< el-input v-model = "editMonthForm.totalTime" type="number" readonly / >
< / el-form-item >
< el-form-item label = "" >
< el-button @click ="editMonth" > 修改 < / el -button >
< / el-form-item >
< / el-form >
< / el-dialog >
< / div >
2025-07-28 15:52:07 +08:00
< / template >
< script >
2025-10-18 17:13:04 +08:00
import { CheckImgExists , fullLoading , isEmpty , getHoliday , isSameMonth } from '@/api/helpFunc'
import MoneyPrint from '@/views/workstudy/components/MoneyPrint'
import AllStuPostSelect from '@/views/workstudy/components/AllStuPostSelect'
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
import { getTokenKeySessionStorage as getToken } from '@/utils/auth'
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
import { noAuthList as listDept } from '@/api/system/dept'
import { editMonth , doAudit , listAll as getList , zzbldAdd , zzbldEdit , addMoneyExtra , delMoneyExtra , editPostTypeMoney , getStuNameByStuNo } from '@/api/workstudy/money'
import TeacherSelect from '@/views/workstudy/components/TeacherSelect'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import dayjs from 'dayjs'
2025-07-28 15:52:07 +08:00
export default {
2025-10-18 17:13:04 +08:00
name : 'Money' ,
2025-10-13 18:16:14 +08:00
dicts : [ 'qgzx_apply_status' , 'qgzx_post_type' ] ,
2025-07-28 15:52:07 +08:00
components : { AllStuPostSelect , MoneyPrint , Treeselect , TeacherSelect } ,
data ( ) {
return {
isEmpty ,
dayjs ,
printContent : {
id : 'printDiv' ,
2025-10-18 17:13:04 +08:00
extraCss : '' ,
2025-07-28 15:52:07 +08:00
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 ( '点击了打印按钮' )
}
} ,
editV : false ,
applyForm : {
stuPostId : null
} ,
upload : {
2025-10-18 17:13:04 +08:00
headers : { Authorization : 'Bearer ' + getToken ( ) } ,
2025-07-28 15:52:07 +08:00
// 上传的地址
2025-10-18 17:13:04 +08:00
url : process . env . VUE _APP _BASE _API + '/common/upload'
2025-07-28 15:52:07 +08:00
} ,
2025-10-18 17:13:04 +08:00
baseurl : process . env . VUE _APP _BASE _API + '/' ,
2025-07-28 15:52:07 +08:00
isEmpty ,
loading : false ,
tableData : [ ] ,
total : 0 ,
queryParams : {
pageNum : 1 ,
pageSize : 10 ,
postName : null
} ,
lookForm : { } ,
lookV : false ,
auditForm : {
id : null ,
deptCmt : null
} ,
printV : false ,
printQuery : {
applyTime : null ,
deptId : null ,
postName : null ,
pageNum : 1 ,
pageSize : 10000 ,
2025-10-18 17:13:04 +08:00
applyStatus : '6'
2025-07-28 15:52:07 +08:00
} ,
print _list : [ ] ,
deptOptions1 : [ ] ,
addV : false ,
addForm : { } ,
editForm : {
} ,
editV : false ,
printMonthDays : 21 ,
extraV : false ,
extraForm : {
} ,
editPostTypeMoneyV : false ,
editPostTypeMoneyForm : {
} ,
2025-10-18 17:13:04 +08:00
searchStuName : '' ,
2025-07-28 15:52:07 +08:00
editMonthV : false ,
editMonthForm : { } ,
}
} ,
created ( ) {
2025-10-18 17:13:04 +08:00
this . initDept ( )
this . getList ( )
2025-07-28 15:52:07 +08:00
} ,
methods : {
editMonthVClick ( row ) {
2025-10-18 17:13:04 +08:00
this . editMonthForm = { }
this . editMonthForm = { ... row }
this . editMonthV = true
2025-07-28 15:52:07 +08:00
} ,
async editMonth ( ) {
2025-10-18 17:13:04 +08:00
let sdata = { ... this . editMonthForm }
2025-07-28 15:52:07 +08:00
if ( isEmpty ( sdata . applyTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择工作月份' )
return
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await editMonth ( sdata )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . $message . success ( res . msg )
this . editMonthV = false
this . getList ( )
2025-07-28 15:52:07 +08:00
}
} ,
async findStu ( ) {
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await getStuNameByStuNo ( this . extraForm . stuNo )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . searchStuName = res . data . name
2025-07-28 15:52:07 +08:00
}
} ,
async editPostTypeMoney ( ) {
2025-10-18 17:13:04 +08:00
let sdata = { ... this . editPostTypeMoneyForm }
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await editPostTypeMoney ( sdata )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . $message . success ( res . msg )
this . editPostTypeMoneyV = false
this . getList ( )
2025-07-28 15:52:07 +08:00
}
} ,
editPostTypeMoneyVClick ( row ) {
2025-10-18 17:13:04 +08:00
this . editPostTypeMoneyForm = { }
this . editPostTypeMoneyForm = { ... row }
this . editPostTypeMoneyV = true
2025-07-28 15:52:07 +08:00
} ,
async delExtra ( row ) {
2025-10-18 17:13:04 +08:00
let id = row . id
2025-07-28 15:52:07 +08:00
this . $confirm ( '您确定删除手动添加的记录么?' , '提示' , {
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
type : 'warning'
} ) . then ( async ( ) => {
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await delMoneyExtra ( id )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . $message . success ( res . msg )
this . getList ( )
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
} )
2025-07-28 15:52:07 +08:00
} ,
async doExtraAdd ( ) {
2025-10-18 17:13:04 +08:00
let sdata = { ... this . extraForm }
2025-07-28 15:52:07 +08:00
if ( isEmpty ( sdata . stuNo ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请输入学号' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . postName ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请输入岗位名称' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . deptId ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择设岗部门' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . zdlsNo ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择指导老师' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . workNeed ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请输入工作内容' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . totalTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请输入工作时长' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . postType ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择岗位类型' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . familyCondition ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择家庭经济情况' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . applyTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择工作月份' )
return
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await addMoneyExtra ( sdata )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . $message . success ( res . msg )
this . extraV = false
this . getList ( )
2025-07-28 15:52:07 +08:00
}
} ,
addExtraVClick ( ) {
2025-10-18 17:13:04 +08:00
this . searchStuName = ''
this . extraForm = { }
this . extraV = true
2025-07-28 15:52:07 +08:00
} ,
async doEdit ( ) {
2025-10-18 17:13:04 +08:00
let sdata = { ... this . editForm }
2025-07-28 15:52:07 +08:00
if ( isEmpty ( sdata . totalTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请输入总工作时长' )
return
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await zzbldEdit ( sdata )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . $message . success ( res . msg )
this . editV = false
this . getList ( )
2025-07-28 15:52:07 +08:00
}
} ,
editVClick ( row ) {
2025-10-18 17:13:04 +08:00
this . editForm = { }
this . editForm = { ... row }
this . editV = true
2025-07-28 15:52:07 +08:00
} ,
async doAdd ( ) {
2025-10-18 17:13:04 +08:00
let sdata = { ... this . addForm }
2025-07-28 15:52:07 +08:00
if ( isEmpty ( sdata . stuPostId ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择学生岗位' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . totalTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请输入总工作时长' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . applyTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择月份' )
return
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await zzbldAdd ( sdata )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . $message . success ( res . msg )
this . addV = false
this . getList ( )
2025-07-28 15:52:07 +08:00
}
} ,
addVClick ( ) {
2025-10-18 17:13:04 +08:00
this . addV = true
2025-07-28 15:52:07 +08:00
} ,
formatDate ( dateStr ) {
2025-10-18 17:13:04 +08:00
const date = new Date ( dateStr )
const year = date . getFullYear ( )
const month = String ( date . getMonth ( ) + 1 ) . padStart ( 2 , '0' ) // 月份是从0开始的, 所以需要+1
return ` ${ year } 年 ${ month } 月 `
2025-07-28 15:52:07 +08:00
} ,
//此方法用于判断步骤条当前步骤的状态
getStepStatus ( data ) {
2025-10-18 17:13:04 +08:00
if ( data == '同意' ) {
return 'success'
2025-07-28 15:52:07 +08:00
} else {
2025-10-18 17:13:04 +08:00
return 'error'
2025-07-28 15:52:07 +08:00
}
} ,
//此方法用于判断步骤条到哪个步骤了
getStep ( data ) {
if ( ! isEmpty ( data . deptCmt ) ) { //判断部门领导有没有审批
2025-10-18 17:13:04 +08:00
return 2
2025-07-28 15:52:07 +08:00
} else if ( ! isEmpty ( data . highCmt ) ) { //判断资助办有没有审批
2025-10-18 17:13:04 +08:00
return 3
2025-07-28 15:52:07 +08:00
} else if ( ! isEmpty ( data . finalCmt ) ) { //判断学工处有没有审批
2025-10-18 17:13:04 +08:00
return 4
2025-07-28 15:52:07 +08:00
} else {
2025-10-18 17:13:04 +08:00
return 1
2025-07-28 15:52:07 +08:00
}
} ,
async findPrint ( ) {
if ( isEmpty ( this . printQuery . applyTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请先选择月份' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( this . printQuery . deptId ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请先选择部门' )
return
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let workdayList = [ ]
let a = new Date ( )
a . setFullYear ( new Date ( this . printQuery . applyTime ) . getFullYear ( ) ) // 设置指定年份
a . setMonth ( new Date ( this . printQuery . applyTime ) . getMonth ( ) ) // 设置指定月份
let days = new Date ( a . getFullYear ( ) , a . getMonth ( ) + 1 , 0 ) . getDate ( ) // 获取本月一共有多少天 new Date()第3个参数默认为1, 就是每个月的1号, 把它设置为0时, new Date()会返回上一个月的最后一天, 然后通过getDate()方法得到天数
2025-07-28 15:52:07 +08:00
for ( let i = 1 ; i <= days ; i ++ ) {
a . setDate ( i ) // 设置月份的日期
2025-10-18 17:13:04 +08:00
let d = a . getDay ( ) // 获取星期几。 返回0 到 6星期日为 0、星期六为 6。
2025-07-28 15:52:07 +08:00
if ( d > 0 && d < 6 ) {
2025-10-18 17:13:04 +08:00
workdayList . push ( a . toLocaleDateString ( ) )
2025-07-28 15:52:07 +08:00
}
}
2025-10-18 17:13:04 +08:00
let holidayList = [ ]
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
let year = new Date ( this . printQuery . applyTime ) . getFullYear ( )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
let loading1 = fullLoading ( this )
let res1 = await getHoliday ( year )
loading1 . close ( )
2025-07-28 15:52:07 +08:00
if ( res1 . code == 0 ) {
2025-10-18 17:13:04 +08:00
let data = { ... res1 . holiday }
2025-07-28 15:52:07 +08:00
for ( let key in data ) {
2025-10-18 17:13:04 +08:00
let dateStr = new Date ( this . printQuery . applyTime ) . getFullYear ( ) + '-' + key
2025-07-28 15:52:07 +08:00
if ( isSameMonth ( new Date ( dateStr ) , this . printQuery . applyTime ) ) {
if ( data [ key ] . holiday == true ) {
2025-10-18 17:13:04 +08:00
holidayList . push ( new Date ( data [ key ] . date ) . toLocaleDateString ( ) )
2025-07-28 15:52:07 +08:00
} else {
2025-10-18 17:13:04 +08:00
workdayList . push ( new Date ( data [ key ] . date ) . toLocaleDateString ( ) )
2025-07-28 15:52:07 +08:00
}
}
}
}
2025-10-18 17:13:04 +08:00
let tempDayList = [ ]
2025-07-28 15:52:07 +08:00
workdayList . map ( x => {
holidayList . map ( y => {
if ( x == y ) {
2025-10-18 17:13:04 +08:00
tempDayList . push ( x )
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
} )
} )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
workdayList = workdayList . filter ( x => ! tempDayList . includes ( x ) )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
let workdayCount = workdayList . length
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
this . $prompt ( dayjs ( this . printQuery . applyTime ) . format ( 'YYYY年MM月' ) + '的工作日为' + workdayCount + '天,如果有误请填写并点击确定,如果正确就不填直接点击确定' , '导出确认' , {
2025-07-28 15:52:07 +08:00
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
inputPattern : /^(|null|-?\d+)$/ ,
inputErrorMessage : ''
} ) . then ( async ( { value } ) => {
if ( ! isEmpty ( value ) ) {
2025-10-18 17:13:04 +08:00
this . printMonthDays = value
2025-07-28 15:52:07 +08:00
} else {
2025-10-18 17:13:04 +08:00
this . printMonthDays = workdayCount
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await getList ( this . printQuery )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . print _list = [ ... res . rows ]
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
} )
2025-07-28 15:52:07 +08:00
} ,
normalizer ( node ) {
if ( node . children && ! node . children . length ) {
2025-10-18 17:13:04 +08:00
delete node . children
2025-07-28 15:52:07 +08:00
}
return {
id : node . deptId ,
label : node . deptName ,
children : node . children ,
2025-10-18 17:13:04 +08:00
}
2025-07-28 15:52:07 +08:00
} ,
async initDept ( ) {
2025-10-18 17:13:04 +08:00
let res = await listDept ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . deptOptions1 = this . handleTree ( res . data , 'deptId' )
2025-07-28 15:52:07 +08:00
}
} ,
printVClick ( ) {
2025-10-18 17:13:04 +08:00
this . printV = true
2025-07-28 15:52:07 +08:00
} ,
async handleExport ( ) {
if ( isEmpty ( this . queryParams . applyTime ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择月份' )
return
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let workdayList = [ ]
let a = new Date ( )
a . setFullYear ( new Date ( this . queryParams . applyTime ) . getFullYear ( ) ) // 设置指定年份
a . setMonth ( new Date ( this . queryParams . applyTime ) . getMonth ( ) ) // 设置指定月份
let days = new Date ( a . getFullYear ( ) , a . getMonth ( ) + 1 , 0 ) . getDate ( ) // 获取本月一共有多少天 new Date()第3个参数默认为1, 就是每个月的1号, 把它设置为0时, new Date()会返回上一个月的最后一天, 然后通过getDate()方法得到天数
2025-07-28 15:52:07 +08:00
for ( let i = 1 ; i <= days ; i ++ ) {
a . setDate ( i ) // 设置月份的日期
2025-10-18 17:13:04 +08:00
let d = a . getDay ( ) // 获取星期几。 返回0 到 6星期日为 0、星期六为 6。
2025-07-28 15:52:07 +08:00
if ( d > 0 && d < 6 ) {
2025-10-18 17:13:04 +08:00
workdayList . push ( a . toLocaleDateString ( ) )
2025-07-28 15:52:07 +08:00
}
}
2025-10-18 17:13:04 +08:00
let holidayList = [ ]
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
let year = new Date ( this . queryParams . applyTime ) . getFullYear ( )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await getHoliday ( year )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 0 ) {
2025-10-18 17:13:04 +08:00
let data = { ... res . holiday }
2025-07-28 15:52:07 +08:00
for ( let key in data ) {
2025-10-18 17:13:04 +08:00
let dateStr = new Date ( this . queryParams . applyTime ) . getFullYear ( ) + '-' + key
2025-07-28 15:52:07 +08:00
if ( isSameMonth ( new Date ( dateStr ) , this . queryParams . applyTime ) ) {
if ( data [ key ] . holiday == true ) {
2025-10-18 17:13:04 +08:00
holidayList . push ( new Date ( data [ key ] . date ) . toLocaleDateString ( ) )
2025-07-28 15:52:07 +08:00
} else {
2025-10-18 17:13:04 +08:00
workdayList . push ( new Date ( data [ key ] . date ) . toLocaleDateString ( ) )
2025-07-28 15:52:07 +08:00
}
}
}
}
2025-10-18 17:13:04 +08:00
let tempDayList = [ ]
2025-07-28 15:52:07 +08:00
workdayList . map ( x => {
holidayList . map ( y => {
if ( x == y ) {
2025-10-18 17:13:04 +08:00
tempDayList . push ( x )
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
} )
} )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
workdayList = workdayList . filter ( x => ! tempDayList . includes ( x ) )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
console . log ( 2 , workdayList )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
let workdayCount = workdayList . length
console . log ( 3 , workdayCount )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
this . $prompt ( dayjs ( this . queryParams . applyTime ) . format ( 'YYYY年MM月' ) + '的工作日为' + workdayCount + '天,如果有误请填写并点击确定,如果正确就不填直接点击确定' , '导出确认' , {
2025-07-28 15:52:07 +08:00
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
inputPattern : /^(|null|-?\d+)$/ ,
inputErrorMessage : ''
} ) . then ( ( { value } ) => {
if ( ! isEmpty ( value ) ) {
2025-10-18 17:13:04 +08:00
workdayCount = value
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
this . queryParams . workdayCount = workdayCount
2025-07-28 15:52:07 +08:00
this . download ( 'workstudy/money/doExport' , {
... this . queryParams
2025-10-18 17:13:04 +08:00
} , dayjs ( this . queryParams . applyTime ) . format ( 'YYYY年MM月' ) + ` 勤工助学薪资_ ${ new Date ( ) . getTime ( ) } .xlsx ` )
2025-07-28 15:52:07 +08:00
2025-10-18 17:13:04 +08:00
} )
2025-07-28 15:52:07 +08:00
} ,
async lookVClick ( row ) {
2025-10-18 17:13:04 +08:00
this . lookForm = { }
this . lookForm = { ... row }
this . lookV = true
2025-07-28 15:52:07 +08:00
} ,
async getList ( ) {
2025-10-18 17:13:04 +08:00
this . loading = true
let res = await getList ( this . queryParams )
this . loading = false
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . tableData = [ ... res . rows ]
this . total = res . total
2025-07-28 15:52:07 +08:00
}
} ,
handleQuery ( ) {
2025-10-18 17:13:04 +08:00
this . queryParams . pageNum = 1
this . getList ( )
2025-07-28 15:52:07 +08:00
} ,
resetQuery ( ) {
2025-10-18 17:13:04 +08:00
this . resetForm ( 'queryForm' )
this . handleQuery ( )
2025-07-28 15:52:07 +08:00
} ,
handleAvatarSuccess ( response , file , fileList ) {
2025-10-18 17:13:04 +08:00
this . auditForm . highSign = response . fileName
this . $forceUpdate ( )
2025-07-28 15:52:07 +08:00
} ,
async doAudit ( ) {
2025-10-18 17:13:04 +08:00
let sdata = { ... this . auditForm }
2025-07-28 15:52:07 +08:00
if ( isEmpty ( sdata . deptCmt ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请选择部门意见' )
return
2025-07-28 15:52:07 +08:00
}
if ( isEmpty ( sdata . deptSign ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '请上传部门签章' )
return
2025-07-28 15:52:07 +08:00
}
if ( ! CheckImgExists ( this . baseurl + sdata . deptSign ) ) {
2025-10-18 17:13:04 +08:00
this . $message . info ( '签名失效,请重新上传' )
return
2025-07-28 15:52:07 +08:00
}
if ( sdata . deptCmt == '同意' ) {
2025-10-18 17:13:04 +08:00
sdata . applyStatus = '2'
2025-07-28 15:52:07 +08:00
} else {
2025-10-18 17:13:04 +08:00
sdata . applyStatus = '10'
2025-07-28 15:52:07 +08:00
}
2025-10-18 17:13:04 +08:00
let loading = fullLoading ( this )
let res = await doAudit ( sdata )
loading . close ( )
2025-07-28 15:52:07 +08:00
if ( res . code == 200 ) {
2025-10-18 17:13:04 +08:00
this . getList ( )
this . $message . success ( res . msg )
this . lookV = false
2025-07-28 15:52:07 +08:00
}
}
}
}
< / script >
< style scoped lang = "scss" >
. lookForm {
. el - form - item {
margin - bottom : 5 px ;
}
}
@ media print {
html {
background - color : # ffffff ;
height : auto ;
margin : 0 px ;
}
body {
border : solid 1 px # ffffff ;
margin : 10 mm 15 mm 10 mm 15 mm ;
}
@ page {
size : landscape ;
/* 设置横向打印 */
margin : 3 mm ;
}
}
< / style >