|
@@ -1,5 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
|
|
+ <common @asynCallBack="asynCallBack"></common>
|
|
|
|
+ <loading :visible="isLoading"></loading>
|
|
<header class="mui-bar mui-bar-nav">
|
|
<header class="mui-bar mui-bar-nav">
|
|
<h1 class="mui-title">调班审核</h1>
|
|
<h1 class="mui-title">调班审核</h1>
|
|
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
@@ -8,85 +10,304 @@
|
|
<div id="slider" class="mui-slider mui-fullscreen vongi-over">
|
|
<div id="slider" class="mui-slider mui-fullscreen vongi-over">
|
|
<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
|
|
<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
|
|
<div class="mui-scroll">
|
|
<div class="mui-scroll">
|
|
- <a class="mui-control-item mui-active" href="#item1mobile">
|
|
|
|
- <span class="fyy-badge">待处理<span class="mui-badge">5</span></span>
|
|
|
|
|
|
+ <a class="mui-control-item " @click="mySwitchTab(true)" :class="{'mui-active':switchTab}" >
|
|
|
|
+ <span class="fyy-badge">待处理<span class="mui-badge" v-show="mybadge">{{mybadge}}</span></span>
|
|
</a>
|
|
</a>
|
|
- <a class="mui-control-item" href="#item2mobile">
|
|
|
|
|
|
+ <a class="mui-control-item" @click="mySwitchTab(false)" :class="{'mui-active':!switchTab}" >
|
|
已处理
|
|
已处理
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="mui-slider-group">
|
|
<div class="mui-slider-group">
|
|
- <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
|
|
|
|
- <div id="scroll1" class="mui-scroll-wrapper">
|
|
|
|
|
|
+
|
|
|
|
+ <div class="mui-slider-item mui-control-content " v-show="switchTab">
|
|
|
|
+ <div class="mui-scroll-wrapper vongi-over-hei" >
|
|
<div class="mui-scroll">
|
|
<div class="mui-scroll">
|
|
- <form class="mui-input-group fyy-checkbox">
|
|
|
|
- <div class="mui-input-row mui-checkbox mui-left">
|
|
|
|
- <a href="" class="mui-media-body">
|
|
|
|
- <h4 class="flew-sp margin10">邹杰的调班申请<span class="color999 mui-h5">10-17 18:00</span></h4>
|
|
|
|
- <h5 class='mui-ellipsis color999'>调班日期:2021-03-01 星期一</h5>
|
|
|
|
- </a>
|
|
|
|
- <input name="checkbox" value="Item 1" type="checkbox" checked>
|
|
|
|
|
|
+ <div class="mui-input-group fyy-checkbox">
|
|
|
|
+
|
|
|
|
+ <div class="mui-input-row mui-checkbox mui-left" v-for="item,i in recordList">
|
|
|
|
+
|
|
|
|
+ <router-link :to="{name:'ApprovalClassInfo',query:{id:item.id,procinstActUserId:item.procinstActUserId}}" class="mui-media-body">
|
|
|
|
+
|
|
|
|
+ <h4 class="flew-sp margin10">{{item.name}}的调班申请<span class="color999 mui-h5">{{item.createTime}}</span></h4>
|
|
|
|
+ <h5 class='mui-ellipsis color999'>调班日期:{{item.adjustDate}}</h5>
|
|
|
|
+ </router-link>
|
|
|
|
+ <input name="checkbox" v-model="ids" :value="item.procinstActUserId" type="checkbox" >
|
|
</div>
|
|
</div>
|
|
- <div class="mui-input-row mui-checkbox mui-left">
|
|
|
|
- <a href="" class="mui-media-body">
|
|
|
|
- <h4 class="flew-sp margin10">邹杰的调班申请<span class="color999 mui-h5">10-17 18:00</span></h4>
|
|
|
|
- <h5 class='mui-ellipsis color999'>调班日期:2021-03-01 星期一</h5>
|
|
|
|
- </a>
|
|
|
|
- <input name="checkbox" value="Item 1" type="checkbox">
|
|
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
|
|
+ <NullList :remark="'暂无调班申请记录'" v-if="!recordList.length"></NullList>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div id="item2mobile" class="mui-slider-item mui-control-content">
|
|
|
|
|
|
+ <div class="mui-slider-item mui-control-content" v-show="!switchTab">
|
|
<div class="mui-scroll-wrapper">
|
|
<div class="mui-scroll-wrapper">
|
|
<div class="mui-scroll">
|
|
<div class="mui-scroll">
|
|
<ul class="mui-table-view mui-table-view-chevron">
|
|
<ul class="mui-table-view mui-table-view-chevron">
|
|
- <li class="mui-table-view-cell mui-media">
|
|
|
|
- <a href="">
|
|
|
|
- <h4 class="flew-sp margin10">邹杰的调班申请<span class="color999 mui-h5">10-17 18:00</span></h4>
|
|
|
|
- <h5 class='mui-ellipsis color999 flew-sp flew-items'>调班日期:2021-03-01 星期一<button type="" class="mui-btn mui-btn-success mui-btn-outlined">已同意</button></h5>
|
|
|
|
- </a>
|
|
|
|
- </li>
|
|
|
|
- <li class="mui-table-view-cell mui-media">
|
|
|
|
- <a href="">
|
|
|
|
- <h4 class="flew-sp margin10">邹杰的调班申请<span class="color999 mui-h5">10-17 18:00</span></h4>
|
|
|
|
- <h5 class='mui-ellipsis color999 flew-sp flew-items'>调班日期:2021-03-01 星期一<button type="" class="mui-btn mui-btn-danger mui-btn-outlined">已拒绝</button></h5>
|
|
|
|
- </a>
|
|
|
|
|
|
+ <li class="mui-table-view-cell mui-media" v-for="item,i in recordList2">
|
|
|
|
+ <router-link :to="{name:'ApprovalClassInfo',query:{id:item.id}}" class="mui-media-body">
|
|
|
|
+
|
|
|
|
+ <h4 class="flew-sp margin10">{{item.name}}的调班申请<span class="color999 mui-h5">{{item.createTime}}</span></h4>
|
|
|
|
+ <h5 class='mui-ellipsis color999 flew-sp flew-items'>调班日期:{{item.adjustDate}}
|
|
|
|
+ <button class="mui-btn mui-btn-outlined" :class="{'mui-btn-primary':item.action==0,
|
|
|
|
+ 'mui-btn-danger':item.action==2||item.action==3,
|
|
|
|
+ 'mui-btn-success':item.action==1||item.action==4}" >{{item.actionName}}</button>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </h5>
|
|
|
|
+ </router-link>
|
|
</li>
|
|
</li>
|
|
|
|
+
|
|
</ul>
|
|
</ul>
|
|
|
|
+ <NullList :remark="'暂无已处理记录'" v-if="!recordList2.length"></NullList>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="fyy-bindfyy-btn">
|
|
|
|
|
|
+ <div class="fyy-bindfyy-btn" v-show="switchTab">
|
|
<form class="mui-input-group">
|
|
<form class="mui-input-group">
|
|
<div class="mui-input-row mui-checkbox mui-left">
|
|
<div class="mui-input-row mui-checkbox mui-left">
|
|
<label>全选</label>
|
|
<label>全选</label>
|
|
- <input name="checkbox" value="Item 1" type="checkbox">
|
|
|
|
|
|
+ <input v-model="allSelect" value="1" type="checkbox" @click="selectAll" :checked="recordList.length==ids.length">
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
- <button type="button" class="mui-btn mui-btn-danger">拒绝</button>
|
|
|
|
- <button type="button" class="mui-btn mui-btn-success">同意</button>
|
|
|
|
|
|
+ <button type="button" class="mui-btn mui-btn-danger" @click="openFrom('3')">拒绝</button>
|
|
|
|
+ <button type="button" class="mui-btn mui-btn-success" @click="openFrom('1')">同意</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--弹窗-->
|
|
<!--弹窗-->
|
|
- <div class="mui-popup mui-popup-in vongi-mui-pop" style="display: block;">
|
|
|
|
|
|
+ <div class="mui-popup mui-popup-in vongi-mui-pop" v-show="showApprovalBl">
|
|
<div class="mui-popup-inner vongi-pop-inner">
|
|
<div class="mui-popup-inner vongi-pop-inner">
|
|
<div class="mui-popup-title">审核意见</div>
|
|
<div class="mui-popup-title">审核意见</div>
|
|
<div class="mui-popup-input">
|
|
<div class="mui-popup-input">
|
|
- <textarea id="textarea" rows="3" placeholder="可输入审核意见"></textarea>
|
|
|
|
|
|
+ <textarea id="textarea" rows="3" v-model="subForm.content" placeholder="可输入审核意见"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="mui-popup-buttons"><span class="mui-popup-button">取消</span><span class="mui-popup-button mui-popup-button-bold">提交</span></div>
|
|
|
|
|
|
+ <div class="mui-popup-buttons">
|
|
|
|
+ <span class="mui-popup-button" @click="showApprovalBl=false">取消</span>
|
|
|
|
+ <span class="mui-popup-button mui-popup-button-bold" @click="doAction">提交</span></div>
|
|
</div>
|
|
</div>
|
|
- <div class="mui-popup-backdrop mui-active" style="display: block;"></div>
|
|
|
|
|
|
+ <div class="mui-popup-backdrop mui-active" v-show="showApprovalBl"></div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+
|
|
|
|
+ import * as API from '@/apis-xsy/applyclass'
|
|
|
|
+ import * as API_sp from '@/apis-xsy/xsy'
|
|
|
|
+
|
|
|
|
+ import Common from '$project/components/Common.vue'
|
|
|
|
+ import Loading from '$project/components/Loading.vue'
|
|
|
|
+ import TopHeader from '$project/components/TopHeader.vue'
|
|
|
|
+ import NullList from '$project/components/NullList.vue'
|
|
|
|
+ import isReachBottom from '$project/utils/isReachBottom'
|
|
|
|
+
|
|
|
|
+ import {
|
|
|
|
+ mapGetters,
|
|
|
|
+ mapMutations
|
|
|
|
+ } from 'vuex'
|
|
|
|
+
|
|
|
|
+ export default {
|
|
|
|
+ name: '',
|
|
|
|
+ components: {
|
|
|
|
+ Common,
|
|
|
|
+ Loading,
|
|
|
|
+ TopHeader,NullList
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ allSelect:[],
|
|
|
|
+ ids:[],
|
|
|
|
+ switchTab:true,
|
|
|
|
+ mybadge:0,
|
|
|
|
+ pageTitle: '调班审核',
|
|
|
|
+ showApprovalBl:false,
|
|
|
|
+ isLoading: false,
|
|
|
|
+ listForm: {
|
|
|
|
+ pageIndex: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ totalPage: 1,
|
|
|
|
+ },
|
|
|
|
+ recordList: [],
|
|
|
|
+
|
|
|
|
+ listForm2: {
|
|
|
|
+ pageIndex: 1,
|
|
|
|
+ pageSize: 20,
|
|
|
|
+ totalPage: 1,
|
|
|
|
+ },
|
|
|
|
+ recordList2: [],
|
|
|
|
+ subForm: {
|
|
|
|
+ procinstActUserIds: '',
|
|
|
|
+ content: '',
|
|
|
|
+ status: ''
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ mySwitchTab(bl){
|
|
|
|
+ this.switchTab=bl;
|
|
|
|
+ if(bl){
|
|
|
|
+ if(this.recordList.length==0){
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(this.recordList2.length==0){
|
|
|
|
+ this.getList2()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //检测表单
|
|
|
|
+ checkForm() {
|
|
|
|
+ if (false) {
|
|
|
|
+ mui.toast('请选择要处理的信息');
|
|
|
|
+ return false;
|
|
|
|
+ } else {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //同意拒绝
|
|
|
|
+ doAction() {
|
|
|
|
+ this.subForm.procinstActUserIds = this.ids.join(',');
|
|
|
|
+ if (this.checkForm()) {
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ API.examineSubmit(this.subForm).then(response => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+
|
|
|
|
+ this.showApprovalBl = false;
|
|
|
|
+ this.listForm.pageIndex = 1;
|
|
|
|
+ mui.toast("操作成功");
|
|
|
|
+ this.getList();
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ mui.toast(error);
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //显示内容表单
|
|
|
|
+ openFrom(status) {
|
|
|
|
+ if (!this.ids.length) {
|
|
|
|
+ mui.toast('请选择要处理的信息');
|
|
|
|
+ } else {
|
|
|
|
+ this.subForm.status = status;
|
|
|
|
+ this.subForm.content = status == 1 ? '同意' : '拒绝';
|
|
|
|
+ this.showApprovalBl = true;
|
|
|
|
+ //直接点击处理,不需要弹窗理由框,又需要弹窗理由框了
|
|
|
|
+ //this.doAction();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //选择所有
|
|
|
|
+ selectAll() {
|
|
|
|
+ if (this.allSelect.length) {
|
|
|
|
+ this.ids = [];
|
|
|
|
+ } else {
|
|
|
|
+ var selectIdList = [];
|
|
|
|
+ this.recordList.forEach(function(item, index) {
|
|
|
|
+ selectIdList.push(item.id);
|
|
|
|
+ })
|
|
|
|
+ this.ids = selectIdList;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //获取列表
|
|
|
|
+ getList2() {
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ API.alreadyExamineShiftList(this.listForm2).then(response => {
|
|
|
|
+ if (response) {
|
|
|
|
+ if (this.listForm2.pageIndex == 1) {
|
|
|
|
+ this.recordList2 = response.data;
|
|
|
|
+ this.listForm2.pageIndex = response.pageNumber;
|
|
|
|
+ this.listForm2.totalPage = response.totalPage;
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ this.recordList2 = [
|
|
|
|
+ ...this.recordList2,
|
|
|
|
+ ...response.data
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.listForm2.pageIndex++;
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ mui.toast(error);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //获取列表
|
|
|
|
+ getList() {
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ API.waitExamineShiftList(this.listForm).then(response => {
|
|
|
|
+ if (response) {
|
|
|
|
+ if (this.listForm.pageIndex == 1) {
|
|
|
|
+ this.recordList = response.data;
|
|
|
|
+ this.listForm.pageIndex = response.pageNumber;
|
|
|
|
+ this.listForm.totalPage = response.totalPage;
|
|
|
|
+ this.mybadge=response.recordsTotal
|
|
|
|
+ } else {
|
|
|
|
+ this.recordList = [
|
|
|
|
+ ...this.recordList,
|
|
|
|
+ ...response.data
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.listForm.pageIndex++;
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.isLoading = false;
|
|
|
|
+ mui.toast(error);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //下拉事件
|
|
|
|
+ handleScrool() {
|
|
|
|
+
|
|
|
|
+ if (isReachBottom()) {
|
|
|
|
+ console.log('到达底部')
|
|
|
|
+ if(this.switchTab){
|
|
|
|
+ if (this.listForm.pageIndex <= this.listForm.totalPage && this.isLoading == false) {
|
|
|
|
+ this.getList();
|
|
|
|
+ } else {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if (this.listForm2.pageIndex <= this.listForm2.totalPage && this.isLoading == false) {
|
|
|
|
+ this.getList2();
|
|
|
|
+ } else {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ asynCallBack() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ if(this.switchTab){
|
|
|
|
+ this.getList();
|
|
|
|
+ }else{
|
|
|
|
+ this.getList2();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //监控下拉加载事件
|
|
|
|
+ var _this = this;
|
|
|
|
+ window.addEventListener('scroll', _this.handleScrool);
|
|
|
|
+ },
|
|
|
|
+ destroyed() {
|
|
|
|
+ //销毁监听事件
|
|
|
|
+ var _this = this;
|
|
|
|
+ window.removeEventListener('scroll', _this.handleScrool);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style src="$project/assets/css/iconfont.css"></style>
|
|
<style src="$project/assets/css/iconfont.css"></style>
|