福利
This commit is contained in:
@@ -94,6 +94,7 @@ public class WelfareListController {
|
|||||||
@Param(value = "projectId", required = false) String projectId,
|
@Param(value = "projectId", required = false) String projectId,
|
||||||
@Param(value = "optionId", required = false) String optionId,
|
@Param(value = "optionId", required = false) String optionId,
|
||||||
@Param(value = "month", required = false) String month,
|
@Param(value = "month", required = false) String month,
|
||||||
|
@Param(value = "isChoose", required = false) Integer isChoose,
|
||||||
@Param(value = "courierNumber", required = false) String courierNumber
|
@Param(value = "courierNumber", required = false) String courierNumber
|
||||||
) {
|
) {
|
||||||
Sql sql = Sqls.create("""
|
Sql sql = Sqls.create("""
|
||||||
@@ -133,6 +134,14 @@ public class WelfareListController {
|
|||||||
cnd.andEX("wl.unionid", "=", pageParam.getWelfareUnit());
|
cnd.andEX("wl.unionid", "=", pageParam.getWelfareUnit());
|
||||||
cnd.andEX("wl.unitid", "=", pageParam.getUnit());
|
cnd.andEX("wl.unitid", "=", pageParam.getUnit());
|
||||||
|
|
||||||
|
if (isChoose != null) {
|
||||||
|
if (isChoose.equals(1)) {
|
||||||
|
cnd.and("wus.selectUserId", "is not", null);
|
||||||
|
} else if (isChoose.equals(2)) {
|
||||||
|
cnd.and("wus.selectUserId", "is", null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Lang.isNotEmpty(pageParam.getPersonTypes())) {
|
if (Lang.isNotEmpty(pageParam.getPersonTypes())) {
|
||||||
String personTypes = pageParam.getPersonTypes();
|
String personTypes = pageParam.getPersonTypes();
|
||||||
String[] personTypeArray = Json.fromJsonAsArray(String.class, personTypes);
|
String[] personTypeArray = Json.fromJsonAsArray(String.class, personTypes);
|
||||||
|
|||||||
@@ -115,10 +115,12 @@ layout("/mobile/platform.html"){
|
|||||||
}
|
}
|
||||||
|
|
||||||
.optionDesc {
|
.optionDesc {
|
||||||
|
margin-top: -16px;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
/*-webkit-box-orient: vertical;*/
|
||||||
-webkit-line-clamp: 3;
|
/*-webkit-line-clamp: 3;*/
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
white-space: pre-line;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #868282;
|
color: #868282;
|
||||||
@@ -219,7 +221,7 @@ layout("/mobile/platform.html"){
|
|||||||
v-for="(subject,sidx) in projectInfo.welfareProjectSubjects">
|
v-for="(subject,sidx) in projectInfo.welfareProjectSubjects">
|
||||||
<div style="display: flex;width: 100%;padding: 10px 0;flex-wrap: wrap"
|
<div style="display: flex;width: 100%;padding: 10px 0;flex-wrap: wrap"
|
||||||
v-for="(option, oidx) in subject.options">
|
v-for="(option, oidx) in subject.options">
|
||||||
<div style="width: 120px;height: 100px;display: flex;justify-content: center;align-items: center;position:relative;">
|
<div style="width: 120px;height: 110px;display: flex;justify-content: center;align-items: center;position:relative;">
|
||||||
<!-- <div v-if="[1,2,3].includes(option.rank)">-->
|
<!-- <div v-if="[1,2,3].includes(option.rank)">-->
|
||||||
<!-- <div class="top-text" :style="'color:' + getRankColor(option.rank)">TOP{{option.rank}}</div>-->
|
<!-- <div class="top-text" :style="'color:' + getRankColor(option.rank)">TOP{{option.rank}}</div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
@@ -234,7 +236,7 @@ layout("/mobile/platform.html"){
|
|||||||
<div style="display: flex;justify-content: space-between;align-items: center;font-size: 14px">
|
<div style="display: flex;justify-content: space-between;align-items: center;font-size: 14px">
|
||||||
<div style="width: 100%">{{option.optionName}}</div>
|
<div style="width: 100%">{{option.optionName}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="optionDesc">
|
<div class="optionDesc" @click="openViewDesc(option.description)">
|
||||||
<template v-if="option.supplier">
|
<template v-if="option.supplier">
|
||||||
{{option.supplier}}
|
{{option.supplier}}
|
||||||
</template>
|
</template>
|
||||||
@@ -242,7 +244,7 @@ layout("/mobile/platform.html"){
|
|||||||
<div class="optionDesc" v-if="option.simpleDesc">
|
<div class="optionDesc" v-if="option.simpleDesc">
|
||||||
备注:{{option.simpleDesc}}
|
备注:{{option.simpleDesc}}
|
||||||
</div>
|
</div>
|
||||||
<div style="position: absolute;right: 10px;bottom: 0;left: 0;display: flex;justify-content: space-between">
|
<div style="position: absolute;right: 10px;bottom: -10px;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)">
|
@click="openViewDesc(option.description)">
|
||||||
套餐详情
|
套餐详情
|
||||||
|
|||||||
@@ -237,6 +237,13 @@ layout("/layouts/platform.html"){
|
|||||||
<el-card class="mt10" shadow="never">
|
<el-card class="mt10" shadow="never">
|
||||||
<table-tool :app="this" label="福利名单">
|
<table-tool :app="this" label="福利名单">
|
||||||
<template #func>
|
<template #func>
|
||||||
|
|
||||||
|
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isChoose">
|
||||||
|
<el-radio-button :label="0">全部</el-radio-button>
|
||||||
|
<el-radio-button :label="1">已选择</el-radio-button>
|
||||||
|
<el-radio-button :label="2">未选择</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
<!-- <el-button :disabled="!pageForm.projectId"
|
<!-- <el-button :disabled="!pageForm.projectId"
|
||||||
@click="doExportWelfareReceive(pageForm.projectId,pageForm.welfareUnit,pageForm.units,pageForm.personTypes,pageForm.userStates)"
|
@click="doExportWelfareReceive(pageForm.projectId,pageForm.welfareUnit,pageForm.units,pageForm.personTypes,pageForm.userStates)"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
@@ -428,6 +435,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col span="8">
|
<el-col span="8">
|
||||||
<el-input-number :max="item.maxNum" :min="0"
|
<el-input-number :max="item.maxNum" :min="0"
|
||||||
|
@keydown.native="onKeydown"
|
||||||
@change="numChange(item.selectNum,item,oidx)"
|
@change="numChange(item.selectNum,item,oidx)"
|
||||||
style="width: 50%"
|
style="width: 50%"
|
||||||
v-model="item.selectNum"></el-input-number>
|
v-model="item.selectNum"></el-input-number>
|
||||||
@@ -664,7 +672,8 @@ layout("/layouts/platform.html"){
|
|||||||
searchName: 'username',
|
searchName: 'username',
|
||||||
units: [],
|
units: [],
|
||||||
personTypes: [],
|
personTypes: [],
|
||||||
userStates: []
|
userStates: [],
|
||||||
|
isChoose: 0
|
||||||
},
|
},
|
||||||
tableColumns: commonColumns.concat([
|
tableColumns: commonColumns.concat([
|
||||||
{prop: 'isChoose', label: '是否选择', width: "100px", sortable: true},
|
{prop: 'isChoose', label: '是否选择', width: "100px", sortable: true},
|
||||||
@@ -711,6 +720,11 @@ layout("/layouts/platform.html"){
|
|||||||
'courier-number-info': httpVueLoader('/components/welfare/CourierNumberInfo.vue?v=' + new Date().getTime())
|
'courier-number-info': httpVueLoader('/components/welfare/CourierNumberInfo.vue?v=' + new Date().getTime())
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onKeydown(event) {
|
||||||
|
if (event.key !== "ArrowUp" && event.key !== "ArrowDown") {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
},
|
||||||
doExportReimbursement() {
|
doExportReimbursement() {
|
||||||
if (!this.pageForm.projectId) {
|
if (!this.pageForm.projectId) {
|
||||||
this.$message.warning('请选择要导出的福利')
|
this.$message.warning('请选择要导出的福利')
|
||||||
@@ -883,7 +897,7 @@ layout("/layouts/platform.html"){
|
|||||||
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
||||||
|
|
||||||
if (sum > multiSelectNum) {
|
if (sum > multiSelectNum) {
|
||||||
this.$set(this.welfareOptions[optionIndex], 'selectNum', multiSelectNum)
|
this.$set(this.welfareOptions[optionIndex], 'selectNum', value - 1)
|
||||||
this.$message('此次福利最多只能选择' + multiSelectNum + '份');
|
this.$message('此次福利最多只能选择' + multiSelectNum + '份');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -618,17 +618,26 @@ layout("/layouts/platform.html"){
|
|||||||
this.$refs.openQRCode.openCode('/mobile/welfare/list/receive?projectId=' + row.id)
|
this.$refs.openQRCode.openCode('/mobile/welfare/list/receive?projectId=' + row.id)
|
||||||
},
|
},
|
||||||
isCheckBoxChange() {
|
isCheckBoxChange() {
|
||||||
this.formData.welfareProjectSubjects.forEach(v=> {
|
if (this.formData.welfareProjectSubjects && this.formData.welfareProjectSubjects.length > 0) {
|
||||||
v.subjectType = this.formData.isCheckBox ? this.formData.isCheckBox : 'radio'
|
this.formData.welfareProjectSubjects.forEach(v=> {
|
||||||
})
|
v.subjectType = this.formData.isCheckBox ? this.formData.isCheckBox : 'radio'
|
||||||
|
})
|
||||||
// this.formData.welfareProjectSubjects = [{
|
} else {
|
||||||
// subjectName: '请输入福利信息',
|
this.formData.welfareProjectSubjects = [{
|
||||||
// subjectType: this.formData.isCheckBox ? this.formData.isCheckBox : 'radio',
|
subjectName: '请输入福利信息',
|
||||||
// defaultOption: null,
|
subjectType: this.formData.isCheckBox ? this.formData.isCheckBox : 'radio',
|
||||||
//
|
defaultOption: null,
|
||||||
// }]
|
options: [
|
||||||
|
{
|
||||||
|
optionType: "套餐",
|
||||||
|
optionName: '福利1',
|
||||||
|
optionNameId: '',
|
||||||
|
optionSort: '1',
|
||||||
|
imgUrl: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async handleAvatarSuccess(res, file) {
|
async handleAvatarSuccess(res, file) {
|
||||||
this.$set(this.formData, 'cover', res.data.filepath)
|
this.$set(this.formData, 'cover', res.data.filepath)
|
||||||
@@ -859,7 +868,7 @@ layout("/layouts/platform.html"){
|
|||||||
data.defaultFlexibleGifts = idx < 0 ? 0 : idx
|
data.defaultFlexibleGifts = idx < 0 ? 0 : idx
|
||||||
data.provideTime = [data.provideTimeStart, data.provideTimeEnd]
|
data.provideTime = [data.provideTimeStart, data.provideTimeEnd]
|
||||||
data.choiceTime = [data.choiceTimeStart, data.choiceTimeEnd]
|
data.choiceTime = [data.choiceTimeStart, data.choiceTimeEnd]
|
||||||
if (data.welfareProjectSubjects.length === 0) {
|
if (!data.welfareProjectSubjects || data.welfareProjectSubjects.length === 0) {
|
||||||
data.welfareProjectSubjects = [{
|
data.welfareProjectSubjects = [{
|
||||||
subjectName: '请输入福利信息',
|
subjectName: '请输入福利信息',
|
||||||
subjectType: data.isCheckBox,
|
subjectType: data.isCheckBox,
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ layout("/layouts/platform.html"){
|
|||||||
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
const sum = selectNums.reduce((accumulator, currentValue) => accumulator + currentValue, 0)
|
||||||
|
|
||||||
if (sum > multiSelectNum) {
|
if (sum > multiSelectNum) {
|
||||||
this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], 'selectNum', multiSelectNum)
|
this.$set(this.projectInfo.welfareProjectSubjects[0].options[optionIndex], 'selectNum', value - 1)
|
||||||
this.$message.warning('此次福利最多只能选择' + multiSelectNum + '份');
|
this.$message.warning('此次福利最多只能选择' + multiSelectNum + '份');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user