From 3f1a9d9b4c70094788afde54da50b7fad39b6cc1 Mon Sep 17 00:00:00 2001 From: dd3s_206 Date: Wed, 17 Jun 2026 09:45:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=81=8C=E5=B7=A5=E7=A6=8F=E5=88=A9-?= =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80=EF=BC=88h5=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E7=AB=AF=EF=BC=89=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=E5=90=8E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=80=E7=9B=B4=E5=A4=84=E4=BA=8E=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=B8=AD=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/mobile/welfare/mine/address.html | 20 ++++++++--- .../mobile/welfare/mine/address_edit.html | 26 +++++++++++--- .../views/platform/welfare/addressManage.html | 35 ++++++++++++------- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/src/main/resources/views/mobile/welfare/mine/address.html b/src/main/resources/views/mobile/welfare/mine/address.html index 3d03a5a..99c5a99 100644 --- a/src/main/resources/views/mobile/welfare/mine/address.html +++ b/src/main/resources/views/mobile/welfare/mine/address.html @@ -44,6 +44,7 @@ layout("/mobile/platform.html"){ mixins: [mobileMixins, welfareMixins], data() { return { + projectId: GetQueryString("projectId"), chosenAddressId: null } }, @@ -56,16 +57,27 @@ layout("/mobile/platform.html"){ } }, onAdd() { - pjaxReplace("/mobile/welfare/mine/addressEdit") + if (this.projectId) { + pjaxReplace("/mobile/welfare/mine/addressEdit?projectId=" + this.projectId) + } else { + pjaxReplace("/mobile/welfare/mine/addressEdit") + } }, onEdit(item, index) { - pjaxReplace("/mobile/welfare/mine/addressEdit?id=" + item.id) + if (this.projectId) { + pjaxReplace("/mobile/welfare/mine/addressEdit?id=" + item.id + "&projectId=" + this.projectId) + } else { + pjaxReplace("/mobile/welfare/mine/addressEdit?id=" + item.id) + } } }, async created() { this.startLoading() - await this.selectAddressList() - this.closeLoading() + try { + await this.selectAddressList() + } finally { + this.closeLoading() + } } }) diff --git a/src/main/resources/views/mobile/welfare/mine/address_edit.html b/src/main/resources/views/mobile/welfare/mine/address_edit.html index fd2fef0..790170a 100644 --- a/src/main/resources/views/mobile/welfare/mine/address_edit.html +++ b/src/main/resources/views/mobile/welfare/mine/address_edit.html @@ -101,8 +101,12 @@ layout("/mobile/platform.html"){ duration: 0 }) content.userName = content.name - const resp = await $.post("/mobile/welfare/mine/doSaveUserAddress", content) - loading.close() + let resp = {} + try { + resp = await $.post("/mobile/welfare/mine/doSaveUserAddress", content) + } finally { + this.closeToastLoading(loading) + } if (resp.code === 0) { this.$toast.success(resp.msg) this.$nextTick(() => { @@ -117,14 +121,28 @@ layout("/mobile/platform.html"){ overlay: true, duration: 0 }) - const resp = await $.post("/mobile/welfare/mine/deleteAddress", { id: content.id }) - loading.close() + let resp = {} + try { + resp = await $.post("/mobile/welfare/mine/deleteAddress", { id: content.id }) + } finally { + this.closeToastLoading(loading) + } if (resp.code === 0) { this.$toast.success(resp.msg) this.$nextTick(() => { this.back() }) } + }, + closeToastLoading(loading) { + if (loading && typeof loading.clear === "function") { + loading.clear() + } else if (loading && typeof loading.close === "function") { + loading.close() + } + if (this.$toast && typeof this.$toast.clear === "function") { + this.$toast.clear() + } } }, async created() { diff --git a/src/main/resources/views/platform/welfare/addressManage.html b/src/main/resources/views/platform/welfare/addressManage.html index bca3b68..056046c 100644 --- a/src/main/resources/views/platform/welfare/addressManage.html +++ b/src/main/resources/views/platform/welfare/addressManage.html @@ -142,24 +142,26 @@ layout("/layouts/platform.html"){ function ensureAddressDzOption(options, row) { const provinceTemplate = chengShiList.find((c) => c.label === row.province) const cityTemplate = provinceTemplate?.children?.find((c) => c.label === row.city) - if (!provinceTemplate || !cityTemplate) { + if (!row.province || !row.city) { return options } const nextOptions = JSON.parse(JSON.stringify(options)) let province = nextOptions.find((c) => c.label === row.province) if (!province) { - province = {...provinceTemplate, children: []} + province = provinceTemplate ? {...provinceTemplate, children: []} : {label: row.province, value: row.province, children: []} nextOptions.push(province) } let city = province.children.find((c) => c.label === row.city) if (!city) { - city = {...cityTemplate, children: []} + city = cityTemplate ? {...cityTemplate, children: []} : {label: row.city, value: row.city, children: []} province.children.push(city) } if (row.county) { - const countyTemplate = cityTemplate.children?.find((c) => c.label === row.county) + const countyTemplate = cityTemplate?.children?.find((c) => c.label === row.county) if (countyTemplate && !city.children.find((c) => c.label === row.county)) { city.children.push(countyTemplate) + } else if (!countyTemplate && !city.children.find((c) => c.label === row.county)) { + city.children.push({label: row.county, value: row.areaCode || row.county}) } } return nextOptions @@ -209,16 +211,19 @@ layout("/layouts/platform.html"){ ) }, handleChange(val) { - if (val) { + if (val && val.length > 0) { let provinceName = "" let cityName = "" let countyName = "" const province = this.dzOptions.find((c) => c.value === val[0]) + if (!province) return provinceName = province.label const city = province.children.find((p) => p.value === val[1]) + if (!city) return cityName = city.label if (val.length === 3) { const county = city.children.find((p) => p.value === val[2]) + if (!county) return countyName = county.label this.$set(this.formData, "areaCode", county.value) } else { @@ -275,17 +280,23 @@ layout("/layouts/platform.html"){ }, openEdit(row) { this.dzOptions = ensureAddressDzOption(getWelfareReceiveDzOptions(), row) - row.addressList = [] + const addressList = [] const province = this.dzOptions.find((c) => c.label === row.province) - row.addressList.push(province.value) - const city = province.children.find((p) => p.label === row.city) - row.addressList.push(city.value) - if (row.county) { + if (province) { + addressList.push(province.value) + } + const city = province?.children?.find((p) => p.label === row.city) + if (city) { + addressList.push(city.value) + } + if (row.county && city) { const county = city.children.find((p) => p.label === row.county) - row.addressList.push(county.value) + if (county) { + addressList.push(county.value) + } } - this.formData = { ...row } + this.formData = { ...row, addressList } this.formData.isDefault = this.formData.isDefault ? "1" : "0" this.dialogVisible = true }, From f0c0027f0c827f12c0688a0c17cd1063fb8761ce Mon Sep 17 00:00:00 2001 From: dd3s_206 Date: Wed, 17 Jun 2026 11:33:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=88=B1=E5=BF=83=E5=B8=AE=E6=89=B6?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F-=E7=96=97=E4=BC=91=E5=85=BB=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E6=B4=BB=E5=8A=A8=E6=8A=A5=E5=90=8D=EF=BC=9A?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=9D=A2=E5=90=91=E5=AF=B9=E8=B1=A1=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=88=E4=BA=BA=E5=91=98=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=EF=BC=89=EF=BC=9B=E5=A6=82=E6=9E=9C=E9=80=89=E6=8B=A9=E4=BA=86?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=8C=83=E5=9B=B4=EF=BC=8C=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E6=97=B6=E4=BB=85=E8=8C=83=E5=9B=B4=E5=86=85=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=8A=A5=E5=90=8D=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v/nutz/zhgh/lxy/controller/LxyCommon.java | 24 +++- .../lxy/controller/LxyFghShController.java | 1 + .../lxy/controller/LxyGhbmController.java | 36 ++++++ .../lxy/controller/LxyGrBmController.java | 1 + .../v/nutz/zhgh/lxy/controller/LxyHdCon.java | 24 +++- .../lxy/controller/LxyMetjController.java | 3 + .../java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java | 10 ++ .../resources/static/assets/platform/js/v.js | 8 +- .../views/platform/zgfw/lxy/HdGhbm.html | 17 ++- .../views/platform/zgfw/lxy/HdMange.html | 122 +++++++++++++++++- .../views/platform/zgfw/lxy/HdXghsh.html | 17 ++- 11 files changed, 240 insertions(+), 23 deletions(-) diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java index 578c2ee..58a1a42 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java @@ -9,6 +9,7 @@ import org.apache.shiro.authz.annotation.RequiresAuthentication; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; import org.nutz.dao.entity.Record; +import org.nutz.dao.sql.Sql; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.mvc.annotation.At; @@ -76,8 +77,15 @@ public class LxyCommon { @At @ViReturn - public Object getHdList() { - return lxyHdService.list(Sqls.create("SELECT id,`name` FROM `lxy_hd` ORDER BY hdcjsj desc ")); + public Object getHdList(Integer year) { + Sql sql = Sqls.create("SELECT id,`name` FROM `lxy_hd` $condition"); + Cnd cnd = Cnd.NEW(); + if (year != null) { + cnd.and(new org.nutz.dao.util.cri.Static("YEAR(hdcjsj) = " + year)); + } + cnd.desc("hdcjsj"); + sql.setCondition(cnd); + return lxyHdService.list(sql); } @At @@ -88,8 +96,16 @@ public class LxyCommon { @At @ViReturn - public Object getNowHdList() { - return lxyHdService.list(Sqls.create("SELECT id,`name` FROM `lxy_hd` WHERE now() < bmjzsj ORDER BY hdcjsj desc ")); + public Object getNowHdList(Integer year) { + Sql sql = Sqls.create("SELECT id,`name` FROM `lxy_hd` $condition"); + Cnd cnd = Cnd.NEW(); + cnd.and(new org.nutz.dao.util.cri.Static("now() < bmjzsj")); + if (year != null) { + cnd.and(new org.nutz.dao.util.cri.Static("YEAR(hdcjsj) = " + year)); + } + cnd.desc("hdcjsj"); + sql.setCondition(cnd); + return lxyHdService.list(sql); } } diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java index 1847678..407739d 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyFghShController.java @@ -101,6 +101,7 @@ public class LxyFghShController { cnd.and(new Static("bm.bmzt = 1 ")); cnd.and(new Static("bm.bmlx = 2 ")); + cnd.and(new Static("(hd.activityGroupId IS NULL OR u.id IN (SELECT userId FROM activity_user_scope WHERE groupId = hd.activityGroupId))")); if (Strings.isNotBlank(hdid)) { cnd.and("bm.hdid", "=", hdid); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java index bb1f971..e387b38 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGhbmController.java @@ -16,6 +16,7 @@ import io.v.nutz.sys.services.SysUserService; import io.v.nutz.web.commons.utils.ShiroUtil; import io.v.nutz.zhgh.lxy.model.Lxy_bm; import io.v.nutz.zhgh.lxy.model.Lxy_grxx; +import io.v.nutz.zhgh.lxy.model.Lxy_hd; import io.v.nutz.zhgh.lxy.model.Lxy_mefp; import io.v.nutz.zhgh.lxy.service.LxyBmService; import io.v.nutz.zhgh.lxy.service.LxyGrxxService; @@ -182,6 +183,7 @@ public class LxyGhbmController { Cnd cnd = Cnd.NEW(); cnd.and("member", "=", 1); cnd.and("unit.unionid", "=", unionid); + addActivityScopeCnd(cnd, "u", hdid); cnd.and(new Static("u.id NOT IN ( SELECT bm.userid FROM lxy_bm bm WHERE bm.hdid = '" + hdid + "' OR hdid = '1' ) ")); if (checks != null && checks.length > 0) { for (String check : checks) { @@ -241,6 +243,9 @@ public class LxyGhbmController { return Result.error("未获取到报名数据,请选择人员报名"); } + if (!checkActivityUserScope(bmList.get(0).getHdid(), bmList.stream().map(Lxy_bm::getUserid).collect(Collectors.toList()))) { + return Result.error("存在不在活动人员范围内的人员,请重新选择"); + } String unionId = Vi.getUnionId(); Lxy_mefp meNum = dao.fetch(Lxy_mefp.class, Cnd.where("hdid", "=", bmList.get(0).getHdid()).and("ghid", "=", unionId)); @@ -416,6 +421,7 @@ public class LxyGhbmController { List sourUserIdList = sourceList.stream().map(Lxy_bm::getUserid).collect(Collectors.toList()); String today = cn.hutool.core.date.DateUtil.today(); + Integer activityGroupId = getActivityGroupId(projectId); // 要插入的数据 List bmList = new ArrayList<>(); @@ -440,6 +446,12 @@ public class LxyGhbmController { continue; } + if (activityGroupId != null && dao.count("activity_user_scope", Cnd.where("groupId", "=", activityGroupId).and("userId", "=", user.getId())) == 0) { + temp.setRemark("此人员不在活动人员范围内"); + errorInfos.add(temp); + continue; + } + if (lastJoinUserIds.contains(user.getId())) { temp.setRemark("此教师参加过以往疗休养,请更换人员上报"); errorInfos.add(temp); @@ -506,4 +518,28 @@ public class LxyGhbmController { } } + + private void addActivityScopeCnd(Cnd cnd, String userAlias, String hdid) { + Integer activityGroupId = getActivityGroupId(hdid); + if (activityGroupId != null) { + cnd.and(new Static(userAlias + ".id IN (SELECT userId FROM activity_user_scope WHERE groupId = " + activityGroupId + ")")); + } + } + + private boolean checkActivityUserScope(String hdid, List userIds) { + Integer activityGroupId = getActivityGroupId(hdid); + if (activityGroupId == null) { + return true; + } + List ids = userIds.stream().filter(Strings::isNotBlank).distinct().collect(Collectors.toList()); + if (ids.size() != userIds.size()) { + return false; + } + return dao.count("activity_user_scope", Cnd.where("groupId", "=", activityGroupId).and("userId", "in", ids)) == ids.size(); + } + + private Integer getActivityGroupId(String hdid) { + Lxy_hd hd = lxyHdService.fetch(hdid); + return hd == null ? null : hd.getActivityGroupId(); + } } diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java index 8e472d1..1e77890 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyGrBmController.java @@ -107,6 +107,7 @@ public class LxyGrBmController { cnd.and(new Static("now() < hd.bmjzsj")); cnd.and(new Static("bm.bmlx = 2 ")); + cnd.and(new Static("(hd.activityGroupId IS NULL OR u.id IN (SELECT userId FROM activity_user_scope WHERE groupId = hd.activityGroupId))")); if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin"})) { cnd.and("u.id", "=", ShiroUtil.getPrincipalProperty("id")); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java index 2879d0c..0ad4b74 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyHdCon.java @@ -74,8 +74,12 @@ public class LxyHdCon { CndPlus cnd = CndPlus.create(); cnd.andEx("YEAR(hdcjsj)", "=", year); - cnd.andEx("id", "=", hdcd); - cnd.andEx("id", "=", pastQuota); + if (Strings.isNotBlank(hdcd)) { + cnd.and("id", "=", hdcd); + } + if (Strings.isNotBlank(pastQuota)) { + cnd.and("id", "=", pastQuota); + } if (Strings.isNotBlank(searchName) && Strings.isNotBlank(searchKeyword)) { cnd.where().andLike(searchName, searchKeyword); } @@ -94,9 +98,13 @@ public class LxyHdCon { @AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"}) @ViReturn @RequiresPermissions("zgfw.lxy.hdmange") - public Object doAdd(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, Lxy_mefp[] mefp) throws IOException { + public Object doAdd(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, Lxy_mefp[] mefp, + @Param(value = "activityGroupId", required = false) Integer activityGroupId, + @Param(value = "activityGroupName", required = false) String activityGroupName) throws IOException { hd.setHdcjsj(new Date()); + hd.setActivityGroupId(activityGroupId); + hd.setActivityGroupName(Strings.isBlank(activityGroupName) ? "全部教职工" : activityGroupName); hd = lxyHdService.insert(hd); for (Lxy_mefp lxyMefp : mefp) { @@ -136,8 +144,16 @@ public class LxyHdCon { @AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"}) @ViReturn @RequiresPermissions("zgfw.lxy.hdmange") - public Object doEdit(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, String[] delFiles) throws IOException { + public Object doEdit(Lxy_hd hd, @Param(value = "files",required = false) TempFile[] files, String[] delFiles, + @Param(value = "activityGroupId", required = false) Integer activityGroupId, + @Param(value = "activityGroupName", required = false) String activityGroupName) throws IOException { + hd.setActivityGroupId(activityGroupId); + hd.setActivityGroupName(Strings.isBlank(activityGroupName) ? "全部教职工" : activityGroupName); lxyHdService.updateIgnoreNull(hd); + baseService.dao().update(Lxy_hd.class, + Chain.make("activityGroupId", activityGroupId) + .add("activityGroupName", hd.getActivityGroupName()), + Cnd.where("id", "=", hd.getId())); for (TempFile file : files) { String rid = R.UU32(); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java index 3b94986..996b33f 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyMetjController.java @@ -80,6 +80,7 @@ public class LxyMetjController { if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "SchoolUnionAdmin"})) { cnd.and(new Static("mefp.ghid in " + vi.getMangeUnionStr())); + cnd.and(new Static("(hd.activityGroupId IS NULL OR EXISTS (SELECT 1 FROM activity_user_scope aus LEFT JOIN sys_user u ON u.id = aus.userId WHERE aus.groupId = hd.activityGroupId AND u.unionid = mefp.ghid))")); } if (year != null) { @@ -141,6 +142,7 @@ public class LxyMetjController { "FROM\n" + "\tsys_user u\n" + "\tLEFT JOIN lxy_bm bm ON bm.userid = u.id AND bm.hdid = '" + hdid + "'\n" + + "\tLEFT JOIN lxy_hd hd ON hd.id = '" + hdid + "'\n" + "\tLEFT JOIN sys_unit unit ON u.unitid = unit.id\n" + "\tLEFT JOIN ry_rygl_gr ry ON ry.userid = u.id\n" + "\tLEFT JOIN sys_union un ON unit.unionid = un.id $condition"); @@ -148,6 +150,7 @@ public class LxyMetjController { Cnd cnd = Cnd.NEW(); cnd.and("unit.unionid", "=", unionid); + cnd.and(new Static("(hd.activityGroupId IS NULL OR u.id IN (SELECT userId FROM activity_user_scope WHERE groupId = hd.activityGroupId))")); if (sign == 0) { cnd.and(new Static("u.id not in (SELECT bm.userid from lxy_bm bm WHERE bm.bmlx=2 AND bm.hdid = '" + hdid + "')")); diff --git a/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java b/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java index 2050b79..8dc207c 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/model/Lxy_hd.java @@ -54,6 +54,16 @@ public class Lxy_hd { @ColDefine(type = ColType.VARCHAR, width = 30) private String hdcd; + @Column + @Comment("面向对象") + @ColDefine(type = ColType.INT) + private Integer activityGroupId; + + @Column + @Comment("面向对象名称") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String activityGroupName; + @Column @Comment("活动注意事项") @ColDefine(type = ColType.TEXT) diff --git a/src/main/resources/static/assets/platform/js/v.js b/src/main/resources/static/assets/platform/js/v.js index 200a4f9..2692196 100644 --- a/src/main/resources/static/assets/platform/js/v.js +++ b/src/main/resources/static/assets/platform/js/v.js @@ -305,8 +305,8 @@ const getGzzllx = async () => { * 获取疗休养活动 * @returns {Promise<*>} */ -const getLxyHd = async () => { - const { data } = await $.get("/platform/zgfw/lxy/common/getHdList") +const getLxyHd = async (year) => { + const { data } = await $.get("/platform/zgfw/lxy/common/getHdList", { year }) return data } const getlxyHdCd = async () => { @@ -314,8 +314,8 @@ const getlxyHdCd = async () => { return data } -const getNowLxyHd = async () => { - const { data } = await $.get("/platform/zgfw/lxy/common/getNowHdList") +const getNowLxyHd = async (year) => { + const { data } = await $.get("/platform/zgfw/lxy/common/getNowHdList", { year }) return data } diff --git a/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html b/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html index 2cf1be0..511a387 100644 --- a/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html +++ b/src/main/resources/views/platform/zgfw/lxy/HdGhbm.html @@ -48,7 +48,13 @@ layout("/layouts/platform.html"){
- +
@@ -750,6 +756,11 @@ display: -webkit-box; const { data } = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", { id }) return data }, + async hdSearch() { + this.lxyHd = await getNowLxyHd(this.pageForm.year) + this.pageForm.hdid = this.lxyHd.length > 0 ? this.lxyHd[0].id : "" + this.doSearch() + }, async openViewXx(row) { this.viewData = await this.getLxyBmInfo(row.id) this.pageForm.hdid = row.hdid @@ -831,8 +842,8 @@ display: -webkit-box; }, async created() { this.unions = await getUnions() - this.lxyHd = await getNowLxyHd() - this.pageForm.hdid = this.lxyHd[0].id + this.lxyHd = await getNowLxyHd(this.pageForm.year) + this.pageForm.hdid = this.lxyHd.length > 0 ? this.lxyHd[0].id : "" this.pageData() this.unionList = await getUnions() this.nationList = nation diff --git a/src/main/resources/views/platform/zgfw/lxy/HdMange.html b/src/main/resources/views/platform/zgfw/lxy/HdMange.html index b61c3ad..43b5496 100644 --- a/src/main/resources/views/platform/zgfw/lxy/HdMange.html +++ b/src/main/resources/views/platform/zgfw/lxy/HdMange.html @@ -43,12 +43,26 @@ layout("/layouts/platform.html"){
- +
-
+ +
+
- 导入 - 报名 + 导入 + 报名 @@ -589,6 +589,12 @@ display: -webkit-box; "file-import": httpVueLoader("/components/plugins/FileImport.vue") }, methods: { + isSignUpTime(row) { + const now = new Date().getTime() + const bmkssj = moment(row.bmkssj.valueOf()) + const bmjzsj = moment(row.bmjzsj.valueOf()) + return bmkssj <= now && now < bmjzsj + }, openImport() { this.importDialog = true this.$nextTick(() => {