瀏覽代碼

待办事项

zhengkaixin 4 年之前
父節點
當前提交
c5f2843f8e

+ 57 - 11
src/projects/business/components/Approval/ListSp.vue

@@ -28,10 +28,14 @@
 									
 									<div class="mui-input-row mui-checkbox mui-left" v-for="item,i in recordList">
 										
-											<router-link :to="{name:'XsyApprovalInfoSp',query:{id:item.id,procinstActUserId:item.procinstActUserId,formId:mymod.formId}}" class="mui-media-body">
+											<router-link :to="{name:'XsyApprovalInfoSp',query:{id:item.id,procinstActUserId:item.procinstActUserId,formId:listmod[item.procinstType].formId}}" class="mui-media-body">
 											
-											<h4 class="flew-sp margin10">{{item[mymod.name?mymod.name:'name']}}{{mymod.text1}}申请<span class="color999 mui-h5">{{item.createTime}}</span></h4>
+											<h4 class="flew-sp margin10">{{item[mymod.name?mymod.name:'name']}}{{formId=='Need'?'的'+item.procinstTypeName:mymod.text1}}申请
+												<span class="color999 mui-h5" v-if="formId!='Need'">{{item.createTime}}</span>
+												<span class="  mui-h5" style="color: #1677FF;font-size: 14px;" v-if="formId=='Need'">{{item.procinstTypeName}}</span>
+											</h4>
 											<h5 class='mui-ellipsis color999'>{{mymod.text2}}:{{item[mymod.param]}}</h5>
+										
 										</router-link>
 										<input name="checkbox" v-model="ids" :value="item.procinstActUserId" type="checkbox" >
 									</div>
@@ -46,11 +50,21 @@
 							<div class="mui-scroll">
 								<ul class="mui-table-view mui-table-view-chevron">
 									<li class="mui-table-view-cell mui-media" v-for="item,i in recordList2">
-										<router-link :to="{name:'XsyApprovalInfo',query:{id:item.id,formId:mymod.formId}}" class="mui-media-body">
+										<router-link :to="{name:'XsyApprovalInfo',query:{id:item.id,formId:listmod[item.procinstType].formId}}" class="mui-media-body">
 										
-											<h4 class="flew-sp margin10">{{item.name}}的{{mymod.text}}申请<span class="color999 mui-h5">{{item.createTime}}</span></h4>
-											<h5 class='mui-ellipsis color999 flew-sp flew-items'>{{mymod.text}}日期:{{item[mymod.param]}}
-											<button class="mui-btn   mui-btn-outlined" :class="{'mui-btn-primary':item.action==0,
+											<h4 class="flew-sp margin10">{{item.name}}{{formId=='Need'?'的'+item.procinstTypeName:mymod.text1}}申请
+											
+												<span class="color999 mui-h5" v-if="formId!='Need'">{{item.createTime}}</span>
+												<span class="color999 mui-h5" v-if="formId=='Need'">
+													
+													<button class="mui-btn   mui-btn-outlined" style="padding: 2px 10px;" :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>
+												</span>
+											</h4>
+											
+											<h5 class='mui-ellipsis color999 flew-sp flew-items'>{{mymod.text2}}:{{item[mymod.param]}}
+											<button v-if="formId!='Need'" class="mui-btn   mui-btn-outlined"  style="padding: 2px 10px;" :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>
 															
@@ -129,7 +143,14 @@
 		data() {
 			return {
 				mymod:{},
-				listmod:[{},{
+				listmod:[{
+					title:"待办事项",
+					text1:"",
+					text2:"申请时间",
+					formId:"",
+					 
+					param:"createTime"
+				},{
 					title:"调班审核",
 					text1:"的调班",
 					text2:"调班日期",
@@ -223,10 +244,24 @@
 				},
 			}
 		},
-		created() {
-			 this.listForm.procinstType=this.formId;
-			 this.listForm2.procinstType=this.formId;
+		created() {
+			if(this.formId=="key"){
+				var formId= this.$route.query.formId;
+				for(var i in this.listmod){
+					if(this.listmod[i].formId==formId){
+						this.formId=i;
+						break
+					}
+				}
+				
+			}
 			
+			this.listForm.procinstType=this.formId;
+			this.listForm2.procinstType=this.formId;
+			if(this.formId=="Need"){
+				this.listForm.procinstType="";
+				this.listForm2.procinstType="";
+			}
 		},
 		methods: {
 			leaveItem(detail){
@@ -243,6 +278,10 @@
 				if(this.formId=="6"||this.formId=="7"){
 					detail.supplementDate=detail.startTime+" "+detail.hours+"小时"
 				}
+				if(!detail.procinstType){
+					detail.procinstType=this.formId;
+				}
+				
 				
 			},
 			mySwitchTab(bl){
@@ -316,6 +355,8 @@
 				API.alreadyExamineShiftList(this.listForm2).then(response => {
 					if (response) {
 						for(var i in response.data){
+							
+							
 							this.leaveItem(response.data[i])
 						}
 						if (this.listForm2.pageIndex == 1) {
@@ -394,7 +435,12 @@
 		
 		},
 	mounted() {
-		 this.mymod=this.listmod[this.formId];
+		if(this.formId=="Need"){
+			this.mymod=this.listmod[0];
+		}else{
+			this.mymod=this.listmod[this.formId];
+		}
+	
 		if(this.switchTab){
 			this.getList();
 		}else{

+ 22 - 0
src/projects/business/router-xsy/xsy.js

@@ -37,6 +37,28 @@ const routesXsy = [
 							title: '申请详情',
 						}
 					},
+					//审批列表-领导
+					{
+						path: 'list',
+						name: 'XsyApprovalList',
+						component: () => import('../views-xsy/Approval/List.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '申请列表',
+						}
+					},
+					//审批列表-待办
+					{
+						path: 'need',
+						name: 'XsyApprovalNeed',
+						component: () => import('../views-xsy/Approval/Need.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '申请列表',
+						}
+					},
 					
 				]
 			},

+ 49 - 0
src/projects/business/views-xsy/Approval/List.vue

@@ -0,0 +1,49 @@
+<template>
+	<div>
+			 <ListSp formId="key" ></ListSp>
+	</div>
+</template>
+
+
+<script>
+	
+	
+	 import  ListSp from '@/components/Approval/ListSp.vue'
+	 
+	
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+
+	export default {
+		name: '',
+		components: {
+			ListSp
+		},
+		data() { 
+			return{
+				
+			}
+		},
+		created() {
+			 
+		},
+		methods: {  
+		
+		},
+	mounted() {
+		 
+	},
+
+	
+	}
+</script>
+
+<style src="$project/assets/css/iconfont.css"></style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style src="$project/assets/css/xsy.css"></style>
+<style>
+	
+
+</style>

+ 49 - 0
src/projects/business/views-xsy/Approval/Need.vue

@@ -0,0 +1,49 @@
+<template>
+	<div>
+			 <ListSp formId="Need" ></ListSp>
+	</div>
+</template>
+
+
+<script>
+	
+	
+	 import  ListSp from '@/components/Approval/ListSp.vue'
+	 
+	
+	import {
+		mapGetters,
+		mapMutations
+	} from 'vuex'
+
+	export default {
+		name: '',
+		components: {
+			ListSp
+		},
+		data() { 
+			return{
+				
+			}
+		},
+		created() {
+			 
+		},
+		methods: {  
+		
+		},
+	mounted() {
+		 
+	},
+
+	
+	}
+</script>
+
+<style src="$project/assets/css/iconfont.css"></style>
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
+<style src="$project/assets/css/xsy.css"></style>
+<style>
+	
+
+</style>