diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java
index 604a2745..115f5810 100644
--- a/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java
+++ b/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java
@@ -32,6 +32,7 @@ import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
+import java.util.Date;
import java.util.List;
@IocBean
@@ -80,7 +81,7 @@ public class CadreTrainingSignUpController {
@ApiOperation("提交申请")
@SaCheckPermission(value = {"cadreTraining.branchUnionSignUp", "h5.cadreTraining.branchUnionSignUp"}, mode = SaMode.OR)
public Result submit(@Param("data") CadreTrainingSignUp cadreTrainingSignUp) {
- if (StrUtil.isBlank(cadreTrainingSignUp.getId())) cadreTrainingSignUp.setApplyTime(DateUtil.now());
+ if (StrUtil.isBlank(cadreTrainingSignUp.getId())) cadreTrainingSignUp.setApplyTime(new Date());
dao.insertOrUpdate(cadreTrainingSignUp);
// 开启流程实例
diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/model/CadreTrainingSignUp.java b/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/model/CadreTrainingSignUp.java
index 5d49f5af..53b53730 100644
--- a/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/model/CadreTrainingSignUp.java
+++ b/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/model/CadreTrainingSignUp.java
@@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
+import java.util.Date;
import java.util.List;
@Data
@@ -80,8 +81,8 @@ public class CadreTrainingSignUp extends BaseModel {
@Column
@Comment("报名时间")
- @ColDefine(type = ColType.VARCHAR, width = 100)
- private String applyTime;
+ @ColDefine(type = ColType.DATETIME)
+ private Date applyTime;
@Column
@Comment("备注")
diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseApplyController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseApplyController.java
index 9269b096..711ee84c 100644
--- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseApplyController.java
+++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/controller/UnionReimburseApplyController.java
@@ -84,7 +84,7 @@ public class UnionReimburseApplyController {
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
@SLog(type = "unionReimburse", tag = "工会报销-报销申请", msg = "保存报销申请")
public Result save(@Param("data") UnionReimburse unionReimburse) {
- if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
+ if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(new Date());
dao.insertOrUpdate(unionReimburse);
return Result.success();
}
@@ -93,7 +93,7 @@ public class UnionReimburseApplyController {
@ApiOperation("提交申请")
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
public Result submit(@Param("data") UnionReimburse unionReimburse) {
- if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
+ if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(new Date());
dao.insertOrUpdate(unionReimburse);
// 开启流程实例
@@ -115,7 +115,7 @@ public class UnionReimburseApplyController {
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
public Result submitAgain(@Param("data") UnionReimburse unionReimburse, @Param("taskId") Long taskId) {
- if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
+ if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(new Date());
dao.insertOrUpdate(unionReimburse);
diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java
index f46a612a..58b3c7be 100644
--- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java
+++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java
@@ -50,7 +50,7 @@ public class UnionReimburseFundSourceInterceptor implements FlowInterceptor {
detail.setAdjustReason(unionReimburse.getReimburseProject());
detail.setProjectName(unionReimburse.getActivityName());
detail.setActivityNumber(unionReimburse.getActivityNumber());
- detail.setActivityTime(unionReimburse.getCreateTime());
+ detail.setActivityTime(String.valueOf(unionReimburse.getCreateTime()));
detail.setOutlayManageId(outlayManageSchool.getId());
dao.insert(detail);
@@ -74,7 +74,7 @@ public class UnionReimburseFundSourceInterceptor implements FlowInterceptor {
detail.setAdjustReason(unionReimburse.getReimburseProject());
detail.setProjectName(unionReimburse.getActivityName());
detail.setActivityNumber(unionReimburse.getActivityNumber());
- detail.setActivityTime(unionReimburse.getCreateTime());
+ detail.setActivityTime(String.valueOf(unionReimburse.getCreateTime()));
detail.setOutlayManageId(outlayManageUnion.getId());
dao.insert(detail);
@@ -98,7 +98,7 @@ public class UnionReimburseFundSourceInterceptor implements FlowInterceptor {
detail.setAdjustReason(unionReimburse.getReimburseProject());
detail.setProjectName(unionReimburse.getActivityName());
detail.setActivityNumber(unionReimburse.getActivityNumber());
- detail.setActivityTime(unionReimburse.getCreateTime());
+ detail.setActivityTime(String.valueOf(unionReimburse.getCreateTime()));
detail.setOutlayManageId(outlayManageClub.getId());
dao.insert(detail);
diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java
index 1785783c..04bc72c3 100644
--- a/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java
+++ b/src/main/java/com/budwk/app/zhgh/dayofficework/unionReimburse/model/UnionReimburse.java
@@ -172,7 +172,7 @@ public class UnionReimburse extends BaseModel {
@Column
@Comment("慰问时间")
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATETIME)
private Date condolenceTime;
@@ -198,7 +198,7 @@ public class UnionReimburse extends BaseModel {
@Column
@Comment("活动时间")
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATETIME)
private Date activityTime;
@Column
@@ -222,7 +222,7 @@ public class UnionReimburse extends BaseModel {
@Column
@Comment("申请时间")
- @ColDefine(type = ColType.VARCHAR, width = 30)
- private String createTime;
+ @ColDefine(type = ColType.DATETIME)
+ private Date createTime;
}
diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java
index 4f230fdc..aa5370c1 100644
--- a/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java
+++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/dsznfmtx/models/Dsznfmtx.java
@@ -6,6 +6,7 @@ import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.io.Serializable;
import java.util.Date;
@@ -24,11 +25,10 @@ import java.util.List;
@Comment("独生子女父母退休")
public class Dsznfmtx extends BaseModel implements Serializable {
- @Column
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
- @Prev(els = {@EL("uuid()")})
+ @PrevInsert(uu32 = true)
private String id;
@Column
@@ -47,7 +47,7 @@ public class Dsznfmtx extends BaseModel implements Serializable {
private String sex;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("出生年月")
private Date birthday;
@@ -77,7 +77,7 @@ public class Dsznfmtx extends BaseModel implements Serializable {
private String unitName;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("退休时间")
private Date retireTime;
@@ -97,17 +97,17 @@ public class Dsznfmtx extends BaseModel implements Serializable {
private String loverUnitName;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("结婚日期")
private Date marryTime;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("子女出生日期")
private Date childrenBirthday;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("领独生子女证时间")
private Date getCertificateTime;
@@ -117,7 +117,7 @@ public class Dsznfmtx extends BaseModel implements Serializable {
private String bonus;
@Column
- @ColDefine(type = ColType.DATETIME,width = 50)
+ @ColDefine(type = ColType.DATETIME)
@Comment("申请时间")
private Date applyTime;
diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/models/MaternityLeave.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/models/MaternityLeave.java
index 78868b40..4befb2ba 100644
--- a/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/models/MaternityLeave.java
+++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/maternityLeave/models/MaternityLeave.java
@@ -1,9 +1,11 @@
package com.budwk.app.zhgh.staffbenefit.maternityLeave.models;
+import com.aspose.slides.internal.og.all;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.io.Serializable;
import java.util.Date;
@@ -21,11 +23,10 @@ import java.util.Date;
@Comment("生育休假")
public class MaternityLeave extends BaseModel implements Serializable {
- @Column
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
- @Prev(els = {@EL("uuid()")})
+ @PrevInsert(uu32 = true)
private String id;
@Column
@@ -49,7 +50,7 @@ public class MaternityLeave extends BaseModel implements Serializable {
private String nation;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("出生年月")
private Date birthday;
@@ -99,7 +100,7 @@ public class MaternityLeave extends BaseModel implements Serializable {
private String loverNation;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("出生年月")
private Date loverBirthday;
@@ -154,22 +155,22 @@ public class MaternityLeave extends BaseModel implements Serializable {
private String leaveDays;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("子女出生日期")
private Date childrenBirthday;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("休假开始时间")
private Date startTime;
@Column
- @ColDefine(type = ColType.DATETIME, width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("休假结束时间")
private Date endTime;
@Column
- @ColDefine(type = ColType.VARCHAR,width = 50)
+ @ColDefine(type = ColType.DATETIME)
@Comment("填写时间")
private Date applyTime;
diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/mutualInsurance/model/MutualInsuranceUserInfo.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/mutualInsurance/model/MutualInsuranceUserInfo.java
index dfc549bc..837c581d 100644
--- a/src/main/java/com/budwk/app/zhgh/staffbenefit/mutualInsurance/model/MutualInsuranceUserInfo.java
+++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/mutualInsurance/model/MutualInsuranceUserInfo.java
@@ -140,7 +140,7 @@ public class MutualInsuranceUserInfo extends BaseModel implements Serializable {
@Column
@Comment("出险时间")
- @ColDefine(type = ColType.DATE)
+ @ColDefine(type = ColType.DATETIME)
private Date dangerTime;
@Column
diff --git a/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/controller/ChildManageWriteController.java b/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/controller/ChildManageWriteController.java
index fdee6cb2..0aaed48f 100644
--- a/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/controller/ChildManageWriteController.java
+++ b/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/controller/ChildManageWriteController.java
@@ -29,6 +29,8 @@ import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
+import java.util.Date;
+
@IocBean
@At("/platform/childManage/write")
@Ok("json:full")
@@ -58,7 +60,7 @@ public class ChildManageWriteController {
@SaCheckPermission(value = {"childManage.write", "h5.childManage.write"}, mode = SaMode.OR)
@SLog(tag = "子女信息管理-信息填写", msg = "保存子女信息")
public Result save(@Param("data") ChildManage childManage) {
- if(StrUtil.isBlank(childManage.getId())) childManage.setApplyTime(DateUtil.now());
+ if(StrUtil.isBlank(childManage.getId())) childManage.setApplyTime(new Date());
dao.insertOrUpdate(childManage);
return Result.success();
}
diff --git a/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/models/ChildManage.java b/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/models/ChildManage.java
index 310440a4..555c6593 100644
--- a/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/models/ChildManage.java
+++ b/src/main/java/com/budwk/app/zhgh/staffmanage/childManage/models/ChildManage.java
@@ -6,8 +6,10 @@ import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
+import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.io.Serializable;
+import java.util.Date;
import java.util.List;
/**
@@ -31,7 +33,7 @@ public class ChildManage extends BaseModel implements Serializable {
@Name
@Comment("id")
@ColDefine(type = ColType.VARCHAR, width = 32)
- @Prev(els = {@EL("uuid()")})
+ @PrevInsert(uu32 = true)
private String id;
@@ -137,9 +139,9 @@ public class ChildManage extends BaseModel implements Serializable {
private String childrenIdCard;
@Column
- @ColDefine(type = ColType.VARCHAR,width = 30)
+ @ColDefine(type = ColType.DATE)
@Comment("出身年月")
- private String childrenBirthday;
+ private Date childrenBirthday;
@Column
@ColDefine(type = ColType.VARCHAR,width = 30)
@@ -178,9 +180,9 @@ public class ChildManage extends BaseModel implements Serializable {
private String note;
@Column
- @ColDefine(type = ColType.VARCHAR,width = 50)
+ @ColDefine(type = ColType.DATETIME)
@Comment("填写时间")
- private String applyTime;
+ private Date applyTime;
}
diff --git a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html
index d5c613fe..ec4e747a 100644
--- a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html
+++ b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/apply/index.html
@@ -252,9 +252,9 @@ layout("/layouts/platform.html"){
reimburseProject: [{required: true, message: '请选择报销项目', trigger: ["change", "blur"]}],
reimburseFundSource: [{required: true, message: '请选择经费来源', trigger: ["change", "blur"]}],
bankUserName: [{required: true, message: '请填写户名', trigger: ["change", "blur"]}],
- bankCardNumber: [{required: true, message: '请填写银行账号', trigger: ["change", "blur"]}],
+ bankCardNumber: [ {required: true, message: '请填写银行账号', trigger: ["change", "blur"]},{ pattern: /^([1-9]{1})(\d{15}|\d{18})$/, message: '请输入正确的银行卡号', trigger: 'blur' }],
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ["change", "blur"]}],
- condolencePeopleMobile: [{required: true, message: '请填写联系方式', trigger: ["change", "blur"]}],
+ condolenceMobile: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }],
condolenceTime: [{required: true, message: '请选择慰问时间', trigger: ["change", "blur"]}],
invoiceNumber: [{required: true, message: '请填写发票张数', trigger: ["change", "blur"]}],
invoice: [{required: true, message: '请填写发票号码', trigger: ["change", "blur"]}],
@@ -547,9 +547,6 @@ layout("/layouts/platform.html"){
id: this.formData.condolenceId,
userName: this.formData.condolenceName,
mobile: this.formData.condolenceMobile || '',
- loginName: this.formData.condolenceLoginName || '',
- unitName: this.formData.condolenceUnitName || '',
- sex: this.formData.condolenceSex || ''
});
}
}
diff --git a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/info.js b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/info.js
index ca922283..01215c81 100644
--- a/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/info.js
+++ b/src/main/resources/views/platform/zhgh/dayofficework/unionReimburse/info.js
@@ -40,13 +40,13 @@ const unionReimburseInfo = {
{{viewData.condolenceMobile}}
{{viewData.typeName}}
{{viewData.money}}
- {{viewData.condolenceTime}}
+ {{formatDate(viewData.condolenceTime)}}
{{viewData.activityName}}
{{viewData.activityType}}
{{viewData.activityNumber}}
{{viewData.activityPlace}}
{{viewData.money}}
- {{viewData.activityTime}}
+ {{formatDate(viewData.activityTime)}}
{{viewData.invoiceNumber}}
{{viewData.invoice}}
{{viewData.paymentNotes}}
@@ -110,6 +110,31 @@ const unionReimburseInfo = {
this.getInfo()
this.getDoneTasks()
},
+ // 添加日期格式化方法
+ formatDate(date) {
+ if (!date) return '';
+ // 如果已经是 yyyy-MM-dd 格式,直接返回
+ if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
+ // 如果包含时间,只取日期部分
+ if (date.length > 10) {
+ return date.substring(0, 10);
+ }
+ return date;
+ }
+ // 否则转换为 yyyy-MM-dd 格式
+ try {
+ const d = new Date(date);
+ if (isNaN(d.getTime())) {
+ return date;
+ }
+ const year = d.getFullYear();
+ const month = String(d.getMonth() + 1).padStart(2, '0');
+ const day = String(d.getDate()).padStart(2, '0');
+ return year + '-' + month + '-' + day;
+ } catch (e) {
+ return date;
+ }
+ },
// 获取申请信息
getInfo() {
diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html
index d4e346d0..23464972 100644
--- a/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html
+++ b/src/main/resources/views/platform/zhgh/staffbenefit/dsznfmtx/apply/index.html
@@ -244,6 +244,26 @@ layout("/layouts/platform.html"){
});
});
},
+ // 添加检查用户状态的方法
+ async checkUserStatus() {
+ // 检查是否为退休人员
+ const isRetired = await this.checkRetirementStatus();
+ if (!isRetired) {
+ this.$message.warning('您不是退休人员,无法申请此项福利');
+ return false;
+ }
+
+ // 如果不是编辑状态,检查是否已申请过
+ if (!this.bizId) {
+ const isApplied = await this.checkUserApplication();
+ if (isApplied) {
+ this.$message.warning('您已经提交过申请,不能重复申请');
+ return false;
+ }
+ }
+
+ return true; // 返回 true 表示检查通过
+ },
// 添加检查是否为退休人员的方法
async checkRetirementStatus() {
try {
@@ -274,20 +294,10 @@ layout("/layouts/platform.html"){
},
// 提交
async onSubmit() {
- // 检查是否为退休人员
- const isRetired = await this.checkRetirementStatus();
- if (!isRetired) {
- this.$message.warning('您不是退休人员,无法申请此项福利');
- return;
- }
+ // 检查用户状态,如果检查失败则直接返回
+ const statusCheckPassed = await this.checkUserStatus();
+ if (!statusCheckPassed) return;
- if (!this.bizId) {
- const isApplied = await this.checkUserApplication();
- if (isApplied) {
- this.$message.warning('您已经提交过申请,不能重复申请');
- return;
- }
- }
const isValid = await this.validateBeforeSubmit();
if (!isValid) return;
@@ -356,7 +366,8 @@ layout("/layouts/platform.html"){
}
},
created() {
- this.init()
+ this.init();
+ this.checkUserStatus();
}
})
diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html
index a5e60fb6..13f54034 100644
--- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html
+++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/apply/index.html
@@ -12,7 +12,6 @@ layout("/layouts/platform.html"){
{{formData.userName}}
{{formData.sex}}
{{formData.nation}}
-
{{formatDate(formData.birthday)}}
{{formData.unitName}}
{{formData.mobile}}
@@ -32,23 +31,19 @@ layout("/layouts/platform.html"){
-
-
-
+
+
-
-
+
+
+
@@ -167,7 +162,6 @@ layout("/layouts/platform.html"){
new Vue({
el: '#app',
store,
- dicts: ["USER_NATION"],
data() {
return {
bizId: GetQueryString("bizId"),
@@ -180,9 +174,26 @@ layout("/layouts/platform.html"){
loverBirthday: [{ required: true, message: '请选择爱人出生年月', trigger: 'change' }],
loverUnitName: [{ required: true, message: '请输入爱人工作单位', trigger: 'blur' }],
startTime: [{ required: true, message: '请选择休假开始时间', trigger: 'change' }],
- endTime: [{ required: true, message: '请选择休假结束时间', trigger: 'change' }],
+ endTime: [{ required: true, message: '请选择休假结束时间', trigger: 'change' },
+ {validator: (rule, value, callback) => {
+ if (this.formData.startTime && value) {
+ const startDate = new Date(this.formData.startTime);
+ const endDate = new Date(value);
+ if (endDate < startDate) {
+ callback(new Error('休假结束时间不能早于开始时间'));
+ } else {
+ callback();
+ }
+ } else {
+ callback();
+ }
+ },
+ trigger: 'change'
+ }
+ ],
childrenBirthday: [{ required: true, message: '请选择子女出生日期', trigger: 'change' }]
- },
+ }
+ ,
}
},
computed: {
@@ -284,13 +295,13 @@ layout("/layouts/platform.html"){
const year = endDate.getFullYear();
const month = String(endDate.getMonth() + 1).padStart(2, '0');
const day = String(endDate.getDate()).padStart(2, '0');
- // 使用字符串拼接代替模板字符串,避免与Beetl冲突
this.$set(this.formData, 'endTime', year + '-' + month + '-' + day);
}
}
},
// 保存
onSave() {
+ console.log(this.formData);
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -384,8 +395,6 @@ layout("/layouts/platform.html"){
birthday: birthday,
mobile:mobile
}
- console.log('FormData birthday:', this.formData.birthday);
-
// 根据性别设置默认值
if (this.isMale) {
// 男性默认设置
diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js
index aa175adf..ec1b1891 100644
--- a/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js
+++ b/src/main/resources/views/platform/zhgh/staffbenefit/maternityLeave/common/info.js
@@ -99,6 +99,14 @@ const maternityLeaveInfo = {
}
},
methods: {
+ // 打开
+ onOpen(row) {
+ this.row = row
+ this.visible = true
+ this.getInfo()
+ this.getDoneTasks()
+ },
+
// 添加日期格式化方法
formatDate(date) {
if (!date) return '';
@@ -124,13 +132,6 @@ const maternityLeaveInfo = {
return date;
}
},
- // 打开
- onOpen(row) {
- this.row = row
- this.visible = true
- this.getInfo()
- this.getDoneTasks()
- },
// 获取申请信息
getInfo() {
diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/mutualInsurance/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/mutualInsurance/apply/index.html
index 5eef33d8..44bb34c5 100644
--- a/src/main/resources/views/platform/zhgh/staffbenefit/mutualInsurance/apply/index.html
+++ b/src/main/resources/views/platform/zhgh/staffbenefit/mutualInsurance/apply/index.html
@@ -105,7 +105,7 @@ layout("/layouts/platform.html"){
-
+
@@ -192,7 +192,7 @@ layout("/layouts/platform.html"){
-
+
@@ -250,10 +250,10 @@ layout("/layouts/platform.html"){
unitName: [{ required: true, message: '请填写所属单位', trigger: 'blur' }],
unionName: [{ required: true, message: '请填写所属工会', trigger: 'blur' }],
sex: [{ required: true, message: '请填写性别', trigger: 'blur' }],
- mobile: [{ required: true, message: '请填写手机号', trigger: 'blur' }],
- idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }],
- medicalInsuranceState: [{ required: true, message: '请选择医保状态', trigger: 'change' }],
- insuranceUserState: [{ required: true, message: '请选择在职状态', trigger: 'change' }],
+ mobile: [{ required: true, message: '请填写手机号', trigger: 'blur' },{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }],
+ idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }, {pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码', trigger: 'blur'}],
+ age: [{ required: true, message: '请输入年龄', trigger: 'blur' }, { type: 'number', min: 16, max: 60, message: '年龄必须在16-60岁之间', trigger: 'blur', transform: (value) => Number(value) }],
+ bankCardNumber: [ { pattern: /^([1-9]{1})(\d{15}|\d{18})$/, message: '请输入正确的银行卡号', trigger: 'blur' }],
sign: [{ required: true, message: '请签字', trigger: 'change' }]
},
projectList: [],
diff --git a/src/main/resources/views/platform/zhgh/staffmanage/childManage/info.js b/src/main/resources/views/platform/zhgh/staffmanage/childManage/info.js
index bbb87ed8..77262666 100644
--- a/src/main/resources/views/platform/zhgh/staffmanage/childManage/info.js
+++ b/src/main/resources/views/platform/zhgh/staffmanage/childManage/info.js
@@ -13,7 +13,7 @@ const childManageInfo = {
{{viewData.childrenYear}}
{{viewData.childrenName}}
{{viewData.childrenIdCard}}
- {{viewData.childrenBirthday}}
+ {{formatDate(viewData.childrenBirthday)}}
{{viewData.childrenSex}}
{{viewData.childrenCountry}}
{{viewData.childrenCurrentSchool}}
@@ -45,6 +45,31 @@ const childManageInfo = {
this.row = row
this.getInfo()
},
+ // 添加日期格式化方法
+ formatDate(date) {
+ if (!date) return '';
+ // 如果已经是 yyyy-MM-dd 格式,直接返回
+ if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
+ // 如果包含时间,只取日期部分
+ if (date.length > 10) {
+ return date.substring(0, 10);
+ }
+ return date;
+ }
+ // 否则转换为 yyyy-MM-dd 格式
+ try {
+ const d = new Date(date);
+ if (isNaN(d.getTime())) {
+ return date;
+ }
+ const year = d.getFullYear();
+ const month = String(d.getMonth() + 1).padStart(2, '0');
+ const day = String(d.getDate()).padStart(2, '0');
+ return year + '-' + month + '-' + day;
+ } catch (e) {
+ return date;
+ }
+ },
// 获取申请信息
getInfo() {
this.$axios.post('/platform/childManage/write/findOne', {id: this.row.id}).then((res) => {
diff --git a/src/main/resources/views/platform/zhgh/staffmanage/childManage/manage/index.html b/src/main/resources/views/platform/zhgh/staffmanage/childManage/manage/index.html
index d0373658..3ab0790d 100644
--- a/src/main/resources/views/platform/zhgh/staffmanage/childManage/manage/index.html
+++ b/src/main/resources/views/platform/zhgh/staffmanage/childManage/manage/index.html
@@ -123,7 +123,7 @@ layout("/layouts/platform.html"){
new Vue({
el: "#app",
store,
- dicts: ["CHILD_MANAGE_GRADE", "CHILD_MANAGE_GRADE"],
+ dicts: ["CHILD_MANAGE_GRADE"],
mixins: [initTableMixins],
components: {
"child-manage-info": childManageInfo
diff --git a/src/main/resources/views/platform/zhgh/staffmanage/childManage/write/index.html b/src/main/resources/views/platform/zhgh/staffmanage/childManage/write/index.html
index e73b31df..25b4d653 100644
--- a/src/main/resources/views/platform/zhgh/staffmanage/childManage/write/index.html
+++ b/src/main/resources/views/platform/zhgh/staffmanage/childManage/write/index.html
@@ -11,12 +11,8 @@ layout("/layouts/platform.html"){
-
-
-
+
+
@@ -72,7 +68,7 @@ layout("/layouts/platform.html"){
+ maxlength="30" type="number">
@@ -181,15 +177,22 @@ layout("/layouts/platform.html"){
new Vue({
el: '#app',
store,
- dicts: ["CHILD_MANAGE_GRADE"],
data() {
return {
bizId: GetQueryString("bizId"),
formData: {},
userOptions: [],
- userOptions2: [], // 添加母亲的用户选项
+ userOptions2: [],
formRules: {
- },
+ childRelationship: [{ required: true, message: '请选择就读年级', trigger: 'change' }],
+ childrenYear: [{ required: true, message: '请选择入学年份', trigger: 'change' }],
+ childrenName: [{ required: true, message: '请输入子女姓名', trigger: 'blur' }],
+ childrenIdCard: [{ required: true, message: '请输入子女身份证号', trigger: 'blur' }, {pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码', trigger: 'blur'}],
+ childrenBirthday: [{ required: true, message: '请选择子女出生日期', trigger: 'change' }],
+ childrenSex: [{ required: true, message: '请选择性别', trigger: 'change' }],
+ guardianMobile1: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }],
+ guardianMobile2: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }]
+ }
}
},
methods: {
diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/apply/index.html b/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/apply/index.html
index 1f1adf48..0b7ed829 100644
--- a/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/apply/index.html
+++ b/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/apply/index.html
@@ -589,6 +589,15 @@ layout("/layouts/platform_h5.html"){
return false;
}
+ // 银行卡号格式验证
+ if (this.formData.bankCardNumber) {
+ const bankCardRegex = /^([1-9]{1})(\d{15}|\d{18})$/;
+ if (!bankCardRegex.test(this.formData.bankCardNumber)) {
+ this.$toast.fail("请输入正确的银行卡号");
+ return false;
+ }
+ }
+
if (!this.formData.bankOfDeposit) {
this.$toast.fail("请填写开户行");
return false;
@@ -604,6 +613,14 @@ layout("/layouts/platform_h5.html"){
this.$toast.fail("请填写慰问对象联系方式");
return false;
}
+ // 慰问对象手机号验证
+ if (this.formData.condolenceMobile) {
+ const mobileRegex = /^1[3-9]\d{9}$/;
+ if (!mobileRegex.test(this.formData.condolenceMobile)) {
+ this.$toast.fail("请输入正确的慰问对象手机号码");
+ return false;
+ }
+ }
if (!this.formData.condolenceType) {
this.$toast.fail("请选择慰问类型");
return false;
diff --git a/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/info.js b/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/info.js
index b134fdf2..91940e49 100644
--- a/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/info.js
+++ b/src/main/resources/views/platform/zhghh5/dayofficework/unionReimburse/info.js
@@ -34,13 +34,13 @@ const UNION_REIMBURSE_INFO = {
{{ viewData.condolenceMobile }}
{{ viewData.typeName }}
{{ viewData.money }}
- {{ viewData.condolenceTime }}
+ {{ formatDate(viewData.condolenceTime) }}
{{ viewData.activityName }}
{{ viewData.activityType }}
{{ viewData.activityNumber }}
{{ viewData.activityPlace }}
{{ viewData.money }}
- {{ viewData.activityTime }}
+ {{ formatDate(viewData.activityTime) }}
{{ viewData.invoiceNumber }}
{{ viewData.invoice }}
{{ viewData.paymentNotes }}
@@ -111,6 +111,31 @@ const UNION_REIMBURSE_INFO = {
this.getInfo()
this.getDoneTasks()
},
+ // 添加日期格式化方法
+ formatDate(date) {
+ if (!date) return '';
+ // 如果已经是 yyyy-MM-dd 格式,直接返回
+ if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
+ // 如果包含时间,只取日期部分
+ if (date.length > 10) {
+ return date.substring(0, 10);
+ }
+ return date;
+ }
+ // 否则转换为 yyyy-MM-dd 格式
+ try {
+ const d = new Date(date);
+ if (isNaN(d.getTime())) {
+ return date;
+ }
+ const year = d.getFullYear();
+ const month = String(d.getMonth() + 1).padStart(2, '0');
+ const day = String(d.getDate()).padStart(2, '0');
+ return year + '-' + month + '-' + day;
+ } catch (e) {
+ return date;
+ }
+ },
// 关闭
onClose(){
this.visible = false
diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html
index 647a3e8e..599f8d15 100644
--- a/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html
+++ b/src/main/resources/views/platform/zhghh5/staffbenefit/dsznfmtx/apply/index.html
@@ -267,9 +267,9 @@ layout("/layouts/platform_h5.html"){
if (!this.formData.retireFiles || this.formData.retireFiles.length === 0) {
errors.push('请上传退休证');
}
- if (!this.formData.sign) {
- errors.push('请签字');
- }
+ // if (!this.formData.sign) {
+ // errors.push('请签字');
+ // }
if (!this.formData.declarationAgreed) {
errors.push('请阅读并同意声明');
}
@@ -407,7 +407,22 @@ layout("/layouts/platform_h5.html"){
},
async created() {
await this.init();
+
+ // 页面初始化完成后立即检查退休状态和申请状态
+ const isRetired = await this.checkRetirementStatus();
+ if (!isRetired) {
+ this.$toast.fail('您不是退休人员,无法申请此项福利');
+ return false;
+ }
+
+ if (!this.bizId) { // 如果不是编辑已有记录,则检查是否已申请
+ const isApplied = await this.checkUserApplication();
+ if (isApplied) {
+ this.$toast.fail('您已经提交过申请,不能重复申请');
+ }
+ }
}
+
})
diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html
index b7cc56ac..552193e1 100644
--- a/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html
+++ b/src/main/resources/views/platform/zhghh5/staffbenefit/maternityLeave/apply/index.html
@@ -416,6 +416,14 @@ layout("/layouts/platform_h5.html"){
if (!this.formData.childrenBirthday) {
errors.push('请选择子女出生日期');
}
+ // 添加时间顺序验证
+ if (this.formData.startTime && this.formData.endTime) {
+ const startDate = new Date(this.formData.startTime);
+ const endDate = new Date(this.formData.endTime);
+ if (endDate < startDate) {
+ errors.push('休假结束时间不能早于开始时间');
+ }
+ }
return errors;
},
diff --git a/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/info.js b/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/info.js
index 715d5593..2bbb7584 100644
--- a/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/info.js
+++ b/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/info.js
@@ -11,7 +11,7 @@
{{ viewData.childrenYear }}
{{ viewData.childrenIdCard }}
- {{ viewData.childrenBirthday }}
+ {{ formatDate(viewData.childrenBirthday) }}
{{ viewData.childrenSex }}
{{ viewData.childrenCountry }}
{{ viewData.childrenCurrentSchool }}
@@ -50,6 +50,31 @@
this.visible = true
this.getInfo()
},
+ // 添加日期格式化方法
+ formatDate(date) {
+ if (!date) return '';
+ // 如果已经是 yyyy-MM-dd 格式,直接返回
+ if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
+ // 如果包含时间,只取日期部分
+ if (date.length > 10) {
+ return date.substring(0, 10);
+ }
+ return date;
+ }
+ // 否则转换为 yyyy-MM-dd 格式
+ try {
+ const d = new Date(date);
+ if (isNaN(d.getTime())) {
+ return date;
+ }
+ const year = d.getFullYear();
+ const month = String(d.getMonth() + 1).padStart(2, '0');
+ const day = String(d.getDate()).padStart(2, '0');
+ return year + '-' + month + '-' + day;
+ } catch (e) {
+ return date;
+ }
+ },
// 关闭
onClose(){
this.visible = false
diff --git a/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/write/index.html b/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/write/index.html
index 83843e4e..e5600b97 100644
--- a/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/write/index.html
+++ b/src/main/resources/views/platform/zhghh5/staffmanage/childmanage/write/index.html
@@ -46,8 +46,13 @@ layout("/layouts/platform_h5.html"){
show-toolbar
>
-
-
+
-
-
+
{
- // 创建提交数据的副本
- const submitData = {...this.formData};
- // 如果有年级代码值,则使用代码值提交
- if (this.formData.childrenGradeCode) {
- submitData.childrenGrade = this.formData.childrenGradeCode;
- }
- this.$axios.post("/platform/childManage/write/save", { data: JSON.stringify(submitData) }).then(res => {
- if (res.code === 0) {
- this.$toast(res.msg)
- this.$pjaxReplace('/platform/childManage/mine/h5')
+ // 先进行表单验证
+ this.$refs.formRef.validate().then(() => {
+ this.$dialog.confirm({
+ title: "提示",
+ message: "您确定保存吗?"
+ }).then(() => {
+ // 创建提交数据的副本
+ const submitData = {...this.formData};
+ // 如果有年级代码值,则使用代码值提交
+ if (this.formData.childrenGradeCode) {
+ submitData.childrenGrade = this.formData.childrenGradeCode;
}
+ this.$axios.post("/platform/childManage/write/save", { data: JSON.stringify(submitData) }).then(res => {
+ if (res.code === 0) {
+ this.$toast(res.msg)
+ this.$pjaxReplace('/platform/childManage/mine/h5')
+ }
+ })
})
- })
+ }).catch(() => {
+ // 验证失败,Vant 会自动显示错误信息
+ });
},
onChildrenGradeConfirm(o) {
// 显示名称给用户看