commit
This commit is contained in:
@@ -1,631 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style xmlns="">
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row .el-col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年  度:</span>
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 80%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>查询类型:</span>
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 80%" @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 110px;">
|
||||
<el-option label="姓名" value="userName"></el-option>
|
||||
<el-option label="工号" value="loginName"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<span>报名路线:</span>
|
||||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||||
:key="item.value"
|
||||
:type="item.label"
|
||||
@click="checkState(item.value)"
|
||||
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;font-size: 15px"
|
||||
v-for="item in options">
|
||||
{{ item.label }}
|
||||
</el-tag>
|
||||
<el-link :underline="false" @click="pageForm.state='';doSearch()"
|
||||
style="color: red" v-if="options.length&&pageForm.state">清空
|
||||
</el-link>
|
||||
<span style="color: red;font-size: 12px;margin-left: 10px">温馨提示:其他工会选我线路,所在工会审核过后,才显示数量</span>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
@change="unionChange"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unionDisabled">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>所属单位:</span>
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位"
|
||||
@change="doSearch"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unitDisabled">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>路线类型:</span>
|
||||
<el-select v-model="pageForm.regionalNature" filterable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%"
|
||||
@change="doSearch();pageForm.takePartInLineId=''">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="省内" value="省内"></el-option>
|
||||
<el-option label="省外" value="省外"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<span>选择路线:</span>
|
||||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in takePartInLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>标  段:</span>
|
||||
<el-select v-model="pageForm.lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in modifyConfig.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #label_end>
|
||||
<!-- <span style="color: red;margin-left: 10px">温馨提示:省内线路不需要审核</span>-->
|
||||
|
||||
</template>
|
||||
|
||||
<template #func>
|
||||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||||
:key="item.value"
|
||||
:type="item.label"
|
||||
@click="checkState(item.value)"
|
||||
style="margin-right: 10px;cursor: pointer;font-size: 15px"
|
||||
v-for="item in options">
|
||||
{{ item.label }}
|
||||
</el-tag>
|
||||
<el-link :underline="false" @click="pageForm.state='';doSearch()" class="mr10"
|
||||
style="color: red" v-if="options.length&&pageForm.state">清空
|
||||
</el-link>
|
||||
<template
|
||||
v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-button type="primary" size="small" class="mr10"
|
||||
@click="openOnekeyAudit">一键审核
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch()" size="small"
|
||||
v-model="pageForm.isAudit">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%"
|
||||
row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:selectable="ifEdit"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isTransferIn'">
|
||||
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
|
||||
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
|
||||
<sapn v-else>否</sapn>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='lineName'">
|
||||
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='isFamily'">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.num}})
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='num'">
|
||||
{{1+row.num}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='stateId'">
|
||||
<span v-if="row.stateId">
|
||||
<vi-table-state :state="row"></vi-table-state>
|
||||
</span>
|
||||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="300px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<template v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-button @click="doRecall(row)" size="mini" type="danger"
|
||||
v-if="ifRecall(row)">撤回
|
||||
</el-button>
|
||||
<el-button v-if="ifEdit(row)" @click="openEdit(row)" size="mini"
|
||||
type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<enroll-info ref="viewEnrollInfo" :union_id="unionId"></enroll-info>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<enroll-info ref="editEnrollInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="审核" name="audit">
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-row>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button @click="doAudit(false)" type="danger">退回
|
||||
</el-button>
|
||||
<el-button @click="doAudit(true)" type="primary">通过
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</enroll-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%">
|
||||
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="doOnekeyAudit(false)">取 消</el-button>
|
||||
<el-button type="primary" @click="doOnekeyAudit(true)">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionDisabled: false,
|
||||
unitDisabled: false,
|
||||
unionId: "${@shiro.getPrincipalProperty('unit').getUnionid()}",
|
||||
dialogVisible: false,
|
||||
tableSelection: [],
|
||||
formData: {
|
||||
id: "",
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: "",
|
||||
isTransferIn: false,
|
||||
},
|
||||
options: [
|
||||
{label: "本工会人员(自己线路)", value: "1"},
|
||||
{label: "本工会人员(其他路线)", value: "2"},
|
||||
{label: "其他工会人员(选我线路)", value: "3"}
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
takePartInLines: [],
|
||||
pageForm: {
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
isAudit: "",
|
||||
state: "",
|
||||
year: moment().format('YYYY'),
|
||||
searchName: "userName",
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},
|
||||
{prop: 'lineName', label: '线路', sortable: true},
|
||||
{prop: 'regionalNature', label: '线路类型', sortable: true},
|
||||
// {prop: 'userNature', label: '人员性质'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
// {prop: 'num', label: '人数'},
|
||||
{prop: 'isTransferIn', label: '是否转入转出', sortable: true},
|
||||
{prop: 'stateId', label: '审核状态', sortable: true},
|
||||
],
|
||||
modifyConfig: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/theRapyRecuperation/Enrollinfo.vue'),
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
|
||||
},
|
||||
methods: {
|
||||
async doOnekeyAudit(flag) {
|
||||
const confirm = await this.$confirm('您确定要一键审核您所勾选的信息吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doOnekeyAudit", {
|
||||
ids: JSON.stringify(this.tableSelection),
|
||||
flag: flag,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.data===0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
this.dialogVisible = false
|
||||
}else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
},
|
||||
async openOnekeyAudit() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$notify.warning({title: '警告', message: "请您先在左侧勾选在审核"});
|
||||
return
|
||||
}
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.tableSelection = val.map(v => v.id);
|
||||
},
|
||||
ifEdit(row) {
|
||||
const {
|
||||
stateId,
|
||||
selfUnionId,
|
||||
takePartInUnionId
|
||||
} = row
|
||||
if (stateId === 2710 && selfUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||||
return true
|
||||
} else if (stateId === 2720 && takePartInUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
ifRecall(row) {
|
||||
const {
|
||||
stateId,
|
||||
selfUnionId,
|
||||
takePartInUnionId
|
||||
} = row
|
||||
if ((stateId === 2715 || stateId === 2720 || stateId === 2750) && selfUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||||
return true
|
||||
} else if ((stateId === 2725 || stateId === 2750) && takePartInUnionId === "${@shiro.getPrincipalProperty('unit').getUnionid()}") {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
async doRecall(row) {
|
||||
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doRecall", {id: row.id})
|
||||
if (resp.code === 0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
}else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit(flag) {
|
||||
const confirm = await this.$confirm('您确定要' + (flag ? '通过' : '退回') + '吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doAudit", {
|
||||
flag: flag,
|
||||
id: this.formData.id,
|
||||
isTransferIn: this.formData.isTransferIn,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
openLine(row) {
|
||||
this.$refs.guava.public()
|
||||
this.$refs.viewLineInfo.findOne(row.lineId)
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$set(this.formData, "isTransferIn", row.isTransferIn)
|
||||
this.$set(this.formData, "id", row.id)
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editEnrollInfo.openAudit(row.id, 'audit')
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewEnrollInfo.openView(row.id)
|
||||
},
|
||||
async checkState(type) {
|
||||
this.pageForm.state = type
|
||||
this.$set(this.pageForm, "unionIds", [])
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
await this.getBmUserUnion()
|
||||
if (type === "1") {
|
||||
this.$set(this.pageForm, "unionId", this.unionId)
|
||||
this.unionDisabled = true
|
||||
} else if (type === "2") {
|
||||
this.unionDisabled = true
|
||||
this.unitDisabled = true
|
||||
} else if (type === "3") {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
|
||||
this.unionOptions = this.unionOptions.filter(v => v.id !== this.unionId)
|
||||
} else {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
}
|
||||
await this.unionChange()
|
||||
await this.doSearch()
|
||||
},
|
||||
async unionChange() {
|
||||
this.pageForm.unitId = null
|
||||
this.unitOptions = await getUnits(this.pageForm.unionId)
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
},
|
||||
/**
|
||||
* 查询所有报名人员的工会
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getBmUserUnion() {
|
||||
const {data} = await $.post(loc() + "/getBmUserUnion")
|
||||
this.unionOptions = data
|
||||
},
|
||||
async getXlByUnion() {
|
||||
const {data} = await $.post(loc() + "/getXlByUnion", {
|
||||
unionId: this.pageForm.unionId,
|
||||
year: this.pageForm.year,
|
||||
regionalNature: this.pageForm.regionalNature,
|
||||
state: this.pageForm.state
|
||||
})
|
||||
return data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
async getApplyNumAudit() {
|
||||
const {data} = await $.post(loc() + "/getApplyNumAudit", this.pageForm)
|
||||
this.options = [
|
||||
{label: "本工会人员(自己线路)" + data.count1 + "人", value: "1"},
|
||||
{label: "本工会人员(其他路线)" + data.count2 + "人", value: "2"},
|
||||
{label: "其他工会人员(选我线路)" + data.count3 + "人", value: "3"}
|
||||
]
|
||||
|
||||
},
|
||||
async doSearch() {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
await this.getApplyNumAudit()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getBmUserUnion()
|
||||
await this.getModifyConfig()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,606 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style xmlns="">
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row .el-col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年  度:</span>
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 80%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>查询类型:</span>
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 80%" @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 110px;">
|
||||
<el-option label="姓名" value="userName"></el-option>
|
||||
<el-option label="工号" value="loginName"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row align="middle" class="query-row" type="flex">-->
|
||||
<!-- <el-col class="query-row-title"></el-col>-->
|
||||
<!-- <el-col class="query-row-content">-->
|
||||
<!-- <span>报名路线:</span>-->
|
||||
<!-- <el-tag :effect="pageForm.state===item.value?'dark':'plain'"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :type="item.label"-->
|
||||
<!-- @click="checkState(item.value)"-->
|
||||
<!-- style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;font-size: 15px"-->
|
||||
<!-- v-for="item in options">-->
|
||||
<!-- {{ item.label }}-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-link :underline="false" @click="pageForm.state='';doSearch()"-->
|
||||
<!-- style="color: red" v-if="options.length&&pageForm.state">清空-->
|
||||
<!-- </el-link>-->
|
||||
<!-- <span style="color: red;font-size: 12px;margin-left: 10px">温馨提示:其他工会选我线路,所在工会审核过后,才显示数量</span>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
@change="unionChange"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unionDisabled">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>所属单位:</span>
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位"
|
||||
@change="doSearch"
|
||||
filterable clearable style="width: 80%"
|
||||
:disabled="unitDisabled">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>路线类型:</span>
|
||||
<el-select v-model="pageForm.regionalNature" filterable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%"
|
||||
@change="doSearch();pageForm.takePartInLineId=''">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="省内" value="省内"></el-option>
|
||||
<el-option label="省外" value="省外"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<span>选择路线:</span>
|
||||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in takePartInLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>标  段:</span>
|
||||
<el-select v-model="pageForm.lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in modifyConfig.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #label_end>
|
||||
<!-- <span style="color: red;margin-left: 10px">温馨提示:省内线路不需要审核</span>-->
|
||||
</template>
|
||||
|
||||
<template #func
|
||||
v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-button type="primary" size="small" class="mr10"
|
||||
@click="openOnekeyAudit">一键审核
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch()" size="small"
|
||||
v-model="pageForm.isAudit">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" style="width: 100%"
|
||||
row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
:selectable="ifEdit"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isTransferIn'">
|
||||
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
|
||||
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
|
||||
<sapn v-else>否</sapn>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='lineName'">
|
||||
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='isFamily'">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.num}})
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='num'">
|
||||
{{1+row.num}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='stateId'">
|
||||
<span v-if="row.stateId">
|
||||
<vi-table-state :state="row"></vi-table-state>
|
||||
</span>
|
||||
<sapn v-else style="color: #67C23A">暂无</sapn>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="300px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<template v-if="!pageForm.regionalNature||
|
||||
(pageForm.regionalNature==='省内'&&modifyConfig.isSnLine)||
|
||||
(pageForm.regionalNature==='省外'&&modifyConfig.isSwLine)">
|
||||
<el-button @click="doRecall(row)" size="mini" type="danger"
|
||||
v-if="ifRecall(row)">撤回
|
||||
</el-button>
|
||||
<el-button v-if="ifEdit(row)" @click="openEdit(row)" size="mini"
|
||||
type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<enroll-info ref="viewEnrollInfo" :union_id="unionId"></enroll-info>
|
||||
</template>
|
||||
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<enroll-info ref="editEnrollInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="审核" name="audit">
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-row>
|
||||
<el-row style="margin: 40px 0;text-align: right">
|
||||
<el-button @click="doAudit(false)" type="danger">退回
|
||||
</el-button>
|
||||
<el-button @click="doAudit(true)" type="primary">通过
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</enroll-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%">
|
||||
|
||||
<el-form :model="formData" label-width="130px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4" type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="doOnekeyAudit(false)">取 消</el-button>
|
||||
<el-button type="primary" @click="doOnekeyAudit(true)">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unionDisabled: false,
|
||||
unitDisabled: false,
|
||||
unionId: "${@shiro.getPrincipalProperty('unit').getUnionid()}",
|
||||
dialogVisible: false,
|
||||
tableSelection: [],
|
||||
formData: {
|
||||
id: "",
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
loginName: "${@shiro.getPrincipalProperty('loginname')}",
|
||||
auditTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
auditOpinion: "",
|
||||
isTransferIn: false,
|
||||
},
|
||||
options: [
|
||||
{label: "本工会人员(自己线路)", value: "1"},
|
||||
{label: "本工会人员(其他路线)", value: "2"},
|
||||
{label: "其他工会人员(选我线路)", value: "3"}
|
||||
],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
takePartInLines: [],
|
||||
pageForm: {
|
||||
lotId: '',
|
||||
regionalNature: '',
|
||||
isAudit: "",
|
||||
state: "",
|
||||
year: moment().format('YYYY'),
|
||||
searchName: "userName",
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},
|
||||
{prop: 'lineName', label: '线路', sortable: true},
|
||||
{prop: 'regionalNature', label: '线路类型', sortable: true},
|
||||
// {prop: 'userNature', label: '人员性质'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
// {prop: 'num', label: '人数'},
|
||||
{prop: 'isTransferIn', label: '是否转入转出', sortable: true},
|
||||
{prop: 'stateId', label: '审核状态', sortable: true},
|
||||
],
|
||||
modifyConfig: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/theRapyRecuperation/XghEnrollInfo.vue'),
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
|
||||
},
|
||||
methods: {
|
||||
async doOnekeyAudit(flag) {
|
||||
const confirm = await this.$confirm('您确定要一键审核您所勾选的信息吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doOnekeyAudit", {
|
||||
ids: JSON.stringify(this.tableSelection),
|
||||
flag: flag,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
this.dialogVisible = false
|
||||
}else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
},
|
||||
async openOnekeyAudit() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$notify.warning({title: '警告', message: "请您先在左侧勾选在审核"});
|
||||
return
|
||||
}
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.tableSelection = val.map(v => v.id);
|
||||
},
|
||||
ifEdit(row) {
|
||||
const {
|
||||
stateId,
|
||||
} = row
|
||||
if (stateId === 2730) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
ifRecall(row) {
|
||||
const {
|
||||
stateId,
|
||||
} = row
|
||||
if (stateId === 2750) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
async doRecall(row) {
|
||||
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doRecall", {id: row.id})
|
||||
if (resp.code === 0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
}else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async doAudit(flag) {
|
||||
const confirm = await this.$confirm('您确定要' + (flag ? '通过' : '退回') + '吗, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doAudit", {
|
||||
flag: flag,
|
||||
id: this.formData.id,
|
||||
isTransferIn: this.formData.isTransferIn,
|
||||
auditOpinion: this.formData.auditOpinion
|
||||
})
|
||||
if (resp.code === 0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
await this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}else {
|
||||
this.$notify.warning({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
openLine(row) {
|
||||
this.$refs.guava.public()
|
||||
this.$refs.viewLineInfo.findOne(row.lineId)
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$set(this.formData, "isTransferIn", row.isTransferIn)
|
||||
this.$set(this.formData, "id", row.id)
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.editEnrollInfo.openAudit(row.id, 'audit')
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewEnrollInfo.openView(row.id)
|
||||
},
|
||||
async checkState(type) {
|
||||
this.pageForm.state = type
|
||||
this.$set(this.pageForm, "unionIds", [])
|
||||
this.$set(this.pageForm, "unionId", null)
|
||||
await this.getBmUserUnion()
|
||||
if (type === "1") {
|
||||
this.$set(this.pageForm, "unionId", this.unionId)
|
||||
this.unionDisabled = true
|
||||
} else if (type === "2") {
|
||||
this.unionDisabled = true
|
||||
this.unitDisabled = true
|
||||
} else if (type === "3") {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
|
||||
this.unionOptions = this.unionOptions.filter(v => v.id !== this.unionId)
|
||||
} else {
|
||||
this.unionDisabled = false
|
||||
this.unitDisabled = false
|
||||
}
|
||||
await this.unionChange()
|
||||
await this.doSearch()
|
||||
},
|
||||
async unionChange() {
|
||||
this.pageForm.unitId = null
|
||||
this.unitOptions = await getUnits(this.pageForm.unionId)
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
},
|
||||
/**
|
||||
* 查询所有报名人员的工会
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async getBmUserUnion() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/TheRapyAudit/getBmUserUnion")
|
||||
this.unionOptions = data
|
||||
},
|
||||
async getXlByUnion() {
|
||||
const {data} = await $.post(loc() + "/getXghLine", {
|
||||
unionId: this.pageForm.unionId,
|
||||
year: this.pageForm.year,
|
||||
regionalNature: this.pageForm.regionalNature,
|
||||
state: this.pageForm.state
|
||||
})
|
||||
return data
|
||||
},
|
||||
pageData() {
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.states = JSON.stringify(pageForm.states)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code === 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
// async getApplyNumAudit() {
|
||||
// const {data} = await $.post(loc() + "/getApplyNumAudit", this.pageForm)
|
||||
// this.options = [
|
||||
// {label: "本工会人员(自己线路)" + data.count1 + "人", value: "1"},
|
||||
// {label: "本工会人员(其他路线)" + data.count2 + "人", value: "2"},
|
||||
// {label: "其他工会人员(选我线路)" + data.count3 + "人", value: "3"}
|
||||
// ]
|
||||
// },
|
||||
async doSearch() {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
//await this.getApplyNumAudit()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getBmUserUnion()
|
||||
await this.getModifyConfig()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
await this.doSearch()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,696 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">目的地:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入目的地名称"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.baseName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">旅行社:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId"
|
||||
@change="doSearch">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动范围:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.regionalNature"
|
||||
@change="doSearch">
|
||||
<el-option key="1" label="省内" value="省内"></el-option>
|
||||
<el-option key="1" label="省外" value="省外"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">标段时间:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.lotId"
|
||||
@change="doSearch">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in modifyBdList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="目的地列表">
|
||||
<template #func>
|
||||
<el-button @click="openImport" size="medium" type="primary" style="margin-right: 10px">导入目的地</el-button>
|
||||
<el-button @click="openAdd" size="medium" type="primary">新建目的地</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{baseStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='lotId'">
|
||||
<div v-for="item in modifyBdList">
|
||||
<span v-if="row.lotId===item.id">{{item.lotName}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop==='activityTime'">
|
||||
<span>
|
||||
{{row.activityStartTime + '至' + row.activityEndTime}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row.id)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" :rules="rules" label-width="160px" ref="form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker style="width: 100%"
|
||||
@change="yearChange"
|
||||
type="year"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="排序编号" prop="sortNumber">
|
||||
<el-input maxlength="50" v-model="formData.sortNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="目的地名称" prop="baseName">
|
||||
<el-input maxlength="50" v-model="formData.baseName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社名称" prop="travelAgencyId">
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName+'('+ item.year +'年)'"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="组织形式" prop="createMode">
|
||||
<el-radio-group size="small" v-model="formData.createMode">
|
||||
<el-radio :label="1" border>校工会组织</el-radio>
|
||||
<el-radio :label="2" border>分工会组织</el-radio>
|
||||
</el-radio-group>
|
||||
<!--<div class="text-primary">-->
|
||||
<!-- <i class="el-icon-warning"></i>-->
|
||||
<!-- 温馨提醒:校工会可以为基层工会创建线路,分工会自行选择并设置活动相关时间。-->
|
||||
<!--</div>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="活动范围" prop="regionalNature">
|
||||
<el-radio-group size="small" v-model="formData.regionalNature">
|
||||
<el-radio label="省内" border>省内</el-radio>
|
||||
<el-radio label="省外" border>省外</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="标段时间" prop="lotId">
|
||||
<!--<el-input clearable maxlength="50" v-model="formData.lotId"></el-input>-->
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.lotId"
|
||||
@change="doBdModify">
|
||||
<el-option :key="item"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in modifyBdList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="预计费用(元/人次)" prop="estimatedCost">
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.estimatedCost">
|
||||
<el-option :key="item.id"
|
||||
:label="item.activityCost"
|
||||
:value="item.activityCost"
|
||||
v-for="item in modifyBdList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="目的地联系人" prop="baseContactPerson">
|
||||
<el-input clearable maxlength="20" v-model="formData.baseContactPerson"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="联系人电话" prop="baseContactNumber">
|
||||
<el-input clearable maxlength="20" v-model="formData.baseContactNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="报名开始时间" prop="signUpStartTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.signUpStartTime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="报名截至时间" prop="signUpEndTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.signUpEndTime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="变更截至时间" prop="changeEndTime">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.changeEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<span class="text-primary">
|
||||
<i class="el-icon-warning"></i>
|
||||
温馨提醒:
|
||||
</span>
|
||||
</template>
|
||||
<span class="text-primary">
|
||||
变更时间应该大于报名截至时间,小于活动时间。
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="活动开始时间" prop="activityStartTime">
|
||||
<el-date-picker
|
||||
placeholder="活动开始时间"
|
||||
style="width: 100%"
|
||||
type="date"
|
||||
v-model="formData.activityStartTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="活动结束时间" prop="activityEndTime">
|
||||
<el-date-picker
|
||||
placeholder="活动结束时间"
|
||||
style="width: 100%"
|
||||
type="date"
|
||||
v-model="formData.activityEndTime"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="详细信息" prop="content">
|
||||
<div id="lineContent"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="是否启用" prop="isDisabled">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="formData.isDisabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="图片上传" prop="files">
|
||||
<file-upload :files.sync="formData.files" :max="1" :type="['jpg', 'jpeg', 'png']">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
图片类请上传jpg/png/jpeg格式,上传数量为1个
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<el-row class="pb20" justify="end" type="flex">
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary" v-throttle>提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
<template #view>
|
||||
<base-info ref="viewBaseInfo"></base-info>
|
||||
</template>
|
||||
|
||||
<el-dialog
|
||||
title="目的地导入"
|
||||
:visible.sync="importVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" type=""
|
||||
@click="location.href='/platform/theRapyRecuperation/baseManagement/exportTemplate'"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {importData.fileList = fileHandleRemove(file, fileList)}"
|
||||
:on-change="(file, fileList) => {importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})}"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload"
|
||||
style="width: 200px">选择文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #F56C6C">
|
||||
只能上传 xls/xlsx 文件
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'base-info': httpVueLoader('/components/theRapyRecuperation/BaseManageInfo.vue')
|
||||
},
|
||||
data() {
|
||||
const validateSignUpEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择报名截至时间'))
|
||||
}
|
||||
if (this.formData.signUpStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateChangeEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择变更截至时间'))
|
||||
}
|
||||
if (this.formData.activityStartTime) {
|
||||
if (Date.parse(value) >= Date.parse(this.formData.activityStartTime)) {
|
||||
callback(new Error('变更截至时间必须小于活动开始时间'))
|
||||
}
|
||||
}
|
||||
if (this.formData.signUpEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||
callback(new Error('变更截至时间必须大于活动截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateActivityStartTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择活动开始时间'))
|
||||
}
|
||||
if (this.formData.changeEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.changeEndTime)) {
|
||||
callback(new Error('活动开始时间必须大于变更截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
const validateActivityEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择活动结束时间'))
|
||||
}
|
||||
if (this.formData.activityStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.activityStartTime)) {
|
||||
callback(new Error('活动结束时间必须大于活动开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
return {
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
unionId: '',
|
||||
baseName: '',
|
||||
travelAgencyId: '',
|
||||
regionalNature: '',
|
||||
lotId: '',
|
||||
},
|
||||
unionOptions: [],
|
||||
travelAgencyList: [],
|
||||
signUpModeList: [],
|
||||
modifyBdList: [],
|
||||
formData: {
|
||||
id: '',
|
||||
sortNumber: '',
|
||||
baseName: '',
|
||||
travelAgencyId: '',
|
||||
regionalNature: '省内',
|
||||
year: new Date().getFullYear().toString(),
|
||||
isDisabled: false,
|
||||
lotId: '',
|
||||
content: '',
|
||||
signUpStartTime: '',
|
||||
signUpEndTime: '',
|
||||
changeEndTime: '',
|
||||
files: [],
|
||||
createMode: '',
|
||||
estimatedCost: '',
|
||||
activityStartTime: '',
|
||||
activityEndTime: '',
|
||||
baseContactPerson: '',
|
||||
baseContactNumber: '',
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '目的地名称', prop: 'baseName', sortable: true},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||
{label: '标段时间', prop: 'lotId', sortable: true},
|
||||
{label: '联系人', prop: 'baseContactPerson', sortable: true},
|
||||
{label: '联系人电话', prop: 'baseContactNumber', sortable: true},
|
||||
{label: '活动时间', prop: 'activityTime', sortable: true},
|
||||
//{label: '创建工会', prop: 'createUnionName', sortable: true},
|
||||
{label: '活动范围', prop: 'regionalNature', sortable: true},
|
||||
//{label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
//{label: '编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '创建人', prop: 'createUserName', sortable: true},
|
||||
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
],
|
||||
rules: {
|
||||
sortNumber: [{required: false, message: '请输入排序编号', trigger: ['change', 'blur']}],
|
||||
baseName: [{required: true, message: '请输入目的地名称', trigger: ['change', 'blur']}],
|
||||
travelAgencyId: [{required: true, message: '请选择旅行社', trigger: ['change', 'blur']}],
|
||||
regionalNature: [{required: true, message: '请选择区域性质', trigger: ['change', 'blur']}],
|
||||
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||
lotId: [{required: true, message: '请选择出行天数', trigger: ['change', 'blur']}],
|
||||
content: [{required: false, message: '请输入详细内容', trigger: ['change', 'blur']}],
|
||||
signUpStartTime: [{required: true, message: '请选择报名开始时间', trigger: ['change', 'blur']}],
|
||||
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||
files: [{required: true, message: '请上传图片', trigger: ['change', 'blur']}],
|
||||
createMode: [{required: true, message: '请选择组织方式', trigger: ['change', 'blur']}],
|
||||
activityStartTime: [{ required: true, validator: validateActivityStartTime, trigger: ['change', 'blur'] }],
|
||||
activityEndTime: [{ required: true, validator: validateActivityEndTime, trigger: ['change', 'blur'] }],
|
||||
estimatedCost: [{required: true, message: '请输入预计费用', trigger: ['change', 'blur']}],
|
||||
},
|
||||
//目的地导入
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
importData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSearch() {
|
||||
this.formData.year = this.pageForm.year;
|
||||
await this.yearChange();
|
||||
await this.pageData();
|
||||
},
|
||||
async selectTravelAgencyList() {
|
||||
const resp = await $.post('/platform/theRapyRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||
this.travelAgencyList = resp.data
|
||||
},
|
||||
async openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData.id = null
|
||||
this.initLineContentEditor()
|
||||
})
|
||||
},
|
||||
async openEdit(id) {
|
||||
const resp = await $.post(loc() + '/selectBaseManageById/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.edit()
|
||||
await this.$nextTick()
|
||||
const data = resp.data
|
||||
data.year = data.year.toString()
|
||||
this.formData = {...data}
|
||||
this.initLineContentEditor(data.content)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async baseStatusChange(id) {
|
||||
const resp = await $.post(loc() + '/openClosedBase/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/deleteBase/' + id)
|
||||
if (resp.code === 0) {
|
||||
await this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '提交中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
const resp = await $.post(loc() + '/doSubmit', {base: JSON.stringify(this.formData)})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
yearChange() {
|
||||
this.formData.travelAgencyId = null
|
||||
this.selectTravelAgencyList()
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewBaseInfo.openView(id, this.modifyBdList)
|
||||
},
|
||||
doBdModify() {
|
||||
let obj = this.formData;
|
||||
this.modifyBdList.forEach((v, i) => {
|
||||
if (obj.lotId === v.id) {
|
||||
obj.estimatedCost = v.activityCost
|
||||
}
|
||||
});
|
||||
this.formData = obj;
|
||||
},
|
||||
async initPageData() {
|
||||
await this.getModifyBd();
|
||||
this.unionOptions = await getUnions(null)
|
||||
await this.selectTravelAgencyList()
|
||||
},
|
||||
async getModifyBd() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyBdList = res.data.lots
|
||||
// this.modifyBdList.forEach((v, i) => {
|
||||
// v.id = JSON.stringify(v.id)
|
||||
// })
|
||||
}
|
||||
},
|
||||
initLineContentEditor(content) {
|
||||
$("#lineContent").html("")
|
||||
lineContentEditor = new wangEditor("#lineContent")
|
||||
lineContentEditor.config.onchange = (html) => {
|
||||
this.formData.content = html
|
||||
}
|
||||
lineContentEditor.config.uploadImgShowBase64 = true
|
||||
lineContentEditor.create()
|
||||
if (content) {
|
||||
lineContentEditor.txt.html(content)
|
||||
}
|
||||
},
|
||||
openImport() {
|
||||
this.importData = {
|
||||
fileList: []
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
});
|
||||
this.importLoading = true
|
||||
$.ajax({
|
||||
url: loc() + "/importBaseManager",
|
||||
type: "post",
|
||||
data: data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (data) => {
|
||||
if (data.code === 0){
|
||||
this.pageData();
|
||||
this.importVisible = false
|
||||
}else {
|
||||
this.importVisible = false
|
||||
}
|
||||
},
|
||||
error: (data) => {
|
||||
this.notifyWarning("导入失败")
|
||||
this.importLoading = false
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initPageData();
|
||||
this.pageData();
|
||||
},
|
||||
computed: {
|
||||
editDialogTitle() {
|
||||
return this.formData.id ? '编辑目的地' : '新增目的地'
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,853 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.mr0-radio {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mr0-radio label {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">旅行社:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lineName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">时间标段:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lotId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in lotList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
<el-button @click="openImport" size="medium" type="primary">导入线路</el-button>
|
||||
<el-button @click="openAdd" size="medium" type="primary">新建线路</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row:{signUpMode}}" v-else-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='playTime'">
|
||||
<el-button @click="viewUnionSelectTimeInfo(row.id)"
|
||||
type="text">
|
||||
查看详情
|
||||
</el-button>
|
||||
<!-- v-if="row.createMode===2 && row.signUpMode===1"-->
|
||||
<!--<span v-else>
|
||||
{{row.playStartTime + '至' + row.playEndTime}}
|
||||
</span>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row.id)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" :rules="rules" label-width="160px" ref="form">
|
||||
<el-row :gutter="20" class="">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="">
|
||||
<span class="text-primary">
|
||||
<i class="el-icon-warning"></i>
|
||||
温馨提醒:分工会组织的线路,可以自行设置出行时间。
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker style="width: 100%"
|
||||
@change="yearChange"
|
||||
type="year"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="排序号" prop="serialNumber">
|
||||
<el-input maxlength="50" v-model="formData.serialNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="线路名称" prop="lineName">
|
||||
<el-input maxlength="50" v-model="formData.lineName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社名称" prop="travelAgencyId">
|
||||
<el-select clearable filterable style="width: 100%" v-model="formData.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName+'('+ item.year +'年)'"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社联系人">
|
||||
<el-input
|
||||
:value="(travelAgencyList.find(v => v.id === formData.travelAgencyId) ?? {}).contact"
|
||||
readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="联系方式">
|
||||
<el-input
|
||||
:value="(travelAgencyList.find(v => v.id === formData.travelAgencyId) ?? {}).contactMobileNumber"
|
||||
readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="线路类型" prop="regionalNature">
|
||||
<el-radio-group class="mr0-radio" size="small" v-model="formData.regionalNature">
|
||||
<el-radio :label="item.value"
|
||||
border v-for="item in regionalNatureList">
|
||||
{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="时间标段" prop="lotId">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="formData.lotId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in lotList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="交通工具" prop="trafficTools">
|
||||
<el-input clearable maxlength="50" v-model="formData.trafficTools"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最少成团人数" prop="minimumGroupSize">
|
||||
<el-input-number :max="1000"
|
||||
:min="config.groupNumber"
|
||||
:precision="0"
|
||||
style="width: 100%"
|
||||
v-model="formData.minimumGroupSize"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预计人数(含家属)" prop="estimatedFamilyNumbers">
|
||||
<el-input-number :max="1000"
|
||||
:min="1"
|
||||
:precision="0"
|
||||
style="width: 100%"
|
||||
v-model="formData.estimatedFamilyNumbers"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="预计费用(元/人次)" prop="estimatedCost">
|
||||
<el-input clearable maxlength="50" v-model="formData.estimatedCost"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="组织形式" prop="signUpMode">
|
||||
<el-radio-group class="mr0-radio" size="small" v-model="formData.signUpMode">
|
||||
<el-radio :label="item.value" v-if="isShow(item.roles)"
|
||||
size="small"
|
||||
border v-for="item in signUpModeList">
|
||||
{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<div class="text-primary">
|
||||
<i class="el-icon-warning"></i>
|
||||
温馨提醒:校工会可以为基层工会创建线路,分工会自行选择并设置活动相关时间。
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="lineContact">
|
||||
<el-input clearable max="50" v-model="formData.lineContact"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :rules="[
|
||||
{ required: false, message: '手机号码不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[34578]\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' }
|
||||
]" label="联系方式" prop="lineContactPhone">
|
||||
<el-input clearable v-model="formData.lineContactPhone"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <template v-if="formData.signUpMode===2 || formData.createMode===1">-->
|
||||
<!-- <el-row :gutter="20">-->
|
||||
<!-- <el-col :md="12" :sm="24" :xs="24">-->
|
||||
<!-- <el-form-item label="报名开始时间" prop="signUpStartTime">-->
|
||||
<!-- <el-date-picker style="width: 100%"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- v-model="formData.signUpStartTime"-->
|
||||
<!-- format="yyyy-MM-dd HH:mm"-->
|
||||
<!-- value-format="yyyy-MM-dd HH:mm:ss">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :md="12" :sm="24" :xs="24">-->
|
||||
<!-- <el-form-item label="报名截至时间" prop="signUpEndTime">-->
|
||||
<!-- <el-date-picker style="width: 100%"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- v-model="formData.signUpEndTime"-->
|
||||
<!-- format="yyyy-MM-dd HH:mm"-->
|
||||
<!-- value-format="yyyy-MM-dd HH:mm:ss">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- <el-row :gutter="20">-->
|
||||
<!-- <el-col :md="12" :sm="24" :xs="24">-->
|
||||
<!-- <el-form-item label="变更截至时间" prop="changeEndTime">-->
|
||||
<!-- <el-date-picker style="width: 100%"-->
|
||||
<!-- type="datetime"-->
|
||||
<!-- v-model="formData.changeEndTime"-->
|
||||
<!-- value-format="yyyy-MM-dd HH:mm:ss">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :md="12" :sm="24" :xs="24">-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <template #label>-->
|
||||
<!-- <span class="text-primary">-->
|
||||
<!-- <i class="el-icon-warning"></i>-->
|
||||
<!-- 温馨提醒:-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- <span class="text-primary">-->
|
||||
<!-- 变更时间应该大于报名截至时间,小于出行时间。-->
|
||||
<!-- </span>-->
|
||||
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- <el-row :gutter="20">-->
|
||||
<!-- <el-col :md="12" :sm="24" :xs="24">-->
|
||||
<!-- <el-form-item label="出行开始时间" prop="playStartTime">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- placeholder="出行开始时间"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- type="date"-->
|
||||
<!-- v-model="formData.playStartTime"-->
|
||||
<!-- value-format="yyyy-MM-dd">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :md="12" :sm="24" :xs="24">-->
|
||||
<!-- <el-form-item label="出行结束时间" prop="playEndTime">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- placeholder="出行结束时间"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- type="date"-->
|
||||
<!-- v-model="formData.playEndTime"-->
|
||||
<!-- value-format="yyyy-MM-dd">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </template>-->
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="线路内容" prop="content">
|
||||
<div id="lineContent"></div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="是否启用" prop="isDisabled">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="formData.isDisabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="移动端缩略图" prop="files">
|
||||
<file-upload :files.sync="formData.files"
|
||||
picture_card
|
||||
:max="1"
|
||||
:type="['jpg', 'jpeg', 'png']"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<el-row class="pb20" justify="end" type="flex">
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary" v-throttle>提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
:visible.sync="lineUnionSetTimeDialog"
|
||||
title="查看详情"
|
||||
top="50px"
|
||||
width="60%">
|
||||
<el-table :data="lineUnionSetTimeInfos">
|
||||
<el-table-column label="分工会" prop="selectUnionName"></el-table-column>
|
||||
<el-table-column label="报名开始时间" prop="signUpStartTime"></el-table-column>
|
||||
<el-table-column label="报名截至时间" prop="signUpEndTime"></el-table-column>
|
||||
<el-table-column label="游玩开始时间" prop="playStartTime"></el-table-column>
|
||||
<el-table-column label="游玩结束时间" prop="playEndTime"></el-table-column>
|
||||
<el-table-column label="变更截至时间" prop="changeEndTime"></el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="路线导入"
|
||||
:visible.sync="importVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" type=""
|
||||
@click="location.href='/platform/theRapyRecuperation/line/exportTemplate'"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
}"
|
||||
:on-change="(file, fileList) => {
|
||||
importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})
|
||||
}"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload"
|
||||
style="width: 200px">选择文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #F56C6C">
|
||||
只能上传 xls/xlsx 文件
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let lineContentEditor = null
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
computed: {
|
||||
editDialogTitle() {
|
||||
return this.formData.id ? '编辑线路' : '新增线路'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const validateSignUpEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择报名截至时间'))
|
||||
}
|
||||
if (this.formData.signUpStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
const validateChangeEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择变更截至时间'))
|
||||
}
|
||||
if (this.formData.playStartTime) {
|
||||
if (Date.parse(value) >= Date.parse(this.formData.playStartTime)) {
|
||||
callback(new Error('变更截至时间必须小于出行开始时间'))
|
||||
}
|
||||
}
|
||||
if (this.formData.signUpEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||
callback(new Error('变更截至时间必须大于报名截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
const validatePlayEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择出行结束时间'))
|
||||
}
|
||||
if (this.formData.playStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.playStartTime)) {
|
||||
callback(new Error('出行结束时间必须大于出行开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true, width: '200'},
|
||||
{label: '时间标段', prop: 'lotName', sortable: true, sortProp: 'lotValue'},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||
// {label: '出行时间', prop: 'playTime', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
{label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
// {label: '编号', prop: 'serialNumber', sortable: true},
|
||||
// {label: '创建模式', prop: 'createMode', sortable: true},
|
||||
{label: '创建人', prop: 'createUserName', sortable: true},
|
||||
//{label: '创建工会', prop: 'createUnionName', sortable: true},
|
||||
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
],
|
||||
editDialogVisible: false,
|
||||
rules: {
|
||||
serialNumber: [{required: true, message: '请输入排序号', trigger: ['change', 'blur']}],
|
||||
lineName: [{required: true, message: '请输入线路名称', trigger: ['change', 'blur']}],
|
||||
travelAgencyId: [{required: true, message: '请选择旅行社', trigger: ['change', 'blur']}],
|
||||
regionalNature: [{required: true, message: '请选择区域性质', trigger: ['change', 'blur']}],
|
||||
minimumGroupSize: [{required: true, message: '请输入最少成团人数', trigger: ['change', 'blur']}],
|
||||
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||
playNumberOfDays: [{required: true, message: '请输入游玩天数', trigger: ['change', 'blur']}],
|
||||
//content: [{required: true, message: '请输入线路内容', trigger: ['change', 'blur']}],
|
||||
signUpStartTime: [{
|
||||
required: true,
|
||||
message: '请选择报名开始时间',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||
//files: [{required: true, message: '请上传移动端缩略图', trigger: ['change', 'blur']}],
|
||||
signUpMode: [{required: true, message: '请选择报名模式', trigger: ['change', 'blur']}],
|
||||
|
||||
playStartTime: [{required: true, message: '请选择出行开始时间', trigger: ['change', 'blur']}],
|
||||
playEndTime: [{required: true, validator: validatePlayEndTime, trigger: ['change', 'blur']}],
|
||||
trafficTools: [{required: false, message: '请输入交通工具', trigger: ['change', 'blur']}],
|
||||
estimatedCost: [{required: false, message: '请输入预计费用', trigger: ['change', 'blur']}],
|
||||
estimatedFamilyNumbers: [{
|
||||
required: false,
|
||||
message: '请输入预计人数(含家属)',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
lotId: [{required: true, message: '请选择标段时间', trigger: ['change', 'blur']}]
|
||||
|
||||
},
|
||||
viewData: {},
|
||||
regionalNatureList: [],
|
||||
travelAgencyList: [],
|
||||
signUpModeList: [],
|
||||
createModeList: [],
|
||||
formData: {
|
||||
id: null,
|
||||
serialNumber: null,
|
||||
lineName: null,
|
||||
travelAgencyId: null,
|
||||
regionalNature: null,
|
||||
minimumGroupSize: 1,
|
||||
year: null,
|
||||
isDisabled: false,
|
||||
playNumberOfDays: 1,
|
||||
content: null,
|
||||
signUpStartTime: null,
|
||||
signUpEndTime: null,
|
||||
changeEndTime: null,
|
||||
files: [],
|
||||
signUpMode: null,
|
||||
createMode: null,
|
||||
playStartTime: null,
|
||||
playEndTime: null,
|
||||
trafficTools: null,
|
||||
estimatedCost: null,
|
||||
estimatedFamilyNumbers: 1,
|
||||
lotId: null,
|
||||
lineContact: null,
|
||||
lineContactPhone: null
|
||||
},
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: new Date().getFullYear().toString(),
|
||||
unionId: null,
|
||||
lineName: null,
|
||||
travelAgencyId: null
|
||||
},
|
||||
unionOptions: [],
|
||||
lineUnionSetTimeInfos: [],
|
||||
lineUnionSetTimeDialog: false,
|
||||
config: {},
|
||||
travelAgencyOptions: [],
|
||||
lotList: [],
|
||||
//路线导入
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
importData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isShow(roles) {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}" === 'true') {
|
||||
return true
|
||||
}
|
||||
if ("${@shiro.hasRole('H04')}" === 'true') {
|
||||
return roles.some(r => r === 'H04')
|
||||
}
|
||||
},
|
||||
async getCreateMode() {
|
||||
const resp = await $.get(loc() + '/getCreateMode')
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
async openAdd() {
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData.id = null
|
||||
this.initLineContentEditor()
|
||||
})
|
||||
const createMode = await this.getCreateMode()
|
||||
this.formData.createMode = createMode
|
||||
if (createMode === 1) {
|
||||
this.formData.signUpMode = 1
|
||||
}
|
||||
if (this.config) {
|
||||
this.formData.minimumGroupSize = this.config.groupNumber
|
||||
}
|
||||
},
|
||||
async openEdit(id) {
|
||||
const resp = await $.post(loc() + '/selectLineInfoById/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.edit()
|
||||
await this.$nextTick()
|
||||
const data = resp.data
|
||||
data.year = data.year.toString()
|
||||
this.formData = {...data}
|
||||
this.initLineContentEditor(data.content)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '提交中',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
const resp = await $.post(loc() + '/doSubmit', {line: JSON.stringify(this.formData)})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async lineStatusChange(id) {
|
||||
const resp = await $.post(loc() + '/openClosedLine/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('可能会导致数据不完整,您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/deleteLine/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewLineInfo.openView(id)
|
||||
},
|
||||
initLineContentEditor(content) {
|
||||
$("#lineContent").html("")
|
||||
lineContentEditor = new wangEditor("#lineContent")
|
||||
lineContentEditor.config.onchange = (html) => {
|
||||
this.formData.content = html
|
||||
}
|
||||
lineContentEditor.config.uploadImgShowBase64 = true
|
||||
lineContentEditor.create()
|
||||
if (content) {
|
||||
lineContentEditor.txt.html(content)
|
||||
}
|
||||
},
|
||||
async selectTravelAgencyList() {
|
||||
const resp = await $.post('/platform/theRapyRecuperation/travelAgency/selectTravelAgency', {year: this.formData.year})
|
||||
this.travelAgencyList = resp.data
|
||||
},
|
||||
yearChange() {
|
||||
this.formData.travelAgencyId = null
|
||||
this.selectTravelAgencyList()
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
async initPageData() {
|
||||
this.regionalNatureList = await getEnumOptions('TheRapyRecuperationProvinceType')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.unionOptions = await getUnions(null)
|
||||
await this.getLotList()
|
||||
await this.getTravelAgencyOptions()
|
||||
await this.selectTravelAgencyList()
|
||||
await this.getConfig()
|
||||
},
|
||||
//查看各个分工会设置的时间信息
|
||||
async viewUnionSelectTimeInfo(id) {
|
||||
const resp = await $.get(loc() + '/viewUnionSelectTimeInfo/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.lineUnionSetTimeDialog = true
|
||||
this.lineUnionSetTimeInfos = resp.data
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getConfig() {
|
||||
const resp = await $.get('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
if (resp.code === 0) {
|
||||
this.config = resp.data
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getTravelAgencyOptions() {
|
||||
const {data} = await $.get(loc() + '/getTravelAgencyOptions')
|
||||
this.travelAgencyOptions = data
|
||||
},
|
||||
async getLotList() {
|
||||
const {data} = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
this.lotList = data.lots
|
||||
},
|
||||
openImport() {
|
||||
this.importData = {
|
||||
fileList: []
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
async doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
});
|
||||
this.importLoading = true
|
||||
const resp = await $.post(loc() + "/travelLineImport",data)
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.importVisible = false
|
||||
}else {
|
||||
this.notifyWarning("导入失败")
|
||||
this.importLoading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initPageData()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,437 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.viewTable .el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.viewTable .el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">关键字:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="旅行社列表">
|
||||
<template #func>
|
||||
<el-button @click="openImport" size="medium" type="primary">导入旅行社</el-button>
|
||||
<el-button @click="openAdd" size="medium" type="primary">新建旅行社</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{travelAgencyStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row:{officialWebsite}}" v-else-if="column.prop==='officialWebsite'">
|
||||
<a :href="officialWebsite" class="text-primary" target="_blank">
|
||||
{{officialWebsite}}
|
||||
</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="editDialogTitle" :visible.sync="editDialogVisible"
|
||||
width="60%">
|
||||
<el-form :model="formData" :rules="rules" label-width="120px" ref="form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="year"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="编号" prop="serialNumber">
|
||||
<el-input maxlength="50" v-model="formData.serialNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社名称" prop="travelAgencyName">
|
||||
<el-input maxlength="50" v-model="formData.travelAgencyName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="旅行社联系人" prop="contact">
|
||||
<el-input maxlength="10" v-model="formData.contact"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="联系电话" prop="contactMobileNumber">
|
||||
<el-input v-model="formData.contactMobileNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input maxlength="50" v-model="formData.email"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="官网" prop="officialWebsite">
|
||||
<el-input maxlength="100" v-model="formData.officialWebsite"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input maxlength="100"
|
||||
type="textarea"
|
||||
v-model="formData.note"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="12" :sm="24" :xs="24">
|
||||
<el-form-item label="是否启用" prop="isDisabled">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="formData.isDisabled">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="移动端缩略图" prop="files">
|
||||
<file-upload :files.sync="formData.files"
|
||||
picture_card
|
||||
:max="1"
|
||||
:type="['jpg', 'jpeg', 'png']"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="editDialogVisible=false">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<template #view>
|
||||
<el-descriptions :column="2" border class="viewTable">
|
||||
<el-descriptions-item label="旅行社编号">{{viewData.serialNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{viewData.travelAgencyName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">{{viewData.contact}}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{viewData.contactMobileNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">{{viewData.email}}</el-descriptions-item>
|
||||
<el-descriptions-item label="官网">
|
||||
<a :href="viewData.officialWebsite" target="_blank">
|
||||
{{viewData.officialWebsite}}
|
||||
<span class="text-primary">立即访问</span>
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="备注">{{viewData.note}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="旅行社导入"
|
||||
:visible.sync="importVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" type=""
|
||||
@click="location.href='/platform/basics/downloadTemplate?filePath=travel/TravelAgencyImport.xlsx&fileName=旅行社导入模板.xls'"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
}"
|
||||
:on-change="(file, fileList) => {
|
||||
importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})
|
||||
}"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload"
|
||||
style="width: 200px">选择文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #F56C6C">
|
||||
只能上传 xls/xlsx 文件
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '旅行社名称', prop: 'travelAgencyName', width: '200'},
|
||||
{label: '旅行社编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '联系人', prop: 'contact'},
|
||||
{label: '联系人手机', prop: 'contactMobileNumber'},
|
||||
{label: '邮箱', prop: 'email'},
|
||||
{label: '官网', prop: 'officialWebsite'},
|
||||
{label: '备注', prop: 'note'},
|
||||
{label: '是否禁用', prop: 'isDisabled'}
|
||||
],
|
||||
editDialogVisible: false,
|
||||
rules: {
|
||||
serialNumber: [{required: true, message: '请输入编号', trigger: ['change', 'blur']}],
|
||||
travelAgencyName: [{required: true, message: '请输入旅行社名称', trigger: ['change', 'blur']}],
|
||||
contact: [{required: true, message: '请输入联系人姓名', trigger: ['change', 'blur']}],
|
||||
contactMobileNumber: [
|
||||
{required: true, message: '请输入联系人电话', trigger: 'blur',},
|
||||
{
|
||||
pattern: /^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/,
|
||||
message: '请输入正确的联系人电话',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
email: [
|
||||
{required: false, message: '请输入邮箱地址', trigger: 'blur'},
|
||||
{type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change']}
|
||||
],
|
||||
officialWebsite: [
|
||||
{required: false, message: '请输入官网地址', trigger: ['change', 'blur']},
|
||||
{type: 'url', message: '请输入正确的官网地址', trigger: ['blur', 'change']}],
|
||||
note: [{required: false, message: '请输入备注', trigger: ['change', 'blur']}],
|
||||
year: [{required: true, message: '请选择年度', trigger: ['change', 'blur']}],
|
||||
//files: [{required: true, message: '请上传移动端缩略图', trigger: ['change', 'blur']}],
|
||||
},
|
||||
viewData: {},
|
||||
formData: {
|
||||
id: null,
|
||||
serialNumber: null,
|
||||
travelAgencyName: null,
|
||||
contact: null,
|
||||
contactMobileNumber: null,
|
||||
email: null,
|
||||
officialWebsite: null,
|
||||
note: null,
|
||||
year: null,
|
||||
isDisabled: false
|
||||
},
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: null
|
||||
},
|
||||
//旅行社导入
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
importData: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
editDialogTitle() {
|
||||
return this.formData.id ? '编辑旅行社' : '新增旅行社'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd() {
|
||||
this.editDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.formData = {
|
||||
id: null,
|
||||
serialNumber: null,
|
||||
travelAgencyName: null,
|
||||
contact: null,
|
||||
contactMobileNumber: null,
|
||||
email: null,
|
||||
officialWebsite: null,
|
||||
note: null,
|
||||
year: null,
|
||||
isDisabled: false
|
||||
}
|
||||
})
|
||||
},
|
||||
async openEdit(row) {
|
||||
const cloneData = clone(row)
|
||||
cloneData.year = cloneData.year.toString()
|
||||
this.formData = {...cloneData}
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
const resp = await $.post(loc() + '/doSubmit', {travelAgency: JSON.stringify(this.formData)})
|
||||
if (resp.code === 0) {
|
||||
this.editDialogVisible = false
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async travelAgencyStatusChange(id) {
|
||||
const resp = await $.post(loc() + '/openClosedTravelAgency/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('可能会导致数据不完整,您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/deleteTravelAgency/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
async openView(row) {
|
||||
this.viewData = row
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async initPageData() {
|
||||
}, /** 旅行社导入 */
|
||||
openImport() {
|
||||
this.importData = {
|
||||
fileList: []
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
async doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
});
|
||||
this.importLoading = true
|
||||
|
||||
const resp = await $.post(loc() + '/travelAgencyImport',data)
|
||||
if (resp.code===0){
|
||||
this.pageData();
|
||||
this.importVisible = false
|
||||
this.importLoading = false
|
||||
}else {
|
||||
this.notifyWarning("导入失败")
|
||||
this.importLoading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initPageData()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,714 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<style>
|
||||
.query-row {
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row .el-col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.el-table-container {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>年  度:</span>
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
v-model="pageForm.startYear"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 38%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
<span>至</span>
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
v-model="pageForm.endYear"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 38%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>查询类型:</span>
|
||||
<el-input placeholder="请输入内容" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 80%" @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="查询类型"
|
||||
style="width: 110px;">
|
||||
<el-option label="姓名" value="userName"></el-option>
|
||||
<el-option label="工号" value="loginName"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="doSearch">搜索</el-button>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>所属工会:</span>
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会"
|
||||
@change="flushUnits"
|
||||
@clear="flushUnits"
|
||||
filterable clearable style="width: 80%">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<span>所属单位:</span>
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" @change="doSearch"
|
||||
filterable clearable style="width: 80%">
|
||||
<el-option
|
||||
v-for="item in unitOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>-->
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span>查询条件:</span>
|
||||
|
||||
<el-tag :effect="pageForm.state===item.value?'dark':'plain'"
|
||||
:key="item.value"
|
||||
:type="item.label"
|
||||
size="medium"
|
||||
@click="checkState(item.value)"
|
||||
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;"
|
||||
v-for="item in options">
|
||||
{{ item.label }} {{item.count?item.count:0}}
|
||||
</el-tag>
|
||||
|
||||
<!--<el-link :underline="false" @click="pageForm.state='';pageData()"
|
||||
type="danger" v-if="options.length&&pageForm.state">清空
|
||||
</el-link>-->
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="pageForm.state === '1'">
|
||||
<span>组织模式:</span>
|
||||
<el-tag :effect="pageForm.signUpMode === item.value ? 'dark' : 'plain'"
|
||||
:key="item.value"
|
||||
:type="item.label"
|
||||
size="medium"
|
||||
@click="checkSignUpModeState(item.value)"
|
||||
style="margin-right: 10px;cursor: pointer;margin-bottom: 5px;"
|
||||
v-for="item in signUpModeOptions">
|
||||
{{ item.label }}
|
||||
</el-tag>
|
||||
<el-link :underline="false" @click="signUpModeClear"
|
||||
type="danger" v-if="signUpModeOptions.length && pageForm.signUpMode">清空
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row align="middle" class="query-row" type="flex">
|
||||
<el-col class="query-row-title"></el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row>
|
||||
<el-col :span="12" v-if="pageForm.state==='2'">
|
||||
<span>旅 行 社:</span>
|
||||
<el-select v-model="pageForm.agencyId" filterable clearable
|
||||
placeholder="请选择旅行社"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in agencyLists"
|
||||
:key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="pageForm.state==='1'">
|
||||
<span>线  路:</span>
|
||||
<el-select v-model="pageForm.takePartInLineId" filterable clearable
|
||||
placeholder="请选择线路"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in takePartInLines"
|
||||
:key="item.id"
|
||||
:label="item.lineName+'('+item.playStartTime1+')'+'('+item.unionname+')'"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="pageForm.state==='3'">
|
||||
<span>酒  店:</span>
|
||||
<el-select @change="pageData()" clearable
|
||||
filterable
|
||||
placeholder="请选择酒店"
|
||||
style="width: 80%" v-model="pageForm.takePartInBaseManagementId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.baseName"
|
||||
:value="item.id"
|
||||
v-for="item in jdList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="pageForm.state==='1'||pageForm.state==='3'">
|
||||
<span>标  段:</span>
|
||||
<el-select v-model="pageForm.lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 80%" @change="doSearch()">
|
||||
<el-option v-for="item in modifyConfig.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
|
||||
<table-tool label="人员列表" :app="this">
|
||||
<template #func>
|
||||
<el-button style="margin-right: 10px" @click="openImport" size="medium" type="primary">参加人员导入
|
||||
</el-button>
|
||||
<el-button icon="el-icon-s-promotion" size="medium" type="primary"
|
||||
@click="userDrawer = true"
|
||||
:disabled="multipleSelection.length==0"
|
||||
class="mr10">设置参加人员
|
||||
</el-button>
|
||||
<el-radio-group @change="doSearch()" size="medium"
|
||||
v-model="pageForm.regionalNature"
|
||||
v-if="pageForm.state=='1'">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="省内">省内</el-radio-button>
|
||||
<el-radio-button label="省外">省外</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%"
|
||||
ref="table"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column
|
||||
:selectable="checkboxT"
|
||||
reserve-selection
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='lineName'">
|
||||
{{row.baseName?row.baseName:row.lineName}}
|
||||
<!-- <el-link type="primary" @click="openLine(row)">{{row.lineName}}
|
||||
</el-link>-->
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='isFamily'">
|
||||
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='isTakePartIn'">
|
||||
{{row.isTakePartIn?'已参加':'未参加'}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='lotName'">
|
||||
<span v-if="row.lotName"> {{row.lotName}}</span>
|
||||
<span v-else>暂无</span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template scope="{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>
|
||||
<template #view>
|
||||
<enroll-info ref="viewEnrollInfo"></enroll-info>
|
||||
</template>
|
||||
<template #public>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
|
||||
<el-drawer
|
||||
size="70%"
|
||||
title="批量设置参加人员"
|
||||
:visible.sync="userDrawer"
|
||||
direction="rtl"
|
||||
:before-close="handleClose">
|
||||
<el-row class="text-primary p20">
|
||||
选择标段/参加时间(设置前请先勾选需要设置的用户)
|
||||
</el-row>
|
||||
<el-row type="flex" :gutter="20" class="pl20 pr20">
|
||||
|
||||
<el-col :span="12">
|
||||
<el-select v-model="lotId" filterable clearable
|
||||
placeholder="请选择标段"
|
||||
style="width: 80%" @change="setLot">
|
||||
<el-option v-for="item in modifyConfig.lots"
|
||||
:key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-date-picker
|
||||
v-model="takePartInTime"
|
||||
type="date"
|
||||
style="width: 80%"
|
||||
@change="setTakePartInTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择参加时间">
|
||||
</el-date-picker>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="mt10">
|
||||
<el-table
|
||||
:data="multipleSelection"
|
||||
style="width: 100%;padding: 20px" class="vi-table"
|
||||
border
|
||||
height="70vh"
|
||||
ref="table2"
|
||||
@selection-change="(val)=>{multipleSelection2 = val}"
|
||||
row-key="id">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="80"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="userName" 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="signingUptime" label="报名时间"></el-table-column>
|
||||
<el-table-column prop="takePartInTime" label="参加时间"></el-table-column>
|
||||
<el-table-column prop="lotName" label="标段"></el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<span style="position: absolute;bottom: 20px;right: 20px">
|
||||
<el-button @click="userDrawer = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAttend">确定</el-button>
|
||||
</span>
|
||||
</el-drawer>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="参加人员导入"
|
||||
:visible.sync="importVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%"
|
||||
>
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" type=""
|
||||
@click="location.href='/platform/basics/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls'"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
}"
|
||||
:on-change="(file, fileList) => {
|
||||
importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})
|
||||
}"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList">
|
||||
<el-button size="medium" type="" icon="el-icon-upload"
|
||||
style="width: 200px">选择文件
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #F56C6C">
|
||||
只能上传 xls/xlsx 文件,时间格式请书写为2008-10-1
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisibleClose" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
jdList: [],
|
||||
modifyConfig: {},
|
||||
|
||||
lotId: "",
|
||||
userDrawer: false,
|
||||
takePartInTime: "",
|
||||
|
||||
options: [
|
||||
{label: "线路", value: "1"},
|
||||
// {label: "旅行社", value: "2"},
|
||||
{label: "酒店", value: "3"},
|
||||
],
|
||||
agencyLists: [],
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
takePartInLines: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},
|
||||
// {prop: 'travelAgencyName', label: '旅行社'},
|
||||
{prop: 'lineName', label: '线路/酒店'},
|
||||
{prop: 'playStartTime', label: '出行时间'},
|
||||
{prop: 'regionalNature', label: '线路类型'},
|
||||
{prop: 'lotName', label: '标段'},
|
||||
{prop: 'isFamily', label: '是否携带家属'},
|
||||
{prop: 'signingUptime', label: '报名时间', checked: 0},
|
||||
{prop: 'isTakePartIn', label: '是否参加'},
|
||||
{prop: 'takePartInTime', label: '参加时间', checked: 0},
|
||||
],
|
||||
pageForm: {
|
||||
startYear: (moment().format('YYYY') - 2) + '',
|
||||
endYear: moment().format('YYYY'),
|
||||
searchName: "userName",
|
||||
unionId: '',
|
||||
agencyId: '',
|
||||
state: '1',
|
||||
regionalNature: '',
|
||||
signUpMode: null
|
||||
},
|
||||
multipleSelection: [],
|
||||
multipleSelection2: [],
|
||||
//人员导入
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
importData: {},
|
||||
signUpModeOptions: [
|
||||
{label: '校工会组织', value: 2},
|
||||
{label: '分工会组织', value: 1},
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'enroll-info': httpVueLoader('/components/theRapyRecuperation/Enrollinfo.vue'),
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
async signUpModeClear() {
|
||||
this.pageForm.signUpMode = ''
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
},
|
||||
setLot(val) {
|
||||
if (this.multipleSelection2 && this.multipleSelection2.length === 0) {
|
||||
this.notifyWarning("设置前请先勾选需要设置的用户")
|
||||
this.lotId = null
|
||||
return;
|
||||
}
|
||||
if (!val) {
|
||||
this.$refs.table2.clearSelection();
|
||||
return
|
||||
}
|
||||
const lot = this.modifyConfig.lots.find(v => v.id === val)
|
||||
this.multipleSelection2.map((v, index) => {
|
||||
this.$set(this.multipleSelection2[index], "lotId", val)
|
||||
this.$set(this.multipleSelection2[index], "lotName", lot.lotName)
|
||||
})
|
||||
},
|
||||
setTakePartInTime(val) {
|
||||
if (this.multipleSelection2 && this.multipleSelection2.length === 0) {
|
||||
this.notifyWarning("设置前请先勾选需要设置的用户")
|
||||
this.takePartInTime = null
|
||||
return;
|
||||
}
|
||||
if (!val) {
|
||||
this.$refs.table2.clearSelection();
|
||||
return
|
||||
}
|
||||
this.multipleSelection2.map((v, index) => {
|
||||
this.$set(this.multipleSelection2[index], "takePartInTime", val)
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
this.multipleSelection = []
|
||||
this.$refs.table.clearSelection();
|
||||
})
|
||||
.catch(_ => {
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
async doAttend() {
|
||||
let arr = []
|
||||
this.multipleSelection.forEach((v, index) => {
|
||||
if (!v.lotId || !v.takePartInTime) {
|
||||
arr.push(index + 1)
|
||||
}
|
||||
})
|
||||
if (arr && arr.length > 0) {
|
||||
this.notifyWarning("请检查【" + arr.toString() + "】条数据后在提交")
|
||||
return
|
||||
}
|
||||
const refs = await $.post("/platform/theRapyRecuperation/query/doAttend", {data: JSON.stringify(this.multipleSelection)})
|
||||
if (refs.code === 0) {
|
||||
this.notifySuccess(refs.msg);
|
||||
await this.doSearch()
|
||||
this.$refs.table2.clearSelection();
|
||||
this.userDrawer = false
|
||||
} else {
|
||||
this.notifyWarning(refs.msg)
|
||||
}
|
||||
|
||||
},
|
||||
checkboxT(v) {
|
||||
if (v.isTakePartIn) {
|
||||
return false
|
||||
}
|
||||
if (this.pageForm.lb === 'ry' || !this.pageForm.lb) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
||||
async getJdList() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/baseManagement/listAllBase", this.pageForm)
|
||||
this.jdList = data
|
||||
},
|
||||
async checkState(type) {
|
||||
this.pageForm.state = type
|
||||
if (type === "1") {
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
} else if (type === "2") {
|
||||
await this.getAgencyList()
|
||||
} else {
|
||||
await this.getJdList()
|
||||
}
|
||||
await this.doSearch()
|
||||
},
|
||||
async checkSignUpModeState(signUpMode) {
|
||||
this.pageForm.signUpMode = signUpMode
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
},
|
||||
async doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
await this.getXlLxsUserCount()
|
||||
},
|
||||
async getLines() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/travelAgency/selectLineByAgencyId", {
|
||||
agencyId: this.pageForm.agencyId
|
||||
})
|
||||
this.takePartInLines = data
|
||||
},
|
||||
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewEnrollInfo.openView(row.id)
|
||||
},
|
||||
openLine(row) {
|
||||
this.$refs.guava.public()
|
||||
if (row.regionalNature === "省内") {
|
||||
this.$refs.viewLineInfo.findOne(row.takePartInLineId, null)
|
||||
} else {
|
||||
this.$refs.viewLineInfo.findOne(row.takePartInLineId, row.usUnionId)
|
||||
|
||||
}
|
||||
},
|
||||
async getXlByUnion() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/TheRapyAudit/getXlByUnion", {
|
||||
unionId: this.pageForm.unionId,
|
||||
year: this.pageForm.year,
|
||||
signUpMode: this.pageForm.signUpMode,
|
||||
})
|
||||
data.forEach(v => {
|
||||
if (!v.unionname) {
|
||||
v.unionname = '校工会'
|
||||
}
|
||||
})
|
||||
return data
|
||||
},
|
||||
async getAgencyList() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/travelAgency/selectTravelAgencyByYears", {
|
||||
startYear: this.pageForm.startYear,
|
||||
endYear: this.pageForm.endYear
|
||||
})
|
||||
this.agencyLists = data
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unitOptions = await getUnits(this.pageForm.unionId)
|
||||
} else {
|
||||
this.unionOptions = this.unionOptions.filter(v => v.id === "${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
this.$set(this.pageForm, "unionId", this.unionOptions[0].id)
|
||||
this.unitOptions = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
||||
}
|
||||
await this.doSearch()
|
||||
},
|
||||
async getXlLxsUserCount() {
|
||||
const {data} = await $.post("/platform/theRapyRecuperation/user/query/getXlLxsUserCount", {
|
||||
unionId: this.pageForm.unionId,
|
||||
startYear: this.pageForm.startYear,
|
||||
endYear: this.pageForm.endYear
|
||||
})
|
||||
this.options.forEach((v, index) => {
|
||||
if (v.value === "1") {
|
||||
this.$set(this.options[index], "count", data.xlCount)
|
||||
} else if (v.value === "2") {
|
||||
this.$set(this.options[index], "count", data.lxsCount)
|
||||
} else {
|
||||
this.$set(this.options[index], "count", data.jdCount)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
async getModifyConfig() {
|
||||
const res = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
if (res.code === 0) {
|
||||
this.modifyConfig = res.data
|
||||
}
|
||||
},
|
||||
openImport() {
|
||||
this.importData = {
|
||||
fileList: []
|
||||
}
|
||||
this.importVisible = true;
|
||||
},
|
||||
doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
});
|
||||
this.importLoading = true
|
||||
$.ajax({
|
||||
url: loc() + "/enrollImport",
|
||||
type: "post",
|
||||
data: data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (data) => {
|
||||
if (data.code === 0){
|
||||
this.pageData();
|
||||
this.importVisible = false
|
||||
}else {
|
||||
this.importLoading = false
|
||||
}
|
||||
},
|
||||
error: (data) => {
|
||||
this.notifyWarning("导入失败")
|
||||
this.importLoading = false
|
||||
}
|
||||
});
|
||||
},
|
||||
importVisibleClose() {
|
||||
this.importVisible = false;
|
||||
this.pageData();
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getModifyConfig()
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.flushUnits()
|
||||
await this.getXlLxsUserCount()
|
||||
this.pageData()
|
||||
this.takePartInLines = await this.getXlByUnion()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,276 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.card-body-center-bottom {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.el-carousel-100 {
|
||||
position: relative;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.el-carousel-100 .el-carousel__container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.carousel-item-card {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.panel .el-radio-group > .el-radio {
|
||||
display: block;
|
||||
margin: 10px 0 !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<el-card class="m10" shadow="never" style="height: calc(100% - 20px)">
|
||||
<template #header>
|
||||
<h3 style="color: #1867b0">导入参加人员</h3>
|
||||
</template>
|
||||
|
||||
<el-steps :active="stepActive">
|
||||
<el-step icon="el-icon-edit" title="选择线路或旅行社"></el-step>
|
||||
<el-step icon="el-icon-upload" title="读取人员名单数据"></el-step>
|
||||
<el-step icon="el-icon-upload" title="导入数据"></el-step>
|
||||
<el-step icon="el-icon-bell" title="导入结果"></el-step>
|
||||
</el-steps>
|
||||
|
||||
<el-carousel :autoplay="false" :loop="false" arrow="never" class="el-carousel-100" indicator-position="none"
|
||||
ref="carousel">
|
||||
<el-carousel-item>
|
||||
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
<el-date-picker
|
||||
@change="yearChange"
|
||||
placeholder="选择年"
|
||||
type="year"
|
||||
v-model="year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
|
||||
|
||||
<el-row :gutter="20" class="mt20" type="flex">
|
||||
<el-col>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
线路
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<el-radio-group @change="travelId=''" size="small" v-model="lineId">
|
||||
<el-radio :label="item.id"
|
||||
border v-for="item in lines">{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
旅行社
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<el-radio-group @change="lineId=''" size="small" v-model="travelId">
|
||||
<el-radio :label="item.id"
|
||||
border v-for="item in travels">{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
<el-carousel-item>
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
<el-button @click="downloadTemplate" size="small" type="primary">下载模板</el-button>
|
||||
|
||||
<el-upload
|
||||
:action="loc()+'/readExcel'"
|
||||
:auto-upload="false"
|
||||
:data="{lineId:lineId,travelAgencyId:travelId}"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
:on-error="(err)=>{this.notifyWarning(err)}"
|
||||
:on-exceed="()=>{this.notifyWarning('最多只能选择一个文件')}"
|
||||
:on-success="fileHandleSuccess"
|
||||
accept="xls,xlsx"
|
||||
drag
|
||||
ref="upload"
|
||||
style="text-align: center"
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</el-upload>
|
||||
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
<el-carousel-item>
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<p> excel表格:{{excelRows.length}}行</p>
|
||||
<p> 合法数据:{{tableData.length}}行</p>
|
||||
</div>
|
||||
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="参加时间" prop="takePartInTime"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
|
||||
<el-carousel-item>
|
||||
<el-card class="carousel-item-card" shadow="never">
|
||||
<el-result icon="success" subTitle="" title="导入成功"></el-result>
|
||||
</el-card>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
|
||||
<div class="card-body-center-bottom">
|
||||
<el-button :disabled="stepActive==0||loading" @click="prev" size="medium">上一步</el-button>
|
||||
<el-button :loading="loading" @click="next" size="medium" type="primary">
|
||||
{{nextBtnTxt}}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
stepActive: 0,
|
||||
elCarouselItemHeight: '600px',
|
||||
|
||||
year: new Date().getFullYear().toString(),
|
||||
|
||||
lines: [],
|
||||
travels: [],
|
||||
|
||||
lineId: '',
|
||||
travelId: '',
|
||||
|
||||
fileList: [],
|
||||
excelRows: [],
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
nextBtnTxt() {
|
||||
return this.stepActive === 3 ? '完成' : '下一步'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
stepActive(v) {
|
||||
this.$refs.carousel.setActiveItem(v)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fileHandleSuccess(resp) {
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.matchList
|
||||
this.excelRows = resp.data.excelRows
|
||||
this.stepActive++
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
this.$refs.upload.clearFiles()
|
||||
}
|
||||
},
|
||||
readExcel() {
|
||||
this.$refs.upload.submit()
|
||||
},
|
||||
prev() {
|
||||
this.stepActive--
|
||||
},
|
||||
async next() {
|
||||
const i = this.stepActive
|
||||
if (i === 0) {
|
||||
if (this.lineId === '' && this.travelId === '') {
|
||||
this.notifyWarning('请先选择线路或者旅行社')
|
||||
return
|
||||
}
|
||||
} else if (i === 1) {
|
||||
const files = this.$refs.upload.uploadFiles
|
||||
if (files.length === 0) {
|
||||
this.notifyWarning('请先选择文件')
|
||||
return
|
||||
}
|
||||
const isReady = files.every(v => v.status === 'ready')
|
||||
if (isReady) {
|
||||
this.$refs.upload.submit()
|
||||
return
|
||||
}
|
||||
} else if (i === 2) {
|
||||
if (this.tableData.length === 0) {
|
||||
this.notifyWarning('没有合法数据,无法导入')
|
||||
return
|
||||
}
|
||||
const resp = await $.post(loc() + '/doImportTakePartInUsers', {enroll: JSON.stringify(this.tableData)})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
return
|
||||
}
|
||||
} else if (i === 3) {
|
||||
this.tableData = []
|
||||
this.excelRows = []
|
||||
this.lineId = ''
|
||||
this.travelId = ''
|
||||
this.stepActive = 0
|
||||
this.$refs.upload.clearFiles()
|
||||
return
|
||||
}
|
||||
this.stepActive++
|
||||
},
|
||||
yearChange() {
|
||||
this.selectLineOrTravelAgency()
|
||||
},
|
||||
async selectLineOrTravelAgency() {
|
||||
const resp = await $.post(loc() + '/selectLineOrTravelAgency', {year: this.year})
|
||||
if (resp.code === 0) {
|
||||
this.lines = resp.data.lines
|
||||
this.travels = resp.data.travels
|
||||
}
|
||||
},
|
||||
downloadTemplate() {
|
||||
window.open(loc() + '/downloadTemplate')
|
||||
}
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
const top = document.getElementsByClassName('el-carousel-100')[0].getBoundingClientRect().top
|
||||
const elCarouselHeight = window.innerHeight - top
|
||||
console.log(elCarouselHeight)
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.selectLineOrTravelAgency()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,372 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.companion_card {
|
||||
border: 1px #1867b0 solid;
|
||||
}
|
||||
|
||||
.row-expand-cover .el-table__expand-icon {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
/*
|
||||
.column-expand:before {
|
||||
content: '123'
|
||||
}*/
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lineId">
|
||||
<el-option :label="item.lineName"
|
||||
:value="item.id"
|
||||
v-for="item in schoolFreeLineList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">关键字:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
:width="column.width"
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='signUpUserAndFamilyNum'">
|
||||
<span class="text-primary">
|
||||
{{row.signUpUserNum + row.signUpUserFamilyNum}}
|
||||
</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='playTime'">
|
||||
<template v-if="row.playStartTime">{{row.playStartTime + '至' + row.playEndTime}}</template>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openViewSignUpUsers(row.id,row.unionId)" size="mini" type="primary">调整
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<vi-title2 title="报名人员">
|
||||
<template #func>
|
||||
<el-button @click="aKeyToAdjust" size="small" type="primary">一键调整
|
||||
</el-button>
|
||||
|
||||
<el-button @click="smsAlerts" size="small" type="primary">短信提醒
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
|
||||
<el-table :row-class-name="getRowClassName" :cell-class-name="getColumnClassName"
|
||||
:data="schoolFreeSignUpUserList" ref="adjustTable">
|
||||
<el-table-column :selectable="(row)=>{return row.isNormal}" type="selection"></el-table-column>
|
||||
<el-table-column label="序号" type="expand" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-card class="companion_card" shadow="never">
|
||||
<h4 slot="header" style="color: #1867b0">
|
||||
家属信息
|
||||
</h4>
|
||||
<el-table :data="row.companionList">
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="关系" prop="relation"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column label="工会" prop="unionName" show-overflow-tooltip sortable></el-table-column>
|
||||
<el-table-column label="报名时间" prop="signingUptime"></el-table-column>
|
||||
<el-table-column label="家属人数" prop="companionCount">
|
||||
<template scope="{row}">
|
||||
<span class="text-primary">
|
||||
{{row.companionCount}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否调整" prop="isNormal">
|
||||
<template scope="{row}">
|
||||
<span class="text-success" v-if="row.isNormal">
|
||||
未调整
|
||||
</span>
|
||||
<span class="text-danger" v-else>
|
||||
已调整
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template scope="{row}">
|
||||
<el-button @click="adjustmentUser(row.loginName,row.isNormal)" size="mini" type="primary"
|
||||
v-if="row.isNormal">调整
|
||||
</el-button>
|
||||
<el-button @click="adjustmentUser(row.loginName,row.isNormal)" size="mini" type="success"
|
||||
v-if="!row.isNormal">恢复
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
schoolFreeLineList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
lineId: null,
|
||||
unionId: null
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true, width: '150px'},
|
||||
{label: '所属分工会', prop: 'selectUnionName'},
|
||||
{label: '出行时间', prop: 'playTime', sortable: true},
|
||||
// {label: '创建工会', prop: 'createUnionName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
// {label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
{label: '创建模式', prop: 'createMode'},
|
||||
// {label: '报名模式', prop: 'signUpMode'},
|
||||
{label: '最少成团人数', prop: 'minimumGroupSize'},
|
||||
{label: '报名人数(含家属)', prop: 'signUpUserAndFamilyNum', width: '150px'},
|
||||
{label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
|
||||
],
|
||||
schoolFreeSignUpUserList: [],
|
||||
currentLineId: null,
|
||||
currentLineSelectUnionId: null,
|
||||
unionOptions: []
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getRowClassName({row, rowIndex}) {
|
||||
if (row.companionCount === 0) {
|
||||
return 'row-expand-cover'
|
||||
}
|
||||
},
|
||||
getColumnClassName({row, column, rowIndex, columnIndex}) {
|
||||
if (columnIndex === 1) {
|
||||
document.styleSheets[0].insertRule('.column-expand' + rowIndex + ':before{content: "' + (rowIndex + 1) + '"; position: absolute; left: 60px}')
|
||||
return 'column-expand' + rowIndex
|
||||
}
|
||||
},
|
||||
async findUnionSignUpModeLineList() {
|
||||
const {year} = this.pageForm
|
||||
const resp = await $.post(loc() + '/findUnionSignUpModeLineList', year)
|
||||
if (resp.code === 0) {
|
||||
this.schoolFreeLineList = resp.data
|
||||
}
|
||||
},
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
async pageData() {
|
||||
sublime.showLoadingbar()
|
||||
this.tableLoading = true
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
sublime.closeLoadingbar()
|
||||
this.tableLoading = false
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async openViewSignUpUsers(lineId, unionId) {
|
||||
this.currentLineId = lineId
|
||||
this.currentLineSelectUnionId = unionId
|
||||
const resp = await $.post(loc() + '/findUnionSignUpModeUserList', {lineId, unionId})
|
||||
if (resp.code === 0) {
|
||||
if (this.$refs.guava.v !== 'edit') {
|
||||
this.$refs.guava.edit()
|
||||
}
|
||||
this.schoolFreeSignUpUserList = resp.data
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
//调整人员
|
||||
async adjustmentUser(loginName, isNormal) {
|
||||
const msg = isNormal ? '确定要调整吗?' : '确定要恢复吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const lineId = this.currentLineId
|
||||
const resp = await $.post(loc() + '/adjustmentUser', {lineId, loginNames: JSON.stringify([loginName])})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
await this.openViewSignUpUsers(this.currentLineId, this.currentLineSelectUnionId)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async aKeyToAdjust() {
|
||||
if (this.$refs.adjustTable.selection.length === 0) {
|
||||
this.notifyWarning('请选择需要调整的人员')
|
||||
return
|
||||
}
|
||||
|
||||
const confirm = await this.$confirm('您确定要一键调整吗', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const lineId = this.currentLineId
|
||||
|
||||
const selection = this.$refs.adjustTable.selection
|
||||
const loginNames = selection.map(v => v.loginName)
|
||||
|
||||
const resp = await $.post(loc() + '/adjustmentUser', {lineId, loginNames: JSON.stringify(loginNames)})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
await this.openViewSignUpUsers(this.currentLineId, this.currentLineSelectUnionId)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
smsAlerts() {
|
||||
|
||||
},
|
||||
async lineStatusChange(id) {
|
||||
const resp = await $.post('/platform/theRapyRecuperation/line/openClosedLine/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
this.unionOptions = await getUnions(null)
|
||||
await this.findUnionSignUpModeLineList()
|
||||
await this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,516 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.item {
|
||||
padding: 6px 12px;
|
||||
margin: 0px 10px 0px 10px;
|
||||
border: solid 1px #eee;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.item:hover {
|
||||
background-color: #fdfdfd;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.item + .item {
|
||||
border-top: none;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.clusterMembersSubmitBtn {
|
||||
/* position: absolute;
|
||||
bottom: 0px;
|
||||
right: 0px;*/
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.cluster-card {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.cluster-card .el-card__header {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cluster-card .el-card__body {
|
||||
height: 660px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable filterable style="width: 100%"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-if="column.prop==='times'">
|
||||
{{row.playStartTime.substr(0,10)}}至{{row.playEndTime.substr(0,10)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openViewClusterInfo(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openCluster(row.id,row.ascriptionUnionId)" size="mini" type="primary">组团
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
<template #edit_func>
|
||||
<el-button @click="addCluster" type="primary">添加团</el-button>
|
||||
</template>
|
||||
<template #edit>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" v-for="item,itemKey in clusterData">
|
||||
<el-card class="cluster-card" shadow="never">
|
||||
<div class="text-primary" slot="header">
|
||||
<template v-if="!item.editClusterName">
|
||||
{{getClusterName(item)}}
|
||||
<i @click="item.editClusterName=true"
|
||||
class="el-icon-edit"
|
||||
v-if="itemKey!=='unSelectedUsers'"></i>
|
||||
</template>
|
||||
|
||||
<el-input @blur="item.editClusterName=false"
|
||||
autofocus
|
||||
maxlength="10"
|
||||
size="mini"
|
||||
v-if="item.editClusterName"
|
||||
v-model="item.clusterName"></el-input>
|
||||
|
||||
<i @click="removeCluster(itemKey)"
|
||||
class="el-icon-close"
|
||||
style="position: absolute;right: 5px;top: 5px;cursor: pointer"
|
||||
v-if="itemKey!=='unSelectedUsers'"></i>
|
||||
|
||||
<el-button @click="openBatchMove"
|
||||
size="mini"
|
||||
style="position:absolute;right: 10px"
|
||||
type="primary"
|
||||
v-if="itemKey==='unSelectedUsers'">批量调整
|
||||
</el-button>
|
||||
</div>
|
||||
<draggable @end="drag=false" @start="drag=true" group="cluster" style="height: 100%"
|
||||
v-model="item.members">
|
||||
<transition-group :style="tgGroup">
|
||||
<div :key="ele.loginName" class="item" v-for="ele in item.members">
|
||||
<el-popover :content="ele.userName+'-'+ele.loginName+'-'+ele.sex+'-'+ele.unionName"
|
||||
placement="right-end"
|
||||
trigger="hover">
|
||||
<el-row :gutter="4" slot="reference" style="white-space: nowrap" type="flex">
|
||||
<el-col :span="3">
|
||||
<el-tag :type="ele.isLeader?null:'info'" effect="dark" size="mini">
|
||||
{{ele.isLeader ? '团长' : '成员' }}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="16" style="overflow: hidden">
|
||||
{{ele.userName+'-'+ele.loginName+'-'+ele.sex+'-'+ele.unionName}}
|
||||
</el-col>
|
||||
|
||||
<el-col :span="3" style="overflow: hidden">
|
||||
{{'(' + ele.companionCount + ')'}}
|
||||
</el-col>
|
||||
|
||||
<el-col :span="2" class="text-center">
|
||||
<el-dropdown
|
||||
@command="(isLeader)=>{setMemberRole(itemKey,ele.loginName,isLeader)}"
|
||||
v-if="itemKey!=='unSelectedUsers'">
|
||||
<i class="el-icon-user-solid"></i>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="true">设为团长</el-dropdown-item>
|
||||
<el-dropdown-item command="false">设为成员</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-popover>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="clusterMembersSubmitBtn" justify="end" type="flex">
|
||||
<!-- <el-button @click="addCluster">添加团</el-button>-->
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="setClusterMembers" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<div>
|
||||
<vi-title title="团列表"></vi-title>
|
||||
<el-card shadow="never">
|
||||
<el-tag :effect="item.id === selectClusterTagId ? 'dark':'light'"
|
||||
:key="item.id"
|
||||
@click="selectClusterTagId = item.id"
|
||||
class="mr10"
|
||||
style="cursor: pointer"
|
||||
v-for="item in clusterViewList"
|
||||
v-if="clusterViewList && clusterViewList.length>0">
|
||||
{{ item.clusterName }}
|
||||
</el-tag>
|
||||
</el-card>
|
||||
<vi-title class="mt10" title="人员列表"></vi-title>
|
||||
<el-card shadow="never">
|
||||
<el-table :data="clusterTableData">
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="身份" prop="isLeader">
|
||||
<template scope="{row}">
|
||||
<span class="text-primary" v-if="row.isLeader">团长</span>
|
||||
<span v-else>成员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="batchMoveDialogVisible" title="批量调整" width="60%">
|
||||
<div class="mb10">
|
||||
<vi-title2 title="原分组"></vi-title2>
|
||||
<el-radio-group size="small" v-model="batchMoveData.originalGroup">
|
||||
<el-radio :label="item"
|
||||
border
|
||||
v-for="(item,key) in clusterData">{{item.clusterName}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
<el-table :data="batchMoveData.originalGroup.members"
|
||||
class="mt10 mb10"
|
||||
max-height="250px"
|
||||
ref="originalGroupMembersTable"
|
||||
v-show="batchMoveData.originalGroup && batchMoveData.originalGroup.members">
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="工会" prop="unionName"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div v-if="batchMoveData.originalGroup.members.length>0">
|
||||
<vi-title2 title="筛选条件"></vi-title2>
|
||||
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="分工会">
|
||||
<el-select multiple size="small" style="width: 100%" v-model="batchMoveData.cnd.unionNames">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.unionname"
|
||||
v-for="item in unionOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="mb10" v-if="batchMoveData.originalGroup.members.length>0">
|
||||
<vi-title2 title="移动后分组"></vi-title2>
|
||||
<el-radio-group size="small" v-model="batchMoveData.currentGroup">
|
||||
<el-radio :disabled="item.clusterName == batchMoveData.originalGroup.clusterName"
|
||||
:label="item"
|
||||
border
|
||||
v-for="(item,key) in clusterData">{{item.clusterName}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="batchMoveDialogVisible=false">取消</el-button>
|
||||
<el-button @click="doBatchMove" type="primary">确定</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/platform/plugins/vuedrag/Sortable.js"></script>
|
||||
<script src="/assets/platform/plugins/vuedrag/vuedraggable.js"></script>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路编号', prop: 'serialNumber', sortable: true},
|
||||
{label: '旅行社名称', prop: 'travelAgencyName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
{label: '出行时间', prop: 'times', sortable: true},
|
||||
{label: '最少成团人数', prop: 'minimumGroupSize', sortable: true},
|
||||
// {label: '创建工会', prop: 'createUnionName'},
|
||||
// {label: '创建人', prop: 'createUserName', sortable: true},
|
||||
// {label: '创建模式', prop: 'createMode'},
|
||||
{label: '线路归属', prop: 'ascriptionUnionName', sortable: true},
|
||||
// {label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
],
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: new Date().getFullYear().toString(),
|
||||
selectStatus: 0
|
||||
},
|
||||
drag: false,
|
||||
clusterData: {},
|
||||
tgGroup: 'min-height:100%;display: block',
|
||||
lineId: null,
|
||||
clusterViewList: [],
|
||||
selectClusterTagId: null,
|
||||
batchMoveDialogVisible: false,
|
||||
batchMoveData: {
|
||||
originalGroup: {
|
||||
members: []
|
||||
},
|
||||
currentGroup: null,
|
||||
cnd: {}
|
||||
},
|
||||
unionOptions: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
clusterTableData() {
|
||||
if (this.selectClusterTagId) {
|
||||
return this.clusterViewList.find(v => v.id === this.selectClusterTagId).members
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'batchMoveData.cnd': {
|
||||
handler(v) {
|
||||
const unionNames = v['unionNames']
|
||||
console.log(unionNames)
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getClusterName(item) {
|
||||
let count = 0
|
||||
item.members.forEach(item => {
|
||||
count += item.companionCount
|
||||
})
|
||||
return item.clusterName + '(' + (item.members.length + count) + ')'
|
||||
},
|
||||
async openViewClusterInfo(id) {
|
||||
this.$refs.guava.view()
|
||||
const resp = await $.post(loc() + '/selectClusterInfo/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.clusterViewList = resp.data
|
||||
if (this.clusterViewList && this.clusterViewList.length > 0) {
|
||||
this.selectClusterTagId = this.clusterViewList[0].id
|
||||
} else {
|
||||
this.selectClusterTagId = null
|
||||
}
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async openCluster(id, ascriptionUnionId) {
|
||||
this.lineId = id
|
||||
this.$refs.guava.edit()
|
||||
const resp = await $.post(loc() + '/findClusterInfo/', {
|
||||
lineId: id,
|
||||
usUnionId: ascriptionUnionId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.clusterData = resp.data
|
||||
}
|
||||
},
|
||||
addCluster() {
|
||||
const l = Object.keys(this.clusterData).length
|
||||
const key = "cluster" + l
|
||||
this.$set(this.clusterData, key, {
|
||||
members: [],
|
||||
clusterName: '团' + l,
|
||||
editClusterName: false,
|
||||
lineId: this.lineId
|
||||
})
|
||||
},
|
||||
removeCluster(key) {
|
||||
const h = this.clusterData[key]
|
||||
const m = h.members
|
||||
this.clusterData['unSelectedUsers'].members.push(...m)
|
||||
delete this.clusterData[key]
|
||||
},
|
||||
|
||||
async setClusterMembers() {
|
||||
const emptyCluster = Object.values(vue.clusterData).filter(v => v.clusterName !== '线路未分配人员').find(v => v.members.length === 0)
|
||||
if (emptyCluster) {
|
||||
this.notifyWarning(emptyCluster.clusterName + '未分配成员,请分配后再提交!')
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await $.post(loc() + '/setClusterMembers', {
|
||||
clusters: JSON.stringify(this.clusterData),
|
||||
lineId: this.lineId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs.guava.index()
|
||||
this.lineId = null
|
||||
this.clusterData = {}
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
setMemberRole(key, loginName, isLeader) {
|
||||
const i = this.clusterData[key].members.findIndex(v => v.loginName === loginName)
|
||||
this.$set(this.clusterData[key].members[i], 'isLeader', isLeader)
|
||||
},
|
||||
openBatchMove() {
|
||||
this.batchMoveDialogVisible = true
|
||||
this.batchMoveData = {
|
||||
originalGroup: {
|
||||
members: []
|
||||
},
|
||||
currentGroup: null,
|
||||
cnd: {}
|
||||
}
|
||||
},
|
||||
doBatchMove() {
|
||||
const unionNames = this.batchMoveData.cnd.unionNames
|
||||
|
||||
|
||||
//需要移动的数据(工会筛选)
|
||||
let filterData = []
|
||||
const unionSelectData = this.batchMoveData.originalGroup.members.filter(v => unionNames.includes(v['unionName']))
|
||||
const selectionData = this.$refs.originalGroupMembersTable.selection
|
||||
filterData = filterData.concat(unionSelectData).concat(selectionData)
|
||||
|
||||
const filterLoginNames = filterData.map(v => v.loginName)
|
||||
|
||||
//原分组移动之后剩下的数据
|
||||
const deleteData = this.batchMoveData.originalGroup.members.filter(v => !filterLoginNames.includes(v.loginName))
|
||||
|
||||
//现分组Name
|
||||
const cName = this.batchMoveData.currentGroup.clusterName
|
||||
|
||||
//原分组Name
|
||||
const oName = this.batchMoveData.originalGroup.clusterName
|
||||
|
||||
|
||||
for (let k in this.clusterData) {
|
||||
if (this.clusterData[k]['clusterName'] === cName) {
|
||||
this.clusterData[k].members = this.clusterData[k].members.concat(filterData)
|
||||
}
|
||||
if (this.clusterData[k]['clusterName'] === oName) {
|
||||
this.clusterData[k].members = deleteData
|
||||
}
|
||||
}
|
||||
|
||||
this.batchMoveDialogVisible = false
|
||||
},
|
||||
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,698 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.timesTable .el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.playPeriod {
|
||||
/*display: flex;*/
|
||||
/*flex-wrap: wrap;*/
|
||||
}
|
||||
|
||||
.playPeriod .el-form-item {
|
||||
/*flex: 0 0 20%;*/
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">旅行社:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.travelAgencyId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.travelAgencyName"
|
||||
:value="item.id"
|
||||
v-for="item in travelAgencyOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">线路名称:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable clearable
|
||||
placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.keywords">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%" v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">时间标段:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" clearable filterable
|
||||
style="width: 100%"
|
||||
v-model="pageForm.lotId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.lotName"
|
||||
:value="item.id"
|
||||
v-for="item in lotList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" size="medium" v-model="pageForm.selectStatus">
|
||||
<el-radio-button :label="0">全部</el-radio-button>
|
||||
<el-radio-button :label="1">已选择</el-radio-button>
|
||||
<el-radio-button :label="-1">可选择</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:show-overflow-tooltip="column.prop!=='playTime'"
|
||||
:key="column.prop"
|
||||
v-for="column in tableColumns"
|
||||
:width="column.width"
|
||||
>
|
||||
<!--<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{lineStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>-->
|
||||
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
|
||||
{{signUpModeName(signUpMode)}}
|
||||
</template>
|
||||
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
|
||||
{{createModeName(createMode)}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='playTime'">
|
||||
<template v-if="row.playTimes">
|
||||
<!--<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
<div v-for="t in row.playTimes.split(',')" :key="t">
|
||||
{{t}}
|
||||
</div>
|
||||
</div>
|
||||
{{row.playTimes}}
|
||||
</el-tooltip>-->
|
||||
<el-tooltip placement="top">
|
||||
<div slot="content">
|
||||
<div v-for="(t,ti) in row.playTimes.split(',')" :key="t" :class="[ti==row.playTimes.split(',').length-1?'':'mb10']">
|
||||
{{t}}
|
||||
</div>
|
||||
</div>
|
||||
<div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis">{{row.playTimes}}</div>
|
||||
</el-tooltip>
|
||||
<!-- <div v-for="t in row.playTimes.split(',')" :key="t">
|
||||
{{t}}
|
||||
</div>-->
|
||||
</template>
|
||||
<el-button v-else @click="openSetLineTime(row)" type="text">
|
||||
选择并设置出行时间段
|
||||
</el-button>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='createUnionName'">
|
||||
<span v-if="!row.isSelect">
|
||||
{{row.createUnionName}}
|
||||
</span>
|
||||
<span v-else>{{row.belongUnionName}}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{action:openViewLineInfo,value:row}">
|
||||
查看线路基本信息
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openViewTimeSlot,value:row}" v-if="row.isSelect">
|
||||
查看出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openSetLineTime,value:row}" v-if="!row.isSelect">
|
||||
选择设置出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:openSetLineTime,value:row}" v-if="row.isSelect">
|
||||
修改出行时间段
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{action:deSelect,value:row}" v-if="row.isSelect">
|
||||
取消选择
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<!--<el-button @click="openView(row)" size="mini" type="primary">线路信息</el-button>
|
||||
<el-button @click="openSetLineTime(row)" size="mini" type="primary" v-if="!row.isSelect">
|
||||
选择
|
||||
</el-button>
|
||||
<el-button @click="openSetLineTime(row)" size="mini" type="primary" v-if="row.isSelect">修改出行时间段
|
||||
</el-button>
|
||||
<el-button @click="deSelect(row)" size="mini" type="danger"
|
||||
v-if="row.isSelect">取消选择
|
||||
</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<line-info ref="viewLineInfo"></line-info>
|
||||
</template>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="setLineTimeDialog" title="设置出行时间段信息"
|
||||
width="80%">
|
||||
<el-form :model="formData" :rules="rules" label-width="0" ref="form" size="small">
|
||||
<h4>{{formData.lineName}}</h4>
|
||||
|
||||
<div v-for="(row,$index) in formData.times" :key="row.id" class="panel panel-default mt20"
|
||||
style="border: none">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
时间段{{$index+1}}
|
||||
</h3>
|
||||
<el-button icon="el-icon-circle-close" circle size="mini" type="danger"
|
||||
@click="formData.times.splice($index,1)"></el-button>
|
||||
</div>
|
||||
<el-row class="playPeriod">
|
||||
|
||||
<el-descriptions border :column="3" class="playPeriodTable">
|
||||
<el-descriptions-item label="报名开始时间">
|
||||
<el-form-item :prop="'times.' + $index + '.signUpStartTime'"
|
||||
:rules="{required:true,message:'报名开始时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.signUpStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">
|
||||
<el-form-item :prop="'times.' + $index + '.signUpEndTime'"
|
||||
:rules="{required:true,message:'报名结束时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.signUpEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="变更截至时间">
|
||||
<el-form-item :prop="'times.' + $index + '.changeEndTime'"
|
||||
:rules="{required:true,message:'变更截至时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.changeEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出行开始时间">
|
||||
<el-form-item :prop="'times.' + $index + '.playStartTime'"
|
||||
:rules="{required:true,message:'出行开始时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.playStartTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出行结束时间">
|
||||
<el-form-item :prop="'times.' + $index + '.playEndTime'"
|
||||
:rules="{required:true,message:'出行结束时间',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-date-picker style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="row.playEndTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<el-form-item :prop="'times.' + $index + '.contact'"
|
||||
:rules="{required:true,message:'联系人',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="10" v-model="row.contact"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-form-item :prop="'times.' + $index + '.contactPhone'"
|
||||
:rules="[
|
||||
{ required: true, message: '手机号码不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[34578]\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="11" v-model="row.contactPhone"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="最少成团人数">
|
||||
<el-form-item :prop="'times.' + $index + '.minimumGroupSize'"
|
||||
:rules="[
|
||||
{ required: true, message: '最少成团人数不能为空', trigger: 'blur' },
|
||||
{ pattern: /^[0-9]*$/, message: '最少成团人数格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.minimumGroupSize"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="交通工具">
|
||||
<el-form-item :prop="'times.' + $index + '.trafficTools'"
|
||||
:rules="{required:false,message:'交通工具',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.trafficTools"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="预计费用(元/人次)">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedCost'"
|
||||
:rules="{required:true,message:'预计费用',trigger:['change','blur']}"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.estimatedCost"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="预计人数(含家属)">
|
||||
<el-form-item :prop="'times.' + $index + '.estimatedFamilyNumbers'"
|
||||
:rules="[
|
||||
{ required: false, message: '预计人数(含家属)不能为空', trigger: 'blur' },
|
||||
{ pattern: /^[0-9]*$/, message: '预计人数(含家属)格式不正确', trigger: 'blur' }
|
||||
]"
|
||||
label-width="0">
|
||||
<el-input clearable v-model="row.estimatedFamilyNumbers"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-form-item :prop="'times.' + $index + '.enable'"
|
||||
label-width="0">
|
||||
<el-switch
|
||||
v-model="row.enable"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<el-button
|
||||
@click="formData.times.push({enable:true,minimumGroupSize:lineConfig.groupNumber,estimatedCost:lineConfig.cost})"
|
||||
size="mini" type="primary">新增出行时间
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
<el-alert closable show-icon style="margin:10px 0"
|
||||
title="温馨提醒:变更时间应该大于报名截至时间,小于出行时间。"
|
||||
type="warning"></el-alert>
|
||||
</el-form>
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="setLineTimeDialog=false">取消</el-button>
|
||||
<el-button @click="doSelect" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="timeLotsDialogVisible" title="查看出行时间段信息"
|
||||
width="80%">
|
||||
<div v-for="(row,$index) in timeLots" :key="row.id" class="panel panel-default mt20" style="border: none">
|
||||
<div class="panel-heading"
|
||||
style="background: #fafafa;border:1px solid #ebeef5;border-bottom: none;display: flex;align-items: center;justify-content: space-between">
|
||||
<h3 class="panel-title">
|
||||
时间段{{$index+1}}
|
||||
</h3>
|
||||
</div>
|
||||
<el-row class="playPeriod">
|
||||
|
||||
<el-descriptions border :column="3" class="playPeriodTable">
|
||||
<el-descriptions-item label="报名开始时间">
|
||||
{{row.signUpStartTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名结束时间">
|
||||
{{row.signUpEndTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="变更截至时间">
|
||||
{{row.changeEndTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出行开始时间">
|
||||
{{row.playStartTime}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="出行结束时间">
|
||||
{{row.playEndTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
{{row.contact}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="联系方式">
|
||||
{{row.contactPhone}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="最少成团人数">
|
||||
{{row.minimumGroupSize}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="交通工具">
|
||||
{{row.trafficTools}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="预计费用(元/人次)">
|
||||
{{row.estimatedCost}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="预计人数(含家属)">
|
||||
{{row.estimatedFamilyNumbers}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="是否开启">
|
||||
<el-switch
|
||||
disabled
|
||||
v-model="row.enable"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="组织形式">
|
||||
{{signUpModeName(row.signUpMode)}}
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let lineContentEditor = null
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'line-info': httpVueLoader('/components/theRapyRecuperation/LineInfo.vue')
|
||||
},
|
||||
data() {
|
||||
const validateSignUpEndTime = (rule, value, callback) => {
|
||||
console.log(value)
|
||||
if (!value) {
|
||||
callback(new Error('请选择报名截至时间'))
|
||||
}
|
||||
if (this.formData.signUpStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpStartTime)) {
|
||||
callback(new Error('报名截至时间必须大于报名开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
const validateChangeEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择变更截至时间'))
|
||||
}
|
||||
if (this.formData.signUpEndTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.signUpEndTime)) {
|
||||
callback(new Error('变更截至时间必须大于报名截至时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
const validatePlayEndTime = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请选择出行结束时间'))
|
||||
}
|
||||
if (this.formData.playStartTime) {
|
||||
if (Date.parse(value) <= Date.parse(this.formData.playStartTime)) {
|
||||
callback(new Error('出行结束时间必须大于出行开始时间'))
|
||||
}
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: '年度', prop: 'year', sortable: true},
|
||||
{label: '线路名称', prop: 'lineName', sortable: true},
|
||||
{label: '线路类型', prop: 'regionalNature', sortable: true},
|
||||
{label: '时间标段', prop: 'lotName', sortable: true, sortProp: 'lotValue'},
|
||||
{label: '出行时间', prop: 'playTime', sortable: true, sortProp: 'playStartTime', width: 230},
|
||||
{label: '承担旅行社', prop: 'travelAgencyName', sortable: true},
|
||||
// {label: '所属分工会', prop: 'belongUnionName', sortable: true},
|
||||
{label: '组织形式', prop: 'signUpMode', sortable: true},
|
||||
// {label: '编号', prop: 'serialNumber', sortable: true},
|
||||
// {label: '创建模式', prop: 'createMode', sortable: true},
|
||||
//{label: '创建人', prop: 'createUserName', sortable: true},
|
||||
{label: '创建工会', prop: 'createUnionName', sortable: true},
|
||||
// {label: '是否启用', prop: 'isDisabled', sortable: true}
|
||||
],
|
||||
rules: {
|
||||
signUpStartTime: [{
|
||||
required: true,
|
||||
message: '请选择报名开始时间',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
signUpEndTime: [{required: true, validator: validateSignUpEndTime, trigger: ['change', 'blur']}],
|
||||
changeEndTime: [{required: true, validator: validateChangeEndTime, trigger: ['change', 'blur']}],
|
||||
playStartTime: [{required: true, message: '请选择出行开始时间', trigger: ['change', 'blur']}],
|
||||
playEndTime: [{required: true, validator: validatePlayEndTime, trigger: ['change', 'blur']}],
|
||||
},
|
||||
viewData: {},
|
||||
formData: {
|
||||
signUpStartTime: null,
|
||||
signUpEndTime: null,
|
||||
changeEndTime: null,
|
||||
playStartTime: null,
|
||||
playEndTime: null,
|
||||
id: null,
|
||||
lineId: null,
|
||||
times: []
|
||||
},
|
||||
pageForm: {
|
||||
keywords: null,
|
||||
year: new Date().getFullYear().toString(),
|
||||
selectStatus: -1,
|
||||
unionId: null
|
||||
},
|
||||
createModeList: [],
|
||||
signUpModeList: [],
|
||||
setLineTimeDialog: false,
|
||||
unionOptions: [],
|
||||
travelAgencyOptions: [],
|
||||
lotList: [],
|
||||
timeLots: [],
|
||||
timeLotsDialogVisible: false,
|
||||
lineConfig: {
|
||||
groupNumber: null,
|
||||
cost: null
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
async openViewLineInfo({id, usUnionId}) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewLineInfo.openView(id, usUnionId)
|
||||
},
|
||||
async openViewTimeSlot({id, lineName, usUnionId}) {
|
||||
const resp = await $.post(loc() + '/selectLineInfo', {
|
||||
lineId: id,
|
||||
unionId: usUnionId,
|
||||
mode: GetQueryString('mode')
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.timeLots = resp.data
|
||||
this.timeLotsDialogVisible = true
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
|
||||
async openSetLineTime({id, lineName, usUnionId, signUpMode}) {
|
||||
await this.getLineConfig(id)
|
||||
|
||||
const resp = await $.post(loc() + '/selectLineInfo', {
|
||||
lineId: id,
|
||||
unionId: usUnionId,
|
||||
mode: GetQueryString('mode')
|
||||
})
|
||||
if (resp.code === 0 && resp.data) {
|
||||
this.$set(this.formData, 'times', resp.data)
|
||||
this.formData.lineId = id
|
||||
this.formData.signUpMode = signUpMode
|
||||
this.$set(this.formData, 'lineName', lineName)
|
||||
this.setLineTimeDialog = true
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSelect() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
const confirm = await this.$confirm('请再次确认,是否选择此线路为疗休养线路?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const fmtData = this.formData.times.map(v => {
|
||||
return {
|
||||
...v,
|
||||
lineId: this.formData.lineId,
|
||||
signUpMode: this.formData.signUpMode,
|
||||
mode: GetQueryString('mode')
|
||||
}
|
||||
})
|
||||
|
||||
const resp = await $.post(loc() + '/selectLineTimes', {lineUnionSelects: JSON.stringify(fmtData)})
|
||||
if (resp.code === 0) {
|
||||
this.setLineTimeDialog = false
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
createModeName(val) {
|
||||
const d = this.createModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
signUpModeName(val) {
|
||||
const d = this.signUpModeList.find(v => v.value === val)
|
||||
return d ? d.label : null
|
||||
},
|
||||
async deSelect({applyCount, id: lineId, usUnionId: unionId}) {
|
||||
const msg = applyCount > 0 ? '已经有教工选择本线路,请确认是否取消选择本线路,一旦取消将清空报名人员!!!' : '您确定要取消吗?'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const resp = await $.post(loc() + '/deSelect', {lineId, unionId})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getTravelAgencyOptions() {
|
||||
const {data} = await $.get(loc() + '/getTravelAgencyOptions')
|
||||
this.travelAgencyOptions = data
|
||||
},
|
||||
async getLotList() {
|
||||
const {data} = await $.post('/platform/theRapyRecuperation/TheRapyConfig/findOne')
|
||||
this.lotList = data.lots
|
||||
},
|
||||
async getLineConfig(lineId) {
|
||||
const {data} = await $.post(loc() + '/getLineConfig/' + lineId)
|
||||
this.lineConfig = data
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this.pageForm, 'mode', GetQueryString('mode'))
|
||||
this.pageData()
|
||||
this.createModeList = await getEnumOptions('TheRapyRecuperationLineCreateMode')
|
||||
this.signUpModeList = await getEnumOptions('TheRapyRecuperationSignUpMode')
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.travelAgencyOptions = this.getTravelAgencyOptions()
|
||||
this.lotList = this.getLotList()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,231 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
.center-col {
|
||||
background-color: white;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
width: calc((100% - (20px * 2)) / 2);
|
||||
}
|
||||
|
||||
.col-title {
|
||||
color: rgba(0, 0, 0, .45);
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.col-button {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="选择年"
|
||||
style="width: 100%" @change="doSearch">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="never" class="mr5 mt20">
|
||||
<div class="col-title">
|
||||
线路报名人数
|
||||
<el-radio-group @change="doSearch()" v-model="regionalNature" size="mini"
|
||||
style="float: right">
|
||||
<el-radio-button label="省内">省内({{snNum}})人</el-radio-button>
|
||||
<el-radio-button label="省外">省外({{swNum}})人</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div id="lineBar"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="never" class="ml5 mt20">
|
||||
<div class="col-title">
|
||||
旅行社平均分
|
||||
<el-rate style="float: right"
|
||||
value="5"
|
||||
disabled
|
||||
show-text
|
||||
:texts="aaa"
|
||||
text-color="#ff9900">
|
||||
</el-rate>
|
||||
|
||||
</div>
|
||||
<div id="travelAgencyRating"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card shadow="never" class="ml5 mt20">
|
||||
<div class="col-title">
|
||||
线路平均分
|
||||
<el-rate style="float: right"
|
||||
value="5"
|
||||
disabled
|
||||
show-text
|
||||
:texts="aaa"
|
||||
text-color="#ff9900">
|
||||
</el-rate>
|
||||
</div>
|
||||
<div id="lineRating"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const chart = {
|
||||
lineBar: undefined,
|
||||
travelAgencyRating: undefined,
|
||||
lineRating: undefined
|
||||
}
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
aaa: ['极差', '失望', '一般', '满意', '最高平均分五分'],
|
||||
snNum: 0,
|
||||
swNum: 0,
|
||||
year: moment().format('YYYY'),
|
||||
regionalNature: '省内'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSearch() {
|
||||
await this.getLineBar()
|
||||
await this.getSnSwNum()
|
||||
await this.getTravelAgencyRating()
|
||||
await this.getLineRating()
|
||||
|
||||
},
|
||||
async getLineRating() {
|
||||
let data = []
|
||||
const refs = await $.post(loc() + "/getLineRating", {year: this.year})
|
||||
refs.data.forEach(v => {
|
||||
data.push({lineName: v.lineName, avg: v.avg})
|
||||
})
|
||||
if (chart.lineRating) {
|
||||
chart.lineRating.changeData(data)
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
chart.lineRating = new G2Plot.Bar(document.getElementById("lineRating"), {
|
||||
data,
|
||||
xField: 'avg',
|
||||
yField: 'lineName',
|
||||
meta: {
|
||||
lineName: {
|
||||
alias: '线路',
|
||||
},
|
||||
avg: {
|
||||
alias: '平均分(分)',
|
||||
},
|
||||
},
|
||||
minBarWidth: 20,
|
||||
maxBarWidth: 20,
|
||||
});
|
||||
chart.lineRating.render();
|
||||
}, 300)
|
||||
},
|
||||
async getTravelAgencyRating() {
|
||||
let data = []
|
||||
const refs = await $.post(loc() + "/getTravelAgencyRating", {year: this.year})
|
||||
refs.data.forEach(v => {
|
||||
data.push({travelAgencyName: v.travelAgencyName, avg: v.avg})
|
||||
})
|
||||
if (chart.travelAgencyRating) {
|
||||
chart.travelAgencyRating.changeData(data)
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
chart.travelAgencyRating = new G2Plot.Bar(document.getElementById("travelAgencyRating"), {
|
||||
data,
|
||||
xField: 'avg',
|
||||
yField: 'travelAgencyName',
|
||||
meta: {
|
||||
travelAgencyName: {
|
||||
alias: '旅行社',
|
||||
},
|
||||
avg: {
|
||||
alias: '平均分(分)',
|
||||
},
|
||||
},
|
||||
minBarWidth: 20,
|
||||
maxBarWidth: 20,
|
||||
});
|
||||
chart.travelAgencyRating.render();
|
||||
}, 300)
|
||||
},
|
||||
async getLineBar() {
|
||||
let data = []
|
||||
const refs = await $.post(loc() + "/getLineBar", {regionalNature: this.regionalNature, year: this.year})
|
||||
refs.data.forEach(v => {
|
||||
data.push({lineName: v.lineName, lineNum: (v.enrollNum + v.companionNum)})
|
||||
})
|
||||
if (chart.lineBar) {
|
||||
chart.lineBar.changeData(data)
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
chart.lineBar = new G2Plot.Bar(document.getElementById("lineBar"), {
|
||||
data,
|
||||
xField: 'lineNum',
|
||||
yField: 'lineName',
|
||||
meta: {
|
||||
lineName: {
|
||||
alias: '线路名称',
|
||||
},
|
||||
lineNum: {
|
||||
alias: '报名人数',
|
||||
},
|
||||
},
|
||||
minBarWidth: 20,
|
||||
maxBarWidth: 20,
|
||||
});
|
||||
chart.lineBar.render();
|
||||
}, 300)
|
||||
},
|
||||
async getSnSwNum() {
|
||||
const {data} = await $.post(loc() + "/getSnSwNum", {year: this.year})
|
||||
this.snNum = data.snNum
|
||||
this.swNum = data.snNum
|
||||
}
|
||||
|
||||
},
|
||||
async created() {
|
||||
await this.getLineBar()
|
||||
await this.getSnSwNum()
|
||||
await this.getTravelAgencyRating()
|
||||
await this.getLineRating()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,409 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.item-button {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item-button .el-button {
|
||||
padding: 12px 25px;
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
font-size: 18px; /* 修改标题字体大小 */
|
||||
color: red; /* 修改标题字体颜色 */
|
||||
border-bottom: none; /* 去掉标题底部边框线 */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<h3 style="color: rgb(24, 103, 176);font-family: Microsoft YaHei;">疗休养配置</h3>
|
||||
</div>
|
||||
|
||||
<el-form ref="addForm" :model="formData" :rules="formRules" label-width="170px">
|
||||
<vi-title title="基本配置"></vi-title>
|
||||
<el-form-item label="配置名称" prop="configName">
|
||||
<el-input v-model="formData.configName" placeholder="请输入配置名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="activityGroupId" label="参加人员范围">
|
||||
<el-select v-model="formData.activityGroupId" placeholder="请选择参加人员范围" filterable
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in activityGroupList"
|
||||
:value="item.groupId"
|
||||
:key="item.groupId"
|
||||
:label="item.groupName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省外名额分配" prop="outsideQuota">
|
||||
<el-input v-model.number="formData.outsideQuota"
|
||||
placeholder="请输入省外名额分配"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="省外名额分配比例" prop="outsideQuotaProportion">
|
||||
<el-slider
|
||||
show-input
|
||||
v-model="formData.outsideQuotaProportion">
|
||||
</el-slider>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="省外几年去一次" prop="outsideNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入省外几年去一次"
|
||||
v-model.number="formData.outsideNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="每年旅行频率" prop="travelFrequency">
|
||||
<el-input max="100" disabled
|
||||
placeholder="请输入每年旅行频率"
|
||||
v-model.number="formData.travelFrequency"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="组团人数" prop="groupNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入组团人数"
|
||||
v-model.number="formData.groupNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="不可取消修改天数" prop="modifyDays">
|
||||
<el-input max="100"
|
||||
placeholder="请输入不可取消修改天数"
|
||||
v-model.number="formData.modifyDays"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="可以修改几次" prop="modifyNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入可以修改几次"
|
||||
v-model.number="formData.modifyNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省内线路是否需要审核" prop="isSnLine">
|
||||
<el-radio-group v-model="formData.isSnLine">
|
||||
<el-radio-button :label="true">需要</el-radio-button>
|
||||
<el-radio-button :label="false">不需要</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省外线路是否需要审核" prop="isSwLine">
|
||||
<el-radio-group v-model="formData.isSwLine">
|
||||
<el-radio-button :label="true">需要</el-radio-button>
|
||||
<el-radio-button :label="false">不需要</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="全批次最多报名人数" prop="allLineSignUpNumber">
|
||||
<el-input max="100"
|
||||
placeholder="请输入全批次最多报名人数"
|
||||
v-model.number="formData.allLineSignUpNumber"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="省内起始年份" prop="provinceStartYear">
|
||||
<el-input max="100"
|
||||
placeholder="请输入省内起始年份"
|
||||
v-model.number="formData.provinceStartYear"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<vi-title title="标段管理"></vi-title>
|
||||
<el-form-item label="标段">
|
||||
<el-button type="primary" @click="formData.lots.push({})"
|
||||
style="float: right;">增加一条
|
||||
</el-button>
|
||||
<el-table :data="formData.lots" stripe style="width: 100%">
|
||||
<el-table-column prop="index" label="序号" width="180">
|
||||
<template scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotName" label="标段名称">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.lotName" placeholder="请输入标段名称"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotValue" label="标段值">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.lotValue" placeholder="请输入标段值"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="activityCost" label="标段费用">
|
||||
<template scope="{row}">
|
||||
<el-input v-model="row.activityCost" placeholder="请输入标段费用"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--# if(@shiro.hasRole('sysadmin')){ #-->
|
||||
<el-table-column prop="index" label="操作">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" icon="el-icon-delete"
|
||||
@click="deleteLotsRow(scope)"></el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<!--# } #-->
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
<vi-title title="服务须知"></vi-title>
|
||||
<el-form-item label="疗休养服务须知" prop="notice">
|
||||
<div id="lineContent"></div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="item-button">
|
||||
<el-button type="danger" @click="resetForm">重 置</el-button>
|
||||
<el-button type="primary" @click="operation" :loading="subLoading">提 交
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="该标段被以下线路/目的地绑定,是否强制删除"
|
||||
:visible.sync="centerDialogVisible"
|
||||
width="50%"
|
||||
center>
|
||||
<template>
|
||||
<el-card>
|
||||
<div v-if="LineNameList.line!=null">
|
||||
<el-descriptions class="margin-top" title="线路名称" :column="3">
|
||||
<el-descriptions-item v-for="(o,index) in LineNameList.line">
|
||||
<template slot="label">
|
||||
{{o.index}}
|
||||
</template>
|
||||
{{o}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<br/>
|
||||
</div>
|
||||
<div v-if="LineNameList.base!=null">
|
||||
<el-descriptions class="margin-top" title="目的地名称" :column="3">
|
||||
<el-descriptions-item v-for="o in LineNameList.base">
|
||||
<template slot="label">
|
||||
{{o.index}}
|
||||
</template>
|
||||
{{o}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="closeDialog">取 消</el-button>
|
||||
<el-button type="primary" @click="deleteLotById">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
|
||||
data() {
|
||||
return {
|
||||
activityGroupList: [],
|
||||
subLoading: false,
|
||||
formData: {
|
||||
isSnLine: 0,
|
||||
isSwLine: 0,
|
||||
lots: [],
|
||||
configName: '智慧工会疗休养配置',
|
||||
outsideQuota: null,
|
||||
outsideQuotaProportion: 0,
|
||||
outsideNumber: null,
|
||||
travelFrequency: null,
|
||||
groupNumber: null,
|
||||
modifyDays: null,
|
||||
modifyNumber: null,
|
||||
allLineSignUpNumber: null,
|
||||
notice: null,
|
||||
provinceStartYear: null,
|
||||
},
|
||||
formRules: {
|
||||
configName: [{required: true, message: '请填写配置名称', trigger: ['blur', 'change']}],
|
||||
isSnLine: [{required: true, message: '请选择省内线路是否需要审核', trigger: ['blur', 'change']}],
|
||||
isSwLine: [{required: true, message: '请选择省外线路是否需要审核', trigger: ['blur', 'change']}],
|
||||
outsideQuota: [{
|
||||
required: true,
|
||||
message: '请填写省外名额分配',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
outsideNumber: [{
|
||||
required: true,
|
||||
message: '请填写省外几年去一次',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
travelFrequency: [{
|
||||
required: true,
|
||||
message: '请填写每年旅行频率',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
groupNumber: [{
|
||||
required: true,
|
||||
message: '请填写组团人数',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
modifyDays: [{
|
||||
required: true,
|
||||
message: '请填写不可取消修改天数',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
modifyNumber: [{
|
||||
required: true,
|
||||
message: '请填写可以修改几次',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
outsideQuotaProportion: [{
|
||||
required: true,
|
||||
message: '请填写比例',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
allLineSignUpNumber: [{
|
||||
required: true,
|
||||
message: '请输入全批次最多报名人数',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
notice: [{required: true, message: '请输入详细内容', trigger: ['change', 'blur']}],
|
||||
provinceStartYear: [{required: true, message: '请输入省内起始年份', trigger: ['change', 'blur']}],
|
||||
|
||||
},
|
||||
marks: [],
|
||||
lotDeleteList: [],
|
||||
LineNameList:{},
|
||||
centerDialogVisible:false,
|
||||
tableScopeId:'',
|
||||
tableScopeIndex:'',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async deleteLotsRow(scope) {
|
||||
//this.lotDeleteList.push(scope.row.id);
|
||||
//console.log(this.lotDeleteList)
|
||||
const res = await $.get(loc() + '/getLotsById?lotId=' + scope.row.id)
|
||||
if (res.code===0) {
|
||||
this.LineNameList = res.data
|
||||
}
|
||||
if (!$.isEmptyObject(this.LineNameList)) {
|
||||
this.centerDialogVisible = true;
|
||||
this.tableScopeId=scope.row.id
|
||||
this.tableScopeIndex=scope.$index;
|
||||
}else {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
this.tableScopeId=scope.row.id
|
||||
this.tableScopeIndex=scope.$index;
|
||||
await this.deleteLotById();
|
||||
}
|
||||
//this.formData.lots.splice(scope.$index, 1)
|
||||
},
|
||||
resetForm() {
|
||||
this.formData.lots = []
|
||||
if (this.$refs['addForm']) {
|
||||
this.$refs['addForm'].resetFields()
|
||||
}
|
||||
},
|
||||
async operation() {
|
||||
const valid = await this.$refs["addForm"].validate()
|
||||
if (valid) {
|
||||
this.subLoading = true
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
})
|
||||
const cloneData = clone(this.formData)
|
||||
|
||||
if (this.lotDeleteList && this.lotDeleteList.length > 0) {
|
||||
cloneData.lotDeleteList = JSON.stringify(this.lotDeleteList)
|
||||
}
|
||||
if (this.formData.lots && this.formData.lots.length > 0) {
|
||||
cloneData.lots = JSON.stringify(this.formData.lots)
|
||||
}
|
||||
cloneData.outsideQuotaProportion = cloneData.outsideQuotaProportion / 100
|
||||
const resp = await $.post(loc() + "/operation", cloneData)
|
||||
if (resp.code === 0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
loading.close()
|
||||
this.subLoading = false
|
||||
}else {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async findOne() {
|
||||
await this.getActivityGroup()
|
||||
const {data} = await $.get(loc() + "/findOne")
|
||||
if (data.outsideQuotaProportion) {
|
||||
data.outsideQuotaProportion = data.outsideQuotaProportion * 1000 / 10
|
||||
}
|
||||
if (!data.lots) {
|
||||
data.lots = []
|
||||
}
|
||||
this.formData = data
|
||||
this.initLineContentEditor(data.notice)
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
this.activityGroupList = data
|
||||
},
|
||||
initLineContentEditor(content) {
|
||||
$("#lineContent").html("")
|
||||
lineContentEditor = new wangEditor("#lineContent")
|
||||
lineContentEditor.config.onchange = (html) => {
|
||||
this.formData.notice = html.replace(/<p\><\/p>/g, '')
|
||||
}
|
||||
lineContentEditor.config.uploadImgShowBase64 = true
|
||||
lineContentEditor.create()
|
||||
if (content) {
|
||||
lineContentEditor.txt.html(content)
|
||||
}
|
||||
},
|
||||
async closeDialog() {
|
||||
this.tableScopeIndex = '';
|
||||
this.tableScopeId = '';
|
||||
this.centerDialogVisible = false;
|
||||
this.LineNameList = {};
|
||||
},
|
||||
async deleteLotById() {
|
||||
if (this.tableScopeId == null || this.tableScopeId===''){
|
||||
this.formData.lots.splice(this.tableScopeIndex, 1);
|
||||
this.$notify.success({title: '成功', message: "操作成功"});
|
||||
return;
|
||||
}
|
||||
const resp = await $.get(loc() + '/deleteLotById?lotId=' + this.tableScopeId)
|
||||
if (resp.code===0){
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.tableScopeId='';
|
||||
this.centerDialogVisible = false;
|
||||
this.formData.lots.splice(this.tableScopeIndex, 1)
|
||||
await this.findOne();
|
||||
}else {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.findOne();
|
||||
this.initLineContentEditor();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user