Files
UNION_NJUST/target/classes/views/platform/clothing/account.html
T
2026-09-23 09:38:39 +08:00

147 lines
6.3 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.table_fixed {
table-layout: fixed !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">年&emsp;&emsp;度:</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 v-model="pageForm.projectId" placeholder="请选择项目名称" filterable clearable
style="width: 100%" @change="doSearch">
<el-option
v-for="item in projectList"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">工&emsp;&emsp;会:</div>
<div class="search-item-option">
<el-select clearable filterable placeholder="请选择部门工会" style="width: 100%"
v-model="pageForm.unionId">
<el-option v-for="item in unionList" :label="item.unionname" :value="item.id"
:key="item.id"></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">
<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 === 'buyCount'">
<el-link @click="openView(row)" type="primary" :underline="false">{{ row.buyCount }}</el-link>
</template>
</el-table-column>
<el-table-column label="操作" width="200px">
<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 #view>
<vi-title title="购买服装人员名单"></vi-title>
<el-table :data="buyClothesUserData">
<el-table-column label="姓名" prop="username" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="工号" prop="loginname" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="性别" prop="sex" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="单位" prop="unitname" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="所属工会" prop="unionname" align="center" header-align="center" show-overflow-tooltip></el-table-column>
<el-table-column label="联系方式" prop="mobile" align="center" header-align="center" show-overflow-tooltip></el-table-column>
</el-table>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
tableColumns: [
{label: '年度', prop: 'year'},
{label: '项目', prop: 'projectName'},
{label: '工会', prop: 'unionname'},
{label: '登记人', prop: 'username'},
{label: '购买人数', prop: 'buyCount'},
],
buyClothesUserData: [],
projectList: [],
unionList: [],
}
},
methods: {
async openView(row) {
const {id} = row
const resp = await $.get('/platform/clothing/record/findBuyClothesUser', {
projectId: row.projectId,
userId: row.userId
})
if (resp.code === 0) {
this.buyClothesUserData = clone(resp.data)
this.$refs['guava'].view()
}
},
//获取所有买服装的项目
async getBuyClothesProject() {
const {data} = await $.post('/platform/clothing/register/getBuyClothesProject')
return data
},
},
async created() {
this.projectList = await this.getBuyClothesProject()
this.unionList = await getUnion()
this.pageData()
}
})
</script>
<!--#
}
#-->