会员、福利

This commit is contained in:
Paidax
2024-12-25 11:09:17 +08:00
parent d78b9bbc8d
commit 0f6787c0cd
14 changed files with 277 additions and 58 deletions
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1724636815799" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7439" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M908.195 44.544L795.462 272.71c-96.35-91.788-258.188-101.795-258.188-101.795l75.45-149.085C616.354 9.076 626.362 0 640 0h246.365c15.453 0 28.16 12.707 28.16 28.16a26.159 26.159 0 0 1-6.33 16.384z m3.63 581.818c0 219.09-178.176 397.266-398.196 397.266S116.364 846.383 116.364 626.362c0-219.09 178.176-397.265 398.196-397.265s397.265 178.176 397.265 397.265zM700.044 535.46l-108.219-15.453-48.174-98.211c-16.384-33.606-42.729-32.722-59.113 0l-48.174 97.28-109.103 16.384c-37.236 5.446-44.544 29.975-18.153 56.32l78.197 76.381-18.2 108.218c-6.376 37.237 15.454 51.805 47.244 34.537l97.28-50.92 97.28 50.92c33.652 17.268 53.62 1.815 47.29-34.537L640 668.16l78.196-77.265c27.276-26.345 18.153-50.875-18.152-55.436zM115.433 44.544a25.367 25.367 0 0 1-5.446-16.384C109.987 12.707 122.74 0 138.193 0H384.56c13.637 0 23.645 9.076 27.275 21.83l75.404 149.085S324.56 180.922 229.097 272.71L115.433 44.544z" fill="#FFC000" p-id="7440"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -132,6 +132,18 @@ layout("/mobile/platform.html"){
border: 1pt solid #000000 !important;
}
.top-text {
font-size: 19px;
width: inherit;
margin-top: -5px;
position: absolute;
font-family: "";
top: 0;
right: 0;
transform: rotate(23deg);
z-index: 1;
}
</style>
<div id="app" v-cloak>
@@ -149,38 +161,46 @@ layout("/mobile/platform.html"){
<!--基本信息-->
<van-cell-group class="van-cell-group--inset">
<van-cell>
<div style="font-weight: bold;font-size: 15px;display: flex;align-items: center">
福利信息
<div style="font-weight: bold;font-size: 15px;display: flex;align-items: center;justify-content: space-between">
<div>
<span>福利信息</span>
</div>
<div @click="clickUpOrDown=!clickUpOrDown">
<span>{{clickUpOrDown ? '点击收起' : '点击展开'}}</span>
<van-icon :name="clickUpOrDown?'arrow-up':'arrow-down'"></van-icon>
</div>
</div>
</van-cell>
<van-cell :border="false" :value="projectInfo.name" title="福利名称"></van-cell>
<van-cell :border="false" :value="projectInfo.festival" title="发放节日"></van-cell>
<van-cell :border="false" :value="projectInfo.gift" title="福利礼品"
v-if="!projectInfo.flexible"></van-cell>
<!--<van-cell :border="false" :value="projectInfo.provideAddress"
title="发放地点"></van-cell>-->
<van-cell :border="false" title="选择形式">
{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}
</van-cell>
<van-cell :border="false" :value="projectInfo.multiSelectNum" title="最多选几个"
v-if="projectInfo.isCheckBox==='checkBox'"></van-cell>
<van-cell :border="false" title="发放形式">
<template>
{{welfareProvideMode.find(v=>v.code==projectInfo.provideMode) &&
welfareProvideMode.find(v=>v.code==projectInfo.provideMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="签收形式">
<template>
{{welfareSignMode.find(v=>v.code==projectInfo.signMode) &&
welfareSignMode.find(v=>v.code==projectInfo.signMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="选择时间">
<template #label>
{{projectInfo.choiceTimeStart + ' 至 ' + projectInfo.choiceTimeEnd}}
</template>
</van-cell>
<template v-if="clickUpOrDown">
<van-cell :border="false" :value="projectInfo.name" title="福利名称"></van-cell>
<van-cell :border="false" :value="projectInfo.festival" title="发放节日"></van-cell>
<van-cell :border="false" :value="projectInfo.gift" title="福利礼品"
v-if="!projectInfo.flexible"></van-cell>
<!--<van-cell :border="false" :value="projectInfo.provideAddress"
title="发放地点"></van-cell>-->
<van-cell :border="false" title="选择形式">
{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}
</van-cell>
<van-cell :border="false" :value="projectInfo.multiSelectNum" title="最多选几个"
v-if="projectInfo.isCheckBox==='checkBox'"></van-cell>
<van-cell :border="false" title="发放形式">
<template>
{{welfareProvideMode.find(v=>v.code==projectInfo.provideMode) &&
welfareProvideMode.find(v=>v.code==projectInfo.provideMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="签收形式">
<template>
{{welfareSignMode.find(v=>v.code==projectInfo.signMode) &&
welfareSignMode.find(v=>v.code==projectInfo.signMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="选择时间">
<template #label>
{{projectInfo.choiceTimeStart + ' 至 ' + projectInfo.choiceTimeEnd}}
</template>
</van-cell>
</template>
</van-cell-group>
<!--礼品套餐-->
@@ -197,12 +217,17 @@ layout("/mobile/platform.html"){
<div class="selection" style="background: #FFF"
v-for="(subject,sidx) in projectInfo.welfareProjectSubjects">
<div style="display: flex;width: 100%;padding: 10px 0"
<div style="display: flex;width: 100%;padding: 10px 0;flex-wrap: wrap"
v-for="(option, oidx) in subject.options">
<div style="width: 120px;height: 100px;display: flex;justify-content: center;align-items: center">
<van-image :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+option.imgUrl"
<div style="width: 120px;height: 100px;display: flex;justify-content: center;align-items: center;position:relative;">
<div v-if="[1,2,3].includes(option.rank)">
<div class="top-text" :style="'color:' + getRankColor(option.rank)">TOP{{option.rank}}</div>
</div>
<van-image src="https://s21.ax1x.com/2024/12/24/pAjYEGT.png"
asrc="FILE_STREAM_PREVIEW_ADDRESS+'?id='+option.imgUrl"
fit="contain"
style="width: 100px;height: 100px;border-radius: 10px"></van-image>
<span style="position: absolute; bottom: 0;left: 10px;right: 10px;height: 20px;background: rgb(0 0 0 / 50%);text-align:center;color: #FFF;">{{option.selectCount}}人已选</span>
<!-- @click="vant.ImagePreview([CREATE_PREVIEW_URL(option.imgUrl)])"-->
</div>
@@ -219,7 +244,7 @@ layout("/mobile/platform.html"){
备注:{{option.simpleDesc}}
</div>
<div style="position: absolute;right: 10px;bottom: 0;left: 0;display: flex;justify-content: space-between">
<div style="width: 70px;font-size: 13px;color: #918a8a;text-align: right"
<div style="width: 70px;font-size: 13px;color: #918a8a;text-align: right;"
@click="openViewDesc(option.description)">
套餐详情
</div>
@@ -388,7 +413,9 @@ layout("/mobile/platform.html"){
selectAddress: null,
userSelection: [],
descPopup: false,
signData: null
signData: null,
clickUpOrDown: false
}
},
computed: {
@@ -404,7 +431,7 @@ layout("/mobile/platform.html"){
}
return false
},
selectTime(){
selectTime() {
if (this.userSelection && this.userSelection.length > 0) {
return this.userSelection[0].selectTime
}
@@ -426,11 +453,11 @@ layout("/mobile/platform.html"){
} else {
//已选择了不能再动了
if (this.isSelect) {
if(moment(this.selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()){
if (moment(this.selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
return {text: '确定修改', disabled: false}
}
return {text: '选择已结束', disabled: true}
}else{
} else {
if (now > moment(choiceTimeStart).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
return {text: this.isSelect ? '确定修改' : '确定选择', disabled: false}
} else if (now > moment(overdueChoiceTimeEnd).valueOf()) {
@@ -451,6 +478,19 @@ layout("/mobile/platform.html"){
}
},
methods: {
// top字体颜色
getRankColor(rank) {
switch(rank) {
case 1:
return 'red';
case 2:
return 'yellow';
case 3:
return 'blue';
default:
return 'transparent';
}
},
//数量更改
numChange(value, option, optionIndex) {
const {
@@ -550,6 +590,7 @@ layout("/mobile/platform.html"){
this.$modal.msgError(msg)
}
this.confirmPopup = false
await this.getProjectInfo()
},
//查看详情
@@ -571,7 +612,7 @@ layout("/mobile/platform.html"){
//地址管理
openAddressManage() {
pjaxReplace('/mobile/welfare/mine/address?projectId='+this.projectId)
pjaxReplace('/mobile/welfare/mine/address?projectId=' + this.projectId)
window.sessionStorage.setItem('welfareProjectId', this.projectId)
},
@@ -70,7 +70,6 @@ layout("/layouts/platform.html"){
<div class="search-item-option">
<dict-select v-model="pageForm.userStates"
style="width: 100%"
multiple
clearable
placeholder="在职状态"
code="userState"></dict-select>
@@ -82,13 +81,23 @@ layout("/layouts/platform.html"){
<div class="search-item-option">
<dict-select v-model="pageForm.personTypes"
style="width: 100%"
multiple
clearable
placeholder="人员类型"
code="UserType"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.preparedBy"
style="width: 100%"
clearable
placeholder="人员类型"
code="PREPARED_BY"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">变更类型:</div>
<div class="search-item-option">
@@ -592,8 +601,9 @@ layout("/layouts/platform.html"){
{prop: 'username', label: '姓名', sortable: true},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
@@ -108,6 +108,17 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.preparedBy"
style="width: 100%"
clearable
placeholder="人员类型"
code="PREPARED_BY"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">变更类型:</div>
<div class="search-item-option">
@@ -338,8 +349,9 @@ layout("/layouts/platform.html"){
{prop: 'username', label: '姓名', sortable: true},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
@@ -126,6 +126,16 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item">
<div class="search-item-label">在职状态:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.userState" style="width: 100%"
clearable
placeholder="在职状态"
code="UserState"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">会员状态:</div>
<div class="search-item-option">
@@ -210,6 +220,30 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item" style="width: calc(100% - 160px)">
<div class="search-item-label">人员性质:</div>
<div class="search-item-option">
<el-tag
style="margin-right: 10px;margin-bottom: 10px;cursor: pointer"
v-for="item in preparedByOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.preparedBys.includes(item.name)?'dark':'plain'"
@click="tagClick('preparedBys',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="preparedByOptions.length&&pageForm.preparedBys.length"
:underline="false"
@click="pageForm.preparedBys=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.preparedBys=preparedByOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</div>
</div>
<div class="search-query" style="position:absolute;right: 0;bottom: 0">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
@@ -323,6 +357,7 @@ layout("/layouts/platform.html"){
pageForm: {
userStates: [],
personTypes: [],
preparedBys: [],
},
userId: "",
@@ -333,8 +368,9 @@ layout("/layouts/platform.html"){
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
@@ -348,6 +384,7 @@ layout("/layouts/platform.html"){
setMemberDialogVisible: false,
personTypeOptions: [],
userStateOptions: [],
preparedByOptions: [],
isThreeUnit: false
}
},
@@ -362,6 +399,7 @@ layout("/layouts/platform.html"){
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
const {data, code, msg} = await $.post(loc() + '/pageData', pageForm)
this.tableLoading = false
sublime.closeLoadingbar()
@@ -424,6 +462,7 @@ layout("/layouts/platform.html"){
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
pageForm.confirm = confirm
const resp = await $.post(loc() + "/setMemberByCnd", pageForm)
if (resp.code === 0) {
@@ -498,6 +537,7 @@ layout("/layouts/platform.html"){
this.pageData();
this.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
this.preparedByOptions = await getDictOptions("PREPARED_BY")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
} else {
@@ -261,6 +261,31 @@ layout("/layouts/platform.html"){
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">人员性质:</el-col>
<el-col class="query-row-content">
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in preparedByOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.preparedBys.includes(item.name)?'dark':'plain'"
@click="tagClick('preparedBys',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="preparedByOptions.length&&pageForm.preparedBys.length"
:underline="false"
@click="pageForm.preparedBys=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.preparedBys=preparedByOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">系统角色:</el-col>
<el-col class="query-row-content">
@@ -539,6 +564,7 @@ layout("/layouts/platform.html"){
searchName: "username",
personTypes: [],
userStates: [],
preparedBys: [],
memberStatus: [],
year: moment().format('YYYY'),
roleIds: [],
@@ -556,6 +582,7 @@ layout("/layouts/platform.html"){
personTypeOptions: [],
userStateOptions: [],
preparedByOptions: [],
memberStatusOptions: [],
userId: "",
@@ -575,8 +602,9 @@ layout("/layouts/platform.html"){
{prop: 'idcard', label: '身份证号', width: 170},
{prop: 'position', label: '职务', sortable: true, checked: 0},
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
@@ -621,6 +649,7 @@ layout("/layouts/platform.html"){
pageForm.threeUnitId = JSON.stringify(pageForm.threeUnitId)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
@@ -642,14 +671,19 @@ layout("/layouts/platform.html"){
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
const personTypes = JSON.stringify(this.pageForm.personTypes)
const userStates = JSON.stringify(this.pageForm.userStates)
const preparedBys = JSON.stringify(this.pageForm.preparedBys)
window.location.href = loc() + "/doExport?unionId=" + this.pageForm.unionId + "&unitId=" + this.pageForm.unitId
+ "&year=" + this.pageForm.year
+ "&memberStatus=" + memberStatus + "&personTypes=" + personTypes + "&userStates=" + userStates
+ "&memberStatus=" + memberStatus
+ "&personTypes=" + personTypes
+ "&userStates=" + userStates
+ "&preparedBys=" + preparedBys
},
doExportByUnion() {
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
const personTypes = JSON.stringify(this.pageForm.personTypes)
const userStates = JSON.stringify(this.pageForm.userStates)
const preparedBys = JSON.stringify(this.pageForm.preparedBys)
const unionId = JSON.stringify(this.pageForm.unionId)
const unitId = JSON.stringify(this.pageForm.unitId)
const unionGroupId = JSON.stringify(this.pageForm.unionGroupId)
@@ -680,7 +714,7 @@ layout("/layouts/platform.html"){
+ "&startDate=" + (startDate ? this.getDate(startDate) : '') + "&endDate=" + (endDate ? this.getDate(endDate) : '') + "&campus=" + (campus ? campus : '')
+ "&reverseSelection=" + (reverseSelection ? reverseSelection : '') + "&memberSearchName=" + (memberSearchName ? memberSearchName : '')
+ "&memberSearchKeyWord=" + (memberSearchKeyWord ? memberSearchKeyWord : '') + "&personTypes=" + personTypes
+ "&userStates=" + userStates + "&props=" + JSON.stringify(props)
+ "&userStates=" + userStates + "&preparedBys=" + preparedBys + "&props=" + JSON.stringify(props)
},
getDate(date) {
let year = date.getFullYear();
@@ -699,6 +733,15 @@ layout("/layouts/platform.html"){
}
this.doSearch()
},
checkPreparedByType(state) {
let idx = this.pageForm.preparedBys.indexOf(state)
if (idx != -1) {
this.pageForm.preparedBys.splice(idx, 1)
} else {
this.pageForm.preparedBys.push(state)
}
this.doSearch()
},
checkMemberStatusType(state) {
let idx = this.pageForm.memberStatus.indexOf(state)
if (idx !== -1) {
@@ -757,6 +800,7 @@ layout("/layouts/platform.html"){
pageForm.threeUnitId = JSON.stringify(pageForm.threeUnitId)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
@@ -804,6 +848,7 @@ layout("/layouts/platform.html"){
this.pageForm.sexTypes = []
this.pageForm.personTypes = []
this.pageForm.userStates = []
this.pageForm.preparedBys = []
this.pageForm.unionId = []
this.pageForm.unitId = []
this.pageForm.activityGroupId = []
@@ -858,6 +903,7 @@ layout("/layouts/platform.html"){
}
this.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
this.preparedByOptions = await getDictOptions("PREPARED_BY")
this.memberStatusOptions = await getDictOptions("memberStatusText")
await this.getMenuOptions();
await this.getRolesAndUnion()