224 lines
8.9 KiB
HTML
224 lines
8.9 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<style>
|
|
.flexible-gifts {
|
|
display: flex;
|
|
flex-direction: column
|
|
}
|
|
|
|
.flexible-gifts-item {
|
|
display: flex;
|
|
}
|
|
|
|
.flexible-gifts-item:not(:first-of-type) {
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.flexible-gifts-item-input {
|
|
width: calc(100% - 144px);
|
|
}
|
|
|
|
.flexible-gifts-item-radio {
|
|
width: 100px;
|
|
text-align: center;
|
|
}
|
|
|
|
.flexible-gifts-item-delete {
|
|
width: 44px;
|
|
}
|
|
|
|
.search-item-option .el-date-editor, .search-item-option .el-select {
|
|
width: 100%;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="platform" id="app" v-cloak>
|
|
<guava padding="0 5%" ref="guava">
|
|
<template>
|
|
<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
|
|
:clearable="true"
|
|
@change="yearChange"
|
|
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" v-model="pageForm.projectId">
|
|
<el-option :key="item.value" :label="item.label" :value="item.value"
|
|
v-for="item in projectSelectOptions"></el-option>
|
|
</el-select>
|
|
<!-- <el-cascader style="width: 100%"-->
|
|
<!-- v-model="pageForm.projectOption"-->
|
|
<!-- :options="projectOptions" @change="projectOptionChange"></el-cascader>-->
|
|
</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" class="vi-table" ref="table"
|
|
row-key="id" style="width: 100%" v-loading="tableLoading">
|
|
|
|
|
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
|
width="80px"></el-table-column>
|
|
|
|
<el-table-column
|
|
align="center"
|
|
header-align="center"
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
:width="column.width"
|
|
min-width="100px" show-overflow-tooltip v-for="column in tableColumns">
|
|
<template scope="{row}" v-if="column.prop=='provideTimeStart'">
|
|
<i class="el-icon-time"></i> {{row.provideTimeStart}} - {{row.provideTimeEnd}}
|
|
</template>
|
|
|
|
<template scope="{row}" v-else-if="column.prop=='unionname'">
|
|
( {{row.unioncode}}){{row.unionname}}
|
|
</template>
|
|
|
|
<template scope="{row}" v-else-if="column.prop=='unitname'">
|
|
( {{row.unitcode}}){{row.unitname}}
|
|
</template>
|
|
|
|
<template scope="{row}" v-else-if="column.prop=='realWelfareUnitId'">
|
|
<span v-if="!row.editWelfareUnit">{{row.realWelfareUnitName}}</span>
|
|
<div v-else>
|
|
<el-select clearable filterable placeholder="请选择" size="small"
|
|
style="width: 160px"
|
|
v-model="row.modifiedWelfareUnitId">
|
|
<el-option
|
|
:value="item.welfareUnitId"
|
|
:key="item.welfareUnitId"
|
|
:label="item.welfareUnitName"
|
|
v-for="item in welfareUnits">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" fixed="right" header-align="center" label="操作" prop="userOnline"
|
|
width="170px">
|
|
<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>
|
|
<member :id="userId" ref="memberInfo" view></member>
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
<script>
|
|
<!--#include("/platform/welfare/include/common.js"){}#-->
|
|
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins, minixs],
|
|
data() {
|
|
return {
|
|
userId: '',
|
|
projectOptions: [],
|
|
units: [],
|
|
welfareUnits: [],
|
|
|
|
welfareProvideMode: [],
|
|
welfareSignMode: [],
|
|
welfareNoticePushMode: [],
|
|
pageForm: {
|
|
year: moment().format('YYYY'),
|
|
searchName: 'username'
|
|
},
|
|
tableColumns: [
|
|
{prop: 'loginName', label: '工号'},
|
|
{prop: 'userName', label: '姓名'},
|
|
{prop: 'personType', label: '人员类型', sortable: true},
|
|
{prop: 'userState', label: '在职状态', sortable: true},
|
|
{prop: 'unitName', label: '所在单位', sortable: true},
|
|
{prop: 'unionName', label: '所属工会', sortable: true},
|
|
{prop: 'projectName', label: '福利项目', sortable: true},
|
|
{prop: 'gist_list', label: '所选礼品', sortable: true},
|
|
{prop: 'receiveAddress', label: '邮寄地址', sortable: true},
|
|
{prop: 'courierNumber', label: '快递单号', sortable: true},
|
|
],
|
|
formRules: {},
|
|
welfare,
|
|
welfareUnitMode,
|
|
sexOptions,
|
|
selPersonType: [],
|
|
welfare_id: null,
|
|
welfarePersonTypeList: [],
|
|
projectSelectOptions: []
|
|
}
|
|
},
|
|
components: {
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue?v=1.0.0'),
|
|
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
|
|
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
|
},
|
|
methods: {
|
|
projectOptionChange(val) {
|
|
this.pageForm.projectId = val[1]
|
|
this.doSearch()
|
|
},
|
|
openView({userId}) {
|
|
this.userId = userId
|
|
this.$refs.guava.view()
|
|
},
|
|
},
|
|
async created() {
|
|
this.projectOptions = await getWelfareProjects()
|
|
this.pageData()
|
|
|
|
if (this.projectOptions.length && this.projectOptions[0].children.length) {
|
|
this.projectSelectOptions = this.projectOptions.find(v => v.label === new Date().getFullYear()).children
|
|
this.$set(this.pageForm, "projectOption", [this.projectOptions[0].value, this.projectOptions[0].children[0].value])
|
|
this.pageData()
|
|
}
|
|
this.units = await getComponentUnit()
|
|
this.welfareUnits = await getWelfareUnit()
|
|
this.welfarePersonTypeList = await getPersonTypeListGroupByWelfare()
|
|
|
|
this.welfarePersonTypeList.map(v => {
|
|
this.selPersonType.push(v.personType)
|
|
})
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#--> |