first commit

This commit is contained in:
2026-09-08 19:49:21 +08:00
commit ebffbab428
7320 changed files with 1477614 additions and 0 deletions
@@ -0,0 +1,714 @@
<!--#
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>&emsp;&emsp;度:</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>&nbsp;&nbsp;社:</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>线&emsp;&emsp;路:</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>&emsp;&emsp;店:</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>&emsp;&emsp;段:</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>
<!--#
}
#-->