|
@@ -62,15 +62,33 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-show="recordList.length>0 && listForm.status==0" class="fyy-bindfyy-btn">
|
|
|
- <form class="mui-input-group">
|
|
|
- <div class="mui-input-row mui-checkbox mui-left">
|
|
|
- <label>全选</label>
|
|
|
- <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>-->
|
|
|
+
|
|
|
+ <div v-show="recordList.length>0 && listForm.status==0" class="vongi-ad-fix" style="z-index:99">
|
|
|
+
|
|
|
+ <div class=" vongi-wordcard" v-if="approvalPersonList.length">
|
|
|
+ <form class="mui-input-group">
|
|
|
+ <div class="mui-input-row">
|
|
|
+ <label class="color4fc5f7">下一步审批人</label>
|
|
|
+ <div v-if="approvalPersonList.length!=1" class="mui-navigate-right" @click="selectPerson" >
|
|
|
+ <button id='showUserPicker' class="mui-btn mui-btn-block" type='button' ><span v-text="approvalPersonName"></span></button>
|
|
|
+ </div>
|
|
|
+ <div v-if="approvalPersonList.length==1" >
|
|
|
+ <button class="mui-btn mui-btn-block" type='button' ><span v-text="approvalPersonName"></span></button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="fyy-bindfyy-btn">
|
|
|
+ <form class="mui-input-group">
|
|
|
+ <div class="mui-input-row mui-checkbox mui-left">
|
|
|
+ <label>全选</label>
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -79,7 +97,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'
|
|
@@ -111,13 +131,19 @@
|
|
|
status: '0'
|
|
|
},
|
|
|
recordList: [],
|
|
|
+ approvalPersonList:[],
|
|
|
+ approvalPerson:false,
|
|
|
|
|
|
- subForm: {
|
|
|
+ subForm: {
|
|
|
ids: '',
|
|
|
approvalContent: '',
|
|
|
- status: ''
|
|
|
+ status: '',
|
|
|
+ nextApprovalId:'',
|
|
|
},
|
|
|
-
|
|
|
+ //补卡1,外出2,出差3 ,请假4
|
|
|
+ personForm: {
|
|
|
+ type: '3'
|
|
|
+ },
|
|
|
selectIdList: [],
|
|
|
allSelect: [],
|
|
|
firstRecordsTotal: 0,
|
|
@@ -125,6 +151,47 @@
|
|
|
},
|
|
|
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;
|
|
|
+ _this.$forceUpdate()
|
|
|
+
|
|
|
+ picker.dispose();
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取列表
|
|
|
getList() {
|
|
|
this.isLoading = true;
|
|
@@ -196,7 +263,10 @@
|
|
|
},
|
|
|
//检测表单
|
|
|
checkForm() {
|
|
|
- if (!this.subForm.ids) {
|
|
|
+ if(!this.approvalPerson){
|
|
|
+ mui.toast('加载下一级审批人失败,请刷新页面');
|
|
|
+ return false;
|
|
|
+ }else if (!this.subForm.ids) {
|
|
|
mui.toast('请选择要处理的信息');
|
|
|
return false;
|
|
|
} else {
|
|
@@ -238,6 +308,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList();
|
|
|
+ this.getBusinessOutApprovalPerson()
|
|
|
//监控下拉加载事件
|
|
|
var _this = this;
|
|
|
window.addEventListener('scroll', _this.handleScrool);
|
|
@@ -268,6 +339,8 @@
|
|
|
|
|
|
<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 scoped>
|
|
|
|
|
|
.mui-segmented-control {
|