Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
This commit is contained in:
@@ -36,6 +36,10 @@ module.exports = {
|
||||
const doc = parser.parseFromString(this.content, 'text/html');
|
||||
const link = doc.querySelector('a');
|
||||
const href = link.getAttribute('href');
|
||||
if(!href) {
|
||||
this.pdf = false
|
||||
return
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.pdfObj = new Pdfh5('#pdf-container', {
|
||||
pdfurl: href,
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/index_custom.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/element-ui/lib/theme-chalk/override.css" />
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/fullcalendar/fullcalendar.css">
|
||||
|
||||
<!-- import common css -->
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/css/common.css" />
|
||||
|
||||
@@ -84,6 +86,7 @@
|
||||
<script src="${base!}/assets/platform/js/mixin/flowMixins.js"></script>
|
||||
<script src="${base!}/assets/platform/js/tool/businessTool.js"></script>
|
||||
<script src="${base!}/assets/platform/js/util/autoShowError.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/fullcalendar/fullcalendar.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
window._AMapSecurityConfig = {
|
||||
|
||||
+65
-73
@@ -1,5 +1,5 @@
|
||||
<!--#include('signForm.js'){}#-->
|
||||
const info = {
|
||||
const courseList = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
@@ -15,12 +15,12 @@ const info = {
|
||||
<el-col class="query-title hidden-xs-only">类  型:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-select
|
||||
v-model="pageForm.courseTypeId"
|
||||
placeholder="请选择类型"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@change="doSearch"
|
||||
v-model="pageForm.courseTypeId"
|
||||
placeholder="请选择类型"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@change="doSearch"
|
||||
>
|
||||
<el-option v-for="item in courseTypeList" :key="item.id" :label="item.typeName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
@@ -30,12 +30,12 @@ const info = {
|
||||
<el-col class="query-title hidden-xs-only">分类标识:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-tag
|
||||
:effect="pageForm.assortTypes.includes(item) ? 'dark' : 'plain'"
|
||||
:key="item"
|
||||
:type="item"
|
||||
@click="tagClick('assortTypes', item)"
|
||||
style="margin-right: 10px; cursor: pointer"
|
||||
v-for="item in assortList"
|
||||
:effect="pageForm.assortTypes.includes(item) ? 'dark' : 'plain'"
|
||||
:key="item"
|
||||
:type="item"
|
||||
@click="tagClick('assortTypes', item)"
|
||||
style="margin-right: 10px; cursor: pointer"
|
||||
v-for="item in assortList"
|
||||
>
|
||||
{{ item }}
|
||||
</el-tag>
|
||||
@@ -44,15 +44,15 @@ const info = {
|
||||
<el-table :data="tableData" class="mt10">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop=='courseLocationCoordinates'">
|
||||
<el-button style="padding: 0" @click="openViewMap(row.courseLocationCoordinates)" type="text">
|
||||
@@ -67,6 +67,12 @@ const info = {
|
||||
<template v-slot="{row}" v-else-if="column.prop=='applyNum'">
|
||||
<span v-html="calcSignUpCount(row)"></span>
|
||||
</template>
|
||||
|
||||
<template v-slot="{row}" v-else-if="column.prop=='introduce'">
|
||||
<span v-if="!row.introduce?.trim()">暂无</span>
|
||||
<el-button v-else style="padding: 0" @click="onPreview(row.introduce)" type="text">点击查看</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="{row}">
|
||||
@@ -102,7 +108,14 @@ const info = {
|
||||
<el-button @click="viewMapDialog = false">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="infoVisible" title="详细信息" append-to-body>
|
||||
<div v-html="introduce"></div>
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="infoVisible = false">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<sign-form ref="signFormRef" @refresh="doSearch"></sign-form>
|
||||
</div>
|
||||
`,
|
||||
@@ -123,18 +136,41 @@ const info = {
|
||||
tableColumns: [
|
||||
{ prop: "courseName", label: "名称" },
|
||||
{ prop: "typeName", label: "类型", width: 130},
|
||||
{ prop: "campus", label: "校区", width: 160 },
|
||||
{ prop: "courseLocationCoordinates", label: "地点", width: 200 },
|
||||
{ prop: "courseInstructor", label: "联系人", width: 100 },
|
||||
{ prop: "courseTime", label: "时间", width: 200 },
|
||||
{ prop: "courseTime", label: "时间", width: 160 },
|
||||
{ prop: "introduce", label: "详细信息", width: 100 },
|
||||
{ prop: "applyNum", label: "已报名人数", width: 200 }
|
||||
],
|
||||
activity: {},
|
||||
courseTypeList: [],
|
||||
|
||||
activityType: '',
|
||||
pdf: false,
|
||||
infoVisible: false,
|
||||
introduce: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onPreview(introduce) {
|
||||
try {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(introduce, 'text/html');
|
||||
const link = doc.querySelector('a');
|
||||
const href = link.getAttribute('href');
|
||||
|
||||
const id = href.substring(href.indexOf("=") + 1)
|
||||
const res = await this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify([id]) })
|
||||
|
||||
this.pdf = true
|
||||
window.open("/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent(res.data[0].downloadPath), res.data[0].name)
|
||||
} catch (e) {
|
||||
this.introduce = introduce
|
||||
this.pdf = false
|
||||
this.infoVisible = true
|
||||
}
|
||||
},
|
||||
tagClick(key, val) {
|
||||
let idx = this.pageForm[key].indexOf(val)
|
||||
if (idx !== -1) {
|
||||
@@ -153,7 +189,7 @@ const info = {
|
||||
},
|
||||
onSign(row) {
|
||||
const courseType = this.courseTypeList.find((v) => v.id === row.courseType)
|
||||
this.$axios.post("/platform/mobile/familyActivity/validateSignUp", {courseId: row.id})
|
||||
this.$axios.post("/platform/family/apply/validateSignUp", {courseId: row.id})
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
this.$alert(res.msg, "提示", {
|
||||
@@ -168,7 +204,7 @@ const info = {
|
||||
type: "warning"
|
||||
})
|
||||
}
|
||||
this.$refs.signFormRef.onOpen(row, courseType)
|
||||
this.$refs.signFormRef.onOpen(row, courseType, this.activity)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -178,7 +214,7 @@ const info = {
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/mobile/familyActivity/cancelSignUp", {
|
||||
const resp = await this.$axios.post("/platform/family/apply/cancelSignUp", {
|
||||
activityId: row.activityId,
|
||||
courseId: row.id
|
||||
})
|
||||
@@ -191,7 +227,7 @@ const info = {
|
||||
})
|
||||
},
|
||||
async getCourseTypeList() {
|
||||
const resp = await this.$axios.post("/platform/family/manage/type/getAllType")
|
||||
const resp = await this.$axios.post("/platform/family/type/getAllType")
|
||||
if (resp.code === 0) {
|
||||
this.courseTypeList = resp.data
|
||||
}
|
||||
@@ -256,50 +292,6 @@ const info = {
|
||||
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.glow-box {
|
||||
min-height: calc(100vh - 56px - 40px - 50px - 80px);
|
||||
max-height: calc(100vh - 56px - 40px - 50px - 80px);
|
||||
overflow-y: auto;
|
||||
background: #F0F2F5;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
}
|
||||
.title {
|
||||
background: white;
|
||||
height: 20px;
|
||||
}
|
||||
.query-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 0;
|
||||
}
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
.query-row > .query-title {
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.query-row > .query-content {
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.query-row > .query-content > .el-tag {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
@media screen and (max-width: 992px) {
|
||||
.query-row:nth-child(4) .query-content .el-col:not(:last-child) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.query-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
`
|
||||
}
|
||||
@@ -3,33 +3,81 @@ layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.info-dialog .el-dialog__body {
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.glow-box {
|
||||
min-height: calc(100vh - 56px - 40px - 50px - 80px);
|
||||
max-height: calc(100vh - 56px - 40px - 50px - 80px);
|
||||
overflow-y: auto;
|
||||
background: #F0F2F5;
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
}
|
||||
.title {
|
||||
background: white;
|
||||
height: 20px;
|
||||
}
|
||||
.query-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 0;
|
||||
}
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
.query-row > .query-title {
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.query-row > .query-content {
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.query-row > .query-content > .el-tag {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
@media screen and (max-width: 992px) {
|
||||
.query-row:nth-child(4) .query-content .el-col:not(:last-child) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.query-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
@change="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动状态:">
|
||||
<el-radio-group v-model="pageForm.activityType" @change="doSearch">
|
||||
<el-radio-button :label="1">全部</el-radio-button>
|
||||
<el-radio-button :label="2">报名中</el-radio-button>
|
||||
<el-radio-button :label="3">已结束</el-radio-button>
|
||||
</el-radio-group>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
@change="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动状态:">
|
||||
<el-select v-model="pageForm.activityType" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择活动状态" filterable>
|
||||
<el-option :value="1" label="全部"></el-option>
|
||||
<el-option :value="4" label="即将开始"></el-option>
|
||||
<el-option :value="2" label="报名中"></el-option>
|
||||
<el-option :value="3" label="已结束"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
@@ -58,8 +106,9 @@ layout("/layouts/platform.html"){
|
||||
<span>{{$moment(row.activityEndTime).format('MM/DD HH:mm')}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-table-column label="操作" width="300">
|
||||
<template v-slot="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看介绍</el-button>
|
||||
<el-button @click="onOpen(row)" size="mini" type="primary">去报名</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -68,24 +117,50 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
<course-list ref="courseListRef"></course-list>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="详细信息" :visible.sync="infoVisible" width="60%" class="info-dialog">
|
||||
|
||||
<activity-info ref="infoRef"></activity-info>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-statistic
|
||||
v-if="time < 0"
|
||||
format="DD 天 HH 时 mm 分钟 ss 秒"
|
||||
:value="new Date(infoRow.activitySignUpStartTime)"
|
||||
time-indices
|
||||
title="距离开始:"
|
||||
@finish="time = 0"
|
||||
>
|
||||
</el-statistic>
|
||||
<template v-else>
|
||||
<el-button @click="infoVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
|
||||
去报名
|
||||
</el-button>
|
||||
</template>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('info.js'){}#-->
|
||||
<!--#include('courseList.js'){}#-->
|
||||
<!--#include('../manage/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": info,
|
||||
"course-list": courseList,
|
||||
"activity-info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
activityType: "2"
|
||||
activityType: 4
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 600},
|
||||
@@ -93,16 +168,32 @@ layout("/layouts/platform.html"){
|
||||
{ label: "报名时间", prop: "activitySignUpStartTime"},
|
||||
{ label: "活动时间", prop: "activityStartTime"},
|
||||
],
|
||||
time: 0,
|
||||
infoRow: {},
|
||||
infoVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.infoRow = row
|
||||
this.time = this.$moment().diff(this.$moment(row.activitySignUpStartTime), 'milliseconds')
|
||||
this.infoVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.initData(row.id)
|
||||
})
|
||||
},
|
||||
onOpen(row) {
|
||||
if(this.$moment().isBefore(this.$moment(row.activitySignUpStartTime))) {
|
||||
this.onView(row)
|
||||
return
|
||||
}
|
||||
this.infoVisible = false
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.$refs.courseListRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post("/platform/family/manage/apply/activityData", this.pageForm).then((res) => {
|
||||
this.$axios.post("/platform/family/apply/activityPageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
|
||||
@@ -61,7 +61,7 @@ const signForm = {
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>家属信息</div>
|
||||
<div>
|
||||
<el-button type="primary" size="mini" @click="delFamily">
|
||||
<el-button type="danger" size="mini" @click="delFamily">
|
||||
删除家属
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" @click="addFamily">
|
||||
@@ -76,28 +76,28 @@ const signForm = {
|
||||
:name="index + ''"
|
||||
:label="'家属' + (index + 1)"
|
||||
:key="index">
|
||||
<el-row>
|
||||
<el-row class="mt20">
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
v-for="(column, index) in item"
|
||||
:label="column.columnName"
|
||||
:key="column.columnCode"
|
||||
:rules="{ required: column.isRequired,
|
||||
v-for="(column, index) in item"
|
||||
:label="column.columnName"
|
||||
:key="column.columnCode"
|
||||
:rules="{ required: column.isRequired,
|
||||
message: (['SELECT', 'FILE'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName,
|
||||
trigger: 'blur'}"
|
||||
>
|
||||
<!--文本框-->
|
||||
<template
|
||||
v-if="!['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
v-if="!['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
<el-input
|
||||
v-model="column.columnValue"
|
||||
:placeholder="'请填写' + column.columnName"
|
||||
:type="['INT'].includes(column.columnType) ? 'number' : ''"
|
||||
v-model="column.columnValue"
|
||||
:placeholder="'请填写' + column.columnName"
|
||||
:type="['INT'].includes(column.columnType) ? 'number' : ''"
|
||||
></el-input>
|
||||
</template>
|
||||
<!--选择框-->
|
||||
<template
|
||||
v-else-if="['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
v-else-if="['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
<el-select v-model="column.columnValue"
|
||||
:placeholder="'请选择' + column.columnName"
|
||||
style="width: 100%">
|
||||
@@ -108,11 +108,11 @@ const signForm = {
|
||||
<!--时间框-->
|
||||
<template v-else-if="['DATE', 'DATETIME'].includes(column.columnType)">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="column.columnValue"
|
||||
:type="column.columnType === 'DATE' ? 'date' : 'datetime'"
|
||||
:placeholder="'请选择' + column.columnName"
|
||||
:value-format="column.columnType === 'DATE' ? 'yyyy-MM-dd' : 'yyyy-MM-dd HH:mm:ss'"
|
||||
style="width: 100%"
|
||||
v-model="column.columnValue"
|
||||
:type="column.columnType === 'DATE' ? 'date' : 'datetime'"
|
||||
:placeholder="'请选择' + column.columnName"
|
||||
:value-format="column.columnType === 'DATE' ? 'yyyy-MM-dd' : 'yyyy-MM-dd HH:mm:ss'"
|
||||
></el-date-picker>
|
||||
</template>
|
||||
<!--文件-->
|
||||
@@ -154,12 +154,14 @@ const signForm = {
|
||||
courseTypeRow: {},
|
||||
courseTimeSelectList: [],
|
||||
active: '',
|
||||
|
||||
activity: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addFamily() {
|
||||
if(this.formData.mobileColumnsValue.length >= this.courseTypeRow.familyMaxCount) {
|
||||
this.$message.warning('家属最多人数为' + this.courseTypeRow.familyMaxCount)
|
||||
if(this.formData.mobileColumnsValue.length >= this.activity.familyMaxCount) {
|
||||
this.$message.warning('家属最多人数为' + this.activity.familyMaxCount)
|
||||
return
|
||||
}
|
||||
const list = clone(this.courseTypeRow.familyMobileSignColumnList)
|
||||
@@ -170,53 +172,47 @@ const signForm = {
|
||||
const ac = (Number(this.active) - 1)
|
||||
this.active = '' + (ac >= 0 ? ac : 0)
|
||||
},
|
||||
validFamilyForm() {
|
||||
for (let i = 0; i < this.formData.mobileColumnsValue.length; i++) {
|
||||
const family = this.formData.mobileColumnsValue[i]
|
||||
for (const familyColumn of family) {
|
||||
if(familyColumn.isRequired && !familyColumn.columnValue) {
|
||||
this.$message.error('家属' + (i + 1) + '的' + familyColumn.columnName + '不能为空')
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
},
|
||||
async validSignUp() {
|
||||
//获取家属是多少人
|
||||
const res = await this.$axios.post("/platform/mobile/familyActivity/validateSignUp", {
|
||||
const res = await this.$axios.post("/platform/family/apply/validateSignUp", {
|
||||
courseId: this.formData.courseId,
|
||||
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
|
||||
})
|
||||
if (res.code !== 0) {
|
||||
this.$message.warning(res.msg)
|
||||
this.$alert(res.msg, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
type: "warning"
|
||||
})
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
async validateSourceSignUp() {
|
||||
if (this.courseRow.courseIsLimitApply) {
|
||||
const resp = await $.post('/platform/mobile/familyActivity/validateSourceSignUp', {
|
||||
const resp = await $.post('/platform/family/apply/validateSourceSignUp', {
|
||||
activityCourseId: this.formData.activityCourseId,
|
||||
courseId: this.courseRow.id
|
||||
})
|
||||
if (resp.code !== 0) {
|
||||
this.$message.warning(resp.msg)
|
||||
this.$alert(resp.msg, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
type: "warning"
|
||||
})
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
},
|
||||
async getCourseTimeSelectList(o) {
|
||||
const resp = await $.post('/platform/mobile/familyActivity/getCourseTimeSelectList', {courseId: o.id})
|
||||
const resp = await $.post('/platform/family/apply/getCourseTimeSelectList', {courseId: o.id})
|
||||
if (resp.code === 0) {
|
||||
this.courseTimeSelectList = resp.data
|
||||
} else {
|
||||
this.$message.warning('获取时段信息失败,请联系管理员')
|
||||
}
|
||||
},
|
||||
async onOpen(row, courseType) {
|
||||
this.initData(row, courseType)
|
||||
async onOpen(row, courseType, activity) {
|
||||
this.initData(row, courseType, activity)
|
||||
if (row.courseIsLimitApply) {
|
||||
await this.getCourseTimeSelectList(row)
|
||||
}
|
||||
@@ -229,6 +225,135 @@ const signForm = {
|
||||
this.courseTypeRow = courseType
|
||||
this.signDialog = true
|
||||
},
|
||||
validateIdCard(idCard) {
|
||||
if (!idCard) {
|
||||
return false
|
||||
}
|
||||
|
||||
// 18位身份证号码校验
|
||||
if (idCard.length === 18) {
|
||||
const idCardRegex = /^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/
|
||||
if (!idCardRegex.test(idCard)) {
|
||||
return false
|
||||
}
|
||||
|
||||
// 校验码计算
|
||||
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
|
||||
const checksums = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"]
|
||||
let sum = 0
|
||||
for (let i = 0; i < 17; i++) {
|
||||
sum += idCard[i] * weights[i]
|
||||
}
|
||||
const checksum = checksums[sum % 11]
|
||||
return checksum === idCard[17].toUpperCase()
|
||||
}
|
||||
|
||||
// 15位身份证号码校验
|
||||
else if (idCard.length === 15) {
|
||||
const idCardRegex = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/
|
||||
return idCardRegex.test(idCard)
|
||||
}
|
||||
|
||||
// 外国人或其他情况
|
||||
else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
validFamilyForm() {
|
||||
// 校验规则映射
|
||||
const validators = {
|
||||
idCard: (value) => this.validateIdCard(value),
|
||||
mobile: (value) => /^1[3-9]\d{9}$/.test(value),
|
||||
email: (value) => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)
|
||||
};
|
||||
// 显示提示弹窗(直接传完整的 message)
|
||||
const showAlert = (message) => {
|
||||
this.$alert(message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
type: "warning"
|
||||
})
|
||||
};
|
||||
const { mobileColumnsValue } = this.formData;
|
||||
for (let i = 0; i < mobileColumnsValue.length; i++) {
|
||||
const family = mobileColumnsValue[i];
|
||||
for (const col of family) {
|
||||
const value = col.columnValue?.trim(); // 安全处理空值和空格
|
||||
// 必填校验
|
||||
if (col.isRequired && !value) {
|
||||
const message = this.activity.keyWord + (i + 1) + '的' + col.columnName + '不能为空';
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
// 格式校验
|
||||
if (col.validRule && value) {
|
||||
const validator = validators[col.validRule];
|
||||
if (validator && !validator(value)) {
|
||||
const message = this.activity.keyWord + (i + 1) + '的' + col.columnName + '格式不正确';
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(col.validRule === 'idCard' && this.courseRow.familyAgeLimit) {
|
||||
const parseCard = this.parseIdCard(value)
|
||||
if(this.courseRow.minAge && parseCard.age < this.courseRow.minAge) {
|
||||
const message = '限制报名最小年龄为' + this.courseRow.minAge;
|
||||
showAlert(message);
|
||||
return false;
|
||||
|
||||
}
|
||||
if(this.courseRow.maxAge && parseCard.age > this.courseRow.maxAge) {
|
||||
const message = '限制报名最大年龄为' + this.courseRow.maxAge;
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(col.validRule === 'idCard' && this.courseRow.familySexLimit) {
|
||||
const parseCard = this.parseIdCard(value)
|
||||
if(this.courseRow.familySex && parseCard.sex !== this.courseRow.familySex) {
|
||||
const message = '限制报名性别为' + this.courseRow.familySex;
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
parseIdCard(idCard) {
|
||||
if (!idCard || (idCard.length !== 18 && idCard.length !== 15)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let birthStr = '';
|
||||
let sexCode = '';
|
||||
|
||||
if (idCard.length === 15) {
|
||||
birthStr = '19' + idCard.substring(6, 12);
|
||||
sexCode = idCard.substring(14, 15); // 15位:第15位是性别
|
||||
} else {
|
||||
birthStr = idCard.substring(6, 14);
|
||||
sexCode = idCard.substring(16, 17); // 18位:第17位是性别
|
||||
}
|
||||
|
||||
const birthYear = parseInt(birthStr.substring(0, 4), 10);
|
||||
const birthMonth = parseInt(birthStr.substring(4, 6), 10) - 1;
|
||||
const birthDay = parseInt(birthStr.substring(6, 8), 10);
|
||||
|
||||
const birthDate = new Date(birthYear, birthMonth, birthDay);
|
||||
const today = new Date();
|
||||
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
const monthDiff = today.getMonth() - birthDate.getMonth();
|
||||
const dayDiff = today.getDate() - birthDate.getDate();
|
||||
|
||||
if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) {
|
||||
age--;
|
||||
}
|
||||
|
||||
const sex = parseInt(sexCode, 10) % 2 === 1 ? '男' : '女';
|
||||
|
||||
return { age, sex, };
|
||||
},
|
||||
async onSubmit() {
|
||||
//验证家属表单
|
||||
if (!this.validFamilyForm()) return
|
||||
@@ -241,8 +366,9 @@ const signForm = {
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const formData = clone(this.formData)
|
||||
let array = []
|
||||
this.formData.mobileColumnsValue.forEach(item => {
|
||||
formData.mobileColumnsValue.forEach(item => {
|
||||
const o = item.map((v) => {
|
||||
return {
|
||||
columnName: v.columnName,
|
||||
@@ -253,11 +379,14 @@ const signForm = {
|
||||
})
|
||||
array.push(o)
|
||||
})
|
||||
this.formData.mobileColumnsValue = JSON.stringify(clone(array))
|
||||
const resp = await this.$axios.post("/platform/mobile/familyActivity/doSignUp", this.formData)
|
||||
formData.mobileColumnsValue = JSON.stringify(clone(array))
|
||||
const resp = await this.$axios.post("/platform/family/apply/doSignUp", formData)
|
||||
if (resp.code === 0) {
|
||||
this.$alert(resp.msg, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
type: "warning"
|
||||
})
|
||||
this.signDialog = false
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
@@ -266,7 +395,8 @@ const signForm = {
|
||||
}
|
||||
})
|
||||
},
|
||||
initData(row, courseType) {
|
||||
initData(row, courseType, activity) {
|
||||
this.activity = activity
|
||||
this.formData = {
|
||||
activityId: row.activityId,
|
||||
courseId: row.id,
|
||||
@@ -284,7 +414,7 @@ const signForm = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-tabs__header {
|
||||
::v-deep .el-tabs__header {
|
||||
margin: 0 0 15px !important;
|
||||
}
|
||||
`
|
||||
|
||||
@@ -41,28 +41,28 @@ const basicForm = {
|
||||
<el-col :span="12">
|
||||
<el-form-item :rules="{required:true,message: '请选择活动时间', trigger: 'blur'}" label="活动时间" prop="activityTime">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
end-placeholder="请选择活动结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="请选择活动开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.activityTime"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
:picker-options="pickerOptions"
|
||||
end-placeholder="请选择活动结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="请选择活动开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.activityTime"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :rules="{required:true,message: '请选择报名时间', trigger: 'blur'}" label="报名时间" prop="activitySignTime">
|
||||
<el-date-picker
|
||||
:disabled="false"
|
||||
end-placeholder="请选择报名结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="请选择报名开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.activitySignTime"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
:disabled="false"
|
||||
end-placeholder="请选择报名结束日期"
|
||||
range-separator="至"
|
||||
start-placeholder="请选择报名开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.activitySignTime"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -73,18 +73,18 @@ const basicForm = {
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select
|
||||
@change="changeActivity"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择可报名人员范围"
|
||||
style="width: 99%"
|
||||
v-model="formData.activityGroupId"
|
||||
@change="changeActivity"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择可报名人员范围"
|
||||
style="width: 99%"
|
||||
v-model="formData.activityGroupId"
|
||||
>
|
||||
<el-option
|
||||
:key="item.groupId"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
v-for="item in activityGroupList"
|
||||
:key="item.groupId"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
v-for="item in activityGroupList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -102,29 +102,41 @@ const basicForm = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item :rules="{required:true,message: '请输入关键词', trigger: 'blur'}" label="关键词" prop="keyWord">
|
||||
<el-input maxlength="50" v-model="formData.keyWord" placeholder="请输入关键词"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :rules="{required:true,message: '请输入家属最多数', trigger: 'blur'}" label="家属最多数" prop="familyMaxCount">
|
||||
<el-input maxlength="50" v-model="formData.familyMaxCount" placeholder="请输入家属最多数" type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item :rules="{required:true,message: '请输入活动介绍', trigger: 'blur'}" label="活动介绍" prop="introduce">
|
||||
<text-editor v-model="formData.introduce"></text-editor>
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图片" prop="cover" :rules="{required:true,message: '请上传活动移动端封面图片', trigger: 'blur'}">
|
||||
<el-col :span="12">
|
||||
<file-upload
|
||||
:upload_number="1"
|
||||
:value.sync="formData.cover"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
complete_result
|
||||
upload_mode="image"
|
||||
upload_result_category="interval"
|
||||
:upload_number="1"
|
||||
:value.sync="formData.cover"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
complete_result
|
||||
upload_mode="image"
|
||||
upload_result_category="interval"
|
||||
></file-upload>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="微信群二维码" prop="wechat">
|
||||
<file-upload
|
||||
:upload_number="1"
|
||||
:value.sync="formData.wechat"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
complete_result
|
||||
upload_mode="image"
|
||||
upload_result_category="interval"
|
||||
:upload_number="1"
|
||||
:value.sync="formData.wechat"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
complete_result
|
||||
upload_mode="image"
|
||||
upload_result_category="interval"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -141,17 +153,17 @@ const basicForm = {
|
||||
<el-table-column label="序号" prop="orderNum" width="100px">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number
|
||||
v-model="row.orderNum"
|
||||
@change="courseOrderNumChange"
|
||||
:min="1"
|
||||
:max="formData.courseList.length"
|
||||
:step="1"
|
||||
step-strictly
|
||||
:precision="0"
|
||||
controls-position="right"
|
||||
style="width: 76px"
|
||||
size="small"
|
||||
label="序号"
|
||||
v-model="row.orderNum"
|
||||
@change="courseOrderNumChange"
|
||||
:min="1"
|
||||
:max="formData.courseList.length"
|
||||
:step="1"
|
||||
step-strictly
|
||||
:precision="0"
|
||||
controls-position="right"
|
||||
style="width: 76px"
|
||||
size="small"
|
||||
label="序号"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -173,32 +185,32 @@ const basicForm = {
|
||||
<el-table-column :label="activityType + '人数'" prop="coursePeopleNumber" width="110px">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number
|
||||
:controls="false"
|
||||
:max="9999"
|
||||
size="small"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
step-strictly
|
||||
style="max-width: 80px"
|
||||
@change="(c, o) => validNumber(row, null)"
|
||||
v-model="row.coursePeopleNumber"
|
||||
placeholder="请输入人数"
|
||||
:controls="false"
|
||||
:max="9999"
|
||||
size="small"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
step-strictly
|
||||
style="max-width: 80px"
|
||||
@change="(c, o) => validNumber(row, null)"
|
||||
v-model="row.coursePeopleNumber"
|
||||
placeholder="请输入人数"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预留名额" prop="courseReservedNumber" width="110px">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number
|
||||
:controls="false"
|
||||
:max="1000"
|
||||
:min="0"
|
||||
size="small"
|
||||
:precision="0"
|
||||
step-strictly
|
||||
style="max-width: 80px"
|
||||
@change="(c, o) => validNumber(row, o)"
|
||||
v-model="row.courseReservedNumber"
|
||||
placeholder="请输入预留名额"
|
||||
:controls="false"
|
||||
:max="1000"
|
||||
:min="0"
|
||||
size="small"
|
||||
:precision="0"
|
||||
step-strictly
|
||||
style="max-width: 80px"
|
||||
@change="(c, o) => validNumber(row, o)"
|
||||
v-model="row.courseReservedNumber"
|
||||
placeholder="请输入预留名额"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -265,6 +277,13 @@ const basicForm = {
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<div class="left-span-label" style="margin-top: 20px">判断家属数量唯一标识</div>
|
||||
<el-form-item label="唯一标识" prop="onlyKey">
|
||||
<el-select @focus="keyFocus" v-model="formData.onlyKey" placeholder="请选择唯一标识">
|
||||
<el-option v-for="item in typeArray" :key="item.columnCode" :label="item.columnName" :value="item.columnCode"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<div style="float: right; margin: 20px 0">
|
||||
@@ -292,12 +311,12 @@ const basicForm = {
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<drawer-user-scope
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
:group_id.sync="formData.activityGroupId">
|
||||
<drawer-user-scope
|
||||
@group_change="getActivityGroup"
|
||||
ref="drawerUserScope"
|
||||
:group_id.sync="formData.activityGroupId">
|
||||
</drawer-user-scope>
|
||||
|
||||
|
||||
<course-time ref="courseTimeRef"></course-time>
|
||||
<custom-form ref="customFormRef"></custom-form>
|
||||
</div>
|
||||
@@ -310,7 +329,17 @@ const basicForm = {
|
||||
formData: {
|
||||
notice: false,
|
||||
courseList: [
|
||||
{ orderNum: 1, courseName: "", courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false },
|
||||
{
|
||||
orderNum: 1,
|
||||
courseName: "",
|
||||
courseTimeList: [],
|
||||
isMobileSign: false,
|
||||
isReceiveGift: false,
|
||||
reserveMode: 1,
|
||||
courseIsLimitApply: false,
|
||||
familyAgeLimit: false,
|
||||
familySexLimit: false,
|
||||
},
|
||||
],
|
||||
conditionStructure: {
|
||||
method: "AND",
|
||||
@@ -318,7 +347,8 @@ const basicForm = {
|
||||
},
|
||||
restrictLimit: 1,
|
||||
limitNum: 1,
|
||||
typeLimits: []
|
||||
typeLimits: [],
|
||||
keyWord: '家属'
|
||||
},
|
||||
historicalActList: [],
|
||||
trainTypeList: [],
|
||||
@@ -331,6 +361,8 @@ const basicForm = {
|
||||
},
|
||||
campusList: [],
|
||||
courseTypeList: [],
|
||||
|
||||
typeArray: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -339,6 +371,28 @@ const basicForm = {
|
||||
"custom-form": customForm,
|
||||
},
|
||||
methods: {
|
||||
keyFocus() {
|
||||
const types = this.formData.courseList.filter(o => o.courseType !== undefined).map(o => o.courseType)
|
||||
if(types.length === 0) {
|
||||
this.$message.warning('请先设置' + this.activityType + '类型')
|
||||
return
|
||||
}
|
||||
const typeList = this.courseTypeList.filter(o => types.includes(o.id))
|
||||
let array = []
|
||||
typeList.forEach(item => {
|
||||
array = array.concat(item.familyMobileSignColumnList)
|
||||
})
|
||||
// 根据 columnCode 去重
|
||||
const uniqueMap = new Map()
|
||||
array.forEach(item => {
|
||||
if (item.columnCode) {
|
||||
uniqueMap.set(item.columnCode, item)
|
||||
}
|
||||
})
|
||||
// 可选:保留没有 columnCode 的项
|
||||
const withoutCode = array.filter(item => !item.columnCode)
|
||||
this.typeArray = [...uniqueMap.values(), ...withoutCode]
|
||||
},
|
||||
async validNumber(row, old) {
|
||||
if (GetQueryString("id") === "") {
|
||||
if (row.courseReservedNumber > row.coursePeopleNumber && row.reserveMode === 1) {
|
||||
@@ -371,7 +425,7 @@ const basicForm = {
|
||||
}
|
||||
},
|
||||
async getRegisterUserCount(courseId) {
|
||||
const resp = await this.$axios.post("/platform/family/manage/activity/getRegisterUserCount", { courseId })
|
||||
const resp = await this.$axios.post("/platform/family/manage/getRegisterUserCount", { courseId })
|
||||
return resp.code === 0 ? resp.data : 0
|
||||
},
|
||||
courseTypeChange(val, row) {
|
||||
@@ -444,7 +498,7 @@ const basicForm = {
|
||||
this.formData.courseList.push({ courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false })
|
||||
},
|
||||
async historicalActChange(val) {
|
||||
const resp = await this.$axios.post("/platform/family/manage/activity/findOne", {id: val})
|
||||
const resp = await this.$axios.post("/platform/family/manage/findOne", {id: val})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
this.typeChange(this.formData.trainType)
|
||||
@@ -468,7 +522,7 @@ const basicForm = {
|
||||
return data
|
||||
},
|
||||
async getHistoricalActList() {
|
||||
const resp = await this.$axios.post("/platform/family/manage/activity/getHistoricalActList", {})
|
||||
const resp = await this.$axios.post("/platform/family/manage/getHistoricalActList", {})
|
||||
return resp.data
|
||||
},
|
||||
async onSave() {
|
||||
@@ -508,6 +562,18 @@ const basicForm = {
|
||||
this.$message.warning("第" + (i + 1) + "行签到方式填写有误,请核查")
|
||||
return true
|
||||
}
|
||||
if(v.familyAgeLimit === true && !v.minAge) {
|
||||
this.$message.warning("第" + (i + 1) + "行最小年龄不能为空,请核查")
|
||||
return true
|
||||
}
|
||||
if(v.familyAgeLimit === true && !v.maxAge) {
|
||||
this.$message.warning("第" + (i + 1) + "行最大年龄不能为空,请核查")
|
||||
return true
|
||||
}
|
||||
if(v.familySexLimit === true && !v.familySex) {
|
||||
this.$message.warning("第" + (i + 1) + "行性别不能为空,请核查")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
if (courseValid) return
|
||||
@@ -543,7 +609,7 @@ const basicForm = {
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm !== "confirm") return
|
||||
const resp = await this.$axios.post("/platform/family/manage/activity/doHandle", cloneData)
|
||||
const resp = await this.$axios.post("/platform/family/manage/doHandle", cloneData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.step = 1
|
||||
@@ -554,15 +620,16 @@ const basicForm = {
|
||||
}
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await this.$axios.post("/platform/family/manage/type/getAllType", {})
|
||||
const resp = await this.$axios.post("/platform/family/type/getAllType", {})
|
||||
return resp.data
|
||||
},
|
||||
async init(row) {
|
||||
if (row && row.id) {
|
||||
const resp = await this.$axios.post("/platform/family/manage/activity/findOne", {id: row.id})
|
||||
const resp = await this.$axios.post("/platform/family/manage/findOne", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
this.typeChange(this.formData.trainType)
|
||||
if(this.formData.onlyKey) this.keyFocus()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -588,6 +655,6 @@ const basicForm = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
@@ -50,6 +50,69 @@ const customForm = {
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>是否限制年龄</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-radio-group v-model="formData.courseList[moreInfoIndex].familyAgeLimit" size="small">
|
||||
<el-radio border :label="true">限制</el-radio>
|
||||
<el-radio border :label="false">不限制</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="50" type="flex" v-if="formData.courseList[moreInfoIndex].familyAgeLimit === true">
|
||||
<el-col :span="4">
|
||||
<span>最小年龄</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input-number :controls="false" style="width: 100%"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
step-strictly
|
||||
placeholder="请输入最小年龄"
|
||||
v-model="formData.courseList[moreInfoIndex].minAge"></el-input-number>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="50" type="flex" v-if="formData.courseList[moreInfoIndex].familyAgeLimit === true">
|
||||
<el-col :span="4">
|
||||
<span>最大年龄</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input-number :controls="false" style="width: 100%"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
step-strictly
|
||||
placeholder="请输入最大年龄"
|
||||
v-model="formData.courseList[moreInfoIndex].maxAge"></el-input-number>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>是否限制性别</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-radio-group v-model="formData.courseList[moreInfoIndex].familySexLimit" size="small">
|
||||
<el-radio border :label="true">限制</el-radio>
|
||||
<el-radio border :label="false">不限制</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="50" type="flex" v-if="formData.courseList[moreInfoIndex].familySexLimit === true">
|
||||
<el-col :span="4">
|
||||
<span>限制性别</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-select v-model="formData.courseList[moreInfoIndex].familySex" placeholder="请选择性别"
|
||||
style="width: 100%" clearable>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>是否签到</span>
|
||||
@@ -132,7 +195,7 @@ const customForm = {
|
||||
<span>候补数量</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input-number :controls="false" size="small" style="width: 100%"
|
||||
<el-input-number :controls="false" style="width: 100%"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
@@ -140,6 +203,16 @@ const customForm = {
|
||||
v-model="formData.courseList[moreInfoIndex].waitingNum"></el-input-number>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>详细信息</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<text-editor v-model="formData.courseList[moreInfoIndex].introduce"></text-editor>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="text-align: right">
|
||||
<el-button @click="moreInfoDrawer = false">取 消</el-button>
|
||||
<el-button type="primary" @click="moreInfoDrawer = false">保 存</el-button>
|
||||
@@ -195,17 +268,6 @@ const customForm = {
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.my-drawer .el-col-4 {
|
||||
text-align: right;
|
||||
}
|
||||
.my-drawer .el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-drawer__body {
|
||||
padding: 20px;
|
||||
}
|
||||
.el-row--flex {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
@@ -3,7 +3,18 @@ layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.my-drawer .el-col-4 {
|
||||
text-align: right;
|
||||
}
|
||||
.my-drawer .el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-drawer__body {
|
||||
padding: 20px;
|
||||
}
|
||||
.el-row--flex {
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
@@ -164,8 +175,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
openActivityCode(id) {
|
||||
this.activityUrl = location.origin + "/platform/mobile/familyActivity/activityInfo?activityId="
|
||||
+ id + '&isMySign=0'
|
||||
this.activityUrl = location.origin + "/platform/family/apply/h5?id=" + id
|
||||
this.codeDialogVisible = true
|
||||
},
|
||||
makeCode(row) {
|
||||
|
||||
@@ -11,6 +11,9 @@ const info = {
|
||||
<el-descriptions-item label="活动结束时间">{{viewData.activityEndTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名开始时间">{{viewData.activitySignUpStartTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">{{viewData.activitySignUpEndTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="详细信息" :span="2">
|
||||
<div v-html="viewData.introduce"></div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="activityType + '信息'">
|
||||
@@ -66,7 +69,7 @@ const info = {
|
||||
},
|
||||
methods: {
|
||||
initData(id) {
|
||||
this.$axios.post(loc() + "/findOne", { id: id })
|
||||
this.$axios.post("/platform/family/manage/findOne", { id: id })
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
@@ -104,7 +107,7 @@ const info = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-button--text {
|
||||
::v-deep .el-button--text {
|
||||
padding: 0;
|
||||
}
|
||||
`
|
||||
|
||||
@@ -66,8 +66,10 @@ const makeQrcode = {
|
||||
this.courseDialog = true
|
||||
},
|
||||
makeCourseCode(row) {
|
||||
const o = {courseId: row.id}
|
||||
const content = jrQrcode.getQrBase64(JSON.stringify(o))
|
||||
const url = '/platform/family/mine/drivingScan'
|
||||
const data = url + '?courseId=' + row.id
|
||||
console.log(data)
|
||||
const content = jrQrcode.getQrBase64(data)
|
||||
let image = new Image()
|
||||
image.src = content
|
||||
let viewer = new Viewer(image, {
|
||||
|
||||
@@ -150,7 +150,7 @@ const unionForm = {
|
||||
!this.formData.courseList[this.unionLimitIndex].unionLimit ||
|
||||
this.formData.courseList[this.unionLimitIndex].unionLimit.length === 0
|
||||
) {
|
||||
const resp = await this.$axios.get("/platform/family/manage/activity/getUnionLimit", {
|
||||
const resp = await this.$axios.get("/platform/family/manage/getUnionLimit", {
|
||||
activityScopeId: this.formData.activityGroupId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
|
||||
@@ -73,6 +73,16 @@ const basicForm = {
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="验证规则" prop="validRule">
|
||||
<template v-slot="{row}">
|
||||
<el-select v-model="row.validRule" style="width: 100%" filterable placeholder="请选择验证规则" clearable>
|
||||
<el-option label="身份证" value="idCard"></el-option>
|
||||
<el-option label="手机号" value="mobile"></el-option>
|
||||
<el-option label="邮箱" value="email"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="控件类型" prop="columnFormType">
|
||||
<template v-slot="{row, $index}">
|
||||
<el-select
|
||||
|
||||
@@ -213,10 +213,10 @@ const userInfo = {
|
||||
this.unitList = await this.$businessTool.listUnit(this.registerForm.unionId)
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.adjustDialog .el-radio__label {
|
||||
::v-deep .adjustDialog .el-radio__label {
|
||||
display: none;
|
||||
}
|
||||
.adjustDialog .el-dialog__body {
|
||||
::v-deep .adjustDialog .el-dialog__body {
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ layout("/layouts/platform.html"){
|
||||
await this.doSearch()
|
||||
},
|
||||
async getActivityList() {
|
||||
const resp = await this.$axios.post("/platform/family/statistics/activity/activityList", { year: this.pageForm.year })
|
||||
const resp = await this.$axios.post("/platform/family/statistics/activityList", { year: this.pageForm.year })
|
||||
this.activityList = resp.data
|
||||
if (this.activityList && this.activityList.length > 0) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
|
||||
@@ -69,7 +69,7 @@ const courseList = {
|
||||
</template>
|
||||
|
||||
<template v-slot="{row}" v-else-if="column.prop=='introduce'">
|
||||
<span v-if="!row.introduce">暂无</span>
|
||||
<span v-if="!row.introduce?.trim()">暂无</span>
|
||||
<el-button v-else style="padding: 0" @click="onPreview(row.introduce)" type="text">点击查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -107,6 +107,13 @@ const courseList = {
|
||||
<el-button @click="viewMapDialog = false">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="infoVisible" title="详细信息" append-to-body>
|
||||
<div v-html="introduce"></div>
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="infoVisible = false">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<apply-form ref="formRef" @refresh="doSearch"></apply-form>
|
||||
</div>
|
||||
@@ -128,29 +135,40 @@ const courseList = {
|
||||
tableColumns: [
|
||||
{ prop: "courseName", label: "名称" },
|
||||
{ prop: "typeName", label: "类型", width: 130},
|
||||
{ prop: "campus", label: "校区", width: 160 },
|
||||
{ prop: "courseLocationCoordinates", label: "地点", width: 200 },
|
||||
{ prop: "courseInstructor", label: "联系人", width: 100 },
|
||||
{ prop: "introduce", label: "详细介绍", width: 100 },
|
||||
{ prop: "courseTime", label: "时间", width: 200 },
|
||||
{ prop: "courseTime", label: "时间", width: 160 },
|
||||
{ prop: "introduce", label: "详细信息", width: 100 },
|
||||
{ prop: "applyNum", label: "已报名人数", width: 200 }
|
||||
],
|
||||
activity: {},
|
||||
courseTypeList: [],
|
||||
|
||||
trainType: '',
|
||||
pdf: false,
|
||||
infoVisible: false,
|
||||
introduce: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onPreview(introduce) {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(introduce, 'text/html');
|
||||
const link = doc.querySelector('a');
|
||||
const href = link.getAttribute('href');
|
||||
try {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(introduce, 'text/html');
|
||||
const link = doc.querySelector('a');
|
||||
const href = link.getAttribute('href');
|
||||
|
||||
const id = href.substring(href.indexOf("=") + 1)
|
||||
const res = await this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify([id]) })
|
||||
const id = href.substring(href.indexOf("=") + 1)
|
||||
const res = await this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify([id]) })
|
||||
|
||||
window.open("/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent(res.data[0].downloadPath), res.data[0].name)
|
||||
this.pdf = true
|
||||
window.open("/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent(res.data[0].downloadPath), res.data[0].name)
|
||||
} catch (e) {
|
||||
this.introduce = introduce
|
||||
this.pdf = false
|
||||
this.infoVisible = true
|
||||
}
|
||||
},
|
||||
tagClick(key, val) {
|
||||
let idx = this.pageForm[key].indexOf(val)
|
||||
|
||||
@@ -76,22 +76,22 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<activity-info ref="infoRef"></activity-info>
|
||||
|
||||
<el-statistic
|
||||
v-if="time < 0"
|
||||
format="DD 天 HH 时 mm 分钟 ss 秒"
|
||||
:value="new Date(infoRow.activitySignUpStartTime)"
|
||||
time-indices
|
||||
title="距离开始:"
|
||||
@finish="time = 0"
|
||||
style="margin-top: 30px"
|
||||
>
|
||||
</el-statistic>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="infoVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
|
||||
去报名
|
||||
</el-button>
|
||||
<el-statistic
|
||||
v-if="time < 0"
|
||||
format="DD 天 HH 时 mm 分钟 ss 秒"
|
||||
:value="new Date(infoRow.activitySignUpStartTime)"
|
||||
time-indices
|
||||
title="距离开始:"
|
||||
@finish="time = 0"
|
||||
>
|
||||
</el-statistic>
|
||||
<template v-else>
|
||||
<el-button @click="infoVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
|
||||
去报名
|
||||
</el-button>
|
||||
</template>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
@@ -111,7 +111,7 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
activityType: 2
|
||||
activityType: 4
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 600},
|
||||
|
||||
@@ -132,7 +132,7 @@ const customForm = {
|
||||
<span>候补数量</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input-number :controls="false" size="small" style="width: 100%"
|
||||
<el-input-number :controls="false" style="width: 100%"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:precision="0"
|
||||
|
||||
@@ -3,18 +3,7 @@ layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.my-drawer .el-col-4 {
|
||||
text-align: right;
|
||||
}
|
||||
.my-drawer .el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.el-drawer__body {
|
||||
padding: 20px;
|
||||
}
|
||||
.el-row--flex {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
-15
@@ -178,21 +178,6 @@ layout("/layouts/platform.html"){
|
||||
onExport() {
|
||||
this.$downLoad('/platform/unionReimburse/collect/onExport', this.pageForm)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
|
||||
@@ -105,7 +105,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="申请表单" define_key="DSZNFMTX"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-suffix=":" label-width="120px">
|
||||
<!-- 将表单项按两列重新排列 -->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职工姓名" prop="userName">
|
||||
<el-input v-model="formData.userName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-input v-model="formData.sex" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出生年月" prop="birthday">
|
||||
<el-input v-model="formData.birthday" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原工作单位" prop="unitName">
|
||||
<el-input v-model="formData.unitName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退休时间" prop="retireTime">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.retireTime"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="爱人姓名" prop="loverName">
|
||||
<el-input type="text" v-model="formData.loverName" placeholder="请输入爱人姓名"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="loverSex">
|
||||
<el-select v-model="formData.loverSex" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工作单位" prop="loverUnitName">
|
||||
<el-input type="text" v-model="formData.loverUnitName"
|
||||
placeholder="请输入工作单位"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结婚日期" prop="marryTime">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.marryTime"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="子女出生日" prop="childrenBirthday">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.childrenBirthday"
|
||||
placeholder="请选择子女出生日"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="领独生子女证日" prop="getCertificateTime">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.getCertificateTime"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="独生子女光荣证号" prop="childrenGraceNumber">
|
||||
<el-input type="text" v-model="formData.childrenGraceNumber"
|
||||
placeholder="请输入独生子女光荣证号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="办证机关" prop="office">
|
||||
<el-input type="text" v-model="formData.office"
|
||||
placeholder="请输入办证机关"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="奖励金额" prop="bonus">
|
||||
<el-input type="text" v-model="formData.bonus"
|
||||
placeholder="请输入奖励金额"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
<!-- 以下项目保持单独一行 -->
|
||||
<el-form-item prop="honorFiles" label="独生子女父母光荣证">
|
||||
<file-upload :upload_number="5" :value.sync="formData.honorFiles"
|
||||
upload_result_type="url"
|
||||
upload_text="请上传独生子女父母光荣证"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="retireFiles" label="退休证">
|
||||
<file-upload :upload_number="5" :value.sync="formData.retireFiles"
|
||||
upload_result_type="url"
|
||||
upload_text="请上传退休证"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sign" label="签字">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
<el-form-item prop="declarationAgreed">
|
||||
<el-checkbox v-model="formData.declarationAgreed">
|
||||
根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。<br/>
|
||||
说明:1. 本人应如实填写各项情况。2. 申报时需持《独生子女父母光荣证》、《退休证》原件及其复印件各一份。
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {},
|
||||
formRules: {
|
||||
declarationAgreed: [
|
||||
{ required: true, message: '请勾选申报理由', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/dsznfmtx/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/dsznfmtx/mine/index'
|
||||
//commonUtil.pjaxPush('/platform/dsznfmtx/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/dsznfmtx/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/dsznfmtx/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请完善表单信息并勾选申报理由');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 再次提交
|
||||
onFinishTask() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/dsznfmtx/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/dsznfmtx/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请完善表单信息并勾选申报理由');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/dsznfmtx/apply/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId).then(async data => {
|
||||
this.formData = data
|
||||
})
|
||||
} else {
|
||||
const {id, username, loginname, union, unit, sex, birthday} = this.$store.state.user
|
||||
this.formData = {
|
||||
userId: id,
|
||||
userName: username,
|
||||
loginName: loginname,
|
||||
unitId: unit.id,
|
||||
unitName: unit.name,
|
||||
unionId: union.id,
|
||||
unionName: union.name,
|
||||
sex: sex,
|
||||
birthday: birthday,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,136 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="retireTime" label="退休时间"></el-table-column>
|
||||
<el-table-column prop="bonus" label="奖励金额"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"dsznfmtx-info": dsznfmtxInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/dsznfmtx/collect/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/dsznfmtx/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onExport() {
|
||||
this.$downLoad('/platform/dsznfmtx/collect/onExport', this.pageForm)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,119 @@
|
||||
const dsznfmtxInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<table-tool label="人员信息"></table-tool>
|
||||
<el-descriptions :column="3" border class="flow-task-form">
|
||||
<el-descriptions-item label="职工姓名">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{viewData.birthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="原工作单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="退休时间" >{{viewData.retireTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="爱人姓名">{{viewData.loverName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.loverSex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位" :span="2">{{viewData.loverUnitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结婚日期">{{viewData.marryTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">{{viewData.childrenBirthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领独生子女证时间">{{viewData.startTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="独生子女光荣证号">{{viewData.childrenGraceNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="办证机关">{{viewData.office}}</el-descriptions-item>
|
||||
<el-descriptions-item label="奖励金额">{{viewData.bonus}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :span="3" label="独生子女父母光荣证">
|
||||
<file-preview :files="viewData.honorFiles" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="3" label="退休证">
|
||||
<file-preview :files="viewData.retireFiles" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-image v-if="viewData.sign"
|
||||
:src="viewData.sign"
|
||||
class="signature-image"></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/dsznfmtx/apply/findOne', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="retireTime" label="退休时间"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"dsznfmtx-info": dsznfmtxInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/dsznfmtx/mine/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
//commonUtil.pjaxPush('/platform/dsznfmtx/apply/index', {taskId: (row.startTaskId || ''), bizId: row.id})
|
||||
window.location.href = '/platform/dsznfmtx/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/dsznfmtx/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,193 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="retireTime" label="退休时间"></el-table-column>
|
||||
<el-table-column prop="bonus" label="奖励金额"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</dsznfmtx-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"dsznfmtx-info": dsznfmtxInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/dsznfmtx/schoolAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,191 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="retireTime" label="退休时间"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</dsznfmtx-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"dsznfmtx-info": dsznfmtxInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/dsznfmtx/unionAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,294 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="生育休假" define_key="SYXJ"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<table-tool label="人员信息"></table-tool>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="职工姓名">{{formData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{formData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{formData.nation}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月" >{{formData.birthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位" >{{formData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="电话" >{{formData.mobile}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="爱人姓名">
|
||||
<el-form-item label="爱人姓名" prop="loverName">
|
||||
<el-input type="text" v-model="formData.loverName" placeholder="请输入爱人姓名"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item label="性别" prop="loverSex">
|
||||
<el-select v-model="formData.loverSex" placeholder="请选择">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">
|
||||
<el-form-item label="民族" prop="loverNation">
|
||||
<el-select clearable placeholder="请选择民族"
|
||||
style="width: 100%;"
|
||||
v-model="formData.loverNation">
|
||||
<el-option :label="item.name" :value="item.code"
|
||||
v-for="item in dict.type.USER_NATION"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月" >
|
||||
<el-form-item label="出生年月" prop="loverBirthday">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.loverBirthday"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位" span="2">
|
||||
<el-form-item label="工作单位" prop="loverUnitName">
|
||||
<el-input type="text" v-model="formData.loverUnitName"
|
||||
placeholder="请输入工作单位"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="假期类别"></table-tool>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="陪产假" v-if="formData.sex === '男性' || formData.sex === '男'">
|
||||
<el-form-item label="陪产假" prop="withLeave">
|
||||
<el-input v-model="formData.withLeave" placeholder="请输入陪产天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="育儿假" v-if="formData.sex === '男性' || formData.sex === '男'">
|
||||
<el-form-item label="育儿假" prop="parentalLeave">
|
||||
<el-input v-model="formData.parentalLeave" placeholder="请输入育儿假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="产假" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="产假" prop="maternityLeave">
|
||||
<el-input v-model="formData.maternityLeave" placeholder="请输入产假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="延长假" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="延长假" prop="extendLeave">
|
||||
<el-input v-model="formData.extendLeave" placeholder="请输入延长假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="多胞胎" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="多胞胎" prop="birthsLeave">
|
||||
<el-input v-model="formData.birthsLeave" placeholder="请输入多胞胎天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="难产假" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="难产假" prop="difficultLeave">
|
||||
<el-input v-model="formData.difficultLeave" placeholder="请输入难产假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="寒假">
|
||||
<el-form-item label="寒假" prop="winterLeave">
|
||||
<el-input v-model="formData.winterLeave" placeholder="请输入寒假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="暑假">
|
||||
<el-form-item label="暑假" prop="summerLeave">
|
||||
<el-input v-model="formData.summerLeave" placeholder="请输入暑假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合计天数" span="2">{{formData.leaveDays}}
|
||||
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="休假时间"></table-tool>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="休假时间起">
|
||||
<el-form-item label="休假时间起" prop="startTime">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.startTime"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="休假时间止">
|
||||
<el-form-item label="休假时间止" prop="endTime">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.endTime"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">
|
||||
<el-form-item label="子女出生日" prop="childrenBirthday">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.childrenBirthday"
|
||||
placeholder="请选择子女出生日"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["USER_NATION"],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {},
|
||||
formRules: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 计算合计天数
|
||||
totalLeaveDays() {
|
||||
const fields = [
|
||||
'withLeave', 'parentalLeave', 'maternityLeave',
|
||||
'extendLeave', 'birthsLeave', 'difficultLeave',
|
||||
'winterLeave', 'summerLeave'
|
||||
];
|
||||
|
||||
let total = 0;
|
||||
fields.forEach(field => {
|
||||
const value = this.formData[field];
|
||||
if (value && !isNaN(value)) {
|
||||
total += parseFloat(value);
|
||||
}
|
||||
});
|
||||
|
||||
return total;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
totalLeaveDays(newVal) {
|
||||
this.$set(this.formData, 'leaveDays', newVal);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/maternityLeave/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/maternityLeave/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/maternityLeave/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/maternityLeave/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 再次提交
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/maternityLeave/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/maternityLeave/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/maternityLeave/apply/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId).then(async data => {
|
||||
this.formData = data
|
||||
})
|
||||
} else {
|
||||
const {id, username, loginname, union, unit, sex, nation, birthday,mobile} = this.$store.state.user
|
||||
this.formData = {
|
||||
userId: id,
|
||||
userName: username,
|
||||
loginName: loginname,
|
||||
unitId: unit.id,
|
||||
unitName: unit.name,
|
||||
unionId: union.id,
|
||||
unionName: union.name,
|
||||
sex: sex,
|
||||
nation: nation,
|
||||
birthday: birthday,
|
||||
mobile:mobile
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/collect/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/maternityLeave/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onExport() {
|
||||
this.$downLoad('/platform/maternityLeave/collect/onExport', this.pageForm)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,135 @@
|
||||
const maternityLeaveInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<table-tool label="人员信息"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="职工姓名">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{viewData.nation}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{viewData.birthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="电话">{{viewData.mobile}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="爱人姓名">{{viewData.loverName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.loverSex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{viewData.loverNation}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{viewData.loverBirthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位" span="2">{{viewData.loverUnitName}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<table-tool label="假期类型"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="陪产假" v-if="viewData.sex === '男性' || viewData.sex === '男'">
|
||||
{{viewData.withLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="育儿假" v-if="viewData.sex === '男性' || viewData.sex === '男'">
|
||||
{{viewData.parentalLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.maternityLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="延长假" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.extendLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="多胞胎" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.birthsLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="难产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.difficultLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="寒假">{{viewData.winterLeave}}</el-descriptions-item>
|
||||
<el-descriptions-item label="暑假">{{viewData.summerLeave}}</el-descriptions-item>
|
||||
<el-descriptions-item label="合计">{{viewData.leaveDays}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="休假时间"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="休假时间起">{{viewData.startTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="休假时间止">{{viewData.endTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">{{viewData.childrenBirthday}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/maternityLeave/apply/findOne', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/mine/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/maternityLeave/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/maternityLeave/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/schoolAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/unionAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+1
-1
@@ -125,7 +125,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</template>-->
|
||||
|
||||
<template v-if="">
|
||||
<template v-if="formData.loginname == $store.state.user.loginname">
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-form-item prop="families">
|
||||
<el-table :data="formData.families" border size="small">
|
||||
|
||||
@@ -138,8 +138,6 @@ layout("/layouts/platform.html"){
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
searchKeyword: "",
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
@@ -202,10 +200,11 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.$axios
|
||||
.post(loc() + "/pageData", {
|
||||
pageForm: JSON.stringify(this.pageForm)
|
||||
})
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
this.$axios.post(loc() + "/pageData", pageForm)
|
||||
.then((data) => {
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
.info-title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
text-align: center !important;
|
||||
}
|
||||
.info-container {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
.button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.info-img {
|
||||
display: block;
|
||||
}
|
||||
.van-count-down {
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="亲子活动" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityType" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/family/apply/activityPageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="activityName"
|
||||
img="cover"
|
||||
@ready="onReady"
|
||||
>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="面向对象">{{row.activityGroupName}}</table-column>
|
||||
<table-column label="报名时间">
|
||||
{{$moment(row.activitySignUpStartTime).format('MM/DD HH:mm') + '~' + $moment(row.activitySignUpEndTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
<table-column label="活动时间">
|
||||
{{$moment(row.activityStartTime).format('MM/DD HH:mm') + '~' + $moment(row.activityEndTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看介绍</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onApply(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>去报名</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<van-action-sheet :close-on-click-overlay="false" title="详细信息" v-model="infoVisible">
|
||||
|
||||
<div class="info-container">
|
||||
<div>
|
||||
<van-image class="info-img" height="186" width="100%" :src="infoRow.cover"></van-image>
|
||||
<div class="info-title">{{infoRow.activityName}}</div>
|
||||
<pdf-preview :content="infoRow.introduce"></pdf-preview>
|
||||
</div>
|
||||
<div class="button">
|
||||
<van-button @click="onApply(infoRow)" type="primary" block>
|
||||
<span v-if="time >= 0">
|
||||
去报名
|
||||
</span>
|
||||
<template v-else>
|
||||
距离开始
|
||||
<van-count-down :time="Math.abs(time)" class="count-down" format="DD 天 HH 时 mm 分 ss 秒" @finish="time = 0"></van-count-down>
|
||||
</template>
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"pdf-preview": httpVueLoader("/components/plugins/sysFilePreview/PdfIndex.vue?v=" + new Date().getTime())
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
time: 0,
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
year: new Date().getFullYear(),
|
||||
activityType: 4,
|
||||
},
|
||||
typeOptions: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '即将开始', value: 4},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
infoVisible: false,
|
||||
infoRow: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.infoRow = row
|
||||
this.time = this.$moment().diff(this.$moment(row.activitySignUpStartTime), 'milliseconds')
|
||||
this.infoVisible = true
|
||||
},
|
||||
onApply(row) {
|
||||
if(this.$moment().isBefore(this.$moment(row.activitySignUpStartTime))) {
|
||||
this.onView(row)
|
||||
return
|
||||
}
|
||||
this.$pjaxReplace('/platform/family/apply/list/h5?id=' + row.id)
|
||||
},
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,89 @@
|
||||
const times = {
|
||||
template:
|
||||
/*language=HTML*/
|
||||
`
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="时间段" cancel-text="取消">
|
||||
<button v-for="(item,index) in row?.courseTimes" type="button" class="van-action-sheet__item">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
<div class="van-action-sheet__name">
|
||||
<label>{{ weekdayCNMap[$moment(item.courseDate).day()] }}</label>
|
||||
<label>{{ $moment(item.courseDate).format('YYYY-MM-DD') }}</label>
|
||||
</div>
|
||||
<div class="van-action-sheet__subname">
|
||||
{{$moment(item.courseStartTime).format('MM-DD HH:mm') + ' 至 ' + $moment(item.courseEndTime).format('MM-DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="row.isSign === true && row.isMobileSign === true" class="sign_button">
|
||||
<van-button v-if="item.isAttend !== true" @click.stop="onSign(item)" size="mini" type="info">签到</van-button>
|
||||
<van-button v-if="item.isAttend === true" size="mini" type="info" disabled>已签到</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-popup round :safe-area-inset-bottom="true"
|
||||
:close-on-click-overlay="false"
|
||||
v-model="signVisible"
|
||||
:style="{ width: '80%', height: '66%' }"
|
||||
get-container="#app"
|
||||
@close="onSignClose"
|
||||
closeable
|
||||
>
|
||||
<scan-code ref="scanCodeRef"></scan-code>
|
||||
</van-popup>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: null,
|
||||
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
|
||||
|
||||
selectCourseTime: {},
|
||||
signVisible: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"scan-code": httpVueLoader("/components/plugins/sysScanCode/index.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
onSignClose() {
|
||||
this.$refs.scanCodeRef.closeScan()
|
||||
},
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
},
|
||||
onSign(courseTime) {
|
||||
this.selectCourseTime = courseTime
|
||||
if(this.row.signType === 1) {
|
||||
this.signVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.scanCodeRef.init()
|
||||
})
|
||||
}
|
||||
if(this.row.signType === 2) {
|
||||
this.makeCode()
|
||||
}
|
||||
if(this.row.signType === 3) {
|
||||
this.$toast('此签到模式正在升级中')
|
||||
}
|
||||
},
|
||||
makeCode() {
|
||||
const url = '/platform/family/mine/passiveScan'
|
||||
const data = url + '?id=' + this.selectCourseTime.id
|
||||
console.log(data)
|
||||
const content = jrQrcode.getQrBase64(data)
|
||||
vant.ImagePreview([content])
|
||||
},
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,343 @@
|
||||
const applyForm = {
|
||||
template:
|
||||
/*language=HTML*/
|
||||
`
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="报名信息" v-model="visible">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="活动信息" class="form-section">
|
||||
<van-field label="活动名称" readonly v-model="row.courseName"></van-field>
|
||||
<van-field label="校区" readonly v-model="row.campus"></van-field>
|
||||
<van-field label="活动地点" readonly v-model="row.courseLocation"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="基础信息" class="form-section">
|
||||
<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>
|
||||
<template v-if="row.courseIsLimitApply">
|
||||
<van-field label="报名时段"
|
||||
required
|
||||
:rules="[{ required: true, message: '请选择报名时段' }]"
|
||||
readonly
|
||||
@click="showCoursePicker = true"
|
||||
placeholder="请选择报名时段"
|
||||
name="courseTimeName"
|
||||
v-model="formData.courseTimeName">
|
||||
</van-field>
|
||||
<van-popup v-model="showCoursePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="courseTimeSelectList"
|
||||
@confirm="onCourseConfirm"
|
||||
@cancel="showCoursePicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="form-section">
|
||||
<template #title>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<div>{{activity.keyWord}}信息</div>
|
||||
<div>
|
||||
<van-tag @click="delFamily" size="large" type="primary" color="#ff3b30">删除{{activity.keyWord}}</van-tag>
|
||||
<van-tag @click="addFamily" size="large" type="primary" color="#1867b0">添加{{activity.keyWord}}</van-tag>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div v-if="formData.mobileColumnsValue && formData.mobileColumnsValue.length > 0" class="mt10">
|
||||
<van-tabs v-model="familyActive" type="card" color="#0e78c5" animated>
|
||||
<van-tab v-for="item, index in formData.mobileColumnsValue"
|
||||
:name="index + ''"
|
||||
:title="activity.keyWord + (index + 1)"
|
||||
:key="index">
|
||||
<train-dynamic-form v-model="formData.mobileColumnsValue[index]"></train-dynamic-form>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div v-if="formData.mobileColumnsValue?.length === 0" class="companionList_empty_text">
|
||||
<span>
|
||||
暂无数据,请添加{{activity.keyWord}}
|
||||
</span>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="button">
|
||||
<van-button @click="onSubmit" round type="info">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
familyActive: '',
|
||||
row: {},
|
||||
activity: {},
|
||||
visible: false,
|
||||
formData: {},
|
||||
showCoursePicker: false,
|
||||
courseTimeSelectList: [],
|
||||
courseType: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"train-dynamic-form": httpVueLoader("/components/module/trainSignUp/TrainDynamicForm.vue")
|
||||
},
|
||||
methods: {
|
||||
addFamily() {
|
||||
if(this.formData.mobileColumnsValue.length >= this.activity.familyMaxCount) {
|
||||
this.$toast(this.activity.keyWord + '最多人数为' + this.activity.familyMaxCount)
|
||||
return
|
||||
}
|
||||
const list = clone(this.courseType.familyMobileSignColumnList)
|
||||
this.formData.mobileColumnsValue.push(list)
|
||||
},
|
||||
delFamily() {
|
||||
this.formData.mobileColumnsValue.splice(this.familyActive, 1)
|
||||
const ac = (Number(this.familyActive) - 1)
|
||||
this.familyActive = '' + (ac >= 0 ? ac : 0)
|
||||
},
|
||||
async onOpen(row, courseType, activity) {
|
||||
this.row = row
|
||||
this.courseType = courseType
|
||||
this.activity = activity
|
||||
|
||||
this.init(row, courseType)
|
||||
if(row.courseIsLimitApply) {
|
||||
await this.getCourseTimeSelectList(row)
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
init(row, courseType) {
|
||||
this.$set(this.formData, 'username', this.$store.state.user.username)
|
||||
this.$set(this.formData, 'loginname', this.$store.state.user.loginname)
|
||||
this.$set(this.formData, 'unionName', this.$store.state.user.union.name)
|
||||
this.$set(this.formData, 'unitName', this.$store.state.user.unit.name)
|
||||
this.$set(this.formData, 'sex', this.$store.state.user.sex)
|
||||
this.$set(this.formData, 'activityId', row.activityId)
|
||||
this.$set(this.formData, 'courseId', row.id)
|
||||
this.$set(this.formData, 'mobileColumnsValue', [])
|
||||
},
|
||||
onCourseConfirm(val){
|
||||
this.formData.activityCourseId = val.value
|
||||
this.$set(this.formData, "activityCourseId", val.value)
|
||||
this.$set(this.formData, "courseTimeName", val.text.substring(0, 12))
|
||||
this.showCoursePicker = false
|
||||
},
|
||||
async getCourseTimeSelectList(o) {
|
||||
const resp = await this.$axios.post('/platform/family/apply/getCourseTimeSelectList',{courseId: o.id})
|
||||
if (resp.code === 0) {
|
||||
this.courseTimeSelectList = resp.data
|
||||
} else {
|
||||
this.$toast.fail("获取时段信息失败,请联系管理员")
|
||||
}
|
||||
},
|
||||
validateIdCard(idCard) {
|
||||
if (!idCard) {
|
||||
return false
|
||||
}
|
||||
|
||||
// 18位身份证号码校验
|
||||
if (idCard.length === 18) {
|
||||
const idCardRegex = /^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/
|
||||
if (!idCardRegex.test(idCard)) {
|
||||
return false
|
||||
}
|
||||
|
||||
// 校验码计算
|
||||
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
|
||||
const checksums = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"]
|
||||
let sum = 0
|
||||
for (let i = 0; i < 17; i++) {
|
||||
sum += idCard[i] * weights[i]
|
||||
}
|
||||
const checksum = checksums[sum % 11]
|
||||
return checksum === idCard[17].toUpperCase()
|
||||
}
|
||||
|
||||
// 15位身份证号码校验
|
||||
else if (idCard.length === 15) {
|
||||
const idCardRegex = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/
|
||||
return idCardRegex.test(idCard)
|
||||
}
|
||||
|
||||
// 外国人或其他情况
|
||||
else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
validFamilyForm() {
|
||||
// 校验规则映射
|
||||
const validators = {
|
||||
idCard: (value) => this.validateIdCard(value),
|
||||
mobile: (value) => /^1[3-9]\d{9}$/.test(value),
|
||||
email: (value) => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)
|
||||
};
|
||||
// 显示提示弹窗(直接传完整的 message)
|
||||
const showAlert = (message) => {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: message, // 直接使用传入的完整消息
|
||||
confirmButtonColor: '#1867b0'
|
||||
});
|
||||
};
|
||||
const { mobileColumnsValue } = this.formData;
|
||||
for (let i = 0; i < mobileColumnsValue.length; i++) {
|
||||
const family = mobileColumnsValue[i];
|
||||
for (const col of family) {
|
||||
const value = col.columnValue?.trim(); // 安全处理空值和空格
|
||||
// 必填校验
|
||||
if (col.isRequired && !value) {
|
||||
const message = this.activity.keyWord + (i + 1) + '的' + col.columnName + '不能为空';
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
// 格式校验
|
||||
if (col.validRule && value) {
|
||||
const validator = validators[col.validRule];
|
||||
if (validator && !validator(value)) {
|
||||
const message = this.activity.keyWord + (i + 1) + '的' + col.columnName + '格式不正确';
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(col.validRule === 'idCard' && this.row.familyAgeLimit) {
|
||||
const parseCard = this.parseIdCard(value)
|
||||
if(this.row.minAge && parseCard.age < this.row.minAge) {
|
||||
const message = '限制报名最小年龄为' + this.row.minAge;
|
||||
showAlert(message);
|
||||
return false;
|
||||
|
||||
}
|
||||
if(this.row.maxAge && parseCard.age > this.row.maxAge) {
|
||||
const message = '限制报名最大年龄为' + this.row.maxAge;
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(col.validRule === 'idCard' && this.row.familySexLimit) {
|
||||
const parseCard = this.parseIdCard(value)
|
||||
if(this.row.familySex && parseCard.sex !== this.row.familySex) {
|
||||
const message = '限制报名性别为' + this.row.familySex;
|
||||
showAlert(message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
parseIdCard(idCard) {
|
||||
if (!idCard || (idCard.length !== 18 && idCard.length !== 15)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let birthStr = '';
|
||||
let sexCode = '';
|
||||
|
||||
if (idCard.length === 15) {
|
||||
birthStr = '19' + idCard.substring(6, 12);
|
||||
sexCode = idCard.substring(14, 15); // 15位:第15位是性别
|
||||
} else {
|
||||
birthStr = idCard.substring(6, 14);
|
||||
sexCode = idCard.substring(16, 17); // 18位:第17位是性别
|
||||
}
|
||||
|
||||
const birthYear = parseInt(birthStr.substring(0, 4), 10);
|
||||
const birthMonth = parseInt(birthStr.substring(4, 6), 10) - 1;
|
||||
const birthDay = parseInt(birthStr.substring(6, 8), 10);
|
||||
|
||||
const birthDate = new Date(birthYear, birthMonth, birthDay);
|
||||
const today = new Date();
|
||||
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
const monthDiff = today.getMonth() - birthDate.getMonth();
|
||||
const dayDiff = today.getDate() - birthDate.getDate();
|
||||
|
||||
if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) {
|
||||
age--;
|
||||
}
|
||||
|
||||
const sex = parseInt(sexCode, 10) % 2 === 1 ? '男' : '女';
|
||||
|
||||
return { age, sex, };
|
||||
},
|
||||
async validateSignUp() {
|
||||
// 获取家属人数
|
||||
const res = await this.$axios.post("/platform/family/apply/validateSignUp", {
|
||||
courseId: this.formData.courseId,
|
||||
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
|
||||
})
|
||||
if(res.code !== 0) {
|
||||
this.$dialog.alert({title: '温馨提示', message: res.msg})
|
||||
}
|
||||
return res.code === 0
|
||||
},
|
||||
async validateCourseTime() {
|
||||
const res = await this.$axios.post('/platform/family/apply/validateSourceSignUp', {
|
||||
activityCourseId: this.formData.activityCourseId,
|
||||
courseId: this.row.id
|
||||
})
|
||||
if(res.code !== 0) {
|
||||
this.$dialog.alert({title: '温馨提示', message: res.msg})
|
||||
}
|
||||
return res.code === 0
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.validFamilyForm()) return
|
||||
if (!await this.validateSignUp()) return
|
||||
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(async () => {
|
||||
if (this.row.courseIsLimitApply) {
|
||||
if(!await this.validateCourseTime()) return
|
||||
}
|
||||
|
||||
const formData = clone(this.formData)
|
||||
let array = []
|
||||
formData.mobileColumnsValue.forEach(item => {
|
||||
const o = item.map((v) => {
|
||||
return {
|
||||
columnName: v.columnName,
|
||||
columnValue: v.columnValue,
|
||||
columnCode: v.columnCode,
|
||||
columnFormType: v.columnFormType
|
||||
}
|
||||
})
|
||||
array.push(o)
|
||||
})
|
||||
formData.mobileColumnsValue = JSON.stringify(clone(array))
|
||||
this.$axios.post("/platform/family/apply/doSignUp", formData).then(res => {
|
||||
this.$dialog.alert({title: '温馨提示', message: res.msg})
|
||||
.then(() => {
|
||||
if (res.code === 0) {
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
::v-deep .companionList_empty_text {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
::v-deep .button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
.primary-color {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
.sign_button .van-button{
|
||||
width: 66px;
|
||||
height: 30px;
|
||||
font-size: 14px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.sign-success .label{
|
||||
color: #0e9558;
|
||||
}
|
||||
.sign-success .value{
|
||||
color: #0e9558;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="活动报名" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.courseTypeId" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/family/apply/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
@ready="onReady"
|
||||
>
|
||||
<template #header="{index,row}">
|
||||
<div class="item-header">
|
||||
<div class="item-title">{{ row.courseName }}</div>
|
||||
<div v-html="calcSignUpCount(row)"></div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="类型">{{row.typeName}}</table-column>
|
||||
<table-column label="校区">{{row.campus}}</table-column>
|
||||
<table-column label="地点">{{row.courseLocation}}</table-column>
|
||||
<table-column label="联系人">{{row.courseInstructor}}</table-column>
|
||||
<table-column label="时间">
|
||||
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
||||
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
|
||||
+ ' '
|
||||
+ $moment(row.courseTimes[0].courseStartTime).format('MM月DD日 HH:mm')
|
||||
+ '~'
|
||||
+ $moment(row.courseTimes[0].courseEndTime).format('HH:mm') }}
|
||||
</span>
|
||||
<span v-else @click="onTime(row)" class="primary-color">点我查看</span>
|
||||
</table-column>
|
||||
<table-column v-if="row.introduce?.trim()" label="详细信息">
|
||||
<span @click="introduceRow = row; introduceVisible = true" class="primary-color">点我查看</span>
|
||||
</table-column>
|
||||
<table-column label="报名成功" v-if="row.signValue" class="sign-success">{{row.signValue}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div v-if="activity.wechat && row.isSign" class="action-btn" @click="this.vant.ImagePreview([activity.wechat])">
|
||||
<i class="fa fa-wechat"></i>
|
||||
<span>微信群二维码</span>
|
||||
</div>
|
||||
<template v-if="$moment().isBefore($moment(activity.activitySignUpEndTime))">
|
||||
<div v-if="row.isSign === false" class="action-btn" @click="onApply(row)">
|
||||
<i class="fa fa-sign-in"></i>
|
||||
<span>我要报名</span>
|
||||
</div>
|
||||
<div v-if="row.isSign === true" class="action-btn delete" @click="onCancel(row)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>取消报名</span>
|
||||
</div>
|
||||
</template>
|
||||
<div v-if="row.isSign === true && row.isMobileSign === true && $moment().isAfter($moment(activity.activitySignUpEndTime))"
|
||||
class="action-btn"
|
||||
@click="onTime(row)"
|
||||
>
|
||||
<i class="fa fa-sign-in"></i>
|
||||
<span>签到</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<van-action-sheet :close-on-click-overlay="false" title="详细信息" v-model="introduceVisible" cancel-text="取消">
|
||||
<pdf-preview :content="introduceRow.introduce"></pdf-preview>
|
||||
</van-action-sheet>
|
||||
|
||||
<times ref="timesRef"></times>
|
||||
<apply-form ref="formRef" @refresh="refresh"></apply-form>
|
||||
</div>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/jr-qrcode/jr-qrcode.js"></script>
|
||||
<script>
|
||||
<!--#include('../common/times.js'){}#-->
|
||||
<!--#include('applyForm.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
'times': times,
|
||||
'apply-form': applyForm,
|
||||
"pdf-preview": httpVueLoader("/components/plugins/sysFilePreview/PdfIndex.vue?v=" + new Date().getTime())
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
year: new Date().getFullYear(),
|
||||
courseTypeId: null,
|
||||
activityId: GetQueryString('id'),
|
||||
dataType: GetQueryString('dataType'),
|
||||
},
|
||||
typeOptions: [],
|
||||
assortOptions: [],
|
||||
sourceTypeOptions: [],
|
||||
introduceVisible: false,
|
||||
|
||||
introduceRow: {},
|
||||
activity: {},
|
||||
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
},
|
||||
async onTime(row) {
|
||||
// 如果设置签到,并且也报名的话
|
||||
if(row.isMobileSign === true && row.isSign === true) {
|
||||
const res = await this.$axios.post('/platform/family/mine/queryCourseSign', {
|
||||
courseId: row.id
|
||||
})
|
||||
row.courseTimes = res.data
|
||||
}
|
||||
this.$refs.timesRef.onOpen(row)
|
||||
},
|
||||
onApply(row) {
|
||||
const courseType = this.sourceTypeOptions.find((v) => v.id === row.courseType)
|
||||
this.$axios.post('/platform/family/apply/validateSignUp', {
|
||||
courseId: row.id
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
} else {
|
||||
let lave = row.coursePeopleNumber - (row.hasRegisterNum + row.courseReservedNumber)
|
||||
if(row.reserveMode === 2 && lave <= 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您当前的报名为候补报名状态',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}
|
||||
this.$refs.formRef.onOpen(row, courseType, this.activity)
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel(row) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "您确定要<span style='color: red'>取消【" + row.courseName + "】</span>吗?",
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post('/platform/family/apply/cancelSignUp', {
|
||||
activityId: row.activityId,
|
||||
courseId: row.id
|
||||
})
|
||||
this.$toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
calcSignUpCount(row) {
|
||||
if(!row.coursePeopleNumber || row.coursePeopleNumber === 0) {
|
||||
return "名额数不限制"
|
||||
}
|
||||
let lave = row.coursePeopleNumber - (row.hasRegisterNum + row.courseReservedNumber)
|
||||
if(row.reserveMode === 2) {
|
||||
let lave2 = row.waitingNum - row.hasWaitingNum
|
||||
return "<span style='color: red'>余" + lave +"</span>/" + row.coursePeopleNumber + "人"
|
||||
+ ",<span style='color: red'>候补余" + lave2 + "</span>/" + row.waitingNum + "人"
|
||||
} else {
|
||||
return "<span style='color: red'>余" + lave +"</span>/" + row.coursePeopleNumber + "人"
|
||||
}
|
||||
},
|
||||
async onReady() {
|
||||
const typeList = await this.getCourseTypeList()
|
||||
this.sourceTypeOptions = clone(typeList)
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.typeName, value: v.id })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.type = this.typeOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
this.fetchActivity()
|
||||
},
|
||||
fetchActivity() {
|
||||
this.$axios.post('/platform/family/manage/findOne', {id: this.pageForm.activityId})
|
||||
.then((res) => {
|
||||
this.activity = res.data
|
||||
})
|
||||
},
|
||||
async getCourseTypeList() {
|
||||
const resp = await this.$axios.post("/platform/family/type/getAllType")
|
||||
return resp.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,347 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
.info-title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
text-align: center !important;
|
||||
}
|
||||
.info-container {
|
||||
|
||||
}
|
||||
.button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.info-img {
|
||||
display: block;
|
||||
}
|
||||
.van-count-down {
|
||||
color: #fff;
|
||||
}
|
||||
.table-list-container {
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
padding: 16px;
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .item-title {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #1f2f3d;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 1;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .img-container {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .img-container img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
|
||||
.table-list-container .table-list-item .item-meta {
|
||||
display: flex;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .meta-item i {
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .item-content {
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .item-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 12px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px dashed #eaecef;
|
||||
color: #909399;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .item-actions {
|
||||
display: flex;
|
||||
column-gap: 20px;
|
||||
justify-content: end;
|
||||
margin-top: 15px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #eaecef;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .action-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
font-size: 14px;
|
||||
color: var(--color-primary);
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .action-btn i {
|
||||
margin-right: 6px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .action-btn.delete {
|
||||
color: #ff0000;
|
||||
}
|
||||
|
||||
.table-list-container .table-list-item .action-btn.review {
|
||||
color: #67c23a;
|
||||
}
|
||||
|
||||
.table-list-container .empty-state {
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.table-list-container .empty-state i {
|
||||
font-size: 60px;
|
||||
margin-bottom: 16px;
|
||||
color: #dcdee0;
|
||||
}
|
||||
|
||||
.table-list-container .empty-state p {
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.table-column {
|
||||
display: flex;
|
||||
padding: 6px 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
max-width: 120px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #555;
|
||||
font-size: 14px;
|
||||
flex-grow: 1; /* 动态占据剩余部分 */
|
||||
white-space: nowrap; /* 防止换行 */
|
||||
overflow: hidden; /* 隐藏溢出的部分 */
|
||||
text-overflow: ellipsis; /* 省略号 */
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="亲子活动-我的报名" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityType" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/family/apply/activityPageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="activityName"
|
||||
img="cover"
|
||||
@ready="onReady"
|
||||
>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="面向对象">{{row.activityGroupName}}</table-column>
|
||||
<table-column label="报名时间">
|
||||
{{$moment(row.activitySignUpStartTime).format('MM/DD HH:mm') + '~' + $moment(row.activitySignUpEndTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
<table-column label="活动时间">
|
||||
{{$moment(row.activityStartTime).format('MM/DD HH:mm') + '~' + $moment(row.activityEndTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>活动介绍</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onInfo(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>{{row.keyWord}}信息</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onApply(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>操作</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<van-action-sheet :close-on-click-overlay="false" title="活动详细信息" v-model="infoVisible" cancel-text="取消">
|
||||
|
||||
<div class="info-container">
|
||||
<div>
|
||||
<van-image class="info-img" height="186" width="100%" :src="infoRow.cover"></van-image>
|
||||
<div class="info-title">{{infoRow.activityName}}</div>
|
||||
<pdf-preview :content="infoRow.introduce"></pdf-preview>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-action-sheet :close-on-click-overlay="false" title="报名信息" v-model="courseVisible" cancel-text="取消">
|
||||
<div class="table-list-container">
|
||||
<div v-for="(row, index) in mineCourses" :key="index" class="table-list-item">
|
||||
<div class="item-header">
|
||||
<div class="item-title" style="white-space: normal">{{ row.courseName }}</div>
|
||||
</div>
|
||||
<div style="display: flex;column-gap: 10px">
|
||||
<div class="table-column">
|
||||
<div class="label">校区:</div>
|
||||
<div class="value">{{ row.campus }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;column-gap: 10px">
|
||||
<div class="table-column">
|
||||
<div class="label">地点:</div>
|
||||
<div class="value">{{ row.courseLocation }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;column-gap: 10px">
|
||||
<div class="table-column">
|
||||
<div class="label">联系人:</div>
|
||||
<div class="value">{{ row.courseInstructor }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;column-gap: 10px">
|
||||
<div class="table-column">
|
||||
<div class="label">家属人数:</div>
|
||||
<div class="value">
|
||||
{{ row.mobileColumnsValue ? JSON.parse(row.mobileColumnsValue).length : '暂无' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-actions"></div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"pdf-preview": httpVueLoader("/components/plugins/sysFilePreview/PdfIndex.vue?v=" + new Date().getTime())
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
year: new Date().getFullYear(),
|
||||
activityType: 1,
|
||||
dataType: 'mine'
|
||||
},
|
||||
typeOptions: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '报名中', value: 2},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
infoVisible: false,
|
||||
infoRow: {},
|
||||
|
||||
mineCourses: [],
|
||||
courseVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.infoRow = row
|
||||
this.infoVisible = true
|
||||
},
|
||||
onApply(row) {
|
||||
this.$pjaxReplace('/platform/family/apply/list/h5?id=' + row.id + '&dataType=mine')
|
||||
},
|
||||
onInfo(row) {
|
||||
this.$axios.post('/platform/family/mine/queryMineCourse', {activityId: row.id})
|
||||
.then((res) => {
|
||||
this.mineCourses = res.data
|
||||
this.courseVisible = true
|
||||
})
|
||||
},
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-142
@@ -1,142 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-image {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.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;*/
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="活动详情"
|
||||
left-text="返回"
|
||||
left-arrow
|
||||
@click-left="$pjaxReplace('/platform/mobile/trainSignUpActivity/trainList')"
|
||||
></van-nav-bar>
|
||||
|
||||
<van-image height="186" src="/assets/mobile/img/trainSignUp/3quhtakfd4heeqsk6irqhft60p.png"></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-button @click="toSign" type="primary" block style="position: fixed; bottom: 0; z-index: 2">去报名</van-button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
trainType: "培训班",
|
||||
trainTypeList: [],
|
||||
tabActive: "a",
|
||||
activityId: "",
|
||||
activity: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async findOne() {
|
||||
const resp = await this.$axios.post("/platform/mobile/trainSignUpActivity/findOne", {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
}
|
||||
},
|
||||
async toSign() {
|
||||
const nowTime = this.$moment().unix()
|
||||
if (nowTime < this.$moment(this.activity.activitySignUpStartTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: "提示",
|
||||
message: "活动报名还未开始"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (nowTime > this.$moment(this.activity.activitySignUpEndTime).unix()) {
|
||||
vant.Dialog.alert({
|
||||
title: "提示",
|
||||
message: "活动报名已结束"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.activity.activityGroupId != null) {
|
||||
const isExist = await this.getScopeUser(this.activity.activityGroupId)
|
||||
if (!isExist) {
|
||||
vant.Dialog.alert({
|
||||
title: "参加人员范围",
|
||||
message: this.activity.activityGroupName
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$pjaxReplace(
|
||||
"/platform/mobile/trainSignUpActivity/trainInfo?activityId=" +
|
||||
this.activity.id +
|
||||
"&endTime=" +
|
||||
this.activity.activitySignUpEndTime +
|
||||
"&isMySign=" +
|
||||
GetQueryString("isMySign")
|
||||
)
|
||||
},
|
||||
async getScopeUser(activityGroupId) {
|
||||
const resp = await this.$axios.post("/platform/activity/basic/scope/getScopeUser", { activityGroupId: activityGroupId })
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$businessTool.getDictOptions("TRAIN_SIGNUP_TYPE").then((data) => {
|
||||
this.trainTypeList = data
|
||||
})
|
||||
this.activityId = GetQueryString("activityId")
|
||||
this.findOne()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -11,9 +11,12 @@ layout("/layouts/platform_h5.html"){
|
||||
text-align: center !important;
|
||||
}
|
||||
.info-container {
|
||||
height: calc(100vh - 46px - 44px);
|
||||
min-height: calc(100vh - 46px - 44px);
|
||||
overflow-y: auto;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
.button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.info-img {
|
||||
display: block;
|
||||
@@ -62,25 +65,27 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<van-popup v-model="infoVisible" position="right" :style="{ width: '100%', height: '100%' }">
|
||||
<van-nav-bar title="详细信息" left-text="返回" left-arrow @click-left="infoVisible = false" fixed placeholder></van-nav-bar>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="详细信息" v-model="infoVisible">
|
||||
|
||||
<div class="info-container">
|
||||
<van-image class="info-img" height="186" width="100%" :src="infoRow.cover"></van-image>
|
||||
<div class="info-title">{{infoRow.activityName}}</div>
|
||||
<pdf-preview style="height: calc(100vh - 46px - 44px - 186px - 57px)" :content="infoRow.introduce"></pdf-preview>
|
||||
<div>
|
||||
<van-image class="info-img" height="186" width="100%" :src="infoRow.cover"></van-image>
|
||||
<div class="info-title">{{infoRow.activityName}}</div>
|
||||
<pdf-preview :content="infoRow.introduce"></pdf-preview>
|
||||
</div>
|
||||
<div class="button">
|
||||
<van-button @click="onApply(infoRow)" type="primary" block>
|
||||
<span v-if="time >= 0">
|
||||
去报名
|
||||
</span>
|
||||
<template v-else>
|
||||
距离开始
|
||||
<van-count-down :time="Math.abs(time)" class="count-down" format="DD 天 HH 时 mm 分 ss 秒" @finish="time = 0"></van-count-down>
|
||||
</template>
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button @click="onApply(infoRow)" type="primary" block>
|
||||
<span v-if="time >= 0">
|
||||
去报名
|
||||
</span>
|
||||
<template v-else>
|
||||
距离开始
|
||||
<van-count-down :time="Math.abs(time)" class="count-down" format="DD 天 HH 时 mm 分 ss 秒" @finish="time = 0"></van-count-down>
|
||||
</template>
|
||||
</van-button>
|
||||
</van-popup>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -100,7 +105,7 @@ layout("/layouts/platform_h5.html"){
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
year: new Date().getFullYear(),
|
||||
activityType: 2,
|
||||
activityType: 4,
|
||||
},
|
||||
typeOptions: [
|
||||
{text: '全部', value: 1},
|
||||
|
||||
@@ -3,8 +3,7 @@ const applyForm = {
|
||||
/*language=HTML*/
|
||||
`
|
||||
<div>
|
||||
<van-popup v-model="visible" position="right" :style="{ width: '100%', height: '100%', 'background-color': '#F7F8FA' }">
|
||||
<van-nav-bar title="报名信息" left-text="返回" left-arrow @click-left="visible = false" fixed placeholder></van-nav-bar>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="报名信息" v-model="visible">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="活动信息" class="form-section">
|
||||
<van-field label="活动名称" readonly v-model="row.courseName"></van-field>
|
||||
@@ -18,12 +17,12 @@ const applyForm = {
|
||||
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="性别" readonly v-model="formData.sex"></van-field>
|
||||
<template v-if="row.courseIsLimitApply">
|
||||
<van-field label="报名时段"
|
||||
required
|
||||
<van-field label="报名时段"
|
||||
required
|
||||
:rules="[{ required: true, message: '请选择报名时段' }]"
|
||||
readonly
|
||||
readonly
|
||||
@click="showCoursePicker = true"
|
||||
placeholder="请选择报名时段"
|
||||
placeholder="请选择报名时段"
|
||||
name="courseTimeName"
|
||||
v-model="formData.courseTimeName">
|
||||
</van-field>
|
||||
@@ -39,11 +38,11 @@ const applyForm = {
|
||||
<train-dynamic-form v-model="dynamicColumnsData" ref="dynamicForm"></train-dynamic-form>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="button">
|
||||
<van-button @click="onSubmit" round type="info">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-popup>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
@@ -61,15 +60,15 @@ const applyForm = {
|
||||
"train-dynamic-form": httpVueLoader("/components/module/trainSignUp/TrainDynamicForm.vue")
|
||||
},
|
||||
methods: {
|
||||
async onOpen(row, course) {
|
||||
async onOpen(row, courseType) {
|
||||
this.row = row
|
||||
this.init(row, course)
|
||||
this.init(row, courseType)
|
||||
if(row.courseIsLimitApply) {
|
||||
await this.getCourseTimeSelectList(row)
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
init(row, course) {
|
||||
init(row, courseType) {
|
||||
this.$set(this.formData, 'username', this.$store.state.user.username)
|
||||
this.$set(this.formData, 'loginname', this.$store.state.user.loginname)
|
||||
this.$set(this.formData, 'unionName', this.$store.state.user.union.name)
|
||||
@@ -78,7 +77,7 @@ const applyForm = {
|
||||
this.$set(this.formData, 'activityId', row.activityId)
|
||||
this.$set(this.formData, 'courseId', row.id)
|
||||
|
||||
this.dynamicColumnsData = course ? course.trainMobileSignColumnList : []
|
||||
this.dynamicColumnsData = courseType ? courseType.trainMobileSignColumnList : []
|
||||
this.dynamicColumnsData.forEach((item) => {
|
||||
item.columnValue = this.$store.state.user[item.columnCode] || ""
|
||||
})
|
||||
@@ -151,6 +150,10 @@ const applyForm = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
.button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
@@ -37,11 +37,16 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="类型">{{row.typeName}}</table-column>
|
||||
<table-column label="校区">{{row.campus}}</table-column>
|
||||
<table-column label="地点">{{row.courseLocation}}</table-column>
|
||||
<table-column label="联系人">{{row.courseInstructor}}</table-column>
|
||||
<table-column label="时间">
|
||||
<span v-if="row.courseTimes && row.courseTimes.length === 1">
|
||||
{{ $moment(row.courseTimes[0].courseStartTime).format('HH:mm') + '~' + $moment(row.courseTimes[0].courseEndTime).format('HH:mm') }}
|
||||
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
||||
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
|
||||
+ ' '
|
||||
+ $moment(row.courseTimes[0].courseStartTime).format('MM月DD日 HH:mm')
|
||||
+ '~'
|
||||
+ $moment(row.courseTimes[0].courseEndTime).format('HH:mm') }}
|
||||
</span>
|
||||
<span v-else @click="onTime(row)" class="primary-color">点我查看</span>
|
||||
</table-column>
|
||||
@@ -74,10 +79,9 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<van-popup v-model="introduceVisible" position="right" :style="{ width: '100%', height: '100%', 'background-color': '#F7F8FA' }">
|
||||
<van-nav-bar title="详细信息" left-text="返回" left-arrow @click-left="introduceVisible = false" fixed placeholder></van-nav-bar>
|
||||
<pdf-preview style="height: calc(100vh - 46px)" :content="introduceRow.introduce"></pdf-preview>
|
||||
</van-popup>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="详细信息" v-model="introduceVisible" cancel-text="取消">
|
||||
<pdf-preview :content="introduceRow.introduce"></pdf-preview>
|
||||
</van-action-sheet>
|
||||
|
||||
<times ref="timesRef"></times>
|
||||
<apply-form ref="formRef" @refresh="refresh"></apply-form>
|
||||
@@ -114,6 +118,8 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
introduceRow: {},
|
||||
activity: {},
|
||||
|
||||
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -131,7 +137,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$refs.timesRef.onOpen(row)
|
||||
},
|
||||
onApply(row) {
|
||||
const course = this.sourceTypeOptions.find((v) => v.id === row.courseType)
|
||||
const courseType = this.sourceTypeOptions.find((v) => v.id === row.courseType)
|
||||
this.$axios.post('/platform/trainSingUp/apply/validateSignUp', {
|
||||
courseId: row.id
|
||||
})
|
||||
@@ -151,7 +157,7 @@ layout("/layouts/platform_h5.html"){
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
}
|
||||
this.$refs.formRef.onOpen(row, course)
|
||||
this.$refs.formRef.onOpen(row, courseType)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -172,6 +178,9 @@ layout("/layouts/platform_h5.html"){
|
||||
}).catch(() => {})
|
||||
},
|
||||
calcSignUpCount(row) {
|
||||
if(!row.coursePeopleNumber || row.coursePeopleNumber === 0) {
|
||||
return "名额数不限制"
|
||||
}
|
||||
let lave = row.coursePeopleNumber - (row.hasRegisterNum + row.courseReservedNumber)
|
||||
if(row.reserveMode === 2) {
|
||||
let lave2 = row.waitingNum - row.hasWaitingNum
|
||||
|
||||
@@ -11,9 +11,12 @@ layout("/layouts/platform_h5.html"){
|
||||
text-align: center !important;
|
||||
}
|
||||
.info-container {
|
||||
height: calc(100vh - 46px - 44px);
|
||||
min-height: calc(100vh - 46px - 44px);
|
||||
overflow-y: auto;
|
||||
|
||||
}
|
||||
.button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.info-img {
|
||||
display: block;
|
||||
@@ -62,17 +65,16 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<van-popup v-model="infoVisible" position="right" :style="{ width: '100%', height: '100%' }">
|
||||
<van-nav-bar title="详细信息" left-text="返回" left-arrow @click-left="infoVisible = false" fixed placeholder></van-nav-bar>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="活动详细信息" v-model="infoVisible" cancel-text="取消">
|
||||
|
||||
<div class="info-container">
|
||||
<van-image class="info-img" height="186" width="100%" :src="infoRow.cover"></van-image>
|
||||
<div class="info-title">{{infoRow.activityName}}</div>
|
||||
<pdf-preview style="height: calc(100vh - 46px - 44px - 186px - 57px)" :content="infoRow.introduce"></pdf-preview>
|
||||
<div>
|
||||
<van-image class="info-img" height="186" width="100%" :src="infoRow.cover"></van-image>
|
||||
<div class="info-title">{{infoRow.activityName}}</div>
|
||||
<pdf-preview :content="infoRow.introduce"></pdf-preview>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button @click="onApply(infoRow)" type="primary" block>下一步</van-button>
|
||||
</van-popup>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,817 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
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;
|
||||
}
|
||||
|
||||
.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-tabs__nav--complete {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
:title="trainType + '列表'"
|
||||
left-text="返回"
|
||||
left-arrow
|
||||
@click-left="$pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?isMySign=' + isMySign)"
|
||||
></van-nav-bar>
|
||||
|
||||
<van-sticky>
|
||||
<van-dropdown-menu>
|
||||
<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-tabs v-if="activityStatus != '1' && assortList.length > 0" v-model="assort" type="card" style="margin-top: 10px" @click="tabClick">
|
||||
<van-tab v-for="item in assortList" :key="item" :name="item" :title="item"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<template>
|
||||
<div id="parentDiv" 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 :plain="false" type="primary" size="medium">{{getCourseTypeName(o)}}</van-tag>
|
||||
<span style="font-weight: bold; font-size: 14px">
|
||||
{{o.courseName}}
|
||||
<span v-if="activityStatus !== '1'">
|
||||
<span v-html="calcSignUpCount(o)"></span>
|
||||
</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(tableData.wechat)" v-if="o.isSign === true && tableData.wechat" style="color: #dd6363">
|
||||
点我查看微信群二维码
|
||||
</span>
|
||||
</div>
|
||||
<van-button
|
||||
type="primary"
|
||||
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="o.isSign === true && $moment().valueOf() < $moment(activity.activitySignUpEndTime).valueOf()"
|
||||
style="position: absolute; left: 74%; bottom: 10%; width: 74px; height: 28px"
|
||||
@click.stop="cancel(o)"
|
||||
>
|
||||
取消报名
|
||||
</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/trainSignUp/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 image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"></van-empty>
|
||||
</template>
|
||||
|
||||
<van-popup v-model:show="popupShow" class="popup">
|
||||
<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"
|
||||
:key="index"
|
||||
thumb="/assets/mobile/svg/trainSignUp/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 && activityStatus === '1'">
|
||||
<van-button
|
||||
type="primary"
|
||||
color="#1867b0"
|
||||
round
|
||||
size="mini"
|
||||
@click.stop="showQRCode(item, 2)"
|
||||
v-if="(item.isAttend === true && course.giftType === 1 && item.state === 1)
|
||||
|| ($moment().unix() > $moment(item.courseEndTime).unix() && item.state === 3 && 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="(item.isAttend === false && findTime(item) === false && item.state === 1)
|
||||
|| ($moment().unix() > $moment(item.courseEndTime).unix() && item.state === 3 && item.isAttend === 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="(item.isAttend === false && findTime(item) === true && item.state === 1)
|
||||
|| ($moment().unix() > $moment(item.courseEndTime).unix() && item.state === 3 && item.isAttend === false)"
|
||||
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="(item.isAttend === true && item.state === 1)
|
||||
|| ($moment().unix() > $moment(item.courseEndTime).unix() && item.state === 3 && 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" left-text="返回" fixed left-arrow placeholder title="活动报名"></van-nav-bar>
|
||||
<div class="join_content">
|
||||
<van-form @submit="joinSubmit" :show-error-message="false">
|
||||
<div class="van-doc-card-two" style="margin: 0 0 16px 0">
|
||||
<div></div>
|
||||
<div class="van-card-header">基础信息</div>
|
||||
<div class="van-card-body">
|
||||
<van-field name="userName" label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field name="loginName" label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field name="unitName" label="所在单位" readonly v-model="formData.unitName"></van-field>
|
||||
<van-field name="unionName" label="所属工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field name="sex" label="性别" readonly v-model="formData.sex"></van-field>
|
||||
<van-field
|
||||
label="联系方式"
|
||||
required
|
||||
name="mobile"
|
||||
:rules="[{ required: true, message: '请填写联系方式' }]"
|
||||
placeholder="请填写联系方式"
|
||||
v-model="formData.mobile"
|
||||
></van-field>
|
||||
<train-dynamic-form v-model="dynamicColumnsData" ref="trainDynamicForm"></train-dynamic-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button class="join_submit" type="primary">提交报名</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/jr-qrcode/jr-qrcode.js"></script>
|
||||
<script>
|
||||
let locations = null
|
||||
let map = null
|
||||
let geolocation = null
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tableData: [],
|
||||
formData: {},
|
||||
assort: "",
|
||||
assortList: [],
|
||||
allColumnsData: [],
|
||||
dynamicColumnsData: [],
|
||||
trainType: "培训班",
|
||||
trainTypeList: [],
|
||||
actionShow: false,
|
||||
timeList: [],
|
||||
activityId: "",
|
||||
activityStatus: "0",
|
||||
joinPopup: false,
|
||||
popupShow: false,
|
||||
courseText: "",
|
||||
qdInfoList: [],
|
||||
course: [],
|
||||
qdArray: [],
|
||||
activityOptions: [
|
||||
{ text: "全部", value: "0" },
|
||||
{ text: "我报名的", value: "1" }
|
||||
],
|
||||
courseOptions: [],
|
||||
courseType: "0",
|
||||
tempArray: [],
|
||||
activitySignUpStartTime: null,
|
||||
choose: {},
|
||||
activity: "",
|
||||
isMySign: 0
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"train-dynamic-form": httpVueLoader("/components/module/trainSignUp/TrainDynamicForm.vue")
|
||||
},
|
||||
methods: {
|
||||
tabClick(name, title) {
|
||||
if (this.courseType === "0" && this.activityStatus !== "1") {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter((o) => o.assort === title)
|
||||
} else {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter((o) => o.assort === title && o.courseType === this.courseType)
|
||||
}
|
||||
},
|
||||
calcSignUpCount(o) {
|
||||
let lave = (o.coursePeopleNumber + o.hasWaitingNum) - (o.hasRegisterNum + o.courseReservedNumber)
|
||||
if(o.reserveMode === 2) {
|
||||
let lave2 = o.waitingNum - o.hasWaitingNum
|
||||
let str = "(<span style='color: red'>余" + lave +"</span>/" + o.coursePeopleNumber + "人"
|
||||
+ ",<span style='color: red'>候补余" + lave2 + "</span>/" + o.waitingNum + "人)"
|
||||
return str
|
||||
} else {
|
||||
return "(<span style='color: red'>余" + lave +"</span>/" + o.coursePeopleNumber + "人)"
|
||||
}
|
||||
},
|
||||
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 = this.$moment().format("YYYY-MM-DD")
|
||||
return o.courseStartTime.substr(0, 10) === today
|
||||
},
|
||||
findQd() {
|
||||
const today = this.$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
|
||||
}
|
||||
if (o.signType === 2) {
|
||||
this.showQRCode(o, 1)
|
||||
}
|
||||
if (o.signType === 3) {
|
||||
const start = 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 this.$axios.post("/platform/mobile/trainSignUpActivity/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 this.$axios.post("/platform/mobile/trainSignUpActivity/cancelSignUp", {
|
||||
activityId: o.activityId,
|
||||
courseId: o.id
|
||||
})
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
async signUp(o) {
|
||||
this.choose = o
|
||||
|
||||
const res = await this.$axios.post("/platform/mobile/trainSignUpActivity/validateSignUp", {
|
||||
courseId: o.id
|
||||
})
|
||||
if (res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: "提示",
|
||||
message: res.msg
|
||||
})
|
||||
if (res.code !== 3) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
userName: this.$store.state.user.username,
|
||||
loginName: this.$store.state.user.loginname,
|
||||
mobile: this.$store.state.user.mobile,
|
||||
sex: this.$store.state.user.sex,
|
||||
birthday: this.$store.state.user.birthday,
|
||||
unionName: this.$store.state.user.union.name,
|
||||
unitName: this.$store.state.user.unit.name
|
||||
}
|
||||
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
|
||||
//获取家属是多少人
|
||||
let per = 0
|
||||
this.dynamicColumnsData.forEach((item) => {
|
||||
if (item.columnCode === "xdqsrs") {
|
||||
per += Number(item.columnValue)
|
||||
}
|
||||
})
|
||||
const res = await this.$axios.post("/platform/mobile/trainSignUpActivity/validateSignUp", {
|
||||
courseId: this.choose.id,
|
||||
currentFamilyNumber: per
|
||||
})
|
||||
if (res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: "提示",
|
||||
message: res.msg
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
vant.Dialog.confirm({
|
||||
title: "温馨提示",
|
||||
message: "您确定要选择【" + this.choose.courseName + "】吗?"
|
||||
})
|
||||
.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 this.$axios.post("/platform/mobile/trainSignUpActivity/doSignUp", this.formData)
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
await 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 this.$axios.post("/platform/mobile/trainSignUpActivity/findOne", {
|
||||
id: this.activityId,
|
||||
tabIndex: this.activityStatus
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.assortList = Array.from(new Set(this.tableData.courseList.map((o) => o.assort).filter((o) => o !== "" && o !== undefined)))
|
||||
this.tempArray = JSON.parse(JSON.stringify(this.tableData))
|
||||
if (this.assortList.length > 0 && this.activityStatus !== "1") {
|
||||
this.tableData.courseList = this.tableData.courseList.filter((o) => o.assort === this.assortList[0])
|
||||
}
|
||||
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 this.$axios.post("/platform/mobile/trainSignUpActivity/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.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await this.$axios.post("/platform/trainSingUp/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.typeName, value: item.id })
|
||||
}
|
||||
this.courseText = this.courseText.substr(0, this.courseText.length - 1)
|
||||
},
|
||||
courseChange(value, item) {
|
||||
if (item === undefined) {
|
||||
this.tableData.courseList = []
|
||||
}
|
||||
if (this.assortList.length > 0 && this.activityStatus !== "1") {
|
||||
if (value === "0") {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter((o) => o.assort === this.assort)
|
||||
} else {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(
|
||||
(item) => item.courseType === value && item.assort === this.assort
|
||||
)
|
||||
}
|
||||
} else {
|
||||
this.tableData.courseList =
|
||||
value === "0" ? this.tempArray.courseList : this.tempArray.courseList.filter((item) => item.courseType === value)
|
||||
}
|
||||
},
|
||||
async getActivity() {
|
||||
const resp = await this.$axios.post("/platform/mobile/trainSignUpActivity/findOne", {
|
||||
id: this.activityId,
|
||||
tabIndex: 0
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.activity = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$businessTool.getDictOptions("TRAIN_SIGNUP_TYPE").then((data) => {
|
||||
this.trainTypeList = data
|
||||
})
|
||||
this.activityId = GetQueryString("activityId")
|
||||
this.isMySign = Number(GetQueryString("isMySign"))
|
||||
const time = GetQueryString("endTime")
|
||||
if (this.isMySign === 1) {
|
||||
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.pageData()
|
||||
await this.getCourseText()
|
||||
await this.getActivity()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,258 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.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;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="活动列表" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList" @change="formChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityStatus" :options="activityStatusList" @change="formChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list :finished="finished" finished-text="没有更多了" v-if="tableData && tableData.length>0" v-model="loading" @load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<div>
|
||||
<div class="tag" style="background-color: #bc62c5" v-if="o.isDisabled">活动未开启</div>
|
||||
<div class="tag" v-else-if="!o.isDisabled && $moment(o.activitySignUpStartTime).valueOf() > $moment().valueOf()">未开始报名</div>
|
||||
<div
|
||||
class="tag"
|
||||
v-else-if="!o.isDisabled && $moment(o.activitySignUpEndTime).valueOf() > $moment().valueOf() && $moment().valueOf() > $moment(o.activitySignUpStartTime).valueOf()"
|
||||
>
|
||||
报名中
|
||||
</div>
|
||||
<div
|
||||
class="tag"
|
||||
style="background-color: #f14646"
|
||||
v-else-if="!o.isDisabled && $moment(o.activityEndTime).valueOf() < $moment().valueOf() && $moment().valueOf() < $moment(o.activityStartTime).valueOf()"
|
||||
>
|
||||
报名结束
|
||||
</div>
|
||||
<div
|
||||
class="tag"
|
||||
v-else-if="!o.isDisabled && $moment(o.activityStartTime).valueOf() < $moment().valueOf() && $moment().valueOf() < $moment(o.activityEndTime).valueOf()"
|
||||
>
|
||||
活动进行中
|
||||
</div>
|
||||
<div
|
||||
class="tag"
|
||||
style="background-color: #f14646"
|
||||
v-else-if="!o.isDisabled && $moment().valueOf() > $moment(o.activityEndTime).valueOf()"
|
||||
>
|
||||
活动结束
|
||||
</div>
|
||||
</div>
|
||||
<div @click="activityClick(o)">
|
||||
<div>
|
||||
<van-image :src="o.cover" style="display: contents" v-if="o.cover"></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>
|
||||
<span>{{o.year}}</span>
|
||||
</div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">活动对象:</span>
|
||||
<span>{{o.activityGroupName}}</span>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title">
|
||||
<span style="color: grey">报名时间:</span>
|
||||
<span>{{$moment(o.activitySignUpStartTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
<span>~</span>
|
||||
<span>{{$moment(o.activitySignUpEndTime).format('YYYY-MM-DD HH:mm') }}</span>
|
||||
</div>
|
||||
<div style="margin-top: 6px">
|
||||
<span style="color: grey">活动时间:</span>
|
||||
<span>{{$moment(o.activityStartTime).format('YYYY-MM-DD HH:mm')}}</span>
|
||||
<span>~</span>
|
||||
<span>{{$moment(o.activityEndTime).format('YYYY-MM-DD HH:mm') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-else image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-tabbar v-model="pageForm.activityType" @change="doSearch">
|
||||
<van-tabbar-item icon="wap-home-o">活动列表</van-tabbar-item>
|
||||
<van-tabbar-item icon="user-o">我报名的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
finished: false,
|
||||
loading: false,
|
||||
tableData: [],
|
||||
tarBarActive: 0,
|
||||
pageForm: {
|
||||
year: "",
|
||||
activityStatus: null,
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
activityType: 0
|
||||
},
|
||||
activityLevelList: [],
|
||||
activityStatusList: [
|
||||
{ text: "全部", value: 1 },
|
||||
{ text: "未开始", value: 6 },
|
||||
{ text: "报名中", value: 2 },
|
||||
{ text: "进行中", value: 3 },
|
||||
{ text: "已结束", value: 4 }
|
||||
],
|
||||
yearList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createYearList() {
|
||||
for (let i = new Date().getFullYear() - 50; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({ value: i, text: i + "年" })
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
formChange() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
async activityClick(o) {
|
||||
if (o.isDisabled) {
|
||||
this.$toast("活动未开启")
|
||||
return
|
||||
}
|
||||
if (this.$moment(o.applyStartTime).valueOf() > this.$moment().valueOf()) {
|
||||
this.$toast("活动未开始报名")
|
||||
return
|
||||
}
|
||||
this.$pjaxReplace(
|
||||
"/platform/mobile/trainSignUpActivity/activityInfo?activityId=" +
|
||||
o.id +
|
||||
"&endTime=" +
|
||||
o.activitySignUpEndTime +
|
||||
"&isMySign=" +
|
||||
this.pageForm.activityType
|
||||
)
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await this.$axios.post("/platform/mobile/trainSignUpActivity/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
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
async init() {
|
||||
this.$set(this.pageForm, "activityStatus", 1)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.createYearList()
|
||||
await this.init()
|
||||
this.pageData()
|
||||
this.pageForm.activityType = Number(GetQueryString("isMySign"))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,7 +1,7 @@
|
||||
const INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div>
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="填写人姓名">{{viewData.proxyUserName}}</van-cell>
|
||||
<van-cell title="填写人工号">{{viewData.proxyLoginName}}</van-cell>
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="咨询师预约" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
</van-sticky>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
searchKeyword: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,62 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style scoped>
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="咨询师列表" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div >
|
||||
<div class="consultant-list">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
consultantList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
async pageData(){
|
||||
const resp = await this.$axios.post('/platform/psychology/index/listConsultantByH5')
|
||||
if (resp.code === 0) {
|
||||
this.consultantList = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,181 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style scoped>
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.grid-menu {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
margin-bottom: 20px;
|
||||
height: 100px;
|
||||
background: white;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
transition:
|
||||
transform 0.3s ease,
|
||||
box-shadow 0.3s ease;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.menu-item {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.menu-item img {
|
||||
border-radius: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.menu-text {
|
||||
font-size: 13px;
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
.consultant, .article {
|
||||
margin-bottom: 20px;
|
||||
height: 200px;
|
||||
background: white;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
transition:
|
||||
transform 0.3s ease,
|
||||
box-shadow 0.3s ease;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.consultant-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
padding: 2px 14px;
|
||||
}
|
||||
|
||||
.consultant-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.consultant-item {
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.consultant-item img {
|
||||
border-radius: 3px 8px;
|
||||
border: 1px solid #3498db;
|
||||
width: 100%;
|
||||
height: 115px;
|
||||
}
|
||||
|
||||
.consultant-name{
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
}
|
||||
</style>
|
||||
<div id="app">
|
||||
<van-nav-bar title="心理咨询" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
<div class="container">
|
||||
<!-- 入口 -->
|
||||
<div class="grid-menu">
|
||||
<div v-for="item in menuList" :key="item.name" class="menu-item" @click="enterQuick">
|
||||
<div class="menu-icon">
|
||||
<img slot="icon" :src="item.icon">
|
||||
</div>
|
||||
<div class="menu-text">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 咨询师列表 -->
|
||||
<div class="consultant">
|
||||
<div class="consultant-title">
|
||||
<div style="font-weight: bold;font-size: 19px">
|
||||
推荐咨询师
|
||||
</div>
|
||||
<div style="color: gray;font-size: 14px" @click="showAllConsultant">更多>></div>
|
||||
</div>
|
||||
<div v-if="consultantList && consultantList.length > 0" class="consultant-list">
|
||||
<div v-for="(item, index) in consultantList" :key="index"
|
||||
class="consultant-item" @click="showConsultant(item)">
|
||||
<div class="consultant-avatar">
|
||||
<img slot="icon" :src="item.avatar">
|
||||
</div>
|
||||
<div class="consultant-name">
|
||||
{{ item.userName }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="text-align: center;padding: 20px">
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 文章列表 -->
|
||||
<div class="article">
|
||||
<div class="article-title" style="padding: 10px 15px;">
|
||||
<div style="font-weight: bold;font-size: 19px">
|
||||
文章列表
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
menuList: [
|
||||
{name: '通知公告', icon: 'https://img01.yzcdn.cn/vant/apple-1.jpg', url: '/platform/h5/home'},
|
||||
{name: '预约日历', icon: 'https://img01.yzcdn.cn/vant/apple-1.jpg', url: '/platform/h5/home'},
|
||||
{name: '分类预约', icon: 'https://img01.yzcdn.cn/vant/apple-1.jpg', url: '/platform/h5/home'},
|
||||
{name: '咨询师列表', icon: 'https://img01.yzcdn.cn/vant/apple-1.jpg', url: '/platform/h5/home'},
|
||||
],
|
||||
|
||||
consultantList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
// 快速入口跳转
|
||||
enterQuick(item) {
|
||||
console.log(item)
|
||||
},
|
||||
|
||||
// 查看所有咨询师,跳转到咨询师列表页面
|
||||
showAllConsultant(){
|
||||
|
||||
},
|
||||
|
||||
// 查看单个咨询师,跳转到这个咨询师的详情页面
|
||||
showConsultant(item){
|
||||
console.log(item)
|
||||
},
|
||||
|
||||
// 查询咨询师列表
|
||||
async listConsultant(){
|
||||
const resp = await this.$axios.post('/platform/psychology/index/listConsultantByH5')
|
||||
if (resp.code === 0) {
|
||||
this.consultantList = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listConsultant()
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,7 +1,7 @@
|
||||
const INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div>
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
|
||||
+51
-51
@@ -1,63 +1,63 @@
|
||||
const MOBILE_MEMBER_INFO = {
|
||||
template: `
|
||||
<div>
|
||||
template: /*language=HTML*/ `
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
|
||||
<van-cell title="姓名">{{ viewData.username }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
|
||||
<van-cell title="民族">{{ viewData.nation }}</van-cell>
|
||||
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.nation }}</van-cell>
|
||||
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
|
||||
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
|
||||
|
||||
<van-cell title="学历">{{ viewData.education }}</van-cell>
|
||||
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
|
||||
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
|
||||
<van-cell title="学历">{{ viewData.education }}</van-cell>
|
||||
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
|
||||
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
|
||||
|
||||
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
|
||||
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
|
||||
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
|
||||
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
|
||||
|
||||
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
|
||||
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
|
||||
|
||||
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
|
||||
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
|
||||
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
|
||||
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
|
||||
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
|
||||
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
|
||||
|
||||
<template v-if="viewData.loginname === $store.state.user.loginnmae">
|
||||
<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.families" :key="index">
|
||||
<td class="table-cell">{{ index + 1 }}</td>
|
||||
<td class="table-cell">{{ item.relation }}</td>
|
||||
<td class="table-cell">{{ item.name }}</td>
|
||||
<td class="table-cell">{{ item.unit }}</td>
|
||||
<td class="table-cell">{{ item.remark }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell>
|
||||
<template v-if="viewData.loginname === $store.state.user.loginnmae">
|
||||
<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.families" :key="index">
|
||||
<td class="table-cell">{{ index + 1 }}</td>
|
||||
<td class="table-cell">{{ item.relation }}</td>
|
||||
<td class="table-cell">{{ item.name }}</td>
|
||||
<td class="table-cell">{{ item.unit }}</td>
|
||||
<td class="table-cell">{{ item.remark }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="个人简历">
|
||||
<template #label>
|
||||
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
|
||||
<span style="font-size: 14px" v-else>无数据</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
</van-cell-group>
|
||||
<van-cell title="个人简历">
|
||||
<template #label>
|
||||
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
|
||||
<span style="font-size: 14px" v-else>无数据</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
</template>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user