Jelajahi Sumber

2020年12月14日 调整

zhengkaixin 4 tahun lalu
induk
melakukan
95df009fad

+ 5 - 5
src/projects/business/views/Master/Attendance/LeaveForm.vue

@@ -121,7 +121,7 @@
 					reason: '',
 					personId: '',
 
-					approvedId: '',
+                    approvedPersonPopedomId: '',
 					remark: '',
 				},
 				reasonDefault: '请假申请',
@@ -213,7 +213,7 @@
 					picker.pickers[0].setSelectedValue(this.default_examine_person);
 				}
 				picker.show(function(selectItems) {
-					_this.tjForm.approvedId = selectItems[0].value;
+					_this.tjForm.approvedPersonPopedomId = selectItems[0].value;
 					_this.approvalPersonName = selectItems[0].text;
 					_this.set_default_examine_person(selectItems[0].value);
 				})
@@ -223,7 +223,7 @@
 				if (this.default_examine_person) {
 					for (var i = 0; i < this.approvedList.length; i++) {
 						if (this.approvedList[i].value == this.default_examine_person) {
-							this.tjForm.approvedId = this.default_examine_person;
+							this.tjForm.approvedPersonPopedomId = this.default_examine_person;
 							this.approvalPersonName = this.approvedList[i].text;
 						}
 					}
@@ -320,7 +320,7 @@
               var day=i+(this.tjForm.endTimeQuantum-this.tjForm.startTimeQuantum)*0.5+0.5
 				this.daytime=day+'天';
 
-                this.tjForm.approvedId = '';
+                this.tjForm.approvedPersonPopedomId = '';
                 this.approvalPersonName = '请选择';
                 this.getPsersonList(day);
 
@@ -341,7 +341,7 @@
 				if (!this.tjForm.leaveType) {
 					mui.toast('请选择请假类型');
 					return false;
-				} else if (!this.tjForm.approvedId) {
+				} else if (!this.tjForm.approvedPersonPopedomId) {
 					mui.toast('请选择审批人');
 					return false;
 				} else if (this.tjForm.startTime== '请选择') {

+ 69 - 5
src/projects/business/views/Master/BusinessTravel/VerifyInfo.vue

@@ -61,7 +61,18 @@
 					</div>
 				</div>
 			</div>
-			<div v-if="detail.status=='0'" class="fyy-scon-botton">
+
+            <div class="mui-content-padded vongi-qingjiadt vongi-editme" v-if="detail.status=='0'&&detail.approvalEnable&&approvalPersonList.length" >
+                <form class="mui-input-group">
+                    <div class="mui-input-row">
+                        <label><i class="colorfe616c"></i> 下一级审批人</label>
+                        <button @click="selectPerson" class="mui-btn mui-btn-block mui-navigate-right mui-ellipsis" type='button' style="width:65%">
+                            {{approvalPersonName}}
+                        </button>
+                    </div>
+                </form>
+            </div>
+			<div v-if="detail.status=='0'&&detail.approvalEnable" class="fyy-scon-botton">
 				<div class="examine-btn examine-btn1" @click="openFrom('2')">拒绝</div>
 				<div class="examine-btn examine-btn2" @click="openFrom('1')">通过</div>
 			</div>
@@ -72,7 +83,9 @@
 </template>
 
 <script>
-	import * as API_BusinessTravel from '@/apis/Master/business_travel'
+    require('$project/assets/js/mui.picker.min.js');
+
+    import * as API_BusinessTravel from '@/apis/Master/business_travel'
 	import Common from '$project/components/Common.vue'
 	import Loading from '$project/components/Loading.vue'
 	import TopHeader from '$project/components/TopHeader.vue'
@@ -92,13 +105,19 @@
 				pageTitle: '出差审批详情',
 
 				isLoading: false,
-
+                approvalPersonName:'',
 				subForm: {
 					ids: this.$route.query.id,
 					status: '',
 					approvalContent: '',
+                    nextApprovalId:'',
 				},
-
+                approvalPersonList:[],
+                //补卡1,外出2,出差3 ,请假4
+                personForm: {
+                    type: '3'
+                },
+                approvalPerson:false,
 				detail: {
 					list: [],
 				},
@@ -106,6 +125,45 @@
 		},
 		created() {},
 		methods: {
+            //获取审核人列表
+            getBusinessOutApprovalPerson() {
+                this.isLoading = true;
+                API_BusinessTravel.getBusinessOutApprovalPerson(this.personForm).then(response => {
+                    this.isLoading = false;
+
+                    var list = response.data;
+                    var approvalPersonList = [];
+                    for (var i = 0; i < list.length; i++) {
+                        approvalPersonList.push({
+                            value: list[i]['id'],
+                            text: list[i]['personName']
+                        })
+                    }
+                    if (approvalPersonList.length) {
+                        this.subForm.nextApprovalId = approvalPersonList[0]['value'];
+                        this.approvalPersonName= approvalPersonList[0]['text'];
+
+                    }
+                    this.approvalPersonList = approvalPersonList;
+
+                    this.approvalPerson=true;
+                }).catch(error => {
+                    this.isLoading = false;
+                    mui.toast(error);
+                })
+            },
+            //选择审核人
+            selectPerson() {
+                var _this = this;
+                var picker = new mui.PopPicker();
+                picker.setData(_this.approvalPersonList);
+                picker.pickers[0].setSelectedValue(this.subForm.nextApprovalId);
+                picker.show(function(selectItems) {
+                    _this.subForm.nextApprovalId = selectItems[0].value;
+                    _this.approvalPersonName= selectItems[0].text;
+                    picker.dispose();
+                })
+            },
 			//获取详情
 			getInfo() {
 				this.isLoading = true;
@@ -144,7 +202,10 @@
 			},
 			//检测表单
 			checkForm() {
-				if (!this.subForm.ids) {
+                if(!this.approvalPerson){
+                    mui.toast('加载下一级审批人失败,请刷新页面');
+                    return false;
+                }else if (!this.subForm.ids) {
 					mui.toast('请选择要处理的信息');
 					return false;
 				} else {
@@ -169,6 +230,7 @@
 			asynCallBack() {
 				//获取详情
 				this.getInfo();
+                this.getBusinessOutApprovalPerson();
 			},
 		},
 		mounted() {
@@ -186,5 +248,7 @@
 
 <style scoped src="$project/assets/css/xpwyfyy.css"></style>
 <style src="$project/assets/css/iconfont.css"></style>
+<style src="$project/assets/css/mui.picker.min.css"></style>
+
 <style>
 </style>

+ 2 - 2
src/projects/business/views/Master/BusinessTravel/VerifyList.vue

@@ -69,8 +69,8 @@
 						<input v-model="allSelect" value="1" type="checkbox" @click="selectAll" :checked="recordList.length==selectIdList.length">
 					</div>
 				</form>
-				<button type="button" class="mui-btn mui-btn-danger" @click="openFrom('2')">拒绝</button>
-				<button type="button" class="mui-btn mui-btn-success" @click="openFrom('1')">同意</button>
+				<!--<button type="button" class="mui-btn mui-btn-danger" @click="openFrom('2')">拒绝</button>-->
+				<!--<button type="button" class="mui-btn mui-btn-success" @click="openFrom('1')">同意</button>-->
 			</div>
 		</div>