zhengkaixin 4 éve
szülő
commit
86a936c5de

+ 18 - 11
src/projects/business/views-xsy/PlanClass/Person.vue

@@ -24,7 +24,7 @@
 				</li> 
 			</ul>
 			<!--人员列表-->
-			<div class="vongi-fplist" :style="'margin-bottom:'+clientHeight+'px'">
+			<div class="vongi-fplist" :style="'margin-bottom:'+(clientHeight+10)+'px'">
 				<div class="mui-content-padded" v-show="arrangeShiftPersonList"  >
 					<h5><i class="iconfont icon-ze-friends blue"></i>人员列表</h5>
 				</div>
@@ -35,10 +35,10 @@
 						<input name="checkbox1" :value="item.id" v-model="selectId" @click="checkboxBtn(item)" type="checkbox">
 					</div> 
 				</form>
-				<div class="fyy-footer vongi-footer box-show" id="fyy-footer"> 
+				<div class="fyy-footer vongi-footer box-show" id="fyy-footer"  > 
 					<h5 class="margin10">已选择人员:<span style="  float: right; color: #3385FF; " @click="selectAll">全选</span></h5>
-					<div class="vongi-yjbtn flew">
-						<span v-for="item,i in selectPerson">{{item.name}}<a class="iconfont icon-guanbi1" @click="checkboxBtn(item,true,i)"></a></span>
+					<div class="vongi-yjbtn flew" id="spanLast" :style="'height:'+clientHeight+'px'">
+						<span style="height: 24px;"  v-for="item,i in selectPerson"    >{{item.name}}<a class="iconfont icon-guanbi1" @click="checkboxBtn(item,true,i)"></a></span>
 						
 					</div>
 				</div>
@@ -105,12 +105,8 @@
 					this.selectPerson.push(obj);
 				}
 			
-				
-				this.$nextTick(()=>{
-					//console.log(this.selectId)
-					this.clientHeight=document.getElementById("fyy-footer").clientHeight;
-				
-				})
+				this.setHeight()
+			
 				
 			},
 			selectAll(){
@@ -130,8 +126,19 @@
 					}
 					
 				}
+				this.setHeight()
+				
+			},
+			setHeight(){
+				//spanLast
 				this.$nextTick(()=>{
-					this.clientHeight=document.getElementById("fyy-footer").clientHeight;		
+					var top=document.getElementById("spanLast").scrollHeight;
+					if(top<100){
+						this.clientHeight=top;
+					}else{
+						this.clientHeight=100;
+					}
+					console.log(top)
 				})
 			},
 			reloadItem(item, index) {

+ 28 - 29
src/projects/business/views/Master/ExtraWork/Form.vue

@@ -24,10 +24,10 @@
 					<div><button class="mui-btn mui-btn-block" type='button' v-text="subForm.hours+'小时'"></button></div>
 				</div>
 				<div class="mui-input-row">
-					<label><span class="colorfe616c">*</span>审批人</label>
-					<div class="mui-navigate-right">
-						<button class="mui-btn mui-btn-block" type='button' @click="selectPerson" v-text="approvalPersonName"></button>
-					</div>
+					<label><span class="colorfe616c"></span>审批人</label>
+					 
+					<div><button class="mui-btn mui-btn-block" type='button' v-text="examinePerson.name"></button></div>
+					
 				</div>
 			</form>
 			<div class="vongi-meform-pho margint10">
@@ -38,7 +38,11 @@
 			</div>
 		</div>
 		<div class="fyy-footer">
-			<div class="bindfyy-btn" @click="submit"><button type="button" class="mui-btn mui-btn-primary ">提交</button></div>
+			<div class="bindfyy-btn" >
+				<button class="mui-btn " :class="examinePerson.name?'mui-btn-primary':'mui-btn-grey'" type="button" @click="submit">
+					提交
+				</button>
+				</div>
 		</div>
 
 		<loading :visible="isLoading"></loading>
@@ -46,6 +50,7 @@
 </template>
 
 <script>
+	import * as API_sp from '@/apis-xsy/xsy'
 	require('$project/assets/js/mui.picker.min.js');
 	import * as API_BusinessTravel from '@/apis/Master/business_travel'
 	import * as API_ExtraWork from '@/apis/Master/extra_work'
@@ -70,6 +75,7 @@
 		},
 		data() {
 			return {
+				examinePerson:{},
 				pageTitle: '加班',
 
 				isLoading: false,
@@ -79,7 +85,7 @@
 					startTime: '',
 					endTime: '',
 					hours: 0,
-					approvalPersonId: ''
+					formId: 'extraWork',
 				},
 
 				approvalPersonList: [],
@@ -162,7 +168,7 @@
 				} else if (!this.subForm.reason) {
 					mui.toast('请填写加班原因');
 					return false;
-				} else if (!this.subForm.approvalPersonId) {
+				} else if (false) {
 					mui.toast('请选择审批人');
 					return false;
 				} else {
@@ -173,15 +179,13 @@
 			submit() {
 				if (this.checkForm()) {
 					this.isLoading = true;
-					API_ExtraWork.submitWorkOver(this.subForm).then(response => {
+					API_ExtraWork.workOverPathSubmit(this.subForm).then(response => {
 						this.isLoading = false;
 
 						mui.toast('提交成功');
-						this.$router.push({
-							name: 'MasterExtraWorkInfo',
-							query: {
-								id: response.id
-							}
+						this.$router.replace({
+							name: "XsyApprovalInfo",
+							query:{id:response.id,formId:'extraWork'}
 						})
 					}).catch(error => {
 						this.isLoading = false;
@@ -193,31 +197,26 @@
 				var hoursArr = hourDistanceArr(this.subForm.startTime, this.subForm.endTime);
 				this.subForm.hours = hoursArr[0];
 			},
+			getExaminePerson(){
+				API_sp.examinePerson(this.subForm.formId).then(response => {
+					this.examinePerson=response
+				}).catch(error => {
+					
+					mui.toast(error);
+				})
+			},
 			asynCallBack() {
 
 			},
 		},
 		mounted() {
 			//获取审核人列表
-			this.getBusinessOutApprovalPerson();
+			//this.getBusinessOutApprovalPerson();
+			this.getExaminePerson();
 		},
 		destroyed() {},
 		computed: {
-			approvalPersonName: {
-				// getter
-				get: function() {
-					for (var i = 0; i < this.approvalPersonList.length; i++) {
-						if (this.approvalPersonList[i]['value'] == this.subForm.approvalPersonId) {
-							return this.approvalPersonList[i]['text'];
-						}
-					}
-					return '请选择';
-				},
-				// setter
-				set: function(newValue) {
-					console.log(newValue)
-				}
-			},
+		
 		},
 	}
 </script>

+ 3 - 2
src/projects/business/views/Master/ExtraWork/List.vue

@@ -114,9 +114,10 @@
 			//详情
 			goToInfo(id) {
 				this.$router.push({
-					name: 'MasterExtraWorkInfo',
+					name: 'XsyApprovalInfo',
 					query: {
-						id: id
+						id: id,
+						formId:'extraWork'
 					}
 				})
 			},