diff --git a/src/main/java/com/budwk/app/sys/controller/SysUnionController.java b/src/main/java/com/budwk/app/sys/controller/SysUnionController.java
index e6607b1..8782a3f 100644
--- a/src/main/java/com/budwk/app/sys/controller/SysUnionController.java
+++ b/src/main/java/com/budwk/app/sys/controller/SysUnionController.java
@@ -556,6 +556,28 @@ public class SysUnionController {
return Result.success();
}
+ @At
+ @ApiOperation("修改分工会干部届次")
+ @SaCheckPermission("sys.manager.union.branchOfficer")
+ public Result updateBranchUnionUserJ(String id, String j) {
+ if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) {
+ return Result.error("仅超级管理员可编辑");
+ }
+ if (StrUtil.isBlank(id)) {
+ return Result.error("请选择干部记录");
+ }
+ Sys_union_cadre unionCadre = dao.fetch(Sys_union_cadre.class, id);
+ if (Lang.isEmpty(unionCadre)) {
+ return Result.error("未找到对应干部记录");
+ }
+ if (StrUtil.isNotBlank(j) && sysDictService.getSubListByCode("TEACHER_CONGRESS_J").stream()
+ .noneMatch(item -> j.equals(item.getCode()))) {
+ return Result.error("请选择有效届次");
+ }
+ dao.update(Sys_union_cadre.class, Chain.make("j", StrUtil.isBlank(j) ? "" : j), Cnd.where("id", "=", id));
+ return Result.success();
+ }
+
@At
@ApiOperation("分工会干部离任")
@SaCheckPermission("sys.manager.union.branchOfficer")
diff --git a/src/main/resources/views/platform/sys/union/branchUnionManage.js b/src/main/resources/views/platform/sys/union/branchUnionManage.js
index 03b4bbb..295ea60 100644
--- a/src/main/resources/views/platform/sys/union/branchUnionManage.js
+++ b/src/main/resources/views/platform/sys/union/branchUnionManage.js
@@ -19,7 +19,7 @@ const branchUnionManage = {
-
+
编辑
删除
diff --git a/src/main/resources/views/platform/sys/union/branchUnionUserManage.js b/src/main/resources/views/platform/sys/union/branchUnionUserManage.js
index 2ee8ce8..0019131 100644
--- a/src/main/resources/views/platform/sys/union/branchUnionUserManage.js
+++ b/src/main/resources/views/platform/sys/union/branchUnionUserManage.js
@@ -50,15 +50,17 @@ const branchUnionUserManage = {
-
+
{{ row.jName || row.j }}
-
-
+
+
+ 编辑
确 定
+
+
+
+
+
+
+
+
@@ -147,6 +160,11 @@ const branchUnionUserManage = {
formData: {},
roleOptions: [],
partySecretaryUnitOptions: [],
+ editDialogVisible: false,
+ editForm: {
+ id: "",
+ j: ""
+ },
leaveDialogVisible: false,
leaveForm: {
id: "",
@@ -244,6 +262,25 @@ const branchUnionUserManage = {
this.formData = {}
})
},
+ openEdit(row) {
+ this.editForm = {
+ id: row.id,
+ j: row.j || ""
+ }
+ this.editDialogVisible = true
+ },
+ doEdit() {
+ $.post("/platform/sys/union/updateBranchUnionUserJ", this.editForm, (res) => {
+ if (res.code === 0) {
+ this.editDialogVisible = false
+ this.$message.success(res.msg)
+ this.loadUsedJCodes()
+ this.doSearch()
+ } else {
+ this.$message.error(res.msg)
+ }
+ })
+ },
openLeave(row) {
this.leaveForm = {
id: row.id,
@@ -252,10 +289,6 @@ const branchUnionUserManage = {
this.leaveDialogVisible = true
},
doSubmit() {
- if (!this.formData.j) {
- this.$message.error("请选择届数")
- return
- }
if (this.isUnitPartySecretary() && (!this.formData.unitIds || this.formData.unitIds.length === 0)) {
this.$message.error("请选择所属单位")
return
diff --git a/src/main/resources/views/platform/sys/union/index.html b/src/main/resources/views/platform/sys/union/index.html
index 7c4de34..573822e 100644
--- a/src/main/resources/views/platform/sys/union/index.html
+++ b/src/main/resources/views/platform/sys/union/index.html
@@ -164,6 +164,7 @@ layout("/layouts/platform.html"){
new Vue({
el: "#app",
+ store,
components: {
"sys-union-branch-union-manage": branchUnionManage,
"sys-union-school-union-user-manage": schoolUnionUserManage,
diff --git a/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js b/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js
index c8e05d1..eefaf9c 100644
--- a/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js
+++ b/src/main/resources/views/platform/sys/union/schoolUnionUserManage.js
@@ -32,7 +32,7 @@ const schoolUnionUserManage = {
-
+
@@ -74,11 +74,13 @@ const schoolUnionUserManage = {
})
},
doSubmit() {
- $.post("/platform/sys/union/insertSchoolUnionUserRole", this.formData).then((res) => {
+ $.post("/platform/sys/union/insertSchoolUnionUserRole", this.formData, (res) => {
if (res.code === 0) {
this.dialogFormVisible = false
this.$message.success(res.msg)
this.doSearch()
+ } else {
+ this.$message.error(res.msg)
}
})
},