入伍保留学籍申请、外宿申请移动端审批(退回和驳回)流程完成
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<!-- 基础信息区域 -->
|
||||
<view class="form-section">
|
||||
<view class="card-header">
|
||||
<uni-icons type="contact" size="41" color="#409EFF"></uni-icons>
|
||||
<uni-icons type="contact" size="30" color="#409EFF"></uni-icons>
|
||||
<text class="section-title">基础信息</text>
|
||||
</view>
|
||||
|
||||
|
||||
<!--学号 -->
|
||||
<view class="form-item">
|
||||
<text class="label">学号:</text>
|
||||
@@ -88,7 +88,12 @@
|
||||
<!--申请状态 -->
|
||||
<view class="form-item">
|
||||
<text class="label">申请状态:</text>
|
||||
<view class="uni-input status-tag" :class="getStatusClass(form.applyStatus)" style="text-align: center;">
|
||||
<view class="uni-input status-tag status-reject" style="text-align: center;"
|
||||
v-if="getRejectInfo(form.enlistmentReserveApprovalList).isReject">
|
||||
{{ getRejectInfo(form.enlistmentReserveApprovalList).rejectText }}
|
||||
</view>
|
||||
<view v-else class="uni-input status-tag" :class="getStatusClass(form.applyStatus)"
|
||||
style="text-align: center;">
|
||||
{{ getStatusText(form.applyStatus) }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -115,13 +120,14 @@
|
||||
<!-- 附件区域 -->
|
||||
<view class="form-section" v-if="form.enlistmentReserveAttachList && form.enlistmentReserveAttachList.length">
|
||||
<view class="card-header">
|
||||
<uni-icons type="folder-add-filled" size="41" color="#409EFF"></uni-icons>
|
||||
<uni-icons type="folder-add-filled" size="30" color="#409EFF"></uni-icons>
|
||||
<text class="section-title">材料附件</text>
|
||||
</view>
|
||||
<view class="form-item form-item-auto">
|
||||
<text class="label">附件列表:</text>
|
||||
<view class="uni-input file-list">
|
||||
<view class="file-item" v-for="(file, index) in form.enlistmentReserveAttachList" :key="index" @click="previewFile(file, '附件')">
|
||||
<view class="file-item" v-for="(file, index) in form.enlistmentReserveAttachList" :key="index"
|
||||
@click="previewFile(file, '附件')">
|
||||
<uni-icons type="paper" size="24" color="#0092FF"></uni-icons>
|
||||
<text class="file-name">{{ file.fileName || '-' }}</text>
|
||||
<text class="file-size">{{ formatFileSize(file.fileSize) }}</text>
|
||||
@@ -131,13 +137,15 @@
|
||||
</view>
|
||||
|
||||
<!-- 审批记录区域 -->
|
||||
<view class="form-section" v-if="form.enlistmentReserveApprovalList && form.enlistmentReserveApprovalList.length">
|
||||
<view class="form-section"
|
||||
v-if="form.enlistmentReserveApprovalList && form.enlistmentReserveApprovalList.length">
|
||||
<view class="card-header">
|
||||
<uni-icons type="calendar-filled" size="41" color="#409EFF"></uni-icons>
|
||||
<uni-icons type="calendar-filled" size="30" color="#409EFF"></uni-icons>
|
||||
<text class="section-title">审批记录</text>
|
||||
</view>
|
||||
<view class="approval-list">
|
||||
<view class="approval-item" v-for="(approval, index) in form.enlistmentReserveApprovalList" :key="index">
|
||||
<view class="approval-item" v-for="(approval, index) in form.enlistmentReserveApprovalList"
|
||||
:key="index">
|
||||
<!-- 审批节点信息 -->
|
||||
<view class="approval-header">
|
||||
<text class="approval-node">{{ approval.nodeName || '-' }}</text>
|
||||
@@ -163,7 +171,8 @@
|
||||
<!-- 审批签名 -->
|
||||
<view class="form-item mini" v-if="approval.signature">
|
||||
<text class="label">审批签名:</text>
|
||||
<image class="signature-img" :src="baseUrl + approval.signature" mode="aspectFit" @click="previewFile(approval, '签名')"></image>
|
||||
<image class="signature-img" :src="baseUrl + approval.signature" mode="aspectFit"
|
||||
@click="previewFile(approval, '签名')"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -238,10 +247,14 @@
|
||||
*/
|
||||
getStatusText(status) {
|
||||
const statusMap = {
|
||||
1: '待审批',
|
||||
2: '审批中',
|
||||
3: '已通过',
|
||||
4: '已驳回'
|
||||
0: '待提交',
|
||||
1: '待辅导员审批',
|
||||
2: '待学务审批',
|
||||
3: '待二级学院审批',
|
||||
4: '待学籍管理科审批',
|
||||
5: '待教务处主管领导审批',
|
||||
6: '审批通过',
|
||||
7: '不通过'
|
||||
};
|
||||
return statusMap[status] || '未知状态';
|
||||
},
|
||||
@@ -253,10 +266,14 @@
|
||||
*/
|
||||
getStatusClass(status) {
|
||||
const classMap = {
|
||||
1: 'status-pending',
|
||||
0: 'status-pending',
|
||||
1: 'status-processing',
|
||||
2: 'status-processing',
|
||||
3: 'status-success',
|
||||
4: 'status-reject'
|
||||
3: 'status-processing',
|
||||
4: 'status-processing',
|
||||
5: 'status-processing',
|
||||
6: 'status-success',
|
||||
7: 'status-reject'
|
||||
};
|
||||
return classMap[status] || 'status-default';
|
||||
},
|
||||
@@ -323,6 +340,37 @@
|
||||
current: this.baseUrl + file.signature
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取驳回信息(是否驳回 + 驳回文字)
|
||||
* @param {Array} approvalList 审批意见列表
|
||||
* @returns {Object} { isReject: 布尔值, rejectText: 驳回文字 }
|
||||
*/
|
||||
getRejectInfo(approvalList) {
|
||||
// 空值保护:列表不存在/非数组/为空时,返回未驳回
|
||||
if (!approvalList || !Array.isArray(approvalList) || approvalList.length === 0) {
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
// 找到第一个审批结果为0(驳回)的记录
|
||||
const rejectItem = approvalList.find(item => item.approvalResult === 2);
|
||||
if (rejectItem) {
|
||||
// 提取审批节点名称(如「辅导员审批」→ 截取「辅导员」)
|
||||
const nodeName = rejectItem.nodeName.replace('审批', '');
|
||||
// 拼接驳回文字(如「辅导员驳回」)
|
||||
return {
|
||||
isReject: true,
|
||||
rejectText: `${nodeName}驳回`
|
||||
};
|
||||
} else {
|
||||
// 无驳回记录
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -342,12 +390,13 @@
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0rpx;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
@@ -385,7 +434,8 @@
|
||||
/* 关键修改:移除右对齐,改为左对齐 */
|
||||
// text-align: right;
|
||||
text-align: left;
|
||||
margin-right: 10rpx; /* 减小右边距,更紧凑 */
|
||||
margin-right: 10rpx;
|
||||
/* 减小右边距,更紧凑 */
|
||||
text-wrap: nowrap;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
@@ -512,7 +562,7 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// ========== 修复:将&嵌套到.approval-header内部 ==========
|
||||
// ========== 将&嵌套到.approval-header内部 ==========
|
||||
.approval-result-tag {
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 15rpx;
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
<text class="apply-no">申请编号:{{ form.applyNo || '-' }}</text>
|
||||
<text class="student-name">{{ form.studentName || '-' }} {{ form.studentNo || '-' }}</text>
|
||||
</view>
|
||||
<view class="status-tag" :class="getStatusClass(form.status)">
|
||||
<view class="status-tag status-reject" v-if="getRejectInfo(form.outsideAccommodationApprovals).isReject">
|
||||
{{ getRejectInfo(form.outsideAccommodationApprovals).rejectText }}
|
||||
</view>
|
||||
<view v-else class="status-tag" :class="getStatusClass(form.status)">
|
||||
{{ getStatusText(form.status) }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -91,7 +94,8 @@
|
||||
<!-- 学生电子签名 -->
|
||||
<view class="form-item signature-item" v-if="form.studentSignature">
|
||||
<text class="label">学生签名:</text>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentSignature)" mode="aspectFit" @click="previewImage(form.studentSignature)"></image>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentSignature)" mode="aspectFit"
|
||||
@click="previewImage(form.studentSignature)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -128,7 +132,8 @@
|
||||
<view class="form-item">
|
||||
<text class="label">家长意见:</text>
|
||||
<text class="value">
|
||||
<view class="opinion-tag" :class="form.parentOpinion == 1 ? 'opinion-agree' : 'opinion-disagree'">
|
||||
<view class="opinion-tag"
|
||||
:class="form.parentOpinion == 1 ? 'opinion-agree' : 'opinion-disagree'">
|
||||
{{ form.parentOpinion == 1 ? '同意' : '不同意' }}
|
||||
</view>
|
||||
</text>
|
||||
@@ -145,7 +150,8 @@
|
||||
<!-- 家长签字附件 -->
|
||||
<view class="form-item signature-item" v-if="form.parentSignAttachment">
|
||||
<text class="label">家长签字:</text>
|
||||
<image class="signature-img" :src="getFullUrl(form.parentSignAttachment)" mode="aspectFit" @click="previewImage(form.parentSignAttachment)"></image>
|
||||
<image class="signature-img" :src="getFullUrl(form.parentSignAttachment)" mode="aspectFit"
|
||||
@click="previewImage(form.parentSignAttachment)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -169,19 +175,22 @@
|
||||
<!-- 承诺签名 -->
|
||||
<view class="form-item signature-item" v-if="form.studentPromiseSign">
|
||||
<text class="label">承诺签名:</text>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentPromiseSign)" mode="aspectFit" @click="previewImage(form.studentPromiseSign)"></image>
|
||||
<image class="signature-img" :src="getFullUrl(form.studentPromiseSign)" mode="aspectFit"
|
||||
@click="previewImage(form.studentPromiseSign)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 附件列表 -->
|
||||
<view class="card" v-if="form.outsideAccommodationAttachments && form.outsideAccommodationAttachments.length">
|
||||
<view class="card"
|
||||
v-if="form.outsideAccommodationAttachments && form.outsideAccommodationAttachments.length">
|
||||
<view class="card-header">
|
||||
<uni-icons type="download-filled" size="24" color="#409EFF"></uni-icons>
|
||||
<text class="card-title">佐证材料</text>
|
||||
</view>
|
||||
<view class="attachment-list">
|
||||
<view class="attachment-item" v-for="(item, index) in form.outsideAccommodationAttachments" :key="index" @click="previewImage(item.attachmentUrl)">
|
||||
<view class="attachment-item" v-for="(item, index) in form.outsideAccommodationAttachments"
|
||||
:key="index" @click="previewImage(item.attachmentUrl)">
|
||||
<view class="file-icon">
|
||||
<uni-icons type="file" size="32" color="#409EFF"></uni-icons>
|
||||
</view>
|
||||
@@ -201,9 +210,12 @@
|
||||
<text class="card-title">审批记录</text>
|
||||
</view>
|
||||
<view class="approval-list">
|
||||
<view class="approval-item" v-for="(item, index) in form.outsideAccommodationApprovals" :key="index">
|
||||
<view class="approval-item" v-for="(item, index) in form.outsideAccommodationApprovals"
|
||||
:key="index">
|
||||
<view class="approval-line">
|
||||
<view class="approval-dot" :class="item.approvalResult == 1 ? 'dot-success' : item.approvalResult == 0 ? 'dot-pending' : 'dot-danger'"></view>
|
||||
<view class="approval-dot"
|
||||
:class="item.approvalResult == 1 ? 'dot-success' : item.approvalResult == 0 ? 'dot-pending' : 'dot-danger'">
|
||||
</view>
|
||||
<view class="approval-content">
|
||||
<view class="approval-header">
|
||||
<text class="approval-node">{{ item.approvalNode || '未知节点' }}</text>
|
||||
@@ -216,19 +228,22 @@
|
||||
</view>
|
||||
<view class="approval-info">
|
||||
<text class="info-key">审批结果:</text>
|
||||
<view class="approval-result-tag" :class="item.approvalResult == 1 ? 'result-approve' : item.approvalResult == 0 ? 'result-pending' : 'result-reject'">
|
||||
<view class="approval-result-tag"
|
||||
:class="item.approvalResult == 1 ? 'result-approve' : item.approvalResult == 0 ? 'result-pending' : 'result-reject'">
|
||||
{{ item.approvalResult == 1 ? '通过' : '驳回' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="approval-info" v-if="item.approvalOpinion">
|
||||
<text class="info-key">审批意见:</text>
|
||||
<text class="info-val">{{ item.approvalOpinion }}</text>
|
||||
</view>
|
||||
<!-- 审批签名 -->
|
||||
<view class="approval-info" v-if="item.signature">
|
||||
<text class="info-key">审批签名:</text>
|
||||
<!-- <image class="signature-img" :src="baseUrl + approval.signature" mode="aspectFit" @click="previewFile(approval, '签名')"></image> -->
|
||||
<image style="width: 100px; height: 50px;border: 1px solid #eee" :src="getFullUrl(item.signature)" mode="aspectFit" @click="previewImage(item.signature)"></image>
|
||||
<image style="width: 100px; height: 50px;border: 1px solid #eee"
|
||||
:src="getFullUrl(item.signature)" mode="aspectFit"
|
||||
@click="previewImage(item.signature)"></image>
|
||||
</view>
|
||||
<view class="approval-info" v-if="item.approvalOpinion">
|
||||
<text class="info-key">审批意见:</text>
|
||||
<text class="info-val">{{ item.approvalOpinion }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -238,7 +253,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 空审批记录提示 -->
|
||||
<view class="card empty-card" v-if="form.outsideAccommodationApprovals && form.outsideAccommodationApprovals.length === 0">
|
||||
<view class="card empty-card"
|
||||
v-if="form.outsideAccommodationApprovals && form.outsideAccommodationApprovals.length === 0">
|
||||
<view class="card-header">
|
||||
<uni-icons type="checkbox" size="24" color="#409EFF"></uni-icons>
|
||||
<text class="card-title">审批记录</text>
|
||||
@@ -309,7 +325,7 @@
|
||||
const statusMap = {
|
||||
0: '待提交',
|
||||
1: '待辅导员审批',
|
||||
2: '待学院书记审批',
|
||||
2: '待二级学院书记审批',
|
||||
3: '待学工处审批',
|
||||
4: '待学校领导审批',
|
||||
5: '审核通过',
|
||||
@@ -365,6 +381,37 @@
|
||||
urls: [fullUrl],
|
||||
current: fullUrl
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取驳回信息(是否驳回 + 驳回文字)
|
||||
* @param {Array} approvalList 审批意见列表
|
||||
* @returns {Object} { isReject: 布尔值, rejectText: 驳回文字 }
|
||||
*/
|
||||
getRejectInfo(approvalList) {
|
||||
// 空值保护:列表不存在/非数组/为空时,返回未驳回
|
||||
if (!approvalList || !Array.isArray(approvalList) || approvalList.length === 0) {
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
// 找到第一个审批结果为0(驳回)的记录
|
||||
const rejectItem = approvalList.find(item => item.approvalResult === 0);
|
||||
if (rejectItem) {
|
||||
// 提取审批节点名称(如「辅导员审批」→ 截取「辅导员」)
|
||||
const nodeName = rejectItem.approvalNode.replace('审批', '');
|
||||
// 拼接驳回文字(如「辅导员驳回」)
|
||||
return {
|
||||
isReject: true,
|
||||
rejectText: `${nodeName}驳回`
|
||||
};
|
||||
} else {
|
||||
// 无驳回记录
|
||||
return {
|
||||
isReject: false,
|
||||
rejectText: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -613,8 +660,9 @@
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #ddd;
|
||||
z-index: 2;
|
||||
// z-index: 2;
|
||||
flex-shrink: 0;
|
||||
margin-top: 10rpx;
|
||||
|
||||
&.dot-success {
|
||||
background-color: #67c23a;
|
||||
@@ -655,7 +703,7 @@
|
||||
.approval-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
.info-key {
|
||||
@@ -675,7 +723,10 @@
|
||||
}
|
||||
|
||||
// 标签样式
|
||||
.status-tag, .fee-tag, .opinion-tag, .approval-result-tag {
|
||||
.status-tag,
|
||||
.fee-tag,
|
||||
.opinion-tag,
|
||||
.approval-result-tag {
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 24rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<view class="progress" v-if="navIndex==1">
|
||||
<FlowStep :procInsId="taskForm.procInsId" :deployId="taskForm.deployId" />
|
||||
</view>
|
||||
|
||||
<!-- 审批(同意)弹窗 -->
|
||||
<uni-popup class="popup" ref="approveDialog" type="dialog" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="title">
|
||||
@@ -40,6 +40,41 @@
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 驳回弹窗 -->
|
||||
<uni-popup ref="rejectDialog" type="dialog">
|
||||
<uni-popup-dialog mode="input" title="驳回" v-model="inputReject" @confirm="rejectDialogConfirm"
|
||||
placeholder="请输入驳回理由"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
<!-- 回退弹窗 -->
|
||||
<uni-popup class="popup return-dialog" ref="returnDialog" type="dialog" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="title">
|
||||
退回流程
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="form-item">
|
||||
<label>退回节点</label>
|
||||
<scroll-view scroll-y="true">
|
||||
<view class="list">
|
||||
<view class="item" @tap="taskDotChange(index,item)"
|
||||
:class="index==taskDotIndex?'active':''" v-for="(item,index) in returnTaskList"
|
||||
:key="index">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text class="required">*</text>退回意见</label>
|
||||
<textarea v-model="taskForm.comment"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" @tap="onCancel">取消</button>
|
||||
<button type="primary" @tap="returnDialogConfirm">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
@@ -70,6 +105,7 @@
|
||||
getOutsideAccommodationApplyByProcessInstanceId,
|
||||
updateOutsideAccommodationApply
|
||||
} from "@/api/dms/outsideAccommodation/outsideAccommodationApply";
|
||||
import { addOrUpdateAccommodationApproval } from "@/api/dms/outsideAccommodation/outsideAccommodationApproval";
|
||||
import {
|
||||
insertOrUpdateByStuAndApprover
|
||||
} from "@/api/routine/enlistmentReserve/enlistmentReserveApproval";
|
||||
@@ -141,13 +177,13 @@
|
||||
this.getEnlistmentReserve(this.taskForm.procInsId);
|
||||
// 页面标题修改
|
||||
uni.setNavigationBarTitle({
|
||||
title: '入伍保留学籍申请详情'
|
||||
title: '入伍保留学籍申请详情'
|
||||
});
|
||||
} else if (this.category == 'outsideAccommodation') { // 外宿申请表单
|
||||
this.getOutsideAccommodation(this.taskForm.procInsId);
|
||||
// 页面标题修改
|
||||
uni.setNavigationBarTitle({
|
||||
title: '外宿申请详情'
|
||||
title: '外宿申请详情'
|
||||
});
|
||||
}
|
||||
getUserProfile().then(res => {
|
||||
@@ -205,6 +241,9 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.tag == 1) {
|
||||
this.getReturnList();
|
||||
}
|
||||
} catch (error) {
|
||||
// 错误捕获,避免接口调用失败导致页面异常
|
||||
console.error("获取数据失败:", error);
|
||||
@@ -237,6 +276,9 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.tag == 1) {
|
||||
this.getReturnList();
|
||||
}
|
||||
})
|
||||
},
|
||||
onComplete() {
|
||||
@@ -253,6 +295,7 @@
|
||||
this.$refs.approveDialog.close();
|
||||
this.$refs.returnDialog.close();
|
||||
},
|
||||
// 审批(同意)
|
||||
approveDialogConfirm() {
|
||||
if (this.taskForm.variables.approvalOpinion == '') {
|
||||
uni.showToast({
|
||||
@@ -270,8 +313,7 @@
|
||||
this.taskForm.variables.approvalResult = 1
|
||||
complete(this.taskForm).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (this.taskName ==
|
||||
'教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:07是入伍保留学籍)
|
||||
if (this.taskName == '教务处主管领导审批') { // (最后一个领导审核完成之后,修改学生学籍状态, status:07是入伍保留学籍)
|
||||
updateStudent({
|
||||
stuId: this.form.studentId,
|
||||
status: '07'
|
||||
@@ -302,6 +344,148 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
// 驳回
|
||||
rejectDialogConfirm() {
|
||||
if (this.inputReject == "") {
|
||||
uni.showToast({
|
||||
title: `请填写驳回理由`,
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "正在驳回"
|
||||
});
|
||||
let sData = {
|
||||
taskId: this.taskForm.taskId,
|
||||
comment: this.inputReject
|
||||
}
|
||||
|
||||
reject(sData).then(res => {
|
||||
if (res.code == 200) {
|
||||
// 是应征入伍保留学籍申请,才执行
|
||||
if (this.category == 'enlistmentReserve') {
|
||||
this.taskReturnApproval("驳回")
|
||||
} else if (this.category == 'outsideAccommodation') { // 是外宿申请,才执行
|
||||
this.taskReturnAccommodationApproval("驳回")
|
||||
}
|
||||
uni.showToast({
|
||||
title: "已驳回"
|
||||
})
|
||||
uni.hideLoading();
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
const pages = getCurrentPages();
|
||||
if (pages && pages.length > 0) {
|
||||
const prevPage = pages[pages.length - 2] || pages[pages.length -
|
||||
1];
|
||||
if (prevPage && typeof prevPage.handleChange === 'function') {
|
||||
prevPage.handleChange(this.tag || 1);
|
||||
console.log('刷新任务数据');
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 退回或驳回的时候生成入伍保留学籍申请审核
|
||||
taskReturnApproval(text) {
|
||||
let data = {
|
||||
applyId: this.form.id,
|
||||
processInstanceId: this.form.processInstanceId,
|
||||
taskId: this.taskForm.taskId,
|
||||
nodeName: this.taskName,
|
||||
approverId: this.user.userId,
|
||||
approverName: this.user.nickName,
|
||||
approvalOpinion: text == '驳回' ? this.inputReject : this.taskForm.comment,
|
||||
approvalResult: 2,
|
||||
studentName: this.form.studentName,
|
||||
studentNo: this.form.studentNo,
|
||||
signature: this.user.signature
|
||||
}
|
||||
// 生成审核记录
|
||||
insertOrUpdateByStuAndApprover(data).then(ress => {})
|
||||
},
|
||||
// 退回或驳回的时候生成外宿申请审核
|
||||
taskReturnAccommodationApproval(text) {
|
||||
let data = {
|
||||
applyId: this.form.id,
|
||||
processInstanceId: this.form.processInstanceId,
|
||||
applyNo: this.form.applyNo,
|
||||
approvalNode: this.taskName,
|
||||
approverId: this.user.userId,
|
||||
approverName: this.user.nickName,
|
||||
approvalOpinion: text == '驳回' ? this.inputReject : this.taskForm.comment,
|
||||
approvalResult: 0,
|
||||
studentName: this.form.studentName,
|
||||
studentNo: this.form.studentNo,
|
||||
signature: this.user.signature
|
||||
}
|
||||
// 生成审核记录
|
||||
addOrUpdateAccommodationApproval(data).then(ress => {
|
||||
// 退回或者驳回生产审批记录之后,更新申请表里面的驳回信息
|
||||
updateOutsideAccommodationApply({
|
||||
id: this.form.id,
|
||||
rejectReason: text == '驳回' ? this.inputReject : this.taskForm.comment
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取退回节点
|
||||
getReturnList() {
|
||||
returnList(this.taskForm).then((res) => {
|
||||
this.returnTaskList = res.data
|
||||
})
|
||||
},
|
||||
// 选择退回节点时候,获取节点id
|
||||
taskDotChange(index, item) {
|
||||
this.taskDotIndex = index;
|
||||
this.taskForm.targetKey = item.id;
|
||||
},
|
||||
// 回退确认
|
||||
returnDialogConfirm() {
|
||||
if (this.taskForm.targetKey == "") {
|
||||
this.taskForm.targetKey = this.returnTaskList[0].id;
|
||||
}
|
||||
if (this.taskForm.comment == "") {
|
||||
uni.showToast({
|
||||
title: `请填写回退意见`,
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "正在回退"
|
||||
});
|
||||
returnTask(this.taskForm).then((res) => {
|
||||
// 是应征入伍保留学籍申请,才执行
|
||||
if (this.category == 'enlistmentReserve') {
|
||||
this.taskReturnApproval("退回")
|
||||
} else if (this.category == 'outsideAccommodation') { // 是外宿申请,才执行
|
||||
this.taskReturnAccommodationApproval("退回")
|
||||
}
|
||||
uni.showToast({
|
||||
title: "已退回"
|
||||
})
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.msg
|
||||
})
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
const pages = getCurrentPages();
|
||||
if (pages && pages.length > 0) {
|
||||
const prevPage = pages[pages.length - 2] || pages[pages.length - 1];
|
||||
if (prevPage && typeof prevPage.handleChange === 'function') {
|
||||
prevPage.handleChange(this.tag || 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$refs.returnDialog.close();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user