|
@@ -1,8 +1,271 @@
|
|
|
<template>
|
|
|
+ <div>
|
|
|
+ <common @asynCallBack="asynCallBack"></common>
|
|
|
+ <top-header :pageTitle="pageTitle"></top-header>
|
|
|
+
|
|
|
+ <div class="mui-content vongi-wordcard-sp">
|
|
|
+ <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 class="mui-scroll">
|
|
|
+ <a @click="reloadList(0)" :class="'mui-control-item '+(listForm.status==0?'mui-active':'')">
|
|
|
+ <span class="fyy-badge">待处理<span class="mui-badge" v-if="firstRecordsTotal" v-text="firstRecordsTotal"></span></span>
|
|
|
+ </a>
|
|
|
+ <a @click="reloadList(3)" :class="'mui-control-item '+(listForm.status==3?'mui-active':'')">
|
|
|
+ 已处理
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mui-slider-group">
|
|
|
+
|
|
|
+ <div v-show="listForm.status==0" class="mui-slider-item mui-control-content">
|
|
|
+ <div class="mui-scroll-wrapper vongi-over-hei">
|
|
|
+ <div class="mui-scroll">
|
|
|
+ <form class="mui-input-group fyy-checkbox">
|
|
|
+ <div v-for="(item,index) in recordList" :key="item.id" class="mui-input-row mui-checkbox mui-left">
|
|
|
+ <router-link :to="{name:'MasterCompanyRegisterInfo',query:{id:item.id}}" class="mui-navigate-right">
|
|
|
+ <div class="mui-media-object mui-pull-left"><img :src="item.faceImageUrl"></div>
|
|
|
+ <div class="mui-media-body">
|
|
|
+ {{item.name}}
|
|
|
+ </div>
|
|
|
+ </router-link>
|
|
|
+ <input name="checkbox" v-model="selectIdList" :value="item.id" type="checkbox">
|
|
|
+ </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>
|
|
|
+
|
|
|
+ <div v-show="listForm.status==3" class="mui-slider-item mui-control-content">
|
|
|
+ <div class="mui-scroll-wrapper">
|
|
|
+ <div class="mui-scroll">
|
|
|
+ <ul class="mui-table-view mui-table-view-chevron">
|
|
|
+ <li v-for="(item,index) in recordList" :key="item.id" class="mui-table-view-cell mui-media">
|
|
|
+ <router-link :to="{name:'MasterAttendanceInfo',query:{id:item.id}}" class="mui-navigate-right">
|
|
|
+ <div class="mui-media-object mui-pull-left"><img :src="item.faceImageUrl"></div>
|
|
|
+ <div class="mui-media-body">
|
|
|
+ {{item.name}}
|
|
|
+ </div>
|
|
|
+ <button type="button" :class="'mui-btn mui-btn-success mui-btn-outlined '+(item.status>0?(item.status==1?'status_a':'status_r'):'')"
|
|
|
+ v-text="item.statusN"></button>
|
|
|
+ </router-link>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 审批弹窗 -->
|
|
|
+ <div v-show="openFromVisible" class="mui-backdrop mui-active"></div>
|
|
|
+ <div v-show="openFromVisible" class="mui-card fyy-popup">
|
|
|
+ <div class="mui-card-header mui-h3">审批意见</div>
|
|
|
+ <div class="mui-card-content">
|
|
|
+ <div class="mui-input-row">
|
|
|
+ <textarea v-model="subForm.content" rows="5" placeholder="请输入"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="vongi-btn">
|
|
|
+ <button class="mui-btn mui-btn-primary" @click="doAction">提交</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <loading :visible="isLoading"></loading>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as API_Company from '@/apis/Master/company'
|
|
|
+ import Common from '$project/components/Common.vue'
|
|
|
+ import Loading from '$project/components/Loading.vue'
|
|
|
+ import TopHeader from '$project/components/TopHeader.vue'
|
|
|
+ import isReachBottom from '$project/utils/isReachBottom'
|
|
|
+ import {
|
|
|
+ mapGetters,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex'
|
|
|
+ export default {
|
|
|
+ name: 'MasterCompanyRegisterExamine',
|
|
|
+ components: {
|
|
|
+ Common,
|
|
|
+ Loading,
|
|
|
+ TopHeader
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageTitle: '用户审核',
|
|
|
+
|
|
|
+ isLoading: false,
|
|
|
+
|
|
|
+ listForm: {
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ totalPage: 1,
|
|
|
+ status: 0,
|
|
|
+ },
|
|
|
+ recordList: [],
|
|
|
+ selectIdList: [],
|
|
|
+ allSelect: [],
|
|
|
+ subForm: {
|
|
|
+ ids: '',
|
|
|
+ content: '',
|
|
|
+ status: ''
|
|
|
+ },
|
|
|
+ //审批内容弹窗显示
|
|
|
+ openFromVisible: false,
|
|
|
+ firstRecordsTotal: 0,
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //获取列表
|
|
|
+ getList() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Company.getApplyList(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;
|
|
|
+ } else {
|
|
|
+ this.recordList = [
|
|
|
+ ...this.recordList,
|
|
|
+ ...response.data
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.listForm.status == 0) {
|
|
|
+ this.firstRecordsTotal = response.recordsTotal;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.listForm.pageIndex++;
|
|
|
+ this.isLoading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //下拉事件
|
|
|
+ handleScrool() {
|
|
|
+ if (isReachBottom()) {
|
|
|
+ console.log('到达底部')
|
|
|
+ if (this.listForm.pageIndex <= this.listForm.totalPage && this.isLoading == false) {
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //切换
|
|
|
+ reloadList(status) {
|
|
|
+ this.listForm.status = status;
|
|
|
+ this.listForm.pageIndex = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ //选择所有
|
|
|
+ selectAll() {
|
|
|
+ if (this.allSelect.length) {
|
|
|
+ this.selectIdList = [];
|
|
|
+ } else {
|
|
|
+ var selectIdList = [];
|
|
|
+ this.recordList.forEach(function(item, index) {
|
|
|
+ selectIdList.push(item.id);
|
|
|
+ })
|
|
|
+ this.selectIdList = selectIdList;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //显示内容表单
|
|
|
+ openFrom(status) {
|
|
|
+ if (!this.selectIdList.length) {
|
|
|
+ mui.toast('请选择要处理的信息');
|
|
|
+ } else {
|
|
|
+ this.subForm.status = status;
|
|
|
+ this.subForm.content = status == 1 ? '同意' : '拒绝';
|
|
|
+ this.openFromVisible = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //检测表单
|
|
|
+ checkForm() {
|
|
|
+ if (!this.subForm.ids) {
|
|
|
+ mui.toast('请选择要处理的信息');
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //同意拒绝
|
|
|
+ doAction() {
|
|
|
+ this.subForm.ids = this.selectIdList.join(',');
|
|
|
+ if (this.checkForm()) {
|
|
|
+ var btnArray = ['否', '是'];
|
|
|
+ var _this = this;
|
|
|
+ mui.confirm('确认当操作?', '提示', btnArray, function(e) {
|
|
|
+ if (e.index == 1) {
|
|
|
+ _this.isLoading = true;
|
|
|
+ API_Company.doApply(_this.subForm).then(response => {
|
|
|
+ _this.isLoading = false;
|
|
|
+
|
|
|
+ _this.openFromVisible = false;
|
|
|
+ _this.listForm.pageIndex = 1;
|
|
|
+ _this.getList();
|
|
|
+ }).catch(error => {
|
|
|
+ _this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ asynCallBack() {
|
|
|
+
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ //监控下拉加载事件
|
|
|
+ var _this = this;
|
|
|
+ window.addEventListener('scroll', _this.handleScrool);
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ //销毁监听事件
|
|
|
+ var _this = this;
|
|
|
+ window.removeEventListener('scroll', _this.handleScrool);
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ openId: 'wx_openid',
|
|
|
+ token: 'token',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|
|
|
+<style src="$project/assets/css/iconfont.css"></style>
|
|
|
+<style scoped>
|
|
|
+ .status_r {
|
|
|
+ color: #fe616c !important;
|
|
|
+ border: 1px solid #fe616c !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .status_a {
|
|
|
+ color: #05c8af !important;
|
|
|
+ border: 1px solid #05c8af !important;
|
|
|
+ }
|
|
|
</style>
|