commit
This commit is contained in:
@@ -0,0 +1,210 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="signDialog" title="信息填写" width="50%" append-to-body>
|
||||
<el-form :model="formData" ref="form" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工号" prop="loginname">
|
||||
<el-input readonly v-model="formData.loginname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属单位" prop="unitName">
|
||||
<el-input readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属工会" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-input readonly v-model="formData.sex"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--<el-col :span="24">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="courseRow.courseIsLimitApply">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="报名时段" prop="activityCourseId"
|
||||
:rules="{ required: true, message: '请选择报名时段', trigger: 'blur'}">
|
||||
<el-select style="width: 100%" v-model="formData.activityCourseId" placeholder="请选择报名时段">
|
||||
<el-option v-for="item in courseTimeSelectList"
|
||||
:label="item.text.substring(0, 12)"
|
||||
:value="item.value"
|
||||
:key="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item
|
||||
v-for="(column, index) in formData.mobileSignColumnList"
|
||||
:prop="'mobileSignColumnList.' + index + '.columnValue'"
|
||||
: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)">
|
||||
<el-input
|
||||
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)">
|
||||
<el-select v-model="column.columnValue" :placeholder="'请选择' + column.columnName" style="width: 100%">
|
||||
<el-option v-for="item in column.selectValues" :key="item" :label="item" :value="item"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<!--时间框-->
|
||||
<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'"
|
||||
></el-date-picker>
|
||||
</template>
|
||||
<!--文件-->
|
||||
<template v-else-if="['JSON'].includes(column.columnType)">
|
||||
<file-upload :upload_number="column.fileNumber" :value.sync="column.columnValue"
|
||||
:accept="column.fileType ? column.fileType.join(',') : ''"
|
||||
upload_result_type="url"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="signDialog = false">取 消</el-button>
|
||||
<el-button @click="onSubmit" type="primary">提 交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
signDialog: false,
|
||||
formData: {},
|
||||
courseRow: {},
|
||||
courseTimeSelectList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getCourseTimeSelectList(o) {
|
||||
const resp = await $.post('/platform/fellowship/apply/getCourseTimeSelectList',{ courseId: o.id })
|
||||
if (resp.code === 0) {
|
||||
this.courseTimeSelectList = resp.data
|
||||
} else {
|
||||
this.$message.warning('获取时段信息失败,请联系管理员')
|
||||
}
|
||||
},
|
||||
async onOpen(row, course) {
|
||||
this.initData(row, course)
|
||||
if (row.courseIsLimitApply) {
|
||||
await this.getCourseTimeSelectList(row)
|
||||
}
|
||||
this.courseRow = row
|
||||
this.signDialog = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.clearValidate()
|
||||
})
|
||||
},
|
||||
async validateSignUp() {
|
||||
// 获取家属人数
|
||||
let familyCount = this.formData.mobileSignColumnList.filter(o => o.columnCode === 'xdqsrs').reduce((sum, item) => {
|
||||
return sum + (Number(item.columnValue) || 0)
|
||||
}, 0)
|
||||
const res = await this.$axios.post("/platform/fellowship/apply/validateSignUp", {
|
||||
courseId: this.formData.courseId,
|
||||
currentFamilyNumber: familyCount
|
||||
})
|
||||
return res.code === 0
|
||||
},
|
||||
async validateCourseTime() {
|
||||
const res = await this.$axios.post('/platform/fellowship/apply/validateSourceSignUp', {
|
||||
activityCourseId: this.formData.activityCourseId,
|
||||
courseId: this.courseRow.id
|
||||
})
|
||||
return res.code === 0
|
||||
},
|
||||
async onSubmit() {
|
||||
if(!await this.validateSignUp()) return
|
||||
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if(this.courseRow.courseIsLimitApply && !await this.validateCourseTime()) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const mobileColumnsValue = this.formData.mobileSignColumnList.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/fellowship/apply/doSignUp", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.signDialog = false
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initData(row, course) {
|
||||
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, 'mobileSignColumnList', course.mobileSignColumnList)
|
||||
|
||||
this.formData.mobileSignColumnList.forEach((item) => {
|
||||
item.columnValue = this.$store.state.user[item.columnCode] || ""
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
<!--#include('applyForm.js'){}#-->
|
||||
const courseList = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<!--<el-col :span="5">
|
||||
<div class="glow-box">
|
||||
<img :src="activity.cover"/>
|
||||
<div class="title">{{ activity.activityName }}</div>
|
||||
<div v-html="activity.introduce"></div>
|
||||
</div>
|
||||
</el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-row class="query-row">
|
||||
<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"
|
||||
>
|
||||
<el-option v-for="item in courseTypeList" :key="item.id" :label="item.typeName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="query-row" v-if="assortList && assortList.length > 0">
|
||||
<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"
|
||||
>
|
||||
{{ item }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop=='courseLocationCoordinates'">
|
||||
<el-button style="padding: 0" @click="openViewMap(row.courseLocationCoordinates)" type="text">
|
||||
{{row.courseLocation}}
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<template v-slot="{row}" v-else-if="column.prop=='courseTime'">
|
||||
<el-button style="padding: 0" @click="openViewCourseTime(row.id)" type="text">点击查看时间</el-button>
|
||||
</template>
|
||||
|
||||
<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}">
|
||||
<el-button v-if="!row.isSign" type="primary" size="mini" @click="onSign(row)">我要报名</el-button>
|
||||
<el-button v-else type="danger" size="mini" @click="onCancel(row)">取消报名</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog :visible.sync="courseTimeListDialog" title="时间信息" width="60%" append-to-body>
|
||||
<el-table :data="courseTimeList">
|
||||
<el-table-column label="日期" prop="courseDate">
|
||||
<template v-slot="{row}">{{$moment(row.courseDate).format('YYYY-MM-DD')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="courseStartTime">
|
||||
<template v-slot="{row}">{{$moment(row.courseStartTime).format('HH:mm')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" prop="courseEndTime">
|
||||
<template v-slot="{row}">{{$moment(row.courseEndTime).format('HH:mm')}}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="courseTimeListDialog = false">取 消</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="viewMapDialog" title="地点" width="60%" append-to-body>
|
||||
<div id="viewMap" style="width: 100%; height: 500px"></div>
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<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>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"apply-form": applyForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
assortTypes: [],
|
||||
},
|
||||
assortList: [],
|
||||
courseTimeListDialog: false,
|
||||
viewMapDialog: false,
|
||||
courseTimeList: [],
|
||||
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: 160 },
|
||||
{ prop: "introduce", label: "详细信息", width: 100 },
|
||||
{ prop: "applyNum", label: "已报名人数", width: 200 }
|
||||
],
|
||||
activity: {},
|
||||
courseTypeList: [],
|
||||
|
||||
trainType: '',
|
||||
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) {
|
||||
this.pageForm[key].splice(idx, 1)
|
||||
} else {
|
||||
this.pageForm[key].push(val)
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
async onOpen(row) {
|
||||
this.activity = row
|
||||
this.$set(this.pageForm, 'activityId', row.id)
|
||||
await this.pageData()
|
||||
await this.getCourseTypeList()
|
||||
this.queryCourseAssort()
|
||||
},
|
||||
onSign(row) {
|
||||
const course = this.courseTypeList.find((v) => v.id === row.courseType)
|
||||
this.$axios.post("/platform/fellowship/apply/validateSignUp", {courseId: row.id})
|
||||
.then((res) => {
|
||||
if (res.code !== 0) {
|
||||
this.$alert(res.msg, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
type: "warning"
|
||||
})
|
||||
} else {
|
||||
let lave = row.coursePeopleNumber - (row.hasRegisterNum + row.courseReservedNumber)
|
||||
if(row.reserveMode === 2 && lave <= 0) {
|
||||
this.$alert('您当前的报名为候补报名状态', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
type: "warning"
|
||||
})
|
||||
}
|
||||
this.$refs.formRef.onOpen(row, course)
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel(row) {
|
||||
this.$confirm("您确定要取消吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/fellowship/apply/cancelSignUp", {
|
||||
activityId: row.activityId,
|
||||
courseId: row.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
await this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
async getCourseTypeList() {
|
||||
const resp = await this.$axios.post("/platform/fellowship/type/getAllType")
|
||||
if (resp.code === 0) {
|
||||
this.courseTypeList = resp.data
|
||||
}
|
||||
},
|
||||
async openViewCourseTime(id) {
|
||||
const resp = await this.$axios.post(loc() + "/getCourseTime", { id: id })
|
||||
this.courseTimeList = resp.data
|
||||
this.courseTimeListDialog = true
|
||||
},
|
||||
openViewMap(point) {
|
||||
if (!Array.isArray(point)) {
|
||||
this.$message.warning("没有设置点位,无法通过地图查看")
|
||||
return
|
||||
}
|
||||
this.viewMapDialog = true
|
||||
this.$nextTick(() => {
|
||||
const viewMap = new AMap.Map("viewMap", {
|
||||
resizeEnable: true,
|
||||
center: point,
|
||||
zoom: 16
|
||||
})
|
||||
if (viewMarker) {
|
||||
viewMap.remove(viewMarker)
|
||||
}
|
||||
viewMarker = new AMap.Marker({
|
||||
position: point,
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
viewMap.add(viewMarker)
|
||||
viewMap.setFitView(null, false, [150, 60, 100, 60])
|
||||
})
|
||||
},
|
||||
calcSignUpCount(o) {
|
||||
let lave = o.coursePeopleNumber - (o.hasRegisterNum + o.courseReservedNumber)
|
||||
if(o.reserveMode === 2) {
|
||||
let lave2 = o.waitingNum - o.hasWaitingNum
|
||||
return "<span style='color: red'>余" + lave +"</span>/" + o.coursePeopleNumber + "人"
|
||||
+ ",<span style='color: red'>候补余" + lave2 + "</span>/" + o.waitingNum + "人"
|
||||
} else {
|
||||
return "<span style='color: red'>余" + lave +"</span>/" + o.coursePeopleNumber + "人"
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
const pageForm = clone({...this.pageForm})
|
||||
pageForm.assortTypes = JSON.stringify(pageForm.assortTypes)
|
||||
const resp = await this.$axios.post(loc() + "/pageData", pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
queryCourseAssort() {
|
||||
this.$axios.post(loc() + "/queryCourseAssort", {activityId: this.activity.id})
|
||||
.then((resp) => {
|
||||
this.assortList = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .glow-box {
|
||||
min-height: calc(100vh - 56px - 40px - 50px - 80px);
|
||||
max-height: calc(100vh - 56px - 40px - 50px - 80px);
|
||||
overflow-y: auto;
|
||||
background: #F0F2F5;
|
||||
}
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
}
|
||||
/deep/ .title {
|
||||
background: white;
|
||||
height: 20px;
|
||||
}
|
||||
/deep/ .query-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 0;
|
||||
}
|
||||
/deep/ .query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
/deep/ .query-row > .query-title {
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
/deep/ .query-row > .query-content {
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
/deep/ .query-row > .query-content > .el-tag {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
/deep/ @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;
|
||||
}
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<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="活动状态" style="width: 340px">
|
||||
<el-select v-model="pageForm.activityType" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择活动状态" filterable>
|
||||
<el-option :value="1" 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">
|
||||
<table-tool label="活动列表"></table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<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"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop=='activitySignUpStartTime'">
|
||||
<span>{{$moment(row.activitySignUpStartTime).format('MM/DD HH:mm')}}</span>
|
||||
<span> 至 </span>
|
||||
<span>{{$moment(row.activitySignUpEndTime).format('MM/DD HH:mm')}}</span>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop=='activityStartTime'">
|
||||
<span>{{$moment(row.activityStartTime).format('MM/DD HH:mm')}}</span>
|
||||
<span> 至 </span>
|
||||
<span>{{$moment(row.activityEndTime).format('MM/DD HH:mm')}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300">
|
||||
<template v-slot="{row}">
|
||||
<template v-if="$moment().isBefore($moment(row.activitySignUpEndTime))">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看介绍</el-button>
|
||||
<el-button @click="onOpen(row)" size="mini" type="primary">去报名</el-button>
|
||||
</template>
|
||||
<template v-if="$moment().isAfter($moment(row.activitySignUpEndTime))">
|
||||
<el-button size="mini" type="info">已结束</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<course-list ref="courseListRef"></course-list>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="详细信息" :visible.sync="infoVisible" width="60%">
|
||||
|
||||
<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('courseList.js'){}#-->
|
||||
<!--#include('../manage/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"course-list": courseList,
|
||||
"activity-info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
activityType: 2
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 600},
|
||||
{ label: "活动性质", prop: "trainType"},
|
||||
{ label: "报名时间", prop: "activitySignUpStartTime"},
|
||||
{ label: "活动时间", prop: "activityStartTime"},
|
||||
],
|
||||
time: 0,
|
||||
infoRow: {},
|
||||
infoVisible: false,
|
||||
|
||||
id: GetQueryString("id"),
|
||||
}
|
||||
},
|
||||
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.$nextTick(() => {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.courseListRef.onOpen(row)
|
||||
})
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post("/platform/fellowship/apply/activityPageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if(this.id) {
|
||||
const activity = this.tableData.find(o => o.id === this.id)
|
||||
this.onView(activity)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,666 @@
|
||||
<!--#include('courseTime.js'){}#-->
|
||||
<!--#include('customForm.js'){}#-->
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form :model="formData" label-width="110px" ref="form">
|
||||
<div v-show="step === 1">
|
||||
<el-row :gutter="20" type="flex" v-if="!formData.id">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="沿用活动" prop="useHistory">
|
||||
<el-radio-group v-model="formData.useHistory" size="small">
|
||||
<el-radio :label="true" border>沿用之前活动</el-radio>
|
||||
<el-radio :label="false" border>不沿用之前活动</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="formData.useHistory">
|
||||
<el-form-item label="往期活动" prop="historicalAct">
|
||||
<el-select v-model="formData.historicalAct" placeholder="请选择往期活动"
|
||||
style="width: 100%" @change="historicalActChange">
|
||||
<el-option v-for="item in historicalActList" :key="item.id"
|
||||
:label="item.activityName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</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="activityName">
|
||||
<el-input maxlength="50" v-model="formData.activityName"
|
||||
placeholder="请输入活动名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="trainType + '通知'" prop="notice">
|
||||
<el-radio-group v-model="formData.notice" size="small">
|
||||
<el-radio :label="true" border>通知</el-radio>
|
||||
<el-radio :label="false" border>不通知</el-radio>
|
||||
</el-radio-group>
|
||||
</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="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"
|
||||
></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"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="面向对象" prop="joinCnd">
|
||||
<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"
|
||||
>
|
||||
<el-option
|
||||
:key="item.groupId"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
v-for="item in activityGroupList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="$refs.drawerUserScope.userScopeDialog = true" type="primary">
|
||||
设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动类型" prop="trainType"
|
||||
:rules="{required:true,message: '请选择活动类型', trigger: 'blur'}">
|
||||
<el-select @change="typeChange" filterable placeholder="请选择活动类型"
|
||||
style="width: 100%" v-model="formData.trainType">
|
||||
<el-option :label="item.name" :value="item.code" :key="item.code"
|
||||
v-for="item in dict.type.FELLOWSHIP_TYPE"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="hostUnitIds" label="主办单位">
|
||||
<el-select v-model="formData.hostUnitIds" clearable filterable multiple
|
||||
placeholder="请选择主办单位"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="undertakeUnitIds" label="承办单位">
|
||||
<el-select v-model="formData.undertakeUnitIds" clearable filterable multiple
|
||||
placeholder="请选择承办单位"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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"
|
||||
></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"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-show="step === 2">
|
||||
<div class="left-span-label"
|
||||
style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>{{trainType + '信息(温馨提示:如不需要人数限制,下方人数框填写0或者不填)'}}</div>
|
||||
<div>
|
||||
<el-button @click="addCourse" size="mini" type="primary">添加{{ trainType }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="formData.courseList">
|
||||
<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="序号"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="courseName">
|
||||
<template v-slot="{row}">
|
||||
<el-input size="small" v-model="row.courseName"
|
||||
:placeholder="'请输入' + trainType + '名称'"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="联谊类型" prop="courseType" sortable>
|
||||
<template v-slot="{row}">
|
||||
<el-select size="small" v-model="row.courseType"
|
||||
@change="(val) => {courseTypeChange(val, row)}">
|
||||
<el-option :label="c.typeName" :value="c.id" :key="c.id"
|
||||
v-for="c in courseTypeList"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="trainType + '人数'" 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="请输入人数"
|
||||
></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="请输入预留名额"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="校区" prop="campus">
|
||||
<template v-slot="{row}">
|
||||
<el-select size="small" v-model="row.campus" style="width: 100%">
|
||||
<el-option :label="item.name" :value="item.name" :key="item.code"
|
||||
v-for="item in dict.type.USER_CAMPUS"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="trainType + '地点'" prop="courseLocation">
|
||||
<template v-slot="{row}">
|
||||
<el-input size="small" v-model="row.courseLocation"
|
||||
:placeholder="'请输入' + trainType + '地点'"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="trainType + '负责人'" prop="courseInstructor">
|
||||
<template v-slot="{row}">
|
||||
<el-input size="small" v-model="row.courseInstructor"
|
||||
:placeholder="'请输入' + trainType + '交友联谊负责人'"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="分类标识" prop="assort">
|
||||
<template v-slot="{row}">
|
||||
<el-input size="small" v-model="row.assort" placeholder="请输入分类标识"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="trainType + '时间'">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="openSetUpCourseTime(scope.$index)" type="text">设置{{ trainType
|
||||
}}时间
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="openMoreInfo(scope, scope.$index)" size="mini" type="primary">
|
||||
自定义设置
|
||||
</el-button>
|
||||
<el-button @click="removeTableCourse(scope.$index)" size="mini" type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="left-span-label" style="margin-top: 20px">个人报名数量限制</div>
|
||||
<el-form-item label="报名数量限制" prop="cover">
|
||||
<el-radio-group v-model="formData.restrictLimit" size="small">
|
||||
<el-radio border :label="1">无限制</el-radio>
|
||||
<el-radio border :label="2">按类型限制</el-radio>
|
||||
<el-radio border :label="3">按活动限制</el-radio>
|
||||
</el-radio-group>
|
||||
<div calss="limit_div">
|
||||
<div v-if="formData.restrictLimit === 1" style="color: #c64120; font-size: 12px">
|
||||
注:无限制指对报名的个数不做任何限制
|
||||
</div>
|
||||
<div v-if="formData.restrictLimit === 2" style="color: #c64120; font-size: 12px">
|
||||
<div>
|
||||
<el-button @click="setSignUpCondition" size="mini" type="primary">设置报名限制
|
||||
</el-button>
|
||||
<span style="color: #c64120; font-size: 12px">注:按类型限制指对每个类型下的个数进行限制</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="formData.restrictLimit === 3">
|
||||
<div>
|
||||
<el-input-number v-model="formData.limitNum" :min="1" :max="100" size="mini"
|
||||
label="限制报名个数"></el-input-number>
|
||||
<span style="color: #c64120; font-size: 12px">注:按活动限制指只能报{{formData.limitNum}}个,不与类型关联</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<div style="float: right; margin: 20px 0">
|
||||
<el-button @click="$emit('back')">取消</el-button>
|
||||
<el-button v-if="step === 2" type="primary" @click="step = 1">上一步</el-button>
|
||||
<el-button v-if="step === 1" type="primary" @click="step = 2">下一步</el-button>
|
||||
<el-button type="primary" @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit">提交</el-button>
|
||||
</div>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="signUpDialog" title="设置报名限制" append-to-body>
|
||||
<el-table :data="formData.typeLimits">
|
||||
<el-table-column prop="code" label="类型编码"></el-table-column>
|
||||
<el-table-column prop="typeName" label="类型名称"></el-table-column>
|
||||
<el-table-column label="限制个数" width="500">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number size="small" v-model="row.limitNum" :min="0"></el-input-number>
|
||||
<span style="color: #c64120; font-size: 12px">注:值为空或者为0则表示此类型不限制报名个数</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="signUpDialog = false">取消</el-button>
|
||||
<el-button @click="doLimitNum" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<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>
|
||||
`,
|
||||
dicts: ["USER_CAMPUS", "FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
signUpDialog: false,
|
||||
step: 1,
|
||||
formData: {
|
||||
notice: false,
|
||||
courseList: [
|
||||
{ orderNum: 1, courseName: "", courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false },
|
||||
],
|
||||
conditionStructure: {
|
||||
method: "AND",
|
||||
conditions: [{}]
|
||||
},
|
||||
restrictLimit: 1,
|
||||
limitNum: 1,
|
||||
typeLimits: []
|
||||
},
|
||||
historicalActList: [],
|
||||
trainTypeList: [],
|
||||
trainType: "",
|
||||
activityGroupList: [],
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000
|
||||
}
|
||||
},
|
||||
campusList: [],
|
||||
courseTypeList: [],
|
||||
|
||||
unitOptions: [],
|
||||
clubOptions: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue"),
|
||||
"course-time": courseTime,
|
||||
"custom-form": customForm,
|
||||
},
|
||||
methods: {
|
||||
async validNumber(row, old) {
|
||||
if (GetQueryString("id") === "") {
|
||||
if (row.courseReservedNumber > row.coursePeopleNumber && row.reserveMode === 1) {
|
||||
this.$alert("预留人数不能大于" + this.trainType + "人数!", "提示", {
|
||||
confirmButtonText: "确定"
|
||||
})
|
||||
row.courseReservedNumber = 0
|
||||
}
|
||||
} else {
|
||||
const registerUserCount = await this.getRegisterUserCount(row.id)
|
||||
if (row.courseReservedNumber + registerUserCount > row.coursePeopleNumber) {
|
||||
if (row.reserveMode === 1) {
|
||||
let num = row.coursePeopleNumber - registerUserCount
|
||||
let str =
|
||||
"您设置的" +
|
||||
this.trainType +
|
||||
"人数为" +
|
||||
row.coursePeopleNumber +
|
||||
"人,当前报名人数为" +
|
||||
registerUserCount +
|
||||
"人,预留名额上限为" +
|
||||
num +
|
||||
"人!"
|
||||
this.$alert(str, "提示", {
|
||||
confirmButtonText: "确定"
|
||||
})
|
||||
row.courseReservedNumber = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async getRegisterUserCount(courseId) {
|
||||
const resp = await this.$axios.post("/platform/fellowship/manage/getRegisterUserCount", { courseId })
|
||||
return resp.code === 0 ? resp.data : 0
|
||||
},
|
||||
courseTypeChange(val, row) {
|
||||
row.reserveMode = 1
|
||||
},
|
||||
setSignUpCondition() {
|
||||
if (this.formData.courseList !== undefined && this.formData.courseList.length > 0) {
|
||||
const courseValid = this.formData.courseList.some((item, index) => {
|
||||
if (item.courseType === undefined) {
|
||||
this.$message.warning("请在" + (index + 1) + "行" + this.trainType + "信息中选择类型!")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
if (courseValid) {
|
||||
return
|
||||
}
|
||||
const array = [...new Set(this.formData.courseList.map((o) => o.courseType))]
|
||||
const typeArray = clone([...this.courseTypeList].filter((x) => array.some((y) => x.id === y)))
|
||||
const arr = []
|
||||
typeArray.forEach((item) => {
|
||||
const t = this.formData.typeLimits.find(o => o.typeId === item.id)
|
||||
if (t) {
|
||||
const type = this.courseTypeList.find(o => o.id === t.typeId)
|
||||
t.code = type.code
|
||||
t.typeName = type.typeName
|
||||
arr.push(t)
|
||||
} else {
|
||||
arr.push({
|
||||
code: item.code,
|
||||
typeName: item.typeName,
|
||||
typeId: item.id,
|
||||
limitNum: 0
|
||||
})
|
||||
}
|
||||
})
|
||||
this.formData.typeLimits = arr
|
||||
this.signUpDialog = true
|
||||
} else {
|
||||
this.$message.warning("请在" + this.trainType + "信息中选择类型!")
|
||||
}
|
||||
},
|
||||
doLimitNum() {
|
||||
this.signUpDialog = false
|
||||
},
|
||||
openMoreInfo(row, index) {
|
||||
this.$refs.customFormRef.onOpen(this.formData, row, index)
|
||||
},
|
||||
async removeTableCourse(index) {
|
||||
const confirm = await this.$confirm(
|
||||
"请确认是否删除此" + this.trainType + "?如果该" + this.trainType + "已有报名人员,会随之一起删除!确定吗?",
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}
|
||||
)
|
||||
if (confirm) {
|
||||
this.formData.courseList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
openSetUpCourseTime(index) {
|
||||
this.$refs.courseTimeRef.onOpen(this.formData, index)
|
||||
},
|
||||
courseOrderNumChange() {
|
||||
this.formData.courseList = this.formData.courseList.sort((a, b) => a.orderNum - b.orderNum)
|
||||
},
|
||||
addCourse() {
|
||||
this.formData.courseList.push({ courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false })
|
||||
},
|
||||
async historicalActChange(val) {
|
||||
const resp = await this.$axios.post("/platform/fellowship/manage/findOne", {id: val})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
this.typeChange(this.formData.trainType)
|
||||
this.formData.id = ""
|
||||
}
|
||||
},
|
||||
typeChange(val) {
|
||||
const type = this.dict.type.FELLOWSHIP_TYPE.find(o => o.code === val)
|
||||
this.trainType = type?.name || "培训班"
|
||||
},
|
||||
changeActivity(val) {
|
||||
if (val) {
|
||||
const group = this.activityGroupList.find(v => v.groupId === val)
|
||||
this.$set(this.formData, "activityGroupName", group.groupName)
|
||||
} else {
|
||||
this.$set(this.formData, "activityGroupName", "全部教职工")
|
||||
}
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const { data } = await this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
return data
|
||||
},
|
||||
async getHistoricalActList() {
|
||||
const resp = await this.$axios.post("/platform/fellowship/manage/getHistoricalActList", {})
|
||||
return resp.data
|
||||
},
|
||||
async onSave() {
|
||||
let valid = false
|
||||
this.$refs.form.validateField("activityName", (errMsg) => {
|
||||
valid = errMsg === ""
|
||||
})
|
||||
if (!valid) {
|
||||
this.$message.warning("请输入活动名称")
|
||||
return
|
||||
}
|
||||
await this.doHandle('保存')
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs["form"].validate(async (valid, errMsg) => {
|
||||
if (valid) {
|
||||
const courseValid = this.formData.courseList.some((v, i) => {
|
||||
const basicValid = v.courseName && v.coursePeopleNumber && v.courseLocation && v.courseInstructor && v.courseType
|
||||
const timeValid =
|
||||
v.courseTimeList.length > 0 &&
|
||||
v.courseTimeList.every((x) => {
|
||||
return x.courseStartTime && x.courseEndTime && x.courseStartTime < x.courseEndTime
|
||||
})
|
||||
if (!timeValid) {
|
||||
this.$message.warning("第" + (i + 1) + "行时间填写有误,请核查")
|
||||
return true
|
||||
}
|
||||
if (!basicValid) {
|
||||
this.$message.warning("第" + (i + 1) + "行信息填写有误,请核查")
|
||||
return true
|
||||
}
|
||||
if (v.isMobileSign === true && v.signType === 3 && (v.courseLocationCoordinates === undefined || v.courseLocationCoordinates.length < 2)) {
|
||||
this.$message.warning("第" + (i + 1) + "行地点坐标填写有误,请核查")
|
||||
return true
|
||||
}
|
||||
if (v.isMobileSign === true && v.signType === 3 && (v.signType === "" || v.signType === undefined)) {
|
||||
this.$message.warning("第" + (i + 1) + "行签到方式填写有误,请核查")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
if (courseValid) return
|
||||
if (this.formData.restrictLimit === 2 && this.formData.typeLimits.length === 0) {
|
||||
this.$message.warning("请设置报名限制")
|
||||
return
|
||||
}
|
||||
this.formData.isDisabled = false
|
||||
await this.doHandle('提交')
|
||||
} else {
|
||||
if(Object.keys(errMsg).length > 0) {
|
||||
this.$message.warning(errMsg[Object.keys(errMsg)[0]][0].message)
|
||||
return
|
||||
}
|
||||
this.$message.warning("存在必填项未填写")
|
||||
}
|
||||
})
|
||||
},
|
||||
async doHandle(type) {
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.activitySignUpStartTime = cloneData.activitySignTime !== undefined ? cloneData.activitySignTime[0] : null
|
||||
cloneData.activitySignUpEndTime = cloneData.activitySignTime !== undefined ? cloneData.activitySignTime[1] : null
|
||||
cloneData.activityStartTime = cloneData.activityTime !== undefined ? cloneData.activityTime[0] : null
|
||||
cloneData.activityEndTime = cloneData.activityTime !== undefined ? cloneData.activityTime[1] : null
|
||||
if (cloneData.activityStartTime !== undefined && cloneData.activityStartTime !== null) {
|
||||
cloneData.year = new Date(cloneData.activityStartTime).getFullYear()
|
||||
}
|
||||
cloneData.typeLimits = JSON.stringify(this.formData.typeLimits)
|
||||
cloneData.courseList = JSON.stringify(cloneData.courseList)
|
||||
cloneData.undertakeUnitIds = JSON.stringify(cloneData.undertakeUnitIds)
|
||||
cloneData.hostUnitIds = JSON.stringify(cloneData.hostUnitIds)
|
||||
const confirm = await this.$confirm("您确定要" + type + "吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm !== "confirm") return
|
||||
const resp = await this.$axios.post("/platform/fellowship/manage/doHandle", cloneData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.step = 1
|
||||
this.$emit('refresh')
|
||||
this.$emit('back')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getAllType() {
|
||||
const resp = await this.$axios.post("/platform/fellowship/type/getAllType", {})
|
||||
return resp.data
|
||||
},
|
||||
async init(row) {
|
||||
if (row && row.id) {
|
||||
const resp = await this.$axios.post("/platform/fellowship/manage/findOne", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
this.typeChange(this.formData.trainType)
|
||||
}
|
||||
}
|
||||
},
|
||||
async getClubsByRole() {
|
||||
const resp = await this.$axios.post("/platform/club/examine/apply/getClubsByRole")
|
||||
return resp.data
|
||||
},
|
||||
async initData(row) {
|
||||
this.activityGroupList = await this.getActivityGroup()
|
||||
this.historicalActList = await this.getHistoricalActList()
|
||||
this.courseTypeList = await this.getAllType()
|
||||
await this.init(row)
|
||||
|
||||
this.clubOptions = await this.getClubsByRole()
|
||||
this.clubOptions.map((v) => {
|
||||
v.name = v.clubName
|
||||
})
|
||||
const units = await this.$businessTool.listUnit()
|
||||
this.unitOptions = this.clubOptions.concat(units)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'formData.restrictLimit'(val) {
|
||||
if (!this.formData.id) {
|
||||
this.formData.limitNum = val === 3 ? 1 : ''
|
||||
}
|
||||
},
|
||||
'formData.activityGroupId': {
|
||||
async handler(newVal, oldVal) {
|
||||
this.activityGroupList = await this.getActivityGroup()
|
||||
this.userScopeDialog = false
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
const courseTime = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="setUpCourseDialog" title="设置时间" width="60%" append-to-body>
|
||||
<div style="color: red; margin-bottom: 10px">温馨提示:有人员报名后,禁止修改下列时间,如有修改,请联系管理员</div>
|
||||
<div class="left-span-label">选择日期</div>
|
||||
<el-date-picker
|
||||
v-if="formData.courseList && formData.courseList[courseIndex]"
|
||||
:picker-options="setUpCoursePickerOptions"
|
||||
@change="setUpCourseDataChange"
|
||||
placeholder="选择一个或多个日期"
|
||||
style="width: 100%"
|
||||
type="dates"
|
||||
v-model="formData.courseList[courseIndex].setUpCourseData"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
<div class="left-span-label">设置时间</div>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-time-select
|
||||
:picker-options="{
|
||||
start: '08:30',
|
||||
step: '00:05',
|
||||
end: '23:30'
|
||||
}"
|
||||
placeholder="开始时间"
|
||||
size="mini"
|
||||
v-model="courseTimeOneKeySet.startTime"
|
||||
></el-time-select>
|
||||
<el-time-select
|
||||
:picker-options="{
|
||||
start: '08:30',
|
||||
step: '00:05',
|
||||
end: '23:30'
|
||||
}"
|
||||
placeholder="结束时间"
|
||||
size="mini"
|
||||
v-model="courseTimeOneKeySet.endTime"
|
||||
></el-time-select>
|
||||
<el-button @click="oneKeySetStartEndTime" size="mini" type="primary">一键设置开始/结束时间</el-button>
|
||||
<span style="color: #ac3111">报名人数是否限制:</span>
|
||||
<el-radio-group size="mini" v-model="formData.courseList[courseIndex].courseIsLimitApply">
|
||||
<el-radio-button :label="true">是</el-radio-button>
|
||||
<el-radio-button :label="false">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
|
||||
<el-table v-if="formData.courseList && formData.courseList[courseIndex]"
|
||||
:data="formData.courseList[courseIndex].courseTimeList">
|
||||
<el-table-column label="日期">
|
||||
<template v-slot="{row}">
|
||||
<i class="el-icon-time"></i>
|
||||
{{$moment(row.courseDate).format('YYYY-MM-DD')}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间">
|
||||
<template v-slot="{row}">
|
||||
<el-time-select
|
||||
:picker-options="{
|
||||
start: '08:30',
|
||||
step: '00:05',
|
||||
end: '23:30'
|
||||
}"
|
||||
placeholder="开始时间"
|
||||
style="width: 100%"
|
||||
v-model="row.courseStartTime"
|
||||
></el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间">
|
||||
<template v-slot="{row}">
|
||||
<el-time-select
|
||||
:picker-options="{
|
||||
start: '08:30',
|
||||
step: '00:05',
|
||||
end: '23:30'
|
||||
}"
|
||||
placeholder="结束时间"
|
||||
style="width: 100%"
|
||||
v-model="row.courseEndTime"
|
||||
></el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-if="formData.courseList[courseIndex].courseIsLimitApply">
|
||||
<el-table-column label="人数限制">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number v-model="row.courseLimitNum" :min="1" :max="1000"
|
||||
style="width: 100%"
|
||||
placeholder="限制报名个数"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="{row,$index}">
|
||||
<el-button
|
||||
@click="formData.courseList[courseIndex].courseTimeList.splice($index,0,{courseDate:row.courseDate,courseStartTime:'',courseEndTime:''})"
|
||||
size="small"
|
||||
>
|
||||
新增同天时段
|
||||
</el-button>
|
||||
<el-button @click="removeSetUpTableCourseRow(row,$index)" size="small" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button @click="doConfirmSetUpCourse" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
const that = this
|
||||
return {
|
||||
setUpCourseDialog: false,
|
||||
courseIndex: 0,
|
||||
formData: {},
|
||||
courseTimeOneKeySet: {
|
||||
startTime: "",
|
||||
endTime: ""
|
||||
},
|
||||
setUpCoursePickerOptions: {
|
||||
disabledDate(time) {
|
||||
return (
|
||||
time.getTime() < Date.parse(that.$moment(that.formData.activityTime[0]).format("YYYY-MM-DD") + " 00:00:00") ||
|
||||
time.getTime() > Date.parse(that.$moment(that.formData.activityTime[1]).format("YYYY-MM-DD") + " 00:00:00")
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
removeSetUpTableCourseRow(row, index) {
|
||||
this.formData.courseList[this.courseIndex].courseTimeList.splice(index, 1)
|
||||
//培训时间列表日期数组
|
||||
const courseDateArray = this.formData.courseList[this.courseIndex].courseTimeList.map((v) =>
|
||||
this.$moment(v.courseDate).format("YYYY-MM-DD")
|
||||
)
|
||||
//选择课程日期数组
|
||||
const scdList = this.formData.courseList[this.courseIndex].setUpCourseData
|
||||
|
||||
this.formData.courseList[this.courseIndex].setUpCourseData = scdList.filter((v) => {
|
||||
return courseDateArray.includes(this.$moment(v).format("YYYY-MM-DD"))
|
||||
})
|
||||
},
|
||||
oneKeySetStartEndTime() {
|
||||
const { startTime, endTime } = this.courseTimeOneKeySet
|
||||
this.formData.courseList[this.courseIndex].courseTimeList.forEach((v) => {
|
||||
this.$set(v, "courseStartTime", startTime)
|
||||
this.$set(v, "courseEndTime", endTime)
|
||||
})
|
||||
this.$forceUpdate()
|
||||
},
|
||||
setUpCourseDataChange(val) {
|
||||
if (!val) {
|
||||
this.formData.courseList[this.courseIndex].courseTimeList = []
|
||||
return
|
||||
}
|
||||
//培训时间日期Set
|
||||
if (this.formData.courseList[this.courseIndex].courseTimeList === undefined) {
|
||||
this.$set(this.formData.courseList[this.courseIndex], "courseTimeList", [])
|
||||
}
|
||||
const ctList = new Set(
|
||||
this.formData.courseList[this.courseIndex].courseTimeList.map((v) => this.$moment(v.courseDate).format("YYYY-MM-DD"))
|
||||
)
|
||||
val.forEach((v) => {
|
||||
if (!ctList.has(v)) {
|
||||
this.formData.courseList[this.courseIndex].courseTimeList.push({
|
||||
courseDate: v,
|
||||
courseTime: null
|
||||
})
|
||||
}
|
||||
})
|
||||
this.formData.courseList[this.courseIndex].courseTimeList = this.formData.courseList[this.courseIndex].courseTimeList.filter((v) => {
|
||||
return val.includes(this.$moment(v.courseDate).format("YYYY-MM-DD"))
|
||||
})
|
||||
this.formData.courseList[this.courseIndex].courseTimeList.sort((a, b) => {
|
||||
return Date.parse(a["courseDate"]) - Date.parse(b["courseDate"])
|
||||
})
|
||||
},
|
||||
//设置课程时间确定
|
||||
doConfirmSetUpCourse() {
|
||||
const courseTableData = this.formData.courseList[this.courseIndex].courseTimeList
|
||||
if (courseTableData.length === 0) {
|
||||
this.$message.warning("请填写时间!")
|
||||
return
|
||||
}
|
||||
if (courseTableData && courseTableData.length > 0) {
|
||||
const valid = courseTableData.every((v) => v.courseStartTime && v.courseEndTime && v.courseStartTime < v.courseEndTime)
|
||||
if (!valid) {
|
||||
this.$message.warning("时间填写不完整或者有误!")
|
||||
return
|
||||
}
|
||||
this.setUpCourseDialog = false
|
||||
}
|
||||
},
|
||||
onOpen(formData, index) {
|
||||
this.formData = formData
|
||||
this.courseIndex = index
|
||||
if (!this.formData.activityTime || this.formData.activityTime.length === 0) {
|
||||
this.$message.warning("请先设置活动起止时间")
|
||||
return
|
||||
}
|
||||
this.courseIndex = index
|
||||
this.setUpCourseDialog = true
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if(!this.formData.courseList) {
|
||||
this.formData = {courseList: [{unionLimit: []}]}
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
<!--#include('unionForm.js'){}#-->
|
||||
const customForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-drawer title="自定义设置" size="50%" class="my-drawer" :visible.sync="moreInfoDrawer" append-to-body>
|
||||
<el-row :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>分工会人数限制</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-button @click="openSetUpUnionLimit(moreInfoIndex)" type="primary" size="small">
|
||||
设置分工会人数限制
|
||||
</el-button>
|
||||
<span
|
||||
v-if="formData.courseList[moreInfoIndex].unionLimit && formData.courseList[moreInfoIndex].unionLimit.length > 0"
|
||||
class="text-success"
|
||||
>
|
||||
已设置
|
||||
</span>
|
||||
<span v-else class="text-danger">未设置</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>承办工会</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-select v-model="formData.courseList[moreInfoIndex].hostUnionId" placeholder="请选择承办工会"
|
||||
style="width: 100%" clearable>
|
||||
<el-option :label="item.name" :value="item.id" :key="item.id"
|
||||
v-for="item in unionList"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>对内报名时间</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-date-picker
|
||||
placeholder="请选择对内报名时间"
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.courseList[moreInfoIndex].interTime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
></el-date-picker>
|
||||
</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].isMobileSign" 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 v-if="formData.courseList[moreInfoIndex].isMobileSign === true" :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>签到方式</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-radio-group v-model="formData.courseList[moreInfoIndex].signType" size="small">
|
||||
<el-radio border :label="1">扫描二维码</el-radio>
|
||||
<el-radio border :label="2">被扫</el-radio>
|
||||
<el-radio border :label="3">GPS定位签到</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row
|
||||
v-if="formData.courseList[moreInfoIndex].isMobileSign === true
|
||||
&& formData.courseList[moreInfoIndex].signType == 3"
|
||||
:gutter="50"
|
||||
type="flex"
|
||||
>
|
||||
<el-col :span="4">
|
||||
<span>地点坐标</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-button @click="openMap(moreInfoIndex)" type="primary" size="small">设置签到点</el-button>
|
||||
</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].isReceiveGift" 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 v-if="formData.courseList[moreInfoIndex].isReceiveGift === true" :gutter="50" type="flex">
|
||||
<el-col :span="4">
|
||||
<span>领取方式</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-radio-group v-model="formData.courseList[moreInfoIndex].giftType" size="small">
|
||||
<el-radio border :label="1">扫描二维码</el-radio>
|
||||
<el-radio border :label="2">面对面确认</el-radio>
|
||||
</el-radio-group>
|
||||
</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].reserveMode"
|
||||
size="small"
|
||||
>
|
||||
<el-radio border :label="1">报名人员减少模式</el-radio>
|
||||
<el-radio border :label="2">候补模式</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="50" type="flex" v-if="formData.courseList[moreInfoIndex].reserveMode === 2">
|
||||
<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
|
||||
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">
|
||||
<el-button size="mini" type="primary"
|
||||
@click="openCnd(moreInfoIndex)">设置可选条件 </el-button>
|
||||
</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>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="mapDialog" title="位置信息" :append-to-body="true">
|
||||
<map-container v-if="mapDialog" :position.sync="formData.courseList[mapIndex].courseLocationCoordinates"></map-container>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="mapDialog = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="conditionStructureDialogVisible" title="条件构造器" :append-to-body="true">
|
||||
<condition-group :group="conditionGroup" :field_options="fieldOptions"
|
||||
@remove="removeRootGroup"></condition-group>
|
||||
<div slot="footer">
|
||||
<el-button @click="conditionStructureDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmCnd">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<union-form ref="unionFormRef"></union-form>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
moreInfoDrawer: false,
|
||||
unionList: [],
|
||||
formData: {},
|
||||
moreInfoRow: {},
|
||||
moreInfoIndex: 0,
|
||||
|
||||
mapDialog: false,
|
||||
mapIndex: 0,
|
||||
|
||||
// 条件构造器相关
|
||||
conditionStructureDialogVisible: false,
|
||||
// 可选字段列表
|
||||
fieldOptions: [
|
||||
{label: "姓名", value: "username"},
|
||||
{label: "工号", value: "loginname"},
|
||||
{label: "性别", value: "sex"},
|
||||
{label: "年龄", value: "age"},
|
||||
{label: "婚姻状况", value: "marriage"},
|
||||
{label: "在职状态", value: "userState"},
|
||||
{label: "编制类别", value: "preparedBy"},
|
||||
{label: "教职工类别", value: "personType"},
|
||||
],
|
||||
|
||||
conditionGroup: {
|
||||
logic: "AND",
|
||||
conditions: [],
|
||||
groups: []
|
||||
},
|
||||
|
||||
// 条件构造器相关
|
||||
currentCourseIndex: -1, // 当前编辑的课程索引
|
||||
subjectMoneyIndex: null,
|
||||
hospitalIndex: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"union-form": unionForm,
|
||||
"map-container": httpVueLoader("/components/plugins/mapContainer/MapContainer.vue?v=1.0.1"),
|
||||
},
|
||||
methods: {
|
||||
removeRootGroup() {
|
||||
// 重置根条件组
|
||||
this.conditionGroup = {
|
||||
logic: "AND",
|
||||
conditions: [],
|
||||
groups: []
|
||||
}
|
||||
},
|
||||
openCnd(moreInfoIndex) {
|
||||
this.currentCourseIndex = moreInfoIndex;
|
||||
this.conditionStructureDialogVisible = true
|
||||
const currentCourse = this.formData.courseList[moreInfoIndex];
|
||||
if (currentCourse.matchCnd) {
|
||||
this.conditionGroup = JSON.parse(JSON.stringify(currentCourse.matchCnd));
|
||||
} else {
|
||||
this.conditionGroup = {
|
||||
logic: "AND",
|
||||
conditions: [],
|
||||
groups: []
|
||||
}
|
||||
}
|
||||
// this.$refs.conditionStructureDialog.onOpen(row.matchCnd ? row.matchCnd : null)
|
||||
},
|
||||
// 条件构造器确认
|
||||
confirmCnd() {
|
||||
if (this.currentCourseIndex >= 0) {
|
||||
this.$set(
|
||||
this.formData.courseList[this.currentCourseIndex],
|
||||
'matchCnd',
|
||||
JSON.parse(JSON.stringify(this.conditionGroup))
|
||||
);
|
||||
}
|
||||
this.conditionStructureDialogVisible = false;
|
||||
this.currentCourseIndex = -1;
|
||||
},
|
||||
openMap(index) {
|
||||
this.mapIndex = index
|
||||
this.mapDialog = true
|
||||
},
|
||||
openSetUpUnionLimit(index) {
|
||||
this.$refs.unionFormRef.onOpen(this.formData, index)
|
||||
},
|
||||
async onOpen(formData, chooseRow, index) {
|
||||
this.formData = formData
|
||||
this.moreInfoRow = chooseRow
|
||||
this.moreInfoIndex = index
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.moreInfoDrawer = true
|
||||
},
|
||||
addCondition(val) {
|
||||
// 保存条件到对应的课程
|
||||
if (this.currentCourseIndex >= 0) {
|
||||
this.$set(
|
||||
this.formData.courseList[this.currentCourseIndex],
|
||||
'matchCnd',
|
||||
val
|
||||
);
|
||||
}
|
||||
|
||||
this.currentCourseIndex = -1;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if(!this.formData.courseList) {
|
||||
this.formData = {courseList: [{unionLimit: []}]}
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-drawer__body {
|
||||
padding: 20px;
|
||||
}
|
||||
.my-drawer .el-col-4 {
|
||||
text-align: right;
|
||||
}
|
||||
.my-drawer .el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.courseTimeButton {
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称">
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.activityName"
|
||||
></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="活动列表">
|
||||
<el-button @click="openAdd" size="small" type="primary">
|
||||
<i class="ti-plus"></i>新建活动
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip
|
||||
v-for="(column, index) in tableColumns"
|
||||
:key="index"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val) => { activityStatusChange(row.notice, val,row.id) }"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled"
|
||||
></el-switch>
|
||||
</template>
|
||||
<template v-slot="{ row: { createdAt } }" v-else-if="column.prop === 'createdAt'">
|
||||
{{ $moment(createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'activityTime'">
|
||||
<span>{{ $moment(row.activityStartTime).format('YYYY/MM/DD') }}</span>
|
||||
<span> 至 </span>
|
||||
<span>{{ $moment(row.activityEndTime).format('YYYY/MM/DD') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px">
|
||||
<template v-slot="{ row }">
|
||||
<el-dropdown>
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="openActivityCode(row.id)">活动二维码</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="makeCode(row)">签到二维码</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onView(row)">查看</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="openEdit(row)">编辑</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onDelete(row)">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="formRef" @back="back" @refresh="doSearch"></basic-form>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
|
||||
<make-qrcode ref="codeRef"></make-qrcode>
|
||||
|
||||
<el-dialog
|
||||
title="活动二维码"
|
||||
:visible.sync="codeDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="30%">
|
||||
<div style=" display: flex;justify-content: center;">
|
||||
<qrcode :options="{ width: 400 }" :value="activityUrl" ></qrcode>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/jr-qrcode/jr-qrcode.js"></script>
|
||||
<script>
|
||||
<!--#include('info.js'){}#-->
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
<!--#include('makeQrcode.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["USER_CAMPUS", "FELLOWSHIP_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": info,
|
||||
"basic-form": basicForm,
|
||||
"make-qrcode": makeQrcode,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ''
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "活动名称", prop: "activityName", width: 600 },
|
||||
{ label: "活动时间", prop: "activityTime" },
|
||||
{ label: "是否开启", prop: "isDisabled", width: 100 },
|
||||
{ label: "创建时间", prop: "createdAt" }
|
||||
],
|
||||
codeDialogVisible: false,
|
||||
activityUrl: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
openAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.formRef.initData()
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.formRef.initData(row)
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.initData(row.id)
|
||||
})
|
||||
},
|
||||
openActivityCode(id) {
|
||||
this.activityUrl = location.origin + "/platform/fellowship/apply/h5?id=" + id
|
||||
this.codeDialogVisible = true
|
||||
},
|
||||
makeCode(row) {
|
||||
this.$refs.codeRef.initData(row)
|
||||
},
|
||||
async activityStatusChange(notice, val, id) {
|
||||
const resp = await this.$axios.post(loc() + "/activityStatusChange", { notice: notice, isDisabled: val, id })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async onDelete(row) {
|
||||
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/onDelete", { id: row.id })
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
}).catch(() => {})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,111 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-tabs>
|
||||
<el-tab-pane label="基础信息">
|
||||
<el-descriptions :column="2" border class="table_fixed mt20">
|
||||
<el-descriptions-item :span="2" label="活动名称">{{viewData.activityName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="年度">{{viewData.year}}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{$moment(viewData.createdAt).format('YYYY-MM-DD HH:mm:ss')}}</el-descriptions-item>
|
||||
<el-descriptions-item label="活动开始时间">{{viewData.activityStartTime}}</el-descriptions-item>
|
||||
<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>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动信息">
|
||||
<el-table :data="viewData.courseList" class="mt20">
|
||||
<el-table-column :label="trainType + '名称'" prop="courseName"></el-table-column>
|
||||
<el-table-column label="类型" prop="courseTypeName"></el-table-column>
|
||||
<el-table-column label="人数" prop="coursePeopleNumber"></el-table-column>
|
||||
<el-table-column label="预留名额" prop="courseReservedNumber"></el-table-column>
|
||||
<el-table-column label="地点" prop="courseLocation">
|
||||
<template v-slot="{row}">
|
||||
<el-button @click="openViewMap(row.courseLocationCoordinates)" type="text">{{row.courseLocation}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="校区" prop="campus"></el-table-column>
|
||||
<el-table-column label="负责人" prop="courseInstructor"></el-table-column>
|
||||
<el-table-column label="活动时间" prop="courseTimeList" width="200px">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="openViewCourseTime(row.courseTimeList)" type="text">点击查看活动时间</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-dialog :visible.sync="courseTimeListDialog" :title="trainType + '时间'" width="60%" append-to-body>
|
||||
<el-table :data="courseTimeList">
|
||||
<el-table-column label="日期" prop="courseDate">
|
||||
<template v-slot="{row}">{{$moment(row.courseDate).format('YYYY-MM-DD')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="courseStartTime"></el-table-column>
|
||||
<el-table-column label="结束时间" prop="courseEndTime"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="courseTimeListDialog = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="viewMapDialog" title="地点" width="60%">
|
||||
<div id="viewMap" style="width: 100%; height: 500px"></div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
trainType: '',
|
||||
viewData: {},
|
||||
courseTimeListDialog: false,
|
||||
courseTimeList: [],
|
||||
|
||||
viewMapDialog: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initData(id) {
|
||||
this.$axios.post("/platform/fellowship/manage/findOne", { id: id })
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
const type = this.dict.type.FELLOWSHIP_TYPE.find((o) => o.code === resp.data.trainType)
|
||||
this.trainType = type?.name || ""
|
||||
}
|
||||
})
|
||||
},
|
||||
openViewCourseTime(courseTimeList) {
|
||||
this.courseTimeList = courseTimeList
|
||||
this.courseTimeListDialog = true
|
||||
},
|
||||
openViewMap(point) {
|
||||
if (!Array.isArray(point)) {
|
||||
this.$message.warning("没有设置点位,无法通过地图查看")
|
||||
return
|
||||
}
|
||||
this.viewMapDialog = true
|
||||
this.$nextTick(() => {
|
||||
viewMap = new AMap.Map("viewMap", {
|
||||
resizeEnable: true,
|
||||
center: point,
|
||||
zoom: 16
|
||||
})
|
||||
if (viewMarker) {
|
||||
viewMap.remove(viewMarker)
|
||||
}
|
||||
viewMarker = new AMap.Marker({
|
||||
position: point,
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
viewMap.add(viewMarker)
|
||||
viewMap.setFitView(null, false, [150, 60, 100, 60])
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .el-button--text {
|
||||
padding: 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
const makeQrcode = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="courseDialog"
|
||||
append-to-body :title="trainType + '列表'" width="60%">
|
||||
<el-table :data="courseList">
|
||||
<el-table-column :label="trainType + '名称'" prop="courseName"></el-table-column>
|
||||
<el-table-column label="校区" prop="campus"></el-table-column>
|
||||
<el-table-column label="是否签到" prop="isMobileSign">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.isMobileSign === true">签到</span>
|
||||
<span v-else>不签到</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签到方式" prop="signType">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.signType === 1">扫描二维码</span>
|
||||
<span v-else-if="row.signType === 2">被扫</span>
|
||||
<span v-else-if="row.signType === 3">GPS定位签到</span>
|
||||
<span v-else>暂无签到方式</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否领取礼品" prop="isReceiveGift">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.isReceiveGift === true">领取</span>
|
||||
<span v-else>不领取</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领取方式" prop="giftType">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.giftType === 1">扫描二维码</span>
|
||||
<span v-else-if="row.giftType === 2">面对面确认</span>
|
||||
<span v-else>暂无领取方式</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="260">
|
||||
<template v-slot="{row}">
|
||||
<el-button v-if="row.signType === 1"
|
||||
@click="makeCourseCode(row)"
|
||||
size="mini" type="primary">
|
||||
生成二维码
|
||||
</el-button>
|
||||
<el-button v-else size="mini" type="text">该{{trainType}}的签到方式不支持生成二维码</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="courseDialog = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
courseDialog: false,
|
||||
trainType: "",
|
||||
courseList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initData(row) {
|
||||
this.courseList = row.courseList
|
||||
const type = this.dict.type.FELLOWSHIP_TYPE.find((o) => o.code === row.trainType)
|
||||
this.trainType = type?.name || "培训班"
|
||||
this.courseDialog = true
|
||||
},
|
||||
makeCourseCode(row) {
|
||||
const url = '/platform/fellowship/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, {
|
||||
zIndex: 99999999,
|
||||
})
|
||||
viewer.show()
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
const unionForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="setUpUnionLimitDialog" title="分工会人数限制" top="50px" append-to-body>
|
||||
<div class="left-span-label" style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>分段设置</div>
|
||||
<div>
|
||||
<el-button size="small" type="primary" @click="unionLimitQuickSetting">应用分段设置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-row v-for="(item,index) in unionUserNumCalc" :key="index" :gutter="20" class="mb5">
|
||||
<el-col :span="7">
|
||||
<el-input-number
|
||||
v-model="item.startNum"
|
||||
:precision="0"
|
||||
:step="1"
|
||||
:min="1"
|
||||
placeholder="请输入最小人数"
|
||||
style="width: 100%"
|
||||
></el-input-number>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input-number
|
||||
v-model="item.endNum"
|
||||
:precision="0"
|
||||
:step="1"
|
||||
:min="1"
|
||||
placeholder="请输入最大人数"
|
||||
style="width: 100%"
|
||||
></el-input-number>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input-number
|
||||
v-model="item.resultNum"
|
||||
:precision="0"
|
||||
:step="1"
|
||||
:min="1"
|
||||
placeholder="请输入限制人数"
|
||||
style="width: 100%"
|
||||
></el-input-number>
|
||||
</el-col>
|
||||
<el-col :span="4" class="text-right">
|
||||
<el-button icon="el-icon-plus" @click="unionUserNumCalc.push({})"></el-button>
|
||||
<el-button icon="el-icon-minus" @click="unionUserNumCalc.splice(index,1)" :disabled="unionUserNumCalc.length===1"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="mt10">
|
||||
<div v-for="(item,index) in unionUserNumCalcTips" class="text-danger">
|
||||
<span class="mr10">({{index+1}}).</span>
|
||||
{{item}}
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<div class="left-span-label" style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>比例设置</div>
|
||||
<div>
|
||||
一键比例:
|
||||
<el-input-number
|
||||
v-model="unionUserNumOneKeyRatio"
|
||||
:precision="0"
|
||||
:step="1"
|
||||
:min="0"
|
||||
placeholder="请输入一键比例"
|
||||
size="small"
|
||||
:max="100"
|
||||
></el-input-number>
|
||||
<el-button size="small" type="primary" @click="applyScaleSettings" class="ml5">应用比例设置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="formData.courseList[unionLimitIndex].unionLimit" max-height="500px">
|
||||
<el-table-column prop="name" label="分工会"></el-table-column>
|
||||
<el-table-column prop="teacherCount" label="人数"></el-table-column>
|
||||
<el-table-column prop="ratio" label="比例(%)">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number v-model="row.ratio" :precision="0" :step="1" :min="0" :max="100"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="limitCount" label="限制人数">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number
|
||||
v-model="row.limitCount"
|
||||
:precision="0"
|
||||
:step="1"
|
||||
:min="0"
|
||||
:max="row.teacherCount"
|
||||
@change="calSummaryCount"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<div class="text-danger" style="width: 100%; font-size: 18px; display: flex; align-items: center; font-weight: bold">
|
||||
限制总人数:{{summaryCount}}人
|
||||
</div>
|
||||
<el-button @click="clearUnionLimit" type="danger">清空分工会人数限制</el-button>
|
||||
<el-button @click="setUpUnionLimitDialog=false">取消</el-button>
|
||||
<el-button @click="doConfirmSetUpUnionLimit" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
unionLimitIndex: 0,
|
||||
setUpUnionLimitDialog: false,
|
||||
unionList: [],
|
||||
unionUserNumCalc: [{}],
|
||||
unionUserNumOneKeyRatio: null,
|
||||
summaryCount: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
unionUserNumCalcTips() {
|
||||
return this.unionUserNumCalc.map((v) => {
|
||||
return (
|
||||
(v.startNum ? v.startNum : "?") +
|
||||
"-" +
|
||||
(v.endNum ? v.endNum : "?") +
|
||||
"人的分工会,限报" +
|
||||
(v.resultNum ? v.resultNum : "?") +
|
||||
"人"
|
||||
)
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
calSummaryCount() {
|
||||
const array = this.formData.courseList[this.unionLimitIndex].unionLimit
|
||||
if (array) {
|
||||
this.summaryCount = array.reduce((prev, curr) => {
|
||||
const value = Number(curr.limitCount)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr.limitCount
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
}
|
||||
},
|
||||
async onOpen(formData, index) {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.formData = formData
|
||||
this.unionLimitIndex = index
|
||||
this.setUpUnionLimitDialog = true
|
||||
if (
|
||||
!this.formData.courseList[this.unionLimitIndex].unionLimit ||
|
||||
this.formData.courseList[this.unionLimitIndex].unionLimit.length === 0
|
||||
) {
|
||||
const resp = await this.$axios.get("/platform/fellowship/manage/getUnionLimit", {
|
||||
activityScopeId: this.formData.activityGroupId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$set(this.formData.courseList[this.unionLimitIndex], "unionLimit", resp.data)
|
||||
}
|
||||
}
|
||||
this.summaryCount = this.formData.courseList[this.unionLimitIndex].unionLimit.reduce((prev, curr) => {
|
||||
const value = Number(curr.limitCount)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr.limitCount
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
},
|
||||
unionLimitQuickSetting() {
|
||||
this.unionUserNumCalc.forEach((v, i) => {
|
||||
const startNum = v.startNum
|
||||
const endNum = v.endNum
|
||||
const resultNum = v.resultNum
|
||||
if (startNum > endNum) {
|
||||
this.$message.warning("第" + (i + 1) + "行设置错误")
|
||||
} else {
|
||||
this.formData.courseList[this.unionLimitIndex].unionLimit.forEach((x) => {
|
||||
if (x.teacherCount >= startNum && x.teacherCount <= endNum) {
|
||||
x.limitCount = resultNum
|
||||
}
|
||||
})
|
||||
this.calSummaryCount()
|
||||
}
|
||||
})
|
||||
},
|
||||
doConfirmSetUpUnionLimit() {
|
||||
this.setUpUnionLimitDialog = false
|
||||
},
|
||||
//应用比例设置
|
||||
applyScaleSettings() {
|
||||
this.formData.courseList[this.unionLimitIndex].unionLimit.forEach((v) => {
|
||||
v.limitCount = parseFloat(((v.teacherCount * this.unionUserNumOneKeyRatio) / 100).toFixed(0))
|
||||
if (v.ratio) {
|
||||
v.limitCount = parseFloat(((v.teacherCount * v.ratio) / 100).toFixed(0))
|
||||
}
|
||||
})
|
||||
this.calSummaryCount()
|
||||
},
|
||||
async clearUnionLimit() {
|
||||
const confirm = await this.$confirm("确定要清空分工会人数限制吗, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
this.formData.courseList[this.unionLimitIndex].unionLimit = []
|
||||
this.unionUserNumOneKeyRatio = null
|
||||
this.unionUserNumCalc = [{}]
|
||||
this.setUpUnionLimitDialog = false
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if(!this.formData.courseList) {
|
||||
this.formData = {courseList: [{unionLimit: []}]}
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-icon-arrow-left,
|
||||
.el-icon-arrow-right {
|
||||
font-size: 28px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称">
|
||||
<el-select @change="activityChange" style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option :label="item.activityName" :value="item.id" v-for="item in activityList" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :label="trainType">
|
||||
<el-button type="primary" size="small" @click="exportSignUser" :disabled="!pageForm.activityId">导出报名人员</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="活动名称" prop="courseName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="类型" prop="courseType" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="活动地点" prop="courseLocation" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="负责人" prop="courseInstructor" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="最多报名人数" prop="coursePeopleNumber" sortable align="center" header-align="center" show-overflow-tooltip>
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.reserveMode === 1">
|
||||
{{row.coursePeopleNumber}}
|
||||
</span>
|
||||
<span v-if="row.reserveMode === 2">
|
||||
{{(row.coursePeopleNumber + row.waitingNum) + '(候补占' + row.waitingNum + ')'}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预留人数" prop="courseReservedNumber" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="已报名人数" prop="registerNum" sortable show-overflow-tooltip>
|
||||
<template v-slot="{row}">
|
||||
<el-link @click="openView(row)" type="primary">
|
||||
{{row.registerNum}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px">
|
||||
<template v-slot="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openSign(row)" size="mini" v-if="row.interTime" :type="row.openOtherUnion === true ? 'danger' : 'primary'">
|
||||
{{row.openOtherUnion === true ? '关闭报名' : '开放报名'}}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<info ref="infoRef"></info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
activityId: null
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "培训班", prop: "courseName" },
|
||||
{ label: "类型", prop: "courseType", sortable: true },
|
||||
{ label: "地点", prop: "courseLocation" },
|
||||
{ label: "教师", prop: "courseInstructor", sortable: true },
|
||||
{ label: "最多报名人数", prop: "coursePeopleNumber", sortable: true },
|
||||
{ label: "已报名人数", prop: "registerNum", sortable: true }
|
||||
],
|
||||
trainType: "培训班",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async openSign(row) {
|
||||
const resp = await this.$axios.post(loc() + "/signChange", { courseId: row.id, openOtherUnion: !row.openOtherUnion })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
activityChange(val) {
|
||||
const activity = this.activityList.find((o) => o.id === val)
|
||||
const type = this.dict.type.FELLOWSHIP_TYPE.find(o => o.code === activity.trainType)
|
||||
this.trainType = type?.name || "培训班"
|
||||
},
|
||||
exportSignUser() {
|
||||
this.$downLoad(loc() + "/exportSignUser", { activityId: this.pageForm.activityId })
|
||||
},
|
||||
async yearChange() {
|
||||
this.pageForm.activityId = null
|
||||
await this.getActivityList()
|
||||
await this.doSearch()
|
||||
},
|
||||
async getActivityList() {
|
||||
const resp = await this.$axios.post(loc() + "/activityList", { year: this.pageForm.year })
|
||||
this.activityList = resp.data
|
||||
if (this.activityList && this.activityList.length > 0) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
this.activityChange(this.activityList[0].id)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getActivityList()
|
||||
},
|
||||
async openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initData()
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,98 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-tabs>
|
||||
<el-tab-pane label="报名人员">
|
||||
<el-table :data="registerUserTableData" class="mt20" max-height="600">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="(column, index) in registerUserTableColumns"
|
||||
:key="index"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop === 'state'">
|
||||
<span class="text-success" v-if="row.state === 1">正常报名</span>
|
||||
<span class="text-warning" v-else-if="row.state === 2">候补报名</span>
|
||||
<span class="text-success" v-else-if="row.state === 3">正常报名(候补)</span>
|
||||
<span class="text-info" v-else-if="row.state === 4">无效报名(缺席)</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="签到情况" v-if="clickRow.isMobileSign === true && Object.keys(userSignInfo).length > 0">
|
||||
<el-tabs style="height: 600px" tab-position="left" class="mt20">
|
||||
<el-tab-pane v-for="(item, key) in userSignInfo" :key="key">
|
||||
<span slot="label">
|
||||
<i class="el-icon-date"></i>
|
||||
{{key}}
|
||||
</span>
|
||||
<el-table :data="item" style="max-height: 600px; overflow-y: auto">
|
||||
<el-table-column label="姓名" prop="username"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginname"></el-table-column>
|
||||
<el-table-column label="是否签到" prop="isAttend">
|
||||
<template v-slot="{row}">
|
||||
<template v-if="Date.now() < Date.parse(row.courseStartTime)">
|
||||
<span class="text-default">未开始</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="text-success" v-if="row.isAttend">已签到</span>
|
||||
<span class="text-warning" v-else>未签到</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签到时间" prop="attendTime"></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
registerUserTableData: [],
|
||||
registerUserTableColumns: [
|
||||
{ label: "姓名", prop: "username" },
|
||||
{ label: "工号", prop: "loginname" },
|
||||
{ label: "单位", prop: "unitName" },
|
||||
{ label: "分工会", prop: "unionName" },
|
||||
{ label: "联系方式", prop: "mobile" },
|
||||
{ label: "报名时间", prop: "signUpTime" },
|
||||
{ label: "报名状态", prop: "state" }
|
||||
],
|
||||
cloneTableColumns: [
|
||||
{label: '姓名', prop: 'username'},
|
||||
{label: '工号', prop: 'loginname'},
|
||||
{label: '单位', prop: 'unitName'},
|
||||
{label: '分工会', prop: 'unionName'},
|
||||
{label: '联系方式', prop: 'mobile'},
|
||||
{label: '报名时间', prop: 'signUpTime'},
|
||||
{label: '报名状态', prop: 'state'},
|
||||
],
|
||||
userSignInfo: {},
|
||||
clickRow: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(row) {
|
||||
this.clickRow = row
|
||||
const resp_register = await this.$axios.post(loc() + "/registerUserList", {courseId: row.id})
|
||||
this.registerUserTableData = resp_register.data
|
||||
const resp_signInfo = await this.$axios.post(loc() + "/getSignInfo", {courseId: row.id})
|
||||
this.userSignInfo = resp_signInfo.data
|
||||
const resp_columnInfo = await $.get(loc() + '/getTaleColumnInfo', {courseId: row.id})
|
||||
if (resp_columnInfo.data) {
|
||||
this.registerUserTableColumns = []
|
||||
this.registerUserTableColumns = this.cloneTableColumns.concat(resp_columnInfo.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,354 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form label-width="120px" :model="formData" ref="addForm" :rules="rules">
|
||||
<el-form-item prop="code" label="类型编码">
|
||||
<el-input v-model="formData.code" placeholder="请输入类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="typeName" label="类型名称">
|
||||
<el-input v-model="formData.typeName" placeholder="请输入类型名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="isBringFamily" label="是否携带家属">
|
||||
<el-radio-group v-model="formData.isBringFamily" @input="isBringFamilyInput">
|
||||
<el-radio :label="true" border>携带</el-radio>
|
||||
<el-radio :label="false" border>不携带</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.isBringFamily === true" prop="isAddFamily" label="家属纳入总人数">
|
||||
<el-radio-group v-model="formData.isAddFamily">
|
||||
<el-radio :label="true" border>纳入</el-radio>
|
||||
<el-radio :label="false" border>不纳入</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.isBringFamily === true" prop="selfAddFamily" label="本人纳入总人数">
|
||||
<el-radio-group v-model="formData.selfAddFamily">
|
||||
<el-radio :label="true" border>纳入</el-radio>
|
||||
<el-radio :label="false" border>不纳入</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div class="left-span-label" style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>
|
||||
报名填写字段
|
||||
<span style="color: #c64120; margin-left: 10px">
|
||||
注:移动端报名时字段的显示顺序会按照下面表格中的序号进行排列、字段编码不能重复
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
@click="formData.mobileSignColumnList.push({isRequired: false})"
|
||||
size="small"
|
||||
type="primary"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<i class="ti-plus"></i>
|
||||
添加
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="formData.mobileSignColumnList">
|
||||
<el-table-column label="序号" prop="columnIndex">
|
||||
<template v-slot="{row}">
|
||||
<el-input-number v-model="row.columnIndex" placeholder="请输入序号"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="字段名称" prop="columnName">
|
||||
<template v-slot="{row}">
|
||||
<el-input v-model="row.columnName" placeholder="请输入字段名称"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="字段编码" prop="columnCode">
|
||||
<template v-slot="{row}">
|
||||
<el-input
|
||||
v-model="row.columnCode"
|
||||
placeholder="请输入字段编码"
|
||||
:disabled="formData.isBringFamily === true && row.columnCode === 'xdqsrs'"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="控件类型" prop="columnFormType">
|
||||
<template v-slot="{row, $index}">
|
||||
<el-select
|
||||
filterable
|
||||
v-model="row.columnFormType"
|
||||
@change="(val) => {columnFormTypeChange(val, $index)}"
|
||||
placeholder="请选择控件类型"
|
||||
>
|
||||
<el-option v-for="item in columnFormTypeList" :label="item.description" :value="item.code" :key="item.code"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="字段类型" prop="columnType">
|
||||
<template v-slot="{row}">
|
||||
<el-select
|
||||
filterable
|
||||
placeholder="请选择字段类型"
|
||||
v-model="row.columnType"
|
||||
>
|
||||
<el-option v-for="item in columnTypeOptions" :label="item" :value="item" :key="item"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="是否必填" prop="isRequired" sortable>
|
||||
<template v-slot="{row}">
|
||||
<el-switch
|
||||
v-model="row.isRequired"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作">
|
||||
<template v-slot="{row, $index}">
|
||||
<el-button
|
||||
@click="openDetailedParams(row, $index)"
|
||||
:disabled="!['SELECT', 'RADIO', 'FILE'].includes(row.columnFormType)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
>
|
||||
设置详细参数
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="formData.mobileSignColumnList.splice($index, 1)"
|
||||
:disabled="formData.isBringFamily === true && row.columnCode === 'xdqsrs'"
|
||||
size="mini"
|
||||
type="danger"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div style="float: right; margin: 20px 0">
|
||||
<el-button @click="$emit('refresh')">取 消</el-button>
|
||||
<el-button type="primary" @click="doHandle">确 定</el-button>
|
||||
</div>
|
||||
|
||||
<el-drawer append-to-body :visible.sync="detailedParamsVisible" size="40%">
|
||||
<template #title>
|
||||
<div class="left-span-label">设置详细参数</div>
|
||||
</template>
|
||||
<el-form class="mt20" ref="paramForm" :rules="paramFormRules" :model="clickRow" label-width="80px">
|
||||
<template v-if="['SELECT'].includes(clickRow.columnFormType)">
|
||||
<el-form-item label="选项列表" prop="selectValues">
|
||||
<el-select
|
||||
v-model="clickRow.selectValues"
|
||||
multiple
|
||||
style="width: 100%"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
placeholder="请选择选项列表(如无数据时,需手动输入选项进行添加)"
|
||||
>
|
||||
<el-option v-for="item in clickRow.columnOptions" :label="item" :value="item" :key="item"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="['RADIO'].includes(clickRow.columnFormType)">
|
||||
<el-form-item label="选项列表" prop="selectValues">
|
||||
<el-select
|
||||
v-model="clickRow.selectValues"
|
||||
multiple
|
||||
style="width: 100%"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
placeholder="请选择选项列表(如无数据时,需手动输入选项进行添加)"
|
||||
>
|
||||
<el-option v-for="item in clickRow.columnOptions" :label="item" :value="item" :key="item"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<template v-if="['FILE'].includes(clickRow.columnFormType)">
|
||||
<el-form-item label="文件类型" prop="fileType">
|
||||
<el-select v-model="clickRow.fileType" multiple style="width: 100%" filterable placeholder="请选择文件类型">
|
||||
<el-option label="jpg" value="jpg"></el-option>
|
||||
<el-option label="png" value="png"></el-option>
|
||||
<el-option label="jpeg" value="jpeg"></el-option>
|
||||
<el-option label="doc" value="doc"></el-option>
|
||||
<el-option label="docx" value="docx"></el-option>
|
||||
<el-option label="xlsx" value="xlsx"></el-option>
|
||||
<el-option label="pdf" value="pdf"></el-option>
|
||||
<el-option label="mp3" value="mp3"></el-option>
|
||||
<el-option label="mp4" value="mp4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件个数" prop="fileNumber">
|
||||
<el-input-number v-model="clickRow.fileNumber" :min="1" :max="10" placeholder="请输入文件个数" style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
|
||||
<div style="float: right; margin: 20px 0">
|
||||
<el-button @click="detailedParamsVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doDetailParams">确 定</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
mobileSignColumnList: [{ isRequired: false }],
|
||||
isBringFamily: false,
|
||||
isAddFamily: false,
|
||||
selfAddFamily: true,
|
||||
},
|
||||
rules: {
|
||||
typeName: [{ required: true, message: "请输入类型名称", trigger: ["change", "blur"] }],
|
||||
code: [{ required: true, message: "请输入类型编码", trigger: ["change", "blur"] }],
|
||||
isBringFamily: [{ required: true, message: "请选择是否携带家属", trigger: ["blur", "change"] }],
|
||||
isAddFamily: [{ required: true, message: "请选择家属是否纳入总人数", trigger: ["blur", "change"] }]
|
||||
},
|
||||
columnTypeOptions: [],
|
||||
columnFormTypeList: [],
|
||||
clickRow: {},
|
||||
paramFormRules: {
|
||||
selectValues: [{ required: true, message: "请选择选项列表", trigger: ["blur"] }],
|
||||
fileType: [{ required: true, message: "请选择文件类型", trigger: ["blur"] }],
|
||||
fileNumber: [{ required: true, message: "请输入文件个数", trigger: ["blur", "change"] }]
|
||||
},
|
||||
detailedParamsVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isBringFamilyInput(o) {
|
||||
this.$set(this.formData, "isAddFamily", o === true ? false : null)
|
||||
if (o === true) {
|
||||
this.formData.mobileSignColumnList.unshift({
|
||||
columnName: "携带亲属人数",
|
||||
columnCode: "xdqsrs",
|
||||
columnFormType: "INPUT",
|
||||
columnType: "INT",
|
||||
isRequired: true
|
||||
})
|
||||
} else {
|
||||
this.formData.mobileSignColumnList.forEach((item, index) => {
|
||||
if (item.columnCode === "xdqsrs" && this.formData.isBringFamily === false) {
|
||||
this.formData.mobileSignColumnList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
columnFormTypeChange(val, index) {
|
||||
if (val === "FILE") {
|
||||
this.formData.mobileSignColumnList[index].columnType = "JSON"
|
||||
this.formData.mobileSignColumnList[index].isDisabled = true
|
||||
} else {
|
||||
// this.formData.mobileSignColumnList[index].columnType = ""
|
||||
this.formData.mobileSignColumnList[index].isDisabled = false
|
||||
}
|
||||
},
|
||||
doHandle() {
|
||||
if (this.formData.id) {
|
||||
this.doEdit()
|
||||
} else {
|
||||
this.doAdd()
|
||||
}
|
||||
},
|
||||
async doDetailParams() {
|
||||
const isValid = await this.$refs["paramForm"].validate()
|
||||
if (isValid) {
|
||||
this.detailedParamsVisible = false
|
||||
}
|
||||
},
|
||||
openDetailedParams(row, index) {
|
||||
this.clickRow = row
|
||||
this.detailedParamsVisible = true
|
||||
if (this.$refs["paramForm"]) this.$refs["paramForm"].clearValidate()
|
||||
},
|
||||
doAdd() {
|
||||
this.$refs["addForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
const newListLength = new Set(this.formData.mobileSignColumnList.map((item) => item.columnCode)).size
|
||||
const listLength = this.formData.mobileSignColumnList.length
|
||||
if (listLength > newListLength) {
|
||||
this.$message.warning('字段编码不能重复')
|
||||
return
|
||||
}
|
||||
const cloneData = clone(this.formData)
|
||||
this.$axios.post(loc() + "/doAdd", { data: JSON.stringify(cloneData) }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
doEdit() {
|
||||
this.$refs["addForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
const newListLength = new Set(this.formData.mobileSignColumnList.map((item) => item.columnCode)).size
|
||||
const listLength = this.formData.mobileSignColumnList.length
|
||||
if (listLength > newListLength) {
|
||||
this.$message.warning('字段编码不能重复')
|
||||
return
|
||||
}
|
||||
const cloneData = clone(this.formData)
|
||||
cloneData.mobileSignColumnList = JSON.stringify(cloneData.mobileSignColumnList)
|
||||
this.$axios.post(loc() + "/doEdit", cloneData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async getColTypeOptions() {
|
||||
const resp = await this.$axios.get(loc() + "/getColumnType")
|
||||
this.columnTypeOptions = resp.data
|
||||
},
|
||||
async getEnumOptions() {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: "ColumnFormTypeEnum" })
|
||||
return resp.data
|
||||
},
|
||||
initData(row) {
|
||||
if(row && row.id) {
|
||||
this.formData = JSON.parse(JSON.stringify(row))
|
||||
if (!this.formData.mobileSignColumnList || !Array.isArray(this.formData.mobileSignColumnList)) {
|
||||
this.formData.mobileSignColumnList = [{ isRequired: false }]
|
||||
} else {
|
||||
this.formData.mobileSignColumnList.forEach((item) => {
|
||||
item.isDisabled = item.columnFormType === "FILE"
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.formData = {
|
||||
mobileSignColumnList: [{ isRequired: false }],
|
||||
isBringFamily: false,
|
||||
isAddFamily: false,
|
||||
selfAddFamily: true,
|
||||
}
|
||||
if (this.$refs["addForm"]) this.$refs["addForm"].resetFields()
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getColTypeOptions()
|
||||
this.columnFormTypeList = await this.getEnumOptions()
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-row--flex.is-justify-space-between {
|
||||
justify-content: left;
|
||||
}
|
||||
.el-drawer__body {
|
||||
padding: 0 30px 0 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="类型名称">
|
||||
<el-input clearable placeholder="请输入类型名称" v-model="pageForm.typeName"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="申请列表">
|
||||
<el-button type="primary" size="small" @click="openAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增类型
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table-column label="序号" width="70" type="index">
|
||||
<template v-slot="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型编码" prop="code" sortable></el-table-column>
|
||||
<el-table-column label="类型名称" prop="typeName"></el-table-column>
|
||||
<el-table-column label="操作" width="300px">
|
||||
<template v-slot="{ row }">
|
||||
<el-button v-if="row.xh!==1" size="mini" type="primary" @click="rowChange(row, false)">上移</el-button>
|
||||
<el-button v-if="row.xh!==pageForm.totalCount" size="mini" type="primary" @click="rowChange(row, true)">下移</el-button>
|
||||
<el-button type="primary" size="mini" @click="openEdit(row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" @click="doDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="basicFormRef" @refresh="doSearch();$refs.guava.index()"></basic-form>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async rowChange(row, toDown) {
|
||||
await this.$axios.post(loc() + "/xhChange", { id: row.id, xh: row.xh, toDown }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
openAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.initData()
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
openEdit(obj) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.initData(obj)
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post(loc() + "/doDelete", { id: id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,138 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
placeholder="请选择年度"
|
||||
type="year"
|
||||
style="width: 100%"
|
||||
@change="yearChange"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称">
|
||||
<el-select @change="activityChange" style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option :label="item.activityName" :value="item.id" v-for="item in activityList" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="人员调整"></table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column label="活动名称" prop="courseName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="类型" prop="courseType" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="活动地点" prop="courseLocation" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="最多报名人数" prop="coursePeopleNumber" sortable show-overflow-tooltip>
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.reserveMode === 1">
|
||||
{{row.coursePeopleNumber}}
|
||||
</span>
|
||||
<span v-if="row.reserveMode === 2">
|
||||
{{(row.coursePeopleNumber + row.waitingNum) + '(候补占' + row.waitingNum + ')'}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预留人数" prop="courseReservedNumber" sortable show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="已报名人数" prop="registerNum" sortable show-overflow-tooltip>
|
||||
<template v-slot="{row}">
|
||||
<el-link @click="openView(row)" type="primary">
|
||||
{{row.registerNum}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="150px">
|
||||
<template v-slot="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">调整</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<user-info ref="userInfoRef" @refresh="doSearch"></user-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainType: "培训班",
|
||||
activityList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
activityId: null
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "培训班", prop: "courseName" },
|
||||
{ label: "类型", prop: "courseType", sortable: true },
|
||||
{ label: "地点", prop: "courseLocation" },
|
||||
{ label: "教师", prop: "courseInstructor", sortable: true },
|
||||
{ label: "最多报名人数", prop: "coursePeopleNumber", sortable: true },
|
||||
{ label: "已报名人数", prop: "registerNum", sortable: true }
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
activityChange(val) {
|
||||
const activity = this.activityList.find((o) => o.id === val)
|
||||
const type = this.dict.type.FELLOWSHIP_TYPE.find(o => o.code === activity.trainType)
|
||||
this.trainType = type?.name || "培训班"
|
||||
},
|
||||
async yearChange() {
|
||||
this.pageForm.activityId = null
|
||||
await this.getActivityList()
|
||||
await this.doSearch()
|
||||
},
|
||||
async getActivityList() {
|
||||
const resp = await this.$axios.post(loc() + "/activityList", { year: this.pageForm.year })
|
||||
this.activityList = resp.data
|
||||
if (this.activityList && this.activityList.length > 0) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
this.activityChange(this.activityList[0].id)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getActivityList()
|
||||
},
|
||||
async openView(o) {
|
||||
this.$refs.guava.view(() => {
|
||||
const activity = this.activityList.find((o) => o.id === this.pageForm.activityId)
|
||||
this.$refs.userInfoRef.onOpen(o, activity)
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initData()
|
||||
await this.pageData()
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,226 @@
|
||||
const userInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="left-span-label">{{ registerCourse.courseName + '报名人员' }}</div>
|
||||
<div>
|
||||
<search @search="registerSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input v-model="registerForm.searchKeyword" placeholder="请输入姓名或工号"></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="registerForm.unionId" clearable filterable placeholder="请选择院级工会" @change="getUnitList()">
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="registerForm.unitId" clearable filterable placeholder="请选择单位">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</div>
|
||||
<el-table :data="registerUserTableData" class="mt15">
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="(column, index) in registerUserTableColumns"
|
||||
:key="index"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop === 'state'">
|
||||
<span class="text-success" v-if="row.state === 1">正常报名</span>
|
||||
<span class="text-warning" v-else-if="row.state === 2">候补报名</span>
|
||||
<span class="text-success" v-else-if="row.state === 3">正常报名(候补)</span>
|
||||
<span class="text-info" v-else-if="row.state === 4">无效报名(缺席)</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px">
|
||||
<template v-slot="{row}">
|
||||
<el-button v-if="row.state === 1 || row.state === 3" @click="adjust(row)" size="mini" type="primary">修改</el-button>
|
||||
<el-button @click="deleteSignUser(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog title="人员调整" append-to-body class="adjustDialog" :close-on-click-modal="false" :visible.sync="adjustDialogVisible" width="50%">
|
||||
<span style="color: #c33714">注:如单选为灰色选择不了,则表示对应的{{ trainType }}人数已满!候补报名不做调整。</span>
|
||||
<el-table :data="courseList" class="mt20">
|
||||
<el-table-column label="单选" width="160">
|
||||
<template v-slot="{row}">
|
||||
<el-radio
|
||||
@change.native="getCurrentRow(row)"
|
||||
:disabled="(row.courseReservedNumber + row.registerNum) >= row.coursePeopleNumber"
|
||||
v-model="afterAdjustCourse"
|
||||
></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="trainType + '列表'"
|
||||
prop="courseName"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column label="最多报名人数" prop="coursePeopleNumber" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="预留名额" prop="courseReservedNumber" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column label="已报名人数" prop="registerNum" align="center" header-align="center"></el-table-column>
|
||||
<el-table-column label="候补人数" prop="hasWaitingNum" align="center" header-align="center"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="adjustDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdjust">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
afterAdjustCourse: "",
|
||||
adjustDialogVisible: false,
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
registerForm: {
|
||||
unionId: "",
|
||||
unitId: ""
|
||||
},
|
||||
registerCourse: {},
|
||||
courseList: [],
|
||||
userInfo: {},
|
||||
chooseRow: {},
|
||||
registerUserTableData: [],
|
||||
registerUserTableColumns: [
|
||||
{ label: "姓名", prop: "username" },
|
||||
{ label: "工号", prop: "loginname" },
|
||||
{ label: "单位", prop: "unitName" },
|
||||
{ label: "分工会", prop: "unionName" },
|
||||
{ label: "联系方式", prop: "mobile" },
|
||||
{ label: "报名时间", prop: "signUpTime" },
|
||||
{ label: "报名状态", prop: "state" }
|
||||
],
|
||||
trainType: '',
|
||||
activity: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(row, activity) {
|
||||
this.registerCourse = row
|
||||
this.registerForm.courseId = row.id
|
||||
this.activity = activity
|
||||
const resp_register = await this.$axios.post(loc() + "/registerUserList", this.registerForm)
|
||||
this.registerUserTableData = resp_register.data
|
||||
|
||||
const type = this.dict.type.FELLOWSHIP_TYPE.find(o => o.code === activity.trainType)
|
||||
this.trainType = type?.name || "培训班"
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.chooseRow = row
|
||||
},
|
||||
async doAdjust() {
|
||||
if (!this.afterAdjustCourse) {
|
||||
this.$message.warning("请选择要调整的" + this.trainType + "!")
|
||||
return
|
||||
}
|
||||
this.$confirm(
|
||||
"您确定要将" +
|
||||
"<span style='color: red'>" +
|
||||
this.userInfo.username +
|
||||
"</span>" +
|
||||
"的报名信息调整到" +
|
||||
"<span style='color: red'>" +
|
||||
this.chooseRow.courseName +
|
||||
"</span>" +
|
||||
"中吗?",
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
dangerouslyUseHTMLString: true
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: "努力调整中,感谢您的耐心等待。。。",
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)"
|
||||
})
|
||||
const resp = await this.$axios.post(loc() + "/adjust", {
|
||||
activityId: this.activity.id,
|
||||
oldCourseId: this.registerCourse.id,
|
||||
newCourseId: this.afterAdjustCourse,
|
||||
userId: this.userInfo.userId
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.adjustDialogVisible = false
|
||||
await this.registerSearch()
|
||||
this.$emit("refresh", null)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
async adjust(o) {
|
||||
this.userInfo = o
|
||||
this.afterAdjustCourse = ""
|
||||
await this.getCourse(this.activity.id)
|
||||
this.adjustDialogVisible = true
|
||||
},
|
||||
deleteSignUser(o) {
|
||||
this.$confirm("您确定要删除" + "<span style='color: red'>" + o.username + "</span>" + "的报名信息吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
dangerouslyUseHTMLString: true
|
||||
})
|
||||
.then(async () => {
|
||||
const resp = await this.$axios.post(loc() + "/deleteSignUser", {
|
||||
activityId: this.activity.id,
|
||||
courseId: this.registerCourse.id,
|
||||
userId: o.userId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
await this.registerSearch()
|
||||
this.$emit("refresh", null)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
async registerSearch() {
|
||||
this.registerForm.courseId = this.registerCourse.id
|
||||
const resp_register = await $.get(loc() + "/registerUserList", this.registerForm)
|
||||
this.registerUserTableData = resp_register.data
|
||||
},
|
||||
async getCourse(val) {
|
||||
const {data} = await this.$axios.post(loc() + "/getCourse", {activityId: val})
|
||||
this.courseList = data
|
||||
},
|
||||
async getUnitList() {
|
||||
this.unitList = await this.$businessTool.listUnit(this.registerForm.unionId)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unitList = await this.$businessTool.listUnit(this.registerForm.unionId)
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .adjustDialog .el-radio__label {
|
||||
display: none;
|
||||
}
|
||||
/deep/ .adjustDialog .el-dialog__body {
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<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"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="活动名称">
|
||||
<el-select @change="activityChange" style="width: 100%" v-model="pageForm.activityId">
|
||||
<el-option :label="item.activityName" :value="item.id" v-for="item in activityList" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item :label="trainType">
|
||||
<el-select @change="courseChange" :placeholder="'请选择' + trainType" style="width: 100%" v-model="pageForm.courseId">
|
||||
<el-option :label="item.courseName" :value="item.id" v-for="item in courseList" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input clearable placeholder="输入姓名或工号" v-model="pageForm.userKeyWord"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool ref="tool" :label="trainType + '(温馨提示:如需补充人员,请在上面选择具体的' + trainType + ')'">
|
||||
<el-button @click="openReserve" type="primary" v-if="reserveMode === 2" size="small">补充人员</el-button>
|
||||
<el-button @click="exportSignPerson" type="primary" size="small">导出签到名单</el-button>
|
||||
<el-button @click="exportGiftPerson" type="primary" size="small">导出领取名单</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.prop === 'courseNames' ? trainType : column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-if="(column.prop !== 'state' && column.prop !== 'absentCount') || (reserveMode === 2 && column.prop === 'state' && column.prop !== 'absentCount')
|
||||
|| (column.prop === 'absentCount' && course.isMobileSign === true)"
|
||||
v-for="(column,index) in tableColumns"
|
||||
:key="index"
|
||||
>
|
||||
<template v-slot="{row}" v-if="column.prop==='isDisabled'">
|
||||
<span class="text-danger" v-if="row.isDisabled">是</span>
|
||||
<span class="text-success" v-else>否</span>
|
||||
</template>
|
||||
<template v-slot="{row}" v-else-if="column.prop==='state'">
|
||||
<span class="text-success" v-if="row.state === 1">正常报名</span>
|
||||
<span class="text-warning" v-else-if="row.state === 2">候补报名</span>
|
||||
<span class="text-success" v-else-if="row.state === 3">正常报名(候补)</span>
|
||||
<span class="text-info" v-else-if="row.state === 4">无效报名(缺席)</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px">
|
||||
<template v-slot="{row}">
|
||||
<el-button @click="handleUser(row.userId)" size="mini" type="danger" v-if="!row.isDisabled">拉黑</el-button>
|
||||
<el-button @click="handleUser(row.userId)" size="mini" type="success" v-if="row.isDisabled">解封</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="补充人员" :visible.sync="reserveDialogVisible" width="55%" top="3%">
|
||||
<vi-title title="以下为候补人员,已为您按照报名时间降序排列"></vi-title>
|
||||
<el-table :data="reserveTableData" ref="multipleTable" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="(row, index) => {return row.state === 2}" type="selection" width="55"></el-table-column>
|
||||
<el-table-column prop="username" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginname" label="工号"></el-table-column>
|
||||
<el-table-column prop="mobile" label="联系方式"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="工会"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="报名时间"></el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="reserveDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="reserveDo">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
dicts: ["FELLOWSHIP_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
reserveDialogVisible: false,
|
||||
reserveTableData: [],
|
||||
activityList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
activityId: null
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: "姓名", prop: "username" },
|
||||
{ label: "工号", prop: "loginname" },
|
||||
{ label: "联系方式", prop: "mobile" },
|
||||
{ label: "单位", prop: "unitname", sortable: true },
|
||||
{ label: "分工会", prop: "unionname", sortable: true },
|
||||
{ label: "活动名称", prop: "courseNames", sortable: true },
|
||||
{ label: "缺席次数", prop: "absentCount" },
|
||||
{ label: "是否黑名单", prop: "isDisabled", sortable: true }
|
||||
],
|
||||
trainType: "",
|
||||
courseList: [],
|
||||
course: {},
|
||||
reserveMode: 1,
|
||||
multipleSelection: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
async openReserve() {
|
||||
const activity = this.activityList.find((o) => o.id === this.pageForm.activityId)
|
||||
if (this.$moment().unix() < this.$moment(activity.activityEndTime).unix()) {
|
||||
this.$alert("此活动还未结束,无法补充", "提示", {
|
||||
confirmButtonText: "确定"
|
||||
})
|
||||
return
|
||||
}
|
||||
const resp = await this.$axios.post("/platform/fellowship/userManage/getReserveUser", { courseId: this.course.id })
|
||||
this.reserveTableData = resp.data
|
||||
this.reserveDialogVisible = true
|
||||
},
|
||||
reserveDo() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.warning("请先在左侧多选框中选择要补充的人员")
|
||||
return
|
||||
}
|
||||
this.$confirm("您选择了" + this.multipleSelection.length + "位教职工,确定要进行补充操作吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
const ids = this.multipleSelection.map((o) => o.userId)
|
||||
const resp = await this.$axios.post("/platform/fellowship/userManage/reserveSingUp", {
|
||||
ids: JSON.stringify(ids),
|
||||
courseId: this.course.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
this.multipleSelection = []
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.reserveDialogVisible = false
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
courseChange(val) {
|
||||
const course = this.courseList.find((o) => o.id === val)
|
||||
this.course = course
|
||||
this.reserveMode = course.reserveMode
|
||||
if (this.reserveMode === 2) {
|
||||
this.tableColumns.push({ label: "报名状态", prop: "state", sortable: true })
|
||||
} else {
|
||||
const o = this.tableColumns.find((o) => o.label === "报名状态")
|
||||
if (o !== null && o !== undefined) {
|
||||
this.tableColumns.splice(this.tableColumns.length - 1, 1)
|
||||
}
|
||||
}
|
||||
this.$refs.tool.app = this
|
||||
this.doSearch()
|
||||
},
|
||||
exportSignPerson() {
|
||||
this.exportPro(loc() + "/exportSignPerson", { activityId: this.pageForm.activityId })
|
||||
},
|
||||
exportGiftPerson() {
|
||||
this.exportPro(loc() + "/exportGiftPerson", { activityId: this.pageForm.activityId })
|
||||
},
|
||||
exportPro(url, param) {
|
||||
if (param.activityId === null) {
|
||||
this.$message.warning("请选择活动")
|
||||
return
|
||||
}
|
||||
this.$downLoad(url, param)
|
||||
},
|
||||
async activityChange(val) {
|
||||
const activity = this.activityList.find((o) => o.id === val)
|
||||
const type = this.dict.type.FELLOWSHIP_TYPE.find(o => o.code === activity.trainType)
|
||||
this.trainType = type?.name || "活动名称"
|
||||
const resp = await this.$axios.post(loc() + "/getCourseByActivityId", { activityId: val })
|
||||
this.courseList = resp.data
|
||||
this.pageForm.courseId = ""
|
||||
},
|
||||
async handleUser(userId) {
|
||||
const resp = await $.post(loc() + "/doHandleUser", { userId })
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
async yearChange() {
|
||||
this.pageForm.activityId = null
|
||||
await this.getActivityList()
|
||||
await this.doSearch()
|
||||
},
|
||||
async getActivityList() {
|
||||
const resp = await this.$axios.post("/platform/fellowship/statistics/activityList", { year: this.pageForm.year })
|
||||
this.activityList = resp.data
|
||||
if (this.activityList && this.activityList.length > 0) {
|
||||
this.pageForm.activityId = this.activityList[0].id
|
||||
await this.activityChange(this.activityList[0].id)
|
||||
}
|
||||
},
|
||||
async initData() {
|
||||
await this.getActivityList()
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initData()
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -2,15 +2,14 @@ const BUY_INFO = {
|
||||
/*language=HTML*/
|
||||
template: `
|
||||
<el-dialog
|
||||
:append-to-body="true"
|
||||
:modal-append-to-body="false"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="收货地址"
|
||||
@closed="onClose"
|
||||
width="70%">
|
||||
<span >
|
||||
<el-steps simple :space="200" :align-center="true" :active="active" finish-status="success">
|
||||
:append-to-body="true"
|
||||
:modal-append-to-body="false"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="收货地址"
|
||||
width="70%">
|
||||
<span>
|
||||
<el-steps simple :space="200" :align-center="true" :active="active" finish-status="success">
|
||||
<el-step title="1.我的购物车"></el-step>
|
||||
<el-step title="2.填写核对订单信息"></el-step>
|
||||
<el-step title="3.成功提交订单"></el-step>
|
||||
@@ -18,8 +17,10 @@ const BUY_INFO = {
|
||||
</span>
|
||||
<template v-if="active==1">
|
||||
<div class="content shopCart">
|
||||
<el-empty v-if="cartList.length==0" image="https://image30.xedaojia.net/upload/wechat/images/flash/flashcart-empty.png">
|
||||
<el-button type="text" @click="dialogVisible = false">购物车空空的哦~,去看看心仪的商品吧~</el-button>
|
||||
<el-empty v-if="cartList.length==0"
|
||||
image="https://image30.xedaojia.net/upload/wechat/images/flash/flashcart-empty.png">
|
||||
<el-button type="text" @click="dialogVisible = false">购物车空空的哦~,去看看心仪的商品吧~
|
||||
</el-button>
|
||||
</el-empty>
|
||||
<!-- table -->
|
||||
<div class="table" v-else>
|
||||
@@ -33,13 +34,17 @@ const BUY_INFO = {
|
||||
@selection-change="handleSelectionChange" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:header-cell-style="{background:'#f3f3f3',color:'#999'}">
|
||||
<el-table-column prop="isChecked" type="selection" width="75" align="center" />
|
||||
<el-table-column align="center" width="200" label="商品">
|
||||
<el-table-column prop="isChecked" type="selection" width="75" align="center"/>
|
||||
<el-table-column align="center" width="200" label="商品">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.benefitGoodsSpecifications.imgUrl[0].url" class="shopImg" alt="">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.benefitGoodsSpecifications.imgUrl[0].url"
|
||||
fit="fit"
|
||||
:preview-src-list="[scope.row.benefitGoodsSpecifications.imgUrl[0].url]"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="shop" align="left">
|
||||
<el-table-column prop="shop" align="left">
|
||||
<template slot-scope="scope">
|
||||
<span class="shop">{{scope.row.benefitGoods.name}}</span>
|
||||
<span class="shop">{{scope.row.benefitGoodsSpecifications.name}}</span>
|
||||
@@ -56,7 +61,7 @@ const BUY_INFO = {
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<span v-if="cartList.length!=0" class="dialog-footer" slot="footer">
|
||||
@@ -80,20 +85,26 @@ const BUY_INFO = {
|
||||
<div class="text item">
|
||||
<el-descriptions v-for="(item,index) in count" :column="6" :colon="false">
|
||||
<el-descriptions-item>
|
||||
<el-button type="text" @click="openAddress" v-if="tableData[index].isDefault" :icon="icon"></el-button>
|
||||
<el-button type="text" @click="openAddress" v-if="tableData[index].isDefault"
|
||||
:icon="icon"></el-button>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
{{tableData[index].userName}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>{{tableData[index].province}}{{tableData[index].city}}{{tableData[index].county}}</el-descriptions-item>
|
||||
<el-descriptions-item style="width: 100px">
|
||||
<el-tooltip class="item" effect="dark" :content="tableData[index].addressDetail" placement="top">
|
||||
<div class="ellipsis" >{{tableData[index].addressDetail}}</div>
|
||||
<el-descriptions-item>
|
||||
{{tableData[index].province}}{{tableData[index].city}}{{tableData[index].county}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item style="width: 100px">
|
||||
<el-tooltip class="item" effect="dark" :content="tableData[index].addressDetail"
|
||||
placement="top">
|
||||
<div class="ellipsis">{{tableData[index].addressDetail}}</div>
|
||||
</el-tooltip>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>{{tableData[index].tel}}</el-descriptions-item>
|
||||
<el-descriptions-item >
|
||||
<el-button @click="doDefault(tableData[index])" v-if="!tableData[index].isDefault" type="text" style="padding-top: 0px;">设为默认地址</el-button>
|
||||
<el-descriptions-item>
|
||||
<el-button @click="doDefault(tableData[index])" v-if="!tableData[index].isDefault"
|
||||
type="text" style="padding-top: 0px;">设为默认地址
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -106,12 +117,13 @@ const BUY_INFO = {
|
||||
<el-descriptions v-for="data in formData" :column="4" :colon="false">
|
||||
<el-descriptions-item>
|
||||
<el-image
|
||||
style="width: 80px;height: 80px;line-height: 80px"
|
||||
:src="data.imgUrl[0].url"
|
||||
fit="cover"></el-image>
|
||||
style="width: 80px;height: 80px;line-height: 80px"
|
||||
:src="data.imgUrl[0].url"
|
||||
fit="cover"></el-image>
|
||||
<span>{{data.goodsName}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item><span style="height: 80px;line-height: 80px">{{data.name}}</span></el-descriptions-item>
|
||||
<el-descriptions-item><span style="height: 80px;line-height: 80px">{{data.name}}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<el-tooltip class="item" effect="dark" :content="data.simpleDesc" placement="top">
|
||||
<span class="ellipsis" style="width:300px;height: 80px;line-height: 80px">
|
||||
@@ -121,7 +133,8 @@ const BUY_INFO = {
|
||||
</el-descriptions-item>
|
||||
</el-tooltip>
|
||||
|
||||
<el-descriptions-item><span class="price-show" style="height: 80px;line-height: 80px">{{data.points}}</span></el-descriptions-item>
|
||||
<el-descriptions-item><span class="price-show" style="height: 80px;line-height: 80px">{{data.points}}</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -141,7 +154,8 @@ const BUY_INFO = {
|
||||
</span>
|
||||
</template>
|
||||
<template v-if="active==3">
|
||||
<el-empty style="height: 500px" image="https://pc-b2b2c.pickmall.cn/static/img/pay-success.f880966f.png">
|
||||
<el-empty style="height: 500px"
|
||||
image="https://pc-b2b2c.pickmall.cn/static/img/pay-success.f880966f.png">
|
||||
<el-button type="primary" @click="dialogVisible = false">继续逛逛</el-button>
|
||||
</el-empty>
|
||||
</template>
|
||||
@@ -173,6 +187,7 @@ const BUY_INFO = {
|
||||
},
|
||||
onClose() {
|
||||
this.$emit("close_cart")
|
||||
this.dialogVisible = false
|
||||
},
|
||||
openAddress() {
|
||||
if (this.icon == "el-icon-arrow-right el-icon--right") {
|
||||
@@ -219,7 +234,7 @@ const BUY_INFO = {
|
||||
})
|
||||
},
|
||||
async doDefault(row) {
|
||||
const resp = await this.$axios.post("/platform/benefit/address/doDefault", { id: row.id })
|
||||
const resp = await this.$axios.post("/platform/benefit/address/doDefault", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.getAddress()
|
||||
this.$message({
|
||||
@@ -279,7 +294,7 @@ const BUY_INFO = {
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/benefit/shop/deleteCart", { id: id })
|
||||
const resp = await this.$axios.post("/platform/benefit/shop/deleteCart", {id: id})
|
||||
if (resp.code === 0) {
|
||||
this.getCart()
|
||||
this.$message({
|
||||
@@ -313,18 +328,21 @@ const BUY_INFO = {
|
||||
text-overflow: ellipsis; /* 用省略号表示被隐藏的部分 */
|
||||
max-width: 200px; /* 设置最大宽度以限制文本的显示长度 */
|
||||
}
|
||||
|
||||
.price-show {
|
||||
font-weight: bold;
|
||||
font-size: 27px;
|
||||
color: #E1140A;
|
||||
}
|
||||
.cart-price{
|
||||
|
||||
.cart-price {
|
||||
font-size: 16px;
|
||||
color: #e2231a;
|
||||
font-family: verdana;
|
||||
font-weight: 700;
|
||||
}
|
||||
.desc{
|
||||
|
||||
.desc {
|
||||
color: #A2A2A2;
|
||||
font-size: 14px;
|
||||
margin-top: 8px;
|
||||
@@ -336,42 +354,50 @@ const BUY_INFO = {
|
||||
.shopCart {
|
||||
.table {
|
||||
position: relative;
|
||||
.el-input__inner {
|
||||
|
||||
.el-input__inner {
|
||||
text-align: center;
|
||||
}
|
||||
.el-input-group__append {
|
||||
|
||||
.el-input-group__append {
|
||||
padding: 0 15px;
|
||||
}
|
||||
.el-input-group__prepend {
|
||||
|
||||
.el-input-group__prepend {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.shopImg {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.price,
|
||||
.shop {
|
||||
color: #000733;
|
||||
}
|
||||
|
||||
.count {
|
||||
color: #bfa548;
|
||||
}
|
||||
.el-checkbox__inner {
|
||||
|
||||
.el-checkbox__inner {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.el-checkbox__inner::after {
|
||||
.el-checkbox__inner::after {
|
||||
left: 7px;
|
||||
top: 3px;
|
||||
}
|
||||
.el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
|
||||
|
||||
.el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
|
||||
top: 7px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.shopCart .table {
|
||||
margin-top: 50px;
|
||||
@@ -410,8 +436,7 @@ const BUY_INFO = {
|
||||
}
|
||||
|
||||
|
||||
|
||||
.shopCart .tab le .el-checkbox__inner::after {
|
||||
.shopCart .tab le .el-checkbox__inner::after {
|
||||
left: 7px;
|
||||
top: 3px;
|
||||
}
|
||||
@@ -421,7 +446,7 @@ const BUY_INFO = {
|
||||
}
|
||||
|
||||
.el-empty__image {
|
||||
width: 500px;
|
||||
width: 500px;
|
||||
}
|
||||
`
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,10 +13,10 @@ layout("/layouts/platform.html"){
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:link,
|
||||
/* a:link,
|
||||
a:visited {
|
||||
color: #5e5e5e;
|
||||
}
|
||||
}*/
|
||||
/* END */
|
||||
|
||||
/* 左侧分类菜单 */
|
||||
@@ -265,15 +265,19 @@ layout("/layouts/platform.html"){
|
||||
<template #view>
|
||||
<shop-dialog ref="info" @close_car="closeCar"></shop-dialog>
|
||||
</template>
|
||||
|
||||
<buy-info ref="buyInfo" ></buy-info>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("buyInfo.js"){}#-->
|
||||
<!--#include("shopDialog.js"){}#-->
|
||||
<!--#include("elevator.js"){}#-->
|
||||
new Vue({
|
||||
new Vue({
|
||||
el: "#app",
|
||||
components: {
|
||||
"shop-dialog": SHOP_DIALOG,
|
||||
"buy-info": BUY_INFO,
|
||||
elevator
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
@@ -339,9 +343,11 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
shopCar() {
|
||||
this.$refs.guava.view(() => {
|
||||
console.log(this.$refs.buyInfo)
|
||||
this.$refs.buyInfo.onOpen(null,1)
|
||||
/* this.$refs.guava.view(() => {
|
||||
this.$refs.info.openCart()
|
||||
})
|
||||
})*/
|
||||
},
|
||||
closeCar() {
|
||||
this.$refs.guava.index(() => {})
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!--#include("buyInfo.js"){}#-->
|
||||
const SHOP_DIALOG = {
|
||||
/*language=HTML*/
|
||||
template: `
|
||||
@@ -47,7 +46,7 @@ const SHOP_DIALOG = {
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="danger" @click="addCart">加入购物车</el-button>
|
||||
<el-button type="warning" @click="buy">立即购买</el-button>
|
||||
<!-- <el-button type="warning" @click="buy">立即购买</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-main>
|
||||
@@ -66,7 +65,7 @@ const SHOP_DIALOG = {
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<buy-info ref="buyInfo" @close_cart="closeCart"></buy-info>
|
||||
<!-- <buy-info ref="buyInfo" @close_cart="closeCart"></buy-info>-->
|
||||
|
||||
</guava>
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="使用状况">
|
||||
<dict-select v-model="pageForm.assetUsageStateName" placeholder="请选择使用状况"
|
||||
@change="doSearch"
|
||||
code="ASSET_USAGE_STATE"></dict-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="类型列表">
|
||||
|
||||
</table-tool>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:summary-method="getSummaries"
|
||||
header-align="center"
|
||||
ref="table"
|
||||
row-key="typeCode"
|
||||
show-summary
|
||||
style="width: 100%">
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="分类" prop="type"></el-table-column>
|
||||
<el-table-column label="数量(台件)" prop="sl"></el-table-column>
|
||||
<el-table-column label="金额(元)" prop="je"></el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
const resp = await $.post(loc() + "/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
}
|
||||
},
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
if (index === 3) {
|
||||
sums[index] = sums[index].toFixed(2)
|
||||
sums[index] += ' 元';
|
||||
}
|
||||
if (index === 2) {
|
||||
sums[index] += ' 台件';
|
||||
}
|
||||
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -74,7 +74,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="basicTypeDialogVisible" title="基础类型"
|
||||
width="40%">
|
||||
<el-form :model="formData" :rules="rules" label-width="80" ref="basicForm">
|
||||
<el-form :model="formData" :rules="rules" label-width="80" ref="basicForm" style="margin: 20px;">
|
||||
<el-row gutter="30">
|
||||
<el-form-item label="上级名称" prop="parentName" v-if="submitType==='add'">
|
||||
<el-input disabled maxlength="100" type="text"
|
||||
|
||||
@@ -206,8 +206,8 @@ layout("/layouts/platform.html"){
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="user_name" label="附  件">
|
||||
<file-upload v-if="viewData.files&&viewData.files.length" :files="viewData.files"
|
||||
:view="true"></file-upload>
|
||||
<file-preview complete_result :files="viewData.files"
|
||||
v-if="viewData.files&&viewData.files.length"></file-preview>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -269,8 +269,15 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="files">
|
||||
<file-upload card :files.sync="formData.files"
|
||||
:max-size="50 * 1024 * 1024"></file-upload>
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
:max-size="50 * 1024 * 1024"
|
||||
></file-upload>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
@@ -317,7 +324,8 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
doBack() {
|
||||
if (GetQueryString("id")) {
|
||||
this.$store.dispatch("pjaxRoute", "/platform/honor/manage")
|
||||
pjaxReplace("/platform/honor/manage")
|
||||
// this.$store.dispatch("pjaxRoute", "/platform/honor/manage")
|
||||
}
|
||||
},
|
||||
doSubmit() {
|
||||
@@ -405,22 +413,24 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async findData(id) {
|
||||
const resp = await this.$axios.post(loc() + "/findData", {id: id})
|
||||
const data1 = resp.data
|
||||
this.formData = resp.data
|
||||
const data1 = clone(resp.data)
|
||||
this.formData = clone(resp.data)
|
||||
if (this.formData.userId && this.formData.userId !== "") {
|
||||
await this.userRemoteMethod(this.formData.userName)
|
||||
} else {
|
||||
this.$set(this.formData, "userName", this.formData.userName)
|
||||
}
|
||||
await this.honorTypeChange(data1.honorType)
|
||||
/* this.$set(this.formData, "prize", data1.prize)
|
||||
await this.honorTypeChange(resp.data.honorType)
|
||||
this.$set(this.formData, "prize", data1.prize)
|
||||
/*
|
||||
this.$set(this.formData, "honorLevel", data1.honorLevel)
|
||||
this.$set(this.formData, "political", data1.political)
|
||||
this.$set(this.formData, "post", data1.post)
|
||||
this.$set(this.formData, "title", data1.title)
|
||||
this.$set(this.formData, "unionId", data1.unionId)
|
||||
this.$set(this.formData, "unionLeader", data1.unionLeader)*/
|
||||
console.log(this.formData)
|
||||
console.log(data1)
|
||||
|
||||
},
|
||||
async initData() {
|
||||
await this.getHonorType()
|
||||
|
||||
+9
-2
@@ -40,8 +40,8 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="报销经费来源" span="2">
|
||||
<el-form-item label="报销经费来源" prop="reimburseFundSource">
|
||||
<el-descriptions-item label="报销类型" span="2">
|
||||
<el-form-item label="报销类型" prop="reimburseFundSource">
|
||||
<el-radio-group v-model="formData.reimburseFundSource" size="medium" @change="reimburseFundSourceChange">
|
||||
<el-radio :label="item.code" border v-for="item in budgetTypeOption">
|
||||
{{item.name}}
|
||||
@@ -201,6 +201,7 @@ layout("/layouts/platform.html"){
|
||||
placeholder="请填写发票号码,如有多个请用逗号分隔"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item></el-descriptions-item>-->
|
||||
|
||||
|
||||
<el-descriptions-item label="支付内容" :span="2">
|
||||
@@ -223,6 +224,11 @@ layout("/layouts/platform.html"){
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-form-item prop="applySign">
|
||||
<pc-signature v-model="formData.applySign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
@@ -258,6 +264,7 @@ layout("/layouts/platform.html"){
|
||||
condolenceTime: [{required: true, message: '请选择慰问时间', trigger: ["change", "blur"]}],
|
||||
invoiceNumber: [{required: true, message: '请填写发票张数', trigger: ["change", "blur"]}],
|
||||
invoice: [{required: true, message: '请填写发票号码', trigger: ["change", "blur"]}],
|
||||
applySign: [{required: true, message: '请签字', trigger: ["change", "blur"]}],
|
||||
paymentNotes: [{required: true, message: '请填写支付内容', trigger: ["change", "blur"]}],
|
||||
},
|
||||
chooseType: {},
|
||||
|
||||
+43
-21
@@ -13,25 +13,32 @@ layout("/layouts/platform.html"){
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</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>
|
||||
<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 label="所属社团">
|
||||
<el-select v-model="pageForm.clubId" style="width: 100%"
|
||||
placeholder="请选择所属社团" filterable clearable>
|
||||
<el-option v-for="item in clubOptions" :key="item.id" :label="item.clubName"
|
||||
:value="item.id"></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-item label="报销项目">
|
||||
<el-select v-model="pageForm.reimburseProject" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择报销项目" clearable>
|
||||
@@ -42,6 +49,10 @@ layout("/layouts/platform.html"){
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="报销类型">
|
||||
<dict-select clearable code="UNION_REIMBURSE_FUND_SOURCE" placeholder="请选择报销类型"
|
||||
v-model="pageForm.reimburseFundSource"></dict-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
@@ -68,6 +79,13 @@ layout("/layouts/platform.html"){
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reimburseFundSource" label="报销类型">
|
||||
<template slot-scope="{row}">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
|
||||
:value="row.reimburseFundSource">
|
||||
</dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="money" label="金额"></el-table-column>
|
||||
<el-table-column prop="createTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
@@ -80,7 +98,9 @@ layout("/layouts/platform.html"){
|
||||
<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>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -95,13 +115,12 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
|
||||
dicts: ["UNION_REIMBURSE_TYPE", "UNION_REIMBURSE_PROJECT", "UNION_REIMBURSE_FUND_SOURCE"],
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
@@ -112,12 +131,13 @@ layout("/layouts/platform.html"){
|
||||
pageDataUrl: "/platform/unionReimburse/collect/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
clubOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
})
|
||||
@@ -146,6 +166,8 @@ layout("/layouts/platform.html"){
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
this.$businessTool.listCLubByRole().then((res) => (this.clubOptions = res))
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -25,7 +25,7 @@ const unionReimburseInfo = {
|
||||
:value="viewData.reimburseProject">
|
||||
</dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报销经费来源">
|
||||
<el-descriptions-item label="报销类型">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
|
||||
:value="viewData.reimburseFundSource">
|
||||
</dict-tag>
|
||||
@@ -54,6 +54,10 @@ const unionReimburseInfo = {
|
||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
|
||||
<span v-else>暂无附件</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="2">
|
||||
<el-image :src="viewData.applySign" fit="cover" style="height: 60px"
|
||||
v-if="viewData.applySign"></el-image>
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
@@ -75,13 +75,15 @@ layout("/layouts/platform.html"){
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<el-table-column label="操作" fixed="right" width="400px">
|
||||
<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>
|
||||
<el-button size="mini" type="primary" @click="">导出报销单</el-button>
|
||||
<el-button size="mini" type="primary" @click="">导出报销凭证</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
+11
-4
@@ -42,7 +42,6 @@ const auditInfo = {
|
||||
<div class="mt10"
|
||||
v-if="['tcDelegatePushDwSj','tcDelegatePushDwFzr'].includes(task.taskName)">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
@@ -50,8 +49,10 @@ const auditInfo = {
|
||||
</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>
|
||||
{{processSubmitTypeEnums.find(v=>v.name===task.ext.tf_type)?.message}}
|
||||
<!-- {{dict.type.PROCESS_TASK_SUBMIT_TYPE.find(v=>v.code==task.ext.tf_type)}}-->
|
||||
<!-- <dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value=""></dict-tag>-->
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
@@ -76,7 +77,8 @@ const auditInfo = {
|
||||
loading: true,
|
||||
search: "",
|
||||
tableKey: "",
|
||||
activeName: "1"
|
||||
activeName: "1",
|
||||
processSubmitTypeEnums:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -93,6 +95,7 @@ const auditInfo = {
|
||||
this.visible = true;
|
||||
this.findOne();
|
||||
this.getDoneTasks();
|
||||
this.getEnumOptions()
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
@@ -102,6 +105,10 @@ const auditInfo = {
|
||||
}
|
||||
})
|
||||
},
|
||||
async getEnumOptions() {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: "ProcessSubmitTypeEnum" })
|
||||
this.processSubmitTypeEnums=resp.data
|
||||
},
|
||||
// 查看流程图
|
||||
openChart() {
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||
|
||||
+5
@@ -200,6 +200,11 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
this.$axios.post("/platform/teacherCongress/delegate/push/dwFzrAudit/sms", {
|
||||
"tf_type": tf_type,
|
||||
"instanceId": this.formData.instanceId
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
-23
@@ -46,8 +46,6 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template >
|
||||
<el-button icon="el-icon-check" size="small" type="primary" @click="onBatchSubmit">正式代表提交上报
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button icon="el-icon-download" size="small" type="primary" @click="exportExcel">导出</el-button>
|
||||
<el-radio-group v-model="pageForm.isFormalOrAttendance" size="small" class="ml10"
|
||||
@@ -283,27 +281,6 @@ layout("/layouts/platform.html"){
|
||||
exportExcel() {
|
||||
this.$downLoad("/platform/teacherCongress/delegate/push/exportExcel", this.pageForm)
|
||||
},
|
||||
onBatchSubmit() {
|
||||
this.$confirm('您确定要上报吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const loading = createLoading('正在提交中')
|
||||
this.$axios.post('/platform/teacherCongress/delegate/push/batchSubmit', {
|
||||
sessionId: this.pageForm.sessionId
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
this.$refs.tableRef.clearSelection()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
listUnion() {
|
||||
this.$businessTool.listUnion().then((res) => {
|
||||
this.unionOptions = res
|
||||
|
||||
+10
-8
@@ -493,18 +493,20 @@ const pushProgress = {
|
||||
methods: {
|
||||
async refreshData(sessionId, teacherMeetName, unionId, submitType) {
|
||||
this.teacherMeetName = teacherMeetName
|
||||
const {code, data} = await $.get('/platform/teacherCongress/delegate/push/selfUnionPushMetric', {
|
||||
this.$axios.post('/platform/teacherCongress/delegate/push/selfUnionPushMetric', {
|
||||
sessionId: sessionId,
|
||||
unionId: unionId,
|
||||
submitType: submitType
|
||||
})
|
||||
if (code === 0) {
|
||||
if (data) {
|
||||
this.metrics = data
|
||||
} else {
|
||||
this.$message.error('暂未分配名额')
|
||||
}).then(resp=>{
|
||||
if (resp.code === 0) {
|
||||
if (resp.data) {
|
||||
this.metrics = resp.data
|
||||
} else {
|
||||
this.$message.error('暂未分配名额')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
+293
@@ -0,0 +1,293 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
<search-item label="教代会">
|
||||
<el-select v-model="pageForm.sessionId">
|
||||
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<push-progress ref="pushProgressRef"></push-progress>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button icon="el-icon-check" size="small" type="primary" @click="onBatchSubmit">正式代表提交上报
|
||||
</el-button>
|
||||
<!-- <el-radio-group @change="doSearch" v-model="pageForm.isFormalOrAttendance" size="small">
|
||||
<el-radio-button label="全部"></el-radio-button>
|
||||
<el-radio-button label="正式代表"></el-radio-button>
|
||||
<el-radio-button label="列席代表"></el-radio-button>
|
||||
</el-radio-group>-->
|
||||
<el-radio-group @change="doSearch" v-model="pageForm.unionId" size="small">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button label="563dcfc5033d4631bc7f6482b2d427b9">机关党群</el-radio-button>
|
||||
<el-radio-button label="9b2650eec5114a18a0d2a09803800a39">机关行政</el-radio-button>
|
||||
</el-radio-group>
|
||||
<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
|
||||
ref="tableRef"
|
||||
:data="tableData"
|
||||
row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
>
|
||||
<el-table-column type="index" width="55" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName" width="100"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex" width="50"></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="职务" prop="position"></el-table-column>
|
||||
<el-table-column label="职称" prop="professionalTitle"></el-table-column>
|
||||
<el-table-column label="是否高级职称" prop="seniorTeacher">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.seniorTeacher" style="color:#0037ff;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否中级职称及以下" prop="intermediateBelow">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.intermediateBelow" style="color:#0037ff;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否干部" prop="cadre">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.cadre" style="color:#0037ff;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否工人" prop="worker">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.worker" style="color:#0037ff;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="教代会代表" prop="isJdh">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.isJdh" style="color:#0037ff;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工代会代表" prop="isGdh">
|
||||
<template v-slot="{row}">
|
||||
<span v-if="row.isGdh" style="color:#0037ff;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="代表类型" prop="representativeType"></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="100px">
|
||||
<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 #edit>
|
||||
<audit-info ref="auditInfoRef">
|
||||
<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('ROLLBACK')" size="small" type="info">退回修改</el-button>
|
||||
<el-button @click="handleTaskAction('AGREE')" size="small" type="primary">同意</el-button>
|
||||
</el-row>
|
||||
</div>-->
|
||||
</audit-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('push-progress.js'){}#-->
|
||||
<!--#include('auditInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'push-progress': pushProgress,
|
||||
'audit-info': auditInfo
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
sessionOptions: [],
|
||||
units: [],
|
||||
pageForm: {
|
||||
isFormalOrAttendance: "全部",
|
||||
unionId: null,
|
||||
sessionId: "",
|
||||
approval: false,
|
||||
},
|
||||
|
||||
showApprovalForm: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch() {
|
||||
this.pageData()
|
||||
const fullName = this.sessionOptions.find(v => v.id === this.pageForm.sessionId)?.fullName;
|
||||
|
||||
this.$refs.pushProgressRef.refreshData(this.pageForm.sessionId, fullName, this.pageForm.unionId,"JG")
|
||||
},
|
||||
onBatchSubmit() {
|
||||
if (!this.pageForm.unionId){
|
||||
this.$alert('请在提交按钮右侧选择“机关党群/机关行政”!', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
|
||||
}
|
||||
});
|
||||
return
|
||||
}
|
||||
this.$confirm('您确定要上报吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const loading = createLoading('正在提交中')
|
||||
this.$axios.post('/platform/teacherCongress/delegate/push/unionFzrAudit/batchSubmit', {
|
||||
sessionId: this.pageForm.sessionId,
|
||||
unionId: this.pageForm.unionId
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
bizId: row.id,
|
||||
userId: row.userId,
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
taskName: row.taskName,
|
||||
instanceId: row.instanceId,
|
||||
submitType: 1,
|
||||
}
|
||||
this.$refs.auditInfoRef.onOpen(row)
|
||||
})
|
||||
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.auditInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(tf_type) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.formData.tf_type = tf_type
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
listUnion() {
|
||||
this.$businessTool.listUnit().then((res) => {
|
||||
this.units = res
|
||||
})
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/teacherCongress/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
if (this.sessionOptions && this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].id
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.listUnion()
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+9
-3
@@ -242,8 +242,9 @@ const write = {
|
||||
<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>
|
||||
{{processSubmitTypeEnums.find(v=>v.name===task.ext.tf_type)?.message}}
|
||||
<!-- <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 }}
|
||||
@@ -311,6 +312,7 @@ const write = {
|
||||
},
|
||||
sessionOptions: [],
|
||||
representativeTypeList: ['正式代表', '列席代表'],
|
||||
processSubmitTypeEnums:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -375,7 +377,10 @@ const write = {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async getEnumOptions() {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: "ProcessSubmitTypeEnum" })
|
||||
this.processSubmitTypeEnums=resp.data
|
||||
},
|
||||
async initInfo() {
|
||||
const {code, data} = await $.get('/platform/teacherCongress/delegate/push/write/info', {
|
||||
sessionId: this.formData.sessionId
|
||||
@@ -385,6 +390,7 @@ const write = {
|
||||
if (this.isSelected) {
|
||||
this.formData = data.delegate
|
||||
this.getDoneTasks()
|
||||
this.getEnumOptions()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+58
-1
@@ -19,6 +19,7 @@ layout("/layouts/platform.html"){
|
||||
style="width: 100%"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
@change="getActivityList"
|
||||
placeholder="请选择年度"
|
||||
>
|
||||
</el-date-picker>
|
||||
@@ -35,6 +36,28 @@ layout("/layouts/platform.html"){
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="旅行社">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId"
|
||||
placeholder="请选择旅行社">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="线路">
|
||||
<el-select clearable filterable multiple style="width: 100%"
|
||||
v-model="pageForm.linIds"
|
||||
placeholder="请选择活动线路">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id"
|
||||
v-for="item in lineList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
@@ -67,6 +90,7 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="报名线路" prop="lineName"></el-table-column>
|
||||
<el-table-column label="线路旅行社" prop="travelAgencyName"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="报名时间"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="300px">
|
||||
<template v-slot="{row}">
|
||||
@@ -88,7 +112,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
const vue= new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
@@ -100,13 +124,27 @@ layout("/layouts/platform.html"){
|
||||
pageDataUrl: "/platform/excellentRecuperation/summary/pageData",
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
linIds: []
|
||||
},
|
||||
activityList: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
travelAgencyList: [],
|
||||
lineList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async selectTravelAgencyList() {
|
||||
const resp = await this.$axios.post('/platform/excellentRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||
this.travelAgencyList = resp.data
|
||||
},
|
||||
getLineList() {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/listLineListByThisYear").then(res => {
|
||||
if (res.code === 0) {
|
||||
this.lineList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(row) {
|
||||
this.$confirm("确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
@@ -145,16 +183,35 @@ layout("/layouts/platform.html"){
|
||||
this.activityList = res.data
|
||||
if (this.activityList.length > 0) {
|
||||
this.$set(this.pageForm, 'activityId', this.activityList[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, 'activityId', "")
|
||||
this.$set(this.pageForm, 'travelAgencyId', "")
|
||||
this.$set(this.pageForm, 'linIds', [])
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
},
|
||||
async pageData() {
|
||||
const pageForm=clone(this.pageForm)
|
||||
if (pageForm.linIds) {
|
||||
pageForm.linIds = JSON.stringify(pageForm.linIds)
|
||||
}
|
||||
const resp = await this.$axios.post("/platform/excellentRecuperation/summary/pageData", pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await this.$businessTool.listUnion()
|
||||
this.unitOptions = await this.$businessTool.listUnit()
|
||||
this.getActivityList()
|
||||
this.selectTravelAgencyList()
|
||||
this.getLineList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -9,12 +9,12 @@ layout("/layouts/platform.html"){
|
||||
<search @search="doSearch">
|
||||
<search-item label="活动时间">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
placeholder="活动时间"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
:clearable="false"
|
||||
placeholder="活动时间"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
@@ -24,35 +24,35 @@ layout("/layouts/platform.html"){
|
||||
<table-tool label="我的福利"></table-tool>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
ref="table"
|
||||
row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tableLoading"
|
||||
:data="tableData"
|
||||
:size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
ref="table"
|
||||
row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tableLoading"
|
||||
>
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
align="center"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
align="center"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='choiceTime'">
|
||||
<i class="el-icon-time"></i>
|
||||
@@ -74,9 +74,11 @@ layout("/layouts/platform.html"){
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" prop="userOnline" width="200px">
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" prop="userOnline"
|
||||
width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openLogistics(row)" size="mini" type="primary">查看物流信息</el-button>
|
||||
<!-- <el-button :disabled="!row.courierNumber" @click="openEvaluate(row)" size="mini" type="primary">评价</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -101,11 +103,11 @@ layout("/layouts/platform.html"){
|
||||
searchName: "username"
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "year", label: "年度" },
|
||||
{ prop: "name", label: "项目名称" },
|
||||
{ prop: "choiceTime", label: "选择时间" },
|
||||
{ prop: "isChoose", label: "是否选择" },
|
||||
{ prop: "gist_list", label: "所选福利" }
|
||||
{prop: "year", label: "年度"},
|
||||
{prop: "name", label: "项目名称"},
|
||||
{prop: "choiceTime", label: "选择时间"},
|
||||
{prop: "isChoose", label: "是否选择"},
|
||||
{prop: "gist_list", label: "所选福利"}
|
||||
// { prop: "receiveAddress", label: "收货地址" }
|
||||
// { prop: "courierNumber", label: "快递单号", sortable: true }
|
||||
]
|
||||
@@ -115,6 +117,9 @@ layout("/layouts/platform.html"){
|
||||
"select-view": selectView
|
||||
},
|
||||
methods: {
|
||||
openLogistics() {
|
||||
this.$message.warning("暂时还没有物流信息!")
|
||||
},
|
||||
async openView(row) {
|
||||
this.$refs.selectViewRef.onOpen(row.id)
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ const optionSelect = {
|
||||
<!-- 选择提示 -->
|
||||
<div class="welfare-notice">
|
||||
<el-alert
|
||||
:title="projectInfo.isCheckBox === 'radio' ? '请选择一项福利' : '您可以选择多项福利,最多可选 ' + (projectInfo.multiSelectNum || projectInfo.options.length) + ' 项'"
|
||||
type="info"
|
||||
show-icon>
|
||||
:title="projectInfo.isCheckBox === 'radio' ? '请选择一项福利' : '您可以选择多项福利,最多可选 ' + (projectInfo.multiSelectNum || projectInfo.options.length) + ' 项'"
|
||||
type="info"
|
||||
show-icon>
|
||||
</el-alert>
|
||||
</div>
|
||||
|
||||
@@ -70,8 +70,8 @@ const optionSelect = {
|
||||
@click="projectInfo.isCheckBox === 'radio' ? selectRadioOption(option.id) : null">
|
||||
|
||||
<el-tag
|
||||
v-if="projectInfo.isCheckBox === 'radio' ? selectedRadioId === option.id : option.selectNum > 0"
|
||||
class="option-tag" type="primary" effect="plain">已选择
|
||||
v-if="projectInfo.isCheckBox === 'radio' ? selectedRadioId === option.id : option.selectNum > 0"
|
||||
class="option-tag" type="primary" effect="plain">已选择
|
||||
</el-tag>
|
||||
|
||||
<div class="option-image">
|
||||
@@ -95,11 +95,11 @@ const optionSelect = {
|
||||
<!-- 多选模式使用步进器 -->
|
||||
<div class="option-stepper" v-else>
|
||||
<el-input-number
|
||||
v-model="option.selectNum"
|
||||
:min="0"
|
||||
:max="projectInfo.multiSelectNum || 99"
|
||||
size="small"
|
||||
controls-position="right">
|
||||
v-model="option.selectNum"
|
||||
:min="0"
|
||||
:max="projectInfo.multiSelectNum || 99"
|
||||
size="small"
|
||||
controls-position="right">
|
||||
</el-input-number>
|
||||
</div>
|
||||
</div>
|
||||
@@ -116,11 +116,11 @@ const optionSelect = {
|
||||
|
||||
<!-- 选项详情弹窗 -->
|
||||
<el-dialog
|
||||
title="福利详情"
|
||||
:visible.sync="showOptionDetailDialog"
|
||||
width="60%"
|
||||
append-to-body
|
||||
custom-class="welfare-detail-dialog">
|
||||
title="福利详情"
|
||||
:visible.sync="showOptionDetailDialog"
|
||||
width="60%"
|
||||
append-to-body
|
||||
custom-class="welfare-detail-dialog">
|
||||
<div class="welfare-detail-popup" v-if="selectedOption">
|
||||
<div class="welfare-detail-title">{{ selectedOption.optionName }}</div>
|
||||
<div class="welfare-detail-content" v-html="selectedOption.description"></div>
|
||||
@@ -129,11 +129,11 @@ const optionSelect = {
|
||||
|
||||
<!-- 确认弹窗 -->
|
||||
<el-dialog
|
||||
title="确认选择"
|
||||
:visible.sync="showConfirmDialog"
|
||||
width="500px"
|
||||
append-to-body
|
||||
custom-class="welfare-confirm-dialog">
|
||||
title="确认选择"
|
||||
:visible.sync="showConfirmDialog"
|
||||
width="50%"
|
||||
append-to-body
|
||||
custom-class="welfare-confirm-dialog">
|
||||
<div class="confirm-content">
|
||||
<!-- 联系电话输入 -->
|
||||
<div class="confirm-mobile-section">
|
||||
@@ -141,14 +141,16 @@ const optionSelect = {
|
||||
<el-form :model="contactForm" ref="contactForm" :rules="contactRules" label-width="80px">
|
||||
<el-form-item prop="mobile" label="联系电话">
|
||||
<el-input
|
||||
v-model="contactForm.mobile"
|
||||
placeholder="请输入手机号码"
|
||||
maxlength="11"
|
||||
clearable>
|
||||
v-model="contactForm.mobile"
|
||||
placeholder="请输入手机号码"
|
||||
maxlength="11"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="projectInfo.provideMode == 3" prop="receiveAddress" label="收货地址" :rules="[{ required: true, message: '请选择收货地址', trigger: 'change' }]">
|
||||
<el-select v-model="contactForm.receiveAddress" placeholder="请选择收货地址" style="width: 100%">
|
||||
<el-form-item v-if="projectInfo.provideMode == 3" prop="receiveAddress" label="收货地址"
|
||||
:rules="[{ required: true, message: '请选择收货地址', trigger: 'change' }]">
|
||||
<el-select v-model="contactForm.receiveAddress" placeholder="请选择收货地址"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in addressOptions"
|
||||
:key="item.id"
|
||||
:label="item.userName + ' ' + item.tel + ' ' + item.province + ' ' + item.city + ' ' + item.county + ' ' + item.addressDetail"
|
||||
@@ -156,6 +158,14 @@ const optionSelect = {
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="userSign"label="签字"
|
||||
:rules="[{ required: true, message: '请签字', trigger: 'change' }]"
|
||||
v-if="projectInfo.signMode===2">
|
||||
<div>
|
||||
<pc-signature v-model="contactForm.userSign" ref=""></pc-signature>
|
||||
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -165,9 +175,9 @@ const optionSelect = {
|
||||
<div class="selected-item-left">
|
||||
<div class="selected-item-image">
|
||||
<el-image
|
||||
:src="option.imgUrl"
|
||||
fit="cover"
|
||||
:preview-src-list="[option.imgUrl]">
|
||||
:src="option.imgUrl"
|
||||
fit="cover"
|
||||
:preview-src-list="[option.imgUrl]">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-picture-outline"></i>
|
||||
</div>
|
||||
@@ -183,10 +193,10 @@ const optionSelect = {
|
||||
</div>
|
||||
<div class="selected-item-right">
|
||||
<el-tag
|
||||
size="small"
|
||||
type="primary"
|
||||
effect="plain"
|
||||
v-if="projectInfo.isCheckBox === 'checkBox'">
|
||||
size="small"
|
||||
type="primary"
|
||||
effect="plain"
|
||||
v-if="projectInfo.isCheckBox === 'checkBox'">
|
||||
× {{ option.selectNum }}
|
||||
</el-tag>
|
||||
</div>
|
||||
@@ -231,7 +241,8 @@ const optionSelect = {
|
||||
selectedOption: null, // 当前选中的选项
|
||||
contactForm: {
|
||||
mobile: "", // 联系电话,
|
||||
receiveAddress: ""
|
||||
receiveAddress: "",
|
||||
userSign: ""
|
||||
},
|
||||
contactRules: {
|
||||
mobile: [
|
||||
@@ -242,7 +253,8 @@ const optionSelect = {
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
addressOptions:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -326,7 +338,8 @@ const optionSelect = {
|
||||
this.selectedRadioId = null
|
||||
this.contactForm = {
|
||||
mobile: "",
|
||||
receiveAddress: ""
|
||||
receiveAddress: "",
|
||||
userSign: ""
|
||||
}
|
||||
|
||||
this.getProjectInfo()
|
||||
@@ -443,7 +456,8 @@ const optionSelect = {
|
||||
selectOptionId: this.selectedRadioId,
|
||||
selectNum: 1,
|
||||
mobile: this.contactForm.mobile,
|
||||
receiveAddress: this.contactForm.receiveAddress
|
||||
receiveAddress: this.contactForm.receiveAddress,
|
||||
userSign: this.contactForm.userSign
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -454,7 +468,8 @@ const optionSelect = {
|
||||
selectOptionId: option.id,
|
||||
selectNum: option.selectNum,
|
||||
mobile: this.contactForm.mobile,
|
||||
receiveAddress: this.contactForm.receiveAddress
|
||||
receiveAddress: this.contactForm.receiveAddress,
|
||||
userSign: this.contactForm.userSign
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
@@ -72,8 +72,11 @@ layout("/layouts/platform.html"){
|
||||
<el-radio-button :label="false">未选择</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="importCourierNumber">
|
||||
导入快递单号
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportXlsx">
|
||||
导出选择情况表
|
||||
导出签字表
|
||||
</el-button>
|
||||
</table-tool>
|
||||
|
||||
@@ -144,6 +147,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "welfareUnionName", label: "所属工会", sortable: true },
|
||||
{ prop: "welfareUnitName", label: "所属单位", sortable: true },
|
||||
{ prop: "selectedOptions", label: "所选福利", sortable: true },
|
||||
{ prop: "courierNumbers", label: "快递号", sortable: true },
|
||||
{ prop: "mobile", label: "联系电话", sortable: true }
|
||||
],
|
||||
optionSelectVisible: false
|
||||
@@ -161,6 +165,9 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
importCourierNumber(){
|
||||
|
||||
},
|
||||
// 获取福利列表
|
||||
getWelfareList() {
|
||||
this.$axios.post("/platform/welfare/common/list", { year: this.pageForm.year }).then((res) => {
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
<!--#
|
||||
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/fellowship/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}">
|
||||
<template v-if="$moment().isBefore($moment(row.activitySignUpEndTime))">
|
||||
<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>
|
||||
</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: 2,
|
||||
},
|
||||
typeOptions: [
|
||||
{text: '全部', value: 1},
|
||||
{text: '即将开始 & 报名中', value: 2},
|
||||
{text: '已结束', value: 3},
|
||||
],
|
||||
infoVisible: false,
|
||||
infoRow: {},
|
||||
|
||||
id: GetQueryString('id')
|
||||
}
|
||||
},
|
||||
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/fellowship/apply/list/h5?id=' + row.id)
|
||||
},
|
||||
fetchOne() {
|
||||
this.$axios.post('/platform/fellowship/manage/findOne', {id: this.id}).then((res) => {
|
||||
if(res.code === 0) {
|
||||
this.onView(res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
if(this.id) {
|
||||
this.fetchOne()
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
}
|
||||
})
|
||||
</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/fellowship/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,159 @@
|
||||
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>
|
||||
<train-dynamic-form v-model="dynamicColumnsData" ref="dynamicForm"></train-dynamic-form>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="button">
|
||||
<van-button @click="onSubmit" round type="info" block>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
activity: {},
|
||||
dynamicColumnsData: [],
|
||||
visible: false,
|
||||
formData: {},
|
||||
showCoursePicker: false,
|
||||
courseTimeSelectList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"train-dynamic-form": httpVueLoader("/components/module/trainSignUp/TrainDynamicForm.vue")
|
||||
},
|
||||
methods: {
|
||||
async onOpen(row, courseType) {
|
||||
this.row = row
|
||||
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.dynamicColumnsData = courseType ? courseType.trainMobileSignColumnList : []
|
||||
this.dynamicColumnsData.forEach((item) => {
|
||||
item.columnValue = this.$store.state.user[item.columnCode] || ""
|
||||
})
|
||||
},
|
||||
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/trainSignUp/apply/getCourseTimeSelectList',{courseId: o.id})
|
||||
if (resp.code === 0) {
|
||||
this.courseTimeSelectList = resp.data
|
||||
} else {
|
||||
this.$toast.fail("获取时段信息失败,请联系管理员")
|
||||
}
|
||||
},
|
||||
async validateSignUp() {
|
||||
// 验证自定义表单
|
||||
await this.$refs.dynamicForm.$refs.form.validate()
|
||||
// 获取家属人数
|
||||
let familyCount = this.dynamicColumnsData.filter(o => o.columnCode === 'xdqsrs').reduce((sum, item) => {
|
||||
return sum + (Number(item.columnValue) || 0)
|
||||
}, 0)
|
||||
|
||||
const res = await this.$axios.post("/platform/trainSignUp/apply/validateSignUp", {
|
||||
courseId: this.formData.courseId,
|
||||
currentFamilyNumber: familyCount
|
||||
})
|
||||
return res.code === 0
|
||||
},
|
||||
async validateCourseTime() {
|
||||
const res = await this.$axios.post('/platform/trainSignUp/apply/validateSourceSignUp', {
|
||||
activityCourseId: this.formData.activityCourseId,
|
||||
courseId: this.row.id
|
||||
})
|
||||
return res.code === 0
|
||||
},
|
||||
async onSubmit() {
|
||||
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 mobileColumnsValue = this.dynamicColumnsData.map((v) => {
|
||||
return {
|
||||
columnName: v.columnName,
|
||||
columnValue: v.columnValue,
|
||||
columnCode: v.columnCode,
|
||||
columnFormType: v.columnFormType
|
||||
}
|
||||
})
|
||||
this.formData.mobileColumnsValue = JSON.stringify(mobileColumnsValue)
|
||||
this.$axios.post("/platform/trainSignUp/apply/doSignUp", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
</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>
|
||||
|
||||
<van-tabs v-if="assortList.length > 0" type="card" color="#1867B0"
|
||||
style="margin-top: 10px" @click="tabClick">
|
||||
<van-tab v-for="item in assortList" :name="item" :title="item">
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<table-list api="/platform/trainSignUp/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" label="详细信息">
|
||||
<span @click="introduceRow = row; introduceVisible = true" class="primary-color">点我查看</span>
|
||||
</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'),
|
||||
assortTypes: [],
|
||||
},
|
||||
typeOptions: [],
|
||||
assortOptions: [],
|
||||
sourceTypeOptions: [],
|
||||
introduceVisible: false,
|
||||
|
||||
introduceRow: {},
|
||||
activity: {},
|
||||
assortList: [],
|
||||
|
||||
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tabClick(name) {
|
||||
this.pageForm.assortTypes = []
|
||||
this.pageForm.assortTypes.push(name)
|
||||
this.pageForm.assortTypes = JSON.stringify(this.pageForm.assortTypes)
|
||||
this.doSearch()
|
||||
},
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
},
|
||||
async onTime(row) {
|
||||
// 如果设置签到,并且也报名的话
|
||||
if(row.isMobileSign === true && row.isSign === true) {
|
||||
const res = await this.$axios.post('/platform/trainSignUp/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/trainSignUp/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)
|
||||
}
|
||||
})
|
||||
},
|
||||
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/trainSignUp/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() {
|
||||
this.queryCourseAssort()
|
||||
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/trainSignUp/manage/findOne', {id: this.pageForm.activityId})
|
||||
.then((res) => {
|
||||
this.activity = res.data
|
||||
})
|
||||
},
|
||||
async getCourseTypeList() {
|
||||
const resp = await this.$axios.post("/platform/trainSignUp/type/getAllType")
|
||||
return resp.data
|
||||
},
|
||||
queryCourseAssort() {
|
||||
this.$axios.post("/platform/trainSignUp/apply/queryCourseAssort", {activityId: this.pageForm.activityId})
|
||||
.then((resp) => {
|
||||
this.assortList = resp.data
|
||||
if(this.assortList.length > 0) {
|
||||
this.pageForm.assortTypes = JSON.stringify([this.assortList[0]])
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,132 @@
|
||||
<!--#
|
||||
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;
|
||||
}
|
||||
</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/trainSignUp/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" 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>
|
||||
|
||||
</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: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.infoRow = row
|
||||
this.infoVisible = true
|
||||
},
|
||||
onApply(row) {
|
||||
this.$pjaxReplace('/platform/trainSignUp/apply/list/h5?id=' + row.id + '&dataType=mine')
|
||||
},
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user