init
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[5,10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
@@ -0,0 +1,553 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="${lang,escape}">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
|
||||
<meta name="description" content="${AppName!}">
|
||||
<title>${AppName!}</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/myframe/css/myframe.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/themify-icons.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/common.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/elmain.css?v=1.0.0">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/panel.css">
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wangeditor/wangEditor.css">
|
||||
<link rel="stylesheet" type="text/css" href="${base!}/assets/platform/plugins/viewer/viewer.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/css/wpupload.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/vivify.min.css">
|
||||
<link href="${base!}/assets/platform/plugins/vue-cron/vcrontab.css" rel="stylesheet"/>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue-cron/vcrontab.umd.min.js"></script>
|
||||
<!-- import Vue before Element -->
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
|
||||
<!-- vue-count-to -->
|
||||
<script src="${base!}/assets/platform/plugins/vue-count-to/vue-count-to.min.js"></script>
|
||||
|
||||
<!-- wpupload -->
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/wpupload.js"></script>
|
||||
|
||||
<!-- import JavaScript -->
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/i18n/${lang,escape}.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/slimscroll/jquery.slimscroll.min.js"></script>
|
||||
|
||||
<!--后面就改这一段吧-->
|
||||
<script src="${base!}/assets/platform/plugins/dd3s/dd3s.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
|
||||
<!--g2-->
|
||||
<script src="/assets/platform/plugins/g2/g2.min.js?v=4.1.9"></script>
|
||||
<script src="/assets/platform/plugins/g2/data-set.js"></script>
|
||||
<script src="/assets/platform/plugins/g2/g2plot.js?v=1.0.0"></script>
|
||||
|
||||
<!--echars-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/echarts.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/echarts/infographic.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/westeros.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/walden.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/macarons.js"></script><!--主题-->
|
||||
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>-->
|
||||
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>-->
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/module/mixins/initTableMixins.js?v=1.0.3"></script>
|
||||
<script src="${base!}/assets/platform/module/mixins/styleMixin.js"></script>
|
||||
<script src="${base!}/assets/platform/js/includeModel.js?v=1.0.5"></script>
|
||||
<script src="${base!}/assets/platform/js/component.js?v=1.0.2"></script>
|
||||
<script src="${base!}/assets/platform/js/v.js?v=1.0.5"></script>
|
||||
<script src="${base!}/assets/platform/plugins/wangeditor/wangEditor.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/wangeditor@4.6.15/dist/wangEditor.min.js"></script>-->
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=1.4.15&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.PlaceSearch"></script>
|
||||
|
||||
<!--viewer-->
|
||||
<script src="${base!}/assets/platform/plugins/viewer/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/viewer/jquery-viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-qrcode/vue-qrcode.min.js"></script>
|
||||
|
||||
|
||||
<!-- pjax是异步加载html片段的工具,模拟前端路由机制 -->
|
||||
<script src="${base!}/assets/platform/plugins/pjax/jquery.pjax.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/myframe/js/myframe.js"></script>
|
||||
<!-- Array数组增加findIndex等方法,TreeTable用得到,兼容IE8 -->
|
||||
<script src="${base!}/assets/platform/plugins/polyfill/polyfill.js"></script>
|
||||
<!-- 时间日期处理工具类 -->
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<!-- 浏览器通知 -->
|
||||
<script src="${base!}/assets/platform/plugins/push/push.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/main.js?v=1.0.0"></script>
|
||||
<script src="${base!}/assets/platform/js/offscreen.js"></script>
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@4.0.2"></script>-->
|
||||
<script src="${base!}/assets/platform/plugins/vue-charts/echartTheme.js"></script>
|
||||
|
||||
<!--拖拽js-->
|
||||
<script src="${base!}/assets/platform/js/directive/v-sticky.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jquery.qrcode.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<!--字典混入-->
|
||||
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/chengSh.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/xlsx/xlsx.full.min.js"></script>
|
||||
|
||||
<!-- <script src="${base!}/assets/platform/js/chengSh.js"></script>-->
|
||||
|
||||
<script type="text/javascript">
|
||||
const base = "${base!}";
|
||||
const APP_DOMAIN = "${AppDomain!}";
|
||||
const FILE_DOMAIN = "${AppFileDomain!}";
|
||||
const AppMapCenterPointX = "${config.AppMapCenterPointX!}";
|
||||
const AppMapCenterPointY = "${config.AppMapCenterPointY!}";
|
||||
const isDisPlayCode = "${config.isDisPlayCode!}" === 'true'
|
||||
const LOGO_URL = "${config.logoUrl!}"
|
||||
|
||||
window.sessionStorage.setItem("user", JSON.stringify(${json(@shiro.getPrincipal())}))
|
||||
|
||||
ELEMENT.locale(ELEMENT.lang['${lang,escape}']);
|
||||
|
||||
Vue.component('vuedraggable', window.vuedraggable)
|
||||
Vue.component('guava', httpVueLoader('/components/plugins/Guava.vue'))
|
||||
Vue.component('sign', httpVueLoader('/components/sign/sign.vue?v=' + new Date().getTime()))
|
||||
Vue.component('file-upload', httpVueLoader('/components/plugins/FileUpload.vue?v=1.0.9'))
|
||||
Vue.component('image-upload', httpVueLoader('/components/plugins/ImageUpload.vue'))
|
||||
Vue.component('dict-tag', httpVueLoader('/components/plugins/sysDict/DictTag.vue'))
|
||||
Vue.component('border-table', httpVueLoader('/components/plugins/BorderTable.vue'))
|
||||
Vue.component('text-editor', httpVueLoader('/components/plugins/TextEditor.vue?v=' + new Date().getTime()))
|
||||
Vue.component('el-tab-plus', httpVueLoader('/components/plugins/ELTabPlus.vue'))
|
||||
Vue.component('dict-select', httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.1'))
|
||||
Vue.component('enum-select', httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'))
|
||||
Vue.component('custom-message', httpVueLoader('/components/plugins/CustomMessage.vue'))
|
||||
|
||||
Vue.use(httpVueLoader)
|
||||
Vue.component(VueQrcode.name, VueQrcode)
|
||||
|
||||
const viewImage = function (filepath) {
|
||||
let image = new Image();
|
||||
image.src = APP_DOMAIN + FILE_STREAM_PREVIEW_ADDRESS + '?id=' + filepath;
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
};
|
||||
window.viewImage = viewImage;
|
||||
Vue.prototype.$viewImage = viewImage
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="gallery-loader" style="background-color:transparent;">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<div id="mainApp" class="app">
|
||||
<header class="header header-fixed navbar" id="headerNavbar">
|
||||
<div class="brand">
|
||||
<a href="javascript:;" data-pjax class="navbar-brand" @click="goHome">
|
||||
<div :style="{'background-image':'url('+LOGO_URL+')'}"
|
||||
style=" width: 250px;
|
||||
height: 80%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: contain;"></div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-nav" id="moduleCenter">
|
||||
<li style="padding:0 10px" class="vivify popIn duration-1500">
|
||||
<el-popover
|
||||
width="450"
|
||||
popper-class="appCenterPopover"
|
||||
placement="top-start"
|
||||
v-model="menuPopover"
|
||||
trigger="visible">
|
||||
<el-card shadow="never" class="appCenterCard">
|
||||
<template #header>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<div>
|
||||
<el-link :underline="false">应用中心</el-link>
|
||||
<a href="/platform/sys/entranceModule" data-pjax>
|
||||
<i class="el-icon-edit" style="cursor: pointer;color: #1867b0"
|
||||
v-if="${@shiro.hasRole('sysadmin')}"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-link @click="goHome" type="primary" :underline="false">工作台</el-link>
|
||||
<!-- <el-link @click="setUserDefaultEntranceModuleId" type="primary" :underline="false">-->
|
||||
<!-- 设置为默认模块-->
|
||||
<!-- </el-link>-->
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-row :gutter="20" v-if="moduleMenus && moduleMenus.length>0">
|
||||
<el-col v-for="item in moduleMenus" :key="item.id" :span="8" style="margin-bottom: 5px">
|
||||
<div class="entranceDetail"
|
||||
@click="enterEntranceModules(item)">
|
||||
<div class="entranceIcon">
|
||||
<el-image :src="CREATE_PREVIEW_URL(item.icon[0].id)"
|
||||
style="height: 50px;width: 50px;border-radius: 50%"></el-image>
|
||||
</div>
|
||||
<a href="javascript:;">{{item.moduleName}}</a>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" size="mini" @click="menuPopover=!menuPopover">关闭</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<a href="javascript:" slot="reference" @click="toggleMenuPopover">
|
||||
<i class="fa fa-th-large" aria-hidden="true"></i>
|
||||
{{selectEntranceModule ? selectEntranceModule.moduleName : '应用中心'}}
|
||||
</a>
|
||||
</el-popover>
|
||||
</li>
|
||||
|
||||
<li style="cursor: pointer" @click="menuPopover=true">
|
||||
<i class="el-icon-sort"></i>
|
||||
切换应用
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- <el-breadcrumb separator-class="el-icon-arrow-right" style="line-height: 50px">-->
|
||||
<!-- <el-breadcrumb-item>-->
|
||||
<!-- <a href="/platform/home" data-pjax>首页</a>-->
|
||||
<!-- </el-breadcrumb-item>-->
|
||||
<!-- <el-breadcrumb-item v-for="item in breadcrumbMenus" :key="item.id">-->
|
||||
<!-- <a v-if="item.href" data-pjax :href="item.href">-->
|
||||
<!-- {{item.name}}-->
|
||||
<!-- </a>-->
|
||||
<!-- <span v-else>-->
|
||||
<!-- {{item.name}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </el-breadcrumb-item>-->
|
||||
<!-- </el-breadcrumb>-->
|
||||
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="off-right">
|
||||
<a href="/platform/sys/msg/user/unread" data-pjax>
|
||||
<el-badge :value="unReadMsgNum" class="item">
|
||||
<i class="el-icon-chat-dot-round" style="font-size: 20px"></i>
|
||||
</el-badge>
|
||||
</a>
|
||||
</li>
|
||||
<li class="off-right">
|
||||
<a href="javascript:;" data-toggle="dropdown">
|
||||
<span class="hidden-xs ml10" @click="clearCache">清除缓存</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="off-right">
|
||||
<a href="javascript:;" data-toggle="dropdown">
|
||||
<span class="hidden-xs ml10">
|
||||
${@shiro.getPrincipalProperty('username')}
|
||||
(${@shiro.getPrincipalProperty('loginname')})
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="off-right">
|
||||
<a href="${base!}/platform/login/logout">
|
||||
<i class="ti-power-off"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
<section class="layout" style="display: flex;">
|
||||
<!-- sidebar menu -->
|
||||
<div id="asideMenu" class="sidebar">
|
||||
<el-menu
|
||||
@select="menuSelect"
|
||||
unique-opened
|
||||
:default-active="activeMenuIndex"
|
||||
:default-openeds="openedMenus"
|
||||
background-color="#001529"
|
||||
text-color="#fff"
|
||||
active-text-color="#ffd04b">
|
||||
<template v-for="firstMenu in leftMenus">
|
||||
<el-submenu :index="firstMenu.id" v-if="firstMenu.children.length>0">
|
||||
<template slot="title">
|
||||
<i :class="firstMenu.icon ? firstMenu.icon : 'el-icon-location'"></i>
|
||||
<span>{{firstMenu.name}}</span>
|
||||
</template>
|
||||
|
||||
<template v-for="secondMenu in firstMenu.children">
|
||||
<el-submenu :index="secondMenu.id" v-if="secondMenu.children.length>0">
|
||||
<template slot="title">
|
||||
<i :class="secondMenu.icon ? secondMenu.icon : 'el-icon-location'"></i>
|
||||
<span>{{secondMenu.name}}</span>
|
||||
</template>
|
||||
|
||||
<template v-for="thirdMenu in secondMenu.children">
|
||||
<el-submenu :index="thirdMenu.id" v-if="thirdMenu.children.length>0">
|
||||
<template slot="title">
|
||||
<i :class="thirdMenu.icon ? thirdMenu.icon : 'el-icon-location'"></i>
|
||||
<span>{{thirdMenu.name}}</span>
|
||||
</template>
|
||||
</el-submenu>
|
||||
|
||||
<a :href="thirdMenu.href" data-pjax v-else>
|
||||
<el-menu-item :index="thirdMenu.id">
|
||||
<i :class="thirdMenu.icon ? thirdMenu.icon : 'el-icon-location'"></i>
|
||||
<span slot="title">{{thirdMenu.name}}</span>
|
||||
</el-menu-item>
|
||||
</a>
|
||||
</template>
|
||||
</el-submenu>
|
||||
|
||||
<a :href="secondMenu.href" data-pjax v-else>
|
||||
<el-menu-item :index="secondMenu.id">
|
||||
|
||||
<i class="el-icon-menu"></i>
|
||||
<span slot="title">{{secondMenu.name}}</span>
|
||||
</el-menu-item>
|
||||
</a>
|
||||
</template>
|
||||
</el-submenu>
|
||||
|
||||
<a :href="firstMenu.href" data-pjax v-else>
|
||||
<el-menu-item :index="firstMenu.id">
|
||||
|
||||
<i class="el-icon-menu"></i>
|
||||
<span slot="title">{{firstMenu.name}}</span>
|
||||
</el-menu-item>
|
||||
</a>
|
||||
</template>
|
||||
</el-menu>
|
||||
</div>
|
||||
|
||||
<!-- main content -->
|
||||
<section class="main-content" id="container">
|
||||
${layoutContent}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.sessionStorage.setItem('moduleMenus', JSON.stringify(${@shiro.userModuleMenus()}))
|
||||
|
||||
const leftMenuApp = new Vue({
|
||||
el: '#asideMenu',
|
||||
data() {
|
||||
return {
|
||||
moduleMenus: JSON.parse(window.sessionStorage.getItem('moduleMenus')),
|
||||
leftMenus: [],
|
||||
activeMenuIndex: '',
|
||||
openedMenus: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadMenu(moduleId) {
|
||||
this.leftMenus = this.moduleMenus.find(v => v.id === moduleId)?.menus
|
||||
},
|
||||
|
||||
menuSelect(index, indexPath) {
|
||||
this.activeMenuIndex = index
|
||||
this.openedMenus = indexPath
|
||||
window.sessionStorage.setItem('menuIndex', index)
|
||||
window.sessionStorage.setItem('menuIndexPath', JSON.stringify(indexPath))
|
||||
},
|
||||
|
||||
openFirstMenu() {
|
||||
if (window.location.pathname === '/platform/home') {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
const aTag = document.querySelector('#leftMenu li a')
|
||||
if (aTag) {
|
||||
aTag.click()
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
const pathname = window.location.pathname
|
||||
const a_selector = "#leftMenu li a[href='" + pathname + "']"
|
||||
const getCurrentMenu = () => {
|
||||
const a = document.querySelector(a_selector)
|
||||
if (a) {
|
||||
$(a).attr('style', 'color: #1867b0')
|
||||
$(a).parent().parents("li").addClass("open")
|
||||
$(a).parent().parents('ul.sub-menu').attr('style', 'display:block')
|
||||
$(a).find("i").addClass("fa-dot-circle-o")
|
||||
clearInterval(getCurrentMenuInterval)
|
||||
}
|
||||
}
|
||||
const getCurrentMenuInterval = setInterval(getCurrentMenu, 100)
|
||||
}
|
||||
},
|
||||
|
||||
goHome() {
|
||||
|
||||
},
|
||||
assignmentMenu() {
|
||||
const menuIndexPath = window.sessionStorage.getItem('menuIndexPath')
|
||||
if (menuIndexPath) {
|
||||
this.openedMenus = JSON.parse(menuIndexPath)
|
||||
} else {
|
||||
this.openedMenus = []
|
||||
}
|
||||
const menuIndex = window.sessionStorage.getItem('menuIndex')
|
||||
if (menuIndex) {
|
||||
this.activeMenuIndex = menuIndex
|
||||
} else {
|
||||
this.activeMenuIndex = ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// async getUserDefaultEntranceModuleId() {
|
||||
// const resp = await $.get('/platform/sys/entranceModule/getUserDefaultEntranceModuleId')
|
||||
// if (resp.code === 0) {
|
||||
// this.userDefaultModuleId = resp.data
|
||||
// }
|
||||
// },
|
||||
// async setUserDefaultEntranceModuleId() {
|
||||
// const {id: moduleId, moduleName} = this.selectEntranceModule
|
||||
// const msg = '您确定要将' + moduleName + '设置为默认模块吗?'
|
||||
// const confirm = await this.$confirm(msg, '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// if ('confirm' !== confirm) return
|
||||
// const resp = await $.get('/platform/sys/entranceModule/setUserDefaultEntranceModuleId', {moduleId})
|
||||
// if (resp.code === 0) {
|
||||
// this.$notify.success(resp.msg)
|
||||
// } else {
|
||||
// this.$notify.warning(resp.msg)
|
||||
// }
|
||||
// },
|
||||
},
|
||||
created() {
|
||||
this.assignmentMenu()
|
||||
}
|
||||
})
|
||||
|
||||
const headerApp = new Vue({
|
||||
el: '#headerNavbar',
|
||||
data() {
|
||||
return {
|
||||
moduleMenus: JSON.parse(window.sessionStorage.getItem('moduleMenus')),
|
||||
menuPopover: false,
|
||||
selectEntranceModule: {},
|
||||
breadcrumbMenus: [],
|
||||
unReadMsgNum: 0,
|
||||
appModuleId: "",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUnReadMsgNum() {
|
||||
console.log('-----------------------')
|
||||
$.get('/platform/sys/msg/user/unread_num').then(res => {
|
||||
if (res.code === 0) {
|
||||
const totalSum = Object.values(res.data).reduce(function (sum, value) {
|
||||
return sum + value;
|
||||
}, 0);
|
||||
this.unReadMsgNum = totalSum
|
||||
if (totalSum > 0) {
|
||||
this.$notify.info({
|
||||
title: '消息',
|
||||
message: '您有' + totalSum + '条未读消息,点击查看。',
|
||||
onClick: () => {
|
||||
sublime.jumpPagePjax('/platform/sys/msg/user/unread')
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toggleMenuPopover() {
|
||||
setTimeout(() => {
|
||||
this.menuPopover = !this.menuPopover
|
||||
}, 300)
|
||||
},
|
||||
goSetAppCenter() {
|
||||
|
||||
},
|
||||
goHome() {
|
||||
$.pjax({
|
||||
url: '/platform/home',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
},
|
||||
setUserDefaultEntranceModuleId() {
|
||||
|
||||
},
|
||||
enterEntranceModules(item) {
|
||||
this.selectEntranceModule = item
|
||||
this.menuPopover = false
|
||||
leftMenuApp.loadMenu(item.id)
|
||||
},
|
||||
clearCache() {
|
||||
this.$confirm('您确定要清除缓存吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await $.post('/platform/home/clearCache')
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
location.reload()
|
||||
} else {
|
||||
this.$message.warning(msg)
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
findParentNodes(data, targetHref, parents = []) {
|
||||
for (const node of data) {
|
||||
if (node && node.href === targetHref) {
|
||||
return parents.concat(node);
|
||||
}
|
||||
if (node && node.children) {
|
||||
const found = this.findParentNodes(node.children, targetHref, parents.concat(node));
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
matchMenu(path = window.location.pathname) {
|
||||
const parentNodes = this.findParentNodes(JSON.parse(window.sessionStorage.getItem('moduleMenus')).flatMap(v => v.menus), path)
|
||||
if (parentNodes) {
|
||||
const menuIndexPath = parentNodes.map(v => v.id)
|
||||
const menuIndex = menuIndexPath[menuIndexPath.length - 1]
|
||||
const menuParentIndex = menuIndexPath[0]
|
||||
const module = JSON.parse(window.sessionStorage.getItem('moduleMenus')).find(v => v.containsMenu.includes(menuParentIndex))
|
||||
this.enterEntranceModules(module)
|
||||
this.appModuleId = module.id
|
||||
window.sessionStorage.setItem('menuIndex', menuIndex)
|
||||
window.sessionStorage.setItem('menuIndexPath', JSON.stringify(menuIndexPath))
|
||||
leftMenuApp.assignmentMenu()
|
||||
} else {
|
||||
this.appModuleId = JSON.parse(window.sessionStorage.getItem('moduleMenus'))[0].id
|
||||
this.enterEntranceModules(JSON.parse(window.sessionStorage.getItem('moduleMenus'))[0])
|
||||
window.sessionStorage.removeItem('menuIndex')
|
||||
window.sessionStorage.removeItem('menuIndexPath')
|
||||
leftMenuApp.assignmentMenu()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.matchMenu()
|
||||
this.getUnReadMsgNum()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,531 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="${lang,escape}">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
|
||||
<meta name="description" content="${AppName!}">
|
||||
<title>${AppName!}</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/myframe/css/myframe.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/themify-icons.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/fonts/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/common.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/elmain.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/panel.css">
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wangeditor/wangEditor.css">
|
||||
<link rel="stylesheet" type="text/css" href="${base!}/assets/platform/plugins/viewer/viewer.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/css/wpupload.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/vivify.min.css">
|
||||
<link href="${base!}/assets/platform/plugins/vue-cron/vcrontab.css" rel="stylesheet"/>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue-cron/vcrontab.umd.min.js"></script>
|
||||
<!-- import Vue before Element -->
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<!-- <script src="https://cdn.staticfile.org/vue/2.6.0/vue.js"></script>-->
|
||||
|
||||
<!-- vue-count-to -->
|
||||
<script src="${base!}/assets/platform/plugins/vue-count-to/vue-count-to.min.js"></script>
|
||||
|
||||
<!-- wpupload -->
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/wpupload.js"></script>
|
||||
|
||||
<!-- import JavaScript -->
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/i18n/${lang,escape}.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/slimscroll/jquery.slimscroll.min.js"></script>
|
||||
|
||||
<!--后面就改这一段吧-->
|
||||
<script src="${base!}/assets/platform/plugins/dd3s/dd3s.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
|
||||
<!--g2-->
|
||||
<script src="/assets/platform/plugins/g2/g2.min.js?v=4.1.9"></script>
|
||||
<script src="/assets/platform/plugins/g2/data-set.js"></script>
|
||||
<script src="/assets/platform/plugins/g2/g2plot.js?v=1.0.0"></script>
|
||||
|
||||
<!--echars-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/echarts.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/echarts/infographic.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/westeros.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/walden.js"></script><!--主题-->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/macarons.js"></script><!--主题-->
|
||||
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>-->
|
||||
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>-->
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/module/mixins/initTableMixins.js?v=1.0.3"></script>
|
||||
<script src="${base!}/assets/platform/js/includeModel.js?v=1.0.5"></script>
|
||||
<script src="${base!}/assets/platform/js/component.js?v=1.0.2"></script>
|
||||
<script src="${base!}/assets/platform/js/v.js?v=1.0.5"></script>
|
||||
<script src="${base!}/assets/platform/plugins/wangeditor/wangEditor.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/wangeditor@4.6.15/dist/wangEditor.min.js"></script>-->
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=1.4.15&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.PlaceSearch"></script>
|
||||
|
||||
<!--viewer-->
|
||||
<script src="${base!}/assets/platform/plugins/viewer/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/viewer/jquery-viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-qrcode/vue-qrcode.min.js"></script>
|
||||
|
||||
|
||||
<!-- pjax是异步加载html片段的工具,模拟前端路由机制 -->
|
||||
<script src="${base!}/assets/platform/plugins/pjax/jquery.pjax.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/myframe/js/myframe.js"></script>
|
||||
<!-- Array数组增加findIndex等方法,TreeTable用得到,兼容IE8 -->
|
||||
<script src="${base!}/assets/platform/plugins/polyfill/polyfill.js"></script>
|
||||
<!-- 时间日期处理工具类 -->
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<!-- 浏览器通知 -->
|
||||
<script src="${base!}/assets/platform/plugins/push/push.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/main.js?v=1.0.0"></script>
|
||||
<script src="${base!}/assets/platform/js/offscreen.js"></script>
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@4.0.2"></script>-->
|
||||
<script src="${base!}/assets/platform/plugins/vue-charts/echartTheme.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/skins/palette.3.css" id="skin">
|
||||
|
||||
<!--拖拽js-->
|
||||
<script src="${base!}/assets/platform/js/directive/v-sticky.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jquery.qrcode.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<!--字典混入-->
|
||||
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
const base = "${base!}";
|
||||
const APP_DOMAIN = "${AppDomain!}";
|
||||
const FILE_DOMAIN = "${AppFileDomain!}";
|
||||
const AppMapCenterPointX = "${config.AppMapCenterPointX!}";
|
||||
const AppMapCenterPointY = "${config.AppMapCenterPointY!}";
|
||||
const isDisPlayCode = "${config.isDisPlayCode!}" === 'true'
|
||||
var loginPjax = "${@shiro.getPrincipalProperty('loginPjax')}";
|
||||
const LOGO_URL = "${config.logoUrl!}"
|
||||
|
||||
ELEMENT.locale(ELEMENT.lang['${lang,escape}']);
|
||||
|
||||
Vue.component('vuedraggable', window.vuedraggable)
|
||||
Vue.component('guava', httpVueLoader('/components/plugins/Guava.vue'))
|
||||
Vue.component('sign', httpVueLoader('/components/sign/sign.vue?v=2.0.0'))
|
||||
Vue.component('file-upload', httpVueLoader('/components/plugins/FileUpload.vue'))
|
||||
Vue.component('image-upload', httpVueLoader('/components/plugins/ImageUpload.vue'))
|
||||
Vue.component('dict-tag', httpVueLoader('/components/plugins/sysDict/DictTag.vue'))
|
||||
Vue.component('border-table', httpVueLoader('/components/plugins/BorderTable.vue'))
|
||||
|
||||
Vue.use(httpVueLoader)
|
||||
Vue.component(VueQrcode.name, VueQrcode)
|
||||
|
||||
const viewImage = function (filepath) {
|
||||
let image = new Image();
|
||||
image.src = APP_DOMAIN + FILE_STREAM_PREVIEW_ADDRESS + '?id=' + filepath;
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
};
|
||||
window.viewImage = viewImage;
|
||||
Vue.prototype.$viewImage = viewImage
|
||||
|
||||
//防止用户快速重复点击造成数据混乱 提供vue指令和js节流函数两种方式
|
||||
//控制此元素在一定时间内是否可成为鼠标的点击目标对象
|
||||
Vue.directive('throttle', {
|
||||
inserted(el, binding) {
|
||||
el.addEventListener('click', () => {
|
||||
if (el.style.pointerEvents !== 'none') {
|
||||
el.style.pointerEvents = 'none'
|
||||
window.setTimeout(() => {
|
||||
el.style.pointerEvents = ''
|
||||
}, 1200)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//提案初始化的值
|
||||
proposal.getProposalAllStateCode()
|
||||
proposal.getProposalEnableStateCode()
|
||||
proposal.getProposalNeedSignStateCode()
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="gallery-loader" style="background-color:transparent;">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
<div id="mainApp" class="app">
|
||||
<header class="header header-fixed navbar" id="headerNavbar">
|
||||
<div class="brand">
|
||||
<a href="javascript:;" data-pjax class="navbar-brand" @click="goHome">
|
||||
<img src="${base!}/assets/platform/img/logo.png" alt=""
|
||||
style="width: 60%;height: 80%"
|
||||
class="o_img <!--#if(!@shiro.getPrincipalProperty('loginSidebar')){#-->o_hide<!--#}#-->">
|
||||
<span class="heading-font o_img <!--#if(@shiro.getPrincipalProperty('loginSidebar')){#-->o_hide<!--#}#-->">
|
||||
<!-- <img :src="LOGO_URL">-->
|
||||
<div :style="{'background-image':'url('+LOGO_URL+')'}"
|
||||
style=" width: 90%;
|
||||
height: 80%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: contain;"></div>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
<li style="padding:0 10px" class="vivify popIn duration-1500">
|
||||
<el-popover
|
||||
width="450"
|
||||
popper-class="appCenterPopover"
|
||||
placement="top-start"
|
||||
v-model="menuPopover"
|
||||
trigger="hover">
|
||||
<el-card shadow="never" class="appCenterCard">
|
||||
<template #header>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<div>
|
||||
<el-link :underline="false">应用中心</el-link>
|
||||
<i class="el-icon-edit" style="cursor: pointer;color: #1867b0"
|
||||
v-if="${@shiro.hasRole('sysadmin')}"
|
||||
@click="goSetAppCenter"></i>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-link @click="goHome" type="primary" :underline="false">工作台</el-link>
|
||||
<el-link @click="setUserDefaultEntranceModuleId" type="primary" :underline="false">
|
||||
设置为默认模块
|
||||
</el-link>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-row gutter="20">
|
||||
<el-col v-for="item in entranceModules" :span="8" style="margin-bottom: 5px">
|
||||
<div class="entranceDetail"
|
||||
:class="item.id==selectEntranceModule.id?'entranceDetail-selected':''"
|
||||
@click="enterEntranceModules(item)">
|
||||
<div class="entranceIcon">
|
||||
<el-image :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.icon[0].id"
|
||||
style="height: 50px;width: 50px;border-radius: 50%"></el-image>
|
||||
</div>
|
||||
{{item.moduleName}}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" size="mini" @click="menuPopover=!menuPopover">关闭</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<a href="javascript:" slot="reference" style="color: #FFFFFF;" @click="toggleMenuPopover">
|
||||
<i class="fa fa-th-large" aria-hidden="true"></i>
|
||||
{{selectEntranceModule ? selectEntranceModule.moduleName : '应用中心'}}
|
||||
</a>
|
||||
</el-popover>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="off-right">
|
||||
<a href="javascript:;" data-toggle="dropdown">
|
||||
<span class="hidden-xs ml10">${@shiro.getPrincipalProperty('username')}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="off-right">
|
||||
<a href="${base!}/platform/login/logout">
|
||||
<i class="ti-power-off"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
<section class="layout">
|
||||
<!-- sidebar menu -->
|
||||
<aside class="sidebar offscreen-left" id="asideMenu">
|
||||
<!-- main navigation -->
|
||||
<nav class="main-navigation" data-height="auto" data-size="6px" data-distance="0" data-rail-visible="true"
|
||||
data-wheel-step="10">
|
||||
|
||||
<ul id="leftMenu" class="nav leftMenu" style="display: initial;">
|
||||
<li v-for="fm in headerNavBarVueApp.firstMenus" :key="fm.id">
|
||||
|
||||
<a :href="fm.href && fm.href.startsWith('/')?fm.href:'javascript:;'">
|
||||
<i v-if="Object.keys(headerNavBarVueApp.secondMenus).includes(fm.path)"
|
||||
class="toggle-accordion"></i>
|
||||
<i :class="fm.icon?fm.icon:'ti-map'"></i>
|
||||
<span v-text="fm.name">
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
||||
<ul class="sub-menu"
|
||||
v-if="Object.keys(headerNavBarVueApp.secondMenus).includes(fm.path)">
|
||||
<li v-for="sm in headerNavBarVueApp.secondMenus[fm.path]" :key="sm.id">
|
||||
<a :href="sm.href && sm.href.startsWith('/')?sm.href:'javascript:;'">
|
||||
<span>
|
||||
<i class="toggle-accordion" v-if="headerNavBarVueApp.secondMenus[sm.path]"></i>
|
||||
<i v-if="headerNavBarVueApp.secondMenus[sm.path]"
|
||||
:class="sm.icon ? 'leftMenu__twoIcon ' + sm.icon : 'leftMenu__twoIcon ti-map'"
|
||||
></i>
|
||||
<i v-else class="leftMenu__twoIcon fa fa-circle-o"></i>
|
||||
{{sm.name}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<ul class="sub-menu" v-if="headerNavBarVueApp.secondMenus[sm.path]">
|
||||
<li v-for="tm in headerNavBarVueApp.secondMenus[sm.path]" :key="tm.id">
|
||||
<a :href="tm.href && tm.href.startsWith('/')?tm.href:'javascript:;'">
|
||||
<span>
|
||||
<i class="leftMenu__twoIcon fa fa-circle-o"></i>
|
||||
{{tm.name}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</aside>
|
||||
<!-- main content -->
|
||||
<section class="main-content" id="container">
|
||||
${layoutContent}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const headerNavBarVueApp = new Vue({
|
||||
el: '#headerNavbar',
|
||||
data() {
|
||||
return {
|
||||
entranceModules: [],
|
||||
selectEntranceModule: null,
|
||||
leftMenus: [],
|
||||
firstMenus: [],
|
||||
secondMenus: {},
|
||||
userDefaultModuleId: null,
|
||||
menuPopover: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getEntranceModule() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getEntranceModule')
|
||||
if (resp.code === 0) {
|
||||
this.entranceModules = resp.data
|
||||
if (this.selectEntranceModule) {
|
||||
if (this.entranceModules.some(v => v.id === this.selectEntranceModule.id)) {
|
||||
this.selectEntranceModule = this.entranceModules.find(v => v.id === this.selectEntranceModule.id)
|
||||
this.openFirstMenu()
|
||||
return
|
||||
}
|
||||
}
|
||||
if (this.entranceModules) {
|
||||
if (this.userDefaultModuleId) {
|
||||
this.selectEntranceModule = this.entranceModules.find(v => v.id === this.userDefaultModuleId)
|
||||
} else {
|
||||
this.selectEntranceModule = this.entranceModules[0]
|
||||
}
|
||||
this.openFirstMenu()
|
||||
} else {
|
||||
this.goSetAppCenter()
|
||||
}
|
||||
}
|
||||
},
|
||||
openFirstMenu() {
|
||||
if (window.location.pathname === '/platform/home') {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
const aTag = document.querySelector('#leftMenu li a')
|
||||
if (aTag) {
|
||||
aTag.click()
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
const pathname = window.location.pathname
|
||||
const a_selector = "#leftMenu li a[href='" + pathname + "']"
|
||||
const getCurrentMenu = () => {
|
||||
const a = document.querySelector(a_selector)
|
||||
if (a) {
|
||||
$(a).attr('style', 'color: #1867b0')
|
||||
$(a).parent().parents("li").addClass("open")
|
||||
$(a).parent().parents('ul.sub-menu').attr('style', 'display:block')
|
||||
$(a).find("i").addClass("fa-dot-circle-o")
|
||||
clearInterval(getCurrentMenuInterval)
|
||||
}
|
||||
}
|
||||
const getCurrentMenuInterval = setInterval(getCurrentMenu, 100)
|
||||
}
|
||||
},
|
||||
async enterEntranceModules(item) {
|
||||
window.sessionStorage.setItem('selectEntranceModule', JSON.stringify(item))
|
||||
this.selectEntranceModule = item
|
||||
await this.getFirstMenus(item.id)
|
||||
this.goHome()
|
||||
this.openFirstMenu()
|
||||
this.menuPopover = false
|
||||
},
|
||||
async getSecondMenus() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getSecondMenus')
|
||||
if (resp.code === 0) {
|
||||
this.secondMenus = resp.data
|
||||
}
|
||||
},
|
||||
async getFirstMenus(entranceModuleId) {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getFirstMenus', {entranceModuleId})
|
||||
if (resp.code === 0) {
|
||||
this.firstMenus = resp.data
|
||||
this.setAttr()
|
||||
}
|
||||
},
|
||||
setAttr(afterFunc = () => {
|
||||
}) {
|
||||
this.$nextTick(() => {
|
||||
const aTags = document.querySelectorAll('.main-navigation a')
|
||||
aTags.forEach(v => {
|
||||
if (v.href === 'javascript:;') {
|
||||
v.removeAttribute("data-pjax")
|
||||
} else {
|
||||
v.setAttribute("data-pjax", "")
|
||||
}
|
||||
if (v.getAttribute('class') === 'active') {
|
||||
v.setAttribute('class', '')
|
||||
}
|
||||
})
|
||||
|
||||
const openLiTags = document.querySelectorAll('.main-navigation li.open')
|
||||
openLiTags.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
const childNodes = v.childNodes
|
||||
childNodes.forEach(c => {
|
||||
if (c.nodeType === 1 && c.tagName && c.tagName.toUpperCase() === 'UL'.toUpperCase() && c.className === 'sub-menu') {
|
||||
c.style.display = 'none'
|
||||
}
|
||||
})
|
||||
})
|
||||
afterFunc()
|
||||
})
|
||||
},
|
||||
goHome() {
|
||||
$.pjax({
|
||||
url: '/platform/home',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
this.setAttr()
|
||||
this.closeAllMenu()
|
||||
},
|
||||
goSetAppCenter() {
|
||||
$.pjax({
|
||||
url: '/platform/sys/entranceModule',
|
||||
container: '#container',
|
||||
fragment: '#container',
|
||||
timeout: 8000
|
||||
});
|
||||
this.setAttr()
|
||||
},
|
||||
closeAllMenu() {
|
||||
const subMenus = document.querySelectorAll('ul.sub-menu')
|
||||
subMenus.forEach(v => {
|
||||
v.style.display = 'none'
|
||||
})
|
||||
|
||||
const menus = document.querySelectorAll('.main-navigation li.open')
|
||||
menus.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
})
|
||||
|
||||
const aTags = document.querySelectorAll('.main-navigation a.active')
|
||||
aTags.forEach(v => {
|
||||
v.setAttribute('class', '')
|
||||
})
|
||||
},
|
||||
async getUserDefaultEntranceModuleId() {
|
||||
const resp = await $.get('/platform/sys/entranceModule/getUserDefaultEntranceModuleId')
|
||||
if (resp.code === 0) {
|
||||
this.userDefaultModuleId = resp.data
|
||||
}
|
||||
},
|
||||
async setUserDefaultEntranceModuleId() {
|
||||
const {id: moduleId, moduleName} = this.selectEntranceModule
|
||||
const msg = '您确定要将' + moduleName + '设置为默认模块吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ('confirm' !== confirm) return
|
||||
const resp = await $.get('/platform/sys/entranceModule/setUserDefaultEntranceModuleId', {moduleId})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg)
|
||||
} else {
|
||||
this.$notify.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
toggleMenuPopover() {
|
||||
setTimeout(() => {
|
||||
this.menuPopover = !this.menuPopover
|
||||
}, 300)
|
||||
},
|
||||
async init() {
|
||||
await this.getUserDefaultEntranceModuleId()
|
||||
const selectEntranceModuleStr = window.sessionStorage.getItem('selectEntranceModule')
|
||||
if (selectEntranceModuleStr) {
|
||||
this.selectEntranceModule = JSON.parse(selectEntranceModuleStr)
|
||||
}
|
||||
await this.getEntranceModule()
|
||||
if (this.selectEntranceModule) {
|
||||
await this.getFirstMenus(this.selectEntranceModule.id)
|
||||
} else {
|
||||
await this.getFirstMenus(this.userDefaultModuleId)
|
||||
}
|
||||
await this.getSecondMenus()
|
||||
this.setAttr()
|
||||
|
||||
// let pjax_url = window.sessionStorage.getItem('pjax_url')
|
||||
// pjax_url = pjax_url.replace(window.location.origin, '')
|
||||
// $.pjax({
|
||||
// url: pjax_url,
|
||||
// container: '#container',
|
||||
// fragment: '#container',
|
||||
// timeout: 8000
|
||||
// });
|
||||
// const a_selector = '#leftMenu li a[href="' + pjax_url + '"]'
|
||||
// const a = document.querySelector(a_selector)
|
||||
// setTimeout(() => {
|
||||
// $(a).parent().parents("li").addClass("open")
|
||||
// $(a).parent().parents('ul.sub-menu').attr('style', 'display:block')
|
||||
// }, 100)
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.init()
|
||||
const menus = ${@shiro.userModuleMenus()}
|
||||
console.log(menus)
|
||||
}
|
||||
})
|
||||
|
||||
new Vue({
|
||||
el: '#asideMenu',
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,396 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.search-fixed {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card .van-cell__value {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" @click-left="pjaxReplace('/mobile/activity/unionActivity')" fixed left-arrow
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<!-- <van-dropdown-item v-model="pageForm.isMenWomen" @change="yearChange"
|
||||
:options="sexList"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.groupName" @change="yearChange"
|
||||
:options="groupList"></van-dropdown-item>
|
||||
<van-dropdown-item :options="eventList" @change="yearChange"
|
||||
v-model="pageForm.eventId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange"
|
||||
v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/wbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply==0&&o.applyWay.includes(1)"></image>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/qxbm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px;">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="您报队伍">
|
||||
{{o.activityTeamName?o.activityTeamName:'暂无'}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="可报队数" v-if="o.projectType==2">
|
||||
{{o.restrictTotalTeam}}队
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="成功报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-dialog @confirm="doActivityConfirm" show-cancel-button title="您确定要报名此活动吗?"
|
||||
v-model="activityDialog"
|
||||
@cancel="activityDialog = false" :before-close="onBeforeClose">
|
||||
<van-radio-group v-model="formData.teamId" v-if="projectType==2">
|
||||
<van-cell-group>
|
||||
<template v-for="i in teams">
|
||||
<van-cell :title="i.name" clickable>
|
||||
<template #right-icon>
|
||||
<van-radio :name="i.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</van-dialog>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
teamId: null,
|
||||
teamName: null,
|
||||
activityId: "",
|
||||
eventId: ""
|
||||
},
|
||||
title: "",
|
||||
projectType: "",
|
||||
applyType: "",
|
||||
activityDialog: false,
|
||||
restrictBoyNum: "",
|
||||
restrictGirlNum: "",
|
||||
athletesMaxNum: "",
|
||||
events: [],
|
||||
eventList: [],
|
||||
groupList: [
|
||||
{text: '按组别', value: null},
|
||||
{text: '甲组', value: '甲组'},
|
||||
{text: '乙组', value: '乙组'},
|
||||
{text: '丙组', value: '丙组'},
|
||||
{text: '丁组', value: '丁组'},
|
||||
],
|
||||
sexList: [
|
||||
{text: '按性别', value: 1},
|
||||
{text: '男子', value: 2},
|
||||
{text: '女子', value: 3},
|
||||
{text: '团体', value: 4},
|
||||
],
|
||||
auditList: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已报名', value: "true"},
|
||||
{text: '未报名', value: "false"},
|
||||
],
|
||||
teams: [],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isMenWomen: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onBeforeClose(action, done) {
|
||||
return done(false)
|
||||
},
|
||||
async doActivityConfirm() {
|
||||
if (this.formData.teamId == null && this.projectType == 2) {
|
||||
this.$toast("请选择报名的小队")
|
||||
return
|
||||
} else {
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
teamId: this.formData.teamId,
|
||||
activityId: this.formData.activityId,
|
||||
eventId: this.formData.eventId,
|
||||
applyType: this.applyType
|
||||
})
|
||||
const nv = data.filter(v => v.sex === '女')
|
||||
const nan = data.filter(v => v.sex === '男')
|
||||
let title = this.projectType === 1 ? "项目" : "小队"
|
||||
/* if (this.applyType !== 3) {
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '男' && nan.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictGirlNum) : this.restrictBoyNum)) {
|
||||
this.$toast("该" + title + "男运动员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.isManGirlNum === false && "${@shiro.getPrincipalProperty('sex')}" == '女' && nv.length == (this.applyType === 1 ? (this.athletesMaxNum - this.restrictBoyNum) : this.restrictGirlNum)) {
|
||||
this.$toast("该" + title + "女运动员已报满!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
if (this.athletesMaxNum && (data.length >= this.athletesMaxNum)) {
|
||||
this.$toast("该" + title + "人员已报满!")
|
||||
return
|
||||
}
|
||||
if (this.formData.teamId != null) this.$set(this.formData, "teamName", this.teams.find(v => v.id == this.formData.teamId).name)
|
||||
await $.post("/mobile/activity/Sports/list/doActivity", this.formData)
|
||||
|
||||
await this.onRefresh()
|
||||
this.activityDialog = false
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
let {
|
||||
isManGirlNum,
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyUserModel,
|
||||
unionLimit,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
this.projectType = projectType
|
||||
this.formData.activityId = activityId
|
||||
this.formData.eventId = eventId
|
||||
this.applyType = applyType
|
||||
this.isManGirlNum = isManGirlNum
|
||||
|
||||
const res = await $.get("/mobile/activity/Sports/list/getScopeUser", {activityGroupId: activityGroupId})
|
||||
if (res.data == 0) {
|
||||
this.$toast("您不在报名人员内!")
|
||||
return
|
||||
}
|
||||
if ("${@shiro.getPrincipalProperty('unit').getUnionid()}" == "") {
|
||||
this.$toast("您的工会信息有误,无法报名,请联系工会管理员!")
|
||||
return
|
||||
}
|
||||
|
||||
/*if ((isInterest && "${@shiro.hasRole('H04')}" === 'false') || (isInterest && "${@shiro.hasRole('sysadmin')}" === 'false')) {
|
||||
this.$toast("您所报的是趣味运动,请联系工会管理员报名!")
|
||||
return
|
||||
}*/
|
||||
if (userApply == 1) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.yearChange()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
this.events = []
|
||||
const data = await $.get("/platform/activity/apply/getEvents", {activityId: activityId})
|
||||
this.events = data
|
||||
const {
|
||||
athletesMaxNum,
|
||||
startAgeDate,
|
||||
endAgeDate,
|
||||
isMenWomen,
|
||||
restrictBoyNum,
|
||||
restrictGirlNum
|
||||
} = this.events.find(v => v.id == eventId)
|
||||
if (isMenWomen) {
|
||||
this.restrictBoyNum = athletesMaxNum
|
||||
this.restrictGirlNum = athletesMaxNum
|
||||
} else {
|
||||
this.restrictBoyNum = restrictBoyNum ? restrictBoyNum : 0
|
||||
this.restrictGirlNum = restrictGirlNum ? restrictGirlNum : 0
|
||||
}
|
||||
this.athletesMaxNum = athletesMaxNum
|
||||
if (projectType == 1) {
|
||||
if (isMenWomen != null && isMenWomen === 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen === 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (restrictRegNumber > 0) {
|
||||
const {data} = await $.post("/platform/activity/apply/getActivityData", {activityId})
|
||||
const userApplyNum = data.filter(v => v.userId == "${@shiro.getPrincipalProperty('id')}").length
|
||||
if (userApplyNum >= restrictRegNumber) {
|
||||
this.$toast('单项项目,每人限报' + restrictRegNumber + '个!团体项目除外')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const {data} = await $.post("/mobile/activity/Sports/list/getTeamUserData", {
|
||||
activityId: this.formData.activityId,
|
||||
applyType: applyType,
|
||||
eventId: eventId
|
||||
})
|
||||
|
||||
if (applyUserModel === 1) {
|
||||
if (athletesMaxNum != null) {
|
||||
if (data.length >= athletesMaxNum) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + athletesMaxNum + "人")
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
unionLimit = JSON.parse(unionLimit)
|
||||
const limit = unionLimit.find(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
this.athletesMaxNum = limit.limitCount
|
||||
if (data.length >= limit.limitCount) {
|
||||
this.$toast("此项目报名人数已满!此项目只需报" + limit.limitCount + "人")
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (startAgeDate != null) {
|
||||
const birthday = moment("${@shiro.getPrincipalProperty('birthday')}").valueOf()
|
||||
if (birthday < moment(startAgeDate).valueOf() || birthday > moment(endAgeDate).valueOf()) {
|
||||
this.$toast("您的年龄不在限制范围內!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (isMenWomen != null && isMenWomen == 1 && "${@shiro.getPrincipalProperty('sex')}" != '男') {
|
||||
this.$toast("此项目只能男性老师才能报名!")
|
||||
return
|
||||
}
|
||||
if (isMenWomen != null && isMenWomen == 2 && "${@shiro.getPrincipalProperty('sex')}" != '女') {
|
||||
this.$toast("此项目只能女性老师才能报名!")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (projectType == 2) {
|
||||
const {data} = await $.get("/platform/activity/apply/getActivityTeamId", {
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
this.teams = data
|
||||
if (data.length && data.length > 0) this.$set(this.formData, "teamId", data[0].id)
|
||||
|
||||
}
|
||||
this.activityDialog = true
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
|
||||
const {data} = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
|
||||
}
|
||||
,
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString('id')
|
||||
const applyType = GetQueryString('applyType')
|
||||
this.pageForm.activityId = id
|
||||
this.pageForm.applyType = applyType
|
||||
const data = await $.post("/platform/activity/apply/getEvents", {activityId: id})
|
||||
data.forEach(v => {
|
||||
this.eventList.push({value: v.eventId, text: v.allName})
|
||||
})
|
||||
this.eventList.unshift({value: null, text: "按项目"})
|
||||
this.$set(this.pageForm, "eventId", this.eventList[0].value)
|
||||
this.$set(this.pageForm, "isMenWomen", 1)
|
||||
this.$set(this.pageForm, "groupName", null)
|
||||
this.$set(this.pageForm, "isAudit", null)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,125 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.tag {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
background-color: #1867b0;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
top: 1px;
|
||||
border-radius: 6px;
|
||||
right: -8px;
|
||||
padding: 1px 7px;
|
||||
transform: rotate(17deg);
|
||||
/*z-index: 999;*/
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isActivity" :options="activityList"
|
||||
@change="getActivityData"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.applyEndTime,o.applyType)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.NAME}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动地址">{{o.address}}</van-cell>
|
||||
<van-cell :border="false" title="报名时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动时间">
|
||||
<span style="font-size: 12px">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="活动状态">
|
||||
<van-tag type="warning" v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">未开始</van-tag>
|
||||
<van-tag type="primary" v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()">报名中</van-tag>
|
||||
<van-tag type="success" v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()">进行中</van-tag>
|
||||
<van-tag type="danger" v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">活动结束</van-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开始', value: 5},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 4},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
year: '',
|
||||
isActivity: "1"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async getActivityData() {
|
||||
const {data} = await $.post("/platform/activity/apply/activityData", {
|
||||
year: this.pageForm.year,
|
||||
isActivity: this.pageForm.isActivity
|
||||
})
|
||||
this.tableData = data
|
||||
},
|
||||
openInfo(id, applyEndTime, applyType) {
|
||||
if (moment(applyEndTime).valueOf() < moment().valueOf()) {
|
||||
this.$toast("活动已结束,暂不能报名")
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/activity/Sports/list/activityEventList?id=' + id + "&applyType=" + applyType
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.$set(this.pageForm, "isActivity", 1)
|
||||
await this.getActivityData()
|
||||
this.mLoading = false
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,150 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.list-card > .van-cell-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="报名详情" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<div v-for="o in tableData" class="list-card">
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/activity/ybm.svg"
|
||||
@click="openActivity(o)"
|
||||
v-if="o.userApply>0&&o.applyWay.includes(1)"></image>
|
||||
<van-cell :border="false" title="项目名称">
|
||||
<span class="van-ellipsis" style="font-size: 16px;"
|
||||
:style="{color:themeColor}">
|
||||
{{o.allName}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">{{o.projectType==1?'单项':'团体'}}</van-cell>
|
||||
<van-cell :border="false" title="年龄限制" v-if="o.projectType==1">
|
||||
<span v-if="o.startAgeDate!=null">{{o.startAgeDate}}至{{o.endAgeDate}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
|
||||
<van-cell :border="false" title="每队可报人数" v-if="o.applyUserModel===1">
|
||||
<span v-if="o.athletesMaxNum">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==1">{{o.athletesMaxNum*o.restrictTotalTeam}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==1">{{o.athletesMaxNum}}人</span>
|
||||
<span v-else-if="o.applyType==2&&o.projectType==2">{{o.restrictGirlNum+o.restrictBoyNum}}人</span>
|
||||
<span v-else>暂无</span>
|
||||
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="已报名人数">
|
||||
<span v-if="o.applyNum>0&&o.applyType!=3">{{o.applyNum}}人</span>
|
||||
<span v-else-if="o.totalApplyNum>0&&o.applyType==3">{{o.totalApplyNum}}人</span>
|
||||
<span v-else>0人</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
projectInfo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.o = resp.data
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
})
|
||||
}
|
||||
},
|
||||
async getSchoolActivityProjectInfoByMine() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/getSchoolActivityProjectInfoByMine', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.projectInfo = resp.data
|
||||
}
|
||||
},
|
||||
async getHasRegEventProject() {
|
||||
const resp = await $.get('/platform/activity/apply/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
}
|
||||
},
|
||||
async openActivity(o) {
|
||||
const {
|
||||
applyType,
|
||||
eventId,
|
||||
activityId,
|
||||
projectType,
|
||||
userApply,
|
||||
applyNum,
|
||||
name,
|
||||
activityGroupId,
|
||||
restrictRegNumber
|
||||
} = o
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定取消此次报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.get("/platform/activity/apply/doDeleteApply", {
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
activityId: activityId,
|
||||
eventId: eventId
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('取消成功')
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.$set(this.pageForm, 'isAudit', 'true')
|
||||
this.$set(this.pageForm, 'activityId', id)
|
||||
this.$set(this.pageForm, 'pageSize', 100)
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getHasRegEventProject()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,551 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.in-sheet-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
max-height: 96%;
|
||||
height: 96%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 86%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.no_content {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
height: 88%;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 6em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
/*position: absolute;*/
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.van-cell__value--alone {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="场地预约审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<!--<van-dropdown-item v-model="pageForm.meetingTime" :options="meetingTimeList"
|
||||
@change="doSearch"></van-dropdown-item>-->
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey"> 联系人:</span>{{o.unitname ? (o.unitname +
|
||||
'') : '' + '' + o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联系方式:</span>{{o.contact_phone}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<!--<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">开放时段:</span>
|
||||
{{o.meetingdescription}}
|
||||
</div>-->
|
||||
<!--<span class="showMore" @click.stop="desc = o.meetingdescription; popupShow = true">查看更多</span>-->
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">已审{{o.audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup v-model:show="popupShow" class="cus_popup">
|
||||
<pre style="margin: 0; white-space: break-spaces">{{desc}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" v-if="popupShow" name="close"></van-icon>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet v-model:show="userShow" :title="queryType === 'notAudit' ? '预约列表' : '预约列表'"
|
||||
class="userPopup" @close="popClose">
|
||||
<div :class="queryType == 'notAudit' ? 'content' : 'no_content'">
|
||||
<div v-if="queryType === 'notAudit'" style="text-align: right; width: 96%">
|
||||
<van-tag color="#1867b0" style="margin-right: 10px" @click="cancelAll" size="large" type="primary">
|
||||
取消选中
|
||||
</van-tag>
|
||||
<van-tag color="#1867b0" @click="allIn" size="large" type="primary">全选</van-tag>
|
||||
</div>
|
||||
<div class="van-doc-card in-sheet-card" v-for="(item, i) in userList">
|
||||
<!--<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 80%">
|
||||
<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<span @click="checkAll(i)">全选</span>
|
||||
<span @click="toggleAll(i)" style="margin-left: 4px">反选</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<div style="width: 90%">
|
||||
<div>
|
||||
<span style="display: inline-block; min-width: 40px; max-width: 76px">{{item.username}}</span>
|
||||
<span style="display: inline-block; width: 20px">{{item.sex}}</span>
|
||||
<span style="display: inline-block; width: 76px">{{item.loginname}}</span>
|
||||
<span class="unit">{{item.unitname}}</span>
|
||||
</div>
|
||||
<div style="width: 94%; display: flex">
|
||||
<div style="color: grey;">预约时间:</div>
|
||||
<div>
|
||||
<div v-for="(d,index) in item.concat_day.split(',')">{{getTime(item, d)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">参加人员:</span><span>{{item.joinUser}}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">预约事由:</span><span>{{item.reserve_cause}}</span>
|
||||
</div>
|
||||
<div style="width: 94%;">
|
||||
<span style="color: grey">审核状态:</span><span>{{item.stateName}}</span>
|
||||
</div>
|
||||
<div v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('xghng')||@shiro.hasRole('A06')}"
|
||||
style="width: 94%;">
|
||||
<span style="color: grey">反馈意见:</span><span>{{item.back_option}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group v-model="result" ref="checkboxGroup">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
clickable class="cus_cell"
|
||||
:key="item.id"
|
||||
@click="toggle(i)">
|
||||
|
||||
<van-icon class="audit_icon" color="green"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == true"
|
||||
name="passed"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
v-if="queryType === 'hasAudit' && item.auditState == false"
|
||||
name="close"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="item.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<!--<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: space-evenly; position: fixed; bottom: 50px; width: 95%">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过</van-button>
|
||||
</div>-->
|
||||
</div>
|
||||
<div style="position: absolute; bottom: 20px; width: 100%;z-index: 9999">
|
||||
<div v-if="queryType === 'notAudit'" style="display: flex; justify-content: center">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small"
|
||||
style="height: 38px;border-radius: 10px;margin-right: 20px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small"
|
||||
style="height: 38px;border-radius: 10px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-action-sheet>
|
||||
|
||||
<!--审核弹框-->
|
||||
<van-dialog v-model:show="auditShow" @confirm="auditDo" title="温馨提示" show-cancel-button>
|
||||
<div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{str}}</div>
|
||||
<van-divider style="margin: 12px 0 1px 0px;"></van-divider>
|
||||
<van-field
|
||||
v-model="reason"
|
||||
rows="2"
|
||||
label="审核意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: '',
|
||||
list: ['a', 'b'],
|
||||
result: [],
|
||||
reason: '',
|
||||
auditShow: false,
|
||||
popupShow: false,
|
||||
userShow: false,
|
||||
userList: [],
|
||||
userClickList: [],
|
||||
str: '',
|
||||
type: '',
|
||||
auditType: '',
|
||||
queryType: '',
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/mobile/activity/site/audit/getLeaveUser', {
|
||||
siteId: o.id,
|
||||
auditType: 'hasAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无数据')
|
||||
return
|
||||
}
|
||||
this.userList.sort((a, b) => {
|
||||
return b.auditState - a.auditState
|
||||
})
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
cancelAll() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false))
|
||||
},
|
||||
allIn() {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(true))
|
||||
},
|
||||
checkAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(i) {
|
||||
this.$refs.checkboxes[i].toggle();
|
||||
},
|
||||
async auditDo() {
|
||||
let idList = this.result
|
||||
if (this.type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/site/audit/audit', {
|
||||
ids: JSON.stringify(idList),
|
||||
auditOpinion: this.reason,
|
||||
isPass: this.auditType === 'pass'
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
this.userShow = false
|
||||
},
|
||||
audit(type, auditType) {
|
||||
this.type = type
|
||||
this.auditType = auditType
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
this.str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择' : '您确定要一键全部审核吗?'
|
||||
this.reason = auditType === 'pass' ? '同意' : '拒绝'
|
||||
this.auditShow = true
|
||||
},
|
||||
async openView(id, modulename) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await $.post('/mobile/activity/site/audit/getLeaveUser', {
|
||||
siteId: id,
|
||||
moduleName: modulename,
|
||||
auditType: 'canAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无预约数据')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,377 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.pop {
|
||||
max-height: 70%;
|
||||
width: 90%;
|
||||
padding: 0px 10px 10px 10px;
|
||||
}
|
||||
|
||||
.pop h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pop h4 {
|
||||
line-height: 26px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="场地预约"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="typeList" @change="doSearch"
|
||||
v-model="pageForm.typeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px;margin-bottom: 60px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="loading">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey"> 联系人:</span>{{(o.unitname
|
||||
? o.unitname :
|
||||
'') + ' ' + o.contact_person}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{o.contact_phone}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<!--<van-row>
|
||||
<van-col span="24"><span style="color: grey">已预约人数:</span>{{o.count}}</van-col>
|
||||
</van-row>-->
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">开放时间:</span><span
|
||||
v-if="o.workday === true">工作日</span>
|
||||
{{o.open_time}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup class="pop" round v-model:show="show">
|
||||
<div style="text-align: center;padding: 10px 0; font-size: 20px">爱心母婴室管理规定</div>
|
||||
<div>一、基本原则</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.使用对象:有哺乳需求的本校在职女教职工。</p>
|
||||
<p>2.开放时间:工作日8:00--17:30。</p>
|
||||
<p>3.使用制度:实行预约登记制。凡有哺乳需求的女教职工提前向校工会提出使用申请,经审核通过并开通权限后即可使用。</p>
|
||||
<p>4.日常管理:由校工会负责。</p>
|
||||
</div>
|
||||
|
||||
<div>二、管理人员</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.负责爱心母婴室使用登记管理。</p>
|
||||
<p>2.定期保养设备,确保正常使用。</p>
|
||||
<p>3.保持室内整洁、卫生安全,做好保洁消毒记录。</p>
|
||||
<p>4.定期收集意见和建议,不断改进服务。</p>
|
||||
</div>
|
||||
<div>三、使用人员</div>
|
||||
<div style="padding-left: 30px;">
|
||||
<p>1.遵守学校安全管理制度和爱心母婴室管理规定。</p>
|
||||
<p>2.严禁吸烟,安全使用电器,爱护公物,损坏赔偿。</p>
|
||||
<p>3.保持室内卫生清洁,勿大声喧哗,不影响楼内工作秩序。</p>
|
||||
<p>4.妥善保管自带物品,冰存的母乳须贴上姓名标签并及时取走。</p>
|
||||
<p>5.不得擅自携他人入内,不做和哺乳无关事宜,使用完毕及时离开。</p>
|
||||
<p>6.欢迎在《爱心母婴室使用意见簿》上留下您宝贵的意见和建议。</p>
|
||||
</div>
|
||||
<br/>
|
||||
<p>联系人:曾钰媛梦 84894774、15850692181</p>
|
||||
|
||||
<van-button @click="toReserve" color="#246fb4" style="width: 100%" type="primary">已知晓并遵守
|
||||
</van-button>
|
||||
</van-popup>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info')" icon="home-o"
|
||||
replace>场地预约
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info/my')" icon="manager-o"
|
||||
replace>我的预约
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
show: false,
|
||||
siteId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
this.siteId = o.id
|
||||
if (o.sexlimit === 1 || o.sexlimit === 2) {
|
||||
const sex = o.sexlimit === 1 ? '男' : '女'
|
||||
if ("${@shiro.getPrincipalProperty('sex')}" === sex) {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + o.id
|
||||
} else {
|
||||
vant.Toast('抱歉,该场地仅限' + sex + '性会员预约')
|
||||
}
|
||||
} else {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + o.id
|
||||
}
|
||||
},
|
||||
toReserve() {
|
||||
location.href = '/mobile/activity/site/info/reserve?id=' + this.siteId
|
||||
this.show = false
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,450 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="我的预约"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入场地名称、场地地点进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :title="pageForm.time" @open="" ref="item">
|
||||
<van-cell center title="查询全部">
|
||||
<template #right-icon>
|
||||
<van-switch active-color="#246fb4" size="24"
|
||||
v-model="pageForm.timeSwitch"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-datetime-picker :formatter="timeFormatter"
|
||||
cancel-button-text=" " confirm-button-text=" " title="选择年月"
|
||||
type="year-month"
|
||||
v-model="time"
|
||||
v-show="pageForm.timeSwitch === false"
|
||||
></van-datetime-picker>
|
||||
<div style="padding: 5px 16px;margin-top: 6px">
|
||||
<van-button @click="onConfirm" block color="#246fb4" round style="height: 36px"
|
||||
type="danger">
|
||||
确认
|
||||
</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item :options="typeList" @change="doSearch"
|
||||
v-model="pageForm.typeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px;margin-bottom: 60px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="loading">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.address}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">预约天数:</span>
|
||||
<span>{{o.days}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">预约时间:</span>
|
||||
<span v-for="(item,index) in o.concat_day.split(',')">
|
||||
<div :style="index !== 0 ? 'text-indent: 5em' : ''">{{getTime(o, item)}}</div>
|
||||
</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span style="color: #e6a23c"
|
||||
v-if="[0].includes(o.stateaudittype)">{{o.statename}}</span>
|
||||
<span style="color: #67c23a" v-if="o.stateaudittype==3">{{o.statename}}</span>
|
||||
<span style="color: #f56c6c" v-if="o.stateaudittype==1">{{o.statename}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.stateaudittype == '1'">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核意见:</span>
|
||||
<span>{{JSON.parse(o.auditlist).find(x => x.auditState === false).auditOption}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="rollback(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">撤销预约
|
||||
</van-button>
|
||||
<van-button @click.stop="backOption(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">反馈意见
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<van-dialog @confirm="backDo" show-cancel-button title="反馈意见" v-model="show">
|
||||
<van-field
|
||||
autosize
|
||||
label="反馈意见:"
|
||||
maxlength="50"
|
||||
placeholder="请输入反馈意见"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="option"
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info')" icon="home-o"
|
||||
replace>场地预约
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/site/info/my')" icon="manager-o"
|
||||
replace>我的预约
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
time: new Date(),
|
||||
option: '',
|
||||
show: false,
|
||||
list: ['a', 'b'],
|
||||
typeList: [],
|
||||
timeList: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onConfirm() {
|
||||
if (this.pageForm.timeSwitch === true) {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
} else {
|
||||
this.timeList = [{
|
||||
text: moment(this.time).format('YYYY-MM'),
|
||||
value: moment(this.time).format('YYYY-MM')
|
||||
}]
|
||||
}
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$refs.item.toggle()
|
||||
this.doSearch()
|
||||
},
|
||||
timeFormatter(type, val) {
|
||||
if (type === 'year') {
|
||||
return val + `年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + `月`;
|
||||
}
|
||||
return val;
|
||||
},
|
||||
async rollback(o) {
|
||||
const self = this
|
||||
const res = await $.post("/platform/activity/site/reserve/isCanRollBack", {id: o.id});
|
||||
if (res === true) {
|
||||
vant.Toast('此预约状态下不能进行撤回操作!')
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您是否要撤销此预约?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/activity/site/info/rollback', {
|
||||
id: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
self.doSearch()
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
backOption(o) {
|
||||
this.info = o
|
||||
this.option = ''
|
||||
this.show = true
|
||||
},
|
||||
async backDo() {
|
||||
if (this.option === '') {
|
||||
vant.Toast('请填写反馈意见')
|
||||
return
|
||||
}
|
||||
const res = await $.post('/mobile/activity/site/info/backOption', {
|
||||
id: this.info.id,
|
||||
option: this.option
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
vant.Toast(res.msg)
|
||||
} else {
|
||||
vant.Toast('操作失败')
|
||||
}
|
||||
},
|
||||
getTime(o, day) {
|
||||
const week = new Date(day).getDay()
|
||||
const arr = ['日', '一', '二', '三', '四', '五', '六']
|
||||
return moment(day).format('MM月DD日') + ' 周' + arr[week] + ' ' + o.start_time + '-' + o.end_time
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/activity/site/info/myReserve', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await siteTypeUtil.getAllType()
|
||||
this.typeList.unshift({text: '全部场地类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
//this.timeList.unshift({text: moment().format('YYYY-MM'), value: moment().format('YYYY-MM')})
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$set(this.pageForm, "timeSwitch", true)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,454 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.my_calendar {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #0e78c5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.day {
|
||||
background-color: #14497e;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding: 5px 6px;
|
||||
line-height: 22px;
|
||||
border-radius: 4px;
|
||||
margin-right: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 45%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.num {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
text-align: center;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 2px;
|
||||
color: #929292;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 10px 0px;
|
||||
background-color: white;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
border-radius: 6px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
tr {
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.van-action-sheet__content {
|
||||
padding: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 10px 0px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
|
||||
.top-calendar {
|
||||
height: 70px;
|
||||
max-height: 70px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #0e78c5;
|
||||
}
|
||||
|
||||
.calendar-left {
|
||||
width: calc(100% - 20px);
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
.calendar-left-day {
|
||||
min-width: 65px;
|
||||
height: 100%;
|
||||
margin: 0 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.left-day-active {
|
||||
background-color: #0000cc;
|
||||
}
|
||||
|
||||
.day-info-month {
|
||||
|
||||
}
|
||||
|
||||
.day-info-week {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.reserve_type .van-cell__title, .van-cell__value {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.reserve_type {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.calendar-right {
|
||||
width: 30px;
|
||||
max-width: 30px;
|
||||
text-align: center;
|
||||
height: 60%;
|
||||
border-left: 1px solid #fff3f3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.top_pop .van-popup {
|
||||
top: 46px;
|
||||
}
|
||||
|
||||
.van-action-sheet {
|
||||
max-height: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
:title="site.name"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="top-calendar">
|
||||
<div class="calendar-left">
|
||||
<div class="calendar-left-day" :class="moment(item).unix() == selectDate.unix() ? 'left-day-active':''"
|
||||
@click="dayClick(item)"
|
||||
v-for="item in weekList">
|
||||
<div class="day-info-week">
|
||||
{{getWeekTextByDate(item)}}
|
||||
</div>
|
||||
<div class="day-info-month">
|
||||
{{moment(item).format('MM-DD')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="calendar-right">
|
||||
<van-icon size="16" color="white" name="arrow-down" @click="calendarVisible=true"></van-icon>
|
||||
<van-calendar class="top_pop" v-model="calendarVisible" color="#246fb4" position="top" @confirm="onConfirm"
|
||||
:default-date="selectDate.toDate()"
|
||||
:formatter="calendarFormatter"
|
||||
title="选择开始日期"></van-calendar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table>
|
||||
<tr v-for="item in timeData">
|
||||
<td class="time">{{item.start_time + '-' + item.end_time}}</td>
|
||||
<td class="num">
|
||||
<span v-if="item.code !== -2">
|
||||
{{(item.limitNum - item.reserveNum) + '/' + item.limitNum}}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{0 + '/' + item.limitNum}}
|
||||
</span>
|
||||
</td>
|
||||
<td v-if="item.code !== 1" @click.stop="">
|
||||
<div class="state" :style="'background-color: ' + item.backColor + ';color:' +item.color">
|
||||
{{item.msg}}
|
||||
</div>
|
||||
</td>
|
||||
<td v-else @click.stop="chooseTime(item)">
|
||||
<div class="state"
|
||||
:style="'background-color: ' + item.backColor + ';color:' +item.color">
|
||||
<span v-if="!times.map(o => o.fullDay).includes(selectDate.format('YYYY-MM-DD') + ' ' + item.start_time + '-' + item.end_time)">{{item.msg}}</span>
|
||||
<span v-else>
|
||||
<van-icon name="passed" size="26" style="line-height: 36px;position: unset"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="position: fixed; bottom: 0; width: 100%">
|
||||
<van-button @click="reserve" type="primary" color="#246fb4" style="width: 100%">确定预约</van-button>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="show" title="确认预约信息">
|
||||
|
||||
<van-cell title="预约人">{{person}}</van-cell>
|
||||
<van-cell title="性别">${@shiro.getPrincipalProperty('sex')}</van-cell>
|
||||
<van-cell title="工号">${@shiro.getPrincipalProperty('loginname')}</van-cell>
|
||||
<van-cell title="所属单位">{{unit}}</van-cell>
|
||||
<van-cell title="联系电话">{{phone}}</van-cell>
|
||||
<van-cell title="预约时间">
|
||||
<div v-for="time in times">
|
||||
<van-tag closeable size="medium" type="primary" @close="close(time.fullDay)">
|
||||
{{time.fullDay}}
|
||||
</van-tag>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="预约地点">{{site.name}}</van-cell>
|
||||
<van-cell title="预约类型" class="reserve_type">
|
||||
<van-radio-group v-model="reserve_type" direction="horizontal">
|
||||
<van-radio :name="1">个人预约</van-radio>
|
||||
<van-radio :name="2">单位预约</van-radio>
|
||||
</van-radio-group>
|
||||
</van-cell>
|
||||
|
||||
<!--<van-field
|
||||
v-model="joinUser"
|
||||
rows="2"
|
||||
autosize
|
||||
label="参加人员"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入参加人员"
|
||||
show-word-limit
|
||||
></van-field>-->
|
||||
<van-field
|
||||
v-model="message"
|
||||
rows="4"
|
||||
autosize
|
||||
label="预约事由"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入预约事由"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
<div style="margin: 20px 0px; display: flex; justify-content: space-between;padding: 0px 22px;">
|
||||
<van-button @click="message = '';show = false" color="#246fb4" style="width: 47%" size="small" plain
|
||||
type="info">关闭
|
||||
</van-button>
|
||||
<van-button @click="reserveDo" color="#246fb4" style="width: 47%" size="small" type="info">确认</van-button>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
moment.locale('zh_cn');
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
<!--# include("/platform/activity/includeJs/activityUtil.js"){} #-->
|
||||
const siteTypeUtil = new typeUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
reserve_type: 1,
|
||||
person: "${@shiro.getPrincipalProperty('username')}",
|
||||
unit: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
phone: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
message: '',
|
||||
show: false,
|
||||
site_id: '',
|
||||
site: {},
|
||||
timeData: [],
|
||||
times: [],
|
||||
weekList: [],
|
||||
joinUser: '',
|
||||
calendarVisible: false,
|
||||
selectDate: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getWeekTextByDate() {
|
||||
return (date) => {
|
||||
const weekNum = moment(date).day()
|
||||
switch (weekNum) {
|
||||
case 0:
|
||||
return '周日'
|
||||
case 1:
|
||||
return '周一'
|
||||
case 2:
|
||||
return '周二'
|
||||
case 3:
|
||||
return '周三'
|
||||
case 4:
|
||||
return '周四'
|
||||
case 5:
|
||||
return '周五'
|
||||
case 6:
|
||||
return '周六'
|
||||
}
|
||||
}
|
||||
},
|
||||
calendarFormatter() {
|
||||
return (day) => {
|
||||
// 休息日不能选择
|
||||
if(this.site.workday === true) {
|
||||
let week = day.date.getDay()
|
||||
if (week === 0 || week === 6) {
|
||||
day.type = 'disabled'
|
||||
}
|
||||
}
|
||||
return day
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close(f) {
|
||||
if (this.times.length === 1) {
|
||||
vant.Toast('必须保留一个时间段')
|
||||
return
|
||||
}
|
||||
const index = this.times.findIndex(v => v.fullDay === f)
|
||||
this.times.splice(index, 1)
|
||||
},
|
||||
onConfirm(date) {
|
||||
this.selectDate = moment(date)
|
||||
this.setWeekList(this.selectDate)
|
||||
this.calendarVisible = false
|
||||
},
|
||||
//这里要排除掉休息日
|
||||
setWeekList(startDate) {
|
||||
const wk = []
|
||||
wk.push(moment(startDate))
|
||||
let count = 1
|
||||
while (wk.length < 7) {
|
||||
const addDate = moment(startDate).add(count, 'd')
|
||||
//这里不是休息日才能加到数组里
|
||||
if (this.site.workday === false || (this.site.workday === true && addDate.day() !== 0 && addDate.day() !== 6)) {
|
||||
wk.push(addDate)
|
||||
}
|
||||
count++
|
||||
}
|
||||
this.weekList = wk
|
||||
},
|
||||
dayClick(date) {
|
||||
this.selectDate = date
|
||||
this.getReserve()
|
||||
},
|
||||
reserve() {
|
||||
if (this.times.length === 0) {
|
||||
vant.Toast('请选择要预约的时段')
|
||||
return
|
||||
}
|
||||
this.show = true
|
||||
},
|
||||
async reserveDo() {
|
||||
const resp = await $.post('/mobile/activity/site/info/reserveDo', {
|
||||
siteId: this.site_id,
|
||||
times: JSON.stringify(this.times),
|
||||
message: this.message,
|
||||
joinUser: this.joinUser,
|
||||
reserve_type: this.reserve_type
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast('预约成功')
|
||||
if (resp.code === 0) {
|
||||
this.show = false
|
||||
this.times = []
|
||||
this.message = null
|
||||
await this.getReserve()
|
||||
await this.onLoad()
|
||||
}
|
||||
} else {
|
||||
vant.Toast(resp.msg)
|
||||
}
|
||||
},
|
||||
chooseTime(item) {
|
||||
const cloneItem = clone(item)
|
||||
const map = this.times.map(o => o.fullDay)
|
||||
const index = map.indexOf(this.selectDate.format('YYYY-MM-DD') + ' ' + cloneItem.start_time + '-' + cloneItem.end_time)
|
||||
if (index > -1) {
|
||||
this.times.splice(index, 1)
|
||||
} else {
|
||||
cloneItem.day = this.selectDate.format('YYYY-MM-DD')
|
||||
cloneItem.fullDay = cloneItem.day + ' ' + cloneItem.start_time + '-' + cloneItem.end_time
|
||||
this.times.push(cloneItem)
|
||||
}
|
||||
},
|
||||
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
const resp = await $.post('/mobile/activity/site/info/getDetail', {id: this.site_id})
|
||||
if (resp.code === 0) {
|
||||
this.site = resp.data
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
async getReserve() {
|
||||
const resp = await $.post('/mobile/activity/site/info/getReserve', {
|
||||
siteId: this.site_id,
|
||||
day: moment(this.selectDate).format('YYYY-MM-DD'),
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.timeData = resp.data
|
||||
}
|
||||
},
|
||||
//获取最新的一个工作日设为当前时间
|
||||
getLatestWorkDay() {
|
||||
//1.首先判断今天是不是工作日
|
||||
const weekNum = moment().day()
|
||||
let selectDate = null
|
||||
if (weekNum === 0) {
|
||||
//周日
|
||||
selectDate = moment().add(1, 'd')
|
||||
} else if (weekNum === 6) {
|
||||
//周六
|
||||
selectDate = moment().add(2, 'd')
|
||||
} else {
|
||||
selectDate = moment()
|
||||
}
|
||||
return selectDate
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.site_id = getQueryString('id')
|
||||
this.selectDate = this.getLatestWorkDay()
|
||||
await this.onLoad()
|
||||
this.setWeekList(this.selectDate)
|
||||
await this.getReserve()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,78 @@
|
||||
<!--活动信息公用页面-->
|
||||
|
||||
<div class="activity_img_back">
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover" width="100%"
|
||||
height="200"></van-image>
|
||||
</div>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-cell title="活动名称" :value="o.name"></van-cell>
|
||||
<van-cell title="活动地址" :value="o.address"></van-cell>
|
||||
<!-- <van-cell title="报名时间">
|
||||
<template #label>
|
||||
{{moment(o.applyStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.applyEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="活动时间">
|
||||
<template #label>
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
</van-cell>-->
|
||||
<van-cell v-if="o.userNumberLimit!=null">
|
||||
<template #title>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
活动人数
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
本工会名额
|
||||
</span>
|
||||
</template>
|
||||
<template>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
<span style="color: orange">{{o.totalUserNumberLimit }}</span>人
|
||||
</span>
|
||||
<span v-else="o.userNumberLimit===2">
|
||||
<span style="color: orange">{{unionLimitNum }}</span>人
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="当前报名" v-if="o.signUpMethod!=null">
|
||||
<template>
|
||||
<span style="color: red">{{hasRegUserNum}}</span>人
|
||||
</template>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="负  责  人">-->
|
||||
<!-- <template>-->
|
||||
<!-- {{o.createUserName}}({{o.createUserMobile}})-->
|
||||
<!-- </template>-->
|
||||
<!-- </van-cell>-->
|
||||
<van-cell title="报名方式" v-if="o.signUpMethod">
|
||||
<template>
|
||||
<span v-if="o.signUpMethod===1">个人报名</span>
|
||||
<span v-if="o.signUpMethod===2">分工会报名</span>
|
||||
<span v-if="o.signUpMethod===3">组队报名</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="组队人数" v-if="o.signUpMethod==3">
|
||||
<span style="color: red"> {{o.teamNum}}</span>人
|
||||
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="活动内容" v-if="o.projectTypeCode!=='50004'">
|
||||
<template #label>
|
||||
<span style="white-space: pre-line">
|
||||
{{o.activityContent}}
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签到点位" v-if="o.needSign">
|
||||
<template #label>
|
||||
<div id="signMap" style="width: 100%;height: 300px"></div>
|
||||
<div style="margin-top: 10px;color: orange">
|
||||
活动开始后,请前往签到点位半径({{o.rangeMeter}})米内进行签到。
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
@@ -0,0 +1,130 @@
|
||||
const self_mixin = {
|
||||
data() {
|
||||
return {
|
||||
//已报名人数
|
||||
hasRegUserNum: 0,
|
||||
unionId: null,
|
||||
unionLimitNum: 0,
|
||||
isRegisterFull: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getActivityInfo() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/findOne', {id: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
resp.data.location = JSON.parse(resp.data.location)
|
||||
resp.data.unionUserNumberLimit = JSON.parse(resp.data.unionUserNumberLimit)
|
||||
this.o = resp.data
|
||||
this.unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
|
||||
if (!this.unionId) {
|
||||
this.$toast.fail('您的所属工会信息缺失,请联系管理员')
|
||||
return
|
||||
}
|
||||
if (this.o.userNumberLimit === 2) {
|
||||
const unionLimit = resp.data.unionUserNumberLimit.find(v => v.id === this.unionId)
|
||||
this.unionLimitNum = unionLimit.limitNum
|
||||
}
|
||||
await this.getHasRegUserNum()
|
||||
this.$nextTick(() => {
|
||||
// document.getElementsByClassName('activity_img_back')[0].style.backgroundImage = "url(" + FILE_DOMAIN + this.o.cover + ")"
|
||||
if (this.o.needSign) {
|
||||
this.initMap()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async getHasRegUserNum() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/getHasRegUserNum', {activityId: this.activityId})
|
||||
this.hasRegUserNum = resp.data
|
||||
if (this.o.signUpMethod === 1) {
|
||||
if (this.o.userNumberLimit === 1) {
|
||||
if (this.hasRegUserNum === this.o.totalUserNumberLimit) {
|
||||
this.isRegisterFull = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
initMap() {
|
||||
let marker = null
|
||||
let circle = null
|
||||
this.$nextTick(() => {
|
||||
let map = new AMap.Map("signMap", {
|
||||
zoomEnable: true,
|
||||
dragEnable: false,
|
||||
resizeEnable: true,
|
||||
center: [114.402582, 30.521378],
|
||||
zoom: 16
|
||||
});
|
||||
|
||||
if (this.o.location && Array.isArray(this.o.location)) {
|
||||
const lng = parseFloat(this.o.location[0])
|
||||
const lat = parseFloat(this.o.location[1])
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
map.add(marker)
|
||||
// marker.setMap(map);
|
||||
// map.setZoomAndCenter(18, [lng, lat])
|
||||
|
||||
circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(lng, lat), // 圆心位置
|
||||
radius: this.o.rangeMeter, //半径
|
||||
strokeColor: "#F33", //线颜色
|
||||
strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 1, //线粗细度
|
||||
fillColor: "#ee2200", //填充颜色
|
||||
fillOpacity: 0.35 //填充透明度
|
||||
})
|
||||
map.add(circle)
|
||||
map.setFitView()
|
||||
}
|
||||
|
||||
if (window.location.pathname === '/mobile/activity/myActivity/goSign' && !this.isSign) {
|
||||
map.plugin('AMap.Geolocation', function () {
|
||||
geolocation = new AMap.Geolocation({
|
||||
enableHighAccuracy: true,//是否使用高精度定位,默认:true
|
||||
timeout: 10000, //超过10秒后停止定位,默认:无穷大
|
||||
maximumAge: 0, //定位结果缓存0毫秒,默认:0
|
||||
convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
|
||||
showButton: true, //显示定位按钮,默认:true
|
||||
buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角
|
||||
buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
|
||||
showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
|
||||
showCircle: false, //定位成功后用圆圈表示定位精度范围,默认:true
|
||||
panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
|
||||
zoomToAccuracy: true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
});
|
||||
map.addControl(geolocation)
|
||||
|
||||
geolocation.getCurrentPosition()
|
||||
|
||||
AMap.event.addListener(geolocation, 'error', (err) => {
|
||||
alert(JSON.stringify(err))
|
||||
}); //返回定位出错信息
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
getMapDistance(paramObj) {
|
||||
let lng1 = paramObj.lng1
|
||||
let lat1 = paramObj.lat1
|
||||
|
||||
let lng2 = paramObj.lng2
|
||||
let lat2 = paramObj.lat2
|
||||
|
||||
let radLat1 = lat1 * Math.PI / 180.0;
|
||||
let radLat2 = lat2 * Math.PI / 180.0;
|
||||
let a = radLat1 - radLat2;
|
||||
let b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
|
||||
let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
||||
Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
|
||||
s = s * 6378.137;// EARTH_RADIUS;
|
||||
s = Math.round(s * 10000) / 10000;
|
||||
s = s * 1000
|
||||
return s.toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="活动列表"></van-nav-bar>
|
||||
|
||||
<div style="margin: 10px auto 60px auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div @click="openReg(o)" class="list-card" v-for="o in tableData">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
fit="cover"
|
||||
height="200"
|
||||
width="100%"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon color="red" name="fire"></van-icon>
|
||||
<span style="margin-left: 10px;">{{o.name}}</span>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
{{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span style="color: forestgreen"
|
||||
v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()">
|
||||
报名中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()">
|
||||
报名结束
|
||||
</span>
|
||||
<span style="color: forestgreen"
|
||||
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()">
|
||||
活动进行中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty class="custom-image" description="暂无数据" image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar :active-color="themeColor" v-model="tabBarIndex">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/unionActivity')" icon="home-o">
|
||||
全部活动
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/myActivity')" icon="friends-o">
|
||||
我的活动
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/myActivity',
|
||||
pageForm: {
|
||||
year: ''
|
||||
},
|
||||
tabBarIndex: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/myActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
openReg(o) {
|
||||
// window.location.href = '/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=1'
|
||||
if (o.projectTypeCode === '50004') {
|
||||
pjaxReplace('/mobile/activity/myActivity/goMyProject?id=' + o.id)
|
||||
} else {
|
||||
pjaxReplace('/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.year = new Date().getFullYear()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,284 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.activity_card {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .van-image, .activity_card .van-image img {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_name {
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom {
|
||||
line-height: 25px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .left {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: calc(100% - 80px);
|
||||
font-size: 12px;
|
||||
color: #c4bebe;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.activity_card .activity_content .activity_bottom .right {
|
||||
line-height: 25px;
|
||||
overflow: hidden;
|
||||
width: 80px;
|
||||
max-width: 80px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="活动列表"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearList" @change="formChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="activityStatusList" @change="formChange"
|
||||
v-model="pageForm.activityStatus"></van-dropdown-item>
|
||||
<van-dropdown-item :options="activityLevelList" @change="formChange"
|
||||
v-model="pageForm.activityLevel"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 80px auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div @click="openReg(o)" class="list-card" v-for="o in tableData">
|
||||
|
||||
<div class="activity_card">
|
||||
<van-image
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover"
|
||||
fit="cover"
|
||||
height="200"
|
||||
width="100%"
|
||||
></van-image>
|
||||
<div class="activity_content">
|
||||
<div class="activity_name van-ellipsis">
|
||||
<van-icon color="red" name="fire"></van-icon>
|
||||
<div style="margin-left: 10px;width: calc(100% - 26px);text-overflow: ellipsis;overflow: hidden;white-space: nowrap">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity_bottom">
|
||||
<div class="left" style="width: 100%">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
报名时间:{{o.applyStartTime}}至{{o.applyEndTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="right">-->
|
||||
<!-- <span v-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()"-->
|
||||
<!-- style="color: forestgreen">-->
|
||||
<!-- 报名中-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- style="color: #ee1919">-->
|
||||
<!-- 报名结束-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()"-->
|
||||
<!-- style="color: forestgreen">-->
|
||||
<!-- 活动进行中-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else-if="moment().valueOf() > moment(o.endTime).valueOf()"-->
|
||||
<!-- style="color: #ee1919">-->
|
||||
<!-- 活动结束-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<div class="activity_bottom">
|
||||
<div class="left">
|
||||
<van-icon name="clock" size="1em"></van-icon>
|
||||
<span style="margin-left: 10px;">
|
||||
活动时间:{{o.startTime}}
|
||||
<!-- {{moment(o.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.activityEndTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="right">
|
||||
<span style="color: forestgreen"
|
||||
v-if="moment(o.applyStartTime).valueOf() > moment().valueOf()">
|
||||
未开始报名
|
||||
</span>
|
||||
<span style="color: forestgreen"
|
||||
v-else-if="moment(o.applyEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.applyStartTime).valueOf()">
|
||||
报名中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment(o.applyEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.startTime).valueOf()">
|
||||
报名结束
|
||||
</span>
|
||||
<span style="color: forestgreen"
|
||||
v-else-if="moment(o.startTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.endTime).valueOf()">
|
||||
活动进行中
|
||||
</span>
|
||||
<span style="color: #ee1919"
|
||||
v-else-if="moment().valueOf() > moment(o.endTime).valueOf()">
|
||||
活动结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="activity_content" style="font-size: 12px; color: #c4bebe;">-->
|
||||
<!-- <div class="left">-->
|
||||
<!-- <van-icon name="clock" size="1em"></van-icon>-->
|
||||
<!-- <span style="margin-left: 5px;">-->
|
||||
<!-- {{moment(o.startTime).format('YYYY/MM/DD HH:mm')}} 至-->
|
||||
<!-- {{moment(o.endTime).format('YYYY/MM/DD HH:mm')}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty class="custom-image" description="暂无数据" image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar :active-color="themeColor" v-model="tabBarIndex">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/unionActivity')" icon="home-o">
|
||||
全部活动
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/activity/myActivity')" icon="friends-o">
|
||||
我的活动
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: '/mobile/activity/unionActivity/pageData',
|
||||
pageForm: {
|
||||
year: '',
|
||||
activityStatus: null
|
||||
},
|
||||
tabBarIndex: 0,
|
||||
activityLevelList: [],
|
||||
activityStatusList: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '未开始', value: 5},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '进行中', value: 3},
|
||||
{text: '已结束', value: 4}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/activity/unionActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
/* this.tableData.forEach(v => {
|
||||
if (v.cover) {
|
||||
const cover = JSON.parse(v.cover)
|
||||
v.cover = cover[0].filepath
|
||||
}
|
||||
|
||||
})*/
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
//跳转页面
|
||||
openReg(o) {
|
||||
if (moment(o.applyStartTime).valueOf() > moment().valueOf()) {
|
||||
this.$toast('活动未开始报名')
|
||||
return;
|
||||
}
|
||||
if (o.projectTypeCode === '50004') {
|
||||
pjaxReplace('/mobile/activity/Sports/list/activityEventList?id=' + o.id)
|
||||
} else {
|
||||
pjaxReplace('/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod)
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
this.$set(this.pageForm, "activityStatus", 1)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code: 40000})
|
||||
this.activityLevelList = []
|
||||
this.activityLevelList.push({value: null, text: "全部类别"})
|
||||
data.forEach(v => {
|
||||
this.activityLevelList.push({value: v.code, text: v.name})
|
||||
})
|
||||
|
||||
this.$set(this.pageForm, "activityLevel", this.activityLevelList[0].value)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="签到" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="o.needSign">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
</script>
|
||||
|
||||
<script>
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
isSign: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
geolocation.getCurrentPosition(async (status, result) => {
|
||||
if (status !== 'complete') {
|
||||
this.$toast.fail('定位失败!')
|
||||
return
|
||||
}
|
||||
console.log(status)
|
||||
console.log(result)
|
||||
const lat = result.position.lat
|
||||
const lng = result.position.lng
|
||||
const params = {
|
||||
lat1: lat, lng1: lng, lat2: this.o.location[1], lng2: this.o.location[0]
|
||||
}
|
||||
const distance = this.getMapDistance(params)
|
||||
console.log(distance)
|
||||
console.log(this.o.rangeMeter)
|
||||
if (distance > this.o.rangeMeter) {
|
||||
this.$toast('距离活动打卡点还有' + distance + '米')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '签到中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getSignStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,170 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
/*height: 200px;*/
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/activity/unionActivity')" fixed left-arrow
|
||||
placeholder
|
||||
title="个人报名"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="doSave()"
|
||||
block style="border-radius: 10px"
|
||||
type="info"
|
||||
v-if="!isRegister && !isRegisterFull">
|
||||
立即报名
|
||||
</van-button>
|
||||
<van-button :color="themeColor" @click="doSave()"
|
||||
block disabled
|
||||
style="border-radius: 10px"
|
||||
type="info"
|
||||
v-else-if="!isRegister && isRegisterFull">
|
||||
名额已满
|
||||
</van-button>
|
||||
<van-button @click="doCancel"
|
||||
block
|
||||
color="red" style="border-radius: 10px" type="info"
|
||||
v-else-if="isRegister && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
取消报名
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="isRegister && moment().valueOf() < moment(o.endTime).valueOf() && moment().valueOf() > moment(o.startTime).valueOf()">
|
||||
<van-button
|
||||
:color="themeColor"
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
@click="doSign()" block style="border-radius: 10px"
|
||||
type="info">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
tagCloseable: true,
|
||||
isRegister: false,
|
||||
isSign: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async isRegisterForMe() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/isRegisterForMe', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isRegister = resp.data
|
||||
}
|
||||
},
|
||||
async doSave() {
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '报名后若未参加,将有可能影响到其它活动的报名,同时活动开启了现场签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要报名吗?' + message,
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
await this.getHasRegUserNum()
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleRegister', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success(resp.msg)
|
||||
loading.close()
|
||||
pjaxReplace('/mobile/activity/unionActivity')
|
||||
}, 500)
|
||||
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success(resp.msg)
|
||||
loading.close()
|
||||
pjaxReplace('/mobile/activity/unionActivity')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
this.isSign = resp.data
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
this.$toast.success(resp.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.isRegisterForMe()
|
||||
this.getSignStatus()
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,383 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.activity_img_back {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.regCell .van-cell__label .van-tag {
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.userActionPopup {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.userActionPopup .van-cell__value {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.userActionPopup .addBtn {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.userActionPopup .van-action-sheet__item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.userActionPopup .userSelSuccess {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.van-search__action {
|
||||
background-color: #edf0ff
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" @click-left="history.back()" fixed left-arrow
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<van-cell-group class="mt5" inset>
|
||||
<van-cell class="regCell" title="报名人员">
|
||||
<template #label>
|
||||
<div>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
本活动限制总报名人数:({{o.totalUserNumberLimit}})人
|
||||
</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
当前分工会报名限额 <span style="color: orange">({{o.limitUnion.limitNum}})人</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt5" v-loading="tagCloseable">
|
||||
<div v-if="registerList && registerList.length>0">
|
||||
<template v-for="item in registerList">
|
||||
<van-tag :closeable="tagCloseable" :color="themeColor"
|
||||
@close="removeRegUser(item)"
|
||||
size="medium"
|
||||
type="primary">
|
||||
{{item.userName}}
|
||||
</van-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="text-align: center;margin-top: 20px;">
|
||||
无报名人员
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt5" style="text-align: right"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="openUserActionSheet" size="mini"
|
||||
type="info" v-if="tagCloseable">选择报名人员
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-action-sheet class="userActionPopup" title="选择报名人员" v-model="userActionSheet">
|
||||
<van-search @search="onSearchUser" placeholder="请输入姓名搜索" show-action
|
||||
v-model="searchKey">
|
||||
<template #action>
|
||||
<div @click="onSearchUser(searchKey)">搜索</div>
|
||||
</template>
|
||||
|
||||
</van-search>
|
||||
|
||||
<!-- <div class="van-hairline--bottom">-->
|
||||
<!-- 点击列表中的人员添加到活动人员中-->
|
||||
<!-- </div>-->
|
||||
<template v-if="searchLoading">
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
|
||||
<div class="van-action-sheet__content mt5"
|
||||
v-else-if="searchUserList && searchUserList.length>0">
|
||||
|
||||
<template>
|
||||
<template v-for="item in searchUserList"
|
||||
v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</button>
|
||||
</template>
|
||||
<!--<van-empty description="没有更多了" style="position:absolute;height: 70%"
|
||||
v-else></van-empty>-->
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty description="暂无数据" style="position:absolute;height: 70%"
|
||||
v-else-if="searchUserList.length===0"></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="doSave()" block style="border-radius: 10px"
|
||||
type="info"
|
||||
v-if="tagCloseable">
|
||||
提 交
|
||||
</van-button>
|
||||
<template v-else="!tagCloseable">
|
||||
<van-button :color="themeColor" @click="tagCloseable = true"
|
||||
block style="border-radius: 10px"
|
||||
type="info">
|
||||
修 改
|
||||
</van-button>
|
||||
<van-button
|
||||
@click="doCancel"
|
||||
block color="red" style="border-radius: 10px;margin-top: 10px"
|
||||
type="info">
|
||||
取消报名
|
||||
</van-button>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div style="margin: 20px 20px 10px 20px" v-if="tagCloseable">-->
|
||||
<!-- <van-button-->
|
||||
<!-- :disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
<!-- @click="doSign()" style="border-radius: 10px" block type="info"-->
|
||||
<!-- :color="themeColor">-->
|
||||
<!-- 立即签到-->
|
||||
<!-- </van-button>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
activityId: '',
|
||||
o: {},
|
||||
registerList: [],
|
||||
addRegisterList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 400)
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getRegisterUser() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
if (this.o.signUpMethod === 3) {
|
||||
this.registerList = resp.data.filter(v => v.applyUserId === this.userId)
|
||||
} else {
|
||||
this.registerList = resp.data
|
||||
}
|
||||
this.addRegisterList = resp.data
|
||||
if (this.registerList.length > 0) {
|
||||
this.tagCloseable = false
|
||||
}
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchUserList = []
|
||||
this.userActionSheet = true
|
||||
},
|
||||
async onSearchUser(val) {
|
||||
if (!val) {
|
||||
this.$toast.fail("请输入搜索条件")
|
||||
return
|
||||
}
|
||||
this.searchLoading = true
|
||||
const resp = await $.get('/mobile/activity/unionActivity/searchNoRegisterUser', {
|
||||
activityId: this.activityId,
|
||||
searchKey: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
this.$toast.success("添加成功")
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
if (this.userId === item.id) {
|
||||
this.$toast.fail("自己不能删除")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要移除吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
//保存
|
||||
async doSave() {
|
||||
if (this.registerList.length === 0) {
|
||||
this.$toast('请添加报名人员后再提交!')
|
||||
return
|
||||
}
|
||||
if (this.o.signUpMethod === 3) {
|
||||
if (this.registerList.length !== this.o.teamNum) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是双人报名模式您需要报名' + this.o.teamNum + '人!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
if (!this.registerList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是组队模式请您找' + this.o.teamNum + '朋友一起报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
// await this.getRegisterUser()
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
this.addRegisterList = resp.data
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.addRegisterList.forEach(v => {
|
||||
this.registerList.forEach(r => {
|
||||
if (v.id === r.id && v.applyUserId !== this.userId) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '【' + arr.toString() + '】已成功报名您无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
/* if (this.addRegisterList.map(v => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您已报名无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}*/
|
||||
|
||||
}
|
||||
let message = ''
|
||||
if (this.o.needSign) {
|
||||
message = '此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!'
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: message + '您确认要报名吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const params = {
|
||||
activityId: this.activityId,
|
||||
personIds: JSON.stringify(this.registerList.map(v => v.id))
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSaveUnionRegister', params)
|
||||
|
||||
if (resp.code === 0) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
}, 1000)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.fail(resp.msg)
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
await this.getActivityInfo()
|
||||
await this.getRegisterUser()
|
||||
if (this.o.signUpMethod === 3 && this.registerList.length === 0) {
|
||||
this.registerList.push({id: this.userId, userName: this.userName})
|
||||
}
|
||||
this.title = (this.o.signUpMethod === 2 ? '分工会报名' : '组队报名')
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,229 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.operateDiv {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.operateDiv .van-button {
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.selection .van-cell__label .welfare_desc {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 4;
|
||||
-webkit-box-orient: vertical;
|
||||
width: calc(100% - 25px);
|
||||
padding: 0 20px;
|
||||
line-height: 20px;
|
||||
max-height: 80px;
|
||||
/*position: relative;*/
|
||||
}
|
||||
|
||||
.selection .van-cell__label .welfare_desc .more {
|
||||
/*content:"更多";*/
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 10px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="货物展示" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<!--<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"></van-dropdown-item>
|
||||
</van-dropdown-menu>-->
|
||||
|
||||
<van-tabs v-model="pageForm.typeId" @change="doSearch">
|
||||
<van-tab v-for="item in typeList" :title="item.typeName" :name="item.id"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<template>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="mLoading"
|
||||
@load="pageData">
|
||||
<template v-for="o in tableData">
|
||||
<div class="list-card">
|
||||
<div @click="showGoods(o)" class="content">
|
||||
<van-image
|
||||
height="100px"
|
||||
width="100px"
|
||||
radius="8"
|
||||
:src="CREATE_PREVIEW_URL(o.imgUrl)"
|
||||
class="van-image__img">
|
||||
</van-image>
|
||||
<div class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.goodsName}}</span>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<div class="concat">
|
||||
<span>货物价格:</span>
|
||||
{{o.goodsPrice}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>厂商:</span>
|
||||
{{o.manufacturer}}
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="o.description" style="display: flex;color: #969799">
|
||||
{{removeHTMLTag(o.description).substr(0,25)+'...'}}
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<a @click.stop="viewDesc(o.id,o.description)"
|
||||
class="more" style="color:#1867b0"
|
||||
href="#">查看更多</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="mobile" style="display: flex">
|
||||
<span v-html="o.description"></span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-list>
|
||||
</template>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
|
||||
|
||||
<van-popup v-model="descPopup" position="right" :style="{ height: '100%',width: '100%'}"
|
||||
safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="descPopup=false" left-arrow
|
||||
title="详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div class="desc" v-html="desc" @click="descClick($event)"></div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: "",
|
||||
descPopup: false,
|
||||
pageForm:{
|
||||
projectId:null,
|
||||
goodsNAme:null,
|
||||
typeId:null,
|
||||
},
|
||||
typeList:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
descClick(e) {
|
||||
if (e.target.tagName === 'IMG') {
|
||||
vant.ImagePreview([e.target.src])
|
||||
}
|
||||
},
|
||||
doSearch(){
|
||||
this.pageForm.pageNumber=1
|
||||
this.pageData();
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/benefiting/onLoad', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await $.get('/platform/benefiting/type/findAllType')
|
||||
if (resp.code === 0) {
|
||||
this.typeList = resp.data;
|
||||
this.pageForm.typeId = this.typeList[0].id
|
||||
}
|
||||
await this.pageData();
|
||||
},
|
||||
viewDesc(optionId, desc) {
|
||||
this.desc = desc
|
||||
this.descPopup = true
|
||||
},
|
||||
|
||||
},
|
||||
async created(){
|
||||
this.pageForm.projectId = GetQueryString("projectId")
|
||||
await this.getAllType();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="惠民服务" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.projectName"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入项目名称查询"
|
||||
></van-search>
|
||||
|
||||
<template>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="mLoading"
|
||||
@load="pageData">
|
||||
<template v-for="o in tableData">
|
||||
<div class="list-card" style="background-color: #FFFFFF;border-radius: 6px;">
|
||||
<van-card @click="showGoods(o)" class="content">
|
||||
<template #thumb>
|
||||
<img :src="CREATE_PREVIEW_URL(o.cover)"
|
||||
@click="preview(o.cover,o.cover)"
|
||||
class="van-image__img">
|
||||
</template>
|
||||
<template #title>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;line-height: 30px;">
|
||||
{{o.projectName}}
|
||||
</div>
|
||||
</template>
|
||||
<template #desc>
|
||||
<div>
|
||||
<template>
|
||||
<div>
|
||||
年度:{{o.year}}
|
||||
</div>
|
||||
<div style="flex: 1.5">
|
||||
创建时间:
|
||||
{{moment(o.createTime).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</van-card>
|
||||
</div>
|
||||
</template>
|
||||
</van-list>
|
||||
</template>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm:{},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/benefiting/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
async showGoods(o){
|
||||
window.location.href='/mobile/benefiting/goods?projectId=' + o.id
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.pageData();
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,132 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.test{width:9em; overflow:hidden; white-space:nowrap;text-overflow: ellipsis;font-size: 10px;text-align: center;color: #a0a1a1
|
||||
}
|
||||
.test:hover{text-overflow:inherit; overflow:visible;}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="生日祝福" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyWord"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入教职工姓名或者教职工编号进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<div style="display: flex">
|
||||
<div style="width: calc(100% - 100px);background: rgb(255,255,255)">
|
||||
<h4 style="margin-left: 5%;color: rgb(122,110,96)">一份祝福拉进同事的距离~</h4>
|
||||
<h5 style="margin-left: 5%;color: rgb(122,110,96)">{{tableData.length}}同事即将生日</h5>
|
||||
</div>
|
||||
<div style="width: 100px;max-width: 100px">
|
||||
<van-image width="100px"
|
||||
height="100px"
|
||||
src="/assets/mobile/img/birthday/birthday1.png"
|
||||
></van-image>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="margin-top: 160px;margin-bottom: 50px">
|
||||
|
||||
<div>
|
||||
<van-checkbox-group v-model="result">
|
||||
<van-grid :column-num="3" :border="false" style="background-color: white">
|
||||
<van-grid-item
|
||||
v-for="o in tableData"
|
||||
:key="o.userId" style="padding: 5px;">
|
||||
<span style="font-size: 10px">{{o.birthday.substr(0,2)}}-{{o.birthday.substr(2,4)}}</span>
|
||||
|
||||
<div style="background-image: url('/assets/mobile/img/birthday/birthday2.png');
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">
|
||||
<span style="font-size: 20px;font-weight: bold;font-family: cursive">{{o.username.substr(0,1)}}</span>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.username}}</span>
|
||||
<div class="test">
|
||||
<span>{{o.unitName}}</span>
|
||||
</div>
|
||||
<!-- <span v-if="o.unitName.length>7" style="font-size: 10px;">{{o.unitName.substr(0,7)+"..."}}</span>-->
|
||||
<!-- <span v-else style="font-size: 10px">{{o.unitName}}</span>-->
|
||||
<van-checkbox
|
||||
style="margin-left: 80px;margin-top: -35px"
|
||||
icon-size="20px"
|
||||
:name="o.userId" ref="checkboxes">
|
||||
</van-checkbox>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar route>
|
||||
<van-tabbar-item replace @click="sendBlessings()" style="font-size: 16px;">送上祝福</van-tabbar-item>
|
||||
<van-tabbar-item replace @click="showMine()" style="font-size: 16px">我收到的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageForm: {},
|
||||
checked: true,
|
||||
result: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await $.post('/mobile/birthday/greeting/pageData', this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
},
|
||||
//送上祝福
|
||||
sendBlessings() {
|
||||
if(this.result.length===0){
|
||||
this.$toast.fail("请选择教职工");
|
||||
return;
|
||||
}
|
||||
localStorage.setItem("greetingResult",this.result);
|
||||
window.location.href = '/mobile/birthday/greeting/greeting_list'
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
showMine() {
|
||||
window.location.href = '/mobile/birthday/greeting/greeting_info'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.onLoad();
|
||||
},
|
||||
components: {
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,134 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.van-cell {
|
||||
padding: 4px 16px;
|
||||
}
|
||||
.van-cell-group--inset {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar title="我收到的祝福" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.username"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入教职工姓名进行查询"
|
||||
>
|
||||
</van-search>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 70px">
|
||||
<van-list v-model="mLoading" :finished="finished" :finished-text="giftInfo.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div v-for="o in giftInfo" :key="o.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="font-size: 15px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
margin-left: 15px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;">
|
||||
<span style="color: #3ea1ec">{{o.username}}</span>
|
||||
<span style="color: #3ea1ec">|</span>
|
||||
<span style="font-size: 10px;font-weight: normal;color: #a0a1a1">{{o.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 10px">
|
||||
<van-cell-group inset >
|
||||
<van-cell :border="false" title="赠送日期">{{o.giftTime}}</van-cell>
|
||||
<van-cell :border="false" title="祝福语">
|
||||
<span v-if="o.message.length==0">无</span>
|
||||
<span v-if="o.message.length>0">{{o.message}}</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="生日贺卡" @click="showHk(o)"
|
||||
v-if="o.isSend==1" is-link value="点击展示"></van-cell>
|
||||
<van-cell :border="false" title="赠送礼物">
|
||||
<van-image style="width: 50px;height: 50px" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="showGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&giftInfo.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#app',
|
||||
mixins: [mobileMixins],
|
||||
data(){
|
||||
return{
|
||||
show: false,
|
||||
images:'',
|
||||
giftInfo:[],
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doSearch(){
|
||||
this.pageForm.pageNumber = 1
|
||||
this.giftInfo = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
const res = await $.post('/mobile/birthday/greeting/giftInfo', this.pageForm)
|
||||
this.mLoading = false
|
||||
if (res.code === 0) {
|
||||
res.data.list.forEach(v => {
|
||||
if(!(typeof v.files =='object')){
|
||||
v.files = JSON.parse(v.files)
|
||||
}
|
||||
})
|
||||
this.giftInfo = this.giftInfo.concat(res.data.list)
|
||||
if (this.giftInfo.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
},
|
||||
showGift(data){
|
||||
vant.ImagePreview([data])
|
||||
},
|
||||
showHk(o){
|
||||
window.location.href='/mobile/birthday/greeting/hk?id='+o.id
|
||||
},
|
||||
},
|
||||
created(){
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,173 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.sub{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-size: 100% 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" style="background-color: white">
|
||||
<van-nav-bar title="精选礼物" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<div>
|
||||
<span style="color: rgb(114,90,69);margin-left: 10px;font-size: 14px;font-weight: bold">正在为
|
||||
<span v-for="o in tableData"> {{o.username}} </span>挑选礼物
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-grid :column-num="6" :border="false">
|
||||
<van-grid-item
|
||||
v-for="o in tableData"
|
||||
:key="o.userId" style="padding: 5px;">
|
||||
<div style="background-color: rgb(203,200,222);
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 25px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">
|
||||
<span style="font-size: 20px">{{o.username.substr(0,1)}}</span>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.username}}</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div><h3 style="margin-left: 10px">精选礼物</h3></div>
|
||||
<div>
|
||||
<van-grid :column-num="3" :border="false">
|
||||
<van-grid-item
|
||||
v-for="(o,index) in listGift"
|
||||
:key="o.id" style="padding: 5px;">
|
||||
<div class="sub">
|
||||
<van-image :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id" @click="sendGift(APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id=' + o.files[0].id,o.id)"></van-image>
|
||||
</div>
|
||||
<span style="font-size: 10px">{{o.giftName}}</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<van-dialog v-model="show" title="送上礼物" show-cancel-button :before-close="beforeClose">
|
||||
<div>
|
||||
<img :src="images" style="display: flex;align-items: center;justify-content: center;height: 100px;margin: 0 auto"/>
|
||||
</div>
|
||||
<div style="margin-top: 10px;margin-bottom: 10px">
|
||||
<van-field
|
||||
v-model="form.message"
|
||||
rows="2"
|
||||
autosize
|
||||
label="祝福语"
|
||||
type="textarea"
|
||||
maxlength="100"
|
||||
placeholder="请输入祝福语"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
<div style="margin-top: 10px;margin-bottom: 10px">
|
||||
<van-row>
|
||||
<van-col span="16">
|
||||
<van-cell center title="是否发送贺卡">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="form.isSend" @click="send" size="24"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button round type="info" @click="showHk()">贺卡展示</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#app',
|
||||
data(){
|
||||
return{
|
||||
pageForm:{
|
||||
greetingResult:localStorage.getItem("greetingResult"),
|
||||
},
|
||||
tableData:[],
|
||||
listGift:[],
|
||||
show: false,
|
||||
images:'',
|
||||
form:{
|
||||
giftId:'',
|
||||
message:'',
|
||||
isSend:false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async loadList(){
|
||||
const res = await $.post('/mobile/birthday/greeting/loadList',this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
},
|
||||
async giftList(){
|
||||
const res = await $.get('/mobile/birthday/greeting/giftList')
|
||||
if (res.code === 0) {
|
||||
res.data.forEach(v => {
|
||||
if(!(typeof v.files =='object')){
|
||||
v.files = JSON.parse(v.files)
|
||||
}
|
||||
})
|
||||
this.listGift = res.data
|
||||
}
|
||||
},
|
||||
sendGift(data,id){
|
||||
this.show=true;
|
||||
this.images=data;
|
||||
this.form.giftId=id;
|
||||
this.form.greetingResult=this.pageForm.greetingResult;
|
||||
},
|
||||
beforeClose : async function (action, done) { // 点击事件 - 备注按钮提示框
|
||||
if (action === 'confirm') { // 确认
|
||||
const res = await $.post('/mobile/birthday/greeting/sendBlessing', this.form)
|
||||
if (res.code === 0) {
|
||||
done(); // 关闭提示框
|
||||
this.$toast.success("赠送成功")
|
||||
} else {
|
||||
done();
|
||||
this.$toast.fail("操作失败")
|
||||
}
|
||||
} else if (action === 'cancel') { // 取消
|
||||
this.show = false;
|
||||
this.images = '';
|
||||
this.form = {};
|
||||
done(); // 关闭提示框
|
||||
}
|
||||
},
|
||||
send(){
|
||||
console.log(this.form.isSend)
|
||||
},
|
||||
showHk(){
|
||||
window.location.href='/mobile/birthday/greeting/hk'
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.loadList();
|
||||
this.giftList();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,113 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="主题" :border="false">{{o.hdname}}</van-cell>
|
||||
<van-cell :border="false" title="创建人">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="创建时间">{{o.hdcjsj}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.hdkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.hdjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/cahd/apply">亲子作品征集</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/cahd/list">我的亲子作品</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 2,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/mobile/cahd/apply/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {hdid, hdjssj, hdkssj} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
|
||||
vant.Toast('报名暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
|
||||
vant.Toast('报名已结束!')
|
||||
return
|
||||
}
|
||||
window.location.href = '/childrenActivities?client=mobile&id=' + hdid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.register-icon {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="作品列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="location.href='/mobile/index'"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-notice-bar mode="closeable">左滑可删除作品。</van-notice-bar>
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-swipe-cell>
|
||||
<van-cell-group inset>
|
||||
<image class="register-icon" src="/assets/mobile/svg/wmhd/bianji.svg"
|
||||
@click.stop="openEdit(o.id,o.hdid)"></image>
|
||||
<van-cell :border="false" title="活动主题">{{o.hdname}}</van-cell>
|
||||
<van-cell :border="false" title="作品主题">{{o.zpzt}}</van-cell>
|
||||
<van-cell :border="false" title="子女姓名">{{o.znxm}}</van-cell>
|
||||
<van-cell :border="false" title="教职工姓名">{{o.sbrname}}</van-cell>
|
||||
<van-cell :border="false" title="工资号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="与子女关系">{{o.zngx}}</van-cell>
|
||||
<van-cell :border="false" title="单位">{{o.dwname}}</van-cell>
|
||||
<van-cell :border="false" title="分工会">{{o.ghname}}</van-cell>
|
||||
<van-cell :border="false" title="活动类别">{{o.hdlbname}}</van-cell>
|
||||
<van-cell :border="false" title="上传时间">{{o.sbsj}}</van-cell>
|
||||
</van-cell-group>
|
||||
<template #right>
|
||||
<van-button square text="删除" type="danger" @click="doDelete(o.id)"
|
||||
style="height: 100%;"></van-button>
|
||||
</template>
|
||||
</van-swipe-cell>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
openEdit(id, hdid) {
|
||||
window.location.href = '/childrenActivities?client=mobile&id=' + hdid + '&zpid=' + id
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确定要删除此次作品吗?',
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const data = await $.post("/platform/hd/childhd/zpxx/dodelete", {id: id})
|
||||
if (data.code == 0) {
|
||||
await this.yearChange()
|
||||
vant.Toast.success('删除成功');
|
||||
}
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/childhd/sczp/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/cahd/list/view?id=' + o.id
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,37 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/video/css/video-js.min.css">
|
||||
<script src="${base!}/assets/platform/plugins/video/js/video.min.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<mobile-cahd-info ref="minfo"></mobile-cahd-info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
components: {
|
||||
'mobile-cahd-info': httpVueLoader('/components/mobile/cahd/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const id = GetQueryString("id")
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getInfo(id)
|
||||
}, 100)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,75 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.container .van-button {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 184px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 8px 24px;
|
||||
box-sizing: border-box;
|
||||
font-weight: 700;
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
line-height: 1.41176471;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: calc(100vh - 46px);
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="代表证" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="container">
|
||||
<van-button @click="showCard('jdh')" style="margin-bottom: 40px;">教代会代表证</van-button>
|
||||
<van-button @click="showCard('gdh')">工代会代表证</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async showCard(type) {
|
||||
//先查看当前登录用户是不是代表
|
||||
const resp = await $.post('/platform/card/isDb', {type: type})
|
||||
if(resp.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
return
|
||||
}
|
||||
//获取代表证
|
||||
vant.ImagePreview(['/platform/card/showCard?type=' + type])
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,379 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-doc-card .van-button--small {
|
||||
border-radius: 8px;
|
||||
width: 60px !important;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 90%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 60px;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
.van-radio-group {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
.van-action-sheet {
|
||||
max-height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="社团审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入工号或姓名进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.radioType" :options="auditOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubId" :options="clubOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.userType" :options="userTypeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.username}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">社团名称:</span>
|
||||
<span>{{o.clubname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">工  号:</span>
|
||||
<span>{{o.loginname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">所属单位:</span>
|
||||
<span>{{o.unitname}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">申请时间:</span>
|
||||
<span>{{o.join_time}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="openView(o)"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">
|
||||
查看
|
||||
</van-button>
|
||||
<van-button @click.stop="openAudit(o)" v-if="o.status == 1"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">
|
||||
审核
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="infoShow" :closeable="false" :round="false">
|
||||
<van-nav-bar
|
||||
title="详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
<club-user-apply-info ref="applyInfo" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
协会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="审核签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">审核签字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" v-model="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doReview(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doReview(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</club-user-apply-info>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: false,
|
||||
clubOptions: [],
|
||||
userTypeOptions: [],
|
||||
auditOptions: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '已审核', value: 2},
|
||||
{text: '未审核', value: 3},
|
||||
],
|
||||
pageForm: {
|
||||
radioType: 3
|
||||
},
|
||||
infoShow: false,
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'club-user-apply-info': httpVueLoader('/components/mobile/club/mobileClubUserApplyInfo.vue?v=1.0.1'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openAudit(row) {
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
this.infoShow = true
|
||||
this.handle = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.applyInfo.getInfo(row.id)
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.handle = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.applyInfo.getInfo(row.id)
|
||||
})
|
||||
},
|
||||
async doReview(flag) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
vant.Toast('请填写审核意见');
|
||||
return
|
||||
}
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签字')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post("/platform/sys/club/sh/check", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sh/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async getMyMangeClub() {
|
||||
const {data} = await $.get("/platform/sys/club/users/getMyMangeClub")
|
||||
return data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await this.getMyMangeClub()
|
||||
data.forEach(item => {
|
||||
this.clubOptions.push({text: item.name, value: item.id})
|
||||
})
|
||||
this.clubOptions.unshift({text: '全部社团'})
|
||||
const userType = await getDictOptions('UserType')
|
||||
userType.forEach(item => {
|
||||
this.userTypeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.userTypeOptions.unshift({text: '人员类型'})
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,526 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__title, .van-cell__value{
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.van-cell__value {
|
||||
width: 68%;
|
||||
}
|
||||
|
||||
.van-cell__right-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
padding: 7px 16px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
title="加入社团"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入社团名称进行查询"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.isjr" :options="clubType"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false" @load="onLoad"
|
||||
:finished-text="tableData.length>0?'没有更多了':''">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待社团审核</span>
|
||||
<span v-if="o.status==2" style="color: red">社团拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">电  话:</span>
|
||||
<span>{{o.fzr_mobile}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">会  长:</span>{{o.hz}}</van-col>
|
||||
<van-col span="12">
|
||||
<span style="color: grey">成立时间:</span>
|
||||
<span>{{moment(o.foundTime).format('YYYY-MM-DD')}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click="openInfo(o, 'view')" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
查看
|
||||
</van-button>
|
||||
<van-button @click="rollback(o)" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary"
|
||||
v-if="pageForm.isjr === true && o.status==1">撤销申请
|
||||
</van-button>
|
||||
<van-button @click="openInfo(o, 'join')"
|
||||
color="#1867b0" v-if="pageForm.isjr === false"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
我要加入
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" get-container="#app" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
<van-nav-bar
|
||||
title="社团详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false"
|
||||
safe-area-inset-top></van-nav-bar>
|
||||
<van-tabs v-model="infoActive">
|
||||
<van-tab title="社团信息">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="社团名称">{{ detailData.name }}</van-cell>
|
||||
<van-cell title="成立时间">{{ detailData.foundtime }}</van-cell>
|
||||
<van-cell title="报名联系人">{{ detailData.fzrname }}</van-cell>
|
||||
<van-cell title="所属单位">{{ detailData.fzr_unit_name }}</van-cell>
|
||||
<van-cell title="联系人电话">{{ detailData.concatpersonmobile }}</van-cell>
|
||||
<van-cell title="联系人邮箱">{{ detailData.concatpersonemail }}</van-cell>
|
||||
<van-cell title="会费标准">{{ detailData.dues_standard }}</van-cell>
|
||||
<van-cell title="当前人数">{{ detailData.cynum }}</van-cell>
|
||||
<van-cell title="QQ群二维码" @click="showCode('QQ')">
|
||||
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
||||
</van-cell>
|
||||
<van-cell title="微信群二维码" @click="showCode('weChat')">
|
||||
<span style="cursor: pointer; color: #236eb4">点击查看</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
<van-tab class="info_tab" v-if="viewType === 'join'" title="个人信息">
|
||||
<van-form @submit="needJoin" ref="form" :show-error-message="false">
|
||||
|
||||
<div class="van-doc-card" style="margin-bottom: 16px; box-shadow: 0 0 16px 0 #ebedf0; margin-top: 10px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field readonly v-model="formData.username" name="username" required
|
||||
label="姓名" :rules="[{ required: true }]"></van-field>
|
||||
<van-field readonly v-model="formData.sex" name="sex" required
|
||||
label="性别" :rules="[{ required: true }]"></van-field>
|
||||
<van-field readonly v-model="formData.loginname" name="loginname" required
|
||||
label="工号" :rules="[{ required: true }]"></van-field>
|
||||
<van-field readonly v-model="formData.unitName" name="unitName" required
|
||||
label="工作部门" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.mobile" name="mobile" required
|
||||
label="电话" placeholder="请填写电话" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.QQNumber" name="QQNumber" required type="digit"
|
||||
label="QQ" placeholder="请填写QQ" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.hobby" name="hobby" required
|
||||
placeholder="请填写爱好" label="爱好" :rules="[{ required: true }]"></van-field>
|
||||
|
||||
<van-field v-model="formData.sickness" name="sickness" required @click="sicknessVisible = true" is-link
|
||||
placeholder="请选择是否患有运动限制类疾病" label="是否患有运动限制类疾病" :rules="[{ required: true }]"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-doc-card" style="margin-bottom: 16px; box-shadow: 0 0 16px 0 #ebedf0; margin-top: 10px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
紧急联系人(建议家人)信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field v-model="formData.familyUserName" name="familyUserName" required
|
||||
placeholder="请填写紧急联系人姓名" label="姓名" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.familyRelation" name="familyRelation" required
|
||||
placeholder="请填写紧急联系人关系" label="与申请者关系" :rules="[{ required: true }]"></van-field>
|
||||
<van-field v-model="formData.familyMobile" name="familyMobile" required type="tel"
|
||||
placeholder="请填写紧急联系人电话" label="联系电话" :rules="[{ required: true }]"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-doc-card" style="margin-bottom: 16px; box-shadow: 0 0 16px 0 #ebedf0; margin-top: 10px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
选填项
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field v-model="formData.project" name="project"
|
||||
rows="1"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="请填写擅长项目" label="擅长项目"></van-field>
|
||||
|
||||
<van-field v-model="formData.selfSkill" name="selfSkill" @click="selfSkillVisible = true" is-link
|
||||
placeholder="请选择个人技能水平" label="个人技能水平"></van-field>
|
||||
|
||||
<van-field v-model="formData.playRole" name="playRole" @click="playRoleVisible = true" is-link
|
||||
placeholder="请选择期望在协会中扮演的角色" label="期望在协会中扮演的角色"></van-field>
|
||||
|
||||
<van-field v-model="formData.provideServices" name="provideServices" @click="provideServicesVisible = true" is-link
|
||||
placeholder="请选择是否愿意为协会提供志愿服务" label="是否愿意为协会提供志愿服务"></van-field>
|
||||
|
||||
<van-field v-model="formData.joinManageWork" name="joinManageWork" @click="joinManageWorkVisible = true" is-link
|
||||
placeholder="请选择是否愿意参与协会的管理工作" label="是否愿意参与协会的管理工作"></van-field>
|
||||
|
||||
<van-field v-model="formData.giveHelp" name="giveHelp" @click="giveHelpVisible = true" is-link
|
||||
placeholder="请选择是否愿意为协会的活动提供赞助或资源支持" label="是否愿意为协会的活动提供赞助或资源支持"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit" native-type="submit">申请加入</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</van-popup>
|
||||
|
||||
<van-popup position="bottom" round v-model="sicknessVisible">
|
||||
<van-picker
|
||||
title="是否患有运动限制类疾病" show-toolbar
|
||||
:columns="['有', '无']"
|
||||
@confirm="(value, index) => {formData.sickness = value; sicknessVisible = false}"
|
||||
@cancel="formData.sickness = ''; sicknessVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<van-popup position="bottom" round v-model="selfSkillVisible">
|
||||
<van-picker
|
||||
title="个人技能水平" show-toolbar
|
||||
:columns="['无(零基础)', '初级(初学者)', '中级(有一定基础)', '高级(经验丰富)', '专业(领域专家)']"
|
||||
@confirm="(value, index) => {formData.selfSkill = value; selfSkillVisible = false}"
|
||||
@cancel="formData.selfSkill = ''; selfSkillVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<van-popup position="bottom" round v-model="playRoleVisible">
|
||||
<van-picker
|
||||
title="期望在协会中扮演的角色" show-toolbar
|
||||
:columns="['普通会员', '志愿者', '组织者/协调者', '专业指导']"
|
||||
@confirm="(value, index) => {formData.playRole = value; playRoleVisible = false}"
|
||||
@cancel="formData.playRole = ''; playRoleVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<van-popup position="bottom" round v-model="provideServicesVisible">
|
||||
<van-picker
|
||||
title="是否愿意为协会提供志愿服务" show-toolbar
|
||||
:columns="['是', '否']"
|
||||
@confirm="(value, index) => {formData.provideServices = value; provideServicesVisible = false}"
|
||||
@cancel="formData.provideServices = ''; provideServicesVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<van-popup position="bottom" round v-model="joinManageWorkVisible">
|
||||
<van-picker
|
||||
title="是否愿意参与协会的管理工作" show-toolbar
|
||||
:columns="['是', '否']"
|
||||
@confirm="(value, index) => {formData.joinManageWork = value; joinManageWorkVisible = false}"
|
||||
@cancel="formData.joinManageWork = ''; joinManageWorkVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
<van-popup position="bottom" round v-model="giveHelpVisible">
|
||||
<van-picker
|
||||
title="是否愿意为协会的活动提供赞助或资源支持" show-toolbar
|
||||
:columns="['是', '否']"
|
||||
@confirm="(value, index) => {formData.giveHelp = value; giveHelpVisible = false}"
|
||||
@cancel="formData.giveHelp = ''; giveHelpVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
showPicker: false,
|
||||
infoActive: 0,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
|
||||
infoShow: false,
|
||||
detailData: {},
|
||||
viewType: '',
|
||||
sicknessVisible: false,
|
||||
giveHelpVisible: false,
|
||||
joinManageWorkVisible: false,
|
||||
provideServicesVisible: false,
|
||||
playRoleVisible: false,
|
||||
selfSkillVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showCode(type) {
|
||||
if(type === 'QQ' && this.clickRow.qqgroupcode) {
|
||||
const ids = JSON.parse(this.clickRow.qqgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
vant.ImagePreview({images: ids})
|
||||
} else if(type === 'weChat' && this.clickRow.wechatgroupcode) {
|
||||
const ids = JSON.parse(this.clickRow.wechatgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
vant.ImagePreview({images: ids})
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
openInfo(row, type) {
|
||||
this.viewType = type
|
||||
this.infoActive = type === 'view' ? 0 : 1
|
||||
if(type === 'join') {
|
||||
this.formData = {
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
birthday: "${@shiro.getPrincipalProperty('birthday')}",
|
||||
birthPlace: "${@shiro.getPrincipalProperty('birthPlace')}",
|
||||
education: "${@shiro.getPrincipalProperty('education')}",
|
||||
hobby: "${@shiro.getPrincipalProperty('hobby')}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
position: "${@shiro.getPrincipalProperty('position')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
email: "${@shiro.getPrincipalProperty('email')}",
|
||||
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
|
||||
}
|
||||
}
|
||||
this.clickRow = row
|
||||
$.get("/platform/sys/club/mange/findOne", {id: row.id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
this.detailData = data.data
|
||||
this.infoShow = true
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async needJoin() {
|
||||
const row = this.clickRow
|
||||
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
|
||||
let str = ''
|
||||
if (data && data.length > 0) {
|
||||
str = '您已经加入了'
|
||||
data.forEach((item) => {
|
||||
str += '【' + item.name + '】'
|
||||
})
|
||||
str += ','
|
||||
}
|
||||
str += '请确认是否申请加入【' + row.name + '】?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
|
||||
this.formData.clubid = row.id
|
||||
$.post("/platform/sys/club/sq/submit", this.formData, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast(data.msg)
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
} else {
|
||||
vant.Toast(data.msg)
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
rollback(o) {
|
||||
vant.Dialog.confirm({title: '提示', message: '请确定是否撤销申请?',}).then(() => {
|
||||
const id = o.id
|
||||
$.post("/platform/sys/club/sq/revocation", {id}, (data) => {
|
||||
if (data.code === 0) {
|
||||
vant.Toast('撤销申请成功');
|
||||
this.doSearch();
|
||||
} else {
|
||||
vant.Toast(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const data = await getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.$set(this.pageForm, "isjr", this.clubType[0].value)
|
||||
this.pageForm.searchName = 'club.name'
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,382 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-doc-card .van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 90%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.userPopup .van-cell {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="校工会审核"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入社团名称进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="typeOptions" @change="doSearch"
|
||||
v-model="pageForm.clubType"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false" @load="onLoad"
|
||||
v-model="loading"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<!--<div style="color: #1867b0; white-space: nowrap;">
|
||||
<span v-if="o.status==1">待社团审核</span>
|
||||
<span v-if="o.status==2" style="color: red">社团拒绝</span>
|
||||
<span v-if="o.status==3">待校工会审核</span>
|
||||
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
|
||||
<span v-if="o.status==5" style="color: green">审核通过</span>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">联 系 人:</span>{{o.fzrname}}</van-col>
|
||||
<van-col span="12"><span style="color: grey">电  话:</span>{{o.fzr_mobile}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="12"><span style="color: grey">限定人数:</span>{{o.number}}人</van-col>
|
||||
<van-col span="12"><span style="color: grey">当前人数:</span>{{o.people_num}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col class="cus_overflow" span="24">
|
||||
<span style="color: grey">介绍链接:</span>
|
||||
<span @click.stop="window.open(o.introduce_href.indexOf('http') !== -1 ? o.introduce_href : 'https://' + o.introduce_href)"
|
||||
style="color: #236eb4">{{o.introduce_href}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">已审{{o.has_audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet @close="popClose" class="userPopup" title="申请人员列表" v-model:show="userShow">
|
||||
<div class="content">
|
||||
<div class="van-doc-card">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<van-tag @click="checkAll()" plain size="large" type="primary">全选</van-tag>
|
||||
<van-tag @click="toggleAll()" plain size="large" style="margin-left: 6px" type="primary">反选
|
||||
</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<van-checkbox-group ref="checkboxGroup" v-if="userList !== null" v-model="result">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
:key="obj.id"
|
||||
@click="toggle(index)" class="cus_cell"
|
||||
clickable
|
||||
v-for="(obj, index) in userList">
|
||||
|
||||
<div><span style="color: grey">姓  名:</span>{{obj.username}}</div>
|
||||
<div><span style="color: grey">工  号:</span>{{obj.loginname}}</div>
|
||||
<div><span style="color: grey">单  位:</span>{{obj.unitname}}</div>
|
||||
<div><span style="color: grey">性  别:</span>{{obj.sex}}</div>
|
||||
<div><span style="color: grey">联系方式:</span>{{obj.mobile}}</div>
|
||||
<!--<span style="display: inline-block; width: 86px">{{obj.username}}</span>
|
||||
<span class="unit">{{obj.unitname}}</span>
|
||||
<br/>
|
||||
<span style="display: inline-block; width: 85px">{{obj.sex}}</span>
|
||||
<span style="display: inline-block; width: 106px">13296575967</span>
|
||||
<span style="display: inline-block;">{{obj.loginname}}</span>-->
|
||||
<van-icon class="audit_icon" color="green"
|
||||
name="passed"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === true"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey"
|
||||
name="close"
|
||||
v-if="queryType === 'hasAudit' && obj.auditstate === false"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<div style="margin-top: 4px; text-align: center" v-else>暂无申请人员</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
queryType: '',
|
||||
result: [],
|
||||
userList: [],
|
||||
userShow: false,
|
||||
clickRow: {},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async audit(type, auditType) {
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
const str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择!' : '您确定要一键全部审核吗?'
|
||||
vant.Dialog.confirm({title: '提示', message: str,}).then(async () => {
|
||||
let idList = this.result
|
||||
if (type === 'all') {
|
||||
idList = this.userList.map(o => o.id)
|
||||
}
|
||||
const resp = await $.post('/platform/sys/club/sh/check', {
|
||||
ids: JSON.stringify(idList),
|
||||
flag: auditType === 'pass',
|
||||
type: 2,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
this.userShow = false
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
checkAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll() {
|
||||
this.$refs.checkboxGroup.children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
|
||||
id: o.id,
|
||||
auditType: 'hasAudit',
|
||||
type: 2,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.sort((a, b) => {
|
||||
return b.auditstate - a.auditstate
|
||||
})
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
async openView(o) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await $.post('/platform/sys/club/sh/getClubUser', {
|
||||
id: o.id,
|
||||
auditType: 'notAudit',
|
||||
type: 2,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无申请人员')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
this.pageForm.type = 2
|
||||
$.post('/platform/sys/club/sh/getMyClub', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const data = await getClubType()
|
||||
data.forEach(item => {
|
||||
this.typeOptions.push({text: item.name, value: item.code})
|
||||
})
|
||||
this.typeOptions.unshift({text: '全部类型'})
|
||||
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,403 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写慰问申请" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right" style="margin-bottom: 60px">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="manager_name"
|
||||
label="经办人姓名"></van-field>
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('loginname')}" name="manager_name"
|
||||
label="经办人工号"></van-field>
|
||||
<van-field @input="userRemoteMethod" name="be_user_name"
|
||||
required
|
||||
v-model="formData.be_user_name" label="慰问对象" placeholder="请输入慰问对象"
|
||||
:rules="[{ required: true, message: '请填写慰问对象' }]"></van-field>
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []; formData.be_user_name = ''"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field readonly :value="formData.apply_time" name="apply_time"
|
||||
label="申请时间"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-field @input="payeeUserRemoteMethod" name="payee_name"
|
||||
required :rules="[{ required: true, message: '请选择收款人' }]"
|
||||
v-model="formData.payee_name" label="收款人" placeholder="请输入收款人"></van-field>
|
||||
<van-action-sheet v-model="payeeSheetShow"
|
||||
:actions="payeeUserList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="payeeUserList = []; formData.payee_name = ''"
|
||||
:close-on-click-overlay="false"
|
||||
@select="payeeOnUserSelect">
|
||||
</van-action-sheet>
|
||||
<!--<van-field v-model="formData.payee_bank_number" name="payee_bank_number" type="number"
|
||||
label="收款人银行卡" placeholder="请输入收款人银行卡"></van-field>
|
||||
<van-field v-model="formData.payee_bank_name" name="payee_bank_name"
|
||||
label="收款人开户行" placeholder="请输入收款人开户行"></van-field>-->
|
||||
|
||||
|
||||
<van-field readonly clickable name="type" :value="formData.typeName"
|
||||
required
|
||||
label="慰问类型"
|
||||
@click="showTypePicker = true" placeholder="点击选择慰问类型"
|
||||
:rules="[{ required:true, message: '请选择慰问类型'}]"></van-field>
|
||||
<van-popup v-model:show="showTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="typeColumns" @confirm="onTypeConfirm"
|
||||
@cancel="showTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field readonly clickable name="way" :value="formData.wayName"
|
||||
label="慰问方式"
|
||||
required
|
||||
placeholder="点击选择慰问方式"
|
||||
:rules="[{ required:true, message: '请选择慰问方式'}]"></van-field>
|
||||
<van-popup v-model:show="showWayPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="wayColumns" @confirm="onWayConfirm"
|
||||
@cancel="showWayPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.money" name="money" type="number" label="慰问金额"
|
||||
placeholder="请填写慰问金额"
|
||||
:rules="[{ required:true, message: '请填写慰问金额' }]"></van-field>
|
||||
|
||||
<!-- 孩次 -->
|
||||
<van-field readonly clickable name="type" v-model="formData.birth_child_num"
|
||||
required v-if="formData.type==='2'"
|
||||
label="孩次"
|
||||
@click="showChildPicker = true" placeholder="点击选择孩次"
|
||||
:rules="[{ required:true, message: '请选择孩次'}]"></van-field>
|
||||
<van-popup v-model:show="showChildPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="childColumns" @confirm="onChildConfirm"
|
||||
@cancel="showChildPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写慰问时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="occur_time"
|
||||
:value="formData.occur_time"
|
||||
label="慰问时间"
|
||||
placeholder="点击选择慰问时间"
|
||||
@click="showOccurTime = true"
|
||||
></van-field>
|
||||
<van-calendar v-model="showOccurTime"
|
||||
@confirm="onOccurTimeConfirm"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
:color="themeColor"></van-calendar>
|
||||
|
||||
<template v-if="['3','4'].includes(formData.type)">
|
||||
<van-field v-model="formData.the_hospital" name="the_hospital" label="治疗医院"
|
||||
placeholder="请填写治疗医院" required
|
||||
:rules="[{ required:true, message: '请填写治疗医院' }]"></van-field>
|
||||
<van-field v-model="formData.the_hospital_house_num" name="the_hospital_house_num" label="病房号"
|
||||
placeholder="请填写病房号" required
|
||||
:rules="[{ required:true, message: '请填写病房号' }]"></van-field>
|
||||
<van-field v-model="formData.the_hospital_house_bed_num" name="the_hospital_house_bed_num" label="床号"
|
||||
placeholder="请填写床号" required
|
||||
:rules="[{ required:true, message: '请填写床号' }]"></van-field>
|
||||
</template>
|
||||
|
||||
<template v-if="['4'].includes(formData.type)">
|
||||
<van-field v-model="formData.hospital_by" name="hospital_by" label="患病病种"
|
||||
placeholder="请填写患病病种" required
|
||||
:rules="[{ required:true, message: '请填写患病病种' }]"></van-field>
|
||||
</template>
|
||||
|
||||
<template v-if="['6'].includes(formData.type)">
|
||||
<van-field v-model="formData.deadImmediateFamily" name="deadImmediateFamily" label="直系亲属"
|
||||
placeholder="配偶、父亲、母亲、子女" required
|
||||
:rules="[{ required:true, message: '必填' }]"></van-field>
|
||||
</template>
|
||||
|
||||
<!-- <template-->
|
||||
<!-- v-if="['c7175af55693441e8233be4552cef9d5','0872ea0b95aa463fb8d98c46bdf72537'].includes(formData.type)">-->
|
||||
<!-- <van-field :value="formData.hospital_stay"-->
|
||||
<!-- readonly clickable required-->
|
||||
<!-- @click="hospital_stay = true"-->
|
||||
<!-- name="hospital_stay" label="住院时间"-->
|
||||
<!-- placeholder="请选择住院时间"-->
|
||||
<!-- :rules="[{ required:true, message: '请选择住院时间' }]"></van-field>-->
|
||||
<!-- <van-calendar v-model="hospital_stay" type="range" @confirm="onConfirm"-->
|
||||
<!-- :min-date="new Date('1999-01-01')"-->
|
||||
<!-- :color="themeColor"></van-calendar>-->
|
||||
|
||||
<!-- <van-field v-model="formData.the_hospital" name="the_hospital" name="type" label="所在医院"-->
|
||||
<!-- placeholder="请填写所在医院" required-->
|
||||
<!-- :rules="[{ required:true, message: '请填写所在医院' }]"></van-field>-->
|
||||
<!-- </template>-->
|
||||
|
||||
<van-field v-model="formData.remark" name="remark" label="申请事由" style="flex-flow: column"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写申请事由' }]"
|
||||
placeholder="请填写申请事由"
|
||||
input-align="left"
|
||||
rows="3" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
<template #label>
|
||||
<div class="mb10">申请事由</div>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="isUploadFile === true">
|
||||
<van-field name="files" label="附  件" required
|
||||
style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<div style="margin: 0 0 7px 15px;" v-if="isUploadFile && uploadFileDesc">
|
||||
<span style="color:red;">上传附件说明:{{ uploadFileDesc }}</span>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive" style="z-index: 99">
|
||||
<van-tabbar-item icon="home-o" replace @click="pjaxReplace('/mobile/condolence/apply/for')">慰问申请
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace @click="pjaxReplace('/mobile/condolence/apply')">慰问记录
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
goods: [],
|
||||
payeeSheetShow: false,
|
||||
payeeUserList: [],
|
||||
hospital_stay: false,
|
||||
userList: [],
|
||||
formData: {},
|
||||
showTypePicker: false,
|
||||
showWayPicker: false,
|
||||
sheetShow: false,
|
||||
typeColumns: [],
|
||||
wayColumns: [],
|
||||
files: [],
|
||||
showOccurTime: false,
|
||||
// minDate: moment().subtract(5, 'year')._d,
|
||||
minDate: new Date(2010, 1, 1),
|
||||
maxDate: new Date(),
|
||||
money: 0,
|
||||
isUploadFile: true,
|
||||
uploadFileDesc: null,
|
||||
showChildPicker:false,
|
||||
childColumns:[{value:'一孩',text:'一孩'},{value:'二孩',text:'二孩'},{value:'三孩',text:'三孩'}],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"formData.money"(val) {
|
||||
if (val > this.money) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '金额超过规定金额' + this.money + "(元)",
|
||||
type: 'warning'
|
||||
});
|
||||
this.$set(this.formData, "money", this.money)
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v='+new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
onChildConfirm(data){
|
||||
console.log(data)
|
||||
this.formData.birth_child_num = data.value
|
||||
this.showChildPicker = false
|
||||
},
|
||||
priceInput() {
|
||||
let num = 0
|
||||
this.goods.forEach(v => {
|
||||
num += parseFloat(v.price)
|
||||
})
|
||||
this.$set(this.formData, "money", num)
|
||||
},
|
||||
onOccurTimeConfirm(val) {
|
||||
this.$set(this.formData, "occur_time", moment(val).format("YYYY-MM-DD"))
|
||||
this.showOccurTime = false
|
||||
},
|
||||
onConfirm(date) {
|
||||
const [start, end] = date;
|
||||
this.hospital_stay = false;
|
||||
this.formData.hospital_stay = moment(start).format('YYYY-MM-DD') + "-" + moment(end).format('YYYY-MM-DD');
|
||||
this.$set(this.formData, "hospital_stay_1", moment(start).format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, "hospital_stay_2", moment(end).format('YYYY-MM-DD'))
|
||||
},
|
||||
async userRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.userList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
}
|
||||
})
|
||||
this.sheetShow = true
|
||||
}
|
||||
},
|
||||
async payeeUserRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.payeeUserList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
}
|
||||
})
|
||||
this.payeeSheetShow = true
|
||||
}
|
||||
},
|
||||
async queryUser(query) {
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
|
||||
return data
|
||||
},
|
||||
onUserSelect(u) {
|
||||
this.$set(this.formData, 'be_user', u.id)
|
||||
this.$set(this.formData, 'be_user_name', u.name)
|
||||
this.sheetShow = false
|
||||
},
|
||||
payeeOnUserSelect(u) {
|
||||
this.$set(this.formData, 'payee', u.id)
|
||||
this.$set(this.formData, 'payee_name', u.name)
|
||||
this.payeeSheetShow = false
|
||||
},
|
||||
async onTypeConfirm(val) {
|
||||
this.$set(this.formData, "typeName", val.text)
|
||||
this.$set(this.formData, "type", val.value)
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id: val.value})
|
||||
console.log(data)
|
||||
|
||||
this.isUploadFile = data.isUploadFile
|
||||
this.uploadFileDesc = data.uploadFileDesc
|
||||
|
||||
this.$set(this, "money", data.money)
|
||||
await this.moneyChange(val.value)
|
||||
this.showTypePicker = false;
|
||||
},
|
||||
onWayConfirm(val) {
|
||||
this.$set(this.formData, "wayName", val.text)
|
||||
this.$set(this.formData, "way", val.value)
|
||||
this.showWayPicker = false;
|
||||
},
|
||||
async moneyChange(id) {
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id})
|
||||
if (data) {
|
||||
this.$set(this.formData, "money", data.money)
|
||||
this.$set(this.formData, "wayName", data.way)
|
||||
this.$set(this.formData, "way", data.way)
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.files) {
|
||||
vant.Toast('请上传附件材料!')
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
this.$toast('请签名!')
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()
|
||||
const formData = clone(this.formData)
|
||||
formData.mobile = "${@shiro.getPrincipalProperty('mobile')}"
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/platform/fw/condolence/apply/doAdd', {
|
||||
data: JSON.stringify(formData),
|
||||
sign: formData.sign
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
pjaxReplace('/mobile/condolence/apply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.signature) {
|
||||
this.$refs.signature.getMySign()
|
||||
}
|
||||
})
|
||||
},
|
||||
async created() {
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
this.formData.be_user = "${@shiro.getPrincipalProperty('id')}"
|
||||
//this.formData.be_user_name = "${@shiro.getPrincipalProperty('username')}" + "(" + "${@shiro.getPrincipalProperty('loginname')}" + ")"
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeColumns.push({value: v.id, text: v.name + "(" + v.code + ")"})
|
||||
})
|
||||
for (let i in condolence.way) {
|
||||
this.wayColumns.push({value: condolence.way[i], text: condolence.way[i]})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,68 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/condolence/audit')" fixed left-arrow placeholder
|
||||
title="慰问申请信息"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<condolence-info :id.sync="id"></condolence-info>
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button :color="themeColor" @click="doEdit" block class="ml10 mr10"
|
||||
v-if="state_id==2010||state_id==2020">撤 回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
state_id: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
doEdit() {
|
||||
vant.Dialog.confirm({
|
||||
title: '标题',
|
||||
message: '确认要撤回吗?',
|
||||
})
|
||||
.then(async () => {
|
||||
this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post("/platform/fw/condolence/ucr/doEdit", {id: this.id});
|
||||
setTimeout(() => {
|
||||
this.$toast.success('撤回成功');
|
||||
pjaxReplace("/mobile/condolence/audit")
|
||||
}, 500)
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
this.state_id = GetQueryString('state_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,166 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;
|
||||
top: 20%;
|
||||
right: 0
|
||||
}
|
||||
|
||||
@keyframes come {
|
||||
from {
|
||||
right: -100px;
|
||||
}
|
||||
to {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="慰问申请列表"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearOption" @change="yearChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="typeOption" @change="typeChange"
|
||||
v-model="pageForm.type"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div @click="openInfo(o.id)" class="list-card" v-for="o in tableData">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="被慰问人">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px;">
|
||||
{{o.be_username}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="慰问类型">{{o.type_name}}</van-cell>
|
||||
<van-cell :border="false" title="慰问方式">{{o.way}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.be_unitname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<!-- <van-button v-show="visible" class="apply_btn" @click.stop="openApply" plain hairline>-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <svg t="1634200664904" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="3163" width="32" height="32">-->
|
||||
<!-- <path d="M837.632 160.768c64 0 117.248 53.248 117.248 117.248v470.528c0 64-53.248 117.248-117.248 117.248H187.904c-64 2.048-117.248-50.688-117.248-114.688V278.016c0-64 53.248-117.248 117.248-117.248h649.728z m66.048 590.848V274.944c0-32.768-28.16-60.416-60.416-60.416H184.832c-32.768 0-60.416 28.16-60.416 60.416v479.232c0 32.768 28.16 60.416 60.416 60.416h657.92c32.768-2.56 60.928-28.16 60.928-62.976zM387.072 317.44"-->
|
||||
<!-- fill="#2E77ED" p-id="3164"></path>-->
|
||||
<!-- <path d="M326.144 709.632c-14.848 0-26.624-12.288-26.624-27.136V455.68c0-14.848 12.288-27.136 27.136-27.136S353.28 440.832 353.28 455.68v226.816c-0.512 15.36-12.288 27.136-27.136 27.136z"-->
|
||||
<!-- fill="#FFBB12" p-id="3165"></path>-->
|
||||
<!-- <path d="M569.856 442.368c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 682.496c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 553.472c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136z"-->
|
||||
<!-- fill="#2E77ED" p-id="3166"></path>-->
|
||||
<!-- <path d="M228.352 509.44c-10.24-10.752-10.24-27.648 0-37.888l78.336-78.336c10.752-10.752 27.648-10.752 37.888 0s10.24 27.648 0 37.888L266.24 509.44c-10.24 10.752-27.136 10.752-37.888 0z"-->
|
||||
<!-- fill="#FFBB12" p-id="3167"></path>-->
|
||||
<!-- <path d="M306.688 393.216c10.752-10.24 27.648-10.24 37.888 0l78.336 78.336c10.752 10.752 10.752 27.648 0 37.888s-27.648 10.24-37.888 0L306.688 431.104c-10.24-10.752-10.24-27.648 0-37.888z"-->
|
||||
<!-- fill="#FFBB12" p-id="3168"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </template>-->
|
||||
<!-- 申请-->
|
||||
<!-- </van-button>-->
|
||||
</div>
|
||||
|
||||
<van-empty class="custom-image" description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar style="z-index: 99" v-model="tarBarActive">
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/condolence/apply/for')" icon="home-o"
|
||||
replace>慰问申请
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item @click="pjaxReplace('/mobile/condolence/apply')" icon="manager-o"
|
||||
replace>慰问记录
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openApply() {
|
||||
pjaxReplace('/mobile/condolence/apply/for')
|
||||
},
|
||||
openInfo(id) {
|
||||
pjaxReplace('/mobile/condolence/apply/info?id=' + id)
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
typeChange(val) {
|
||||
this.pageForm.type = val
|
||||
this.onRefresh()
|
||||
},
|
||||
listenTouch() {
|
||||
this.$nextTick(() => {
|
||||
const app = document.querySelector("#app")
|
||||
app.addEventListener('touchstart', () => {
|
||||
this.visible = false
|
||||
})
|
||||
app.addEventListener('touchend', () => {
|
||||
this.visible = true
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.listenTouch()
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeOption.push({value: v.id, text: v.name + v.code})
|
||||
})
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,147 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="慰问审核"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu :active-color="themeColor">
|
||||
<van-dropdown-item :options="yearList" @change="yearChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange"
|
||||
v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
<van-dropdown-item :options="mCondolence.typeList" @change="yearChange"
|
||||
v-model="pageForm.type"></van-dropdown-item>
|
||||
<van-dropdown-item :options="mCommon.unionList" @change="yearChange"
|
||||
v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="mCommon.unitList" @change="yearChange"
|
||||
v-model="pageForm.unitId"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-model="mLoading">
|
||||
<div @click="openView(o)" class="list-card" v-for="o in tableData">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="被慰问人">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px;">
|
||||
{{o.be_username}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.sqr_username}}</van-cell>
|
||||
<van-cell :border="false" title="所在单位">{{o.be_unitname}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.be_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="慰问类型">{{o.type_name}}</van-cell>
|
||||
<van-cell :border="false" title="慰问方式">{{o.way}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty class="custom-image" description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
pjaxReplace('/mobile/condolence/audit/auditHtml?state_id=' + o.state_id + '&id=' + o.id)
|
||||
},
|
||||
yearChange() {
|
||||
this.tableData = []
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 0
|
||||
this.flushUnits()
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
|
||||
},
|
||||
async flushUnits() {
|
||||
//this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCondolence.getType()
|
||||
await mCommon.getUnionList()
|
||||
if (mCondolence.typeList && mCondolence.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "type", mCondolence.typeList[0].value)
|
||||
}
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.flushUnits()
|
||||
if (GetQueryString("audit") === '1') {
|
||||
this.pageForm.isAudit = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,139 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/condolence/audit')"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field readonly left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
left-icon="chat-o"
|
||||
rows="1"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入审核意见' }]"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const loading = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post("/platform/fw/condolence/fr/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success('审核成功');
|
||||
pjaxReplace("/mobile/condolence/audit")
|
||||
}, 500)
|
||||
} else {
|
||||
loading.close()
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
const {data} = await $.get("/platform/fw/condolence/findOne", {id: this.id})
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: "",
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,171 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/condolence/audit')" fixed left-arrow placeholder
|
||||
title="慰问审核"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info :handle="handle" :id.sync="id" ref="info" title="校工会主席审核">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt10">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field label="审核人员"
|
||||
left-icon="contact"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field label="审核时间" left-icon="clock-o" readonly
|
||||
v-model="formData.time"></van-field>
|
||||
|
||||
<van-field :rules="[{ required:true, message: '请输入慰问金额' }]" label="慰问金额"
|
||||
left-icon="balance-list-o"
|
||||
required
|
||||
type="number" v-model="formData.money"
|
||||
></van-field>
|
||||
|
||||
<van-field @click="typePicker = true" label="审核类型" left-icon="clock-o"
|
||||
readonly required v-model="auditType"></van-field>
|
||||
|
||||
<van-popup position="bottom" v-model="typePicker">
|
||||
<van-picker
|
||||
:columns="['审核通过','审核通过(线下提交资料)', '审核拒绝']"
|
||||
@cancel="typePicker = false"
|
||||
@confirm="typeChange"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field autosize
|
||||
label="审核意见"
|
||||
left-icon="chat-o"
|
||||
placeholder="请输入审核意见"
|
||||
required
|
||||
rows="1"
|
||||
type="textarea"
|
||||
v-model="formData.opinion"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign :my_sign.sync="formData.sign" ref="signature"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" @click="doAudit(1)" block plain>拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button @click="doAudit(2)" block color="red" plain>返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" @click="doAudit(3)" block>通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
typePicker: false,
|
||||
auditType: '审核通过',
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
typeChange(value, index) {
|
||||
if (value === '审核通过') {
|
||||
this.formData.opinion = '情况属实,同意申请。'
|
||||
} else if (value === '审核通过(线下提交资料)') {
|
||||
this.$set(this.formData, 'opinion', '请将纸质发票经办人、分工会主席签字后交至行政楼A426办公室。')
|
||||
} else {
|
||||
this.formData.opinion = ''
|
||||
}
|
||||
this.typePicker = false
|
||||
},
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
if (pass === 3 && this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
if (this.auditType === '审核通过(线下提交资料)') {
|
||||
pass = 4
|
||||
}
|
||||
const loading = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post("/platform/fw/condolence/vcr/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success('审核成功');
|
||||
pjaxReplace("/mobile/condolence/audit")
|
||||
}, 500)
|
||||
} else {
|
||||
loading.close()
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
const {data} = await $.get("/platform/fw/condolence/findOne", {id: this.id})
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: '情况属实,同意申请。',
|
||||
sign: "",
|
||||
money: data.money
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,137 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/condolence/audit')"></van-nav-bar>
|
||||
|
||||
|
||||
<condolence-info ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt10">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
left-icon="contact"
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.time" label="审核时间" left-icon="clock-o"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
left-icon="chat-o"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button color="red" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</condolence-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'condolence-info': httpVueLoader('/components/condolence/mobile/common.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
vant.Toast('请签名!')
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const loading = this.$toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post("/platform/fw/condolence/ucr/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success('审核成功');
|
||||
pjaxReplace("/mobile/condolence/audit")
|
||||
}, 500)
|
||||
} else {
|
||||
loading.close()
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
opinion: null,
|
||||
sign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,227 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-item .left-img {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-item .right-content {
|
||||
flex: 2;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.right-content {
|
||||
height: 90px;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
.right-content > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.right-content .r-title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right-content .r-content {
|
||||
font-size: 13px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.avatar .van-image__img {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.list-card {
|
||||
margin: 10px 10px;
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell {
|
||||
border-radius: 10px;
|
||||
padding: 18px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="慈善捐款项目"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="isNullTypeCodeData.length>0?'没有更多了':''">
|
||||
<div class="list-card" @click="openContribution(o)" v-for="o in isNullTypeCodeData">
|
||||
<van-cell-group>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.contributionName}}</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionIntroduce)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between"
|
||||
style="white-space: nowrap">
|
||||
<van-col span="12">
|
||||
已筹:
|
||||
<sapn style="color: red">
|
||||
{{o.totalMoney?o.totalMoney:0}}
|
||||
</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="12" class="text-right">
|
||||
人次:
|
||||
<sapn style="color: red">{{o.totalUser}}</sapn>
|
||||
人
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-for="o in contributionTypeData" class="list-card" @click="openContribution(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionTypeFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.typeName}}
|
||||
<van-tag type="danger" round>专题</van-tag>
|
||||
</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionTypeIntroduce)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between">
|
||||
<van-col span="24">
|
||||
子项目数:
|
||||
<sapn style="color: red">{{o.sonNum}}</sapn>
|
||||
个
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&isNullTypeCodeData.length==0&&contributionTypeData.length==0"
|
||||
class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
isNullTypeCodeData: [],
|
||||
contributionTypeData: [],
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openContribution(data) {
|
||||
const time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
if (!data.sonNum) {
|
||||
if (time < data.contributionStartTime) {
|
||||
this.$toast(data.contributionStartTime + '开始捐款');
|
||||
return;
|
||||
}
|
||||
if (time > data.contributionEndTime) {
|
||||
this.$toast('捐款在' + data.contributionEndTime + '结束');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.contributionTypeCode == null && data.sonNum == 0) {
|
||||
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id
|
||||
} else if (data.sonNum > 0 && data.typeCode) {
|
||||
window.location.href = '/mobile/contribution/son/sonList?typeCode=' + data.typeCode
|
||||
} else {
|
||||
this.$toast('暂无项目');
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
async isNullTypeCodePageData() {
|
||||
const {data} = await $.post("/mobile/contribution/isNullTypeCodePageData")
|
||||
data.forEach(v => {
|
||||
v.sonNum = 0
|
||||
v.contributionFiles = JSON.parse(v.contributionFiles)
|
||||
})
|
||||
this.isNullTypeCodeData = data
|
||||
},
|
||||
async pageData() {
|
||||
await this.isNullTypeCodePageData()
|
||||
const {data} = await $.get("/mobile/contribution/getContributionTypeData")
|
||||
data.forEach(v => {
|
||||
v.contributionTypeCode = v.typeCode
|
||||
v.contributionTypeFiles = JSON.parse(v.contributionTypeFiles)
|
||||
})
|
||||
this.contributionTypeData = data
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,147 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.bth {
|
||||
bottom: 10px;
|
||||
width: 90%;
|
||||
position: fixed;
|
||||
transform: translateX(-50%);
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.backdrop {
|
||||
width: 100%;
|
||||
height: 170px;
|
||||
}
|
||||
|
||||
.typeName {
|
||||
margin-left: 10px;
|
||||
height: 70px;
|
||||
|
||||
}
|
||||
|
||||
.typeName .typeNameLabel {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.con-col {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con-introduce {
|
||||
border-top-left-radius: 30px;
|
||||
border-top-right-radius: 30px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 50px;
|
||||
padding-bottom: 10px;
|
||||
height: calc(100% - 250px);
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="项目详情"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
<div>
|
||||
<div style="background-color:#ffffff;">
|
||||
<van-image
|
||||
class="backdrop"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + viewData.contributionFiles[0].id"
|
||||
></van-image>
|
||||
<div class="typeName">
|
||||
<div class="typeNameLabel">{{viewData.contributionName}}</div>
|
||||
<van-row>
|
||||
<van-col span="12" class="con-col">
|
||||
<div>已筹</div>
|
||||
<div style="color: red">{{viewData.totalMoney?viewData.totalMoney:0}}</div>
|
||||
</van-col>
|
||||
<van-col span="12" class="con-col">
|
||||
<div>人次</div>
|
||||
<div style="color: red">{{viewData.totalUser}}</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="con-introduce">
|
||||
<van-cell-group style=" border-top-left-radius: 30px; border-top-right-radius: 30px;">
|
||||
<van-cell style=" border-top-left-radius: 30px; border-top-right-radius: 30px;">
|
||||
<template #title>
|
||||
<span class="custom-title">项目介绍</span>
|
||||
<span v-if="viewData.contributionMode==='sdc'" style="color: red">(捐款方式为水滴筹将直接跳转放到相应页面)</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
<div v-html="viewData.contributionIntroduce"
|
||||
style="margin: 15px;white-space: pre-wrap;word-break: break-word;"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="position: fixed;width: 100%;bottom: 0px;height: 60px">
|
||||
<van-button type="info" class="bth" block round @click="doContribution"
|
||||
v-if="viewData.isContributionEnable" :color="themeColor">我要捐款
|
||||
</van-button>
|
||||
<van-button type="info" class="bth" block round
|
||||
v-if="!viewData.isContributionEnable">暂未开放
|
||||
</van-button>
|
||||
</div>
|
||||
<!-- <van-row>
|
||||
<van-col span="24">
|
||||
|
||||
</van-col>
|
||||
|
||||
</van-row>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doContribution() {
|
||||
if (this.viewData.contributionMode === 'sdc') {
|
||||
window.location.href = this.viewData.contributionUrl
|
||||
} else {
|
||||
window.location.href = '/mobile/contribution/doContribution?id=' + this.viewData.id
|
||||
}
|
||||
},
|
||||
async getContributionById(id) {
|
||||
const {data} = await $.post("/mobile/contribution/getContributionById", {id: id})
|
||||
data.contributionFiles = JSON.parse(data.contributionFiles)
|
||||
this.viewData = data
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.GetQueryString("id")
|
||||
this.getContributionById(id)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.bth {
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
height: 45px;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.van-tag--large {
|
||||
height: 30px;
|
||||
width: 60px;
|
||||
font-size: 25px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
margin: 10px 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="我要捐款"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
|
||||
<van-form @submit="onSubmit">
|
||||
|
||||
<van-cell-group>
|
||||
<van-row type="flex" gutter="20">
|
||||
<van-col span="8" v-for="key in moneyData" @click="dateClick(key)"
|
||||
style="text-align: center;border-radius: 20px;">
|
||||
<van-tag :plain="activeDate!=key" size="large" type="primary">
|
||||
<div style="position: absolute;left: 0;right: 0">{{key}}</div>
|
||||
</van-tag>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<div class="van-hairline--top">
|
||||
<van-field v-model="formData.money" label="捐赠金额" type="number" input-align="right"
|
||||
placeholder="请输入捐赠金额" @input="moneyInput">
|
||||
<template #button>
|
||||
元
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
<van-cell-group>
|
||||
<van-field v-model="formData.username" label="真实姓名:" input-align="right" readonly>
|
||||
</van-field>
|
||||
<van-field v-model="formData.loginname" label="真实工号:" input-align="right" readonly>
|
||||
</van-field>
|
||||
<van-field v-model="formData.mobile" label="联系电话:" input-align="right"
|
||||
placeholder="请输入手机号或电话号">
|
||||
</van-field>
|
||||
|
||||
</van-cell-group>
|
||||
<van-radio-group v-model="formData.payMode">
|
||||
<van-cell-group>
|
||||
<van-cell title="微信支付" clickable @click="formData.payMode = 'WeChat'"
|
||||
icon="/assets/mobile/svg/wx.png">
|
||||
<template #right-icon>
|
||||
<van-radio name="WeChat"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="支付宝支付" clickable @click="formData.payMode = 'Alipay'"
|
||||
icon="/assets/mobile/svg/zfb.png">
|
||||
<template #right-icon>
|
||||
<van-radio name="Alipay"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
|
||||
<van-cell-group>
|
||||
<van-field name="files" label="捐款凭证" required style="flex-flow: column"
|
||||
input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">捐款凭证</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.contributionFiles"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<div class="bth">
|
||||
<van-row style="display: flex;padding-left: 15px;" type="flex" justify="space-between">
|
||||
<van-col span="16" style="align-self:center;">合计:
|
||||
<sapn style="color: red">{{formData.money?formData.money:0}}</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="8" style="align-self:center;padding-right: 20px;">
|
||||
<van-button plain type="info" style="float: right;border-radius: 15px;"
|
||||
:color="themeColor">确认捐款
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
|
||||
</van-form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
activeDate: null,
|
||||
moneyData: {
|
||||
70: 70,
|
||||
700: 700,
|
||||
7000: 7000,
|
||||
1952: 1952,
|
||||
1975: 1975,
|
||||
1987: 1987,
|
||||
},
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dateClick(key) {
|
||||
this.activeDate = key
|
||||
this.formData.money = key
|
||||
|
||||
},
|
||||
moneyInput(val) {
|
||||
this.$set(this.formData, "money", val)
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.money) {
|
||||
this.$toast.fail('捐赠金额不能为空');
|
||||
return
|
||||
}
|
||||
if (!this.formData.contributionFiles) {
|
||||
this.$toast.fail('捐赠凭证不能为空');
|
||||
return
|
||||
}
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '请确认',
|
||||
message: '确认要为' + this.formData.contributionName + '捐款吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const data = await $.post("/mobile/contribution/doContributionApply", {contributionApply: JSON.stringify(this.formData)})
|
||||
if (data.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '捐赠成功,已收到您为“' + this.formData.contributionName + '”捐赠的善款',
|
||||
confirmButtonColor: '#1867b0'
|
||||
}).then(() => {
|
||||
window.history.back()
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
async init(id) {
|
||||
const {data} = await $.post("/mobile/contribution/getContributionById", {id: id})
|
||||
this.formData = {
|
||||
contributionId: id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginname: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
payMode: "WeChat",
|
||||
money: null,
|
||||
contributionName: data.contributionName,
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.GetQueryString("id")
|
||||
this.init(id)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,210 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.backdrop {
|
||||
width: 100%;
|
||||
height: 170px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.list-item .left-img {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-item .right-content {
|
||||
flex: 2;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.right-content {
|
||||
height: 90px;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
.right-content > div {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.right-content .r-title {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right-content .r-content {
|
||||
font-size: 13px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.typeName {
|
||||
margin-left: 10px;
|
||||
height: 70px;
|
||||
|
||||
}
|
||||
|
||||
.typeName .typeNameLabel {
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.typeName .typeNameContent {
|
||||
font-size: 15px;
|
||||
color: #7f8481;
|
||||
}
|
||||
|
||||
.avatar .van-image__img {
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.list-card .van-cell {
|
||||
border-radius: 10px;
|
||||
padding: 18px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group {
|
||||
border-radius: 10px;
|
||||
height: 130px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar
|
||||
title="项目专题"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div style=" background-color:#ffffff;">
|
||||
<van-image
|
||||
class="backdrop"
|
||||
fit="cover"
|
||||
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + typeData.contributionTypeFiles[0].id"
|
||||
></van-image>
|
||||
<div class="typeName">
|
||||
<div class="typeNameLabel">{{typeData.typeName}}
|
||||
<van-tag type="danger" round>专题</van-tag>
|
||||
</div>
|
||||
<div class="van-multi-ellipsis--l2 typeNameContent">
|
||||
{{removeHTMLTag(typeData.contributionTypeIntroduce)}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px auto 0 auto">
|
||||
<van-list :finished="finished">
|
||||
<div v-for="o in sonData" class="list-card" @click="openContribution(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div class="list-item">
|
||||
|
||||
<div class="left-img">
|
||||
<van-image
|
||||
class="avatar"
|
||||
fit="cover"
|
||||
:src=" FILE_DOMAIN + '/fileStreamPreview?id=' + o.contributionFiles[0].id"
|
||||
></van-image>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="r-title">{{o.contributionName}}</div>
|
||||
<div class="van-ellipsis r-content">
|
||||
{{removeHTMLTag(o.contributionIntroduce)}}
|
||||
</div>
|
||||
<div>
|
||||
<van-row type="flex" justify="space-between"
|
||||
style="white-space: nowrap">
|
||||
<van-col span="12">
|
||||
已筹:
|
||||
<sapn style="color: red">
|
||||
{{o.totalMoney?o.totalMoney:0}}
|
||||
</sapn>
|
||||
元
|
||||
</van-col>
|
||||
<van-col span="12" class="text-right">
|
||||
人次:
|
||||
<sapn style="color: red">{{o.totalUser}}</sapn>
|
||||
人
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sonData: [],
|
||||
typeData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openContribution(data) {
|
||||
const time = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
if (!data.sonNum) {
|
||||
if (time < data.contributionStartTime) {
|
||||
this.$toast(data.contributionStartTime + '开始捐款');
|
||||
return;
|
||||
}
|
||||
if (time > data.contributionEndTime) {
|
||||
this.$toast('捐款在' + data.contributionEndTime + '结束');
|
||||
return;
|
||||
}
|
||||
}
|
||||
window.location.href = '/mobile/contribution/view/contributionView?id=' + data.id
|
||||
},
|
||||
async pageData(typeCode) {
|
||||
const {data} = await $.get("/mobile/contribution/son/pageData", {typeCode: typeCode})
|
||||
data.forEach(v => {
|
||||
v.contributionFiles = JSON.parse(v.contributionFiles)
|
||||
})
|
||||
this.sonData = data
|
||||
},
|
||||
async getTypeByCode(typeCode) {
|
||||
const {data} = await $.get("/mobile/contribution/son/getTypeByCode", {typeCode: typeCode})
|
||||
this.typeData = data
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const typeCode = this.GetQueryString("typeCode")
|
||||
this.pageData(typeCode)
|
||||
this.getTypeByCode(typeCode)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,369 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.family-list-field .van-field__value .van-field__control {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.family-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.family-list-cell .van-cell__label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.family-dialog .van-dialog__content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难补助申请" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<van-form @submit="onSubmit" :show-error-message="false">
|
||||
<van-cell inset>
|
||||
<van-field
|
||||
v-model="formData.userName"
|
||||
label="申请人姓名"
|
||||
readonly
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写申请人姓名' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.loginName"
|
||||
label="申请人工号"
|
||||
readonly
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写申请人工号' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.sex"
|
||||
label="性别"
|
||||
required
|
||||
is-link
|
||||
readonly
|
||||
:rules="[{ required: true, message: '性别' }]"
|
||||
clickable
|
||||
@click="showSexPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showSexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男', '女']"
|
||||
@confirm="onSexConfirm"
|
||||
@cancel="showSexPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.unitName"
|
||||
label="所在单位"
|
||||
placeholder="所在单位"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '所在单位' }]"
|
||||
clearable
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.unionName"
|
||||
label="所在分工会"
|
||||
placeholder="所在分工会"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '所在分工会' }]"
|
||||
clearable
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.monthlyIncome"
|
||||
label="本人月收入"
|
||||
type="number"
|
||||
placeholder="请填写本人月收入"
|
||||
:rules="[{ required: true, message: '请填写本人月收入' }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.birthday"
|
||||
label="出生年月"
|
||||
is-link
|
||||
@click="showDatePicker = true"
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写出生年月' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDatePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="new Date(1900, 0, 1)"
|
||||
:max-date="new Date()"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="手机号码"
|
||||
placeholder="请填写手机号码"
|
||||
maxlength="20"
|
||||
clearable
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写手机号码' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.homeAddress"
|
||||
label="家庭地址"
|
||||
placeholder="请填写家庭地址"
|
||||
maxlength="200"
|
||||
clearable
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写家庭地址' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.subsidyStandards"
|
||||
label="款项"
|
||||
placeholder="请选择款项"
|
||||
is-link
|
||||
@click="showSubsidyPicker = true"
|
||||
required
|
||||
:rules="[{ required: true, message: '请选择款项' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSubsidyPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="subsidyStandards"
|
||||
@confirm="onSubsidyConfirm"
|
||||
@cancel="showSubsidyPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.reason"
|
||||
label="申请原因"
|
||||
type="textarea"
|
||||
placeholder="请简述申请原因"
|
||||
maxlength="500"
|
||||
required
|
||||
:rules="[{ required: true, message: '请简述申请原因' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.remarks"
|
||||
label="备注"
|
||||
type="textarea"
|
||||
placeholder="请简述备注"
|
||||
maxlength="500"
|
||||
></van-field>
|
||||
|
||||
<van-field name="familyList" label="家庭成员经济收入" @click="showDialog = true" required is-link
|
||||
label-width="60%"
|
||||
clickable
|
||||
class="family-list-field">
|
||||
</van-field>
|
||||
<van-list class="family-list-cell">
|
||||
<van-cell
|
||||
v-for="(member, index) in formData.familyList"
|
||||
:key="index"
|
||||
:title="member.name"
|
||||
:label="'年龄: ' + member.age + ' 岁, 关系: ' + member.relation + ', 月收入: ' + member.monthlyIncome + ' 元'"
|
||||
is-link
|
||||
@click="editMember(index)"
|
||||
>
|
||||
<template #right-icon>
|
||||
<van-icon name="delete" color="red" @click.stop="removeMember(index)"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
|
||||
<van-field name="files" label="附件" style="flex-flow: column" input-align="left">
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!-- 家庭成员经济收入表格和附件上传等功能需要自定义实现 -->
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</van-cell>
|
||||
</van-form>
|
||||
|
||||
<van-dialog v-model="showDialog" class="family-dialog" title="添加家庭成员" show-cancel-button
|
||||
:before-close="handleBeforeClose">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="newMember.name"
|
||||
label="姓名"
|
||||
placeholder="请输入姓名"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.age"
|
||||
label="年龄(岁)"
|
||||
type="number"
|
||||
placeholder="请输入年龄"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.relation"
|
||||
label="关系"
|
||||
placeholder="请输入关系"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.monthlyIncome"
|
||||
label="月收入(元)"
|
||||
type="number"
|
||||
placeholder="请输入月收入"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
formData: {},
|
||||
showSexPicker: false,
|
||||
showDatePicker: false,
|
||||
showSubsidyPicker: false,
|
||||
subsidyStandards: [
|
||||
'本人患重症处于康复期、新患重症以外的疾病且自理医疗费在5万元以上、直系亲属患重症:1000-1500元。',
|
||||
'突发事件造成家庭损失较重致生活困难:2000-2500元。',
|
||||
'本人新患重症、长病假人员生活困难、家庭人均收入接近无锡市最低生活保障线:3000元。',
|
||||
'其他'
|
||||
],
|
||||
newMember: {
|
||||
name: '',
|
||||
age: '',
|
||||
relation: '',
|
||||
monthlyIncome: ''
|
||||
},
|
||||
showDialog: false,
|
||||
isEditing: false,
|
||||
editingIndex: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
onSubmit(values) {
|
||||
console.log(this.formData)
|
||||
if(this.formData.familyList.length === 0){
|
||||
this.$toast("请添加家庭成员信息")
|
||||
return
|
||||
}
|
||||
$.post('/platform/difficulty/apply/doAdd', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
sublime.jumpPagePjax('/platform/difficulty/applylist')
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
onSexConfirm(value) {
|
||||
this.formData.sex = value;
|
||||
this.showSexPicker = false;
|
||||
},
|
||||
onDateConfirm(value) {
|
||||
this.formData.birthday = value;
|
||||
this.showDatePicker = false;
|
||||
},
|
||||
onSubsidyConfirm(value) {
|
||||
this.formData.subsidyStandards = value;
|
||||
this.showSubsidyPicker = false;
|
||||
},
|
||||
|
||||
handleBeforeClose(action, done) {
|
||||
if (action === 'confirm') {
|
||||
if (!this.newMember.name || !this.newMember.age || !this.newMember.relation || !this.newMember.monthlyIncome) {
|
||||
this.$toast('请填写完整信息');
|
||||
done(false);
|
||||
} else {
|
||||
done()
|
||||
if (this.isEditing) {
|
||||
this.updateMember();
|
||||
} else {
|
||||
this.addMember();
|
||||
}
|
||||
done();
|
||||
}
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
},
|
||||
|
||||
addMember() {
|
||||
this.formData.familyList.push({...this.newMember});
|
||||
this.resetNewMember();
|
||||
},
|
||||
|
||||
editMember(index) {
|
||||
this.newMember = {...this.formData.familyList[index]};
|
||||
this.editingIndex = index;
|
||||
this.isEditing = true;
|
||||
this.showDialog = true;
|
||||
},
|
||||
updateMember() {
|
||||
this.formData.familyList.splice(this.editingIndex, 1, { ...this.newMember });
|
||||
this.resetNewMember();
|
||||
},
|
||||
removeMember(index) {
|
||||
this.formData.familyList.splice(index, 1);
|
||||
},
|
||||
resetNewMember() {
|
||||
this.newMember = {name: '', age: '', relation: '', monthlyIncome: ''};
|
||||
this.isEditing = false;
|
||||
this.editingIndex = null;
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
if (this.id) {
|
||||
$.get('/platform/difficulty/apply/findOne', {id: this.id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
this.$set(this.formData, 'userId', user.id)
|
||||
this.$set(this.formData, 'userName', user.username)
|
||||
this.$set(this.formData, 'loginName', user.loginname)
|
||||
this.$set(this.formData, 'sex', user.sex)
|
||||
this.$set(this.formData, 'unitId', user.unit.id)
|
||||
this.$set(this.formData, 'unitName', user.unit.name)
|
||||
this.$set(this.formData, 'unionId', user.union.id)
|
||||
this.$set(this.formData, 'unionName', user.union.unionname)
|
||||
this.$set(this.formData, 'monthlyIncome', null)
|
||||
this.$set(this.formData, 'birthday', user.birthday)
|
||||
this.$set(this.formData, 'mobile', user.mobile)
|
||||
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
||||
this.$set(this.formData, 'subsidyStandards', null)
|
||||
this.$set(this.formData, 'reason', null)
|
||||
this.$set(this.formData, 'remarks', null)
|
||||
this.$set(this.formData, 'familyList', [])
|
||||
this.$set(this.formData, 'files', [])
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,372 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.family-list-field .van-field__value .van-field__control {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.family-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.family-list-cell .van-cell__label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.family-dialog .van-dialog__content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难补助申请" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<van-form @submit="onSubmit" :show-error-message="false">
|
||||
<van-cell inset>
|
||||
<van-field
|
||||
v-model="formData.userName"
|
||||
label="申请人姓名"
|
||||
readonly
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写申请人姓名' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.loginName"
|
||||
label="申请人工号"
|
||||
readonly
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写申请人工号' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.sex"
|
||||
label="性别"
|
||||
required
|
||||
is-link
|
||||
readonly
|
||||
:rules="[{ required: true, message: '性别' }]"
|
||||
clickable
|
||||
@click="showSexPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showSexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男', '女']"
|
||||
@confirm="onSexConfirm"
|
||||
@cancel="showSexPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.unitName"
|
||||
label="所在单位"
|
||||
placeholder="所在单位"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '所在单位' }]"
|
||||
clearable
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.unionName"
|
||||
label="所在分工会"
|
||||
placeholder="所在分工会"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '所在分工会' }]"
|
||||
clearable
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.monthlyIncome"
|
||||
label="本人月收入"
|
||||
type="number"
|
||||
placeholder="请填写本人月收入"
|
||||
:rules="[{ required: true, message: '请填写本人月收入' }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.birthday"
|
||||
label="出生年月"
|
||||
is-link
|
||||
@click="showDatePicker = true"
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写出生年月' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDatePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="new Date(1900, 0, 1)"
|
||||
:max-date="new Date()"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="手机号码"
|
||||
placeholder="请填写手机号码"
|
||||
maxlength="20"
|
||||
clearable
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写手机号码' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.homeAddress"
|
||||
label="家庭地址"
|
||||
placeholder="请填写家庭地址"
|
||||
maxlength="200"
|
||||
clearable
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写家庭地址' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.subsidyStandards"
|
||||
label="款项"
|
||||
placeholder="请选择款项"
|
||||
is-link
|
||||
@click="showSubsidyPicker = true"
|
||||
required
|
||||
:rules="[{ required: true, message: '请选择款项' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSubsidyPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="subsidyStandards"
|
||||
@confirm="onSubsidyConfirm"
|
||||
@cancel="showSubsidyPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.reason"
|
||||
label="申请原因"
|
||||
type="textarea"
|
||||
placeholder="请简述申请原因"
|
||||
maxlength="500"
|
||||
required
|
||||
:rules="[{ required: true, message: '请简述申请原因' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.remarks"
|
||||
label="备注"
|
||||
type="textarea"
|
||||
placeholder="请简述备注"
|
||||
maxlength="500"
|
||||
></van-field>
|
||||
|
||||
<van-field name="familyList" label="家庭成员经济收入" @click="showDialog = true" required is-link
|
||||
label-width="60%"
|
||||
clickable
|
||||
class="family-list-field">
|
||||
</van-field>
|
||||
<van-list class="family-list-cell">
|
||||
<van-cell
|
||||
v-for="(member, index) in formData.familyList"
|
||||
:key="index"
|
||||
:title="member.name"
|
||||
:label="'年龄: ' + member.age + ' 岁, 关系: ' + member.relation + ', 月收入: ' + member.monthlyIncome + ' 元'"
|
||||
is-link
|
||||
@click="editMember(index)"
|
||||
>
|
||||
<template #right-icon>
|
||||
<van-icon name="delete" color="red" @click.stop="removeMember(index)"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-list>
|
||||
|
||||
<van-field name="files" label="附件" style="flex-flow: column" input-align="left">
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<!-- 家庭成员经济收入表格和附件上传等功能需要自定义实现 -->
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</van-cell>
|
||||
</van-form>
|
||||
|
||||
<van-dialog v-model="showDialog" class="family-dialog" title="添加家庭成员" show-cancel-button
|
||||
:before-close="handleBeforeClose">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="newMember.name"
|
||||
label="姓名"
|
||||
placeholder="请输入姓名"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.age"
|
||||
label="年龄(岁)"
|
||||
type="number"
|
||||
placeholder="请输入年龄"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.relation"
|
||||
label="关系"
|
||||
placeholder="请输入关系"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.monthlyIncome"
|
||||
label="月收入(元)"
|
||||
type="number"
|
||||
placeholder="请输入月收入"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
formData: {},
|
||||
showSexPicker: false,
|
||||
showDatePicker: false,
|
||||
showSubsidyPicker: false,
|
||||
subsidyStandards: [
|
||||
'本人患重症处于康复期、新患重症以外的疾病且自理医疗费在5万元以上、直系亲属患重症:1000-1500元。',
|
||||
'突发事件造成家庭损失较重致生活困难:2000-2500元。',
|
||||
'本人新患重症、长病假人员生活困难、家庭人均收入接近无锡市最低生活保障线:3000元。',
|
||||
'其他'
|
||||
],
|
||||
newMember: {
|
||||
name: '',
|
||||
age: '',
|
||||
relation: '',
|
||||
monthlyIncome: ''
|
||||
},
|
||||
showDialog: false,
|
||||
isEditing: false,
|
||||
editingIndex: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
onSubmit(values) {
|
||||
if(this.formData.familyList.length === 0){
|
||||
this.$toast("请添加家庭成员信息")
|
||||
return
|
||||
}
|
||||
let urlValue = 'doAdd'
|
||||
if (this.id) {
|
||||
urlValue = 'doEdit'
|
||||
}
|
||||
$.post('/platform/difficulty/apply/' + urlValue, {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
pjaxReplace('/platform/difficulty/applylist/h5')
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
onSexConfirm(value) {
|
||||
this.formData.sex = value;
|
||||
this.showSexPicker = false;
|
||||
},
|
||||
onDateConfirm(value) {
|
||||
this.formData.birthday = value;
|
||||
this.showDatePicker = false;
|
||||
},
|
||||
onSubsidyConfirm(value) {
|
||||
this.formData.subsidyStandards = value;
|
||||
this.showSubsidyPicker = false;
|
||||
},
|
||||
|
||||
handleBeforeClose(action, done) {
|
||||
if (action === 'confirm') {
|
||||
if (!this.newMember.name || !this.newMember.age || !this.newMember.relation || !this.newMember.monthlyIncome) {
|
||||
this.$toast('请填写完整信息');
|
||||
done(false);
|
||||
} else {
|
||||
done()
|
||||
if (this.isEditing) {
|
||||
this.updateMember();
|
||||
} else {
|
||||
this.addMember();
|
||||
}
|
||||
done();
|
||||
}
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
},
|
||||
|
||||
addMember() {
|
||||
this.formData.familyList.push({...this.newMember});
|
||||
this.resetNewMember();
|
||||
},
|
||||
|
||||
editMember(index) {
|
||||
this.newMember = {...this.formData.familyList[index]};
|
||||
this.editingIndex = index;
|
||||
this.isEditing = true;
|
||||
this.showDialog = true;
|
||||
},
|
||||
updateMember() {
|
||||
this.formData.familyList.splice(this.editingIndex, 1, { ...this.newMember });
|
||||
this.resetNewMember();
|
||||
},
|
||||
removeMember(index) {
|
||||
this.formData.familyList.splice(index, 1);
|
||||
},
|
||||
resetNewMember() {
|
||||
this.newMember = {name: '', age: '', relation: '', monthlyIncome: ''};
|
||||
this.isEditing = false;
|
||||
this.editingIndex = null;
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
if (this.id) {
|
||||
$.get('/platform/difficulty/apply/findOne', {id: this.id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
this.$set(this.formData, 'userId', user.id)
|
||||
this.$set(this.formData, 'userName', user.username)
|
||||
this.$set(this.formData, 'loginName', user.loginname)
|
||||
this.$set(this.formData, 'sex', user.sex)
|
||||
this.$set(this.formData, 'unitId', user.unit.id)
|
||||
this.$set(this.formData, 'unitName', user.unit.name)
|
||||
this.$set(this.formData, 'unionId', user.union.id)
|
||||
this.$set(this.formData, 'unionName', user.union.unionname)
|
||||
this.$set(this.formData, 'monthlyIncome', null)
|
||||
this.$set(this.formData, 'birthday', user.birthday)
|
||||
this.$set(this.formData, 'mobile', user.mobile)
|
||||
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
||||
this.$set(this.formData, 'subsidyStandards', null)
|
||||
this.$set(this.formData, 'reason', null)
|
||||
this.$set(this.formData, 'remarks', null)
|
||||
this.$set(this.formData, 'familyList', [])
|
||||
this.$set(this.formData, 'files', [])
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难帮扶申请信息" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<difficulty-info :id.sync="id"></difficulty-info>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/platform/module/difficulty/common.js?v=1.0.0"></script>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: "",
|
||||
state_id: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.id = GetQueryString('id')
|
||||
this.state_id = GetQueryString('state_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,136 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;
|
||||
top: 20%;
|
||||
right: 0
|
||||
}
|
||||
|
||||
@keyframes come {
|
||||
from {
|
||||
right: -100px;
|
||||
}
|
||||
to {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="困难帮扶申请列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id,o.zt)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="受补助人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.sbzrname}}({{o.sbzrloginname}})
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.sqsj}}</van-cell>
|
||||
<van-cell :border="false" title="所属单位">{{o.unitname}}</van-cell>
|
||||
<van-cell :border="false" title="联系方式">{{o.lxfs}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
openInfo(id, state) {
|
||||
window.location.href = '/mobile/difficulty/apply/apply_info?id=' + id
|
||||
/* if ([95,96, 100].includes(state)) {
|
||||
window.location.href = '/mobile/difficulty/apply/index?id=' + id
|
||||
}else{
|
||||
window.location.href = '/mobile/difficulty/apply/apply_info?id=' + id
|
||||
}*/
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
listenTouch() {
|
||||
this.$nextTick(() => {
|
||||
const app = document.querySelector("#app")
|
||||
app.addEventListener('touchstart', () => {
|
||||
this.visible = false
|
||||
})
|
||||
app.addEventListener('touchend', () => {
|
||||
this.visible = true
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get('/platform/fw/difficulty/applylist/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.listenTouch()
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,143 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange"
|
||||
:options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isAudit" @change="yearChange"
|
||||
:options="auditList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unionId" @change="yearChange"
|
||||
:options="mCommon.unionList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.unitId" @change="yearChange"
|
||||
:options="mCommon.unitList"></van-dropdown-item>
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list v-model="loading" :finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="受助人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;"
|
||||
:style="{color:themeColor}">
|
||||
{{o.sbzrname}}({{o.sbzrloginname}})
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.sqrname}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.sqrunionname}}</van-cell>
|
||||
<van-cell :border="false" title="所在单位">{{o.unitname}}</van-cell>
|
||||
<van-cell :border="false" title="联系方式">{{o.lxfs}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.sqsj}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.statecolor">{{ o.state_name }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unitList: [],
|
||||
unionList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/difficulty/audit/auditHtml?zt=' + o.zt + '&id=' + o.id
|
||||
},
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.flushUnits()
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('SchoolUnionMemberAdmin')}" === 'true') {
|
||||
await mCommon.getUnitList(this.pageForm.unionId)
|
||||
} else {
|
||||
await mCommon.getUnitList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
await mCondolence.getType()
|
||||
await mCommon.getUnionList()
|
||||
if (mCommon.unionList && mCommon.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", mCommon.unionList[0].value)
|
||||
}
|
||||
if (mCommon.unitList && mCommon.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", mCommon.unitList[0].value)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.init()
|
||||
vue.yearChange()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,354 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__right-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 0!important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="困难帮扶分工会审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{item.userName + '(' + item.loginName + ')'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">性 别:</span><span>{{item.sex}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{item.mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span>{{item.unionName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">工作单位:</span><span>{{item.unitName}}</span></van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">款 项:</span>{{item.subsidyStandards}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span style="color: grey">当前状态:</span>
|
||||
<span>{{item.state_name}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<van-button size="small" type="primary"
|
||||
v-if="item.stateId === 3000"
|
||||
@click="openApproval(item)"
|
||||
style="margin-right: 4px">审核
|
||||
</van-button>
|
||||
<van-button size="small" type="danger"
|
||||
v-if="[3010,3020,3030].includes(item.stateId)"
|
||||
@click="openRevoke(item.id)"
|
||||
style="margin-right: 4px">撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="分工会审核"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<info ref="infoRef"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{ '分工会审核' }}</div>
|
||||
<van-form>
|
||||
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
|
||||
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" required></van-field>
|
||||
<van-field label="审核金额" type="number" name="money" v-model="formData.money" placeholder="请输入审核金额" required></van-field>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
|
||||
<van-field label="审核签字" name="auditSign" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">审核签字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :is_value_base64="false" v-model="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click.submit="doApproval(1)">拒绝</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval(2)">返回修改</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval(3)">通过</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
isAudit: false
|
||||
},
|
||||
unitList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: "已审核", value: true},
|
||||
{text: "未审核", value: false},
|
||||
],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
userId: "",
|
||||
infoShow: false,
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'info': info
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openApproval(item) {
|
||||
this.formData.id = item.id
|
||||
this.formData.username = "${@shiro.getPrincipalProperty('username')}"
|
||||
this.formData.auditTime = moment().format('YYYY-MM-DD')
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openRevoke(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确定要撤回该申请吗?'
|
||||
}).then(() => {
|
||||
$.post('/platform/difficulty/branchUnionAudit/doEdit', { id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async doApproval(flag) {
|
||||
if (!this.formData.money || !this.formData.auditOpinion || !this.formData.auditSign) {
|
||||
this.$toast.fail('存在未填写的必填项,请填写完整后再次提交')
|
||||
return
|
||||
}
|
||||
this.formData.pass = flag
|
||||
const resp = await $.post('/platform/difficulty/branchUnionAudit/doReview', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.infoShow = false
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/difficulty/branchUnionAudit/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
} else {
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.flushUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,161 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/
|
||||
`
|
||||
<div>
|
||||
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.loginName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="分工会">{{ viewData.unionName }}</van-cell>
|
||||
<van-cell title="月收入">{{ viewData.monthlyIncome }}</van-cell>
|
||||
<van-cell title="出生年月">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="手机号码">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="家庭地址">{{ viewData.homeAddress }}</van-cell>
|
||||
<van-cell title="款项">{{ viewData.subsidyStandards }}</van-cell>
|
||||
<van-cell title="申请原因">{{ viewData.reason }}</van-cell>
|
||||
<van-cell title="备注">{{ viewData.remarks }}</van-cell>
|
||||
<van-cell title="家庭成员收入" class="column-cell">
|
||||
<table class="family-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">序号</th>
|
||||
<th class="table-header">姓名</th>
|
||||
<th class="table-header">年龄(岁)</th>
|
||||
<th class="table-header">关系</th>
|
||||
<th class="table-header">月收入(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="table-row" v-for="(item, index) in viewData.familyList" :key="index">
|
||||
<td class="table-cell">{{ index + 1 }}</td>
|
||||
<td class="table-cell">{{ item.name }}</td>
|
||||
<td class="table-cell">{{ item.age }}</td>
|
||||
<td class="table-cell">{{ item.relation }}</td>
|
||||
<td class="table-cell">{{ item.monthlyIncome }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell>
|
||||
<van-cell title="附件" class="column-cell">
|
||||
<vant-file-upload :files.sync="viewData.files" view :del="false"
|
||||
v-if="viewData.files&&viewData.files.length"></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
<van-cell title="签字" class="column-cell">
|
||||
<van-image width="200" height="100" :src="CREATE_PREVIEW_URL(viewData.signature)"
|
||||
v-if="viewData.signature"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group v-if="viewData.branchUnionAudit">
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell title="审核人">{{ viewData.branchUnionAudit.username }}</van-cell>
|
||||
<van-cell title="审核时间">{{ viewData.branchUnionAudit.auditTime }}</van-cell>
|
||||
<van-cell title="审核金额">{{ viewData.branchUnionAudit.ext?.money }}元</van-cell>
|
||||
<van-cell title="审核意见">{{ viewData.branchUnionAudit.auditOpinion }}</van-cell>
|
||||
<van-cell title="签字" class="column-cell">
|
||||
<van-image width="200" height="100" :src="CREATE_PREVIEW_URL(viewData.branchUnionAudit.auditSign)"
|
||||
v-if="viewData.branchUnionAudit.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group v-if="viewData.schoolUnionInitialAudit">
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会初审信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell title="审核人">{{ viewData.schoolUnionInitialAudit.username }}</van-cell>
|
||||
<van-cell title="审核时间">{{ viewData.schoolUnionInitialAudit.auditTime }}</van-cell>
|
||||
<van-cell title="审核金额">{{ viewData.schoolUnionInitialAudit.ext?.money }}元</van-cell>
|
||||
<van-cell title="审核意见">{{ viewData.schoolUnionInitialAudit.auditOpinion }}</van-cell>
|
||||
<van-cell title="签字" class="column-cell">
|
||||
<van-image width="200" height="100" :src="CREATE_PREVIEW_URL(viewData.schoolUnionInitialAudit.auditSign)"
|
||||
v-if="viewData.schoolUnionInitialAudit.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group v-if="viewData.schoolUnionFinalAudit">
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
工会常委会审核审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell title="审核人">{{ viewData.schoolUnionFinalAudit.username }}</van-cell>
|
||||
<van-cell title="审核时间">{{ viewData.schoolUnionFinalAudit.auditTime }}</van-cell>
|
||||
<van-cell title="审核金额">{{ viewData.schoolUnionInitialAudit.ext?.money }}元</van-cell>
|
||||
<van-cell title="审核意见">{{ viewData.schoolUnionFinalAudit.auditOpinion }}</van-cell>
|
||||
<van-cell title="签字" class="column-cell">
|
||||
<van-image width="200" height="100" :src="CREATE_PREVIEW_URL(viewData.schoolUnionFinalAudit.auditSign)"
|
||||
v-if="viewData.schoolUnionFinalAudit.auditSign"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
activeName: 'info',
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
CREATE_PREVIEW_URL,
|
||||
onOpen(id, activeName = '1') {
|
||||
this.activeName = activeName
|
||||
$.get('/platform/difficulty/common/findOne', {id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
try {
|
||||
res.data.familyList = JSON.parse(res.data.familyList)
|
||||
res.data.files = JSON.parse(res.data.files)
|
||||
} catch (e) {
|
||||
}
|
||||
this.viewData = res.data
|
||||
console.log(this.viewData)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/
|
||||
`
|
||||
.column-cell {
|
||||
flex-direction: column;
|
||||
}
|
||||
.family-table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: auto;
|
||||
text-align: center;
|
||||
font-family: 'Arial', sans-serif;
|
||||
margin: 20px 0;
|
||||
}
|
||||
.table-header {
|
||||
background-color: #1867b0;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.table-row {
|
||||
background-color: #f9f9f9;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.table-row:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.table-cell {
|
||||
padding: 10px 20px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__right-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 0!important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="困难帮扶申请记录" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unionList" @change="doSearch();flushUnits(pageForm.unionId)" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{item.userName + '(' + item.loginName + ')'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">性 别:</span><span>{{item.sex}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{item.mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span>{{item.unionName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">工作单位:</span><span>{{item.unitName}}</span></van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">款 项:</span>{{item.subsidyStandards}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span style="color: grey">当前状态:</span>
|
||||
<span>{{item.state_name}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<van-button size="small" @click="pjaxReplace('/platform/difficulty/apply/h5?id=' + item.id)"
|
||||
v-if="[3000,3020,3050,3080].includes(item.stateId)"
|
||||
type="info" style="margin-right: 4px">编辑</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="困难帮扶申请记录详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<info ref="infoRef"></info>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
isAudit: false
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
yearList: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
infoShow: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': info
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/difficulty/applylist/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
} else {
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initUnion(unionId) {
|
||||
this.unionList = await getUnions(unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.initUnion("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
await this.flushUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,129 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="慰问审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<difficulty-info ref="info" :id.sync="id" title="校工会主席审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
<van-field v-model="formData.xghbzje" label="初审金额"></van-field>
|
||||
|
||||
<van-field v-model="formData.opinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.opinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/difficulty/schoolmanager/doReview", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
setTimeout(() => {
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null,
|
||||
auditSign: "",
|
||||
xghbzje: this.$refs.info.viewData.xghbzje
|
||||
}
|
||||
}, 300)
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,369 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__right-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 0!important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="困难帮扶委员会审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unionList" @change="doSearch" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{item.userName + '(' + item.loginName + ')'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">性 别:</span><span>{{item.sex}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{item.mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span>{{item.unionName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">工作单位:</span><span>{{item.unitName}}</span></van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">款 项:</span>{{item.subsidyStandards}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span style="color: grey">当前状态:</span>
|
||||
<span>{{item.state_name}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<van-button size="small" type="primary"
|
||||
v-if="item.stateId === 3060"
|
||||
@click="openApproval(item)"
|
||||
style="margin-right: 4px">审核
|
||||
</van-button>
|
||||
<van-button size="small" type="danger"
|
||||
v-if="[3070,3080,3090].includes(item.stateId)"
|
||||
@click="openRevoke(item.id)"
|
||||
style="margin-right: 4px">撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="工会常委会审核审核"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<info ref="infoRef"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{ '工会常委会审核审核' }}</div>
|
||||
<van-form>
|
||||
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
|
||||
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" required></van-field>
|
||||
<van-field label="审核金额" type="number" name="money" v-model="formData.money" placeholder="请输入审核金额" required></van-field>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
|
||||
<van-field label="审核签字" name="auditSign" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">审核签字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" v-model="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click.submit="doApproval(1)">拒绝</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval(2)">返回修改</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval(3)">通过</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
isAudit: false
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: "已审核", value: true},
|
||||
{text: "未审核", value: false},
|
||||
],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
userId: "",
|
||||
infoShow: false,
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'info': info
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openApproval(item) {
|
||||
this.formData.id = item.id
|
||||
this.formData.username = "${@shiro.getPrincipalProperty('username')}"
|
||||
this.formData.auditTime = moment().format('YYYY-MM-DD')
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openRevoke(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确定要撤回该申请吗?'
|
||||
}).then(() => {
|
||||
$.post('/platform/difficulty/schoolUnionFinalAudit/doEdit', { id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async doApproval(flag) {
|
||||
if (!this.formData.money || !this.formData.auditOpinion || !this.formData.auditSign) {
|
||||
this.$toast.fail('存在未填写的必填项,请填写完整后再次提交')
|
||||
return
|
||||
}
|
||||
this.formData.pass = flag
|
||||
const resp = await $.post('/platform/difficulty/schoolUnionFinalAudit/doReview', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.infoShow = false
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/difficulty/schoolUnionFinalAudit/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
} else {
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initUnion(unionId) {
|
||||
this.unionList = await getUnions(unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.initUnion("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
await this.flushUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,369 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__right-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 0!important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="困难帮扶校工会初审" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unionList" @change="doSearch();flushUnits(pageForm.unionId)" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{item.userName + '(' + item.loginName + ')'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">性 别:</span><span>{{item.sex}}</span></van-col>
|
||||
<van-col span="24"><span style="color: grey">联系方式:</span>{{item.mobile}}</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">所属工会:</span>{{item.unionName}}</van-col>
|
||||
<van-col span="24"><span style="color: grey">工作单位:</span><span>{{item.unitName}}</span></van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24"><span style="color: grey">款 项:</span>{{item.subsidyStandards}}</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span style="color: grey">当前状态:</span>
|
||||
<span>{{item.state_name}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<van-button size="small" type="primary"
|
||||
v-if="item.stateId === 3030"
|
||||
@click="openApproval(item)"
|
||||
style="margin-right: 4px">审核
|
||||
</van-button>
|
||||
<van-button size="small" type="danger"
|
||||
v-if="[3040,3050,3060].includes(item.stateId)"
|
||||
@click="openRevoke(item.id)"
|
||||
style="margin-right: 4px">撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="校工会初审"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<info ref="infoRef"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{ '校工会初审' }}</div>
|
||||
<van-form>
|
||||
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
|
||||
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" placeholder="请输入审核时间" required></van-field>
|
||||
<van-field label="审核金额" type="number" name="money" v-model="formData.money" placeholder="请输入审核金额" required></van-field>
|
||||
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
|
||||
<van-field label="审核签字" name="auditSign" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">审核签字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" v-model="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click.submit="doApproval(1)">拒绝</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval(2)">返回修改</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval(3)">通过</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
isAudit: false
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: "已审核", value: true},
|
||||
{text: "未审核", value: false},
|
||||
],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
|
||||
userId: "",
|
||||
infoShow: false,
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'info': info
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openApproval(item) {
|
||||
this.formData.id = item.id
|
||||
this.formData.username = "${@shiro.getPrincipalProperty('username')}"
|
||||
this.formData.auditTime = moment().format('YYYY-MM-DD')
|
||||
this.infoShow = true
|
||||
this.showApprovalForm = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
openRevoke(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确定要撤回该申请吗?'
|
||||
}).then(() => {
|
||||
$.post('/platform/difficulty/schoolUnionInitialAudit/doEdit', { id }).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async doApproval(flag) {
|
||||
if (!this.formData.money || !this.formData.auditOpinion || !this.formData.auditSign) {
|
||||
this.$toast.fail('存在未填写的必填项,请填写完整后再次提交')
|
||||
return
|
||||
}
|
||||
this.formData.pass = flag
|
||||
const resp = await $.post('/platform/difficulty/schoolUnionInitialAudit/doReview', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.infoShow = false
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/difficulty/schoolUnionInitialAudit/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
} else {
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initUnion(unionId) {
|
||||
this.unionList = await getUnions(unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.initUnion("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
await this.flushUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,123 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="困难帮扶审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<difficulty-info ref="info" :id.sync="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会主席审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field v-model="formData.auditOpinion"
|
||||
required
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签  字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.auditSign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(1)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(2)">返回修改
|
||||
</van-button>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<van-button :color="themeColor" block @click="doAudit(3)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</difficulty-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
'difficulty-info': httpVueLoader('/components/mobile/difficulty/info.vue?v=' + new Date().getTime()),
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
await this.$refs.signature.updateSign()
|
||||
this.formData.pass = pass
|
||||
const resp = await $.post("/platform/fw/difficulty/unionchairman/doReview", this.formData)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/difficulty/audit'
|
||||
}, 1000)
|
||||
}else{
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.formData = {
|
||||
id: this.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null,
|
||||
auditSign: ""
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,261 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
.van-image {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-tab {
|
||||
-webkit-flex: none;
|
||||
}
|
||||
|
||||
.van-tab--active {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-tabs__nav--line {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
padding: 13px 13px 50px 13px;
|
||||
background-color: white;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.content_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.custable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.custable td {
|
||||
text-align: center;
|
||||
height: 10px;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
padding: 0 10px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center !important;
|
||||
font-weight: bold;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.custable tr:nth-child(odd) {
|
||||
background-color: #eff1f5;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-top: 1px solid #000000;
|
||||
border-left: 1px solid #000000;
|
||||
border-collapse: collapse; /*设置单元格的边框合并为1*/
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #000000;
|
||||
border-right: 1px solid #000000;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动详情" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/fellowshipActivity/fellowshipList')"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!--<van-image :height="$(window).height() * 0.28" v-if="this.activity.cover && this.activity.cover.filepath" :src="'${AppFileDomain!}' + this.activity.cover.filepath"></van-image>
|
||||
<van-image :height="$(window).height() * 0.28" v-else src=""></van-image>-->
|
||||
<div>
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + this.activity.cover.id"
|
||||
style="display: contents"
|
||||
v-if="this.activity.cover && this.activity.cover.id"></van-image>
|
||||
<van-image src=""
|
||||
style="display: contents"
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<!-- <van-image height="186" src="/assets/mobile/img/fellowship_back.jpg"></van-image>-->
|
||||
<div class="title">{{activity.activityName}}</div>
|
||||
|
||||
<van-tabs v-model:active="tabActive" shrink>
|
||||
<van-tab title="详细信息" name="a">
|
||||
<!--<div class="content_title">关于{{activity.activityName}}的通知</div>-->
|
||||
<div class="pre_text" v-html="activity.introduce"></div>
|
||||
<!--<div v-for="(value, key, index) in activityMap" style="margin-bottom: 30px">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
{{key}}<span style="color: #1867b0">(左划查看更多)</span>
|
||||
</div>
|
||||
<div style="width: 100%; overflow-x: auto">
|
||||
<table class="custable">
|
||||
<tr>
|
||||
<td>序号</td>
|
||||
<td>{{trainType}}名称</td>
|
||||
<!–<td>课次</td>–>
|
||||
<td>时间</td>
|
||||
<td>{{trainType}}地点</td>
|
||||
<td>{{trainType === '交友联谊' ? '讲师' : '负责人'}}</td>
|
||||
</tr>
|
||||
<tr v-for="(o, num) in value">
|
||||
<td>{{num + 1}}</td>
|
||||
<td>{{o.courseName}}</td>
|
||||
<!–<td>{{o.courseTimeList.length}}</td>–>
|
||||
<td style="line-height: 26px;">
|
||||
<div v-for="t in o.timeList">{{t}}</div>
|
||||
</td>
|
||||
<td>{{o.courseLocation}}</td>
|
||||
<td>{{o.courseInstructor}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>-->
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-button @click="toSign" color="#1867b0" block
|
||||
style="position: fixed; bottom: 0; z-index: 2">去报名
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
trainType: '交友联谊',
|
||||
trainTypeList: [],
|
||||
tabActive: 'a',
|
||||
activityId: '',
|
||||
activity: {},
|
||||
activityMap: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne() {
|
||||
const resp = await $.get('/platform/mobile/fellowshipActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
const type = this.trainTypeList.find(o => o.code === this.activity.trainType)
|
||||
this.trainType = type ? type.name : '交友联谊'
|
||||
//将数据按校区分组
|
||||
for (const item of this.activity.courseList) {
|
||||
|
||||
//item.courseName = item.courseName.indexOf('校区') !== -1 ? item.courseName.substr(item.courseName.indexOf('校区') + 2) : item.courseName
|
||||
const key = item.campus
|
||||
if (this.activityMap[key] === undefined) {
|
||||
let array = []
|
||||
array.push(item)
|
||||
this.activityMap[key] = array
|
||||
} else {
|
||||
this.activityMap[key].push(item)
|
||||
}
|
||||
|
||||
let timeArray = []
|
||||
if (item.courseTimeList && item.courseTimeList.length > 0) {
|
||||
for (const time of item.courseTimeList) {
|
||||
const t = this.getWeek(time.courseDate.substr(0, 10)) + ' ' + time.courseStartTime.substr(11, 5) + '~' + time.courseEndTime.substr(11, 5)
|
||||
timeArray.push(t)
|
||||
}
|
||||
item.timeList = Array.from(new Set(timeArray))
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async toSign() {
|
||||
const nowTime = moment().unix()
|
||||
if (nowTime < moment(this.activity.activitySignUpStartTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名还未开始',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('活动报名还未开始')
|
||||
return
|
||||
}
|
||||
if (nowTime > moment(this.activity.activitySignUpEndTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名已结束',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('活动报名已结束')
|
||||
return
|
||||
}
|
||||
|
||||
if (this.activity.activityGroupId != null) {
|
||||
const isExist = await getScopeUser(this.activity.activityGroupId)
|
||||
if (!isExist) {
|
||||
vant.Dialog.alert({
|
||||
title: '参加人员范围',
|
||||
message: this.activity.activityGroupName,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
window.location.href = '/platform/mobile/fellowshipActivity/fellowshipInfo?activityId=' + this.activity.id + '&endTime=' + this.activity.activitySignUpEndTime
|
||||
},
|
||||
getWeek(dateString) {
|
||||
var dateArray = dateString.split("-");
|
||||
const date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
|
||||
return "周" + "日一二三四五六".charAt(date.getDay());
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.trainTypeList = await getDictOptions("fellowshipType")
|
||||
this.activityId = getQueryString('activityId')
|
||||
this.findOne()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,923 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-doc-card-my {
|
||||
margin: 14px;
|
||||
padding: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px 16px 10px;
|
||||
min-height: 100px;
|
||||
max-height: 360px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #cccdd1;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-family: -webkit-pictograph, serif;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.popup {
|
||||
width: 90%;
|
||||
max-height: 70%;
|
||||
overflow-y: auto;
|
||||
border-radius: 10px;
|
||||
padding: 2px 10px 12px 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
width: 35px;
|
||||
height: 38px;
|
||||
margin-right: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.van-card__content {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.van-card__title {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
transform: translate(0%, 50%);
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 20px;
|
||||
/*height: calc(100% - 40px - 46px - 60px);*/
|
||||
height: calc(100vh - 46px - 50px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card-two {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
.footer .van-button {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.amap-logo {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.amap-copyright {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.van-image {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
}
|
||||
|
||||
.van-tabs {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-tab {
|
||||
-webkit-flex: none;
|
||||
}
|
||||
|
||||
.van-tab--active {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-tabs__nav--line {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
padding: 13px 13px 50px 13px;
|
||||
background-color: white;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.content_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.custable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="trainType + '列表'" left-arrow
|
||||
@click-left="location.replace('/platform/mobile/fellowshipActivity/fellowshipList?type=' + type)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-dropdown-menu active-color="#1867b0">
|
||||
<van-dropdown-item @change="tabChange" v-model="activityStatus"
|
||||
:options="activityOptions"></van-dropdown-item>
|
||||
<van-dropdown-item @change="courseChange" v-model="courseType"
|
||||
:options="courseOptions"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<!--<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
text="温馨提示:每人只能填报一项活动">
|
||||
</van-notice-bar>-->
|
||||
|
||||
<template>
|
||||
<div id="parentDiv" v-model="loading"
|
||||
v-if="tableData.courseList && tableData.courseList.length>0">
|
||||
|
||||
<template v-for="o in tableData.courseList">
|
||||
<div style="position: relative"
|
||||
:class="activityStatus !== '1' ? 'van-doc-card' : 'van-doc-card-my'">
|
||||
<div>
|
||||
<van-tag type="primary" size="medium">
|
||||
{{getCourseTypeName(o)}}
|
||||
</van-tag>
|
||||
<span style="font-weight: bold; font-size: 14px">
|
||||
{{o.courseName}}
|
||||
<span v-if="activityStatus !== '1'">
|
||||
(
|
||||
<span style="color: red">余{{o.coursePeopleNumber - (o.hasRegisterNum + o.courseReservedNumber)}}</span>
|
||||
/{{o.coursePeopleNumber}}人)
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">校  区:</span>
|
||||
<span>{{o.campus}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">活动地点:</span>
|
||||
<span>{{o.courseLocation}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">联 系 人:</span>
|
||||
<span>{{o.courseInstructor}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">活动时间:</span>
|
||||
<span v-if="o.courseTimeList && o.courseTimeList.length > 1"
|
||||
@click="trainClick(o)"
|
||||
style="color: #1867b0">点我查看</span>
|
||||
<span @click="trainClick(o)"
|
||||
v-if="o.courseTimeList && o.courseTimeList.length === 1"
|
||||
style="color: #1867b0">
|
||||
{{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span @click.stop="showPic(FILE_DOMAIN + '/fileStreamPreview?id=' + tableData.wechat.id)"
|
||||
v-if="o.isSign === true && tableData.wechat"
|
||||
style="color: #dd6363">点我查看微信群二维码</span>
|
||||
</div>
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
v-if="activityStatus !== '1' && o.isSign === false"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="signUp(o)">
|
||||
我要报名
|
||||
</van-button>
|
||||
|
||||
<van-button type="primary" color="#dd6363" round size="mini"
|
||||
v-if="${@shiro.hasRole('sysadmin')}&&o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 50%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="cancel(o)">
|
||||
取消报名
|
||||
</van-button>
|
||||
|
||||
<van-button type="primary" :color="themeColor" round size="mini"
|
||||
v-if="o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="viewPopupShow=true">
|
||||
活动详情
|
||||
</van-button>
|
||||
|
||||
<image v-if="activityStatus !== '1' && o.isSign === true && moment().valueOf() >= moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 77%; top: 58%;"
|
||||
src="/assets/mobile/svg/train/sign_up.svg"></image>
|
||||
|
||||
<div @click="trainClick(o)" v-if="activityStatus === '1'"
|
||||
style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;
|
||||
position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">
|
||||
签到
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
<van-popup v-model:show="popupShow" class="popup">
|
||||
<!--<div @click="vant.Dialog.alert({message: '上课前30分钟,下课前30分钟。',theme: 'round-button',confirmButtonColor: '#1867b0'})"
|
||||
style="font-size: 12px; color: grey; text-align: right; position: relative; top: 8px; right: 6px; z-index: 2;">签到规则 ></div>-->
|
||||
|
||||
<div id="map" v-if="course.isMobileSign === true && course.signType === 3"
|
||||
style="width: 100%; height: 250px"></div>
|
||||
|
||||
<van-card
|
||||
:title="item.courseStartTime.substring(0, 10) + '(' +
|
||||
getWeek(item.courseStartTime.substring(0, 10)) + ')'"
|
||||
v-for="(item,index) in qdArray"
|
||||
thumb="/assets/mobile/svg/train/qd1.svg">
|
||||
<template #desc>
|
||||
<div style="margin-top: 7px">
|
||||
{{item.courseStartTime.substring(11, 19) + ' ~ ' +
|
||||
item.courseEndTime.substring(11, 19)}}
|
||||
</div>
|
||||
<div v-if="item.courseLocationCoordinates && item.isMobileSign === true">
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
@click.stop="showQRCode(item, 2)"
|
||||
v-if="activityStatus === '1' && item.isAttend === true && course.giftType === 1"
|
||||
style="position: absolute; right: 65px; top: 25%; width: 60px; height: 25px">
|
||||
礼品码
|
||||
</van-button>
|
||||
<van-button type="primary" color="#e1e1e1" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === false && findTime(item) === false"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px">
|
||||
未签到
|
||||
</van-button>
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === false && findTime(item) === true"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px"
|
||||
@click.stop="signIn(item)">
|
||||
签 到
|
||||
</van-button>
|
||||
<van-button type="primary" color="#61ce98" round size="mini"
|
||||
v-if="activityStatus === '1' && item.isAttend === true"
|
||||
style="position: absolute; right: 0; top: 25%; width: 60px; height: 25px">
|
||||
已签到
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-card>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<van-popup class="joinPopup" position="right" v-model:show="joinPopup">
|
||||
<van-nav-bar @click-left="joinPopup = false" fixed left-arrow placeholder
|
||||
title="活动报名"></van-nav-bar>
|
||||
<div class="join_content">
|
||||
<van-form @submit="joinSubmit">
|
||||
<div class="van-doc-card-two" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="所在单位" readonly v-model="formData.unitName"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="性别" readonly v-model="formData.sex"></van-field>
|
||||
<van-field label="出生年月" :value="formData.birthday"
|
||||
required
|
||||
:rules="[{ required:true, message: '请选择出生年月' }]"
|
||||
readonly
|
||||
clickable
|
||||
@click="birthdayShow = true"></van-field>
|
||||
<van-calendar v-model="birthdayShow"
|
||||
:color="themeColor"
|
||||
:min-date="minDate" :max-date="maxDate"
|
||||
@confirm="onBirthdayConfirm"></van-calendar>
|
||||
<van-field label="联系方式" v-model="formData.mobile"
|
||||
required
|
||||
placeholder="请填写联系方式"
|
||||
:rules="[{ required:true, message: '请填写联系方式' }]"></van-field>
|
||||
<van-field label="籍贯" v-model="formData.hometown"
|
||||
required
|
||||
placeholder="请填写籍贯"
|
||||
:rules="[{ required:true, message: '请填写籍贯' }]"></van-field>
|
||||
<van-field label="学历" v-model="formData.education"
|
||||
required
|
||||
placeholder="请填写学历"
|
||||
:rules="[{ required:true, message: '请填写学历' }]"></van-field>
|
||||
<train-dynamic-form v-model="dynamicColumnsData"
|
||||
ref="trainDynamicForm"></train-dynamic-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit">提交报名</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model:show="viewPopupShow" style="width: 100%;height: 100%" position="right">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动详情" left-arrow
|
||||
@click-left="viewPopupShow=false"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + this.activity.cover.id"
|
||||
style="display: contents"
|
||||
v-if="this.activity.cover && this.activity.cover.id"></van-image>
|
||||
<van-image src=""
|
||||
style="display: contents"
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<!-- <van-image height="186" src="/assets/mobile/img/fellowship_back.jpg"></van-image>-->
|
||||
<div class="title">{{activity.activityName}}</div>
|
||||
|
||||
<van-tabs v-model:active="tabActive" shrink>
|
||||
<van-tab title="详细信息" name="a">
|
||||
<div class="pre_text" v-html="activity.introduce"></div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
let pointArray = []
|
||||
let locations = null
|
||||
let map = null
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tabActive: 'a',
|
||||
minDate: new Date(1970, 1, 1),
|
||||
maxDate: new Date(2000, 11, 25),
|
||||
birthdayShow: false,
|
||||
allColumnsData: [],
|
||||
dynamicColumnsData: [],
|
||||
trainType: '交友联谊',
|
||||
trainTypeList: [],
|
||||
actionShow: false,
|
||||
timeList: [],
|
||||
activityId: '',
|
||||
activityStatus: '0',
|
||||
joinPopup: false,
|
||||
popupShow: false,
|
||||
viewPopupShow: false,
|
||||
courseText: '',
|
||||
qdInfoList: [],
|
||||
course: [],
|
||||
qdArray: [],
|
||||
activityOptions: [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}],
|
||||
courseOptions: [],
|
||||
courseType: '0',
|
||||
tempArray: [],
|
||||
activitySignUpStartTime: null,
|
||||
choose: {},
|
||||
activity: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'train-dynamic-form': httpVueLoader('/components/mobile/common/TrainDynamicForm.vue')
|
||||
},
|
||||
methods: {
|
||||
onBirthdayConfirm(data) {
|
||||
this.birthdayShow = false
|
||||
this.formData.birthday = moment(data).format('YYYY-MM-DD')
|
||||
},
|
||||
getCourseTypeName(o) {
|
||||
const b = this.courseOptions.find(item => item.value === o.courseType)
|
||||
return b ? b.text : ''
|
||||
},
|
||||
//二维码
|
||||
showQRCode(item, type) {
|
||||
const o = {
|
||||
userId: item.userId,
|
||||
signId: item.id,
|
||||
activityId: item.activityId,
|
||||
activityCourseId: item.activityCourseId,
|
||||
isMobileSign: item.isMobileSign,
|
||||
signType: item.signType,
|
||||
isReceiveGift: item.isReceiveGift,
|
||||
giftType: item.giftType,
|
||||
type: type,
|
||||
}
|
||||
// 生成二维码的 base64 编码
|
||||
const content = jrQrcode.getQrBase64(JSON.stringify(o))
|
||||
vant.ImagePreview([content])
|
||||
},
|
||||
showPic(url) {
|
||||
vant.ImagePreview([url])
|
||||
},
|
||||
findTime(o) {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
return o.courseStartTime.substr(0, 10) === today
|
||||
},
|
||||
findQd() {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const day = this.qdInfoList.find(item => {
|
||||
return item.courseStartTime.substr(0, 10) === today
|
||||
})
|
||||
if (day === undefined) {
|
||||
return 3
|
||||
} else {
|
||||
return day.isAttend ? 2 : 1
|
||||
}
|
||||
},
|
||||
async signIn(o) {
|
||||
if (o.signType === 1) {
|
||||
vant.Dialog.alert({message: '功能马上推出,敬请期待!'})
|
||||
return
|
||||
//调相机扫一扫
|
||||
/* wxScannerQrCode.scanner().then(async res => {
|
||||
if (res) {
|
||||
const course = JSON.parse(res)
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/codeSign', {
|
||||
codeCourseId: course.courseId,
|
||||
clickCourseId: o.courseId,
|
||||
id: o.id,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Dialog.alert({message: '签到成功'})
|
||||
await this.pageData()
|
||||
o.isAttend = true
|
||||
} else {
|
||||
vant.Dialog.alert({message: resp.msg})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
vant.Dialog.alert({message: err})
|
||||
})*/
|
||||
}
|
||||
if (o.signType === 2) {
|
||||
this.showQRCode(o, 1)
|
||||
}
|
||||
if (o.signType === 3) {
|
||||
//获取当前时间,年月日
|
||||
const date = new Date()
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const time = moment().format('YYYY-MM-DD hh:mm:ss')
|
||||
|
||||
const start = new Date(o.courseStartTime).getTime() - 1000 * 60 * 30
|
||||
//const end = new Date(o.courseStartTime).getTime() + 1000 * 60 * 30
|
||||
const end = new Date(o.courseEndTime).getTime()
|
||||
|
||||
const now = new Date().getTime()
|
||||
if (now < start || now > end) {
|
||||
vant.Toast('请在规定时间签到')
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
geolocation.getCurrentPosition(async function (status, result) {
|
||||
if (status === 'complete') {
|
||||
locations = [result.position.getLng(), result.position.getLat()]
|
||||
//用户当前位置
|
||||
const userPoint = new AMap.LngLat(result.position.getLng(), result.position.getLat())
|
||||
//课程位置
|
||||
const coursePoint = new AMap.LngLat(that.course.courseLocationCoordinates[0], that.course.courseLocationCoordinates[1])
|
||||
const distance = Math.round(userPoint.distance(coursePoint))
|
||||
if (distance > 250) {
|
||||
vant.Toast('请在250米内签到')
|
||||
return
|
||||
}
|
||||
const array = [result.position.getLng(), result.position.getLat()]
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/doQd', {
|
||||
id: o.id,
|
||||
courseId: that.course.id,
|
||||
point: JSON.stringify(array),
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
await that.pageData()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
that.popupShow = false
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//获取当前坐标点
|
||||
getPoint() {
|
||||
/*return new Promise((resolve, reject) => {
|
||||
window.navigator.geolocation.getCurrentPosition(position => {
|
||||
pointArray = [position.coords.longitude, position.coords.latitude]
|
||||
resolve(pointArray)
|
||||
}, error => {
|
||||
vant.Toast(error.message)
|
||||
pointArray = []
|
||||
reject([])
|
||||
})
|
||||
})*/
|
||||
geolocation.getCurrentPosition(function (status, result) {
|
||||
if (status === 'complete') {
|
||||
//alert(result.position)
|
||||
locations = result.position
|
||||
} else {
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "您确定要<span style='color: red'>取消【" + o.courseName + "】</span>吗?",
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/cancelSignUp', {
|
||||
activityId: o.activityId,
|
||||
courseId: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
}
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
async signUp(o) {
|
||||
this.choose = o
|
||||
if (o.conditionStructureId) {
|
||||
const {
|
||||
code,
|
||||
data: {flag, msg}
|
||||
} = await $.post('/platform/mobile/fellowshipActivity/validateSignUp', {id: o.conditionStructureId})
|
||||
if (code === 0) {
|
||||
if (flag === false) {
|
||||
vant.Toast('报名条件:' + msg)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
vant.Toast('系统错误,请联系管理员!')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (moment().valueOf() < moment(this.tempArray.activitySignUpStartTime).valueOf()) {
|
||||
vant.Toast('报名未开始')
|
||||
return
|
||||
}
|
||||
|
||||
if (moment().valueOf() > moment(this.tempArray.activitySignUpEndTime).valueOf()) {
|
||||
vant.Toast('报名已结束')
|
||||
return
|
||||
}
|
||||
|
||||
if (o.isSign) {
|
||||
return
|
||||
}
|
||||
if (o.coursePeopleNumber === (o.hasRegisterNum + o.courseReservedNumber)) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '当前报名人数已满',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
// vant.Toast('当前班报名人数已满')
|
||||
return
|
||||
}
|
||||
if (!o.canSignThisCourseType) {
|
||||
const str = this.activity.restrictLimit !== 3 ? '您选择的类型的交友联谊已达上限,不能再报该类型的交友联谊了!' : this.activity.activityName + '限制报' + this.activity.limitNum + '个活动,已达上限!'
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: str,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.get('/platform/mobile/fellowshipActivity/isSignFullByUnionId', {courseId: o.id})
|
||||
if (resp.code !== 0) {
|
||||
vant.Toast(resp.msg)
|
||||
return
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
mobile: "${@shiro.getPrincipalProperty('mobile')}",
|
||||
sex: "${@shiro.getPrincipalProperty('sex')}",
|
||||
birthday: moment("${@shiro.getPrincipalProperty('birthday')}").format('YYYY-MM-DD'),
|
||||
unionName: "${@shiro.getPrincipalProperty('union').getUnionname()}",
|
||||
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
|
||||
hometown: "${@shiro.getPrincipalProperty('hometown')}",
|
||||
education: "${@shiro.getPrincipalProperty('education')}",
|
||||
}
|
||||
this.$set(this.formData, "activityId", o.activityId)
|
||||
this.$set(this.formData, "courseId", o.id)
|
||||
|
||||
const column = this.allColumnsData.find(x => x.id === o.courseType)
|
||||
this.dynamicColumnsData = column ? column.trainMobileSignColumnList : []
|
||||
this.dynamicColumnsData.forEach(item => {
|
||||
item.columnValue = ''
|
||||
})
|
||||
this.joinPopup = true
|
||||
},
|
||||
async joinSubmit() {
|
||||
let valid = false
|
||||
try {
|
||||
await this.$refs.trainDynamicForm.$refs.form.validate()
|
||||
valid = true
|
||||
} catch (e) {
|
||||
valid = false
|
||||
}
|
||||
if (!valid) return
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您选择了【' + this.choose.courseName + '】\n确认要报名吗?报名成功后不能取消哦!',
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const mobileColumnsValue = this.dynamicColumnsData.map(v => {
|
||||
return {
|
||||
columnName: v.columnName,
|
||||
columnValue: v.columnValue,
|
||||
columnCode: v.columnCode,
|
||||
columnFormType: v.columnFormType
|
||||
}
|
||||
})
|
||||
this.formData.mobileColumnsValue = JSON.stringify(mobileColumnsValue)
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/doSignUp', this.formData)
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.joinPopup = false
|
||||
}
|
||||
toast.clear()
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
trainClick(o) {
|
||||
this.timeList = o.courseTimeList
|
||||
this.course = o
|
||||
this.qdArray = this.activityStatus === '0' ? o.courseTimeList : this.qdInfoList.filter(item => {
|
||||
return item.courseId === o.id
|
||||
})
|
||||
if (o.signType === 3) {
|
||||
this.initMap(o)
|
||||
}
|
||||
this.popupShow = true
|
||||
},
|
||||
initMap(o) {
|
||||
if (o.courseLocationCoordinates && o.courseLocationCoordinates.length < 2) {
|
||||
return
|
||||
}
|
||||
this.$nextTick(async () => {
|
||||
// 地图初始化应该在地图容器div已经添加到DOM树之后
|
||||
map = new AMap.Map('map', {
|
||||
zoom: 12,
|
||||
center: o.courseLocationCoordinates,
|
||||
resizeEnable: true,
|
||||
scrollWheel: true,
|
||||
})
|
||||
|
||||
AMap.plugin('AMap.Geolocation', function () {
|
||||
geolocation = new AMap.Geolocation({
|
||||
// 是否使用高精度定位,默认:true
|
||||
enableHighAccuracy: true,
|
||||
// 设置定位超时时间,默认:无穷大
|
||||
timeout: 10000,
|
||||
// 定位按钮的停靠位置的偏移量,默认:Pixel(10, 20)
|
||||
buttonOffset: new AMap.Pixel(10, 20),
|
||||
// 定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
|
||||
//zoomToAccuracy: true,
|
||||
// 定位按钮的排放位置, RB表示右下
|
||||
buttonPosition: 'RB',
|
||||
showCircle: false,
|
||||
//showButton: false,
|
||||
})
|
||||
map.addControl(geolocation);
|
||||
})
|
||||
|
||||
// 创建一个 Marker 实例:
|
||||
var marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(o.courseLocationCoordinates[0], o.courseLocationCoordinates[1]), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
|
||||
title: '签到点'
|
||||
});
|
||||
|
||||
//获取当前坐标点
|
||||
await this.getPoint()
|
||||
|
||||
var circle = new AMap.Circle({
|
||||
center: new AMap.LngLat(o.courseLocationCoordinates[0], o.courseLocationCoordinates[1]), // 圆心位置
|
||||
radius: 250, // 圆半径
|
||||
borderWeight: 1,
|
||||
strokeOpacity: 1,
|
||||
fillOpacity: 0.4,
|
||||
});
|
||||
|
||||
map.add(circle);
|
||||
// 缩放地图到合适的视野级别
|
||||
map.setFitView([circle])
|
||||
|
||||
// 多个点实例组成的数组
|
||||
var markerList = [marker];
|
||||
map.add(markerList);
|
||||
})
|
||||
},
|
||||
async pageData() {
|
||||
|
||||
const resp = await $.get('/platform/mobile/fellowshipActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: this.activityStatus
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
//如果这个课程开始了就不显示
|
||||
if (resp.data && resp.data.courseList.length > 0) {
|
||||
resp.data.courseList = resp.data.courseList.filter(item => {
|
||||
if (item.courseTimeList && item.courseTimeList.length > 0) {
|
||||
const today = moment().format('YYYY-MM-DD')
|
||||
const start = moment(item.courseTimeList[0].courseStartTime).format('YYYY-MM-DD')
|
||||
return moment(today).valueOf() <= moment(start).valueOf()
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
this.tableData = resp.data
|
||||
this.tempArray = clone(this.tableData)
|
||||
const type = this.trainTypeList.find(o => o.code === this.tableData.trainType)
|
||||
this.trainType = type ? type.name : '交友联谊'
|
||||
} else {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
}
|
||||
await this.getQdInfoList()
|
||||
this.courseChange(this.courseType, 1)
|
||||
this.loading = false;
|
||||
},
|
||||
async getQdInfoList() {
|
||||
const resp = await $.get('/platform/mobile/fellowshipActivity/getQdInfoList', {
|
||||
activityId: this.activityId,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.qdInfoList = resp.data
|
||||
}
|
||||
},
|
||||
getWeek(dateString) {
|
||||
var dateArray = dateString.split("-");
|
||||
const date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
|
||||
return "周" + "日一二三四五六".charAt(date.getDay());
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await $.post('/platform/fellowship/manage/type/getAllType', {})
|
||||
this.allColumnsData = resp.data
|
||||
return resp.data
|
||||
},
|
||||
async getCourseText() {
|
||||
const courseArray = await this.getAllType()
|
||||
this.courseOptions = []
|
||||
this.courseOptions.push({text: '全部类型', value: '0'})
|
||||
for (const item of courseArray) {
|
||||
if (item.personMaxRegisterNum > 0) {
|
||||
this.courseText += item.value + '报名最多选' + item.personMaxRegisterNum + '项,'
|
||||
}
|
||||
this.courseOptions.push({text: item.lxname, value: item.id})
|
||||
}
|
||||
this.courseText = this.courseText.substr(0, this.courseText.length - 1)
|
||||
},
|
||||
courseChange(value, item) {
|
||||
if (item === undefined) {
|
||||
this.tableData.courseList = []
|
||||
this.startLoading()
|
||||
}
|
||||
this.tableData.courseList = value === '0' ? this.tempArray.courseList : this.tempArray.courseList.filter(item => item.courseType === value)
|
||||
this.closeLoading()
|
||||
},
|
||||
async getActivity() {
|
||||
const resp = await $.get('/platform/mobile/fellowshipActivity/findOne', {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.trainTypeList = await getDictOptions("fellowshipType")
|
||||
this.activityId = GetQueryString('activityId')
|
||||
this.type = GetQueryString('type')
|
||||
const time = GetQueryString('endTime')
|
||||
if (this.type === 'my') {
|
||||
this.activityOptions = [{text: '我报名的', value: '1'}]
|
||||
this.activityStatus = '1'
|
||||
} else {
|
||||
this.activityOptions = [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}]
|
||||
this.activityStatus = new Date().getTime() > new Date(time).getTime() ? '1' : '0'
|
||||
}
|
||||
this.activitySignUpStartTime = GetQueryString('activitySignUpStartTime')
|
||||
vant.Toast.setDefaultOptions({duration: 2000});
|
||||
this.startLoading()
|
||||
this.pageData()
|
||||
this.getCourseText()
|
||||
this.getActivity()
|
||||
this.closeLoading()
|
||||
|
||||
//await wxScannerQrCode.initWxConfig(window.location.href)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,196 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px auto 0;
|
||||
width: 96%;
|
||||
border-radius: 10px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
flex: 0.6;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 5px 0px;
|
||||
border-color: #1867b0;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.van-image__error, .van-image__loading {
|
||||
height: 200px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="活动列表" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.activityStatus" @change="tabChange">
|
||||
<van-tab title="全部" name="0"></van-tab>
|
||||
<van-tab v-if="type !== 'my'" title="报名进行中" name="1"></van-tab>
|
||||
<van-tab v-if="type === 'my'" title="进行中" name="3"></van-tab>
|
||||
<van-tab title="已结束" name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<div style="margin-bottom: 20px">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div @click="welfareClick(o)">
|
||||
<div>
|
||||
<van-image :src="FILE_DOMAIN + '/fileStreamPreview?id=' + o.cover.id"
|
||||
style="display: contents"
|
||||
v-if="o.cover && o.cover.filepath"></van-image>
|
||||
<van-image src=""
|
||||
style="display: contents"
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{o.activityName}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title"><span
|
||||
style="color: grey">年  度:</span>{{o.year}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">活动对象:</span>{{o.activityGroupName}}
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">报名时间:</span>
|
||||
{{moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<div style="margin-top: 6px"><span style="color: grey">活动时间:</span>
|
||||
{{moment(o.activityStartTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.activityEndTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/platform/mobile/fellowshipActivity/fellowshipList?type=sign">交友联谊</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/platform/mobile/fellowshipActivity/fellowshipList?type=my">我的联谊</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async welfareClick(o) {
|
||||
if (this.type === 'my') {
|
||||
window.location.href = '/platform/mobile/fellowshipActivity/fellowshipInfo' +
|
||||
'?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime + '&type=my' + '&startTime=' + o.activitySignUpStartTime
|
||||
} else {
|
||||
window.location.href = '/platform/mobile/fellowshipActivity/activityInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/platform/mobile/fellowshipActivity/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const param = urlParams.get('type');
|
||||
this.tarBarActive = param === 'my' ? 1 : 0;
|
||||
this.type = GetQueryString('type')
|
||||
this.pageForm.type = this.type
|
||||
this.startLoading()
|
||||
this.pageForm.activityStatus = this.type === 'my' ? '3' : '1'
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.type = GetQueryString('type')
|
||||
vue.pageForm.type = this.type
|
||||
vue.startLoading()
|
||||
vue.pageForm.activityStatus = this.type === 'my' ? '3' : '1'
|
||||
vue.pageData()
|
||||
vue.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,455 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写申报信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right" @submit="onSubmit">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly v-model="formData.user_name" name="user_name" label="申请人姓名"></van-field>
|
||||
<van-field readonly v-model="formData.apply_time" name="apply_time" label="申请时间"></van-field>
|
||||
<van-field readonly v-model="formData.mobile" name="mobile" label="联系方式"></van-field>
|
||||
<van-field readonly
|
||||
clickable
|
||||
name="activity_type"
|
||||
:value="formData.activity_type_name"
|
||||
required
|
||||
label="活动主体类型"
|
||||
@click="showActivityTypePicker = true"
|
||||
placeholder="点击选择活动主体类型"
|
||||
:rules="[{ required:true, message: '请选择活动主体类型'}]"></van-field>
|
||||
<van-popup v-model:show="showActivityTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar
|
||||
:columns="activityTypeColumns"
|
||||
@confirm="onActivityTypeConfirm"
|
||||
@cancel="showActivityTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field readonly
|
||||
clickable
|
||||
name="projectTypeCode"
|
||||
:value="formData.projectTypeCodeName"
|
||||
required
|
||||
label="活动项目类型"
|
||||
@click="showActivityProjectTypePicker = true"
|
||||
placeholder="点击选择活动项目类型"
|
||||
:rules="[{ required:true, message: '请选择活动项目类型'}]"></van-field>
|
||||
<van-popup v-model:show="showActivityProjectTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar
|
||||
:columns="activityProjectTypeColumns"
|
||||
@confirm="onActivityProjectTypeConfirm"
|
||||
@cancel="showActivityProjectTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.activity_name"
|
||||
name="activity_name"
|
||||
label="活动名称"
|
||||
placeholder="请输入活动名称"
|
||||
required
|
||||
:rules="[{ required:true, message: '请输入活动名称' }]"></van-field>
|
||||
<van-field readonly
|
||||
v-model="formData.projectCode"
|
||||
name="projectCode"
|
||||
label="项目编号"
|
||||
required
|
||||
:rules="[{ required:true, message: '选择活动类型自动生成' }]"
|
||||
placeholder="选择活动类型自动生成"></van-field>
|
||||
|
||||
<template v-if="formData.activity_type!=40003">
|
||||
<van-field v-model="formData.fundsUnitName"
|
||||
name="fundsUnitName"
|
||||
label="申报(承办)单位"
|
||||
required
|
||||
:rules="[{ required:true, message: '选择活动类型自动生成' }]"
|
||||
placeholder="请输入申报(承办)单位"></van-field>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-field readonly
|
||||
clickable
|
||||
name="fundsUnitName"
|
||||
:value="formData.fundsUnitName"
|
||||
required
|
||||
label="申报(承办)单位"
|
||||
@click="showFundsUnitNamePicker = true"
|
||||
placeholder="请选择申报(承办)单位"
|
||||
:rules="[{ required:true, message: '请选择申报(承办)单位'}]"></van-field>
|
||||
<van-popup v-model:show="showFundsUnitNamePicker" position="bottom" round>
|
||||
<van-picker show-toolbar
|
||||
:columns="fundsUnitNameColumns"
|
||||
@confirm="onFundsUnitNameConfirm"
|
||||
@cancel="showFundsUnitNamePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写活动计划开始时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="startPlannedDate"
|
||||
:value="formData.startPlannedDate"
|
||||
label="活动计划开始时间"
|
||||
placeholder="点击选择活动计划开始时间"
|
||||
@click="showStartPlannedDatePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model:show="showStartPlannedDatePicker" position="bottom" round>
|
||||
<van-datetime-picker
|
||||
v-model="formData.startPlannedDate"
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onStartPlannedDateConfirm"
|
||||
@cancel="showStartPlannedDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写活动计划结束时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="endPlannedDate"
|
||||
:value="formData.endPlannedDate"
|
||||
label="活动计划结束时间"
|
||||
placeholder="点击选择活动计划结束时间"
|
||||
@click="showEndPlannedDatePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model:show="showEndPlannedDatePicker" position="bottom" round>
|
||||
<van-datetime-picker
|
||||
v-model="formData.endPlannedDate"
|
||||
type="date"
|
||||
title="选择年月日"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onEndPlannedDateConfirm"
|
||||
@cancel="showEndPlannedDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.address"
|
||||
name="address"
|
||||
label="活动地址"
|
||||
required
|
||||
:rules="[{ required:true, message: '选择活动类型自动生成' }]"
|
||||
placeholder="请输入活动地址"></van-field>
|
||||
|
||||
<van-field v-model="formData.activity_content"
|
||||
rows="2"
|
||||
autosize
|
||||
type="textarea"
|
||||
name="activity_content"
|
||||
label="活动方案及简介"
|
||||
required
|
||||
:rules="[{ required:true, message: '选择活动类型自动生成' }]"
|
||||
placeholder="请输入活动方案及简介"></van-field>
|
||||
|
||||
<van-cell-group inset class="up_down" style="margin: 0">
|
||||
<div class="van-cell" style="flex-direction: column;">
|
||||
<div class="van-cell__title van-field__label"
|
||||
style="display: flex;justify-content: space-between;width: 100%">
|
||||
<div style="display: flex;">
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>活动费用预算表</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-button v-if="formData.budgets && formData.budgets.length>0 && formData.budgets.length<3"
|
||||
style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="formData.budgets.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="formData.budgets && formData.budgets.length>0">
|
||||
<div v-for="o,i in formData.budgets" :key="i" class="mt5">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<span>费用{{(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
:disabled="formData.budgets.length==1"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="formData.budgets.splice(i,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="费用项目名称" v-model="o.name" placeholder="费用项目名称"
|
||||
:rules="[{ required:true, message: '请填写费用项目名称' }]"></van-field>
|
||||
<van-field label="单价(元)" v-model="o.unitPrice" placeholder="单价(元)" type="number"
|
||||
:rules="[{ required:true, message: '请填写单价' }]"></van-field>
|
||||
<van-field label="数量" v-model="o.num" placeholder="请填写数量" type="digit"
|
||||
:rules="[{ required:true, message: '请填写数量' }]"></van-field>
|
||||
<van-field label="合计(元)" v-model="o.total" placeholder="输入单价和数量自动计算">
|
||||
<template #input>
|
||||
{{isNaN(o.unitPrice * o.num) ? '输入单价和数量自动计算' : (o.unitPrice *
|
||||
o.num).toFixed(2)}}
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="formData.budgets.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-field name="files" label="附件" style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-cell-group inset style="margin: 0">
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">签字</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" v-model="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
minDate: new Date(2010, 0, 1),
|
||||
maxDate: new Date(2030, 10, 1),
|
||||
currentDate: new Date(),
|
||||
|
||||
showActivityTypePicker: false,
|
||||
activityTypeColumns: [],
|
||||
|
||||
showActivityProjectTypePicker: false,
|
||||
activityProjectTypeColumns: [],
|
||||
|
||||
showFundsUnitNamePicker: false,
|
||||
fundsUnitNameColumns: [],
|
||||
|
||||
showStartPlannedDatePicker: false,
|
||||
|
||||
showEndPlannedDatePicker: false,
|
||||
|
||||
formData: {},
|
||||
|
||||
id: null
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onActivityTypeConfirm(val) {
|
||||
this.showActivityTypePicker = false
|
||||
this.formData.activity_type = val.value
|
||||
this.formData.activity_type_name = val.text
|
||||
this.getProjectCodeChange()
|
||||
},
|
||||
onActivityProjectTypeConfirm(val) {
|
||||
this.showActivityProjectTypePicker = false
|
||||
this.formData.projectTypeCode = val.value
|
||||
this.formData.projectTypeCodeName = val.text
|
||||
},
|
||||
onFundsUnitNameConfirm(val) {
|
||||
this.formData.fundsUnitName = val.text
|
||||
this.formData.fundsUnitId = val.value
|
||||
this.showFundsUnitNamePicker = false
|
||||
},
|
||||
onStartPlannedDateConfirm(val) {
|
||||
console.log(val)
|
||||
this.formData.startPlannedDate = moment(val).format("YYYY-MM-DD")
|
||||
this.showStartPlannedDatePicker = false
|
||||
},
|
||||
onEndPlannedDateConfirm(val) {
|
||||
console.log(val)
|
||||
this.formData.endPlannedDate = moment(val).format("YYYY-MM-DD")
|
||||
this.showEndPlannedDatePicker = false
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
if(!this.formData.sign){
|
||||
this.$toast('请签字')
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定提交吗?'
|
||||
}).then(async () => {
|
||||
const formData = clone(this.formData)
|
||||
if (formData.budgets) {
|
||||
formData.budgets.forEach(v => {
|
||||
v.total = (v.unitPrice * v.num).toFixed(2)
|
||||
})
|
||||
}
|
||||
|
||||
const url = this.formData.id ? '/platform/jf/Funds/apply/doEdit' : '/platform/jf/Funds/apply/doAdd'
|
||||
|
||||
const resp = await $.post(url, {
|
||||
activityBx: JSON.stringify(formData),
|
||||
sign: this.formData.sign
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
pjaxReplace('/platform/jf/funds/reimbursement/mobile')
|
||||
}, 500)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async init() {
|
||||
this.formData = {
|
||||
apply_type: 1,
|
||||
budgets: [
|
||||
{}
|
||||
],
|
||||
files: [],
|
||||
time: [],
|
||||
activity_type: null,
|
||||
activity_money: null,
|
||||
user_name: '${@shiro.getPrincipalProperty("username")}',
|
||||
mobile: '${@shiro.getPrincipalProperty("mobile")}',
|
||||
apply_time: moment().format('YYYY-MM-DD'),
|
||||
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
|
||||
}
|
||||
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('club01'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40002")
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('club01')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40003")
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('club01'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40001")
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
}
|
||||
|
||||
if (this.formData.activity_type) {
|
||||
await this.getProjectCodeChange()
|
||||
}
|
||||
},
|
||||
|
||||
async activityChange(val) {
|
||||
if (!this.formData.activity_type) {
|
||||
const activity = this.activity.find(v => v.v_name == val)
|
||||
this.$set(this.formData, 'activity_id', activity ? activity.id : null)
|
||||
this.$set(this.formData, 'projectTypeCode', activity ? activity.projectTypeCode : null)
|
||||
if (!activity) await this.generateProjectCode(this.formData.activity_type)
|
||||
}
|
||||
},
|
||||
async generateProjectCode(val) {
|
||||
const {data} = await $.get('/platform/jf/Funds/apply/generateProjectCode', {activity_type: val})
|
||||
this.$set(this.formData, 'projectCode', data)
|
||||
},
|
||||
async getProjectCodeChange(val) {
|
||||
this.$set(this.formData, "fundsUnitName", null)
|
||||
await this.generateProjectCode(this.formData.activity_type)
|
||||
if (this.formData.activity_type == 40001) {
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
} else if (this.formData.activity_type == 40002) {
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if (this.formData.activity_type == 40003) {
|
||||
const allClubs = await getClubs()
|
||||
$.get('/platform/jf/Funds/apply/getUserClub').then(resp => {
|
||||
if (resp.code === 0) {
|
||||
const userClubIds = resp.data.map(v => v.clubid)
|
||||
this.fundsUnitNameColumns = allClubs.filter(v => {
|
||||
return userClubIds.includes(v.id)
|
||||
}).map(v => {
|
||||
return {
|
||||
text: v.name,
|
||||
value: v.id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/jf/Funds/apply/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
async openEdit(id) {
|
||||
const data = await this.findOne(id)
|
||||
data.activity_type = data.activity_type.toString()
|
||||
if (data.files && data.files.length > 0) data.files = JSON.parse(data.files)
|
||||
data.plannedDate = [data.startPlannedDate, data.endPlannedDate]
|
||||
|
||||
if(data.budgets){
|
||||
data.budgets = JSON.parse(data.budgets)
|
||||
}else{
|
||||
data.budgets = []
|
||||
}
|
||||
|
||||
if(data.us_s){
|
||||
data.sign = data.us_s
|
||||
}
|
||||
|
||||
this.formData = data
|
||||
|
||||
const activity_type_name = this.activityTypeColumns.find(v => v.value === this.formData.activity_type)?.text
|
||||
this.$set(this.formData,'activity_type_name',activity_type_name)
|
||||
|
||||
const projectTypeCodeName = this.activityProjectTypeColumns.find(v => v.value === this.formData.projectTypeCode)?.text
|
||||
this.$set(this.formData,'projectTypeCodeName',projectTypeCodeName)
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
getActivityTwoLevelType("40000").then(data => {
|
||||
this.activityTypeColumns = data.map(v => {
|
||||
return {
|
||||
text: v.name,
|
||||
value: v.code
|
||||
}
|
||||
})
|
||||
})
|
||||
getActivityTwoLevelType("50000").then(data => {
|
||||
this.activityProjectTypeColumns = data.map(v => {
|
||||
return {
|
||||
text: v.name,
|
||||
value: v.code
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
let id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.openEdit(id)
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,209 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.van-cell-group__title .van-sidebar-item {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.flex-direction-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-direction-column .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="经费报销申请详情" left-arrow placeholder fixed @click-left="pjaxReplace('/platform/jf/funds/reimbursement/mobile')"></van-nav-bar>
|
||||
<div>
|
||||
<van-form readonly input-align="right">
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
申请信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-field readonly :value="viewData.user_name" label="申请人姓名"></van-field>
|
||||
<van-field readonly :value="viewData.apply_time" label="申请时间"></van-field>
|
||||
<van-field readonly :value="viewData.mobile" label="联系方式"></van-field>
|
||||
<van-field readonly :value="viewData.activityTypeName" label="活动主体类型"></van-field>
|
||||
<van-field readonly :value="viewData.projectTypeName" label="活动项目类型"></van-field>
|
||||
<van-field readonly :value="viewData.activity_name" label="活动名称"></van-field>
|
||||
<van-field readonly :value="viewData.projectCode" label="项目编号"></van-field>
|
||||
<van-field readonly :value="viewData.fundsUnitName" label="申报(承办)单位"></van-field>
|
||||
<van-field readonly :value="viewData.startPlannedDate" label="活动计划开始时间"></van-field>
|
||||
<van-field readonly :value="viewData.endPlannedDate" label="活动计划结束时间"></van-field>
|
||||
<van-field readonly :value="viewData.address" label="活动地址"></van-field>
|
||||
<van-field readonly label="活动方案及简介">
|
||||
<template #input>
|
||||
<div v-html="viewData.activity_content"></div>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field class="flex-direction-column">
|
||||
<template #label>
|
||||
<div class="mb10">活动费用预算表</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>费用项目名称</th>
|
||||
<th>单价(元)</th>
|
||||
<th>数量</th>
|
||||
<th>合计(元)</th>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in viewData.budgets" :key="index">
|
||||
<td>{{index+1}}</td>
|
||||
<td>{{item.name}}</td>
|
||||
<td>{{item.unitPrice}}</td>
|
||||
<td>{{item.num}}</td>
|
||||
<td>{{item.total}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200"
|
||||
height="100"
|
||||
:src="viewData.us_s"
|
||||
v-if="viewData.us_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="附件"
|
||||
style="flex-flow: column"
|
||||
input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附件</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="viewData.files" view :del="false"
|
||||
v-if="viewData.files&&viewData.files.length"></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
|
||||
<template v-if="viewData.division_chairman_name">
|
||||
<div class="van-cell-group__title mt10">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-form readonly input-align="right">
|
||||
<van-field label="审核人" :value="viewData.dc_username"></van-field>
|
||||
<van-field label="审核时间" :value="viewData.division_chairman_time"></van-field>
|
||||
<van-field label="活动申请费用" :value="viewData.funds_money+'元'"></van-field>
|
||||
<van-field label="审核意见" :value="viewData.division_chairman_idea"></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.dc_s"
|
||||
v-if="viewData.dc_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="viewData.association_principal_id">
|
||||
<div class="van-cell-group__title mt10">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
协会审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-form readonly input-align="right">
|
||||
<van-field label="审核人" :value="viewData.ap_username"></van-field>
|
||||
<van-field label="审核时间" :value="viewData.association_principal_time"></van-field>
|
||||
<van-field label="活动申请费用" :value="viewData.funds_money+'元'"></van-field>
|
||||
<van-field label="审核意见" :value="viewData.association_principal_idea"></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.ap_s"
|
||||
v-if="viewData.ap_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<template v-if="viewData.accounting_name">
|
||||
<div class="van-cell-group__title mt10">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会副主席审核信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-form readonly input-align="right">
|
||||
<van-field label="审核人" :value="viewData.a_username"></van-field>
|
||||
<van-field label="审核时间" :value="viewData.accounting_time"></van-field>
|
||||
<van-field label="审核意见" :value="viewData.accounting_idea"></van-field>
|
||||
<van-field name="sign" label="签字">
|
||||
<template #input>
|
||||
<van-image width="200" height="100" :src="viewData.a_s"
|
||||
v-if="viewData.a_s"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
components: {
|
||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne() {
|
||||
const {data, code, msg} = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id: this.id})
|
||||
if (code === 0) {
|
||||
this.viewData.files = []
|
||||
if (data && data.budgets) {
|
||||
data.budgets = JSON.parse(data.budgets)
|
||||
}
|
||||
if (data && data.files) {
|
||||
data.files = JSON.parse(data.files)
|
||||
}
|
||||
this.viewData = data
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$toast(msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.findOne()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,134 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card-divider {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.list-card-footer {
|
||||
padding: 0 10px 10px 10px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
column-gap: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="经费报销申请列表"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearOption" @change="yearChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div @click="openInfo(o.id)" class="list-card" v-for="o in tableData">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="活动名称">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px;">
|
||||
{{o.activity_name}}
|
||||
</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="主体类型">
|
||||
{{ o.activity_type == 40002 ? "分工会活动" : o.activity_type == 40003 ?
|
||||
"协会(协会)活动" :
|
||||
"校工会活动"}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="项目类型">
|
||||
{{o.absName}}({{o.projectTypeCode}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请人姓名">{{o.user_name}}</van-cell>
|
||||
<van-cell :border="false" title="申请人工号">{{o.bxr_loginname}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.bxr_unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.state_color">{{o.state_name}}</span>
|
||||
</van-cell>
|
||||
<van-divider class="list-card-divider"></van-divider>
|
||||
<div class="list-card-footer">
|
||||
<van-button :color="themeColor" @click.stop="openInfo(o.id)" size="small">
|
||||
查看详情
|
||||
</van-button>
|
||||
<van-button :color="themeColor" @click.stop="openEdit(o.id)"
|
||||
size="small"
|
||||
v-if="[1005,1015,1035].includes(o.state_id)">编辑
|
||||
</van-button>
|
||||
<van-button @click.stop="doDelete(o.id)" size="small" type="danger"
|
||||
v-if="[1010,1000].includes(o.state_id) || ${@shiro.hasRole('sysadmin')}">
|
||||
删除
|
||||
</van-button>
|
||||
<!-- v-if="[1005,1015,1035].includes(o.state_id)"-->
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
<van-empty class="custom-image" description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
apply_type: 1
|
||||
},
|
||||
pageDataUrl: '/platform/jf/activity_bx/reimbursement/pageData'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openInfo(id) {
|
||||
pjaxReplace('/platform/jf/funds/reimbursement/mobileApplyInfo?id=' + id)
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
this.onRefresh()
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要删除吗?'
|
||||
}).then(async () => {
|
||||
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doDelete", {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.error(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(id) {
|
||||
pjaxReplace('/platform/jf/Funds/apply/mobile?id=' + id)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,683 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- 在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<title></title>
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css">
|
||||
<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
max-width: 600px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-family: PingFang SC, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.page-v {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.detail-v {
|
||||
margin-top: 15px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.p15 {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.njuColor {
|
||||
color: rgb(106, 0, 95);
|
||||
}
|
||||
|
||||
.title-v {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.form-v {
|
||||
/*margin-top: 20px;*/
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.weui-msg {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
min-width: 100px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: url('/assets/platform/img/checkin/bcc.jpg') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 230px;
|
||||
display: flex;
|
||||
color: #7ca4d8;
|
||||
}
|
||||
.van-tabbar-item__icon {
|
||||
font-size: 28px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.van-tabbar-item__text {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
.header .container {
|
||||
font-size: 13px;
|
||||
letter-spacing: 1px;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
padding-right: 20px;
|
||||
padding-top: 16px;
|
||||
text-align: right;
|
||||
}
|
||||
.header .day {
|
||||
font-size: 60px;
|
||||
letter-spacing: 2px;
|
||||
color: white;
|
||||
}
|
||||
.van-tag {
|
||||
font-size: 25px;
|
||||
background-color: transparent;
|
||||
padding: 6px 16px;
|
||||
}
|
||||
.van-tag--primary.van-tag--plain {
|
||||
color: white;
|
||||
}
|
||||
.my_body {
|
||||
width: 94%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
top: -48px;
|
||||
}
|
||||
.van-calendar {
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
}
|
||||
.van-calendar__day {
|
||||
font-size: 18px;
|
||||
}
|
||||
.van-calendar__selected-day {
|
||||
width: 40px;
|
||||
height: 36px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
.sign_in_day {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 37px !important;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
color: #4ABE84;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 2px 7px 0px rgba(85, 110, 97, 0.35);
|
||||
border-radius: 7px;
|
||||
border: 1px solid rgba(74, 190, 132, 1);
|
||||
}
|
||||
.sign_in_day:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border: 13px solid #4ABE84;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
border-bottom-right-radius: 6px;
|
||||
/*border-radius: 0 0 0 7px;*/
|
||||
}
|
||||
.sign_in_day:after {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 8px;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
bottom: 4px;
|
||||
border: 2px solid #fff;
|
||||
border-top-color: transparent;
|
||||
border-left-color: transparent;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.info {
|
||||
width: 88%;
|
||||
margin: 20px auto 10px;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.sign_pop {
|
||||
overflow-y: visible;
|
||||
width: 75%;
|
||||
height: 226px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
.sign_button {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
}
|
||||
.sign_button button {
|
||||
width: 90%;
|
||||
height: 36px;
|
||||
}
|
||||
.van-calendar__body {
|
||||
display: none;
|
||||
}
|
||||
.white_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
}
|
||||
.white_pop .van-cell {
|
||||
padding: 10px 34px;
|
||||
}
|
||||
.is_show_cell {
|
||||
padding: 0;
|
||||
}
|
||||
.van-calendar__selected-day {
|
||||
border: 1px solid #236eb4;
|
||||
box-shadow: 0px 2px 7px 0px #236eb4;
|
||||
}
|
||||
.zan_order {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
padding-right: 10px;
|
||||
color: grey;
|
||||
}
|
||||
.van-uploader__preview-image {
|
||||
width: 98px;
|
||||
height: 94px;
|
||||
}
|
||||
.van-uploader__upload {
|
||||
width: 98px;
|
||||
height: 94px;
|
||||
}
|
||||
.van-empty{
|
||||
transform: none;
|
||||
position: relative;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
|
||||
<van-nav-bar
|
||||
title="一路美景"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
|
||||
safe-area-inset-top
|
||||
>
|
||||
<template #right>
|
||||
<van-icon @click="signIn" color="#fff" size="20" name="photograph"></van-icon>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
|
||||
<div v-if="active === 0" class="page-v">
|
||||
<!--#include("/mobile/hd/checkin/friends.html"){}#-->
|
||||
</div>
|
||||
<div v-if="active === 1" class="page-v">
|
||||
<!--#include("/mobile/hd/checkin/my.html"){}#-->
|
||||
</div>
|
||||
|
||||
<van-tabbar
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active" @change="tabbarChange"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="thumb-circle-o">新鲜事</van-tabbar-item>
|
||||
<van-tabbar-item icon="user-o">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
|
||||
<!--发表内容弹框-->
|
||||
<van-popup v-model:show="writePopShow" class="white_pop" :style="{ height: '100%' }" @close="signClose">
|
||||
<div style="display: flex; justify-content: space-between; padding: 10px 20px; letter-spacing: 1px; align-items: center">
|
||||
<div @click="writePopClose" style="font-size: 16px">取消</div>
|
||||
<div>
|
||||
<van-button @click="signDo" color="#236eb4" size="mini" :disabled="message.trim() === '' && fileList.length === 0"
|
||||
style="border-radius: 6px; height: 28px; letter-spacing: 1px; font-size: 14px">发表</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<van-field
|
||||
v-model="message"
|
||||
rows="3" style="font-size: 15px"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="分享新鲜事..."
|
||||
></van-field>
|
||||
</div>
|
||||
<div style="padding: 10px 34px">
|
||||
<van-uploader v-model="fileList" multiple :after-read="afterRead" @delete="doDelete" :before-read="beforeRead"
|
||||
accept="image/*" :max-count="9" :multiple="true"></van-uploader>
|
||||
</div>
|
||||
<div style="margin-top: 40px">
|
||||
<van-cell-group border style="width: 82%; margin: 0 auto">
|
||||
<van-cell @click="actionShow = true" title="是否公开" class="is_show_cell" icon="user-o"
|
||||
is-link border :value="isOpenText" style="padding: 10px 0px; font-size: 15px"></van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-action-sheet v-model="actionShow" :actions="actions" cancel-text="取消" @select="(action) => { isOpenText = action.name }"
|
||||
close-on-click-action></van-action-sheet>
|
||||
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script>
|
||||
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
var xhrOnProgress = function (fun) {
|
||||
xhrOnProgress.onprogress = fun; //绑定监听
|
||||
//使用闭包实现监听绑
|
||||
return function () {
|
||||
//通过$.ajaxSettings.xhr();获得XMLHttpRequest对象
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
//判断监听函数是否为函数
|
||||
if (typeof xhrOnProgress.onprogress !== 'function')
|
||||
return xhr;
|
||||
//如果有监听函数并且xhr对象支持绑定时就把监听函数绑定上去
|
||||
if (xhrOnProgress.onprogress && xhr.upload) {
|
||||
xhr.upload.onprogress = xhrOnProgress.onprogress;
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}
|
||||
|
||||
function getSuffix(filename) {
|
||||
return /\.[^\.]+$/.exec(filename)
|
||||
}
|
||||
Vue.use(vant.Lazyload, {
|
||||
lazyComponent: true,
|
||||
});
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
signCount: 0,
|
||||
tableData: [],
|
||||
finished: false,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
},
|
||||
loading: false,
|
||||
isSignCurentDay: false,
|
||||
isLoading: false,
|
||||
isOrder: false,
|
||||
isOpenText: '公开',
|
||||
actions: [{ name: '公开' }, { name: '仅自己可见' }],
|
||||
actionShow: false,
|
||||
fileList: [],
|
||||
message: '',
|
||||
writePopShow: false,
|
||||
signShow: false,
|
||||
boxData: {},
|
||||
showPage: false,
|
||||
showPicker: false,
|
||||
showMsg: false,
|
||||
percent: 0,
|
||||
flag: true,
|
||||
showPlan: true,
|
||||
msg: '',
|
||||
fd: [],
|
||||
active: 1,
|
||||
isNull: function (val) {
|
||||
if (val === null || val === undefined || val === '') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg', 'heif'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
doctype: ['doc', 'docx', 'txt'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
beforeRead(file) {
|
||||
if(!Array.isArray(file)) {
|
||||
file = [file]
|
||||
}
|
||||
for (const f of file) {
|
||||
const type = this.imgtype.includes(f.name.split('.')[1].toLowerCase());
|
||||
if (!type) {
|
||||
const str = this.imgtype.map(v => v.toLowerCase()).join("/")
|
||||
vant.Toast('上传文件只能是' + str + '格式!');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
writePopClose() {
|
||||
if (this.fileList.length > 0) {
|
||||
const u = this.fileList.map(o => o.data.filepath)
|
||||
$.post('/mobile/checkin/delFile', {url: JSON.stringify(u)})
|
||||
}
|
||||
this.writePopShow = false
|
||||
},
|
||||
doDelete(file) {
|
||||
$.post('/mobile/checkin/delFile', {url: JSON.stringify([file.data.filepath])})
|
||||
},
|
||||
afterRead(file) {
|
||||
let formData = new FormData();
|
||||
if (Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
item.status = 'uploading';
|
||||
item.message = '上传中...';
|
||||
formData.append("file", item.file, item.file.name);
|
||||
})
|
||||
} else {
|
||||
file.status = 'uploading';
|
||||
file.message = '上传中...';
|
||||
formData.append("file", file.file, file.file.name);
|
||||
}
|
||||
$.ajax({
|
||||
url: "/mobile/checkin/uploadFile",
|
||||
type: "post",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (res) => {
|
||||
const {code, data} = res
|
||||
if (code === 0) {
|
||||
if(Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
const f = data.find(o => o.filename === item.file.name)
|
||||
item.status = 'success';
|
||||
item.data = f
|
||||
})
|
||||
} else {
|
||||
file.status = 'success';
|
||||
file.data = data[0]
|
||||
}
|
||||
}
|
||||
},
|
||||
error: (err) => {
|
||||
if(Array.isArray(file)) {
|
||||
file.forEach(item => {
|
||||
item.status = 'failed';
|
||||
item.message = '上传失败';
|
||||
})
|
||||
} else {
|
||||
file.status = 'failed';
|
||||
file.data = '上传失败'
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
onRefresh () {
|
||||
setTimeout(() => {
|
||||
vant.Toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async zanOrder () {
|
||||
this.isOrder = !this.isOrder
|
||||
const toast = vant.Toast.loading({message: '获取排行中...', forbidClick: true, loadingType: 'spinner',});
|
||||
this.pageForm.order = this.isOrder
|
||||
setTimeout(() => {
|
||||
this.doSearch();
|
||||
toast.clear()
|
||||
}, 200)
|
||||
},
|
||||
async signDo () {
|
||||
const that = this
|
||||
|
||||
let array = []
|
||||
this.fileList.forEach(item => {
|
||||
array.push(item.data)
|
||||
})
|
||||
const formdata = {
|
||||
'hdid': getQueryVariable("id"),
|
||||
'content': this.message,
|
||||
'isOpen': this.isOpenText === '公开',
|
||||
'files': JSON.stringify(array),
|
||||
}
|
||||
console.log(array)
|
||||
const resp = await $.post('/mobile/checkin/doAdd', formdata)
|
||||
if (resp.code === 0) {
|
||||
this.signCount = resp.data
|
||||
that.doSearch()
|
||||
that.findOne()
|
||||
that.writePopShow = false
|
||||
vant.Toast('发表成功')
|
||||
} else {
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
}
|
||||
},
|
||||
async delContent(item) {
|
||||
vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要删除吗?',
|
||||
confirmButtonColor: '#236eb4',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/checkin/del', {
|
||||
id: item.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.findOne()
|
||||
vant.Toast('删除成功')
|
||||
} else {
|
||||
vant.Toast('删除失败')
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.getContent()
|
||||
},
|
||||
tabbarChange (o) {
|
||||
this.doSearch();
|
||||
/*if (o !== 0) {
|
||||
this.pageForm.day = ''
|
||||
this.doSearch();
|
||||
}
|
||||
if(o === 2) {
|
||||
this.$nextTick(() => {
|
||||
$('.van-calendar__body').css('display', 'none')
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 80)
|
||||
})
|
||||
}*/
|
||||
},
|
||||
signIn () {
|
||||
this.writePopShow = true
|
||||
$('.van-calendar__body').css('display', 'none')
|
||||
},
|
||||
signClose () {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 80)
|
||||
})
|
||||
this.message = ''
|
||||
this.fileList = []
|
||||
this.isOpenText = '公开'
|
||||
},
|
||||
openImage (o, index) {
|
||||
vant.ImagePreview({
|
||||
images: o.map(m => FILE_DOMAIN + m.url),
|
||||
startPosition: index,
|
||||
})
|
||||
},
|
||||
calendarSelect (date) {
|
||||
this.pageForm.day = moment(date).format("YYYY-MM-DD")
|
||||
this.getMyContent()
|
||||
},
|
||||
formatter (day) {
|
||||
const d = moment(day.date).format("YYYY-MM-DD")
|
||||
const map = this.boxData.content.map(o => moment(o.time).format("YYYY-MM-DD"))
|
||||
if(d === moment().format('YYYY-MM-DD')) {
|
||||
day.className = 'cur_day'
|
||||
}
|
||||
if (map.includes(d)) {
|
||||
day.className = 'sign_in_day'
|
||||
if (d === moment().format('YYYY-MM-DD')) {
|
||||
/*this.$nextTick(() => {
|
||||
$('.van-calendar__selected-day').removeAttr("style")
|
||||
$('.van-calendar__selected-day').css('background-color', 'revert').css('color', 'revert')
|
||||
.css('border', 'none').css('box-shadow', 'none')
|
||||
})*/
|
||||
}
|
||||
}
|
||||
return day
|
||||
},
|
||||
async getMyContent() {
|
||||
const resp = await $.post('/platform/hd/checkinManage/getContent', this.pageForm)
|
||||
if(resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
}
|
||||
},
|
||||
async getContent() {
|
||||
this.loading = true
|
||||
this.pageForm.hdid = getQueryVariable("id")
|
||||
this.pageForm.active = this.active
|
||||
const resp = await $.post('/platform/hd/checkinManage/getContent', this.pageForm)
|
||||
if(resp.code === 0) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
async zan(o) {
|
||||
o.me_zan = ! o.me_zan
|
||||
if (o.me_zan) {
|
||||
o.zan_count = o.zan_count + 1
|
||||
} else {
|
||||
if (o.zan_count > 0) {
|
||||
o.zan_count = o.zan_count - 1
|
||||
}
|
||||
}
|
||||
o.zan_id = await $.post('/platform/hd/checkinManage/clickZan', {
|
||||
id: o.zan_id,
|
||||
zan: o.me_zan,
|
||||
hdid: o.hdid,
|
||||
contentId: o.id,
|
||||
})
|
||||
},
|
||||
async findOne() {
|
||||
var self = this
|
||||
if (!this.isNull(getQueryVariable("id"))) {
|
||||
await $.get("/platform/hd/checkinManage/findOne", {hdid: getQueryVariable("id")}, function (data) {
|
||||
if (data.code === 0) {
|
||||
document.getElementsByTagName("title")[0].innerText = data.data.hdname;
|
||||
self.boxData = data.data
|
||||
self.isSignCurentDay = self.boxData.content.some(o => moment(o.time).format('YYYY-MM-DD') === (moment().format('YYYY-MM-DD')))
|
||||
self.showPage = true
|
||||
|
||||
if (!data.data.hdflag) {
|
||||
self.$toast.fail("当前活动未开启!");
|
||||
} else {
|
||||
if (!(new Date(data.data.hdkssj.replace(/-/g, '/')).getTime() < new Date().getTime() && new Date().getTime() < new Date(data.data.hdjssj.replace(/-/g, '/')).getTime())) {
|
||||
self.$toast.fail("不在活动时间范围内!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
async created () {
|
||||
var self = this
|
||||
|
||||
setTimeout(() => {
|
||||
$('.van-calendar__body').css('display', 'block')
|
||||
}, 500)
|
||||
|
||||
if (window.innerWidth > 800) {
|
||||
self.$notify({type: 'warning', message: '当前窗口宽度过大!部分区域显示会出现大小偏差'});
|
||||
}
|
||||
|
||||
//await self.findOne()
|
||||
await self.getContent()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,126 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
width: 90%;
|
||||
margin: 0 auto 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.van-cell {
|
||||
border-radius: 20px;
|
||||
padding: 4px 16px !important;
|
||||
}
|
||||
.van-cell-group {
|
||||
border-radius: 20px;
|
||||
padding: 12px 4px;
|
||||
}
|
||||
.van-divider {
|
||||
width: 90%;
|
||||
margin: 4px auto 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<van-nav-bar
|
||||
title="活动列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="location.href='/mobile/index'"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearOption" @change="yearChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell title="主  题" :border="false">{{o.hdname}}</van-cell>
|
||||
<van-divider></van-divider>
|
||||
<van-cell :border="false" title="创 建 人">{{o.cjr}}</van-cell>
|
||||
<van-cell :border="false" title="创建时间">{{o.hdcjsj}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.hdkssj}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.hdjssj}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
hdtype: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
$.post('/platform/hd/checkinManage/data', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
})
|
||||
},
|
||||
openView(o) {
|
||||
const {hdid, hdjssj, hdkssj} = o
|
||||
if (moment().format("YYYY-MM-DD HH:mm:ss") < hdkssj) {
|
||||
vant.Toast('活动暂未开始!')
|
||||
return
|
||||
} else if (moment().format("YYYY-MM-DD HH:mm:ss") > hdjssj) {
|
||||
vant.Toast('活动已结束!')
|
||||
return
|
||||
}
|
||||
window.location.href = '/mobile/checkin/info?client=mobile&id=' + hdid
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,61 @@
|
||||
<div>
|
||||
<van-pull-refresh
|
||||
v-model="isLoading"
|
||||
success-text="刷新成功"
|
||||
@refresh="onRefresh">
|
||||
|
||||
<div>
|
||||
<van-image class="back_img" width="100%" height="230" src="/assets/platform/img/checkin/bcc.jpg"></van-image>
|
||||
</div>
|
||||
<div class="zan_order" :style="isOrder === true ? 'color: #236eb4; font-size: 20px' : 'color: grey; font-size: 20px'">
|
||||
<van-icon name="filter-o"></van-icon>
|
||||
<span style="font-size: 14px" @click="zanOrder">获赞排行</span>
|
||||
</div>
|
||||
|
||||
<van-list
|
||||
v-model="loading" v-if="tableData.length > 0"
|
||||
:finished="finished" :immediate-check="false" @load="getContent"
|
||||
:finished-text="tableData.length>0?'没有更多了':''">
|
||||
|
||||
<!--<lazy-component>-->
|
||||
<div class="info" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<div>
|
||||
<van-image v-if="item.sex === '男'" width="40" round height="40" src="/assets/platform/img/checkin/man.png"></van-image>
|
||||
<van-image v-if="item.sex === '女'" width="40" round height="40" src="/assets/platform/img/checkin/woman.png"></van-image>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<div style="color: #236eb4; font-weight: bold">{{item.username}}</div>
|
||||
<div style="font-size: 12px; color: grey">{{item.unitname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 8px">
|
||||
<div>{{item.content}}</div>
|
||||
<van-row style="margin-top: 4px">
|
||||
<van-col span="8" v-for="(file, index) in item.files" style="height: 104px">
|
||||
<van-image style="padding-right: 4px; width: 96%; height: 100px" @click="openImage(item.files, index)"
|
||||
:src="FILE_DOMAIN + file.url"></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 6px; align-items: center;">
|
||||
<div style="color: grey">{{moment(item.time).format('HH:mm')}}</div>
|
||||
<div :style="item.me_zan === false ? 'font-size: 20px' : 'font-size: 20px; color: red'">
|
||||
<div @click="zan(item)" style="display: flex; align-items: center">
|
||||
<van-icon name="good-job-o" style="font-size: 20px" :badge="item.zan_count"></van-icon>
|
||||
<span style="margin-left: 8px; font-size: 14px">赞</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</lazy-component>-->
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
@@ -0,0 +1,256 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- 在 head 标签中添加 meta 标签,并设置 viewport-fit=cover 值 -->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
|
||||
<title>Title</title>
|
||||
<!-- 引入样式文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.5/lib/index.css">
|
||||
<link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.2.0/weui.min.css">
|
||||
|
||||
<!-- 引入 Vue 和 Vant 的 JS 文件 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vant@2.5/lib/vant.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
||||
<script src="/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
max-width: 600px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar {
|
||||
display: none
|
||||
}
|
||||
|
||||
[v-clock] {
|
||||
display: none
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-family: PingFang SC, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.page-v {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.detail-v {
|
||||
margin-top: 15px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.p15 {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.njuColor {
|
||||
color: rgb(106, 0, 95);
|
||||
}
|
||||
|
||||
.title-v {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.form-v {
|
||||
/*margin-top: 20px;*/
|
||||
}
|
||||
|
||||
.van-doc-demo-block__title {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
color: rgba(69, 90, 100, 0.6);
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.goods-card {
|
||||
margin: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.van-swipe-cell__wrapper {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div v-clock id="app">
|
||||
<div>
|
||||
<van-swipe v-if="boxData.fileList.length>0" class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item v-for="url in boxData.fileList">
|
||||
<van-image
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
:src="url"
|
||||
></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
<van-image
|
||||
v-else
|
||||
width="100%"
|
||||
height="200px"
|
||||
fit="cover"
|
||||
src="***"
|
||||
>
|
||||
<template v-slot:error>封面图片</template>
|
||||
</van-image>
|
||||
</div>
|
||||
<div v-if="active==0" class="page-v">
|
||||
<div class="detail-v">
|
||||
<div class="title-v p15">
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动介绍</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdjs"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">参加人员</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdcjry"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">奖励方式</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdjlfs"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动内容</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15">
|
||||
<div v-html="boxData.hdnr"></div>
|
||||
</div>
|
||||
<div class="title-v p15">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">活动联系人</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15" style="line-height:24pt;">
|
||||
<div v-html="boxData.hdlxr"></div>
|
||||
</div>
|
||||
<div class="title-v p15" v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<br/>
|
||||
<h3 :style="'color: '+boxData.hdcolor">其他</h3>
|
||||
<div class="van-hairline--top"></div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="p15" style="line-height:24pt;" v-if="!isNull(boxData.hdother.replace(/<.*?>/g,''))">
|
||||
<div v-html="boxData.hdother"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabbar
|
||||
style="max-width: 600px;position: fixed;left: 0;bottom: 0;right: 0;margin: auto"
|
||||
v-model="active"
|
||||
:active-color="boxData.hdcolor"
|
||||
inactive-color="#000"
|
||||
>
|
||||
<van-tabbar-item icon="label-o">介绍</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var xhrOnProgress = function (fun) {
|
||||
xhrOnProgress.onprogress = fun; //绑定监听
|
||||
//使用闭包实现监听绑
|
||||
return function () {
|
||||
//通过$.ajaxSettings.xhr();获得XMLHttpRequest对象
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
//判断监听函数是否为函数
|
||||
if (typeof xhrOnProgress.onprogress !== 'function')
|
||||
return xhr;
|
||||
//如果有监听函数并且xhr对象支持绑定时就把监听函数绑定上去
|
||||
if (xhrOnProgress.onprogress && xhr.upload) {
|
||||
xhr.upload.onprogress = xhrOnProgress.onprogress;
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}
|
||||
|
||||
function getSuffix(filename) {
|
||||
return /\.[^\.]+$/.exec(filename)
|
||||
}
|
||||
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
fd: [],
|
||||
boxData: {},
|
||||
active: 0,
|
||||
isNull: function (val) {
|
||||
if (val == null || val == undefined || val == '') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
|
||||
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
|
||||
doctype: ['doc', 'docx', 'txt'],
|
||||
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created: function () {
|
||||
var self = this
|
||||
if (window.innerWidth > 800) {
|
||||
self.$notify({type: 'warning', message: '当前窗口宽度过大!部分区域显示会出现大小偏差'});
|
||||
}
|
||||
var wmhd_boxdata = localStorage.getItem("wmhd_boxdata")
|
||||
if (wmhd_boxdata != undefined && wmhd_boxdata != null) {
|
||||
this.boxData = JSON.parse(wmhd_boxdata)
|
||||
localStorage.removeItem("wmhd_boxdata")
|
||||
} else {
|
||||
this.boxData = {
|
||||
hdjs: '',
|
||||
hdcjry: '',
|
||||
hdjlfs: '',
|
||||
hdnr: '',
|
||||
hdlxr: '',
|
||||
hdother: '',
|
||||
hdcolor: '#6A005F',
|
||||
fileList: [],
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<div>
|
||||
<!--头部、背景图片-->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tableData.length > 0" class="info" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<div>
|
||||
<van-image v-if="item.sex === '男'" width="40" round height="40" src="/assets/platform/img/checkin/man.png"></van-image>
|
||||
<van-image v-if="item.sex === '女'" width="40" round height="40" src="/assets/platform/img/checkin/woman.png"></van-image>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<div style="color: #236eb4; font-weight: bold">{{item.username}}</div>
|
||||
<div style="font-size: 12px; color: grey">{{item.unitname}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 8px">
|
||||
<div>{{item.content}}</div>
|
||||
<van-row style="margin-top: 4px">
|
||||
<van-col span="8" v-for="(file, index) in item.files" style="height: 104px">
|
||||
<van-image style="padding-right: 4px; width: 96%; height: 100px" @click="openImage(item.files, index)"
|
||||
:src="FILE_DOMAIN + file.url"></van-image>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 6px; align-items: center;">
|
||||
<div>
|
||||
<span style="color: grey">{{moment(item.time).format('HH:mm')}}</span>
|
||||
<span @click="delContent(item)" style="font-size: 12px; margin-left: 6px; color: #236eb4">删除</span>
|
||||
</div>
|
||||
<div :style="item.me_zan === false ? 'font-size: 20px' : 'font-size: 20px; color: red'">
|
||||
<div @click="zan(item)" style="display: flex; align-items: center">
|
||||
<van-icon name="good-job-o" style="font-size: 20px" :badge="item.zan_count"></van-icon>
|
||||
<span style="margin-left: 8px; font-size: 14px">赞</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
v-if="tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--签到成功确认框-->
|
||||
<van-popup v-model="signShow" round class="sign_pop">
|
||||
<van-image width="300px" round src="/assets/platform/img/checkin/sign.png" style="position: absolute; top: -150px;z-index: 9999"></van-image>
|
||||
<div style="line-height: 25px; margin-top: 30px; letter-spacing: 1px">
|
||||
<div style="font-size: 16px">恭喜获得天数+1</div>
|
||||
<div style="color: grey">您是今日第<span style="color: chocolate; font-weight: bold">{{signCount}}</span>位签到</div>
|
||||
<div class="sign_button">
|
||||
<van-button @click="signShow = false" round type="info" size="small" color="#236eb4">我知道了</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
@@ -0,0 +1,373 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.join_content {
|
||||
padding: 10px;
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - 46px - 20px - 60px);
|
||||
}
|
||||
|
||||
.basic .van-cell {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.van-cell__label {
|
||||
color: #323233;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.empty_text {
|
||||
text-align: center;
|
||||
padding: 10px 0px;
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.van-tabs__wrap {
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab.van-tab--active {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.van-tabs__nav--card .van-tab {
|
||||
border-right: 0 !important;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.join_submit {
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.van-hairline--top-bottom::after, .van-hairline-unset--top-bottom::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="体检套餐选择" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div class="join_content">
|
||||
|
||||
<van-form @submit="joinSubmit">
|
||||
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
体检套餐
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-radio-group v-model="formData.subjectId" class="basic">
|
||||
<van-cell-group>
|
||||
<van-cell title="" :key="item.id" v-for="item in project.healthCheckupProjectSubjects">
|
||||
<template #label>
|
||||
<div style="display: flex; justify-content: space-between; margin-left: 8px">
|
||||
<div>{{ item.optionName }}</div>
|
||||
<div @click="viewDesc(item)" style="color: #0e78c5">查看说明</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-radio :name="item.id"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field @click="campusVisible = true" readonly is-link label="院区" name="campus"
|
||||
placeholder="请选择体检院区" v-model="formData.campusName"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择家属是否体检' }]" label="家属体检" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.isFamily">
|
||||
<van-radio name="是" shape="square">是</van-radio>
|
||||
<van-radio name="否" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin-bottom: 16px" v-if="formData.isFamily === '是'">
|
||||
<div></div>
|
||||
<div class="van-card-header" style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="float:left;">家属信息</span>
|
||||
<div>
|
||||
<van-tag @click="delCompanion" size="large" type="primary" color="lightgrey">删除家属</van-tag>
|
||||
<van-tag @click="addCompanion" size="large" type="primary" color="#1867b0">添加家属</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length > 0" class="van-card-body">
|
||||
<van-tabs v-model="active" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.companionList" :title="'家属' + (index + 1)">
|
||||
<van-field label="姓名" name="userName" placeholder="请填写姓名" v-model="item.userName"
|
||||
:rules="[{ required: true }]"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择性别' }]" label="性别" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.sex">
|
||||
<van-radio name="男" shape="square">男</van-radio>
|
||||
<van-radio name="女" shape="square">女</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field :rules="[{ required: true, message: '请选择婚否' }]" label="婚否" name="validator">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="item.marry">
|
||||
<van-radio name="未婚" shape="square">未婚</van-radio>
|
||||
<van-radio name="已婚" shape="square">已婚</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="年龄" name="age" placeholder="请填写年龄" type="digit"
|
||||
:rules="[{ required: true }]" v-model="item.age"></van-field>
|
||||
<van-field label="身份证号" name="idCard" placeholder="请填写身份证号" type="digit"
|
||||
:rules="[{ required: true }]" v-model="item.idCard"></van-field>
|
||||
<van-field label="手机号" name="mobile" placeholder="请填写手机号" type="digit"
|
||||
:rules="[{ required: true }]" v-model="item.mobile"></van-field>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.companionList.length == 0" class="empty_text">
|
||||
<span>
|
||||
如有家属,请添加家属
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<van-button class="join join_submit">提交选择</van-button>
|
||||
</div>
|
||||
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
|
||||
<!--体检院区弹出框-->
|
||||
<van-popup position="bottom" round v-model="campusVisible">
|
||||
<van-picker
|
||||
title="院区" show-toolbar
|
||||
:columns="campusList" value-key="campusName"
|
||||
@confirm="(value, index) => {formData.campusName = value.campusName; formData.campus = value.id; campusVisible = false}"
|
||||
@cancel="campusVisible = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--查看说明-->
|
||||
<van-popup position="bottom" round v-model="descVisible" :style="{ height: '60%' }">
|
||||
<div v-html="desc" class="pre_text"></div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
selectId: '',
|
||||
active: 0,
|
||||
project: {},
|
||||
formData: {
|
||||
companionList: [],
|
||||
isFamily: '否',
|
||||
},
|
||||
campusList: [],
|
||||
campusVisible: false,
|
||||
descVisible: false,
|
||||
desc: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
viewDesc(o) {
|
||||
if(o.description) {
|
||||
this.desc = o.description
|
||||
this.descVisible = true
|
||||
} else {
|
||||
vant.Toast('暂无详细说明')
|
||||
}
|
||||
},
|
||||
async joinSubmit() {
|
||||
if(!this.formData.subjectId) {
|
||||
vant.Toast('请选择体检套餐')
|
||||
return
|
||||
}
|
||||
const p = this.project.healthCheckupProjectSubjects.find(o => o.id === this.formData.subjectId)
|
||||
const res = await $.post('/mobile/healthCheckup/validCondition', {
|
||||
cndId: p.conditionStructureId,
|
||||
})
|
||||
if(res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: '您确定要选择' + p.optionName + '吗?',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
message: '努力提交中',
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
if(cloneData.isFmaily === '否') {
|
||||
cloneData.companionList = []
|
||||
}
|
||||
cloneData.companionList.forEach((item, index) => {
|
||||
if (item.userName === '') {
|
||||
cloneData.companionList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
cloneData.projectId = this.id
|
||||
const resp = await $.post('/mobile/healthCheckup/doSubmit', {
|
||||
userSelection: JSON.stringify(cloneData),
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (resp.code === 0) {
|
||||
toast.message = '提交成功'
|
||||
toast.type = 'success'
|
||||
} else {
|
||||
toast.message = resp.msg
|
||||
toast.type = 'fail'
|
||||
}
|
||||
setTimeout(() => {
|
||||
toast.clear()
|
||||
}, 500)
|
||||
if (resp.code === 0) {
|
||||
location.href = '/mobile/healthCheckup/mine'
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(() => {})
|
||||
},
|
||||
addCompanion() {
|
||||
this.formData.companionList.push({userName: '', sex: '', marry: '',})
|
||||
},
|
||||
delCompanion() {
|
||||
this.formData.companionList.splice(this.active, 1)
|
||||
},
|
||||
//查询有哪些体检套餐
|
||||
async findSubject() {
|
||||
const resp = await $.post('/platform/healthCheckup/project/mange/findOne', {id: this.id})
|
||||
this.project = resp.data
|
||||
//const sex = "${@shiro.getPrincipalProperty('sex')}";
|
||||
//this.project.healthCheckupProjectSubjects = this.project.healthCheckupProjectSubjects.filter(o => o.sex === sex || o.sex === '' || o.sex === null)
|
||||
},
|
||||
//获取院区
|
||||
async getCampus() {
|
||||
const resp = await $.post('/mobile/healthCheckup/getCampus')
|
||||
this.campusList = resp.data
|
||||
},
|
||||
//获取报名信息
|
||||
async getSelectInfo() {
|
||||
const resp = await $.post('/mobile/healthCheckup/getSelectInfo', {id: this.selectId})
|
||||
this.formData = resp.data
|
||||
const o = this.campusList.find(o => o.id === this.formData.campus)
|
||||
this.formData.campusName = o.campusName
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString('projectId')
|
||||
this.selectId = GetQueryString('selectId')
|
||||
await this.getCampus()
|
||||
if(GetQueryString('selectId')) {
|
||||
await this.getSelectInfo()
|
||||
}
|
||||
await this.findSubject()
|
||||
},
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,215 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.operateDiv {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.operateDiv .van-button {
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
background-color: #1867b0;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
top: 0px;
|
||||
border-radius: 6px;
|
||||
right: -3px;
|
||||
padding: 0px 6px;
|
||||
transform: rotate(16deg);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="体检套餐列表" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.tabName" @change="tabChange">
|
||||
<van-tab title="进行中" name="ing"></van-tab>
|
||||
<van-tab title="已结束" name="end"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<template v-if="vLoading && !vLoading.value">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<div @click="toCheckUp(o)" class="content">
|
||||
<van-image
|
||||
height="76"
|
||||
radius="8"
|
||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+o.cover"
|
||||
width="100">
|
||||
</van-image>
|
||||
<div class="content-right">
|
||||
<div v-if="o.selectCount <= 0" class="tag">未选择</div>
|
||||
<div v-else class="tag" style="background-color: green">已选择</div>
|
||||
<div class="cr-title">
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<div class="concat">
|
||||
<span>开始时间:</span>
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>结束时间:</span>
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/healthCheckup/list">套餐选择</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/healthCheckup/mine">我的套餐</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
tabName: 'ing',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toCheckUp(o) {
|
||||
if(o.selectCount > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此项活动您已选择',
|
||||
})
|
||||
return
|
||||
}
|
||||
//当前时间
|
||||
const nowDate = moment().unix()
|
||||
//结束时间
|
||||
const endDate = moment(o.choiceTimeEnd).unix()
|
||||
if(nowDate > endDate) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '选择时间已过',
|
||||
})
|
||||
} else {
|
||||
location.href = '/mobile/healthCheckup/checkUp?projectId=' + o.id
|
||||
}
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/healthCheckup/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
this.mLoading = false
|
||||
},
|
||||
init() {
|
||||
this.startLoading()
|
||||
this.pageForm.tabName = 'ing'
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,214 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.list-card {
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.list-card > .content {
|
||||
padding: 16px 10px;
|
||||
display: flex;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
.content-right {
|
||||
width: calc(100% - 150px);
|
||||
max-width: calc(100% - 150px);
|
||||
padding-left: 15px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.cr-title {
|
||||
/*max-height: 40px;*/
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.concat, .mobile, .union {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.operateDiv {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.operateDiv .van-button {
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.desc_info div {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我选择的体检套餐" left-arrow
|
||||
@click-left="location.href='/mobile/index'"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.tabName" @change="tabChange">
|
||||
<van-tab title="进行中" name="ing"></van-tab>
|
||||
<van-tab title="已结束" name="end"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<template v-if="vLoading && !vLoading.value">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<div class="content">
|
||||
<van-image
|
||||
height="76"
|
||||
radius="8"
|
||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+o.cover"
|
||||
width="100">
|
||||
</van-image>
|
||||
<div class="content-right">
|
||||
<div class="cr-title">
|
||||
<span>{{o.name}}</span>
|
||||
</div>
|
||||
<div class="desc_info">
|
||||
<div class="concat">
|
||||
<span>开始时间:</span>
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>结束时间:</span>
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operateDiv">
|
||||
|
||||
<van-button @click="edit(o)" v-if="moment().unix() < moment(o.choiceTimeEnd).unix()"
|
||||
type="info" size="small" color="#1867b0">
|
||||
修 改
|
||||
</van-button>
|
||||
<van-button @click="cancel(o)" v-if="moment().unix() < moment(o.choiceTimeEnd).unix()"
|
||||
type="info" size="small" color="#1867b0">
|
||||
取 消
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/healthCheckup/list">套餐选择</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/healthCheckup/mine">我的套餐</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
edit(o) {
|
||||
location.href = '/mobile/healthCheckup/checkUp?projectId=' + o.projectId +
|
||||
'&selectId=' + o.id
|
||||
},
|
||||
async cancel(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: '您确定要取消此选择吗?',
|
||||
}).then(async () => {
|
||||
const res = await $.post('/mobile/healthCheckup/cancel', {id: o.id, projectId: o.projectId})
|
||||
if(res.code === 0) {
|
||||
vant.Toast('取消成功')
|
||||
this.getData()
|
||||
}else {
|
||||
vant.Toast(res.msg)
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.loading = true
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/healthCheckup/mineData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
this.mLoading = false
|
||||
},
|
||||
init() {
|
||||
this.startLoading()
|
||||
this.pageForm.tabName = 'ing'
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,725 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.swiper img {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.module {
|
||||
margin: 10px 10px 14px 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
row-gap: 10px;
|
||||
background-color: white;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
/*padding: 6px 0px;*/
|
||||
}
|
||||
|
||||
.menu_item {
|
||||
width: calc(100% / 4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 2px 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.menu_item_img {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.menu_item_name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-family: "微软雅黑", Helvetica, STHeiTi, sans-serif;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.number_text {
|
||||
font-size: 36px;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 38px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 36px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.middle {
|
||||
background-color: white;
|
||||
margin: 6px 10px 10px 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.middle_item {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.middle_item:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.middle_item_pic {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.middle_item_img {
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
object-fit: revert;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.middle_item_img img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.middle_item_text {
|
||||
font-size: 12px;
|
||||
margin-top: 6px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.middle_item_text > div:nth-of-type(1) {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.van-badge {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.middle .van-empty {
|
||||
position: unset;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.sort_div {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
align-items: center;
|
||||
color: #1867B0;
|
||||
justify-content: flex-end;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.van-tabs .van-icon::before {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.msg_div_text {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.sign_popup {
|
||||
width: 96%;
|
||||
height: 640px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.menu_item_name {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<!--首页-->
|
||||
<div style="margin-bottom: 60px" v-if="active === 0">
|
||||
<!--轮播图-->
|
||||
<van-swipe :autoplay="3000" class="swiper">
|
||||
<van-swipe-item :key="index" v-for="(image, index) in images">
|
||||
<img :src="image" width="100%">
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--应用窗格-->
|
||||
<van-row class="first module">
|
||||
<div class="menu" style="border-radius: 10px">
|
||||
<div @click="clickIndex = 3; getMsg()" class="menu_item">
|
||||
<img alt="" class="menu_item_img" src="/assets/mobile/img/home/1.消息.png">
|
||||
<span class="menu_item_name">消息</span>
|
||||
<van-badge :content="msgCount" v-if="msgCount !== null"></van-badge>
|
||||
</div>
|
||||
<!-- <div @click="qiandao" class="menu_item">
|
||||
<img src="/assets/mobile/img/home/2.签到.png" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">签到</span>
|
||||
</div>
|
||||
<div @click="integral" class="menu_item">
|
||||
<img src="/assets/mobile/img/home/11.积分管理.png" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">积分详情</span>
|
||||
</div>-->
|
||||
<div @click="clickMenu = item; clickIndex = 2" class="menu_item"
|
||||
v-for="item in moduleMenus">
|
||||
<img :src="CREATE_PREVIEW_URL(item.icon)" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">{{item.moduleName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-row>
|
||||
|
||||
<!--下方功能区,包含活动、功能入口、消息列表-->
|
||||
<van-row>
|
||||
<div @click="clickIndex = 1" class="sort_div" v-if="clickIndex !== 1">
|
||||
<van-icon name="sort" style="transform: rotate(90deg);"></van-icon>
|
||||
<span>切换活动列表</span>
|
||||
</div>
|
||||
|
||||
<!--活动列表-->
|
||||
<template v-if="clickIndex === 1">
|
||||
<div class="middle" style="border-radius: 10px;" v-for="item in activityList"
|
||||
v-if="activityList.length > 0">
|
||||
<van-row gutter="20">
|
||||
<van-col @click="menuClick(item.h5Url)" class="middle_item" span="24">
|
||||
<div>
|
||||
<van-image :src="CREATE_PREVIEW_URL(item.cover)"
|
||||
class="middle_item_img" v-if="item.cover">
|
||||
<template slot="loading">
|
||||
<van-loading size="13" type="spinner"/>
|
||||
</template>
|
||||
</van-image>
|
||||
<van-image height="84" src="xxxxxx" v-else width="120">
|
||||
<template slot="error">图片查询失败</template>
|
||||
</van-image>
|
||||
</div>
|
||||
|
||||
<div class="middle_item_text">
|
||||
<van-icon color="red" name="fire" size="12" style="top: 1px">
|
||||
|
||||
</van-icon>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
<div style="margin-top: 6px; color: grey; font-size: 11px">
|
||||
<div>开始时间:{{ moment(item.startDate).format('MM/DD HH:mm') }}
|
||||
</div>
|
||||
<div>结束时间:{{ moment(item.endDate).format('MM/DD HH:mm') }}
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div v-else>
|
||||
<van-empty description="近期暂无活动"></van-empty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--功能入口-->
|
||||
<template v-else-if="clickIndex === 2">
|
||||
<div class="middle" style="border-radius: 10px;">
|
||||
<div class="van-sidebar-item van-sidebar-item--select"
|
||||
style="padding: 0 12px 0 12px !important;">
|
||||
{{clickMenu.moduleName}}
|
||||
</div>
|
||||
<div class="menu" style="margin-top: 10px">
|
||||
<div :key="m.menuId" @click="menuClick(m.url)" class="menu_item"
|
||||
v-for="m in clickMenu.menuList"
|
||||
v-if="(m.url == '/mobile/member/apply' && ${@shiro.lacksRole('H01')}) || m.url != '/mobile/member/apply'">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt=""
|
||||
class="menu_item_img"/>
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!--消息列表-->
|
||||
<template v-else-if="clickIndex === 3">
|
||||
<div class="middle" style="border-radius: 10px; margin-bottom: 30px">
|
||||
<van-tabs @click="msgList = null; getMsg()" color="#1867B0" type="card"
|
||||
v-model="msgActive">
|
||||
<van-tab name="unread">
|
||||
<template #title>
|
||||
<van-icon name="chat-o"></van-icon>
|
||||
未读
|
||||
</template>
|
||||
</van-tab>
|
||||
<van-tab name="read">
|
||||
<template #title>
|
||||
<van-icon name="browsing-history-o"></van-icon>
|
||||
已读
|
||||
</template>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<div class="msg_div" style="max-height: 280px; overflow-y: auto">
|
||||
<template v-if="msgList !== null && msgList.length > 0">
|
||||
<div @click="msgToUrl(item)" style="display: flex; margin-top: 10px"
|
||||
v-for="item in msgList">
|
||||
<div>
|
||||
<van-icon color="red" name="new" size="43px"
|
||||
style="position: relative; top: 6px"
|
||||
v-if="msgActive === 'unread'"></van-icon>
|
||||
|
||||
<van-icon color="lightgrey" name="new" name="checked"
|
||||
size="38px"
|
||||
style="position: relative; top: 3px"
|
||||
v-else></van-icon>
|
||||
</div>
|
||||
<div class="msg_div_text">
|
||||
<div>
|
||||
<div style="font-size: 14px">{{ item.title }}</div>
|
||||
<div style="font-size: 12px; margin-top: 6px"
|
||||
v-html="item.note"></div>
|
||||
</div>
|
||||
<div>
|
||||
<van-icon name="arrow"></van-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div v-else-if="msgList === null"></div>
|
||||
<div v-else>
|
||||
<van-empty description="暂无数据"></van-empty>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<!--我的办理-->
|
||||
<div style="background-color: #f6f7f9; min-height: 100vh" v-if="active === 1">
|
||||
<van-notice-bar
|
||||
background="#ecf9ff" color="#1989fa" left-icon="volume-o"
|
||||
text="温馨提示:只显示当前年份的待办和已办事项"
|
||||
></van-notice-bar>
|
||||
|
||||
<van-tabs @click="initData" v-model="activeName">
|
||||
<van-tab name="0" title="待办">
|
||||
<div style="min-height: 80vh">
|
||||
<div v-for="o in needItems">
|
||||
<div @click="toUrl(o)" class="van-doc-card" v-if="o.count > 0">
|
||||
<div class="title">{{ o.title }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.name }}</div>
|
||||
</div>
|
||||
<div class="number_text">
|
||||
<span>{{ o.count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无待办"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
style="margin-top: 44px"
|
||||
v-if="needItems.length === 0"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
|
||||
<van-tab name="1" title="已办">
|
||||
<div style="min-height: 80vh">
|
||||
<div @click="toHref(o)" class="van-doc-card" v-for="o in completedItems">
|
||||
<div class="title">{{ o.moduleName }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<span>{{ o.auditState }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.auditTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无已办"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
style="margin-top: 44px"
|
||||
v-if="completedItems.length === 0"
|
||||
></van-empty>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</div>
|
||||
|
||||
<!--工作台-->
|
||||
<div style="margin-bottom: 60px" v-if="active === 2">
|
||||
<van-row class="module" v-for="m in moduleMenus">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
{{m.moduleName}}
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
<div :key="m.menuId" @click="menuClick(m.url)" class="menu_item"
|
||||
v-for="m in m.menuList">
|
||||
<img :src="CREATE_PREVIEW_URL(m.menuIcon)" alt="" class="menu_item_img">
|
||||
<span class="menu_item_name">{{m.menuName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-tabbar @change="tabbrChange" v-model="active">
|
||||
<van-tabbar-item icon="home-o">首页</van-tabbar-item>
|
||||
<van-tabbar-item :dot="needCount" icon="envelop-o">我的办理</van-tabbar-item>
|
||||
<van-tabbar-item icon="apps-o">工作台</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
<van-popup :style="{ height: '100%',width: '100%'}" position="right" safe-area-inset-bottom
|
||||
v-model="integralShow">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="integralShow=false" left-arrow
|
||||
title="积分详情"></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearList" @change="integralData"
|
||||
v-model="integralForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="monthList" @change="integralData"
|
||||
v-model="integralForm.month"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 60px;font-family: 微软雅黑">
|
||||
<div style="text-align: right;margin-right: 20px;font-size: 20px;color: #1867b0">
|
||||
<span>总积分:{{totalIntegral}}</span>
|
||||
</div>
|
||||
<van-list style="margin-top: 10px">
|
||||
<div :key="item.id" v-for="item in integralViewData">
|
||||
<van-cell-group inset>
|
||||
<van-cell>
|
||||
<div>
|
||||
<span style="font-size: 16px;font-weight: bold">{{item.integralNotes}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 12px;color: gray;">{{item.integralTime}}</span>
|
||||
</div>
|
||||
<div style="text-align: right;margin-top: -30px;font-size: 16px;">
|
||||
<span>{{item.integral}}积分</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
</van-sticky>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-action-sheet :close-on-click-overlay="false" :closeable="false"
|
||||
title="完善信息" v-model="perfectPersonInfo.isShow">
|
||||
<van-form @submit="doImprovePersonalInfo">
|
||||
<van-field
|
||||
label="工号"
|
||||
name="loginname"
|
||||
placeholder="工号"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="姓名"
|
||||
name="loginname"
|
||||
placeholder="姓名"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<template v-for="column in perfectPersonInfo.columns">
|
||||
<van-field
|
||||
:label="column.label"
|
||||
:name="column.prop"
|
||||
:placeholder="column.label"
|
||||
:rules="
|
||||
[{required: true, message: '必填', trigger: ['blur', 'change']},
|
||||
{pattern:column.prop==='mobile' ? /^1[3-9]\d{9}$/ : /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
||||
message: '请输入正确的'+column.label}]"
|
||||
v-model="ImprovePersonalInfoData[column.prop]"
|
||||
></van-field>
|
||||
</template>
|
||||
|
||||
<div style="padding: 10px 16px;font-size: 14px;color: grey">
|
||||
{{perfectPersonInfo.tip}}
|
||||
</div>
|
||||
|
||||
<div style="margin: 16px;">
|
||||
<van-button block native-type="doImprovePersonalInfo" round type="info">提交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
dicts: ['memberApplyPersonType'],
|
||||
data() {
|
||||
return {
|
||||
swipeShow: false,
|
||||
images: [
|
||||
"${AppDomain!}" + '/home1.png',
|
||||
"${AppDomain!}" + '/home2.png',
|
||||
"${AppDomain!}" + '/home3.png',
|
||||
],
|
||||
qianShow: false,
|
||||
msgActive: 'unread',
|
||||
moduleMenus: [],
|
||||
roles: [],
|
||||
active: 0,
|
||||
needCount: 0,
|
||||
needItems: [],
|
||||
activeName: '0',
|
||||
completedItems: [],
|
||||
bigPictureList: [],
|
||||
activityList: [],
|
||||
clickMenu: {},
|
||||
clickIndex: 1,
|
||||
msgPageForm: {},
|
||||
msgList: [],
|
||||
msgCount: null,
|
||||
|
||||
integralShow: false,
|
||||
integralForm: {},
|
||||
integralViewData: [],
|
||||
totalIntegral: null,
|
||||
yearList: [],
|
||||
monthList: [],
|
||||
perfectPersonInfo: {
|
||||
isShow: false,
|
||||
tip: null,
|
||||
columns: []
|
||||
},
|
||||
ImprovePersonalInfoData: {}
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
async getMenus() {
|
||||
const {data} = await $.post('/platform/sys/appMenu/appMenus')
|
||||
this.moduleMenus = data
|
||||
},
|
||||
menuClick(menu) {
|
||||
/* if (menu.url === '/mobile/member/apply') {
|
||||
const values = this.dict.type.memberApplyPersonType.map(v => v.value)
|
||||
const personType = "${@shiro.getPrincipalProperty('personType')}"
|
||||
const msg = '您当前的人员类型是<span style="color: red">' + (personType || '空') + '</span>,目前只允许<strong>' + values.join('、') + '</strong>加入会员,如有疑问,请联系校工会进行更改。'
|
||||
if (!values.includes(personType)) {
|
||||
this.$modal.alert(msg)
|
||||
return
|
||||
}
|
||||
}*/
|
||||
pjaxReplace(menu)
|
||||
},
|
||||
tabbrChange(o) {
|
||||
console.log(o)
|
||||
sessionStorage.setItem("zhgh-mobile-home-active",o)
|
||||
this.needItems = []
|
||||
this.initData()
|
||||
},
|
||||
toUrl(o) {
|
||||
pjaxReplace(o.mobileHref)
|
||||
},
|
||||
toHref(o) {
|
||||
pjaxReplace(o.mobileUrl + '?audit=1');
|
||||
},
|
||||
async getNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
this.needItems = obj
|
||||
}
|
||||
},
|
||||
async getCompletes() {
|
||||
const {data, code} = await $.get('/platform/sys/completed/getCompletes')
|
||||
if (code === 0) {
|
||||
this.completedItems = data;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 会员个人核对待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getMemberCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/memberSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 福利个人核对待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getWelfareCheckSelfAgenda() {
|
||||
const {data, code} = await $.get("/platform/welfareSelf/agenda/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.count > 0))
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getNeedItems();
|
||||
await this.getMemberCheckSelfAgenda()
|
||||
await this.getWelfareCheckSelfAgenda()
|
||||
await this.getCompletes();
|
||||
await this.getMsg()
|
||||
this.listActivity();
|
||||
this.needCount = this.needItems.length
|
||||
},
|
||||
async setNeedItems() {
|
||||
const {data, code} = await $.get('/platform/needItems/getNeedItems')
|
||||
if (code === 0) {
|
||||
const obj = data.filter(v => {
|
||||
return v.mobileHref != null && v.count > 0
|
||||
})
|
||||
window.localStorage.setItem('needItems', escape(JSON.stringify(obj)))
|
||||
}
|
||||
},
|
||||
//获取站内消息
|
||||
async getMsg() {
|
||||
const resp = await $.post("/platform/sys/msg/user/data/" + this.msgActive, this.msgPageForm)
|
||||
this.msgList = resp.data.list
|
||||
this.msgList.forEach(item => {
|
||||
const index = item.note.indexOf("<a")
|
||||
if (index !== -1) {
|
||||
item.note = item.note.substring(0, index)
|
||||
}
|
||||
})
|
||||
if (this.msgActive === 'unread') {
|
||||
this.msgCount = this.msgList.length
|
||||
}
|
||||
},
|
||||
async msgToUrl(o) {
|
||||
const resp = await $.get("/platform/sys/msg/user/status/read", {ids: JSON.stringify([o.id])})
|
||||
location.href = o.mobileurl
|
||||
},
|
||||
qiandao() {
|
||||
this.qianShow = true
|
||||
},
|
||||
integral() {
|
||||
this.integralShow = true
|
||||
},
|
||||
getAllMonth() {
|
||||
for (let i = 12; i >= 1; i--) {
|
||||
this.monthList.unshift({value: i, text: i + '月'})
|
||||
}
|
||||
this.$set(this.integralForm, "month", new Date().getMonth() + 1)
|
||||
},
|
||||
createYearList() {
|
||||
for (let i = new Date().getFullYear() - 50; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.integralForm, "year", this.yearList[0].value)
|
||||
},
|
||||
async integralData() {
|
||||
const date = new Date(this.integralForm.year, this.integralForm.month - 1);
|
||||
const resp = await $.post('/platform/integral/manage/getDetailByUserId', {
|
||||
month: moment(date).format('YYYY-MM'),
|
||||
userId: "${@shiro.getPrincipalProperty('id')}"
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.integralViewData = resp.data
|
||||
let sum = a => a.reduce((x, y) => x + y);
|
||||
this.totalIntegral = 0;
|
||||
this.totalIntegral = sum(this.integralViewData.map(x => Number(x.integral)));
|
||||
}
|
||||
},
|
||||
//完善个人信息
|
||||
async doImprovePersonalInfo(values) {
|
||||
const userFormKeys = Object.keys(this.ImprovePersonalInfoData)
|
||||
const formData = userFormKeys.map(k => {
|
||||
return {
|
||||
column: k,
|
||||
value: this.ImprovePersonalInfoData[k]
|
||||
}
|
||||
})
|
||||
const resp = await $.post('/platform/sys/user/doImprovePersonalInfo', {
|
||||
formData: JSON.stringify(formData)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.perfectPersonInfo.isShow = false
|
||||
this.$modal.msgSuccess(resp.msg)
|
||||
} else {
|
||||
this.$modal.msgError(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
//查询个人是否完善信息
|
||||
async isImprovePersonalInfo() {
|
||||
const resp = await $.get('/platform/sys/user/isImprovePersonalInfo')
|
||||
if (resp.code === 0) {
|
||||
this.perfectPersonInfo = resp.data
|
||||
}
|
||||
},
|
||||
listActivity() {
|
||||
$.get("/platform/home/listHomeActivity").then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.activityList = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
beforeMount() {
|
||||
this.setNeedItems();
|
||||
},
|
||||
async created() {
|
||||
await this.getMenus();
|
||||
this.getAllMonth();
|
||||
this.createYearList();
|
||||
this.initData();
|
||||
const active = sessionStorage.getItem("zhgh-mobile-home-active")
|
||||
this.active = active ? parseInt(active) : 0
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.getMenus()
|
||||
vue.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,298 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px auto 0;
|
||||
width: 96%;
|
||||
border-radius: 10px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
flex: 0.6;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 5px 0px;
|
||||
border-color: #1867b0;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
height: 26px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.card_title {
|
||||
margin: 5px 0 5px 16px;
|
||||
}
|
||||
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
font-size: 16px !important;
|
||||
text-indent: 4px !important;
|
||||
}
|
||||
|
||||
.van-sidebar-item--select::before {
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
.van-cell-group--inset {
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.pre_text {
|
||||
white-space: break-spaces;
|
||||
padding-left: 7px;
|
||||
/*margin-top: 30px;*/
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="保险列表" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.activityStatus" @change="tabChange">
|
||||
<van-tab title="全部" :name="0"></van-tab>
|
||||
<van-tab title="进行中" :name="1"></van-tab>
|
||||
<van-tab title="已结束" :name="2"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div>
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title"><span
|
||||
style="color: grey">年  度:</span>{{moment(o.startTime).format('YYYY')}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">登记范围:</span>{{o.activityGroupName}}
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">登记时间:</span>
|
||||
{{moment(o.stratTime).format('YYYY-MM-DD HH:mm') + ' ~ ' +
|
||||
moment(o.endTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="openView(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">详细信息
|
||||
</van-button>
|
||||
<van-button v-if="o.count === 0" @click.stop="needChoose(o)"
|
||||
class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">我要选择
|
||||
</van-button>
|
||||
<van-button v-if="o.count > 0" @click.stop="cancelChoose(o)"
|
||||
class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">取消选择
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right"
|
||||
:style="{ height: '100%', width: '100%', 'background-color': '#f6f7f9' }">
|
||||
<van-nav-bar
|
||||
title="详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false">
|
||||
</van-nav-bar>
|
||||
<van-tabs v-model="active">
|
||||
<van-tab v-if="viewData.moreInfo" title="通知内容">
|
||||
<div class="pre_text" v-html="viewData.moreInfo"></div>
|
||||
</van-tab>
|
||||
<van-tab title="基础信息">
|
||||
<van-cell-group inset style="margin-top: 10px">
|
||||
<van-cell title="保险名称" :value="viewData.name"></van-cell>
|
||||
<van-cell title="登记开始时间" :value="viewData.startTime"></van-cell>
|
||||
<van-cell title="登记结束时间" :value="viewData.endTime"></van-cell>
|
||||
<van-cell title="登记范围" :value="viewData.activityGroupName"></van-cell>
|
||||
<van-cell title="创建人" :value="viewData.username"></van-cell>
|
||||
<van-cell title="创建时间" :value="viewData.createTime"></van-cell>
|
||||
<van-cell title="介绍链接">
|
||||
<template #right-icon>
|
||||
<span style="cursor: pointer; color: #236eb4"
|
||||
@click="window.open(viewData.href.indexOf('http') !== -1 ? viewData.href : 'https://' + viewData.href)">{{viewData.href}}</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="支付二维码" is-link value="点击查看"
|
||||
@click="showPic"></van-cell>
|
||||
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
pageForm: {
|
||||
activityStatus: 1
|
||||
},
|
||||
infoShow: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPic() {
|
||||
if (this.viewData.payCode && this.viewData.payCode.length > 0) {
|
||||
const url = FILE_DOMAIN + '/fileStreamPreview?id=' + this.viewData.payCode[0].id
|
||||
vant.ImagePreview([url])
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
this.viewData = clone(row)
|
||||
if (this.viewData.payCode) {
|
||||
this.viewData.payCode = JSON.parse(this.viewData.payCode)
|
||||
}
|
||||
this.active = this.viewData.moreInfo ? 1 : 2
|
||||
this.infoShow = true
|
||||
},
|
||||
cancelChoose(row) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要取消【' + row.name + '】吗?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/insurance/manage/cancelChoose', {
|
||||
id: row.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
async needChoose(row) {
|
||||
if (row.groupId != null) {
|
||||
const isExist = await getScopeUser(row.groupId)
|
||||
if (!isExist) {
|
||||
vant.Dialog.alert({
|
||||
title: '参加人员范围',
|
||||
message: row.activityGroupName,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要选择【' + row.name + '】吗?',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/mobile/insurance/manage/needChoose', {
|
||||
id: row.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
tabChange() {
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/insurance/manage/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
window.onload = () => {
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,421 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 34%;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
font-size: 18px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.van-tab__pane, .van-tab__pane-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 24px;
|
||||
white-space: break-spaces;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.van-tabs__content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.time_info .van-button {
|
||||
height: 32px;
|
||||
border-radius: 6px;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.time_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.time_info:nth-of-type(1) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="法律咨询预约"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<div class="info">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="80"
|
||||
:src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+doctorData.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
{{doctorData.username}}
|
||||
</div>
|
||||
<div>
|
||||
{{doctorData.jobTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="active" :style="'height: ' + (window.screen.height - 46 - 40 - 84 - 24 - 44) + 'px'">
|
||||
<van-tab title="预约时段">
|
||||
<van-list
|
||||
v-model="mLoading"
|
||||
:finished="finished"
|
||||
:finished-text="timeData.length > 0 ? '没有更多了' : ''"
|
||||
@load="getDataByDoctorId">
|
||||
<div v-if="timeData.length > 0" class="time_info" v-for="item in timeData">
|
||||
<div style="color: #1867b0">{{getFormatTime(item)}}</div>
|
||||
<div>
|
||||
<van-button @click="apply(item)" :color="item.className">{{item.title}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading === false && timeData.length === 0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="抱歉,此咨询师暂时没有进行排班哦">
|
||||
</van-empty>
|
||||
</van-tab>
|
||||
<van-tab title="咨询师简介">
|
||||
<div class="label">咨询师擅长</div>
|
||||
<pre class="label_text">{{doctorData.specialty ? doctorData.specialty : '暂无数据,该资料待补充'}}</pre>
|
||||
<div class="label" style="margin-top: 20px">咨询师简介</div>
|
||||
<pre class="label_text">{{doctorData.introduce ? doctorData.introduce : '暂无数据,该资料待补充'}}</pre>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="show = false">
|
||||
</van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
:value="chooseData.startTime"
|
||||
label="开始时间"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.endTime"
|
||||
label="结束时间"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
|
||||
<van-field readonly
|
||||
:value="chooseData.username"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.mobile"
|
||||
label="咨询师电话"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
label="预约人姓名"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
label="预约人工号"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
label="预约人单位"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请填写手机号' }]"
|
||||
required placeholder="请填写手机号"
|
||||
type="tel"
|
||||
v-model=chooseData.userMobile
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
|
||||
<div v-if="chooseData.askType">
|
||||
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true"
|
||||
required :rules="[{ required: true, message: '请选择咨询方式' }]"
|
||||
placeholder="请选择咨询方式"></van-field>
|
||||
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm"
|
||||
@cancel="appointmentAskTypeShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<van-field
|
||||
v-model="appointmentUserNote"
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<div class="footer">
|
||||
<van-button @click="doSubmit()" color="#1867b0">提交预约</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
appointmentAskTypeShow: false,
|
||||
askTypeList: [],
|
||||
askTypeArray: [],
|
||||
show: false,
|
||||
doctorId: '',
|
||||
doctorData: {},
|
||||
active: 0,
|
||||
timeData: [],
|
||||
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
||||
chooseData: {
|
||||
userMobile: null
|
||||
},
|
||||
appointmentUserNote: '',
|
||||
appointmentAskTypeText: '',
|
||||
appointmentAskTypeValue: '',
|
||||
typeId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
askTypeConfirm(val) {
|
||||
this.$set(this, "appointmentAskTypeText", val.text)
|
||||
this.$set(this, "appointmentAskTypeValue", val.value)
|
||||
this.appointmentAskTypeShow = false
|
||||
},
|
||||
async doSubmit() {
|
||||
if (!this.chooseData.userMobile.trim()) {
|
||||
this.$toast.fail("请填写手机号");
|
||||
return
|
||||
}
|
||||
if (!this.appointmentAskTypeValue) {
|
||||
this.$toast.fail("请选择咨询方式");
|
||||
return
|
||||
}
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
appointmentAskTypeValue: this.appointmentAskTypeValue,
|
||||
userMobile: this.chooseData.userMobile,
|
||||
id: this.chooseData.id,
|
||||
isAdd: true,
|
||||
}
|
||||
const resp = await $.post('/mobile/legalAidPro/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您已预约成功!',
|
||||
confirmButtonColor: '#1867b0'
|
||||
}).then(() => {
|
||||
location.replace('/mobile/legalAidPro/myApplyList')
|
||||
});
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast.error(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
apply(o) {
|
||||
if (o.title !== '可预约') {
|
||||
return
|
||||
}
|
||||
this.askTypeArray = []
|
||||
if (o.askType) {
|
||||
const array = JSON.parse(o.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
this.askTypeArray.push({text: o.name, value: o.code})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.askTypeArray && this.askTypeArray.length === 1) {
|
||||
this.appointmentAskTypeText = this.askTypeArray[0].text
|
||||
this.appointmentAskTypeValue = this.askTypeArray[0].value
|
||||
}
|
||||
this.chooseData = o
|
||||
this.$set(this.chooseData, "userMobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.show = true
|
||||
},
|
||||
getFormatTime(o) {
|
||||
const simpleStartDate = moment(o.startTime).format('YYYY-MM-DD')
|
||||
const simpleStartHour = moment(o.startTime).format('HH:mm')
|
||||
const simpleEndHour = moment(o.endTime).format('HH:mm')
|
||||
const dayNameOfWeek = this.dayNames[new Date(simpleStartDate).getDay()]
|
||||
return simpleStartDate + ' ' + dayNameOfWeek + ' ' + simpleStartHour + '至' + simpleEndHour
|
||||
},
|
||||
async pageData() {
|
||||
this.pageForm.doctorId = this.doctorId
|
||||
const resp = await $.post('/mobile/legalAidPro/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (this.doctorId !== '') {
|
||||
this.doctorData = resp.data[0]
|
||||
} else {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async getDataByDoctorId() {
|
||||
this.mLoading = true
|
||||
this.pageForm.id = this.doctorId
|
||||
this.pageForm.typeId = this.typeId
|
||||
const resp = await $.post('/mobile/legalAidPro/getDataByDoctorId', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const record = resp.data.list.find(v => v.appointmentUser === userId)
|
||||
if (record) {
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
resp.data.list.forEach(v => {
|
||||
if (new Date().getTime() > v.startTimeTs) {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
} else {
|
||||
if (!v.appointmentUser) {
|
||||
v.className = '#1867b0'
|
||||
v.title = '可预约'
|
||||
} else if (v.appointmentUser === userId) {
|
||||
v.className = 'gray'
|
||||
v.title = '我已预约'
|
||||
} else {
|
||||
v.className = 'gray'
|
||||
v.title = '不可预约'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.timeData = this.timeData.concat(resp.data.list)
|
||||
if (this.timeData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.mLoading = false
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.doctorId = getQueryVariable('doctorId')
|
||||
this.typeId = getQueryVariable('typeId')
|
||||
this.askTypeList = await getDictOptions("psychology_asktype")
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,106 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.note-field textarea {
|
||||
text-align: right;
|
||||
color: #969799;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="预约详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="goBack()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
预约时间段
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
预约人信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.appointmentMobile }}</van-cell>
|
||||
<van-field
|
||||
class="note-field"
|
||||
v-model="viewData.appointmentUserNote"
|
||||
readonly
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
<!-- <van-cell title="备注">{{ viewData.appointmentUserNote }}</van-cell>-->
|
||||
</van-cell-group>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
咨询师信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.doctorUnitName || '暂无'}}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.doctorJobTitle || '暂无'}}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell>
|
||||
<van-cell title="个人简介">{{ viewData.doctorIntroduce || '暂无'}}</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
window.history.back()
|
||||
const id = this.GetQueryString("id")
|
||||
window.localStorage.removeItem("psychology-info-" + id)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.GetQueryString("id")
|
||||
const data = window.localStorage.getItem("psychology-info-" + id)
|
||||
this.viewData = JSON.parse(data)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,132 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.info {
|
||||
position: relative;
|
||||
width: 88%;
|
||||
margin: 20px auto;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 28%;
|
||||
}
|
||||
|
||||
.other_info {
|
||||
width: 72%;
|
||||
line-height: 22px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.desc {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
title="法律咨询师列表"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()">
|
||||
</van-nav-bar>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.typeId" :options="typeList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<!--咨询师列表-->
|
||||
<div class="info" @click="toApply(item)" v-for="item in tableData">
|
||||
<div style="display: flex;">
|
||||
<!--头像-->
|
||||
<div class="avatar">
|
||||
<van-image width="80" :src="APP_DOMAIN+FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.avatar"></van-image>
|
||||
</div>
|
||||
<!--其他信息-->
|
||||
<div class="other_info">
|
||||
<div>
|
||||
<span style="font-size: 20px">{{item.username}} </span>
|
||||
<span style="color: grey">{{item.sex}} </span> 
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">职称:</span>{{item.jobTitle}}
|
||||
</div>
|
||||
<div>
|
||||
<span style="color: grey">单位:</span>{{item.unitName}}
|
||||
</div>
|
||||
<div class="desc">
|
||||
<span style="color: grey">特长:</span>{{item.specialty}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
typeList: [
|
||||
{text: '时间不限', value: 'no'},
|
||||
{text: '本周', value: 'thisWeek'},
|
||||
{text: '下周', value: 'nextWeek'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post('/mobile/legalAidPro/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
toApply(o) {
|
||||
location.href = '/mobile/legalAidPro/apply?doctorId=' + o.userid + '&typeId=' + this.pageForm.typeId
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,471 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.list-card {
|
||||
background: #FFFFFF;
|
||||
width: 92%;
|
||||
margin: 0px auto 20px;
|
||||
box-shadow: 0 2px 10px rgb(125 126 128 / 16%);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__bar {
|
||||
display: -webkit-box;
|
||||
}
|
||||
|
||||
.card-head {
|
||||
line-height: 30px;
|
||||
padding: 8px 16px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.cancel-button {
|
||||
text-align: right;
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.cancel-button .van-button {
|
||||
height: 24px !important;
|
||||
padding: 0 12px !important;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-card-header {
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
color: #0e78c5;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.van-card-body {
|
||||
padding: 0px 10px 0px 10px
|
||||
}
|
||||
|
||||
.van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.label {
|
||||
border-left: 5px #1867b0 solid;
|
||||
border-radius: 4px;
|
||||
padding-left: 6px;
|
||||
margin: 10px 0px;
|
||||
}
|
||||
|
||||
.label_text {
|
||||
color: grey;
|
||||
line-height: 24px;
|
||||
white-space: break-spaces;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.apply_pop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="我的预约记录"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="window.history.back()"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.stateId" :options="stateList"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="viewInfo(o)">
|
||||
<div class="card-head">
|
||||
法律咨询预约
|
||||
<span class="state-text">
|
||||
<van-tag size="medium" v-if="o.stateId===2300" type="success">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2200" type="error">{{o.stateName}}</van-tag>
|
||||
<van-tag size="medium" v-if="o.stateId===2100" type="warning">{{o.stateName}}</van-tag>
|
||||
</span>
|
||||
</div>
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="预约人">{{o.appointmentUserName}}</van-cell>
|
||||
<van-cell :border="false" title="开始时间">{{o.startTime}}</van-cell>
|
||||
<van-cell :border="false" title="结束时间">{{o.endTime}}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="cancel-button">
|
||||
<van-button v-if="moment().unix() < moment(o.startTime).unix()" style="margin-right: 4px"
|
||||
@click.stop="update(o)" round size="small" color="#1867b0">修改
|
||||
</van-button>
|
||||
<van-button v-if="moment().unix() < moment(o.startTime).unix()"
|
||||
@click.stop="doCancel(o.id)" round size="small" color="#1867b0">取消
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-popup v-model="show" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="show = false"
|
||||
safe-area-inset-top></van-nav-bar>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约时间段
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
预约人信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.appointmentMobile }}</van-cell>
|
||||
<van-cell title="预约咨询方式">{{ getAskTypeName() }}</van-cell>
|
||||
<van-cell title="预约备注">{{ viewData.appointmentUserNote }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="van-doc-card" style="margin: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
咨询师信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.doctorUserName || '暂无'}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.doctorUnitName || '暂无'}}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.doctorJobTitle || '暂无'}}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.doctorMobile || '暂无'}}</van-cell>
|
||||
<van-cell title="咨询方式">
|
||||
<div v-if="!viewData.askType || getDoctorAskTypeName().length === 0">暂无</div>
|
||||
<div v-else>
|
||||
<div v-for="item in getDoctorAskTypeName()">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell @click="doctorIntroduceShow = true" title="个人简介" is-link>
|
||||
<div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: break-word;">
|
||||
{{ viewData.doctorIntroduce || '暂无'}}
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model:show="doctorIntroduceShow" position="bottom" round style="padding: 20px; width: auto">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<div class="label">咨询师简介</div>
|
||||
<div @click="doctorIntroduceShow = false">
|
||||
<van-icon name="cross"></van-icon>
|
||||
</div>
|
||||
</div>
|
||||
<pre class="label_text">{{viewData.doctorIntroduce ? viewData.doctorIntroduce : '暂无数据,该资料待补充'}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model="infoShow" class="apply_pop" position="right">
|
||||
<van-nav-bar
|
||||
title="预约信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="infoShow = false">
|
||||
</van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
:value="chooseData.startTime"
|
||||
label="开始时间"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.endTime"
|
||||
label="结束时间"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="chooseData.doctorUser">
|
||||
<van-field readonly
|
||||
:value="chooseData.doctorUserName"
|
||||
label="咨询师姓名"></van-field>
|
||||
<van-field readonly
|
||||
:value="chooseData.doctorMobile"
|
||||
label="咨询师电话"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
label="预约人姓名"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"
|
||||
label="预约人工号"></van-field>
|
||||
<van-field readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
label="预约人单位"></van-field>
|
||||
<van-field :rules="[{ required: true, message: '请填写电话' }]"
|
||||
required
|
||||
type="tel"
|
||||
v-model=chooseData.userMobile
|
||||
label="预约人电话"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group inset class="mt10">
|
||||
|
||||
<div v-if="chooseData.askType">
|
||||
<van-field v-model="appointmentAskTypeText" label="咨询方式" @click="appointmentAskTypeShow = true"
|
||||
placeholder="请选择咨询方式"></van-field>
|
||||
<van-popup v-model:show="appointmentAskTypeShow" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="askTypeArray" @confirm="askTypeConfirm"
|
||||
@cancel="appointmentAskTypeShow = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<van-field
|
||||
v-model="appointmentUserNote"
|
||||
rows="3"
|
||||
autosize
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
placeholder="您可以输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-form>
|
||||
<div class="footer">
|
||||
<van-button @click="doSubmit()" color="#1867b0">提交预约</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
appointmentAskTypeText: '',
|
||||
appointmentUserNote: '',
|
||||
appointmentAskTypeShow: false,
|
||||
appointmentAskTypeValue: '',
|
||||
askTypeArray: [],
|
||||
chooseData: {},
|
||||
infoShow: false,
|
||||
doctorIntroduceShow: false,
|
||||
stateList: [
|
||||
{text: '全部预约状态', value: null},
|
||||
{text: '预约中', value: 2100},
|
||||
{text: '预约成功', value: 2300},
|
||||
{text: '预约失败', value: 2200}
|
||||
],
|
||||
askTypeList: [],
|
||||
show: false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update(o) {
|
||||
this.askTypeArray = []
|
||||
if (o.askType) {
|
||||
const array = JSON.parse(o.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
this.askTypeArray.push({text: o.name, value: o.code})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (o.appointmentAskTypeValue) {
|
||||
const type = this.askTypeList.find(x => x.code === o.appointmentAskTypeValue)
|
||||
this.appointmentAskTypeText = type ? type.name : ''
|
||||
}
|
||||
this.chooseData = o
|
||||
this.appointmentUserNote = o.appointmentUserNote
|
||||
this.$set(this.chooseData, "userMobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.infoShow = true
|
||||
},
|
||||
askTypeConfirm(val) {
|
||||
this.$set(this, "appointmentAskTypeText", val.text)
|
||||
this.$set(this, "appointmentAskTypeValue", val.value)
|
||||
this.appointmentAskTypeShow = false
|
||||
},
|
||||
async doSubmit() {
|
||||
if (!this.chooseData.userMobile) {
|
||||
this.$toast.fail("请输入手机号");
|
||||
return
|
||||
}
|
||||
const valid = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认提交吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (valid) {
|
||||
this.$toast.loading('提交中...')
|
||||
const params = {
|
||||
appointmentUserNote: this.appointmentUserNote,
|
||||
appointmentAskTypeValue: this.appointmentAskTypeValue,
|
||||
userMobile: this.chooseData.userMobile,
|
||||
id: this.chooseData.id,
|
||||
isAdd: false,
|
||||
}
|
||||
const resp = await $.post('/mobile/legalAidPro/doApply', params)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('修改成功')
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/legalAidPro/myApplyList')
|
||||
}, 1000)
|
||||
} else if (resp.code === 1) {
|
||||
this.$toast.error(resp.msg)
|
||||
} else if (resp.code === 2) {
|
||||
this.$toast(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
getAskTypeName() {
|
||||
if (this.viewData.appointmentAskTypeValue) {
|
||||
const type = this.askTypeList.find(o => o.code === this.viewData.appointmentAskTypeValue + '')
|
||||
return type ? type.name : '暂无'
|
||||
} else {
|
||||
return '暂无'
|
||||
}
|
||||
},
|
||||
getDoctorAskTypeName() {
|
||||
const askTypeArray = []
|
||||
if (this.viewData.askType) {
|
||||
const array = JSON.parse(this.viewData.askType)
|
||||
this.askTypeList.map(o => {
|
||||
if (array.includes(o.code)) {
|
||||
askTypeArray.push(o)
|
||||
}
|
||||
})
|
||||
}
|
||||
return askTypeArray
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/legalAidPro/MyPageData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
viewInfo(o) {
|
||||
this.viewData = o
|
||||
this.show = true
|
||||
},
|
||||
async doCancel(id) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定取消此次预约吗?',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/legalAidPro/doCancel', {id})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('取消成功')
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageForm.year = this.yearList[0].value
|
||||
this.pageForm.stateId = null
|
||||
this.pageData()
|
||||
this.askTypeList = await getDictOptions("psychology_asktype")
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,74 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-loading {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
-o-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-loading v-if="loading" type="spinner" color="#1989fa"></van-loading>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
classifyLists: [],
|
||||
classify: '',
|
||||
token: '',
|
||||
deviceType: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.login()
|
||||
},
|
||||
methods: {
|
||||
login() {
|
||||
this.loading = true
|
||||
tellGetToken_app((v, u) => {
|
||||
this.getTokenCall(v, u)
|
||||
})
|
||||
},
|
||||
getTokenCall(v, u) {
|
||||
this.classify = this.classifyLists[0]
|
||||
this.token = v
|
||||
this.deviceType = u
|
||||
document.title = '智慧工会平台'
|
||||
let obj = {back: true, close: true, rootView: true, title: true}
|
||||
|
||||
// window.location.href = '/mobile/app/index?token='+this.token
|
||||
$.get("/mobile/app/index", {token: this.token}).then((res) => {
|
||||
this.loading = false
|
||||
// alert(JSON.stringify(res))
|
||||
if (res.code === 0) {
|
||||
window.location.href = '/mobile/index/doLogin?username=' + res.data + '&platformCaptcha='
|
||||
} else if (res.code === 1 || res.code==2) {
|
||||
Dialog.alert({
|
||||
title: '标题',
|
||||
message: res.msg,
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,72 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.card {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
margin: 10px;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.year {
|
||||
font-size: 16px;
|
||||
color: #3498db;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
.info {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
@click-left="history.go(-1)"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="我的互助金申请"
|
||||
></van-nav-bar>
|
||||
|
||||
<div>
|
||||
<div class="card" v-for="item in tableData">
|
||||
<div class="year">2022年</div>
|
||||
<div class="info">
|
||||
<p>姓名:{{item.userName}}</p>
|
||||
<p>单位:{{item.unitName}}</p>
|
||||
<p>金额:{{item.finalSubsidyMoney ? item.finalSubsidyMoney : '审核中'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,504 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="会议请假审核"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入会议名称、会议地点进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="meetingTimeList" @change="doSearch"
|
||||
v-model="pageForm.meetingTime"></van-dropdown-item>
|
||||
<van-dropdown-item :options="typeList" @change="doSearch"
|
||||
v-model="pageForm.typeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="loading">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id, o.modulename)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 70%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.meetingname}}</span>
|
||||
</div>
|
||||
<div style="color: grey">{{o.location}}</div>
|
||||
</div>
|
||||
<div style="color: #1867b0;">
|
||||
{{o.meetingtypename}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<span style="color: grey">会议时间:</span>
|
||||
{{o.starttime}}
|
||||
<!--<van-col span="12"><span style="color: grey">结束时间:</span></van-col>-->
|
||||
</van-row>
|
||||
<van-row>
|
||||
|
||||
<!--<van-col span="12">{{o.endtime}}</van-col>-->
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 8px;">
|
||||
<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">会议描述:</span>
|
||||
{{o.meetingdescription}}
|
||||
</div>
|
||||
<span @click.stop="desc = o.meetingdescription; popupShow = true" class="showMore">查看更多</span>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div>
|
||||
<van-button @click.stop="getAuditList(o)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">已审{{o.audit}}
|
||||
</van-button>
|
||||
<van-button @click.stop="openView(o.id, o.modulename)" class="cus_button"
|
||||
color="#1867b0" size="small" style="margin-right: 8px; width: auto;"
|
||||
type="primary">未审{{o.no_audit}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup class="cus_popup" v-model:show="popupShow">
|
||||
<pre style="margin: 0; white-space: break-spaces">{{desc}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon>
|
||||
|
||||
<!--审核人员-->
|
||||
<van-action-sheet :title="queryType === 'notAudit' ? '请假人员列表' : '请假人员列表'" @close="popClose" class="userPopup"
|
||||
v-model:show="userShow">
|
||||
<div class="content">
|
||||
<div class="van-doc-card" v-for="(item, i) in userList">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 80%">
|
||||
<!--<span>{{moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</span>-->
|
||||
<span>{{'会议时间:' + moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
</div>
|
||||
<div v-if="queryType === 'notAudit'">
|
||||
<span @click="checkAll(i)">全选</span>
|
||||
<span @click="toggleAll(i)" style="margin-left: 4px">反选</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
会议名称:
|
||||
<van-tag size="medium" type="primary">{{item.timePeriodName}}</van-tag>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<van-checkbox-group ref="checkboxGroup" v-if="item.users !== null" v-model="result">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
:key="obj.id"
|
||||
@click="toggle(i, index)" class="cus_cell"
|
||||
clickable
|
||||
v-for="(obj, index) in item.users">
|
||||
<span style="display: inline-block; width: 40px">{{obj.username}}</span>
|
||||
<span style="display: inline-block; width: 20px">{{obj.sex}}</span>
|
||||
<span style="display: inline-block; width: 60px">{{obj.loginname}}</span>
|
||||
<span class="unit">{{obj.unitname}}</span>
|
||||
<van-icon class="audit_icon" color="green" name="passed"
|
||||
v-if="queryType === 'hasAudit' && obj.auditState === true"></van-icon>
|
||||
<van-icon class="audit_icon" color="grey" name="close"
|
||||
v-if="queryType === 'hasAudit' && obj.auditState === false"></van-icon>
|
||||
<template #right-icon v-if="queryType === 'notAudit'">
|
||||
<van-checkbox :name="obj.id" ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
<div style="margin-top: 4px; text-align: center" v-else>暂无请假人员</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 56px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<van-button @click="audit('many', 'reject')" color="#ff976a" size="small" style="height: 38px">驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('many', 'pass')" color="#1867b0" size="small" style="height: 38px">通过
|
||||
</van-button>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 10px; width: 95%"
|
||||
v-if="queryType === 'notAudit'">
|
||||
<van-button @click="audit('all', 'reject')" color="#ff976a" size="small" style="height: 38px">一键全部驳回
|
||||
</van-button>
|
||||
<van-button @click="audit('all', 'pass')" color="#1867b0" size="small" style="height: 38px">一键全部通过
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
<!--审核弹框-->
|
||||
<van-dialog @confirm="auditDo" show-cancel-button title="温馨提示" v-model:show="auditShow">
|
||||
<div style="padding-top: 8px; text-align: center; font-size: 14px; color: #646566">{{str}}</div>
|
||||
<van-divider style="margin: 12px 0 1px 0px;"></van-divider>
|
||||
<van-field
|
||||
autosize
|
||||
label="审核意见:"
|
||||
maxlength="50"
|
||||
placeholder="请输入审核意见"
|
||||
rows="2"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="reason"
|
||||
></van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: '',
|
||||
list: ['a', 'b'],
|
||||
result: [],
|
||||
reason: '',
|
||||
auditShow: false,
|
||||
popupShow: false,
|
||||
userShow: false,
|
||||
userList: [],
|
||||
userClickList: [],
|
||||
str: '',
|
||||
type: '',
|
||||
auditType: '',
|
||||
queryType: '',
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {text: '即将开始', value: 0}, {text: '已结束', value: 1}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getAuditList(o) {
|
||||
this.queryType = 'hasAudit'
|
||||
const resp = await $.post('/mobile/meeting/audit/getLeaveUser', {
|
||||
meetingId: o.id,
|
||||
auditType: 'hasAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userList.forEach(item => {
|
||||
if (item.users && item.users.length > 1) {
|
||||
item.users.sort((a, b) => {
|
||||
return b.auditState - a.auditState
|
||||
})
|
||||
}
|
||||
})
|
||||
this.userShow = true
|
||||
}
|
||||
},
|
||||
checkAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle(true))
|
||||
},
|
||||
toggleAll(i) {
|
||||
this.$refs.checkboxGroup[i].children.forEach(item => item.toggle())
|
||||
},
|
||||
toggle(i, index) {
|
||||
if (i > 0) {
|
||||
let length = 0
|
||||
for (let m = 0; m < i; m++) {
|
||||
length += this.userList[m].users.length
|
||||
}
|
||||
index = length + index
|
||||
}
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
async auditDo() {
|
||||
let idList = this.result
|
||||
if (this.type === 'all') {
|
||||
this.userList.forEach(item => {
|
||||
if (item.users !== null && item.users !== undefined) {
|
||||
idList = idList.concat(item.users.map(o => o.id))
|
||||
}
|
||||
})
|
||||
}
|
||||
const resp = await $.post('/mobile/meeting/audit/audit', {
|
||||
tpuIds: JSON.stringify(idList),
|
||||
auditOpinion: this.reason,
|
||||
isPass: this.auditType === 'pass'
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
vant.Toast(resp.msg)
|
||||
this.userShow = false
|
||||
},
|
||||
audit(type, auditType) {
|
||||
this.type = type
|
||||
this.auditType = auditType
|
||||
if (type === 'many' && this.result.length === 0) {
|
||||
vant.Toast('请先选择人员')
|
||||
return
|
||||
}
|
||||
this.str = type === 'many' ? '您选择了' + this.result.length + '个人,请确认您的选择' : '您确定要一键全部审核吗?'
|
||||
this.reason = auditType === 'pass' ? '同意' : '拒绝'
|
||||
this.auditShow = true
|
||||
},
|
||||
async openView(id, modulename) {
|
||||
this.queryType = 'notAudit'
|
||||
this.userList = []
|
||||
const resp = await $.post('/mobile/meeting/audit/getLeaveUser', {
|
||||
meetingId: id,
|
||||
moduleName: modulename,
|
||||
auditType: 'canAudit',
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.userList = resp.data
|
||||
this.userClickList = []
|
||||
if (this.userList.length === 0) {
|
||||
vant.Toast('暂无请假人员')
|
||||
} else {
|
||||
this.userShow = true
|
||||
}
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员')
|
||||
},
|
||||
popClose() {
|
||||
this.$nextTick(function () {
|
||||
if (this.$refs.checkboxes !== undefined) {
|
||||
this.$refs.checkboxes.forEach(item => item.toggle(false));
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/meeting/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await meetUtil.getAllMeetingType()
|
||||
this.typeList.unshift({text: '全部会议类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,532 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.leave_pop {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 82%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 4.6em;
|
||||
}
|
||||
|
||||
.checkDiv {
|
||||
font-size: 33px;
|
||||
color: #1867b0;
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.auditState {
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -3px;
|
||||
border-radius: 4px;
|
||||
padding: 1px 8px;
|
||||
border: 1px #1867b0 solid;
|
||||
background: #1867b0;
|
||||
opacity: 0.6;
|
||||
color: white;
|
||||
transform: skewY(5deg);
|
||||
}
|
||||
|
||||
.van-field--min-height .van-field__control {
|
||||
min-height: auto;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.border_div {
|
||||
width: 33px;
|
||||
height: 33px;
|
||||
border: 1px lightgrey solid;
|
||||
border-radius: 14px;
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 28px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
|
||||
<!--top栏-->
|
||||
<van-nav-bar
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="我的会议"
|
||||
></van-nav-bar>
|
||||
|
||||
<!--筛选框-->
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
maxlength="10"
|
||||
placeholder="请输入会议名称、会议地点进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyWord"
|
||||
>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="meetingList" @change="doSearch"
|
||||
v-model="pageForm.tabNameIndex"></van-dropdown-item>
|
||||
<van-dropdown-item :options="meetingTimeList" @change="doSearch"
|
||||
v-model="pageForm.meetingTime"></van-dropdown-item>
|
||||
<van-dropdown-item :options="typeList" @change="doSearch"
|
||||
v-model="pageForm.typeId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<!--列表-->
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''" :immediate-check="false"
|
||||
@load="onLoad"
|
||||
v-model="loading"
|
||||
>
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="openView(o.id)">
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.meetingName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color: #1867b0; white-space: nowrap;">
|
||||
{{o.meetingTypeName}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<span style="color: grey">会议地点:</span>
|
||||
{{o.location}}
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<span style="color: grey">会议时间:</span>
|
||||
{{o.startTime}}
|
||||
<!--<van-col span="12"><span style="color: grey">结束时间:</span></van-col>-->
|
||||
</van-row>
|
||||
<van-row>
|
||||
<!--<van-col span="12">{{o.endTime}}</van-col>-->
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 8px">
|
||||
<div class="cus_overflow" style="line-height: 20px; width: 83%">
|
||||
<span style="color: grey">会议描述:</span>
|
||||
{{o.meetingDescription}}
|
||||
</div>
|
||||
<span @click.stop="popupShow = true; clickRow = o"
|
||||
class="showMore">查看更多</span>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<!--<div style="display: flex; align-items: center">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span :style="'color: ' + o.stateColor">{{o.stateName}}</span>
|
||||
</div>-->
|
||||
<div>
|
||||
<!--<van-button @click="needLeave(o)" v-if="o.isCanLeave === null && o.isJoin === null"
|
||||
type="primary" size="small" color="#1867b0" style="margin-right: 8px">我要请假</van-button>
|
||||
<van-button v-if="o.isJoin === false" size="small" disabled color="grey" style="margin-right: 8px">已请假</van-button>
|
||||
<van-button type="primary" v-if="o.isJoin !== false" size="small" color="#1867b0">我要签到</van-button>
|
||||
<van-button v-if="o.isJoin === true" size="small" disabled color="grey">已签到</van-button>-->
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
|
||||
@click="needLeave(o, false)"
|
||||
color="#1867b0" size="small" style="margin-right: 8px"
|
||||
type="primary">查看请假状态
|
||||
</van-button>
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false"
|
||||
@click="needLeave(o, true)"
|
||||
color="#1867b0" size="small" style="margin-right: 8px"
|
||||
type="primary">我要请假
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<!--弹出框-->
|
||||
<van-popup class="cus_popup" v-model:show="popupShow">
|
||||
<pre style="margin: 0; white-space: break-spaces; line-height: 28px">{{clickRow.meetingDescription}}</pre>
|
||||
</van-popup>
|
||||
|
||||
<van-icon @click="popupShow = false" class="cus_icon" name="close" v-if="popupShow"></van-icon>
|
||||
|
||||
<!--请假弹框-->
|
||||
<van-action-sheet class="leave_pop" title="会议信息" v-model="leaveShow">
|
||||
<div v-if="flag === true"
|
||||
style="padding: 0px 0px 10px 0px; text-align: center; font-size: 14px; color: #646566">
|
||||
请<span style="color: red">点击选择</span>请假时间段,填写请假原因
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
<div class="van-doc-card" v-for="(item, index) in timeList">
|
||||
<div>
|
||||
<div><span style="color: grey">会议名称:</span>{{item.timePeriodName}}</div>
|
||||
</div>
|
||||
<div @click="leaveClick(item, index)"
|
||||
style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<div>
|
||||
<span style="color: grey">会议时间:</span>
|
||||
{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</div>
|
||||
<!--<div><span style="color: grey">结束时间:</span>{{moment(item.endTime).format('YYYY-MM-DD HH:mm')}}</div>-->
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="flag === true" class="border_div"></div>
|
||||
<van-icon v-if="flag === true" :class="'checkDiv checkDiv' + index"
|
||||
name="success" style="display: none;"></van-icon>
|
||||
<span class="auditState"
|
||||
v-if="item.isJoin === false">{{item.stateName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.isJoin === false">
|
||||
<div><span style="color: grey">审核状态:</span>{{item.stateName}}</div>
|
||||
</div>
|
||||
<div>
|
||||
<span style="float: left; color: grey">请假原因:</span>
|
||||
<van-field :disabled="item.isJoin === false" placeholder="请输入请假原因" rows="1"
|
||||
style="font-size: 12px; padding: 0; width: 70%; line-height: 20px"
|
||||
type="textarea" autosize
|
||||
v-model="item.leaveReason"></van-field>
|
||||
</div>
|
||||
<div v-if="flag === false && item.stateCode === clickRow.firstState && item.stateAuditType !== 1"
|
||||
style="text-align: right">
|
||||
<van-button @click.stop="cancelLeave(item)" border color="#1867b0" size="small">
|
||||
取消请假
|
||||
</van-button>
|
||||
</div>
|
||||
<div v-if="flag === false && item.stateAuditType === 1" style="text-align: right">
|
||||
<van-button @click.stop="refreshApply(item)" border color="#1867b0"
|
||||
size="small">重新申请
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="flag === true">
|
||||
<div style="display: flex; justify-content: space-evenly; position: fixed; bottom: 20px; width: 100%">
|
||||
<van-button @click="leaveShow = false" color="lightgrey" size="small"
|
||||
style="width: 40%; border-radius: revert; height: 38px">取消
|
||||
</van-button>
|
||||
<van-button @click="leave" color="#1867b0" size="small"
|
||||
style="width: 40%; border-radius: revert; height: 38px">确定
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
timeList: [],
|
||||
checked: [],
|
||||
checkboxRefs: [],
|
||||
leaveReason: '',
|
||||
leaveShow: false,
|
||||
popupShow: false,
|
||||
tabNameIndex: 0,
|
||||
clickRow: {},
|
||||
meetingList: [{text: '全部', value: '0'}, {text: '我参与的', value: '1'}, {
|
||||
text: '我请假的',
|
||||
value: '2'
|
||||
}],
|
||||
typeList: [],
|
||||
meetingTimeList: [{text: '全部时间', value: null}, {
|
||||
text: '即将开始',
|
||||
value: 0
|
||||
}, {text: '已结束', value: 1}],
|
||||
flag: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refreshApply(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要重新申请吗?',
|
||||
}).then(async () => {
|
||||
await this.needLeave(this.clickRow, true)
|
||||
this.timeList.forEach((re, index) => {
|
||||
if (re.stateAuditType === 1) {
|
||||
re.isJoin = null
|
||||
re.stateCode = null
|
||||
re.leaveReason = null
|
||||
$('.checkDiv' + index).css('display', 'none')
|
||||
this.checked = this.checked.filter(function (item, index) {
|
||||
return item.id !== re.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
|
||||
},
|
||||
cancelLeave(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要取消请假吗?',
|
||||
}).then(async () => {
|
||||
const res = await $.post('/mobile/meeting/mine/cancelLeave', {id: o.id})
|
||||
if (res.code === 0) {
|
||||
vant.Toast('操作成功')
|
||||
this.doSearch()
|
||||
this.leaveShow = false
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
leaveClick(item, index) {
|
||||
if (item.isJoin === false) {
|
||||
return
|
||||
}
|
||||
const isExist = this.checked.some(o => o.tpuId === item.tpuId)
|
||||
if (!isExist) {
|
||||
$('.checkDiv' + index).css('display', '')
|
||||
this.checked.push(item)
|
||||
} else {
|
||||
$('.checkDiv' + index).css('display', 'none')
|
||||
this.checked = this.checked.filter(o => o.tpuId !== item.tpuId)
|
||||
}
|
||||
},
|
||||
toggle(item, index) {
|
||||
if (item.auditIdList === null) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
}
|
||||
},
|
||||
openView(id) {
|
||||
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post('/mobile/meeting/mine/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async needLeave(o, flag) {
|
||||
this.flag = flag
|
||||
this.clickRow = o
|
||||
if (moment().valueOf() > moment(o.leaveDeadline).valueOf() || o.isCanLeave === false) {
|
||||
vant.Toast('抱歉,已过请假截止时间');
|
||||
return
|
||||
}
|
||||
this.leaveReason = ''
|
||||
this.checked = []
|
||||
const res = await $.post('/mobile/meeting/mine/findMyMeetPeriod', {meetingId: o.id})
|
||||
if (res.code === 0) {
|
||||
this.timeList = res.data
|
||||
if (this.timeList.length === 0) {
|
||||
vant.Toast('您暂无可请假的假时间段');
|
||||
return
|
||||
}
|
||||
|
||||
this.leaveShow = true
|
||||
this.$nextTick(function () {
|
||||
this.timeList.forEach((re, index) => {
|
||||
if (re.isJoin === false) {
|
||||
this.checked.push(re)
|
||||
$('.checkDiv' + index).css('display', '')
|
||||
}
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
vant.Toast('系统错误,请联系管理员');
|
||||
},
|
||||
async leave() {
|
||||
if (this.checked.length === 0) {
|
||||
vant.Toast('请选择请假时间段');
|
||||
return
|
||||
}
|
||||
const array = this.timeList.find(o => o.stateCode === null || o.stateCode < this.clickRow.firstState)
|
||||
if (array === undefined) {
|
||||
vant.Toast('您的所有请假均已处于审核阶段');
|
||||
return
|
||||
}
|
||||
const paramArray = []
|
||||
let valid = false
|
||||
this.checked.forEach(item => {
|
||||
if (item.leaveReason === '' || item.leaveReason === undefined) {
|
||||
vant.Toast('请填写请假原因');
|
||||
valid = true
|
||||
return
|
||||
}
|
||||
if (!item.stateCode) {
|
||||
paramArray.push(
|
||||
{
|
||||
id: item.tpuId,
|
||||
meetingId: this.clickRow.id,
|
||||
leaveReason: item.leaveReason
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
if (paramArray.length === 0) {
|
||||
vant.Toast('请选择请假时间段');
|
||||
return
|
||||
}
|
||||
if (valid) {
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/mobile/meeting/mine/askForLeave', {
|
||||
meetingId: this.clickRow.id,
|
||||
data: JSON.stringify(paramArray)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast('操作成功');
|
||||
this.doSearch()
|
||||
this.leaveShow = false
|
||||
}
|
||||
$('.checkDiv').css('display', 'none')
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.typeList = await meetUtil.getAllMeetingType()
|
||||
this.typeList.unshift({'text': '全部会议类型'})
|
||||
if (this.typeList && this.typeList.length > 0) {
|
||||
this.$set(this.pageForm, "typeId", this.typeList[0].value)
|
||||
}
|
||||
this.$set(this.pageForm, "tabNameIndex", this.meetingList[0].value)
|
||||
this.$set(this.pageForm, "meetingTime", this.meetingTimeList[1].value)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,320 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#app {
|
||||
max-height: 100vh;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 400px;
|
||||
max-height: 400px;
|
||||
background-color: white
|
||||
}
|
||||
|
||||
.body {
|
||||
background-color: white;
|
||||
margin-top: 6px;
|
||||
height: calc(100vh - (400px + 6px + 26px + 70px));
|
||||
max-height: calc(100vh - (400px + 6px + 26px + 70px));
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
margin-top: 6px;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.meeting_info {
|
||||
height: 200px;
|
||||
width: 86%;
|
||||
margin: 0 auto;
|
||||
transform: translateY(-60%);
|
||||
background-color: white;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
padding: 10px 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.header .text {
|
||||
color: white;
|
||||
text-align: center;
|
||||
letter-spacing: 3px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.meeting_info .meeting_name {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.meeting_info .meeting_address {
|
||||
text-align: center;
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-button--block {
|
||||
margin: 0 auto;
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.tag {
|
||||
color: #1867b0;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.span_text {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-col span {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 6.4em;
|
||||
height: 6.4em;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 10px;
|
||||
-webkit-mask-size: 100%;
|
||||
-webkit-mask-position: 50% 50%;
|
||||
background-color: currentColor;
|
||||
}
|
||||
|
||||
.icon_ok {
|
||||
-webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-1.177-7.86l-2.765-2.767L7%2012.431l3.119%203.121a1%201%200%20001.414%200l5.952-5.95-1.062-1.062-5.6%205.6z%22%2F%3E%3C%2Fsvg%3E);
|
||||
color: #07c160;
|
||||
}
|
||||
|
||||
.icon_no {
|
||||
-webkit-mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%2022C6.477%2022%202%2017.523%202%2012S6.477%202%2012%202s10%204.477%2010%2010-4.477%2010-10%2010zm-.763-15.864l.11%207.596h1.305l.11-7.596h-1.525zm.759%2010.967c.512%200%20.902-.383.902-.882%200-.5-.39-.882-.902-.882a.878.878%200%2000-.896.882c0%20.499.396.882.896.882z%22%2F%3E%3C%2Fsvg%3E);
|
||||
color: #fa5151;
|
||||
}
|
||||
|
||||
.weui-msg__text-area {
|
||||
margin-bottom: 32px;
|
||||
padding: 0 32px;
|
||||
-webkit-box-flex: 1;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.weui-msg__text-area .weui-msg__title {
|
||||
margin-bottom: 16px;
|
||||
font-weight: 500;
|
||||
font-size: 22px;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
.weui-msg__desc {
|
||||
font-size: 17px;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.meeting_index {
|
||||
width: 40px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: lightgrey;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.meeting_peri {
|
||||
width: 90%;
|
||||
line-height: 19px;
|
||||
margin-left: 10px
|
||||
}
|
||||
|
||||
.meeting_primary {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.weui-btn_primary:not(.weui-btn_disabled):visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.weui-btn_primary {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.weui-btn {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 184px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 8px 24px;
|
||||
box-sizing: border-box;
|
||||
font-weight: 700;
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
line-height: 1.88235294;
|
||||
border-radius: 8px;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<div v-if="isCanAudit">
|
||||
<div class="header">
|
||||
<div style="height: 300px; background-color: #1867b0; border-radius: 0 0 16% 16%;">
|
||||
<div class="text">会议签到</div>
|
||||
</div>
|
||||
<div class="meeting_info">
|
||||
<div class="meeting_name">{{meetingInfo.meetingName}}</div>
|
||||
<div class="meeting_address">{{meetingInfo.location}}</div>
|
||||
<div style="position: relative; top: 55px">
|
||||
<van-row>
|
||||
<van-col span="24"><span>会议类型:</span>{{typeName}}</van-col>
|
||||
</van-row>
|
||||
<div style="position: relative; top: 30px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; font-size: 14px;">会议时间:</span>
|
||||
{{moment(meetingInfo.startTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; font-size: 14px;">结束时间:</span>
|
||||
{{moment(meetingInfo.endTime).format('YYYY-MM-DD HH:mm')}}
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div><span class="tag">|</span>会议名称</div>
|
||||
<div style="overflow-y: auto; height: 100%; font-size: 13px;margin-top: 16px">
|
||||
<div class="meeting_primary" v-for="(item,index) in meetingInfo.meetingTimePeriods">
|
||||
<div :style="item.id === mtpId ? 'background-color: #43b26a; font-size: 15px' : ''"
|
||||
class="meeting_index" v-if="item.id === mtpId">
|
||||
当前
|
||||
</div>
|
||||
<div class="meeting_index" style="font-weight: normal" v-else>
|
||||
{{index + 1}}
|
||||
</div>
|
||||
<div class="meeting_peri">
|
||||
<div>{{item.timePeriodName}}</div>
|
||||
<div>{{moment(item.startTime).format('YYYY-MM-DD HH:mm')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button :disabled="signInfo.isSignIn" @click="signIn" block color="#1867b0" round type="primary">
|
||||
{{signInfo.isSignIn ? '您已签到' : '点击签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center; padding-top: calc(100% - 50%)" v-cloak v-else>
|
||||
<div style="margin-bottom: 32px;">
|
||||
<span :class="isIncorrect === true ? 'icon icon_ok' : 'icon icon_no'"></span>
|
||||
</div>
|
||||
<div class="weui-msg__text-area">
|
||||
<h2 class="weui-msg__title">{{isIncorrect === true ? '操作成功' : '温馨提示'}}</h2>
|
||||
<p class=".weui-msg__desc">{{incorrectMag}}</p>
|
||||
</div>
|
||||
<p style="margin-top: 190px">
|
||||
<span @click="back" class="weui-btn weui-btn_primary" role="button">点击返回</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--# include("/platform/meeting/includeJs/meetingUtil.js"){} #-->
|
||||
const meetUtil = new meetingUtil()
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return decodeURI(r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
meetingInfo: {},
|
||||
signInfo: {},
|
||||
isCanAudit: true,
|
||||
incorrectMag: '',
|
||||
meetingId: '',
|
||||
mtpId: '',
|
||||
isIncorrect: true,
|
||||
typeName: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const res = await $.get('/mobile/meeting/mine/getMeetingInfo', {
|
||||
meetingId: this.meetingId,
|
||||
mtpId: this.mtpId,
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.meetingInfo = res.data.meetingInfo
|
||||
this.signInfo = res.data.signInfo
|
||||
const typeList = await meetUtil.getAllMeetingType()
|
||||
const type = typeList.find(o => o.id === this.meetingInfo.typeId)
|
||||
this.typeName = type !== undefined ? type.meetingTypeName : ''
|
||||
} else {
|
||||
this.isCanAudit = false
|
||||
this.incorrectMag = res.msg
|
||||
this.isIncorrect = false
|
||||
}
|
||||
$('#app').css('opacity', '1')
|
||||
},
|
||||
async signIn() {
|
||||
const res = await $.post('/mobile/meeting/mine/signIn', {
|
||||
mtpId: this.mtpId,
|
||||
})
|
||||
this.isIncorrect = res.code === 0
|
||||
this.isCanAudit = false
|
||||
this.incorrectMag = res.msg
|
||||
},
|
||||
back() {
|
||||
const str = this.incorrectMag === '你不是当前会议人员' ? 'http://' + window.location.host : '/mobile/meeting/mine/go_sign?meetingId=' + this.meetingId + '&mtpId=' + this.mtpId
|
||||
location.href = str
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.meetingId = getQueryString('meetingId')
|
||||
this.mtpId = getQueryString('mtpId')
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,334 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="会员申请" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<van-form ref="form" @submit="doSubmit" validate-trigger="onSubmit"
|
||||
class="mt5"
|
||||
scroll-to-error
|
||||
input-align="right"
|
||||
:show-error-message="false">
|
||||
<van-cell-group inset>
|
||||
<van-field label="姓名" value="${@shiro.getPrincipalProperty('username')}"
|
||||
left-icon="contact"
|
||||
readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" readonly
|
||||
@click="sexPicker = true"
|
||||
placeholder="请选择性别"
|
||||
clickable
|
||||
left-icon="ellipsis"></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男','女']"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
@cancel="sexPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="民族" v-model="formData.nation" readonly clickable
|
||||
left-icon="bar-chart-o"
|
||||
@click="nationPicker = true" placeholder="请选择民族"
|
||||
:rules="[{ required:true, message: '请选择民族' }]"></van-field>
|
||||
<van-popup v-model="nationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="nationColumns"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
@cancel="nationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="学历" v-model="formData.education" readonly clickable
|
||||
left-icon="coupon-o"
|
||||
@click="educationPicker = true" placeholder="请选择学历"
|
||||
:rules="[{ required:true, message: '请选择学历' }]"></van-field>
|
||||
<van-popup v-model="educationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="educationColumns"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
@cancel="educationPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="学位" v-model="formData.academicDegree" readonly clickable
|
||||
left-icon="comment-o"
|
||||
@click="academicDegreePicker = true" placeholder="请选择学位"
|
||||
:rules="[{ required:true, message: '请选择学位' }]"></van-field>
|
||||
<van-popup v-model="academicDegreePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="academicDegreeColumns"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
@cancel="academicDegreePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" v-model="formData.political" placeholder="请填写政治面貌"
|
||||
left-icon="label-o"
|
||||
:rules="[{ required:true, message: '请填写政治面貌' }]"></van-field>
|
||||
|
||||
<van-field label="人员类型" v-model="formData.personType" placeholder="请填写人员类型"
|
||||
left-icon="label-o"
|
||||
readonly
|
||||
:rules="[{ required:true, message: '请填写人员类型' }]"></van-field>
|
||||
|
||||
<van-field label="身份证" v-model="formData.idcard" placeholder="请填写身份证号码"
|
||||
left-icon="idcard"
|
||||
:rules="[{ required:true, message: '请填写身份证号码' }]"></van-field>
|
||||
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请填写联系电话"
|
||||
left-icon="phone-o"
|
||||
:rules="[{ required:true, message: '请填写联系电话' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field label="户口所在地" v-model="formData.registeredResidence" placeholder="请填写户口所在地"
|
||||
left-icon="wap-home-o"
|
||||
:rules="[{ required:true, message: '请填写户口所在地' }]"></van-field>
|
||||
<van-field label="现居住地" v-model="formData.homeAddress" placeholder="请填写现居住地"
|
||||
left-icon="home-o"
|
||||
:rules="[{ required:true, message: '请填写现居住地' }]"></van-field>
|
||||
<van-field label="工作单位" value="${@shiro.getPrincipalProperty('unit').getName()}"
|
||||
left-icon="cluster-o"
|
||||
readonly></van-field>
|
||||
<van-field label="职务" v-model="formData.position" placeholder="请填写职务"
|
||||
left-icon="debit-pay"
|
||||
:rules="[{ required:true, message: '请填写职务' }]"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button v-if="family && family.length>0 && family.length<3" style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div v-for="o,i in family" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="minus" type="danger" round size="mini"
|
||||
@click="family.splice(i,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
|
||||
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
|
||||
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
|
||||
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
|
||||
<van-field label="联系方式" v-model="o.mobile" type="tel" placeholder="请填写联系方式"
|
||||
:rules="[{ required:true, message: '请填写联系方式' }]"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="family.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
v-model="formData.vita"
|
||||
:rules="[{ required:true, message: '请填写个人工作简历' }]"
|
||||
style="padding: 0"
|
||||
input-align="left"
|
||||
autosize
|
||||
rows="4"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10 up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
v-model="formData.specialSkill"
|
||||
:rules="[{ required:true, message: '请填写个人特长' }]"
|
||||
style="padding: 0"
|
||||
input-align="left"
|
||||
autosize
|
||||
rows="4"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
placeholder="请填写个人特长"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const political = []
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
dicts:['Education','academicDegree'],
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sexPicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
// educationColumns: [
|
||||
// '博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
// ],
|
||||
// academicDegreeColumns: [
|
||||
// '学士', '硕士', '博士'
|
||||
// ],
|
||||
nationColumns: [],
|
||||
memberStatusColumn: {
|
||||
MEMBER: 1,
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
educationColumns(){
|
||||
if(this.dict && this.dict.type && this.dict.type.Education){
|
||||
return this.dict.type.Education.map(v=>v.value)
|
||||
}
|
||||
return []
|
||||
},
|
||||
academicDegreeColumns(){
|
||||
if(this.dict && this.dict.type && this.dict.type.academicDegree){
|
||||
return this.dict.type.academicDegree.map(v=>v.value)
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const formData = clone(this.formData)
|
||||
formData.family = JSON.stringify(this.family)
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
const data = await $.get("/platform/member/apply/submit/doApply", {memberStates: 1})
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
|
||||
this.$set(this.formData, "id", "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, "education", "${@shiro.getPrincipalProperty('education')}")
|
||||
this.$set(this.formData, "academicDegree", "${@shiro.getPrincipalProperty('academicDegree')}")
|
||||
this.$set(this.formData, "idcard", "${@shiro.getPrincipalProperty('idcard')}")
|
||||
this.$set(this.formData, "registeredResidence", "${@shiro.getPrincipalProperty('registeredResidence')}")
|
||||
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
|
||||
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
|
||||
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
|
||||
this.$set(this.formData, "personType", "${@shiro.getPrincipalProperty('personType')}")
|
||||
const {data} = await $.get("/mobile/member/getAllNation");
|
||||
/* this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
}) */
|
||||
this.nationColumns = nation
|
||||
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
if (resp.data.member === 1) {
|
||||
this.memberStatus = this.memberStatusColumn.MEMBER
|
||||
} else {
|
||||
if (resp.data.record != null) {
|
||||
this.memberStatus = this.memberStatusColumn.APPLYING
|
||||
} else {
|
||||
this.memberStatus = this.memberStatusColumn.NOTMEBMER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,65 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员申请" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div style="padding: 16px 10px;">
|
||||
<div v-for="o in applyRecords" class="list-card" @click="view(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false">
|
||||
<div style="display: flex;align-items: center">
|
||||
<van-icon name="records" :color="themeColor" size="25"></van-icon>
|
||||
<span :style="{color:themeColor}" style="font-size: 16px">会员申请</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申 请 人">{{o.username}}</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty v-if="mLoading==false&&applyRecords.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
applyRecords: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async view(o) {
|
||||
const {id, userId} = o
|
||||
window.location.href = '/mobile/member/detail?record_id=' + id + '&user_id=' + userId
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,130 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="会员审核"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearList" @change="yearChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="yearChange"
|
||||
v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad"
|
||||
v-model="loading">
|
||||
<div @click="openView(o)" class="list-card" v-for="o in tableData">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="申 请 人:">
|
||||
{{o.username}}({{o.loginname}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间:">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会:">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="人员类型:">{{o.personType}}</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<van-empty class="custom-image" description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: false},
|
||||
{text: '已审核', value: true},
|
||||
],
|
||||
handle: true,
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/* pageData() {
|
||||
this.mLoading = true
|
||||
setTimeout(async () => {
|
||||
$.get(loc() + '/pageData', this.pageForm, (res) => {
|
||||
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
})
|
||||
this.mLoading = false
|
||||
}, 600)
|
||||
},*/
|
||||
openView(o) {
|
||||
window.location.href = '/mobile/member/audit/findOne?stateId=' + o.stateId + '&record_id=' + o.id + '&user_id=' + o.userId
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,210 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.chart-card {
|
||||
background-color: #FFFFFF;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.flex-box {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="数据看板"></van-nav-bar>
|
||||
<van-row gutter="20" style="margin: 0 10px 10px 10px;padding-top: 20px;">
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634176912094" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="712" width="32" height="32">
|
||||
<path d="M327.6 682.7c-31.8-31.5-49.7-74.4-49.7-119.3V385.3c0-33.5 9.8-64.7 26.8-91-7.8-1.9-15.7-2.9-23.7-2.9H154.3c-56.6 0-102.9 46.9-102.9 104v163.7c0 38.8 21.5 74.4 55.7 92.3v319.9h83l30.6-202.5 30.6 202.5h76.4V682.7z m304.1-18.5c36.3-18.8 61.2-57.1 61.2-100.8V385.3c0-62.2-50.4-113.2-112-113.2h-138c-61.6 0-112 50.9-112 113.2v178.1c0 43.6 24.7 81.6 60.6 100.5V1012H482l33.3-220.3 33.3 220.3h83.1V664.2zM515.1 12c65.2 0 118 53.4 118 119.3 0 65.8-52.8 119.3-118 119.3s-118-53.4-118-119.3c0-66.1 52.8-119.3 118-119.3z m182.2 670.7v288.8h76.4L804.3 769l30.6 202.5H918V651.7c33-17.4 55.6-52.3 55.6-92.3V395.6c0-57.2-46.4-104-103-104H744.1c-8.2 0-16.2 1-23.7 2.9 17.6 27.1 26.9 58.7 26.8 91v178.1c0 45.4-18.5 88.2-49.9 119.1zM804.6 52.4c-60 0-108.5 49-108.5 109.5s48.5 109.6 108.5 109.6c59.8 0 108.3-49 108.3-109.6 0-60.6-48.5-109.5-108.3-109.5z m-584.1 0c59.8 0 108.5 49 108.5 109.5s-48.5 109.6-108.5 109.6c-59.9 0-108.3-49-108.3-109.6-0.1-60.6 48.4-109.5 108.3-109.5z"
|
||||
fill="#e0620d" p-id="713"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
总会员
|
||||
<span>
|
||||
{{memberNumberMap.totalCount}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634178080836" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8757" width="32" height="32">
|
||||
<path d="M579.2 646.5H445.1c-14.4 0-26.2-11.8-26.2-26.2V436.7c0-14.4 11.8-26.2 26.2-26.2h134.1c14.4 0 26.2 11.8 26.2 26.2v183.6c0 14.4-11.8 26.2-26.2 26.2z"
|
||||
fill="#F7C9A4" p-id="8758"></path>
|
||||
<path d="M840.7 959.1V779c0-83.9-147.8-139.5-328.4-139.5-180.6 0-328.4 55.6-328.4 139.5v180.1h656.8z"
|
||||
fill="#E8E8DD" p-id="8759"></path>
|
||||
<path d="M381.5 420.5h-53.7c-26.5 0-48.1-21.7-48.1-48.1 0-26.5 21.7-48.1 48.1-48.1h53.7c26.5 0 48.1 21.7 48.1 48.1 0 26.4-21.7 48.1-48.1 48.1zM687 415.9h-53.7c-26.5 0-48.1-21.7-48.1-48.1 0-26.5 21.7-48.1 48.1-48.1H687c26.5 0 48.1 21.7 48.1 48.1 0.1 26.4-21.6 48.1-48.1 48.1z"
|
||||
fill="#F7C9A4" p-id="8760"></path>
|
||||
<path d="M800.7 959.1V779c0-83.9-81.2-139.5-288.4-139.5-202.6 0-288.4 55.6-288.4 139.5v180.1h576.8z"
|
||||
fill="#F2F2F1" p-id="8761"></path>
|
||||
<path d="M512.1 549.1c-95.4 0-173.5-55.2-173.5-156.2V258.7c0-101 78.1-183.7 173.5-183.7s173.5 82.7 173.5 183.8v134.1c0 101-78.1 156.2-173.5 156.2z"
|
||||
fill="#FFD9B6" p-id="8762"></path>
|
||||
<path d="M409 353.3a19.2 23.8 0 1 0 38.4 0 19.2 23.8 0 1 0-38.4 0Z" fill="#694B4B"
|
||||
p-id="8763"></path>
|
||||
<path d="M576 353.3a19.2 23.8 0 1 0 38.4 0 19.2 23.8 0 1 0-38.4 0Z" fill="#694B4B"
|
||||
p-id="8764"></path>
|
||||
<path d="M339.6 959.1v-112c0-7.7-6.3-14-14-14s-14 6.3-14 14V959h28zM711.3 959.1v-112c0-7.7-6.3-14-14-14s-14 6.3-14 14V959h28z"
|
||||
fill="#E5E5DB" p-id="8765"></path>
|
||||
<path d="M577.8 649.5H447.3c-8.6 12.2-8.6 32.2 0 44.5l49.5 70.2c8.6 12.2 22.8 12.2 31.4 0l49.5-70.2c8.7-12.3 8.7-32.3 0.1-44.5z"
|
||||
fill="#0AC2FD" p-id="8766"></path>
|
||||
<path d="M700.4 82.6h-243c-28.9 0-54 19.7-65.8 48.1-37.5 3.3-63.4 40-63.4 84.2l11.4 119.4H397c2.6 0 4.8-2.2 4.8-4.9v-65.1c0-3.1 2.2-5.7 4.9-5.7l212 20.8c2.7 0 4.9 2.6 4.9 5.7v40.5c0 3.7 2.9 6.7 6.5 6.7l45.4 2h7.1c19.4 0 36.3-230.3 36.3-230.3 1.3-12.5-8.3-21.4-18.5-21.4z"
|
||||
fill="#F7CCA5" p-id="8767"></path>
|
||||
<path d="M712.1 62.6h-254c-29.3 0-54.7 19.3-66.6 47.2-38 3.3-68.1 39.1-68.1 82.4l14 117.3H379c2.7 0 4.8-2.2 4.8-4.8v-63.8c0-3.1 2.2-5.6 5-5.6l246.8 22.3c2.7 0 5 2.5 5 5.6V303c0 3.6 2.9 6.5 6.6 6.5h46.1c12.3 0 37.6-225.9 37.6-225.9 1.1-12.3-8.5-21-18.8-21z"
|
||||
fill="#694B4B" p-id="8768"></path>
|
||||
<path d="M511.3 648.5l-36.5 79.4c-6.5 10.3-13.6 21.2-24.1 11.7l-103.4-75.7c-7.9-7.9-15.9-13.9-12.8-23.6l32.3-54.2c3.1-9.7 14-15 24.1-11.7L498.5 625c10.2 3.2 15.9 13.8 12.8 23.5z"
|
||||
fill="#E8E8DD" p-id="8769"></path>
|
||||
<path d="M513.2 647.9l35.9 79.6c6.4 10.4 13.4 21.3 24.1 11.9l103.9-75c7.9-7.8 16-13.8 12.9-23.5l-21-51.4c-3.1-9.7-13.9-15.1-24.1-11.9L526 624.3c-10 3.3-15.9 13.9-12.8 23.6z"
|
||||
fill="#E8E8DD" p-id="8770"></path>
|
||||
<path d="M549.3 959.7h-73.9c-7.7 0-14-3-14-6.7l30-206c0-3.7 6.3-6.7 14-6.7h13.9c7.7 0 14 3 14 6.7l30 206c0 3.7-6.3 6.7-14 6.7z"
|
||||
fill="#0AC2FD" p-id="8771"></path>
|
||||
<path d="M528.3 762.3h-33c-3 0-5.5-2.5-5.5-5.5s2.5-5.5 5.5-5.5h33c3 0 5.5 2.5 5.5 5.5s-2.5 5.5-5.5 5.5z"
|
||||
fill="#079FDB" p-id="8772"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
男性会员
|
||||
<span>
|
||||
{{memberNumberMap.maleCount}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-col>
|
||||
<van-col span="8">
|
||||
<div class="flex-box" style="justify-content: space-between;padding: 15px">
|
||||
<svg t="1634178064546" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="8382" width="32" height="32">
|
||||
<path d="M668.501333 761.685333h-2.048a97.621333 97.621333 0 0 1-97.621333-97.621333v-43.52h-109.397333v43.52a97.621333 97.621333 0 0 1-97.621334 97.621333h-6.314666a136.533333 136.533333 0 0 0-136.533334 136.533334v29.013333h586.069334v-29.013333a136.533333 136.533333 0 0 0-136.533334-136.533334z"
|
||||
fill="#FFE3BA" p-id="8383"></path>
|
||||
<path d="M427.690667 735.914667a180.224 180.224 0 0 0 170.666666-1.365334 96.938667 96.938667 0 0 1-30.208-70.485333v-43.52h-108.714666v43.52a96.938667 96.938667 0 0 1-31.744 71.850667zM805.034667 870.4a232.106667 232.106667 0 0 1-93.525334 19.626667H312.490667A232.106667 232.106667 0 0 1 218.965333 870.4v56.149333h586.069334V870.4z"
|
||||
fill="#FFC670" p-id="8384"></path>
|
||||
<path d="M512 108.032a254.805333 254.805333 0 0 1 254.805333 254.976v265.898667a38.229333 38.229333 0 0 1-38.229333 38.229333H295.424a38.229333 38.229333 0 0 1-38.229333-38.229333V363.008A254.805333 254.805333 0 0 1 512 108.032z"
|
||||
fill="#FFC670" p-id="8385"></path>
|
||||
<path d="M512 552.106667a529.066667 529.066667 0 0 1-254.805333-63.488v140.288a38.229333 38.229333 0 0 0 38.229333 38.229333h433.152a38.229333 38.229333 0 0 0 38.229333-38.229333v-140.288A529.066667 529.066667 0 0 1 512 552.106667z"
|
||||
fill="#FFB038" p-id="8386"></path>
|
||||
<path d="M694.101333 304.64v221.866667A182.101333 182.101333 0 0 1 512 708.608a182.101333 182.101333 0 0 1-182.101333-182.101333v-149.674667a131.072 131.072 0 0 0 184.32-119.466667 131.242667 131.242667 0 0 0 113.834666 65.877334 129.706667 129.706667 0 0 0 66.048-17.92z"
|
||||
fill="#FFF6E6" p-id="8387"></path>
|
||||
<path d="M638.122667 321.706667v204.8a182.101333 182.101333 0 0 1-153.6 179.712 189.610667 189.610667 0 0 0 27.989333 2.389333 182.101333 182.101333 0 0 0 181.589333-182.101333v-221.866667a130.389333 130.389333 0 0 1-55.978666 17.066667z"
|
||||
fill="#FFE3BA" p-id="8388"></path>
|
||||
<path d="M666.453333 750.933333H648.533333c0 73.557333-59.562667 116.053333-133.12 116.053334h-7.850666c-73.557333 0-133.12-42.496-133.12-116.053334H358.4a136.533333 136.533333 0 0 0-58.538667 13.141334v163.328h426.666667v-163.498667a136.533333 136.533333 0 0 0-60.074667-12.970667z"
|
||||
fill="#F6716F" p-id="8389"></path>
|
||||
<path d="M724.992 870.4A232.106667 232.106667 0 0 1 631.466667 890.709333H392.533333A232.106667 232.106667 0 0 1 299.008 870.4v56.149333h426.666667V870.4z"
|
||||
fill="#F0504D" p-id="8390"></path>
|
||||
<path d="M593.92 107.52a36.864 36.864 0 0 0 5.973333 57.002667l69.12 45.397333 27.306667-27.306667-45.397333-69.290666a37.034667 37.034667 0 0 0-57.002667-5.802667zM770.901333 285.354667a36.864 36.864 0 0 0-5.802666-57.002667l-68.266667-45.397333-27.306667 27.306666 45.397334 69.12a36.693333 36.693333 0 0 0 55.978666 5.973334z"
|
||||
fill="#F6716F" p-id="8391"></path>
|
||||
<path d="M631.466667 201.250133l55.381333-55.3984 46.08 46.097067-55.381333 55.3984z" fill="#FCFEFF"
|
||||
p-id="8392"></path>
|
||||
<path d="M877.397333 910.165333h-55.296v-11.946666a153.6 153.6 0 0 0-80.042666-134.485334 17.066667 17.066667 0 0 0-9.898667-15.36 153.6 153.6 0 0 0-65.706667-14.506666H648.533333a17.066667 17.066667 0 0 0-12.117333 5.12A81.92 81.92 0 0 1 597.333333 705.877333a212.992 212.992 0 0 0 35.328-21.674666h95.402667a55.466667 55.466667 0 0 0 55.296-55.296V363.008a277.504 277.504 0 0 0-6.826667-60.757333c2.048-1.536 4.096-3.072 5.973334-4.778667a54.101333 54.101333 0 0 0-8.533334-83.456l-25.429333-17.066667a17.066667 17.066667 0 0 0-4.096-17.066666L699.733333 133.802667a17.066667 17.066667 0 0 0-17.066666-4.096l-17.066667-25.6a53.930667 53.930667 0 0 0-83.285333-8.704 38.058667 38.058667 0 0 0-3.242667 4.096 271.189333 271.189333 0 0 0-338.944 263.509333v265.898667a55.466667 55.466667 0 0 0 55.296 55.296h95.402667a199.509333 199.509333 0 0 0 38.570666 23.210666 80.042667 80.042667 0 0 1-41.472 32.597334A17.066667 17.066667 0 0 0 375.466667 733.866667h-17.066667a153.6 153.6 0 0 0-65.706667 14.677333 17.066667 17.066667 0 0 0-9.898666 15.530667v2.218666a145.408 145.408 0 0 0-80.042667 129.365334v14.677333H146.602667a17.066667 17.066667 0 0 0 0 34.133333h730.794666a17.066667 17.066667 0 0 0 0-34.133333z m-595.456 0h-47.786666v-14.677333a112.64 112.64 0 0 1 47.786666-91.818667z m473.770667-667.477333a18.944 18.944 0 0 1 8.874667 14.506667 20.48 20.48 0 0 1-21.674667 21.845333 20.309333 20.309333 0 0 1-14.677333-8.874667l-19.456-29.696 17.066666-17.066666z m-68.266667-72.533333l22.016 22.016-31.914666 31.232-22.016-22.016z m-64.682666-56.32a20.650667 20.650667 0 0 1 14.677333 8.874666l19.456 29.696-17.066667 17.066667L609.28 150.186667a18.944 18.944 0 0 1-8.874667-13.653334 20.309333 20.309333 0 0 1 21.674667-22.698666zM295.424 650.069333a21.162667 21.162667 0 0 1-21.162667-21.162666V363.008A238.933333 238.933333 0 0 1 512 125.098667a242.346667 242.346667 0 0 1 54.442667 6.485333 55.125333 55.125333 0 0 0 0 7.509333 53.418667 53.418667 0 0 0 24.064 39.594667l25.088 17.066667a17.066667 17.066667 0 0 0 3.754666 18.090666L665.6 259.584a17.066667 17.066667 0 0 0 17.066667 3.925333l17.066666 25.258667a53.248 53.248 0 0 0 39.594667 24.064 25.6 25.6 0 0 0 5.12 0 233.984 233.984 0 0 1 5.290667 50.176v265.898667a21.162667 21.162667 0 0 1-21.162667 21.162666h-60.586667a198.656 198.656 0 0 0 43.178667-123.562666V313.002667a17.066667 17.066667 0 0 0-8.704-14.677334 17.066667 17.066667 0 0 0-17.066667 0A114.005333 114.005333 0 0 1 529.066667 256a17.066667 17.066667 0 0 0-31.914667 8.874667 114.176 114.176 0 0 1-160.256 104.448 17.066667 17.066667 0 0 0-24.064 15.530666v141.141334a198.656 198.656 0 0 0 43.178667 123.562666z m51.2-123.562666V409.6a150.698667 150.698667 0 0 0 36.010667 4.437333A148.138667 148.138667 0 0 0 525.312 307.2a148.821333 148.821333 0 0 0 102.4 41.301333 144.896 144.896 0 0 0 48.981333-8.362666v187.733333a165.034667 165.034667 0 0 1-330.069333 0z m115.2 192.682666a199.338667 199.338667 0 0 0 49.834667 6.485334 191.829333 191.829333 0 0 0 53.589333-7.68 115.712 115.712 0 0 0 64.170667 54.613333c-11.093333 53.077333-62.634667 77.141333-113.834667 77.141333h-7.850667c-51.2 0-102.4-23.722667-113.493333-75.946666a115.029333 115.029333 0 0 0 67.925333-54.613334z m245.76 190.976h-392.533333v-134.826666A119.466667 119.466667 0 0 1 358.4 768c8.362667 68.266667 67.242667 116.053333 149.162667 116.053333h7.850666C597.333333 883.882667 656.725333 836.266667 665.6 768h1.365333a119.466667 119.466667 0 0 1 41.472 7.509333z m80.042667 0h-45.568v-105.813333a119.466667 119.466667 0 0 1 45.909333 93.866667z"
|
||||
fill="#3D3D63" p-id="8393"></path>
|
||||
<path d="M587.776 586.581333a17.066667 17.066667 0 0 0-31.402667-13.824 48.298667 48.298667 0 0 1-88.746666 0 17.066667 17.066667 0 0 0-31.402667 13.824 82.773333 82.773333 0 0 0 151.552 0zM453.290667 454.826667v-19.797334a17.066667 17.066667 0 0 0-34.133334 0v19.797334a17.066667 17.066667 0 0 0 34.133334 0zM587.776 471.893333a17.066667 17.066667 0 0 0 17.066667-17.066666v-19.797334a17.066667 17.066667 0 1 0-34.133334 0v19.797334a17.066667 17.066667 0 0 0 17.066667 17.066666z"
|
||||
fill="#3D3D63" p-id="8394"></path>
|
||||
</svg>
|
||||
<div class="text-center" style="font-size: 11px">
|
||||
女性会员
|
||||
<span>
|
||||
{{memberNumberMap.femaleCount}}
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
人员类型
|
||||
</div>
|
||||
<canvas id="personType" style="width: 100%" height="350"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
增长趋势
|
||||
</div>
|
||||
<canvas id="memberTrend" style="width: 100%" height="350"></canvas>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script src="https://gw.alipayobjects.com/os/lib/antv/f2/3.7.0/dist/f2.min.js"></script>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
memberNumberMap: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getMemberNumber() {
|
||||
const {data} = await $.get('/mobile/member/dashBoard/memberNumber')
|
||||
this.memberNumberMap = data
|
||||
},
|
||||
async growthTrend() {
|
||||
const {data} = await $.get('/mobile/member/dashBoard/growthTrend')
|
||||
const chart = new F2.Chart({
|
||||
id: 'memberTrend',
|
||||
pixelRatio: window.devicePixelRatio
|
||||
})
|
||||
chart.source(data)
|
||||
chart.scale({
|
||||
label: {
|
||||
range: [ 0, 1 ]
|
||||
},
|
||||
value: {
|
||||
tickCount: 5,
|
||||
min: 0
|
||||
}
|
||||
})
|
||||
// chart.axis('label', {
|
||||
// label: {
|
||||
// rotate: -1,
|
||||
// textAlign: 'end',
|
||||
// textBaseline: 'middle'
|
||||
// }
|
||||
// })
|
||||
chart.area().position('label*value').color('l(90) 0:#1890FF 1:#f7f7f7').shape('smooth')
|
||||
chart.line().position('label*value').color('l(90) 0:#1890FF 1:#f7f7f7').shape('smooth')
|
||||
chart.render()
|
||||
|
||||
|
||||
|
||||
},
|
||||
async getPersonTypeMember() {
|
||||
const {data} = await $.get('/platform/member/inquire/board/personTypeMember')
|
||||
const chart = new F2.Chart({
|
||||
id: 'personType',
|
||||
pixelRatio: window.devicePixelRatio
|
||||
})
|
||||
chart.source(data)
|
||||
chart.interval().position('label*value').color('label')
|
||||
chart.axis('label', {
|
||||
label: {
|
||||
rotate: -1,
|
||||
textAlign: 'end',
|
||||
textBaseline: 'middle'
|
||||
}
|
||||
})
|
||||
chart.render();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPersonTypeMember()
|
||||
this.getMemberNumber()
|
||||
this.growthTrend()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,62 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<!-- <van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="location.href = document.referrer"></van-nav-bar>-->
|
||||
<van-nav-bar title="详细信息" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
当前状态:{{stateName}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mobile-member-info ref="minfo"></mobile-member-info>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
unionAudit: {},
|
||||
schoolAudit: {},
|
||||
stateName: null,
|
||||
stateId: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-member-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
const userId = "${@shiro.getPrincipalProperty('id')}"
|
||||
const personType = "${@shiro.getPrincipalProperty('personType')}"
|
||||
setTimeout(() => {
|
||||
this.$refs.minfo.getUserInfo(user_id ? user_id : userId)
|
||||
this.$refs.minfo.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.record) {
|
||||
this.stateName = resp.data.record.stateName
|
||||
this.stateId = resp.data.record.stateId
|
||||
}
|
||||
}
|
||||
|
||||
this.mLoading = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,377 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="修改个人信息"></van-nav-bar>
|
||||
|
||||
<van-form :show-error-message="true" @submit="doSubmit" class="mt5"
|
||||
input-align="right"
|
||||
ref="form"
|
||||
scroll-to-error
|
||||
validate-trigger="onSubmit">
|
||||
<van-cell-group inset>
|
||||
<van-field label="工号" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"></van-field>
|
||||
<van-field label="姓名" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></van-field>
|
||||
<van-field clickable label="性别"
|
||||
left-icon="ellipsis"
|
||||
placeholder="请选择性别"
|
||||
readonly
|
||||
v-model="formData.sex"></van-field>
|
||||
<van-popup position="bottom" v-model="sexPicker">
|
||||
<van-picker
|
||||
:columns="['男','女']"
|
||||
@cancel="sexPicker = false"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field @click="marriagePicker=true" label="婚否" left-icon="ellipsis"
|
||||
readonly placeholder="请选择婚否" v-model="formData.marriage"></van-field>
|
||||
<van-popup position="bottom" v-model="marriagePicker">
|
||||
<van-picker
|
||||
:columns="['已婚','未婚']"
|
||||
@cancel="marriagePicker = false"
|
||||
@confirm="(val)=>{formData.marriage = val;marriagePicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--临时屏蔽-->
|
||||
<template v-if="false">
|
||||
<van-field :rules="[{ required:true, message: '请选择民族' }]" clickable label="民族"
|
||||
left-icon="bar-chart-o"
|
||||
placeholder="请选择民族" readonly
|
||||
v-model="formData.nation"></van-field>
|
||||
<van-popup position="bottom" v-model="nationPicker">
|
||||
<van-picker
|
||||
:columns="nationColumns"
|
||||
@cancel="nationPicker = false"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学历"
|
||||
|
||||
left-icon="coupon-o"
|
||||
placeholder="请选择学历" readonly
|
||||
v-model="formData.education"></van-field>
|
||||
<van-popup position="bottom" v-model="educationPicker">
|
||||
<van-picker
|
||||
:columns="educationColumns"
|
||||
@cancel="educationPicker = false"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学位"
|
||||
left-icon="comment-o"
|
||||
placeholder="请选择学位" readonly
|
||||
v-model="formData.academicDegree"></van-field>
|
||||
<van-popup position="bottom" v-model="academicDegreePicker">
|
||||
<van-picker
|
||||
:columns="academicDegreeColumns"
|
||||
@cancel="academicDegreePicker = false"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" left-icon="label-o"
|
||||
placeholder="请填写政治面貌" readonly
|
||||
v-model="formData.political"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field @click="idTypePicker=true" label="有效证件类型" left-icon="label-o"
|
||||
placeholder="请选择有效证件类型"
|
||||
readonly v-model="formData.idType">
|
||||
</van-field>
|
||||
<van-popup position="bottom" v-model="idTypePicker">
|
||||
<van-picker
|
||||
:columns="idTypeColumns"
|
||||
@cancel="idTypePicker = false"
|
||||
@confirm="(v)=>{formData.idType = v;idTypePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field label="证件号"
|
||||
left-icon="idcard"
|
||||
placeholder="请填写身份证号码"
|
||||
:rules="[{ pattern :/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的证件号' }]"
|
||||
v-model="formData.idcard"></van-field>
|
||||
<van-field label="联系电话"
|
||||
left-icon="phone-o"
|
||||
placeholder="请填写联系电话"
|
||||
:rules="[{ pattern :/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, message: '请输入正确的手机号' }]"
|
||||
type="tel"
|
||||
v-model="formData.mobile"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10" inset>
|
||||
<!-- <van-field label="户口所在地" left-icon="wap-home-o"-->
|
||||
<!-- placeholder="请填写户口所在地" readonly-->
|
||||
<!-- v-model="formData.registeredResidence"></van-field>-->
|
||||
<!-- <van-field label="现居住地" left-icon="home-o"-->
|
||||
<!-- placeholder="请填写现居住地" readonly-->
|
||||
<!-- v-model="formData.homeAddress"></van-field>-->
|
||||
<van-field label="工作单位" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"></van-field>
|
||||
<van-field label="分工会" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('union').getUnionname()}"></van-field>
|
||||
<!-- <van-field label="职务" left-icon="debit-pay"-->
|
||||
<!-- placeholder="请填写职务" readonly-->
|
||||
<!-- v-model="formData.position"></van-field>-->
|
||||
</van-cell-group>
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button @click="family.push({})" icon="plus"
|
||||
native-type="button" round size="mini" style="width: 40px"
|
||||
type="primary"
|
||||
v-if="family && family.length>0 && family.length<3"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div class="mt5" v-for="o,i in family">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button @click="family.splice(i,1)"
|
||||
icon="minus" native-type="button" round size="mini"
|
||||
style="width: 40px"
|
||||
type="danger"></van-button>
|
||||
</div>
|
||||
<van-field :rules="[{ required:true, message: '请填写与本人关系' }]" label="关系" placeholder="请填写与本人关系"
|
||||
v-model="o.relation"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写姓名' }]" label="姓名" placeholder="请填写姓名"
|
||||
v-model="o.name"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写联系方式' }]" label="联系方式" placeholder="请填写联系方式"
|
||||
type="tel"
|
||||
v-model="o.mobile"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button @click="family.push({})"
|
||||
icon="plus" native-type="button" round size="mini"
|
||||
style="width: 50px"
|
||||
type="primary"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
|
||||
autosize
|
||||
readonly
|
||||
autosize
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.vita"
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
|
||||
autosize
|
||||
autosize
|
||||
readonly
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请填写个人特长"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.specialSkill"
|
||||
></van-field>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button :color="themeColor" block native-type="submit" style="border-radius: 10px"
|
||||
type="info">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const political = []
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sexPicker: false,
|
||||
marriagePicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
educationColumns: [
|
||||
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
],
|
||||
academicDegreeColumns: [
|
||||
'学士', '硕士', '博士'
|
||||
],
|
||||
nationColumns: [],
|
||||
memberStatusColumn: {
|
||||
MEMBER: 1,
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null,
|
||||
idTypePicker: false,
|
||||
idTypeColumns: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: GetQueryString("taskId") ? '您的手机号信息已核对,确认提交?' : '您确定要提交吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const formData = clone(this.formData)
|
||||
formData.taskId = GetQueryString("taskId") ? GetQueryString("taskId") : null
|
||||
formData.family = JSON.stringify(this.family)
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
// location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
if (resp.data.member === 1) {
|
||||
this.memberStatus = this.memberStatusColumn.MEMBER
|
||||
} else {
|
||||
if (resp.data.record != null) {
|
||||
this.memberStatus = this.memberStatusColumn.APPLYING
|
||||
} else {
|
||||
this.memberStatus = this.memberStatusColumn.NOTMEBMER
|
||||
}
|
||||
}
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "marriage", "${@shiro.getPrincipalProperty('marriage')}")
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", resp.data.mobile)
|
||||
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
|
||||
this.$set(this.formData, "id", "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, "education", "${@shiro.getPrincipalProperty('education')}")
|
||||
this.$set(this.formData, "academicDegree", "${@shiro.getPrincipalProperty('academicDegree')}")
|
||||
this.$set(this.formData, "idcard", resp.data.idcard)
|
||||
this.$set(this.formData, "idType", resp.data.idType)
|
||||
this.$set(this.formData, "registeredResidence", "${@shiro.getPrincipalProperty('registeredResidence')}")
|
||||
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
|
||||
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
|
||||
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
|
||||
const {data} = await $.get("/mobile/member/getAllNation");
|
||||
this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
})
|
||||
|
||||
const idTypeRespData = await getDictByCode("idType")
|
||||
console.log(idTypeRespData)
|
||||
this.idTypeColumns = idTypeRespData.map(v => {
|
||||
return v.name
|
||||
})
|
||||
// console.log(idTypeColumns)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,228 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-dropdown-menu__bar {
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.infoPop {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.list-card .van-cell {
|
||||
padding: 3px 16px;
|
||||
}
|
||||
|
||||
.list-card {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
@click-left="pjaxReplace('/mobile/index')"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
safe-area-inset-top
|
||||
title="会员查询"
|
||||
></van-nav-bar>
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
@search="doSearch"
|
||||
@input="doSearch"
|
||||
:show-action="true"
|
||||
maxlength="10"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
shape="round"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange"
|
||||
v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch"
|
||||
v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 112px;">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:immediate-check="false"
|
||||
@load="pageData"
|
||||
v-model="loading">
|
||||
<div class="list-card" v-for="o in tableData">
|
||||
<van-cell-group @click="viewInfo(o.id)" inset>
|
||||
<van-cell :border="false" title="姓名">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span :style="{color:themeColor}" class="van-ellipsis"
|
||||
style="font-size: 16px">{{o.username}}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="工号">{{o.loginname}}</van-cell>
|
||||
<van-cell :border="false" title="性别">{{o.sex}}</van-cell>
|
||||
<van-cell :border="false" title="出生年月">{{o.birthday}}</van-cell>
|
||||
<!-- <van-cell :border="false" title="人员类型">{{o.personType}}</van-cell>-->
|
||||
<van-cell :border="false" title="联系电话">{{o.mobile}}</van-cell>
|
||||
<van-cell :border="false" title="所属工会">{{o.unionname}}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="tableData.length === 0" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<div :style="{color:themeColor}"
|
||||
style="text-align: right;position: fixed;bottom: 20px;right: 20px">
|
||||
<van-button :color="themeColor" hairline size="mini" type="primary">
|
||||
总:{{pageForm.totalCount}}人
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup class="infoPop" v-model="infoShow" position="right">
|
||||
<van-nav-bar @click-left="infoShow = false" fixed left-arrow placeholder safe-area-inset-top
|
||||
title="会员详细信息"></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基本信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.mz }}</van-cell>
|
||||
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
|
||||
<van-cell title="部门">{{ viewData.unitname }}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.zc }}</van-cell>
|
||||
<van-cell title="职务">{{ viewData.zw }}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
个人简历
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell>
|
||||
<template>
|
||||
<div v-html="viewData.grjl" v-if="viewData.grjl!=null"></div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
infoShow: false,
|
||||
pageForm: {
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async unionChange() {
|
||||
await this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
async pageData() {
|
||||
this.loading = true
|
||||
const {data} = await $.get('/mobile/member/getMemberData', this.pageForm)
|
||||
setTimeout(() => {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
if (this.tableData.length === data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.loading = false
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
}, 300)
|
||||
},
|
||||
async viewInfo(id) {
|
||||
const resp = await $.post('/mobile/member/viewInfo', {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.infoShow = true
|
||||
}
|
||||
},
|
||||
async initUnion() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList = await getUnionList(null)
|
||||
} else {
|
||||
this.unionList = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.unionname
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
this.unionList.unshift({text: "全部工会", value: null})
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async initUnit(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true' && this.pageForm.unionId === null) {
|
||||
this.unitList.unshift({text: "全部单位", value: null})
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnit(this.pageForm.unionId)
|
||||
} else {
|
||||
await this.initUnit("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,112 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<member-menber-info ref="info" :id="id" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
name="username"
|
||||
label="审核人员"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.auditPass = pass
|
||||
const resp = await $.post("/platform/member/apply/audit/doAudit", this.formData)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}else{
|
||||
this.$toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,274 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange"
|
||||
:options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.audit" @change="yearChange"
|
||||
:options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="申 请 人:">
|
||||
{{o.username}}({{o.loginname}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间:">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会:">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="申请方式:"> {{changeOrigin[o.applyOrigin]}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
<div style="text-align: right;margin-bottom: 10px;margin-right: 10px;margin-top: -35px;">
|
||||
|
||||
<van-button :color="themeColor" plain round size="small"
|
||||
type="primary"
|
||||
@click.stop="openView(o)" style="width: 60px">
|
||||
{{o.stateId===60?'审核':'查看'}}
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
<van-popup v-model="popupShow" position="right" :style="{ height: '100%', width: '100%'}">
|
||||
|
||||
<van-nav-bar title="校工会审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="yearChange();popupShow=false"></van-nav-bar>
|
||||
<member-menber-change-info ref="info" title="校工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
校工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
<template v-if="info.originUnit">
|
||||
<van-field
|
||||
label="原科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originThreeUnit.name"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="原单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="原工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnion.unionname"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentThreeUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnion.unionname"
|
||||
></van-field>
|
||||
</template>
|
||||
<van-field
|
||||
label="审核人员"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field required
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-change-info>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
popupShow: false,
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '全部', value: 0},
|
||||
{text: '已审核', value: 1},
|
||||
{text: '未审核', value: 2},
|
||||
],
|
||||
info: {
|
||||
originUnion: {},
|
||||
currentUnion: {}
|
||||
},
|
||||
pageForm: {
|
||||
source: 2,
|
||||
year: new Date().getFullYear(),
|
||||
audit: 2,
|
||||
},
|
||||
changeOriginL: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-change-info': httpVueLoader('/components/mobile/member/MobileMemberChangeInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/member/change/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '确定要审核吗?',
|
||||
}).then(async () => {
|
||||
this.formData.currentUnitId = this.info.currentUnitId
|
||||
this.formData.currentUnionId = this.info.currentUnionId
|
||||
this.formData.currentThreeUnitId = this.info.currentThreeUnitId
|
||||
this.formData.auditPass = pass
|
||||
this.submitLoading = true
|
||||
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
|
||||
this.submitLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.yearChange()
|
||||
this.popupShow = false
|
||||
vant.Toast.success(resp.msg);
|
||||
} else {
|
||||
vant.Toast.fail(resp.msg);
|
||||
}
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
openView(o) {
|
||||
this.handle = o.stateId === 60
|
||||
this.formData = {
|
||||
recordId: o.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
this.popupShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getUserInfo(o.userId)
|
||||
this.$refs.info.getAuditInfo(o.id)
|
||||
setTimeout(() => {
|
||||
this.info = this.$refs.info.info
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
async getChangeOrigin() {
|
||||
const changeOrigin = {}
|
||||
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
|
||||
changeOriginOptions.forEach(v => {
|
||||
changeOrigin[v.code] = v.description
|
||||
})
|
||||
return changeOrigin
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.changeOrigin = await this.getChangeOrigin()
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,114 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar fixed left-arrow placeholder title="会员审核"
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
|
||||
<member-menber-info ref="info" :id="id" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核
|
||||
</div>
|
||||
</div>
|
||||
<van-form>
|
||||
|
||||
<van-field
|
||||
label="审核人员"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field required
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-info>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
id: "",
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
this.formData.auditPass = pass
|
||||
const resp = await $.post("/platform/member/apply/audit/doAudit", this.formData)
|
||||
if(resp.code===0){
|
||||
this.$toast.success('审核成功');
|
||||
setTimeout(() => {
|
||||
location.href = '/mobile/member/audit'
|
||||
}, 1000)
|
||||
}else{
|
||||
this.$toast.fail('审核失败')
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const record_id = GetQueryString("record_id")
|
||||
const user_id = GetQueryString("user_id")
|
||||
setTimeout(() => {
|
||||
this.$refs.info.getUserInfo(user_id)
|
||||
this.$refs.info.getAuditInfo(record_id)
|
||||
}, 500)
|
||||
|
||||
this.formData = {
|
||||
recordId: record_id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,274 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="会员审核" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item v-model="pageForm.year" @change="yearChange"
|
||||
:options="yearList"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.audit" @change="yearChange"
|
||||
:options="auditList"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin: 70px auto 0">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
<div v-for="o in tableData" class="list-card" @click="openView(o)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="申 请 人:">
|
||||
{{o.username}}({{o.loginname}})
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间:">{{o.applyTime|date}}</van-cell>
|
||||
<van-cell :border="false" title="所在工会:">{{o.unionname}}</van-cell>
|
||||
<van-cell :border="false" title="申请方式:"> {{changeOrigin[o.applyOrigin]}}
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="审核状态">
|
||||
<span :style="'color:'+o.stateColor">{{ o.stateName }}</span>
|
||||
</van-cell>
|
||||
<div style="text-align: right;margin-bottom: 10px;margin-right: 10px;margin-top: -35px;">
|
||||
|
||||
<van-button :color="themeColor" plain round size="small"
|
||||
type="primary"
|
||||
@click.stop="openView(o)" style="width: 60px">
|
||||
{{o.stateId===50?'审核':'查看'}}
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
</div>
|
||||
<van-popup v-model="popupShow" position="right" :style="{ height: '100%', width: '100%'}">
|
||||
|
||||
<van-nav-bar title="分工会审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="yearChange();popupShow=false"></van-nav-bar>
|
||||
<member-menber-change-info ref="info" title="分工会审核" :handle="handle">
|
||||
<template #handle>
|
||||
|
||||
<div class="van-cell-group__title mt20">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
分工会审核
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<van-form>
|
||||
<template v-if="info.originUnit">
|
||||
<van-field
|
||||
label="原科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originThreeUnit.name"
|
||||
></van-field>
|
||||
<van-field
|
||||
label="原单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="原工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.originUnion.unionname"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新单位"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新科室"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentThreeUnit.name"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
label="新工会"
|
||||
name="username"
|
||||
readonly
|
||||
:value="info.currentUnion.unionname"
|
||||
></van-field>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
label="审核人员"
|
||||
name="username"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"
|
||||
></van-field>
|
||||
|
||||
<van-field v-model="formData.auditTime" label="审核时间" readonly></van-field>
|
||||
|
||||
<van-field required
|
||||
v-model="formData.auditOpinion"
|
||||
rows="1"
|
||||
autosize
|
||||
label="审核意见"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
|
||||
|
||||
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" plain block @click="doAudit(false)">拒 绝
|
||||
</van-button>
|
||||
</van-col>
|
||||
|
||||
<van-col span="12">
|
||||
<van-button :color="themeColor" block @click="doAudit(true)">通 过
|
||||
</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
</van-form>
|
||||
</template>
|
||||
</member-menber-change-info>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
handle: true,
|
||||
popupShow: false,
|
||||
mLoading: false,
|
||||
yearList: [],
|
||||
auditList: [
|
||||
{text: '全部', value: 0},
|
||||
{text: '已审核', value: 1},
|
||||
{text: '未审核', value: 2},
|
||||
],
|
||||
info: {
|
||||
originUnion: {},
|
||||
currentUnion: {}
|
||||
},
|
||||
pageForm: {
|
||||
source: 1,
|
||||
year: new Date().getFullYear(),
|
||||
audit: 2,
|
||||
},
|
||||
changeOriginL: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member-menber-change-info': httpVueLoader('/components/mobile/member/MobileMemberChangeInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
yearChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
$.post('/platform/member/change/audit/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async doAudit(pass) {
|
||||
if (!this.formData.auditOpinion) {
|
||||
this.$toast.fail('请填写审核意见');
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '确定要审核吗?',
|
||||
}).then(async () => {
|
||||
this.formData.auditPass = pass
|
||||
this.submitLoading = true
|
||||
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
|
||||
this.submitLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.yearChange()
|
||||
this.popupShow = false
|
||||
vant.Toast.success(resp.msg);
|
||||
} else {
|
||||
vant.Toast.fail(resp.msg);
|
||||
}
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
openView(o) {
|
||||
this.handle = o.stateId === 50
|
||||
this.formData = {
|
||||
recordId: o.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: null
|
||||
}
|
||||
this.popupShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.info.getUserInfo(o.userId)
|
||||
this.$refs.info.getAuditInfo(o.id)
|
||||
setTimeout(() => {
|
||||
this.info = this.$refs.info.info
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
async getChangeOrigin() {
|
||||
const changeOrigin = {}
|
||||
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
|
||||
changeOriginOptions.forEach(v => {
|
||||
changeOrigin[v.code] = v.description
|
||||
})
|
||||
return changeOrigin
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.changeOrigin = await this.getChangeOrigin()
|
||||
let nowYear = new Date().getFullYear()
|
||||
for (let i = nowYear; i >= nowYear - 9; i--) {
|
||||
this.yearList.push({text: i, value: i})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,273 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="职工互助保障申请" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-form @submit="doSubmit" :submit-method="false">
|
||||
<van-cell inset>
|
||||
<van-field
|
||||
v-model="formData.projectName"
|
||||
label="事项名称"
|
||||
placeholder="事项名称"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请选择事项名称' }]"
|
||||
clearable
|
||||
required
|
||||
clickable
|
||||
@click="projectPicker = true"
|
||||
></van-field>
|
||||
<template v-if="formData.projectId">
|
||||
<div style="display: flex;justify-content: flex-end;margin-top: 10px">
|
||||
<span style="color: #0a84ff;cursor: pointer;" @click="showProjectInfo">查看事项详情</span>
|
||||
</div>
|
||||
</template>
|
||||
<van-popup v-model="projectPicker" position="bottom">
|
||||
<van-picker
|
||||
title="项目名称"
|
||||
show-toolbar
|
||||
:columns="projectColumns"
|
||||
@confirm="(value) => {
|
||||
formData.projectName = value.text;
|
||||
formData.projectId = value.value;
|
||||
projectPicker = false
|
||||
}"
|
||||
@cancel="projectPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.username"
|
||||
label="申请人姓名"
|
||||
readonly
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写申请人姓名' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.loginname"
|
||||
label="申请人工号"
|
||||
readonly
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写申请人工号' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.sex"
|
||||
label="性别"
|
||||
required
|
||||
is-link
|
||||
readonly
|
||||
:rules="[{ required: true, message: '性别' }]"
|
||||
clickable
|
||||
@click="sexPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男', '女']"
|
||||
@confirm="(value, index) => {formData.sex = value; sexPicker = false}"
|
||||
@cancel="sexPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.unitName"
|
||||
label="所在单位"
|
||||
placeholder="所在单位"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '所在单位' }]"
|
||||
clearable
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.unionName"
|
||||
label="所在分工会"
|
||||
placeholder="所在分工会"
|
||||
readonly
|
||||
:rules="[{ required: true, message: '所在分工会' }]"
|
||||
clearable
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="手机号码"
|
||||
placeholder="请填写手机号码"
|
||||
maxlength="20"
|
||||
clearable
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写手机号码' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="身份证号"
|
||||
placeholder="请填写身份证号"
|
||||
maxlength="22"
|
||||
clearable
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写身份证号' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.insuranceUserState"
|
||||
label="在职状态"
|
||||
required
|
||||
is-link
|
||||
readonly
|
||||
:rules="[{ required: true, message: '在职状态' }]"
|
||||
clickable
|
||||
@click="insuranceUserStatePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="insuranceUserStatePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="insuranceUserStateColumns"
|
||||
@confirm="(value, index) => {formData.insuranceUserState = value.text; insuranceUserStatePicker = false}"
|
||||
@cancel="insuranceUserStatePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<template v-if="formData.insuranceUserState">
|
||||
<van-field
|
||||
v-model="formData.noDutyTime"
|
||||
label="不在岗时间"
|
||||
is-link
|
||||
@click="showDatePicker = true"
|
||||
required
|
||||
:rules="[{ required: true, message: '请填写不在岗时间' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDatePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="new Date(1900, 0, 1)"
|
||||
:max-date="new Date()"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
<van-field
|
||||
v-model="formData.medicalInsuranceState"
|
||||
label="医保状态"
|
||||
required
|
||||
is-link
|
||||
readonly
|
||||
:rules="[{ required: true, message: '医保状态' }]"
|
||||
clickable
|
||||
@click="medicalInsuranceStatePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="medicalInsuranceStatePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="medicalInsuranceStateColumns"
|
||||
@confirm="(value, index) => {formData.medicalInsuranceState = value.text;medicalInsuranceStatePicker = false}"
|
||||
@cancel="medicalInsuranceStatePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="签字" required style="flex-flow: column">
|
||||
<template #input>
|
||||
<mobile-sign ref="signature" :my_sign.sync="formData.sign"></mobile-sign>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-button round block type="info" native-type="submit">提交</van-button>
|
||||
</van-cell>
|
||||
</van-form>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="事项详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div>
|
||||
<van-cell-group>
|
||||
<van-cell title="年度">{{ projectData.year }}</van-cell>
|
||||
<van-cell title="事项名称">{{ projectData.projectName }}</van-cell>
|
||||
<van-cell title="事项填报时间">{{ projectData.startTime + '至' + projectData.endTime }}</van-cell>
|
||||
<van-cell title="详细信息">
|
||||
<div class="text-left" v-html="projectData.content"></div>
|
||||
</van-cell>
|
||||
<van-cell title="附件">
|
||||
<vant-file-upload :files.sync="projectData.files" view :del="false"
|
||||
v-if="projectData.files && projectData.files.length"></vant-file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
projectList: [],
|
||||
projectData: [],
|
||||
formData: {},
|
||||
|
||||
projectPicker: false,
|
||||
projectColumns: [],
|
||||
sexPicker: false,
|
||||
insuranceUserStatePicker: false,
|
||||
insuranceUserStateColumns: [],
|
||||
medicalInsuranceStatePicker: false,
|
||||
medicalInsuranceStateColumns: [],
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showProjectInfo() {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.findProjectInfoById()
|
||||
})
|
||||
},
|
||||
doSubmit() {
|
||||
$.post('/platform/zhejiang/mutualInsurance/apply/doAddOrUpdate', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
pjaxReplace('/platform/zhejiang/mutualInsurance/mine/h5')
|
||||
} else {
|
||||
this.$toast.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
findOne() {
|
||||
$.post('/platform/zhejiang/mutualInsurance/apply/findOne', {id: this.id})
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
async listProject(){
|
||||
const resp = await $.post('/platform/zhejiang/mutualInsurance/project/listProject', {year: this.pageForm.year})
|
||||
if (resp.code === 0) {
|
||||
this.projectList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.formData, 'projectId', resp.data[0].id)
|
||||
this.$set(this.formData, 'projectName', resp.data[0].projectName)
|
||||
this.projectColumns = resp.data.map(item => {
|
||||
return {
|
||||
text: item.projectName,
|
||||
value: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
findProjectInfoById() {
|
||||
$.post('/platform/zhejiang/mutualInsurance/project/findProjectInfoById', {id: this.formData.projectId})
|
||||
.then(resp => {
|
||||
if (resp.code === 0){
|
||||
this.projectData = resp.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listProject()
|
||||
this.findOne()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,332 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.title_color {
|
||||
color: #000000;
|
||||
}
|
||||
.content_color {
|
||||
color: grey;
|
||||
}
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__right-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 0!important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="分工会审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{item.userName + '(' + item.loginName + ')'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span class="title_color">性 别:</span>
|
||||
<span class="content_color">{{item.sex}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">手机号:</span>
|
||||
<span class="content_color">{{item.mobile}}</span>
|
||||
</van-col>
|
||||
<van-col span="24"><span class="title_color">所属工会:</span>
|
||||
<span class="content_color">{{item.unionName}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">工作单位:</span>
|
||||
<span class="content_color">{{item.unitName}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">在职状态:</span>
|
||||
<span class="content_color">{{item.insuranceUserState}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">医保状态:</span>
|
||||
<span class="content_color">{{item.medicalInsuranceState}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span class="title_color">当前状态:</span>
|
||||
<span class="content_color">{{item.stateName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<template v-if="item.stateId == 10010">
|
||||
<van-button size="small" type="primary"
|
||||
@click="doApproval(item, true)"
|
||||
style="margin-right: 4px">通过
|
||||
</van-button>
|
||||
<van-button size="small" type="danger"
|
||||
@click="doApproval(item, false)"
|
||||
style="margin-right: 4px">拒绝
|
||||
</van-button>
|
||||
</template>
|
||||
<van-button size="small" type="danger"
|
||||
v-if="[10015,10020].includes(item.stateId)"
|
||||
@click="doRevoke(item)"
|
||||
style="margin-right: 4px">撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="详细申请信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<info ref="infoRef"></info>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data(){
|
||||
return{
|
||||
yearList: [],
|
||||
unitList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: '0'},
|
||||
{text: '已审核', value: '1'}
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false
|
||||
},
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
infoShow: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
info
|
||||
},
|
||||
methods:{
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
doRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回此条申请吗?'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/zhejiang/mutualInsurance/branchunion/audit/doRevoke', {
|
||||
data: JSON.stringify([row.id])
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doApproval(row, flag) {
|
||||
// 您确定要审核 通过/拒绝 吗?
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要' + (flag ? '通过' : '拒绝') + '此条申请吗?'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/zhejiang/mutualInsurance/branchunion/audit/doApproval', {
|
||||
data: JSON.stringify([row.id]),
|
||||
auditState: flag
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/zhejiang/mutualInsurance/branchunion/audit/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
} else {
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.flushUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,45 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/
|
||||
`
|
||||
<div>
|
||||
<van-cell-group>
|
||||
<van-cell title="年度">{{ viewData.year }}</van-cell>
|
||||
<van-cell title="事项名称">{{ viewData.projectName }}</van-cell>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="手机号">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="身份证件号">{{ viewData.idCard }}</van-cell>
|
||||
<van-cell title="申请时间">{{ viewData.applyTime }}</van-cell>
|
||||
<van-cell title="医保状态">{{ viewData.medicalInsuranceState }}</van-cell>
|
||||
<van-cell title="在职状态">{{ viewData.insuranceUserState }}</van-cell>
|
||||
<template v-if="viewData.insuranceUserState == '不在岗'">
|
||||
<van-cell title="不在岗时间">{{ viewData.noDutyTime }}</van-cell>
|
||||
</template>
|
||||
<van-cell title="所属单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
|
||||
<van-cell title="当前状态">{{ viewData.stateName }}</van-cell>
|
||||
<van-cell title="签字">
|
||||
<van-image width="200" height="100" :src="CREATE_PREVIEW_URL(viewData.signature)"
|
||||
v-if="viewData.signature"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
$.get('/platform/zhejiang/mutualInsurance/apply/findOne', {id})
|
||||
.then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,347 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.title_color {
|
||||
color: #000000;
|
||||
}
|
||||
.content_color {
|
||||
color: grey;
|
||||
}
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: 8px;
|
||||
height: 26px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.van-cell__right-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.van-sidebar-item {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
width: 90% !important;
|
||||
}
|
||||
|
||||
.join {
|
||||
background-color: #0e78c5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.info_tab .van-doc-card > div:first-child {
|
||||
border: 2px #0e78c5 solid;
|
||||
width: 26px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.process-title {
|
||||
font-size: 15px;
|
||||
color: #1867b0;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 10px 0!important;
|
||||
padding:10px;
|
||||
position: relative;
|
||||
line-height: 1.1;
|
||||
font-family: inherit;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="校工会审核" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unionList" @change="doSearch" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.isAudit"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
|
||||
<div v-for="item in tableData" :key="item.id" class="van-doc-card">
|
||||
<div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{item.userName + '(' + item.loginName + ')'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 4px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span class="title_color">性 别:</span>
|
||||
<span class="content_color">{{item.sex}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">手机号:</span>
|
||||
<span class="content_color">{{item.mobile}}</span>
|
||||
</van-col>
|
||||
<van-col span="24"><span class="title_color">所属工会:</span>
|
||||
<span class="content_color">{{item.unionName}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">工作单位:</span>
|
||||
<span class="content_color">{{item.unitName}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">在职状态:</span>
|
||||
<span class="content_color">{{item.insuranceUserState}}</span>
|
||||
</van-col>
|
||||
<van-col span="24">
|
||||
<span class="title_color">医保状态:</span>
|
||||
<span class="content_color">{{item.medicalInsuranceState}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<span class="title_color">当前状态:</span>
|
||||
<span class="content_color">{{item.stateName}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<van-button size="small" @click="openView(item)"
|
||||
type="info" style="margin-right: 4px">查看
|
||||
</van-button>
|
||||
<template v-if="item.stateId == 10020">
|
||||
<van-button size="small" type="primary"
|
||||
@click="doApproval(item, true)"
|
||||
style="margin-right: 4px">通过
|
||||
</van-button>
|
||||
<van-button size="small" type="danger"
|
||||
@click="doApproval(item, false)"
|
||||
style="margin-right: 4px">拒绝
|
||||
</van-button>
|
||||
</template>
|
||||
<van-button size="small" type="danger"
|
||||
v-if="[10025,10030].includes(item.stateId)"
|
||||
@click="doRevoke(item)"
|
||||
style="margin-right: 4px">撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow
|
||||
title="详细申请信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<info ref="infoRef"></info>
|
||||
</van-popup>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data(){
|
||||
return{
|
||||
yearList: [],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
auditList: [
|
||||
{text: '未审核', value: '0'},
|
||||
{text: '已审核', value: '1'}
|
||||
],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear(),
|
||||
isAudit: false
|
||||
},
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
infoShow: false,
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
components: {
|
||||
info
|
||||
},
|
||||
openView(item) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(item.id)
|
||||
})
|
||||
},
|
||||
doRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回此条申请吗?'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/zhejiang/mutualInsurance/schoolunion/audit/doRevoke', {
|
||||
data: JSON.stringify([row.id])
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doApproval(row, flag) {
|
||||
// 您确定要审核 通过/拒绝 吗?
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要' + (flag ? '通过' : '拒绝') + '此条申请吗?'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/zhejiang/mutualInsurance/schoolunion/audit/doApproval', {
|
||||
data: JSON.stringify([row.id]),
|
||||
auditState: flag
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.finished = false
|
||||
this.pageData()
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
$.post('/platform/zhejiang/mutualInsurance/schoolunion/audit/pageData', this.pageForm)
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
this.tableLoading = false
|
||||
} else {
|
||||
this.$toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async initUnion(unionId) {
|
||||
this.unionList = await getUnions(unionId)
|
||||
this.unionList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits(unionId) {
|
||||
this.unitList = await getUnits(unionId)
|
||||
this.unitList.forEach(v => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
} else {
|
||||
await this.initUnion("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
await this.flushUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,184 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
|
||||
#app {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.icon_text {
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-image {
|
||||
max-height: 300px !important;
|
||||
}
|
||||
|
||||
.not_open {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 38px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 36px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.number_text {
|
||||
font-size: 36px;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.van-empty__description {
|
||||
font-size: 18px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.van-info--dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<div v-if="active === 0" style="background-color: #f6f7f9; min-height: 100vh">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o" color="#1989fa" background="#ecf9ff"
|
||||
text="温馨提示:只显示当前年份的待办事项"
|
||||
></van-notice-bar>
|
||||
<div @click="toUrl(o)" class="van-doc-card" v-for="o in needItems">
|
||||
<div class="title">{{ o.title }}</div>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<div style="color: grey; font-size: 15px">{{ o.label }}</div>
|
||||
</div>
|
||||
<div class="number_text">
|
||||
<span>{{ o.number }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-empty
|
||||
v-if="needItems.length === 0"
|
||||
class="custom-image"
|
||||
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
|
||||
description="暂无待办"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<div v-if="active === 1">
|
||||
<!--轮播图-->
|
||||
<van-swipe class="my-swipe" :autoplay="2000" indicator-color="white">
|
||||
<van-swipe-item v-for="item in photoArray">
|
||||
<van-image width="100%" :height="$(document).height() * 0.26"
|
||||
:src="item.src"></van-image>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<!--宫格-->
|
||||
<van-grid :column-num="3" :border="false">
|
||||
|
||||
<van-grid-item v-for="item in gridArray" :class="item.isOpen ? '' : 'not_open'"
|
||||
:url="item.isOpen ? '/mobile/index/toHome?type=' + item.text : ''">
|
||||
<van-image width="48" height="48" :src="item.src"></van-image>
|
||||
<span class="icon_text">{{item.text}}</span>
|
||||
</van-grid-item>
|
||||
|
||||
<van-grid-item>
|
||||
<image src="/assets/mobile/svg/qxbd.svg" @click="loginOut" width="48" height="48"></image>
|
||||
<span class="icon_text">解除绑定</span>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</div>
|
||||
|
||||
<van-tabbar v-model="active" @change="tabbrChange">
|
||||
<van-tabbar-item :dot="needCount" icon="envelop-o">待办</van-tabbar-item>
|
||||
<van-tabbar-item icon="home-o">工作台</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
needCount: 0,
|
||||
needItems: [],
|
||||
photoArray: [
|
||||
{src: '/assets/mobile/img/home/home1.png'},
|
||||
{src: '/assets/mobile/img/home/home2.png'},
|
||||
{src: '/assets/mobile/img/home/home3.png'},
|
||||
],
|
||||
gridArray: [
|
||||
// {src: '/assets/mobile/img/home/8活动报名.jpg', text: '活动报名', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/7会员申请.jpg', text: '会员管理', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/9我的福利.jpg', text: '我的福利', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/1民主管理.jpg', text: '民主管理', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/6文体活动.jpg', text: '文体活动', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/3职工权益.jpg', text: '职工权益', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/2日常办公.jpg', text: '日常办公', isOpen: true,},
|
||||
// {src: '/assets/mobile/img/home/4教育培训.jpg', text: '教育培训', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/5校园文化.jpg', text: '校园文化', isOpen: true,},
|
||||
{src: '/assets/mobile/img/home/11女工计生.png', text: '女工计生', isOpen: true,},
|
||||
// {src: '/assets/mobile/img/home/10心理咨询.jpg', text: '法律援助', isOpen: true,},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async loginOut() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消绑定吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
window.location.href = "/platform/login/logout"
|
||||
}
|
||||
},
|
||||
tabbrChange(o) {
|
||||
this.needItems = []
|
||||
this.initData()
|
||||
},
|
||||
toUrl(o) {
|
||||
location.href = o.url
|
||||
},
|
||||
/**
|
||||
* 入学登记待办
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getRxdjAgenda() {
|
||||
const {data, code} = await $.get("/platform/rxdj/agent/getAgenda")
|
||||
if (code === 0) {
|
||||
this.needItems = this.needItems.concat(data.filter(v => v.number > 0))
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getRxdjAgenda()
|
||||
this.needCount = this.needItems.length
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
||||
/>
|
||||
<van-number-keyboard safe-area-inset-bottom/>
|
||||
<title></title>
|
||||
<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/vant/2.12.25/index.min.css"/>-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/vant.css">
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vant/vant.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/basic.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/pjax/jquery.pjax.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/jSignature.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/jSignature/flashcanvas.js"></script>
|
||||
<script src="${base!}/assets/platform/js/pinyin.js"></script>
|
||||
<script src="${base!}/assets/platform/js/viewer.min.js"></script>
|
||||
<script src="${base!}/assets/platform/js/jquery-viewer.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/module/mixins/styleMixin.js"></script>
|
||||
<script src="${base!}/assets/platform/js/v.js"></script>
|
||||
<script src="${base!}/assets/platform/module/proposal/api.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mobileMixins.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mProposal.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCondolence.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/mCommon.js"></script>
|
||||
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/moment/moment.min.js"></script>
|
||||
<script src="${base!}/assets/platform/module/condolence/common.js"></script>
|
||||
<script src="${base!}/assets/platform/module/difficulty/common.js"></script>
|
||||
<script src="${base!}/assets/platform/module/activity/initMap.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="${base!}/assets/platform/js/scannerQrCodeJs.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=2.0&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
||||
|
||||
<!--字典混入-->
|
||||
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
<script>
|
||||
Vue.component('mobile-sign', httpVueLoader('/components/sign/mobileSign.vue'))
|
||||
</script>
|
||||
|
||||
<script>
|
||||
window.sessionStorage.setItem("user", JSON.stringify(${json(@shiro.getPrincipal())}))
|
||||
|
||||
;(function initPjax() {
|
||||
if ($.support.pjax) {
|
||||
$(document).on("pjax:send", function () {
|
||||
document.querySelectorAll('style[id^="style-"]').forEach((style) => {
|
||||
style.parentNode.removeChild(style)
|
||||
})
|
||||
})
|
||||
$(document).on("pjax:complete", function () {
|
||||
|
||||
})
|
||||
}
|
||||
})()
|
||||
|
||||
function pjaxReplace(url){
|
||||
$.pjax({
|
||||
url: url,
|
||||
container: "#container",
|
||||
maxCacheLength: 0,
|
||||
push: false,
|
||||
replace: true,
|
||||
fragment: "#container",
|
||||
timeout: 8000,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
const APP_DOMAIN = "${AppDomain!}"
|
||||
const FILE_DOMAIN = "${AppFileDomain!}"
|
||||
</script>
|
||||
|
||||
<div id="container">
|
||||
${layoutContent}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,206 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.chart-card {
|
||||
background-color: #FFFFFF;
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="提案分析"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
></van-nav-bar>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionList"
|
||||
@change="getData()"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10">
|
||||
提案类型
|
||||
</div>
|
||||
<div id="pieDiv"></div>
|
||||
</div>
|
||||
|
||||
<div class="chart-card">
|
||||
<div class="van-sidebar-item van-sidebar-item--select ml15 p10" style="display: flex;align-items: center;justify-content: space-between">
|
||||
<div>
|
||||
<span>【{{clickTypeName}}】分析</span>
|
||||
<span style="font-size: 10px;color: orange">点击饼图查看详细信息</span>
|
||||
</div>
|
||||
<van-button size="mini" plain type="info" @click="renderColumnData(null)">全部类型</van-button>
|
||||
</div>
|
||||
<div id="columnDiv"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
sessionId: ''
|
||||
},
|
||||
sessionList: [],
|
||||
clickTypeName: '全部类型',
|
||||
reqData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
this.mLoading = true
|
||||
const {data} = await $.get('/mobile/proposal/analysis/getData', this.pageForm)
|
||||
this.reqData = data
|
||||
const pieData = data.map(v => {
|
||||
const o = {}
|
||||
o.code = v.typeCode
|
||||
o.name = v.typeName
|
||||
o.value = v.totalCount
|
||||
return o
|
||||
})
|
||||
|
||||
this.renderPieData(pieData)
|
||||
this.renderColumnData(null)
|
||||
},
|
||||
renderPieData(data) {
|
||||
const myPie = echarts.init(document.getElementById('pieDiv'), null, {
|
||||
height: 580
|
||||
})
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '提案类型',
|
||||
type: 'pie',
|
||||
radius: ['35%', '55%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data
|
||||
}
|
||||
]
|
||||
}
|
||||
myPie.setOption(option)
|
||||
window.onresize = function () {
|
||||
myPie.resize();
|
||||
};
|
||||
|
||||
myPie.on('click', (params) => {
|
||||
this.renderColumnData(params.data)
|
||||
console.log(params)
|
||||
});
|
||||
},
|
||||
renderColumnData(params) {
|
||||
const data = []
|
||||
if (params == null) {
|
||||
this.clickTypeName = '全部类型'
|
||||
let laCount = 0, jyCount = 0, caCount = 0, myCount = 0, ybCount = 0, bmyCount = 0;
|
||||
data.push(this.reqData.reduce((laCount, item) => laCount + item.laCount, 0))
|
||||
data.push(this.reqData.reduce((jyCount, item) => jyCount + item.jyCount, 0))
|
||||
data.push(this.reqData.reduce((caCount, item) => caCount + item.caCount, 0))
|
||||
data.push(this.reqData.reduce((myCount, item) => myCount + item.myCount, 0))
|
||||
data.push(this.reqData.reduce((ybCount, item) => ybCount + item.ybCount, 0))
|
||||
data.push(this.reqData.reduce((bmyCount, item) => bmyCount + item.bmyCount, 0))
|
||||
console.log(data)
|
||||
} else {
|
||||
const {code, name} = params
|
||||
this.clickTypeName = name
|
||||
const clickTypeData = this.reqData.find(v => v.typeCode === code)
|
||||
data.push(clickTypeData.laCount)
|
||||
data.push(clickTypeData.jyCount)
|
||||
data.push(clickTypeData.caCount)
|
||||
data.push(clickTypeData.myCount)
|
||||
data.push(clickTypeData.ybCount)
|
||||
data.push(clickTypeData.bmyCount)
|
||||
}
|
||||
|
||||
const myColumn = echarts.init(document.getElementById('columnDiv'), null, {
|
||||
height: 350
|
||||
});
|
||||
let option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['立案数', '作为建议、意见', '不予立案', '评分满意', '评分一般', '评分不满意'],
|
||||
axisLabel: {//坐标轴刻度标签的相关设置。
|
||||
interval: 0,
|
||||
rotate: "45"
|
||||
}
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data,
|
||||
type: 'bar',
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(180, 180, 180, 0.2)'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
myColumn.setOption(option);
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
this.sessionList = await mProposal.getAllSession()
|
||||
if (this.sessionList && this.sessionList.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionList[0].value
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,82 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-cell-group__title {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-clock>
|
||||
<van-nav-bar
|
||||
title="代表详细信息"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.back()"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
基本信息
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.mz }}</van-cell>
|
||||
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
|
||||
<van-cell title="部门">{{ viewData.dwname }}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.zc }}</van-cell>
|
||||
<van-cell title="职务">{{ viewData.zw }}</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="van-cell-group__title">
|
||||
<div class="van-sidebar-item van-sidebar-item--select">
|
||||
个人简历
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell>
|
||||
<template>
|
||||
<div v-if="viewData.grjl!=null" v-html="viewData.grjl"></div>
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getData(id) {
|
||||
const {data} = await $.get('/platform/jdh/Common/findDbxx', {id})
|
||||
console.log(data)
|
||||
this.viewData = data
|
||||
console.log(this.viewData)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id !== '') {
|
||||
this.getData(id)
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user