Browse Source

添加学生按天请假页面和手机审核按天请假

新疆体育高职分支
libo 1 year ago
parent
commit
a30f09ddf5
4 changed files with 450 additions and 14 deletions
  1. +6
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json
  2. +383
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/Leavebyday/single.vue
  3. +45
    -12
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/list.vue
  4. +16
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue

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

@@ -937,6 +937,12 @@
"navigationBarTitleText": "实盘结果录入"
}
},
{
"path": "pages/AssetManagementSystem/Leavebyday/single",
"style": {
"navigationBarTitleText": "按天请假审核"
}
},
//新生信息完善
{
"path": "pages/welcome/list",


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

@@ -0,0 +1,383 @@
<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 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 v-model="formData.StartTime" title="开始时间" disabled></l-input>
<l-input v-model="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:[],
},
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 '是'
}
}
}
}
</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>

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

@@ -19,10 +19,10 @@
{{ CheckStatusitem(displayListItem(item, "CheckStatus")) }}
</view>

<view class="customlist-item-field">
<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">审核备注:</text>
{{ displayListItem(item, "CheckRemark") }}
</view>
</view> -->

<view class="customlist-item-field">
<text class="customlist-item-field-title">审核人:</text>
@@ -94,9 +94,11 @@
{{ displayListItem(item, "ClassTutorNo") }}
</view>

<l-customlist-action @join="action('join', item.Id)" :showEdit="!item.CheckStatus"
@edit="action('edit', item.Id)" :showDelete="!item.CheckStatus"
@delete="action('delete', item.Id)" @view="action('view', item.Id)" />
<l-customlist-action
:showButton="item.CheckStatus ==0 && user.userId == item.CreateUserId" buttonText="提交" @join="action('join', item.Id)"
:showEdit="item.CheckStatus ==0 && user.userId == item.CreateUserId" @edit="action('edit', item.Id)"
:showDelete="item.CheckStatus ==0 && user.userId == item.CreateUserId" @delete="action('delete', item.Id)"
@view="action('view', item.Id)" />
</view>
</l-customlist>
</l-scroll-list>
@@ -384,9 +386,19 @@
this.NAV_TO(`./single?type=edit&id=${id}`);
return;
case "join":
// console.log(123);
this.NAV_TO(`/pages/EducationalAdministration/StuLeaveManagement/list?meetId=${id}`);
return;
if (!(await this.CONFIRM('提交项目', '确定要提交该项吗?', true))) {
return
}
this.HTTP_POST('/Learun/adms/EducationalAdministration/StuLeaveManagement/submit', id, '提交失败')
.then(success => {
if (!success) {
return
}
this.TOAST('提交成功', 'success')
this.refreshList()
})
return

case "delete":
if (!(await this.CONFIRM("删除项目", "确定要删除该项吗?", true))) {
@@ -405,7 +417,22 @@
this.refreshList();
});
return;

case 'check':
if (!(await this.CONFIRM('提交项目', '确定要提交该项吗?', true))) {
return
}
this.HTTP_POST('/learun/adms/FundsApply/submit', id, '提交失败')
.then(success => {
if (!success) {
return
}
this.TOAST('提交成功', 'success')
this.refreshList()
})
return
default:
return;
}
@@ -456,10 +483,16 @@
},
// 审核状态
CheckStatusitem(data) {
if (data) {
return data == '1' ? '通过' : '不通过'
if (data == '0') {
return '草稿'
} else if(data == '1') {
return '审核中'
} else if(data == '2') {
return '审核通过'
} else if(data == '3') {
return '审核未通过'
} else {
return '申请中'
return data
}
},
// 请假类型审核


+ 16
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue View File

@@ -173,8 +173,6 @@ export default {
// 不是子流程,可以直接渲染
const schemeData = await this.fetchSchemeData(this.currentNode)
const formData = await this.fetchFormData(this.currentNode, this.processId)
console.log(schemeData)
console.log(formData)
const { formValue, scheme, rel } = await this.getCustomForm({
formData,
schemeData,
@@ -182,6 +180,21 @@ export default {
processId: this.processId,
code: null
})
// 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去
const appSysPage = wfForms.find(t => t.appurl)
if (this.type !== 'child' && appSysPage) {
this.sysFormJump(appSysPage.appurl, {
currentNode: this.currentNode,
currentTask: this.currentTask,
logList: this.processList,
processInfo:this.processInfo,
formValue,
scheme,
})
return
}
this.scheme = scheme
console.log(scheme)
this.formValue = formValue
@@ -194,6 +207,7 @@ export default {

// 跳转到系统表单页面
sysFormJump(url, param) {
console.log(url)
this.HIDE_LOADING()
this.TOAST('跳转至移动端本地表单(即系统表单)')



Loading…
Cancel
Save