Parcourir la source

Merge remote-tracking branch 'origin/master'

ljy121 il y a 1 an
Parent
commit
64ce3681b4

+ 2 - 1
client_h5/.env.dev

@@ -1,3 +1,4 @@
+# VITE_BASE_URL='https://oa.zjugis.com:28080'
 VITE_BASE_URL='http://10.10.10.7:18080'
 # VITE_BASE_URL='http://localhost:6090/'
 
@@ -5,4 +6,4 @@ VITE_BASE_URL='http://10.10.10.7:18080'
 # File上传路径
 VITE_FILE_BASE_URI='/admin-api/infra/file'
 
-# VITE_AUTHORIZATION='2c68e8c6fb7f43e59fc2fea5634f7a60'
+# VITE_AUTHORIZATION='fd30a57b78364448b9d13eb0719ac151'

+ 31 - 10
client_h5/src/pages/myLogs/Daily/index.vue

@@ -24,7 +24,12 @@
     <div class="title">接收人</div>
     <SelectUser v-model="formData.receiveUserIds" />
     <div class="blank-line"></div>
-    <div class="send-btn-group">
+    <div class="send-btn-group" v-if="formData.isUpdate">
+      <van-button type="primary" block @click="onSubmit(false)"
+        >更新</van-button
+      >
+    </div>
+    <div class="send-btn-group" v-else>
       <van-button type="success" block class="send-btn" @click="onSubmit(true)"
         >暂存</van-button
       >
@@ -39,7 +44,7 @@
  * @description 日志
  */
 import moment from "moment";
-import { reactive } from "vue";
+import { reactive, watch } from "vue";
 import { showSuccessToast, showToast } from "vant";
 import SelectUser from "@/components/UserSelect.vue";
 import ProjectList from "../components/ProjectList.vue";
@@ -59,6 +64,7 @@ interface FormData {
   reportMonth: string | number; // 月
   reportWeek: string | number; // 周
   reportDay: string | number; // 本周第几天
+  isUpdate?: boolean; // 是否是更新
 }
 
 // 页面数据
@@ -100,15 +106,27 @@ onMounted(async () => {
   await getIsWorkDays();
 });
 
-// 在退出前调用一下暂存
-onBeforeRouteLeave((ev: any) => {
-  // 如果是千万详情,则不做处理
-  if (ev.name == "LogsDetail") return;
-  // 如果日志内容不为空则触发暂存,否则直接退出
-  if (formData.reportContent?.length > 0) {
-    onSubmit(true, true);
+// 在退出前调用一下暂存(做好实时暂存后就不需要退出暂存了)
+// onBeforeRouteLeave((ev: any) => {
+//   // 如果是千万详情,则不做处理
+//   if (ev.name == "LogsDetail") return;
+//   // 如果日志内容不为空则触发暂存,否则直接退出
+//   if (formData.reportContent?.length > 0) {
+//     onSubmit(true, true);
+//   }
+// });
+
+// 在改动工作量的时候实时暂存
+watch(
+  () => formData.reportContent,
+  (newData, oldData) => {
+    // 如果是更新,则不进行实时暂存
+    if (formData.isUpdate) return;
+    if (newData?.length > 0 && oldData?.length > 0) {
+      onSubmit(true, true);
+    }
   }
-});
+);
 
 // 回填暂存数据
 const receiveData = (dailyDetail: any) => {
@@ -116,6 +134,9 @@ const receiveData = (dailyDetail: any) => {
   formData.reportYear = dailyDetail.reportYear;
   formData.reportMonth = dailyDetail.reportMonth;
   formData.reportWeek = dailyDetail.reportWeek;
+  if (dailyDetail.isUpdate) {
+    formData.isUpdate = dailyDetail.isUpdate;
+  }
   today.value = moment(dailyDetail.reportStartDate).format("YYYY-MM-DD");
   // 加个定时器回填接收人和工时
   const timer = setTimeout(() => {

+ 31 - 10
client_h5/src/pages/myLogs/Weekly/index.vue

@@ -30,7 +30,12 @@
     <div class="title">接收人</div>
     <SelectUser v-model="formData.receiveUserIds" />
     <div class="blank-line"></div>
-    <div class="send-btn-group">
+    <div class="send-btn-group" v-if="formData.isUpdate">
+      <van-button type="primary" block @click="onSubmit(false)"
+        >更新</van-button
+      >
+    </div>
+    <div class="send-btn-group" v-else>
       <van-button type="success" block class="send-btn" @click="onSubmit(true)"
         >暂存</van-button
       >
@@ -45,7 +50,7 @@
  * @description 周报
  */
 import moment from "moment";
-import { reactive } from "vue";
+import { reactive, watch } from "vue";
 import { showSuccessToast, showToast } from "vant";
 import SelectUser from "@/components/UserSelect.vue";
 import ProjectList from "../components/ProjectList.vue";
@@ -65,6 +70,7 @@ interface FormData {
   reportYear: string | number; // 年
   reportMonth: string | number; // 月
   reportWeek: string | number; // 周
+  isUpdate?: boolean; // 是否是更新
 }
 const defWeek = () => {
   if (moment().day() == 0) {
@@ -127,15 +133,27 @@ onMounted(async () => {
   formData.receiveUserIds = receiveUser;
 });
 
-// 在退出前调用一下暂存
-onBeforeRouteLeave((ev: any) => {
-  // 如果是千万详情,则不做处理
-  if (ev.name == "LogsDetail") return;
-  // 如果日志内容不为空则触发暂存,否则直接退出
-  if (formData.reportContent?.length > 0) {
-    onSubmit(true, true);
+// 在退出前调用一下暂存(做好实时暂存后就不需要退出暂存了)
+// onBeforeRouteLeave((ev: any) => {
+//   // 如果是前往详情,则不做处理
+//   if (ev.name == "LogsDetail") return;
+//   // 如果日志内容不为空则触发暂存,否则直接退出
+//   if (formData.reportContent?.length > 0) {
+//     onSubmit(true, true);
+//   }
+// });
+
+// 在改动工作量的时候实时暂存
+watch(
+  () => formData.reportContent,
+  (newData, oldData) => {
+    // 如果是更新,则不进行实时暂存
+    if (formData.isUpdate) return;
+    if (newData?.length > 0 && oldData?.length > 0) {
+      onSubmit(true, true);
+    }
   }
-});
+);
 
 // 回填暂存数据
 const receiveData = (weekDetail: any) => {
@@ -143,6 +161,9 @@ const receiveData = (weekDetail: any) => {
   formData.reportYear = weekDetail.reportYear;
   formData.reportMonth = weekDetail.reportMonth;
   formData.reportWeek = weekDetail.reportWeek;
+  if (weekDetail.isUpdate) {
+    formData.isUpdate = weekDetail.isUpdate;
+  }
   thisWeek.value = `${moment(weekDetail.reportStartDate).format(
     "YYYY/MM/DD"
   )} ~ ${moment(weekDetail.reportEndDate).format("YYYY/MM/DD")}`;

+ 27 - 1
client_h5/src/pages/myLogs/components/LogDetail.vue

@@ -95,6 +95,11 @@
         </template>
       </van-field>
     </div>
+    <van-floating-bubble
+      v-model:offset="offset"
+      icon="edit"
+      @click="goToEditPage"
+    />
   </div>
 </template>
 <script lang="ts" setup>
@@ -117,6 +122,9 @@ onMounted(() => {
   initCommentList();
 });
 
+// 编辑气泡的位置
+const offset = ref({ y: 100 });
+
 // 页面标题
 const pageTitle = ref({
   type: "daily", // daily | weekly
@@ -132,6 +140,9 @@ const formData = reactive<FormData>({
   receiveNames: [],
 });
 
+// 日志的详情(用于在回填时候进行编辑)
+const logDetail = ref<any>({});
+
 // 初始化日志数据
 const initData = async () => {
   const reportId: any = route.query?.id ?? "";
@@ -139,7 +150,7 @@ const initData = async () => {
     ? JSON.parse(route.query.detail as string)
     : null;
   const result = reportDetail ?? (await http.getLogDetail(reportId));
-
+  logDetail.value = result;
   formData.reportContent = result.reportContent ?? "";
   formData.workloadList = result.workload ?? [];
   formData.receiveNames = result.receiveNames ?? [];
@@ -260,6 +271,21 @@ const submitComment = async (content?: string) => {
     });
   }
 };
+// 跳转到编辑页面
+const { push } = useRouter();
+const goToEditPage = () => {
+  const goPath = logDetail.value.reportType == "weekly" ? "/weekly" : "/daily";
+  push({
+    path: goPath,
+    query: {
+      id: logDetail.value.id,
+      detail: JSON.stringify({
+        ...logDetail.value,
+        isUpdate: true,
+      }),
+    },
+  });
+};
 </script>
 <style lang="scss" scoped>
 @import "../page.scss";

+ 8 - 0
client_h5/src/pages/resign/index.vue

@@ -53,6 +53,13 @@
               placeholder="离职生效日期"
               readonly
           />
+          <van-field
+              v-model="formData.lzygszdText"
+              name="员工所在地"
+              label="员工所在地"
+              placeholder="员工所在地"
+              readonly
+          />
           <van-field
               v-model="formData.lzyyc"
               name="离职原因"
@@ -138,6 +145,7 @@ const initFormData = async () => {
   formData.value = result.data
 
   formData.value.drzwText = getDictLabel(DICT_TYPE.POST_TYPE, formData.value.drzw);
+  formData.value.lzygszdText = getDictLabel(DICT_TYPE.POST_TYPE, formData.value.lzygszd);
 
   formData.value.rgssjc = formatDate(formData.value.rgssj);
   formData.value.htdqsc = formatDate(formData.value.htdqs);

+ 1 - 1
client_h5/src/router/index.ts

@@ -14,7 +14,7 @@ const router = createRouter({
 })
 
 // 路由加载前
-router.beforeEach(async (to, from, next) => {
+router.beforeEach((to, from, next) => {
   getUserInfoPromise(true).then((isLogin) => {
     next(); 
     if (!isLogin) {

+ 1 - 1
zjugis-business/src/main/java/com/zjugis/business/flow/resign/service/impl/ResignServiceImpl.java

@@ -139,7 +139,7 @@ public class ResignServiceImpl implements ResignService {
         }
 
         ResignApplyDO resignApplyDO = resignApplyService.findByUserId(aDo.getUserId());
-        if (resignApplyDO == null) {
+        if (resignApplyDO == null && aDo.getFlowStatus() != 90) {
             throw exception(RESIGN_APPLY_FIRST);
         }
 

+ 1 - 1
zjugis-business/src/main/resources/templates/CommonCost/agentIndex.ftl

@@ -145,7 +145,7 @@
               <td colspan="3">
                 <div class="form-group">
                   <div class="z-comp-checkbox" name="createReqVO$dybx">
-                    <div class="z-checkbox-item <#if (formEntity.dybx!) ? contains(" 1")>checked</#if>"><i></i>抵用借款</div>
+                    <div class="z-checkbox-item <#if (formEntity.dybx!) ? contains("1")>checked</#if>"><i></i>抵用借款</div>
                   </div>
                 </div>
               </td>

+ 1 - 1
zjugis-business/src/main/resources/templates/CommonCost/index.ftl

@@ -144,7 +144,7 @@
               <td colspan="3">
                 <div class="form-group">
                   <div class="z-comp-checkbox" name="createReqVO$dybx">
-                    <div class="z-checkbox-item <#if (formEntity.dybx!) ? contains(" 1")>checked</#if>"><i></i>抵用借款</div>
+                    <div class="z-checkbox-item <#if (formEntity.dybx!) ? contains("1")>checked</#if>"><i></i>抵用借款</div>
                   </div>
                 </div>
               </td>

+ 2 - 0
zjugis-business/src/main/resources/templates/Resign/js/index.js

@@ -324,6 +324,8 @@
 
                 } else {
                     detailReadonly(i)
+                    $("#addDataUnfinished").css("display", "none");
+                    $("#addDataFinished").css("display", "none");
                 }
 
 

+ 1 - 1
zjugis-business/src/main/resources/templates/TravelCost/index.ftl

@@ -187,7 +187,7 @@
               <td>
                 <div class="form-group">
                   <div class="z-comp-checkbox" name="createReqVO$dybx">
-                    <div class="z-checkbox-item <#if (formEntity.dybx!) ? contains(" 1")>checked</#if>"><i></i>抵用借款</div>
+                    <div class="z-checkbox-item <#if (formEntity.dybx!) ? contains("1")>checked</#if>"><i></i>抵用借款</div>
                   </div>
                 </div>
               </td>

+ 10 - 0
zjugis-module-adm/zjugis-module-adm-api/src/main/java/com/zjugis/module/adm/api/staff/dto/StaffRecordsDTO.java

@@ -103,5 +103,15 @@ public class StaffRecordsDTO {
      */
     private String mobile;
 
+    /**
+     * 银行卡号
+     */
+    private String yhzh;
+
+    /**
+     * 开户银行
+     */
+    private String khyh;
+
 
 }

+ 1 - 1
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/api/staff/StaffApiImpl.java

@@ -32,7 +32,7 @@ public class StaffApiImpl implements StaffApi {
     @Override
     public CommonResult<String> updateStaffState(StaffStateDTO dto) {
         RecordsRespVO vo = recordsService.getRecordDetail(dto.getUserId());
-        vo.setState(dto.getState());
+        vo.setState(String.valueOf(dto.getState()));
         return success(recordsService.updateStaff(vo));
     }
 

+ 181 - 69
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/controller/admin/staff/vo/records/RecordsBaseVO.java

@@ -1,5 +1,7 @@
 package com.zjugis.module.adm.controller.admin.staff.vo.records;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -15,124 +17,222 @@ import java.time.LocalDateTime;
 @Data
 public class RecordsBaseVO {
 
-    @Schema(description = "用户ID")
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     * 登录名称
+     */
+    private String loginName;
+
+    /**
+     * 员工姓名
+     */
+    private String nickname;
+
+    /**
+     * 用户ID
+     */
     private String userId;
+//    -----------------------------基本信息(本人可编辑)------------------------------------
 
-    @Schema(description = "状态 1-实习;2-试用;3-正式;4-离职")
-    private Integer state;
 
-    @Schema(description = "政治面貌")
-    private Integer zzmm;
+    /**
+     * 状态 1-实习
+     * 2-试用
+     * 3-正式
+     * 4-离职
+     */
+    private String state;
 
-    @Schema(description = "户口性质")
-    private Integer hkxz;
 
-    @Schema(description = "毕业学校")
-    private String byxx;
+    /**
+     * 性别
+     */
+    private String sex;
 
-    @Schema(description = "毕业时间")
-    private LocalDateTime bysj;
+    /**
+     * 民族
+     */
+    private String nation;
 
-    @Schema(description = "最高学历")
-    private Integer zgxl;
+    /**
+     * 出生日期
+     */
+    private LocalDateTime birthday;
 
-    @Schema(description = "专业")
-    private String major;
+    /**
+     * 身份证号码
+     */
+    private String cardid;
+
+    /**
+     * 政治面貌
+     */
+    private String zzmm;
+
+
+    /**
+     * 户口所在地
+     */
+    private String hkszd;
+
+    /**
+     * 户口性质
+     */
+    private String hkxz;
 
-    @Schema(description = "参加工作时间")
+
+    /**
+     * 现居住地址
+     */
+    private String xjzdz;
+
+
+    /**
+     * 婚姻状况
+     */
+    private String hyzk;
+
+    /**
+     * 参加工作时间
+     */
     private LocalDateTime cjgzsj;
 
-    @Schema(description = "入公司时间")
-    private LocalDateTime rgssj;
+    /**
+     * 兴趣爱好
+     */
+    private String xqah;
 
-    @Schema(description = "离职时间")
-    private LocalDateTime lzsj;
+    /**
+     * 技能特长
+     */
+    private String jntc;
 
+    /**
+     * 成果奖励
+     */
+    private String cgjl;
 
-    @Schema(description = "性别")
-    private Integer sex;
+    /**
+     * 健康状况
+     */
+    private String jkzk;
 
-    @Schema(description = "民族")
-    private String nation;
+    /**
+     * 身份证原件
+     */
+    private String sfyj;
 
-    @Schema(description = "出生日期")
-    private LocalDateTime birthday;
 
-    @Schema(description = "身份证号码")
-    private String cardid;
+//    --------工资卡信息(本人可编辑)-----------
 
+    /**
+     * 开户银行
+     */
+    private String khyh;
 
-    @Schema(description = "户口所在地")
-    private String hkszd;
+    /**
+     * 银行账号
+     */
+    private String yhzh;
 
-    @Schema(description = "婚姻状况")
-    private Integer hyzk;
+//    ----------------入司信息(本人不可编辑)----------------
 
-    @Schema(description = "手机")
+
+    /**
+     * 手机
+     */
     private String mobilePhone;
 
-    @Schema(description = "指导人ID")
+    /**
+     * 指导人ID
+     */
     private String zdr;
 
-    @Schema(description = "紧急联系人号码")
+    /**
+     * 紧急联系人号码
+     */
     private String jjlxrhm;
 
-    @Schema(description = "紧急联系人姓名")
+    /**
+     * 紧急联系人姓名
+     */
     private String jjlxrxm;
 
-    @Schema(description = "紧急联系人关系")
-    private Integer jjlxrgx;
-
-    @Schema(description = "基本情况备注")
-    private String jbqkbz;
+    /**
+     * 紧急联系人关系
+     */
+    private String jjlxrgx;
 
-    @Schema(description = "所属部门")
+    /**
+     * 所属部门
+     */
     private String ssbm;
 
-    @Schema(description = "担任职务")
+    /**
+     * 担任职务
+     */
     private String drzw;
 
-    @Schema(description = "职称")
+    /**
+     * 职称
+     */
     private String zc;
 
+    /**
+     * 入公司时间
+     */
+    private LocalDateTime rgssj;
 
-    @Schema(description = "转正时间")
+    /**
+     * 转正时间
+     */
     private LocalDateTime zzsj;
 
-    @Schema(description = "合同到期时间")
+    /**
+     * 合同到期时
+     */
     private LocalDateTime htdqs;
 
-    @Schema(description = "签订公司ID")
+    /**
+     * 签订公司ID
+     */
     private String qdgsid;
 
-    @Schema(description = "能力等级")
+    /**
+     * 能力等级
+     */
     private String nldj;
 
-    @Schema(description = "员工姓名")
-    private String nickname;
 
-    @Schema(description = "部门名称")
+    /**
+     * 部门名称
+     */
     private String deptName;
-
-    @Schema(description = "部门Id")
+    /**
+     * 部门ID
+     */
     private String deptId;
 
-    @Schema(description = "签订公司")
+    /**
+     * 签订公司
+     */
     private String qdgs;
 
-    @Schema(description = "指导人名称")
+    /**
+     * 指导人名称
+     */
     private String zdrmc;
 
-    @Schema(description = "登录名称(员工工号)")
-    private String loginName;
-
-    @Schema(description = "开户银行")
-    private String khyh;
 
-    @Schema(description = "银行账号")
-    private String yhzh;
+    /**
+     * 离职时间
+     */
+    private LocalDateTime lzsj;
 
-    private String hz;
 
     /**
      * 初始司领
@@ -143,10 +243,6 @@ public class RecordsBaseVO {
      * 年假
      */
     private Integer nj;
-    /**
-     * 司领
-     */
-    private Integer sl;
 
     /**
      * 合同签订时间
@@ -187,10 +283,26 @@ public class RecordsBaseVO {
      * 工作经历
      */
     private String gzjl;
+    /**
+     * 最高学历
+     */
+    private String zgxl;
+    /**
+     * 专业
+     */
+    private String major;
 
     /**
-     * 现居住地址
+     * 毕业学校
      */
-    private String xjzdz;
+    private String byxx;
+    /**
+     * 毕业时间
+     */
+    private LocalDate bysj;
 
+    /**
+     * 司龄
+     */
+    private Integer sl;
 }

+ 9 - 15
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/dal/dataobject/staff/StaffRecordSDO.java

@@ -125,7 +125,15 @@ public class StaffRecordSDO extends BaseDO {
      */
     private String cgjl;
 
-//
+    /**
+     * 健康状况
+     */
+    private String jkzk;
+
+    /**
+     * 身份证原件
+     */
+    private String sfyj;
 
 
 //    --------工资卡信息(本人可编辑)-----------
@@ -303,18 +311,4 @@ public class StaffRecordSDO extends BaseDO {
     private LocalDate bysj;
 
 
-//    -------------------------学校信息(预留四个 没有就不填 本人可编辑)--------------------------   做新表
-
-
-//    ------工作经历(本人可编辑)----------  做新表
-
-
-//    -----家庭成员信息(本人可编辑)------------- 做新表
-
-    //    -------------------职称证书(本人不可编辑)------------------  新表
-
-
-//    ----------------绩效考核(本人不可编辑)-----------------新表
-
-
 }

+ 8 - 1
zjugis-module-adm/zjugis-module-adm-biz/src/main/java/com/zjugis/module/adm/service/staff/RecordsServiceImpl.java

@@ -145,7 +145,14 @@ public class RecordsServiceImpl implements RecordsService {
         //学校信息
         List<SchoolDetailDO> schoolList = schoolDetailDOMapper.selectList(new LambdaQueryWrapperX<SchoolDetailDO>().eq(SchoolDetailDO::getUserId, userId));
         if (CollectionUtil.isNotEmpty(schoolList)) {
-            vo.setSchoolList(schoolList);
+            List<SchoolDetailDO> schools = schoolList.stream().sorted(
+                    (o1, o2) -> {
+                        int b1 = Integer.parseInt(o1.getXl());
+                        int b2 = Integer.parseInt(o2.getXl());
+                        return Integer.compare(b1, b2);
+                    }
+            ).collect(Collectors.toList());
+            vo.setSchoolList(schools);
         }
 
         //工作经历