diff --git a/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareMineController.java b/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareMineController.java index fc8645bb..70abf43b 100644 --- a/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareMineController.java +++ b/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareMineController.java @@ -48,7 +48,8 @@ public class WelfareMineController { @At @SaCheckPermission("welfare.mine") public Result pageData(PageForm pageForm, - Integer year) { + Integer year, + String name) { Sql sql = Sqls.create(""" SELECT wp.*, @@ -57,13 +58,14 @@ public class WelfareMineController { WHEN wus.selectUserId IS NOT NULL THEN 1 ELSE 0 END AS isChoose, - GROUP_CONCAT(DISTINCT wuso.optionName ,'(',wus.selectNum,'份)') AS gist_list, - wus.receiveAddress, + GROUP_CONCAT(DISTINCT wuso.optionName ,'(',wus.selectNum,'份)') AS gist_list, + MAX(wus.selectTime) AS selectTime, + wus.receiveAddress, wl.userId FROM welfare_list wl LEFT JOIN welfare_project wp ON wp.id = wl.projectId - LEFT JOIN welfare_project_user_selection wus ON wl.projectId = wus.welfareId + INNER JOIN welfare_project_user_selection wus ON wl.projectId = wus.welfareId AND wus.selectUserId = @selectUserId LEFT JOIN welfare_project_subject_option wuso ON wus.selectOptionId = wuso.id $condition @@ -73,6 +75,9 @@ public class WelfareMineController { cnd.and("wp.isDisabled", "=", 0); cnd.andEX("YEAR(wp.choiceTimeStart)", "=", year); cnd.andEX("wl.userId", "=", SecurityUtil.getUserId()); + if (StrUtil.isNotBlank(name)) { + cnd.and("wp.name", "like", "%" + name.trim() + "%"); + } cnd.desc("wp.choiceTimeStart"); cnd.groupBy("wl.id"); sql.setCondition(cnd); diff --git a/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareUserSelectController.java b/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareUserSelectController.java index 9a7e6e1a..6bf72b60 100644 --- a/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareUserSelectController.java +++ b/src/main/java/com/budwk/app/zhgh/welfare/controller/WelfareUserSelectController.java @@ -1,6 +1,7 @@ package com.budwk.app.zhgh.welfare.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.util.StrUtil; import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.param.PageForm; @@ -47,7 +48,7 @@ public class WelfareUserSelectController { @At @SaCheckPermission("welfare.user.select") @ApiOperation("获取用户选择列表分页") - public Result pageData(PageForm pageForm, Integer year) { + public Result pageData(PageForm pageForm, Integer year, String name) { Sql sql = Sqls.create(""" SELECT wp.*, @@ -71,6 +72,9 @@ public class WelfareUserSelectController { cnd.and("wp.provideMode", "in", "2,3"); cnd.andEX("YEAR(wp.choiceTimeStart)", "in", year); cnd.and("wp.isDisabled", "=", 0); + if (StrUtil.isNotBlank(name)) { + cnd.and("wp.name", "like", "%" + name.trim() + "%"); + } cnd.groupBy("wp.id"); cnd.desc("wp.choiceTimeStart"); sql.setCondition(cnd); diff --git a/src/main/resources/static/assets/mobile/img/benefit/welfare-selection-hero-v2.png b/src/main/resources/static/assets/mobile/img/benefit/welfare-selection-hero-v2.png new file mode 100644 index 00000000..d9fbe6f7 Binary files /dev/null and b/src/main/resources/static/assets/mobile/img/benefit/welfare-selection-hero-v2.png differ diff --git a/src/main/resources/views/platform/zhghh5/welfare/address/addressManager.js b/src/main/resources/views/platform/zhghh5/welfare/address/addressManager.js index f915bd51..0f51fe4c 100644 --- a/src/main/resources/views/platform/zhghh5/welfare/address/addressManager.js +++ b/src/main/resources/views/platform/zhghh5/welfare/address/addressManager.js @@ -101,7 +101,7 @@ const WELFARE_ADDRESS_MANAGER_COMPONENT = { @click-left="closeHistoryLayer(historyLayerNames.edit)">
-
- - - - @@ -834,10 +833,10 @@ const WELFARE_ADDRESS_MANAGER_COMPONENT = { /deep/ .address-edit-scroll { min-height: 0; padding: 22px 16px calc(76px + env(safe-area-inset-bottom)); flex: 1; overflow-y: auto; box-sizing: border-box; -webkit-overflow-scrolling: touch; } /deep/ .address-recognition-card { margin-bottom: 16px; padding: 18px 16px 14px; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(49, 83, 126, .10); } /deep/ .address-recognition-card .van-cell { padding: 0; background: transparent; } - /deep/ .address-recognition-card .van-field__control { min-height: 72px; color: #202938; font-size: 15px; line-height: 24px; } + /deep/ .address-recognition-card .van-field__control { min-height: 96px; color: #202938; font-size: 15px; line-height: 24px; } /deep/ .address-recognition-card .van-field__control::placeholder { color: #7d7d7d; opacity: 1; } /deep/ .address-recognition-card__footer { margin-top: 12px; display: flex; justify-content: flex-end; } - /deep/ .address-recognition-button { width: 82px; height: 38px; border-color: #1989fa; background: #1989fa; font-size: 15px; font-weight: 500; } + /deep/ .address-recognition-button { width: 70px; height: 32px; border-color: #1989fa; background: #1989fa; font-size: 14px; font-weight: 500; } /deep/ .address-form-card { overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(49, 83, 126, .10); } /deep/ .address-form-card .van-cell { min-height: 68px; padding: 17px 18px; align-items: center; } /deep/ .address-form-card .van-cell::after { right: 18px; left: 18px; border-color: #edf0f5; } @@ -845,6 +844,11 @@ const WELFARE_ADDRESS_MANAGER_COMPONENT = { /deep/ .address-form-card .van-field__left-icon .van-icon, /deep/ .address-default-title .van-icon { color: #1989fa; font-size: 22px; } /deep/ .address-form-card .van-field__label { width: 72px; color: #202938; font-size: 15px; font-weight: 500; } + /deep/ .address-form-card .address-form-field.van-cell { min-height: 88px; padding: 15px 18px 13px; align-items: stretch; flex-direction: column; } + /deep/ .address-form-card .address-form-field .van-field__label { width: auto; margin: 0 0 8px; color: #8c98aa; font-weight: 400; line-height: 20px; } + /deep/ .address-form-card .address-form-field .van-cell__value { width: 100%; text-align: left; } + /deep/ .address-form-card .address-form-field .van-field__body { min-height: 24px; } + /deep/ .address-form-card .address-form-field .van-field__control { text-align: left; } /deep/ .address-default-title { display: flex; align-items: center; color: #202938; font-size: 15px; font-weight: 500; } /deep/ .address-default-title .van-icon { margin-right: 12px; } /deep/ .address-edit-footer { position: absolute; right: 0; bottom: 0; left: 0; z-index: 30; padding: 0 16px calc(12px + env(safe-area-inset-bottom)); background: transparent; } @@ -1018,7 +1022,6 @@ const WELFARE_ADDRESS_MANAGER_COMPONENT = { overflow-wrap: anywhere; color: #20242d; font-size: 16px; - font-weight: 600; line-height: 24px; } .welfare-address-manager.address-size-compact /deep/ .address-flat__edit { diff --git a/src/main/resources/views/platform/zhghh5/welfare/mine/list.html b/src/main/resources/views/platform/zhghh5/welfare/mine/list.html index f2920c9b..2fe646ca 100644 --- a/src/main/resources/views/platform/zhghh5/welfare/mine/list.html +++ b/src/main/resources/views/platform/zhghh5/welfare/mine/list.html @@ -37,11 +37,14 @@ layout("/layouts/platform_h5.html"){ height: 134px; overflow: hidden; border-radius: 12px; - background-color: #fff0f1; - box-shadow: 0 8px 20px rgba(190, 89, 98, .12); + background-color: #247fe8; + box-shadow: 0 8px 20px rgba(51, 117, 219, .18); } .welfare-list-hero__image { + position: absolute; + top: 0; + left: 0; display: block; width: 100%; height: 100%; @@ -50,17 +53,18 @@ layout("/layouts/platform_h5.html"){ } .welfare-list-hero__copy { - position: absolute; - top: 0; - bottom: 0; - left: 0; + position: relative; + z-index: 1; display: flex; - padding-left: 18px; + width: 64%; + height: 100%; + padding-left: 16px; justify-content: center; flex-direction: column; color: #fff; box-sizing: border-box; - text-shadow: 0 2px 8px rgba(190, 74, 84, .55); + background: linear-gradient(90deg, rgba(22, 112, 232, .98) 0%, rgba(22, 112, 232, .88) 52%, rgba(22, 112, 232, 0) 100%); + text-shadow: 0 2px 6px rgba(17, 86, 182, .18); } .welfare-list-hero__title { @@ -94,10 +98,30 @@ layout("/layouts/platform_h5.html"){ border-radius: 12px; background-color: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); + transition: border-radius .18s ease; + } + + .welfare-list-search { + margin-bottom: 8px; + padding: 0; + background-color: transparent; + } + + .welfare-list-search .van-search__content { + height: 42px; + align-items: center; + border-radius: 12px; + background-color: #fff; + box-shadow: 0 5px 16px rgba(43, 73, 112, .08); + } + + .welfare-list-filter.is-open { + border-radius: 12px 12px 0 0; } .welfare-list-filter .van-dropdown-menu__bar { height: 44px; + border-radius: inherit; box-shadow: none; } @@ -142,10 +166,21 @@ layout("/layouts/platform_h5.html"){ cursor: pointer; } + .welfare-list-card__summary { + display: flex; + min-height: 120px; + padding: 14px; + align-items: center; + box-sizing: border-box; + } + .welfare-list-card__cover { display: block; - width: 100%; - height: 150px; + width: 92px; + height: 92px; + flex: 0 0 92px; + overflow: hidden; + border-radius: 10px; background-color: #f7f9fc; line-height: 0; } @@ -195,7 +230,9 @@ layout("/layouts/platform_h5.html"){ .welfare-list-card__body { position: relative; - padding: 12px 42px 14px 14px; + min-width: 0; + padding: 4px 0 4px 14px; + flex: 1; box-sizing: border-box; } @@ -253,7 +290,10 @@ layout("/layouts/platform_h5.html"){ } .welfare-list-card__time { - margin-top: 6px; + display: flex; + min-width: 0; + margin-top: 8px; + align-items: center; overflow: hidden; color: #8491a6; font-size: 12px; @@ -262,13 +302,206 @@ layout("/layouts/platform_h5.html"){ white-space: nowrap; } + .welfare-list-card__time .van-icon { + margin-right: 5px; + flex: none; + color: #8da2bd; + font-size: 14px; + } + .welfare-list-card__arrow { - position: absolute; - top: 50%; - right: 14px; + margin-left: 2px; + flex: none; color: #adb7c6; font-size: 17px; - transform: translateY(-50%); + } + + .welfare-list-card__expanded { + padding: 12px; + border-top: 1px solid #edf1f6; + background-color: #f8fbff; + } + + .welfare-inline-card { + margin-bottom: 10px; + padding: 0 12px; + overflow: hidden; + border-radius: 10px; + background-color: #fff; + box-shadow: 0 4px 14px rgba(55, 85, 126, .06); + } + + .welfare-inline-card:last-child { + margin-bottom: 0; + } + + .welfare-inline-card__title { + position: relative; + height: 42px; + padding-left: 8px; + border-bottom: 1px solid #edf1f6; + color: #263548; + font-size: 14px; + font-weight: 600; + line-height: 42px; + } + + .welfare-inline-card__title::before { + position: absolute; + top: 14px; + bottom: 14px; + left: 0; + width: 3px; + border-radius: 2px; + background-color: #1989fa; + content: ''; + } + + .welfare-inline-row { + display: flex; + min-height: 40px; + padding: 6px 0; + align-items: center; + border-bottom: 1px solid #edf1f6; + box-sizing: border-box; + } + + .welfare-inline-row:last-child { + border-bottom: 0; + } + + .welfare-inline-row__label { + width: 72px; + flex: none; + color: #7f8da1; + font-size: 12px; + } + + .welfare-inline-row__value { + min-width: 0; + flex: 1; + color: #263548; + font-size: 13px; + line-height: 19px; + word-break: break-word; + } + + .welfare-inline-selection { + display: flex; + min-height: 72px; + padding: 10px 0; + align-items: center; + border-bottom: 1px solid #edf1f6; + box-sizing: border-box; + } + + .welfare-inline-selection:last-child { + border-bottom: 0; + } + + .welfare-inline-selection__image { + width: 54px; + height: 54px; + margin-right: 10px; + flex: none; + overflow: hidden; + border-radius: 8px; + background-color: #edf4fc; + } + + .welfare-inline-selection__content { + min-width: 0; + flex: 1; + } + + .welfare-inline-selection__name { + overflow: hidden; + color: #263548; + font-size: 14px; + line-height: 21px; + font-weight: 600; + text-overflow: ellipsis; + white-space: nowrap; + } + + .welfare-inline-selection__meta { + display: flex; + margin-top: 7px; + align-items: center; + gap: 6px; + color: #7f8da1; + font-size: 11px; + } + + .welfare-inline-selection__tag { + height: 20px; + padding: 0 6px; + border-radius: 4px; + background-color: #edf5ff; + color: #4f88cf; + line-height: 20px; + } + + .welfare-inline-loading, + .welfare-inline-empty { + padding: 24px 12px; + color: #9aa7b8; + font-size: 12px; + text-align: center; + } + + .welfare-list-card__tags { + display: flex; + min-width: 0; + margin-top: 8px; + gap: 6px; + overflow: hidden; + } + + .welfare-list-card__tag { + display: inline-flex; + max-width: 50%; + height: 22px; + padding: 0 7px; + align-items: center; + overflow: hidden; + border-radius: 4px; + color: #4f88cf; + background-color: #edf5ff; + box-sizing: border-box; + font-size: 11px; + line-height: 22px; + text-overflow: ellipsis; + white-space: nowrap; + } + + .welfare-list-card__info { + display: flex; + min-width: 0; + margin-top: 8px; + align-items: center; + color: #718198; + font-size: 12px; + line-height: 18px; + } + + .welfare-list-card__info .van-icon { + margin-right: 5px; + flex: none; + color: #8da2bd; + font-size: 14px; + } + + .welfare-list-card__info-label { + flex: none; + } + + .welfare-list-card__info-value { + min-width: 0; + overflow: hidden; + color: #42546c; + text-overflow: ellipsis; + white-space: nowrap; } .welfare-list-page .van-list__finished-text, @@ -289,6 +522,7 @@ layout("/layouts/platform_h5.html"){ text-align: center; } + /* 空状态插画按原始宽高比缩放,避免被 Vant 默认方形图片容器挤压变形。 */ .welfare-list-empty img { display: block; @@ -329,22 +563,36 @@ layout("/layouts/platform_h5.html"){
暖心福利插画
-
暖心福利
-
精选好礼 · 乐享生活
+
我的福利
+
我的选择 · 福利记录
- + +
@@ -362,45 +610,103 @@ layout("/layouts/platform_h5.html"){ v-for="row in tableData" :key="row.id" class="welfare-list-card" - @click="openView(row)" > - - - - -
-
- - 暂无图片 +
+ +
+
+
{{ row.name }}
+ +
+
+ + 选择时间:{{ $moment(row.selectTime).format('YYYY-MM-DD HH:mm') }} +
+
+ + 选择时间:暂无记录 +
-
-
-
{{ row.name }}
- {{ row.isChoose ? '已选择' : '未选择' }} +
+
+ 加载中...
-
- 选择时间:{{ $moment(row.choiceTimeStart).format('MM/DD HH:mm') }} - {{ $moment(row.choiceTimeEnd).format('MM/DD HH:mm') }} -
-
选择时间:未设置
- +
@@ -413,28 +719,24 @@ layout("/layouts/platform_h5.html"){
-