This commit is contained in:
Paidax
2024-10-21 14:59:28 +08:00
parent 5f028efbe0
commit ef90e437f5
7 changed files with 55 additions and 10 deletions
@@ -9,6 +9,7 @@ import io.v.nutz.annontation.ViReturn;
import io.v.nutz.base.utils.MsgApi;
import io.v.nutz.base.utils.Vi;
import io.v.nutz.lxy.model.Lxy_bm;
import io.v.nutz.lxy.model.Lxy_grxx;
import io.v.nutz.lxy.service.LxyGrxxService;
import io.v.nutz.lxy.service.LxyHdService;
import io.v.nutz.util.ShiroUtil;
@@ -16,11 +17,13 @@ import io.v.nutz.util.ViTool;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.nutz.aop.interceptor.ioc.TransAop;
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.dao.util.cri.Static;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
@@ -196,4 +199,17 @@ public class LxyHdTjController {
});
return null;
}
@At
@ViReturn
@Aop(TransAop.READ_COMMITTED)
@RequiresPermissions("zgfw.lxy.hdtj")
public Object doDelete(String id) {
Lxy_grxx grxx = lxyGrxxService.fetch(id);
lxyGrxxService.dao().clear(Lxy_bm.class, Cnd.where("hdid", "=", grxx.getHdid())
.and("userid", "=", grxx.getUserid()));
lxyGrxxService.delete(id);
return null;
}
}
@@ -103,7 +103,7 @@ public class MsgNotifyController {
@At
@ViReturn
@RequiresAuthentication
public Object pageData(PageForm pageForm, String[] users) {
public Object pageData(PageForm pageForm, Integer isMember, String[] users) {
Sql sql = Sqls.create("""
SELECT
@@ -114,11 +114,14 @@ public class MsgNotifyController {
unitname unitName,
mobile,
unionname unionName
from user
from user
$condition
""");
CndPlus cnd = CndPlus.create();
cnd.andExcludeEmpty("member", "=", 1);
// cnd.andExcludeEmpty("member", "=", 1);
if (isMember != null) {
cnd.and("member", "=", isMember);
}
if (users.length > 0) {
cnd.andExcludeEmpty("id", "not in", users);
}
@@ -40,7 +40,7 @@ public class WakesHomeDeclarationApplyController {
@ViReturn
@RequiresPermissions("wakeshome.declaration.apply")
public Object doSave(WakesHomeApply wakesHomeApply) {
wakesHomeApply.setState("10020");
wakesHomeApply.setState("10000");
if (wakesHomeApply != null) {
if (StrUtil.isNotBlank(wakesHomeApply.getId())) {
wakesHomeApplyService.update(wakesHomeApply);
@@ -181,6 +181,15 @@
</el-input>
</div>
<div class="btn-group tool-button mt5">
<el-select v-model="pageForm.isMember" @change="doSearch()"
placeholder="是否会员" clearable
style="width: 200px;margin-right: 5px">
<el-option label="全部教工" value=""></el-option>
<el-option label="是会员" value="1"></el-option>
<el-option label="非会员" value="0"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-button icon="el-icon-search" type="primary" @click="doSearch">搜索</el-button>
</div>
@@ -272,6 +281,7 @@ module.exports = {
pageForm1: {
groupId: "",
searchName: 'u.username',
isMember: 1,
pageNumber: 1,
pageSize: 5,
totalCount: 0,
@@ -467,4 +477,4 @@ module.exports = {
}
}
}
</script>
</script>
@@ -205,7 +205,7 @@ layout("/layouts/platform.html"){
window.location.href = '/platform/msgNotify/send?notifyId=' + id + "&hold=" + hold
}*/
const {id, hold} = row
window.location.href = '/platform/msgNotify/send?notifyId=' + id + "&hold=" + hold
window.location.href = '/platform/msgNotify/send?notifyId=' + id + "&hold=" + false
},
openView(row) {
const {id, hold} = row
@@ -229,4 +229,4 @@ layout("/layouts/platform.html"){
</script>
<!--#
}
#-->
#-->
@@ -97,10 +97,11 @@ layout("/layouts/platform.html"){
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="120px">
width="180px">
<template scope="scope">
<el-button @click="openView(scope.row)" size="mini" type="primary">查看
</el-button>
<el-button @click="openView(scope.row)" size="mini" type="primary">查看</el-button>
<el-button v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
@click="doDelete(scope.row)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -260,6 +261,21 @@ display: -webkit-box;
}
},
methods: {
async doDelete(row) {
const confirm = await this.$confirm('确定要删除该报名人员吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm !== "confirm") return
const resp = await $.post('/platform/zgfw/lxy/hdtj/doDelete', {id:row.id})
if (resp.code === 0) {
this.pageData()
this.$message.success(resp.msg)
} else {
this.$message.warning(resp.msg)
}
},
async confirmMsg(val) {
const confirm = await this.$confirm('确定要给报名人员发送消息吗', '提示', {
confirmButtonText: '确定',