diff --git a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealAcceptController.java b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealAcceptController.java index 7d841a3..3528389 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealAcceptController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealAcceptController.java @@ -56,7 +56,7 @@ public class AppealAcceptController { Sql sql = listSql(); Cnd cnd = taskCondition("appealAccept", "受理", approval); if (StrUtil.isNotBlank(searchKeyword)) { - cnd.where().andLike("info.title", searchKeyword); + cnd.and("info.title", "like", "%" + searchKeyword + "%"); } cnd.andEX("info.appealTypeId", "=", appealTypeId); cnd.andEX("YEAR(info.applyDate)", "=", year); diff --git a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealExecuteController.java b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealExecuteController.java index 809cfab..82fa51a 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealExecuteController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealExecuteController.java @@ -56,7 +56,7 @@ public class AppealExecuteController { Sql sql = listSql(); Cnd cnd = taskCondition("appealExecute", "执行", approval); if (StrUtil.isNotBlank(searchKeyword)) { - cnd.where().andLike("info.title", searchKeyword); + cnd.and("info.title", "like", "%" + searchKeyword + "%"); } cnd.andEX("info.appealTypeId", "=", appealTypeId); cnd.andEX("YEAR(info.applyDate)", "=", year); diff --git a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealMineController.java b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealMineController.java index 8acaf06..d9b718f 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealMineController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealMineController.java @@ -57,10 +57,10 @@ public class AppealMineController { LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10 LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10 $condition - """); + """); Cnd cnd = Cnd.where("info.userId", "=", SecurityUtil.getUserId()); if (StrUtil.isNotBlank(searchKeyword)) { - cnd.where().andLike("info.title", searchKeyword); + cnd.and("info.title", "like", "%" + searchKeyword + "%"); } cnd.andEX("info.appealTypeId", "=", appealTypeId); cnd.andEX("YEAR(info.applyDate)", "=", year); diff --git a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealQueryController.java b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealQueryController.java index 164e74d..c691ad0 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealQueryController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealQueryController.java @@ -94,7 +94,7 @@ public class AppealQueryController { String defendantUnitId, Integer year) { Cnd cnd = Cnd.NEW(); if (StrUtil.isNotBlank(searchKeyword)) { - cnd.where().andLike("info.title", searchKeyword); + cnd.and("info.title", "like", "%" + searchKeyword + "%"); } cnd.andEX("info.appealTypeId", "=", appealTypeId); cnd.andEX("info.state", "=", state); diff --git a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealTypeController.java b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealTypeController.java index e3982af..73ce7fd 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealTypeController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/appeal/controller/AppealTypeController.java @@ -37,7 +37,7 @@ public class AppealTypeController { public Result pageData(Integer pageNumber, Integer pageSize, String name) { Cnd cnd = Cnd.NEW(); if (StrUtil.isNotBlank(name)) { - cnd.where().andLike("name", name); + cnd.and("name", "like", "%" + name + "%"); } cnd.asc("sort").desc("createdAt"); Pagination page = appealTypeService.listPage(pageNumber, pageSize, cnd); diff --git a/src/main/resources/views/platform/zhgh/democratic/appeal/accept/index.html b/src/main/resources/views/platform/zhgh/democratic/appeal/accept/index.html index d2fe248..d035cb5 100644 --- a/src/main/resources/views/platform/zhgh/democratic/appeal/accept/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/appeal/accept/index.html @@ -78,10 +78,10 @@ layout("/layouts/platform.html"){ - + - + @@ -128,6 +128,9 @@ layout("/layouts/platform.html"){ this.$axios.post("/platform/appeal/accept/queryTask", {taskId: row.taskId}).then((res) => { if (res.code === 0) { this.formData = res.data || row + if (!this.formData.decisionDate) { + this.$set(this.formData, "decisionDate", this.$moment().format("YYYY-MM-DD")) + } this.dialogVisible = true } }) @@ -146,7 +149,7 @@ layout("/layouts/platform.html"){ } }) } - if (submitType === 1) { + if (submitType !== 6) { this.$refs.formRef.validate((valid) => { if (valid) submit() }) @@ -154,6 +157,14 @@ layout("/layouts/platform.html"){ submit() } }, + validateRichText(rule, value, callback) { + const text = (value || "").replace(/<[^>]+>/g, "").replace(/ /g, "").trim() + if (!text) { + callback(new Error(rule.message)) + return + } + callback() + }, onRevoke(row) { this.$confirm("您确定要撤回吗?", "提示", { confirmButtonText: "确定", diff --git a/src/main/resources/views/platform/zhgh/democratic/appeal/common/info.js b/src/main/resources/views/platform/zhgh/democratic/appeal/common/info.js index f1bdf44..33f287c 100644 --- a/src/main/resources/views/platform/zhgh/democratic/appeal/common/info.js +++ b/src/main/resources/views/platform/zhgh/democratic/appeal/common/info.js @@ -6,20 +6,23 @@ const APPEAL_INFO = {
申诉基础信息

{{ viewData.title }}

- {{ viewData.userName }}({{ viewData.loginName }}) - {{ viewData.unitName }} - {{ viewData.mobile }} - {{ viewData.sex }} - {{ viewData.birthday }} - {{ viewData.political }} - {{ viewData.appealTypeName }} - {{ viewData.defendantUnitName }} - {{ viewData.applyDate }} + {{ text(viewData.userName) }} + {{ text(viewData.sex) }} + {{ text(viewData.birthday) }} + {{ text(viewData.political) }} + {{ text(viewData.loginName) }} + {{ text(viewData.unitName) }} + {{ text(viewData.positionName) }} + {{ text(viewData.mobile) }} + {{ text(viewData.applyDate) }} + {{ text(viewData.address) }} + {{ text(viewData.appealTypeName) }} {{ viewData.state || '草稿' }} - {{ viewData.positionName }} - {{ viewData.address }} + {{ text(viewData.defendantUnitName) }} + {{ text(viewData.defendantAddress) }} + {{ text(viewData.defendantContact) }}
@@ -29,7 +32,7 @@ const APPEAL_INFO = {
- + @@ -118,6 +121,9 @@ const APPEAL_INFO = { OTHER: "其他" } return map[value] || value || "" + }, + text(value) { + return value || "-" } } } diff --git a/src/main/resources/views/platform/zhgh/democratic/appeal/execute/index.html b/src/main/resources/views/platform/zhgh/democratic/appeal/execute/index.html index f382444..1589512 100644 --- a/src/main/resources/views/platform/zhgh/democratic/appeal/execute/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/appeal/execute/index.html @@ -61,7 +61,7 @@ layout("/layouts/platform.html"){ - + @@ -125,6 +125,14 @@ layout("/layouts/platform.html"){ }) }) }, + validateRichText(rule, value, callback) { + const text = (value || "").replace(/<[^>]+>/g, "").replace(/ /g, "").trim() + if (!text) { + callback(new Error(rule.message)) + return + } + callback() + }, onRevoke(row) { this.$confirm("您确定要撤回吗?", "提示", { confirmButtonText: "确定", diff --git a/src/main/resources/views/platform/zhgh/democratic/appeal/type/index.html b/src/main/resources/views/platform/zhgh/democratic/appeal/type/index.html index c72a507..85ac1b4 100644 --- a/src/main/resources/views/platform/zhgh/democratic/appeal/type/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/appeal/type/index.html @@ -7,7 +7,7 @@ layout("/layouts/platform.html"){ - + @@ -40,7 +40,7 @@ layout("/layouts/platform.html"){ - + diff --git a/src/main/resources/views/platform/zhgh/democratic/appeal/write/index.html b/src/main/resources/views/platform/zhgh/democratic/appeal/write/index.html index c500e56..9299c8e 100644 --- a/src/main/resources/views/platform/zhgh/democratic/appeal/write/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/appeal/write/index.html @@ -12,85 +12,87 @@ layout("/layouts/platform.html"){ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + + + + + + + + - - - + - + - + - + - - - @@ -103,7 +105,7 @@ layout("/layouts/platform.html"){ - + @@ -125,17 +127,60 @@ layout("/layouts/platform.html"){ taskId: null, formData: {}, formRules: { + sex: [{required: true, message: "请输入性别", trigger: "blur"}], + birthday: [{required: true, message: "请选择出生年月", trigger: "change"}], + political: [{required: true, message: "请输入政治面貌", trigger: "blur"}], + positionName: [{required: true, message: "请输入岗位", trigger: "blur"}], + mobile: [ + {required: true, message: "请输入联系电话", trigger: "blur"}, + {validator: this.validatePhone, trigger: "blur"} + ], + applyDate: [{required: true, message: "请选择申请日期", trigger: "change"}], + address: [{required: true, message: "请输入住址", trigger: "blur"}], appealTypeId: [{required: true, message: "请选择申诉类型", trigger: "change"}], defendantUnitId: [{required: true, message: "请选择被申诉单位", trigger: "change"}], + defendantAddress: [{required: true, message: "请输入被申诉单位地址", trigger: "blur"}], + defendantContact: [ + {required: true, message: "请输入被申诉单位电话", trigger: "blur"}, + {validator: this.validatePhone, trigger: "blur"} + ], title: [{required: true, message: "请输入申诉标题", trigger: "blur"}], - appealMatter: [{required: true, message: "请输入申诉事项", trigger: "blur"}], - reason: [{required: true, message: "请输入申诉理由", trigger: "blur"}], - request: [{required: true, message: "请输入申诉要求", trigger: "blur"}], - signature: [{required: true, message: "请完成申诉人签名", trigger: ["blur", "change"]}] + appealMatter: [{required: true, validator: this.validateRichText, message: "请输入申诉事项", trigger: ["blur", "change"]}], + reason: [{required: true, validator: this.validateRichText, message: "请输入申诉理由", trigger: ["blur", "change"]}], + request: [{required: true, validator: this.validateRichText, message: "请输入申诉要求", trigger: ["blur", "change"]}], + signature: [{required: true, message: "请完成申诉人签名", trigger: ["blur", "change"]}], + files: [{required: true, validator: this.validateFiles, message: "请上传申诉材料附件", trigger: "change"}] } } }, methods: { + validatePhone(rule, value, callback) { + if (!value) { + callback() + return + } + const reg = /^((1[3-9]\d{9})|(0\d{2,3}-?\d{7,8})|(\d{6,12}))$/ + if (!reg.test(value)) { + callback(new Error("请输入正确的联系电话")) + return + } + callback() + }, + validateRichText(rule, value, callback) { + const text = (value || "").replace(/<[^>]+>/g, "").replace(/ /g, "").trim() + if (!text) { + callback(new Error(rule.message)) + return + } + callback() + }, + validateFiles(rule, value, callback) { + if (!value || !value.length) { + callback(new Error(rule.message)) + return + } + callback() + }, queryParam(name) { return new URLSearchParams(window.location.search).get(name) },