This commit is contained in:
那些花儿
2025-09-12 11:45:30 +08:00
37 changed files with 2868 additions and 253 deletions
@@ -89,13 +89,13 @@ layout("/layouts/platform_h5.html"){
onEdit(row) {
this.$pjaxReplace("/platform/club/join/apply/h5?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id)
},
onDelete(id) {
onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "确定要删除此申请吗?"
})
.then(() => {
this.$axios.post("/platform/club/join/mine/delete", { id: id }).then((res) => {
this.$axios.post("/platform/club/join/mine/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
@@ -0,0 +1,77 @@
const leaveInfo = {
template:
/*language=HTML*/
`
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="请假人姓名">{{ viewData.userName }}</van-cell>
<van-cell title="请假人工号">{{ viewData.loginName }}</van-cell>
<van-cell title="所属单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="会议名称">{{ viewData.periodName }}</van-cell>
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
<van-cell title="请假事由" class="direction-column-cell">{{ viewData.leaveReason }}</van-cell>
<van-cell title="所属会议">{{ viewData.meetingName }}</van-cell>
<van-cell title="会议类型">{{ viewData.typeName }}</van-cell>
</van-cell-group>
<template v-for="task in doneTasks">
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
</van-cell>
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
</van-cell-group>
<van-cell-group :title="task.displayName" v-else>
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
</van-cell>
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
<div v-html="task.taskFormData.tf_opinion"></div>
</van-cell>
</van-cell-group>
</template>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible:false,
viewData: {},
doneTasks: [],
row: null,
}
},
methods: {
onOpen(row) {
row.leaveReason = JSON.parse(row.instanceVariable).f_data.leaveReason || ''
this.row = row
this.visible = true
this.viewData = clone(row)
this.getDoneTasks()
},
onClose(){
this.visible = false
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,96 @@
const meetingInfo = {
template: /*language=HTML*/ `
<div>
<van-action-sheet v-model="visible" title="会议信息">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="会议名称">{{ viewData.name }}</van-cell>
<van-cell title="会议地点">{{ viewData.address }}</van-cell>
<van-cell title="会议类型">{{ viewData.typeName }}</van-cell>
<van-cell title="会议描述" class="direction-column-cell">
<span v-html="viewData.description"></span>
</van-cell>
</van-cell-group>
<van-cell-group title="场次信息" v-if="viewData.timePeriods && viewData.timePeriods.length > 0">
<table class="table-class">
<thead>
<tr>
<th>场次名称</th>
<th>开始时间</th>
<th>结束时间</th>
<th>是否可以请假</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in viewData.timePeriods" :key="index">
<td>{{ item.periodName }}</td>
<td>{{ item.startTime }}</td>
<td>{{ item.endTime }}</td>
<td>{{ item.canLeave ? '是' : '否' }}</td>
</tr>
</tbody>
</table>
</van-cell-group>
<van-cell-group title="会议参与人员" v-if="viewData.users && viewData.users.length > 0">
<table class="table-class">
<thead>
<tr>
<th>工号</th>
<th>姓名</th>
<th>性别</th>
<th>所属单位</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in viewData.users" :key="index">
<td>{{ item.loginName }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.sex }}</td>
<td>{{ item.unitName }}</td>
</tr>
</tbody>
</table>
</van-cell-group>
</div>
</van-action-sheet>
</div>
`,
data() {
return {
viewData: {},
visible: false
}
},
methods: {
onOpen(row) {
this.$axios.post('/platform/meeting/manage/info', {id: row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
this.visible = true
},
},
style: /*language=CSS*/ `
::v-deep .table-class{
width: 100%;
border-radius: 5px;
overflow: hidden;
line-height: 1.5rem;
font-size: 13px;
table-layout: fixed;
border-collapse: collapse;
}
::v-deep .table-class th {
background-color: #f2f2f2;
border: 1px solid #dddddd;
}
::v-deep .table-class tr {
text-align: center;
border-bottom: 1px solid #dddddd;
}
::v-deep .table-class td {
border: 1px solid #dddddd;
}
`
}
@@ -0,0 +1,190 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</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-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入名称或地点查询"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/meeting/delegationApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="periodName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="开始时间">{{row.startTime}}</table-column>
<table-column label="结束时间">{{row.endTime}}</table-column>
<table-column label="请假人">{{row.userName}}</table-column>
<table-column label="请假事由">{{JSON.parse(row.instanceVariable).f_data.leaveReason || ''}}</table-column>
<table-column label="所属会议">{{row.meetingName}}</table-column>
<table-column label="会议类型">{{row.typeName}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</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" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-edit"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-reply"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<leave-info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</leave-info>
</div>
<script>
<!--#include('../common/leaveInfo.js'){}#-->
new Vue({
el: "#app",
store,
components: {
'leave-info': leaveInfo,
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
type: null,
},
typeOptions: [],
formData: {},
showApprovalForm: false
}
},
methods: {
async onReady() {
const typeList = await this.queryMeetingType()
this.typeOptions = [
{
text: "全部类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.type = this.typeOptions[0].value
this.doSearch()
}
},
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
onRevoke(row){
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
}
})
})
},
async queryMeetingType() {
const res = await this.$axios.post('/platform/meeting/type/queryMeetingType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,197 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</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-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入名称或地点查询"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/meeting/leave/pageData" :page_form.sync="pageForm" ref="tableListRef" title="periodName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="开始时间">{{row.startTime}}</table-column>
<table-column label="结束时间">{{row.endTime}}</table-column>
<table-column label="请假人">{{row.userName}}</table-column>
<table-column label="请假事由">{{JSON.parse(row.instanceVariable).f_data.leaveReason || ''}}</table-column>
<table-column label="所属会议">{{row.meetingName}}</table-column>
<table-column label="会议类型">{{row.typeName}}</table-column>
<table-column label="当前节点">{{row.taskName}}</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="onEdit(row)"
v-if="row.taskKey === 'startTask' || !row.instanceId">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" @click="onRevoke(row)"
v-if="row.canRevoke">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
<div class="action-btn delete" @click="onDelete(row)"
v-if="row.taskKey === 'startTask' || !row.instanceId">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<van-dialog v-model="visible" title="请假事由" show-cancel-button
:before-close="handleBeforeClose">
<van-field
style="padding: 20px 16px"
v-model="leaveReason"
label="请假事由"
placeholder="请输入请假事由"
required
rows="1"
autosize
type="textarea"
></van-field>
</van-dialog>
<leave-info ref="infoRef"></leave-info>
</div>
<script>
<!--#include('../common/leaveInfo.js'){}#-->
new Vue({
el: "#app",
store,
components: {
'leave-info': leaveInfo,
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: new Date().getFullYear(),
type: null
},
typeOptions: [],
visible: false,
leaveReason: '',
editRow: {},
}
},
methods: {
async onReady() {
const typeList = await this.queryMeetingType()
this.typeOptions = [
{
text: "全部类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.type = this.typeOptions[0].value
this.doSearch()
}
},
handleBeforeClose(action, done) {
if (action === 'confirm') {
if(!this.leaveReason) {
this.$toast('请输入请假事由')
done(false)
} else {
this.$axios.post("/platform/meeting/mine/submitAgain", {
id: this.editRow.id,
leaveReason: this.leaveReason,
taskId: this.editRow.taskId
})
.then((res) => {
done()
this.$toast(res.msg)
if (res.code === 0) {
this.doSearch()
this.reasonVisible = false
}
}).catch(() => { done() })
}
} else {
done()
}
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
if (res.code === 0) {
this.$toast(res.msg)
this.doSearch()
}
})
})
},
onView(row) {
this.$refs.infoRef.onOpen(row)
},
onEdit(row) {
if(!row.canLeave) {
this.$toast.success('该场次不能请假')
return
}
this.editRow = row
this.visible = true
},
onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "确定要删除此申请吗?"
})
.then(() => {
this.$axios.post("/platform/meeting/leave/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
.catch(() => {})
},
async queryMeetingType() {
const res = await this.$axios.post('/platform/meeting/type/queryMeetingType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,194 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
.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-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入名称或地点查询"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/meeting/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="name" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="会议类型">{{row.typeName}}</table-column>
<table-column label="会议地点">{{row.address}}</table-column>
<table-column label="创建时间">{{row.createTime}}</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="leaveRow = row; leaveVisible = true">
<i class="fa fa-edit"></i>
<span>展开</span>
</div>
</template>
</table-list>
<van-action-sheet title="会议信息" v-model="leaveVisible" cancel-text="取消" close-on-click-action>
<button v-for="(item,index) in leaveRow.timePeriods" 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">{{item.periodName}}</div>
<div class="van-action-sheet__subname">
{{$moment(item.startTime).format('MM-DD HH:mm') + ' 至 ' + $moment(item.endTime).format('MM-DD HH:mm')}}
</div>
</div>
<div class="sign_button">
<van-button v-if="item.joinStatus === true" @click.stop="onLeave(item)" size="mini" type="info">请假</van-button>
<van-button v-if="item.joinStatus === false" size="mini" type="info" disabled>您已请假</van-button>
<van-button v-if="item.signStatus === false" @click.stop="onSign(item)" size="mini" type="info">签到</van-button>
<van-button v-if="item.signStatus === true" size="mini" type="info" disabled>您已签到</van-button>
</div>
</div>
</button>
</van-action-sheet>
<van-dialog v-model="reasonVisible" title="请假事由" show-cancel-button
:before-close="handleBeforeClose">
<van-field
style="padding: 20px 16px"
v-model="leaveReason"
label="请假事由"
placeholder="请输入请假事由"
required
rows="1"
autosize
type="textarea"
></van-field>
</van-dialog>
<meeting-info ref="infoRef"></meeting-info>
</div>
<script>
<!--#include('../common/meetingInfo.js'){}#-->
new Vue({
el: "#app",
store,
components: {
'meeting-info': meetingInfo,
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: new Date().getFullYear(),
type: null
},
typeOptions: [],
leaveRow: {},
leaveVisible: false,
reasonVisible: false,
leaveReason: '',
periodRow: {},
}
},
methods: {
async onReady() {
const typeList = await this.queryMeetingType()
this.typeOptions = [
{
text: "全部类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.siteType = this.typeOptions[0].value
this.doSearch()
}
},
handleBeforeClose(action, done) {
if (action === 'confirm') {
if(!this.leaveReason) {
this.$toast('请输入请假事由')
done(false)
} else {
this.$axios.post("/platform/meeting/mine/leave", {
periodId: this.periodRow.id,
leaveReason: this.leaveReason,
})
.then((res) => {
done()
this.$toast(res.msg)
if (res.code === 0) {
this.doSearch()
this.reasonVisible = false
}
}).catch(() => { done() })
}
} else {
done()
}
},
onLeave(row) {
if(!row.canLeave) {
this.$toast('该场次不能请假')
return
}
this.periodRow = row
this.reasonVisible = true
},
onSign(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要签到吗?"
}).then(() => {
this.$axios.post("/platform/meeting/mine/sign", { periodId: row.id })
.then((res) => {
this.$toast(res.msg)
if (res.code === 0) {
this.doSearch()
this.leaveVisible = false
}
})
})
},
onView(row) {
this.$refs.infoRef.onOpen(row)
},
async queryMeetingType() {
const res = await this.$axios.post('/platform/meeting/type/queryMeetingType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,190 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</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-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入名称或地点查询"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/meeting/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="periodName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="开始时间">{{row.startTime}}</table-column>
<table-column label="结束时间">{{row.endTime}}</table-column>
<table-column label="请假人">{{row.userName}}</table-column>
<table-column label="请假事由">{{JSON.parse(row.instanceVariable).f_data.leaveReason || ''}}</table-column>
<table-column label="所属会议">{{row.meetingName}}</table-column>
<table-column label="会议类型">{{row.typeName}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</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" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-edit"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-reply"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<leave-info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</leave-info>
</div>
<script>
<!--#include('../common/leaveInfo.js'){}#-->
new Vue({
el: "#app",
store,
components: {
'leave-info': leaveInfo,
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
type: null,
},
typeOptions: [],
formData: {},
showApprovalForm: false
}
},
methods: {
async onReady() {
const typeList = await this.queryMeetingType()
this.typeOptions = [
{
text: "全部类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.type = this.typeOptions[0].value
this.doSearch()
}
},
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
onRevoke(row){
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
}
})
})
},
async queryMeetingType() {
const res = await this.$axios.post('/platform/meeting/type/queryMeetingType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -15,6 +15,14 @@ const apply = {
</div>
</div>
</div>
<div class="calendar-right">
<van-icon size="16" color="white" name="arrow-down" @click="calendarVisible = true"></van-icon>
<van-calendar class="calendar-popup" v-model="calendarVisible" color="#246fb4" position="top" @confirm="calendarConfirm"
:default-date="new Date(selectDate)"
:formatter="calendarFormatter"
:first-day-of-week="1"
title="选择开始日期"></van-calendar>
</div>
</div>
<div class="container">
@@ -105,10 +113,19 @@ const apply = {
formVisible: false,
formData: {},
calendarVisible: false,
}
},
watch: {
computed: {
calendarFormatter(day) {
return (day) => {
if(!this.allowDayList.includes(this.$moment(day.date).format('YYYY-MM-DD'))) {
day.type = 'disabled'
}
return day
}
}
},
methods: {
async onOpen(row, applyRow = null) {
@@ -141,6 +158,12 @@ const apply = {
await this.queryTimesByDay()
this.setWeekList(this.selectDate)
},
async calendarConfirm(date) {
this.selectDate = this.$moment(date).format('YYYY-MM-DD')
this.setWeekList(date)
await this.queryTimesByDay()
this.calendarVisible = false
},
onApply() {
if(Object.keys(this.selected).length === 0) {
this.$toast('请选择要预约的时间')
@@ -246,12 +269,8 @@ const apply = {
},
// 查询哪些天是开放的
async queryAllowDay() {
const startTime = this.weekList.length === 0 ? this.$moment().format('YYYY-MM-DD') : this.weekList[0].dateStr
const endTime = this.weekList.length === 0 ? this.$moment().add(8, 'd').format('YYYY-MM-DD') : this.weekList[this.weekList.length - 1].dateStr
const {data} = await this.$axios.post("/platform/site/apply/queryAllowDay", {
siteId: this.row.id,
startTime: startTime,
endTime: endTime,
})
this.allowDayList = data
},
@@ -323,5 +342,20 @@ const apply = {
::v-deep table {
border-collapse: collapse;
}
::v-deep .calendar-right {
width: 30px;
max-width: 30px;
text-align: center;
height: 60%;
border-left: 1px solid #fff3f3;
display: flex;
align-items: center;
justify-content: center;
margin-left: 5px;
}
::v-deep .calendar-popup {
top: 46px;
}
`
}
@@ -49,7 +49,7 @@ layout("/layouts/platform_h5.html"){
<script>
<!--#include('../common/siteInfo.js'){}#-->
<!--#include('../common/apply.js'){}#-->
<!--#include('apply.js'){}#-->
new Vue({
el: "#app",
store,
@@ -75,6 +75,17 @@ layout("/layouts/platform_h5.html"){
this.$refs.infoRef.onOpen(row)
},
onApply(row) {
if(row.reserveTarget === 1 && !this.$auth.hasRoleOr('BRANCH_UNION_ADMIN, BRANCH_UNION_CHAIRMAN') && !this.$auth.hasRole('SYSADMIN')) {
this.$message.warning('该场地只能分工会预约')
return
}
if (row.sexLimit === 1 || row.sexLimit === 2) {
const sex = row.sexLimit === 1 ? '男' : '女'
if(!this.$store.state.user.sex.includes(sex)) {
this.$toast('抱歉,该场地仅限' + sex + '性会员预约')
return
}
}
this.$refs.applyRef.onOpen(row)
},
async onReady() {
@@ -62,7 +62,7 @@ layout("/layouts/platform_h5.html"){
</div>
<script>
<!--#include('../common/apply.js'){}#-->
<!--#include('../apply/apply.js'){}#-->
<!--#include('../common/info.js'){}#-->
new Vue({
el: "#app",
@@ -117,13 +117,13 @@ layout("/layouts/platform_h5.html"){
const res = await this.$axios.post('/platform/site/manage/info', { id: row.siteId })
this.$refs.applyRef.onOpen(res.data, row)
},
onDelete(id) {
onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "确定要删除此申请吗?"
})
.then(() => {
this.$axios.post("/platform/site/mine/delete", { id: id }).then((res) => {
this.$axios.post("/platform/site/mine/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
@@ -114,13 +114,13 @@ layout("/layouts/platform_h5.html"){
onEdit(row) {
this.$pjaxReplace("/platform/condolence/apply/h5?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id)
},
onDelete(id) {
onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "确定要删除此申请吗?"
})
.then(() => {
this.$axios.post("/platform/condolence/mine/delete", { id: id }).then((res) => {
this.$axios.post("/platform/condolence/mine/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()