Browse Source

app 学生请假审核

新疆警官学校中职
yxq 11 months ago
parent
commit
de294d5060
7 changed files with 417 additions and 11 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/select.vue
  2. +7
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json
  3. +399
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/Leavebyday/single.vue
  4. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/list.vue
  5. +3
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/single.vue
  6. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/list.vue
  7. +3
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/single.vue

+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/select.vue View File

@@ -71,7 +71,7 @@ export default {
}
} else {
if (this.objectMode) {
this.index = this.range.findIndex(t => t[this.valueField] === this.value)
this.index = this.range.findIndex(t => t[this.valueField] == this.value)
} else {
this.index = this.range.indexOf(this.value)
}


+ 7
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json View File

@@ -629,6 +629,13 @@
"navigationBarTitleText": "审核"
}
},
// 学生请假审核
{
"path": "pages/AssetManagementSystem/Leavebyday/single",
"style": {
"navigationBarTitleText": "审核"
}
},
//疫情详细信息
{
"path": "pages/PersonnelManagement/ContactsDetails/list",


+ 399
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/Leavebyday/single.vue View File

@@ -0,0 +1,399 @@
<template>
<view id="notice" class="page">
<!-- 顶部页签 -->
<l-nav v-model="tab" :items="['表单信息', '流程信息']" type="flex" class="solid-bottom" />
<view v-if="ready && tab == 0">
<l-input :value="formData.Code" title="编号" disabled/>
<l-input :value="formData.DistrictTeam" title="区队" disabled/>
<l-select v-model="formData.IsCampus" :range="dataSource.IsCampus" title="校内/外出" disabled/>
<!-- <l-select v-show="formData.IsCampus == '1'"
v-model="formData.IsStay" :range="dataSource.IsStay" title="过夜" disabled/> -->
<l-input v-model="formData.CreateUserNo" title="学号" disabled></l-input>
<l-input v-model="formData.CreateUserName" title="姓名" disabled></l-input>
<!-- <l-select v-model="formData.CreateUserNo" :range="dataSource.ApplyUser" title="学生" disabled></l-select> -->
<l-select v-model="formData.LeaveType" :range="dataSource.LeaveType" title="请假类型" disabled></l-select>
<l-input :value="timeFormat(formData.StartTime)" title="开始时间" disabled></l-input>
<l-input :value="timeFormat(formData.EndTime)" title="结束时间" disabled></l-input>
<l-input v-model="formData.LeaveDay" title="请假天数" disabled></l-input>
<l-input v-model="formData.LeaveReason" title="请假事由" disabled></l-input>
<l-input v-model="formData.CreateTime" title="申请时间" disabled></l-input>
<l-select v-model="formData.ClassNo" :range="dataSource.ClassNo" title="班级" disabled></l-select>
<l-select v-model="formData.DeptNo" :range="dataSource.DeptNo" title="系部" disabled></l-select>
<l-select v-model="formData.MajorNo" :range="dataSource.MajorNo" title="专业" disabled></l-select>
<l-select v-model="formData.ClassDiredctorNo" :range="dataSource.ClassDiredctorNo" title="班主任" disabled></l-select>
<!-- <l-select v-model="formData.ClassTutorNo" :range="dataSource.ClassTutorNo" title="辅导员" disabled></l-select> -->
<!-- <l-select v-model="formData.FundsApply.IsFixedAssets" :range="dataSource.IsFixedAssets" title="固定资产" disabled></l-select> -->
<!-- <l-input :value="IsFixedAssetsitem(formData.FundsApply.IsFixedAssets)" title="固定资产" disabled></l-input>
<l-textarea v-model="formData.FundsApply.Remark" title="备注" readonly/>
<l-input v-model="formData.FundsApply.SumAmount" title="总金额" disabled></l-input>
<l-input v-model="formData.FundsApply.UpperAmount" title="人民币大写" disabled></l-input> -->
<l-workflow-action
@audit="audit"
@action="action"
:type="type"
:currentNode="currentNode"
:currentTask="currentTask"
/>
</view>
<view v-if="ready && tab == 1" class="progress"><l-workflow-timeline :processList="processList" /></view>
<!-- <view class="padding-sm text-grey notice-info">
<view class="text-right">本页内容发布于 {{ time }}</view>
<view class="text-right">{{ date }}</view>
</view> -->
</view>
</template>

<script>
import moment from 'moment'
import workflowFormMixins from '@/pages/nworkflow/workflow.js'

export default {
mixins: [workflowFormMixins],
data() {
return {
tab:0,
type:'view',
currentNode:null,
currentTask:null,
taskId:'',
processId:'',
processInfo:null,
processList:[],
formData:{},
ready: false,
content: '',
time: '',
date: '',
fileList:[],
// 数据源
dataSource: {
ApplyDept: [],
ApplyUser: [],
IsFixedAssets: [],
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({
value: t.value,
text: t.text
})),
ClassNo:[],
DeptNo:[],
MajorNo:[],
ClassDiredctorNo:[],
ClassTutorNo:[],
IsCampus:[{ text: "外出假", value: "1" }, { text: "校内假", value: "0" }],
IsStay: Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoInt).map(t => ({
value: t.value,
text: t.text
})),
},
FundsApplyDetail: [],
FundsApplyDetails: {
ProjectContent: '',
Number: '',
Price: '',
Amount: ''
},
}
},

async onLoad({type}) {
await this.init(type)
},

methods: {
async init(type) {
if(type){this.type = type}
await Promise.all([
this.FETCH_DATASOURCE('classdata').then(result => {
this.dataSource.ApplyDept = result.data.map(t => ({
text: t.name,
value: t.id
}));
}),
this.FETCH_DATASOURCE('StuInfoBasic').then(result => {
this.dataSource.ApplyUser = result.data.map(t => ({
text: t.f_realname,
value: t.f_userid
}));
}),
this.dataSource.IsFixedAssets = Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoInt).map(t => ({
value: t.value,
text: t.text
})),
this.FETCH_DATASOURCE('bjsj').then(result => {
this.dataSource.ClassNo = result.data.map(t => ({
text: t.classname,
value: t.classno
}));
}),
this.FETCH_DATASOURCE('CdDeptInfo').then(result => {
this.dataSource.DeptNo = result.data.map(t => ({ text: t.deptname, value: t.deptno }));
}),
this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
this.dataSource.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno }));
}),
this.FETCH_DATASOURCE('EmpInfo').then(result => {
this.dataSource.ClassDiredctorNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.empname, value: t.empno }));
}),
this.FETCH_DATASOURCE('EmpInfo').then(result => {
this.dataSource.ClassTutorNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.empname, value: t.empno }));
}),
])
this.LOADING('加载中…')
const noticeItem = this.GET_PARAM()
this.processList = noticeItem.logList
this.currentNode = noticeItem.currentNode
this.currentTask = noticeItem.currentTask
this.processInfo = noticeItem.processInfo
this.taskId = this.currentTask.F_TaskId
this.processId = this.currentTask.F_Id
this.formValue = noticeItem.formValue
this.scheme = noticeItem.scheme
// console.log(this.processList[0].F_ProcessId)
await this.getFormData(this.processList[0].F_ProcessId)
// this.content = this.CONVERT_HTML(noticeItem.f_content)

// this.time = moment(noticeItem.f_time).format('HH : mm')
// this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日')
// this.SET_TITLE(noticeItem.f_title)
// this.HIDE_LOADING()
},
// 获取表单数据
getFormData(ProcessId){
return this.HTTP_GET("Learun/adms/EducationalAdministration/StuLeaveManagement/shList",{ProcessId},"加载数据时出错").then(async res=>{
if(res){
// res.F_SourceName = res.F_SourceName&&this.GET_GLOBAL('department')[res.F_SourceName]? this.GET_GLOBAL('department')[res.F_SourceName].name : res.F_SourceName
this.formData = res.stuLeaveManagement
console.log(this.formData)
this.HIDE_LOADING();
// let FundsApplyDetailitem = res.FundsApplyDetail
// if(FundsApplyDetailitem.length>0){
// for(let i=0;i<FundsApplyDetailitem.length;i++){
// FundsApplyDetailitem[i].Price = Number(FundsApplyDetailitem[i].Price).toFixed(2)
// FundsApplyDetailitem[i].Amount = Number(FundsApplyDetailitem[i].Amount).toFixed(2)
// }
// }
// this.FundsApplyDetail = res.FundsApplyDetail
// let fileList = await this.getFileListById(res.F_NewsImage)
// if(fileList&&fileList.length){
// this.fileList = [fileList[0]]
// }
this.ready = true
}
})
},
// 点击审批相关按钮
async audit(action) {
this.LOADING('加载中…')
const currentTask = this.processInfo.task.find(t => t.F_NodeId === this.currentNode.id)
const postData = await this.getPostData(this.formValue, this.scheme)
const pageParam = {
type: 'sign',
processId: currentTask.F_ProcessId,
taskId: currentTask.F_Id,
formreq: postData.formreq,
taskName: this.currentTask.F_Title,
currentNode:this.currentNode,
code:this.code||''
}
// 不是加签
if (action.code !== '__sign__') {
Object.assign(pageParam, action)
pageParam.type = 'verify'
pageParam.auditors = JSON.stringify({})
pageParam.isFromSignAudit = Number(this.currentTask.F_TaskType) === 3
}
this.HIDE_LOADING()
this.NAV_TO('/pages/nworkflow/myflow/sign', pageParam, true)
},
// 点击操作按钮(非审批类按钮)
async action(taskType) {
switch (taskType) {
// 点击「催办」/「撤销流程」/「标记已阅」按钮
case 'urge':
case 'revoke':
case 'refer':
const actionText = { urge: '催办', revoke: '撤销', refer: '已阅' }[taskType]
const actionUrl = { urge: '/urge', revoke: '/revoke', refer: '/refer' }[taskType]
let actionData = this.processId
if (taskType === 'refer') {
actionData = { processId: this.processId, taskId: this.taskId }
}
if (!(await this.CONFIRM(`${actionText}确认`, `确定要提交${actionText}吗?`, true))) {
return
}
this.LOADING(`提交${actionText}中…`)
this.HTTP_POST(`/newwf${actionUrl}`, actionData, `提交${actionText}失败`).then(success => {
this.HIDE_LOADING()
if (success) {
this.EMIT('task-list-change')
this.TOAST(`成功提交${actionText}`, 'success')
if (taskType === 'revoke') {
this.NAV_BACK()
}
}
})
break
// 点击「提交草稿」按钮
case 'draft':
this.CONFIRM('不支持此操作')
return
if (!(await this.CONFIRM('提交确认', '确定要提交草稿吗?', true))) {
return
}
this.LOADING('正在提交…')
const draftFormValue = this.$refs.form.getFormValue()
const draftPostData = await this.getPostData(draftFormValue, this.scheme)
this.HTTP_POST('/newwf​/draft', draftPostData, '提交草稿失败').then(success => {
this.HIDE_LOADING()
if (success) {
this.EMIT('task-list-change')
this.NAV_BACK()
this.TOAST('草稿已保存', 'success')
}
})
break
// 点击「发起流程」按钮
case 'submit':
this.CONFIRM('不支持此操作')
return
const verifyResult = this.$refs.form.verifyValue()
if (verifyResult.length > 0) {
this.CONFIRM('表单验证失败', verifyResult.join('\n'))
return
}
if (!(await this.CONFIRM('提交确认', '确定要发起流程吗?', true))) {
return
}
this.LOADING('正在提交…')
const formValue = this.$refs.form.getFormValue()
const postData = await this.getPostData(formValue, this.scheme)
postData.auditors = JSON.stringify({})
if (this.type === 'child') {
postData.parentProcessId = this.processId
postData.parentTaskId = this.taskId
}
const errorTips = '流程发起失败'
this.HTTP_POST('/newwf/createchildflow', postData, errorTips).then(success => {
this.HIDE_LOADING()
if (success) {
this.EMIT('task-list-change')
this.NAV_BACK()
this.TOAST('流程发起成功', 'success')
}
})
break
default:
break
}
},
IsFixedAssetsitem(data){
if(data == 0){
return '否'
}else{
return '是'
}
},
//方法
timeFormat(date){
let newDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(date)
return newDate[0]
}
}
}
</script>

<style lang="less" scoped>
.welT {
font-size: 16px;
line-height: 26px;
padding: 0 12px;
background-color: #ffffff;
padding-bottom: 12px;
}

.welT text {
width: 26px;
height: 26px;
line-height: 24px;
border: 1px solid #efefef;
border-radius: 4px;
float: right;
text-align: center;
color: #999;
}

.welBox {
// margin-top: 10px;
}

.welCon {
padding: 10px;
border: 1px solid #efefef;
padding-top: 18px;
border-radius: 4px;
position: relative;
// background-color: #ffffff;
margin-top: 15px;
}

.welDel {
border-radius: 50%;
position: absolute;
top: 4px;
left: 0px;
background: #fff;
}

.welDel text {
text-align: center;
width: 26px;
height: 26px;
display: block;
line-height: 24px;
border: 1px solid #efefef;
border-radius: 50%;
}

.welImgAdd {
text-align: center;
line-height: 0;
}

.passwordDes {
color: #606266;
font-size: 14px;
padding: 8px;
text-indent: 2em;
}
</style>

+ 2
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/list.vue View File

@@ -96,10 +96,10 @@
{{ displayListItem(item, "ClassDiredctorNo") }}
</view>

<view class="customlist-item-field">
<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">辅导员:</text>
{{ displayListItem(item, "ClassTutorNo") }}
</view>
</view> -->
<view class="customlist-item-field">
<text class="customlist-item-field-title">编号:</text>


+ 3
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/single.vue View File

@@ -156,14 +156,14 @@
disabled
v-if="!edit"
/>
<l-select
<!-- <l-select
@input="setValue('StuLeaveManagement.ClassTutorNo', $event)"
:value="getValue('StuLeaveManagement.ClassTutorNo')"
:range="dataSource.StuLeaveManagement.ClassTutorNo"
title="辅导员"
disabled
v-if="!edit"
/>
/> -->
</view>

<view v-if="ready&&(origin.StuLeaveManagement.CheckStatus=='0'||edit)" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
@@ -241,7 +241,7 @@ export default {
DeptNo: { type: 'select', title: '系部', dataSource: '1', },
MajorNo: { type: 'select', title: '专业', dataSource: '1', },
ClassDiredctorNo: { type: 'select', title: '班主任',dataSource: '1', },
ClassTutorNo: { type: 'select', title: '辅导员',dataSource: '1', },
// ClassTutorNo: { type: 'select', title: '辅导员',dataSource: '1', },
Code: {
type: "text", title: '编号',
},


+ 2
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/list.vue View File

@@ -89,10 +89,10 @@
{{ displayListItem(item, "ClassDiredctorNo") }}
</view>

<view class="customlist-item-field">
<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">辅导员:</text>
{{ displayListItem(item, "ClassTutorNo") }}
</view>
</view> -->
<view class="customlist-item-field">
<text class="customlist-item-field-title">编号:</text>


+ 3
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/single.vue View File

@@ -164,14 +164,14 @@
disabled
v-if="!edit"
/>
<l-select
<!-- <l-select
@input="setValue('StuLeaveManagement.ClassTutorNo', $event)"
:value="getValue('StuLeaveManagement.ClassTutorNo')"
:range="dataSource.StuLeaveManagement.ClassTutorNo"
title="辅导员"
disabled
v-if="!edit"
/>
/> -->
</view>

<view v-if="ready&&(origin.StuLeaveManagement.CheckStatus=='0'||edit)" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
@@ -251,7 +251,7 @@ export default {
DeptNo: { type: 'select', title: '系部', dataSource: '1', },
MajorNo: { type: 'select', title: '专业', dataSource: '1', },
ClassDiredctorNo: { type: 'select', title: '班主任',dataSource: '1', },
ClassTutorNo: { type: 'select', title: '辅导员',dataSource: '1', },
// ClassTutorNo: { type: 'select', title: '辅导员',dataSource: '1', },
Code: {
type: "text", title: '编号',
},


Loading…
Cancel
Save