Compare commits
4
Commits
16ea56524e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d584b66f7 | ||
|
|
a20c632093 | ||
|
|
443e76e7a1 | ||
|
|
d24fba03da |
+6
-4
@@ -92,10 +92,12 @@ public class WelfareMemberEscalationController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unionId", "=", Vi.getUnionId());
|
||||
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.and("member","=",1);
|
||||
seg.or(Cnd.exps("userState","=","退休").and(Cnd.exps("retiredTime",">=","2024-06-01").and("retiredTime","<","2024-12-30")));
|
||||
cnd.and(seg);
|
||||
// SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
// seg.and("member","=",1);
|
||||
// seg.or(Cnd.exps("userState","=","退休").and(Cnd.exps("retiredTime",">=","2024-06-01").and("retiredTime","<","2024-12-30")));
|
||||
// cnd.and(seg);
|
||||
|
||||
cnd.and("member", "=", 1);
|
||||
|
||||
cnd.asc("userState").asc("unitname").asc("unionname");
|
||||
// cnd.and("userState", "=", "在职");
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
@@ -117,6 +118,10 @@ public class CondolenceVcrCon {
|
||||
&& !Integer.valueOf(3).equals(pass)) {
|
||||
return Result.error("请选择审批意见!");
|
||||
}
|
||||
String sign = review == null ? null : review.getSign();
|
||||
if (Strings.isBlank(sign) || !sign.startsWith("data:image/") || !sign.contains(";base64,")) {
|
||||
return Result.error("签字数据异常,请重新签字!");
|
||||
}
|
||||
review.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
review.setUsername(ShiroUtil.getPrincipalProperty("username").toString());
|
||||
review.setTime(DateUtil.getDate());
|
||||
|
||||
@@ -237,6 +237,9 @@ layout("/layouts/platform.html"){
|
||||
'info': httpVueLoader('/components/condolence/Info.vue?v=1.0.2'),
|
||||
},
|
||||
methods: {
|
||||
isValidSign(sign) {
|
||||
return typeof sign === 'string' && /^data:image\/(png|jpeg|jpg);base64,/i.test(sign)
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
@@ -247,12 +250,18 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async openReview(row) {
|
||||
const {id} = row
|
||||
const cachedSign = localStorage.getItem('signature')
|
||||
if (cachedSign && !this.isValidSign(cachedSign)) {
|
||||
// 仅清理当前浏览器中的异常签字缓存,避免 [object Object] 再次提交。
|
||||
localStorage.removeItem('signature')
|
||||
}
|
||||
|
||||
this.formData = {
|
||||
id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
time: moment().format('YYYY-MM-DD'),
|
||||
pass: null,
|
||||
sign: '',
|
||||
}
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
@@ -268,8 +277,10 @@ layout("/layouts/platform.html"){
|
||||
this.formData.pass = pass
|
||||
}
|
||||
// 签字由自定义组件回写,审核提交前单独判断,避免 Element 表单漏过空签字。
|
||||
if (!this.formData.sign) {
|
||||
this.$message.warning('请签字')
|
||||
if (!this.isValidSign(this.formData.sign)) {
|
||||
localStorage.removeItem('signature')
|
||||
this.$set(this.formData, 'sign', '')
|
||||
this.$message.warning('签字数据异常,请重新签字')
|
||||
return
|
||||
}
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
|
||||
Reference in New Issue
Block a user