Quellcode durchsuchen

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min vor 1 Jahr
Ursprung
Commit
809405fcb6

+ 5 - 2
fhKeeper/formulahousekeeper/inva_4_tivo/css/dynamic.css

@@ -23,10 +23,13 @@
 .enterpriseDynamics .bifJournal .eachItem .eachItemImg {
   width: 300px;
   height: 200px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
 .enterpriseDynamics .bifJournal .eachItem .eachItemImg img {
-  width: 100%;
-  height: 100%;
+  width: 200px;
+  height: 200px;
 }
 .enterpriseDynamics .bifJournal .eachItem .eachItemRight {
   margin-left: 40px;

+ 5 - 2
fhKeeper/formulahousekeeper/inva_4_tivo/css/dynamic.less

@@ -20,9 +20,12 @@
             .eachItemImg {
                 width: 300px;
                 height: 200px;
+                display: flex;
+                justify-content: center;
+                align-items: center;
                 img {
-                    width: 100%;
-                    height: 100%;
+                    width: 200px;
+                    height: 200px;
                 }
             }
             .eachItemRight {

+ 116 - 12
fhKeeper/formulahousekeeper/inva_4_tivo/dynamic.html

@@ -69,36 +69,36 @@
             <!-- 大事记 -->
             <div class="bifJournal" v-if="!showDetails">
                 <div class="headline">企业大事记</div>
-                <div class="eachItem" v-for="item in 2">
+                <div class="eachItem" v-for="item in chronicleEvents[pageIndex - 1]">
                     <div class="eachItemImg">
-                        <img src="./image/bannar7.jpg" alt="">
+                        <img :src="item.img ? item.img : './image/gsgj.png'" alt="">
                     </div>
                     <div class="eachItemRight">
-                        <div class="eachItemRightTilt">文章标题1</div>
+                        <div class="eachItemRightTilt" style="opacity: 0;">文章标题1</div>
                         <div class="eachItemRightText">
-                            文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容
+                            {{ item.text }}
                         </div>
                         <div class="eachItemRightBum">
-                            <span class="ons" @click="showDetails = true">了解详情<i class="el-icon-arrow-right"></i></span>
-                            <span>2023-02-01</span>
+                            <span class="ons" @click="learnMore(item)">了解详情<i class="el-icon-arrow-right"></i></span>
+                            <span>{{ item.date }}</span>
                         </div>
                     </div>
                 </div>
                 <div class="paging">
-                    <el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
+                    <el-pagination background layout="prev, pager, next" :total="total" :page-size="pageSize" @current-change="pageIndexChange"></el-pagination>
                 </div>
             </div>
             <!-- 详情 -->
             <div class="details" v-if="showDetails">
                 <div class="detailsTil">
-                    文章标题1
+                    <span style="opacity: 0;">文章标题1</span>
                     <div class="detailsBack" @click="showDetails = false">
                         <i class="el-icon-arrow-left"></i> 返回
                     </div>
                 </div>
-                <div class="detailsData">2023-01-01</div>
+                <div class="detailsData">{{ chronicleEventsDetils.date }}</div>
                 <div class="detailstext">
-                    文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容文章内容
+                    {{ chronicleEventsDetils.text }}
                 </div>
             </div>
         </div>
@@ -162,8 +162,112 @@
         new Vue({
             el: "#app",
             data: {
-                showDetails: false
-            }
+                showDetails: false,
+                total: 0,
+                pageIndex: 1,
+                pageSize: 1,
+                chronicleEventsDetils: {},
+                chronicleEvents: [
+                    [
+                        {
+                            title: '',
+                            text: '增加全球化网络访问的支持,方便在海外工作的客户使用。',
+                            date: '2024.01.15',
+                            img: ''
+                        },
+                        {
+                            title: '',
+                            text: '为苏州依斯倍环保装备科技有限公司提供项目工时一体化解决方案,深度对接SAP系统,完成数据双向通讯。',
+                            date: '2023.12.20',
+                            img: ''
+                        }
+                    ], [
+                        {
+                            title: '',
+                            text: '为A股上市企业南京雷尔伟新技术完成车间管家系统的上线运营。通过深入沟通和快速响应,实现了个性化的需求,完成了原有MES系统无法实现的工时工钱统计目标。',
+                            date: '2023.11.18',
+                            img: './image/journal/chejian.jpg'
+                        },
+                        {
+                            title: '',
+                            text: '签约重庆物奇微电子股份有限公司,帮助上百人的研发团队实现便捷轻松的工时管理。',
+                            date: '2023.10.09',
+                            img: ''
+                        }
+                    ], [
+                        {
+                            title: '',
+                            text: '工时管家发布新版,支持钉钉和飞书平台。',
+                            date: '2023.06.10',
+                            img: ''
+                        },
+                        {
+                            title: '',
+                            text: '与中瀚设计集团达成战略合作关系,通过工时管家的项目管理专业版完成了项目中的工时成本、费用报销成本、项目预算、合同管理等全方位一体化的管理。',
+                            date: '2023.05.23',
+                            img: ''
+                        }
+                    ], [
+                        {
+                            title: '',
+                            text: '工时管家上架企业微信平台,并成为企业微信推荐的唯一一款工时产品。',
+                            date: '2022.10.15',
+                            img: ''
+                        },
+                        {
+                            title: '',
+                            text: '签约深圳市法本信息技术有限公司,作为一家以软件外包为核心业务的大公司,研发人员的工时成本管理事关重要。经过反复对比和长期考察,法本信息最终决定使用我们的工时管家软件。',
+                            date: '2022.06.10',
+                            img: ''
+                        }
+                    ], [
+                        {
+                            title: '',
+                            text: '上海威派格智慧水务有限公司之前一直使用宜搭来管理工时,但随着人员增长到1000人规模,对软件的需求越来越深入后,零代码平台已经无法实现他们的目标。切换到工时管家后,得益于我们平台的行业经验积累,通过我们内置的一些模块快速实现了业务需求。',
+                            date: '2022.03.21',
+                            img: ''
+                        },
+                        {
+                            title: '',
+                            text: '签约北京首钢集团信息化技术有限公司。为北京首钢提供了定制化需求和私有化部署,支持他们8000人规模的企业员工同时使用。',
+                            date: '2022.02.25',
+                            img: ''
+                        }
+                    ], [
+                        {
+                            title: '',
+                            text: '随访管家系统发布,获得北京助研科技的青睐。作为一家CRO企业,对临床随访的管理需要一款远程数字化的协作平台,通过数据的互通来提高办公效率。随访管家便是针对这一方向打造的产品。',
+                            date: '2021.06.24',
+                            img: './image/journal/suifang.png'
+                        },
+                        {
+                            title: '',
+                            text: '工时管家累计客户达100家,逐步发布专业版和企业旗舰版。',
+                            date: '2021.03.18',
+                            img: ''
+                        }
+                    ], [
+                        {
+                            title: '',
+                            text: '工时管家产品发布,支持工时的填报审核和统计。为企业IPO提供有效数据支持。',
+                            date: '2020.10.12',
+                            img: ''
+                        }
+                    ]
+                ]
+            },
+            mounted () {
+                this.total = this.chronicleEvents.length
+            },
+            methods: {
+                pageIndexChange (val) {
+                    this.pageIndex = val
+                },
+                learnMore(item) {
+                    this.showDetails = true
+                    this.chronicleEventsDetils = item
+                }
+            },
         })
     </script>
 </body>

BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/journal/chejian.jpg


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/journal/suifang.png


+ 1 - 1
fhKeeper/formulahousekeeper/inva_4_tivo/js/js/scripts.js

@@ -23,7 +23,7 @@
 	/* Navbar Scripts */
 	// jQuery to collapse the navbar on scroll
     $(window).on('scroll load', function() {
-		if ($(".navbar").offset().top > 60) {
+		if ($(".navbar").offset() && $(".navbar").offset().top > 60) {
 			$(".fixed-top").addClass("top-nav-collapse");
 		} else {
 			$(".fixed-top").removeClass("top-nav-collapse");

+ 14 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -2198,7 +2198,20 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             project.setDepartmentName(first.get().getDepartmentName());
         }
         //项目参与人
-        List<Map<String, Object>> participator = participationMapper.getParticipator(id);
+        List<Map<String, Object>> participator = null;
+        //非项目参与人是公司全部人员
+        if (project.getIsPublic() == 1) {
+            participator = userMapper.selectList(new QueryWrapper<User>().select("id", "name", "job_number").eq("company_id", companyId).eq("is_active", 1)).stream().map(u -> {
+                HashMap<String, Object> map = new HashMap<>();
+                map.put("id", u.getId());
+                map.put("name", u.getName());
+                map.put("jobNumber", u.getJobNumber());
+                return map;
+            }).collect(Collectors.toList());
+        } else {
+            participator = participationMapper.getParticipator(id);
+        }
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId).eq("is_active", 1));
         project.setParticipationList(participator);
         //项目日报审核人
         List<ProjectAuditor> auditorList = projectAuditorMapper.selectList(new QueryWrapper<ProjectAuditor>().eq("project_id", id));

+ 32 - 14
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -2959,6 +2959,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
 
             //获取当日已填写的人员报告
             List<Map<String, Object>> reportNameByDate = reportMapper.getReportNameByDate(date, companyId, null);
+            Company company = companyMapper.selectById(companyId);
+            TimeType timeType = timeTypeMapper.selectById(companyId);
+            //如果没有开通OA模块,有开通企业微信同步考勤,从user_corpwx_time表中获取请假时长
+            List<UserCorpwxTime> userCorpwxTimeList = null;
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+            if (company.getPackageOa() == 0 && timeType.getSyncCorpwxTime() == 1) {
+                userCorpwxTimeList = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>().select("corpwx_userid, ask_leave_time").eq("company_id", companyId).eq("create_date", curDate).gt("ask_leave_time", 0));
+            }
             for (User u : userList) {
                 //入职日期在当前日期之后的,不要显示
                 if (u.getInductionDate() != null && u.getInductionDate().isAfter(curDate)) {
@@ -2970,20 +2978,30 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 user.put("departmentId", u.getDepartmentId());
                 Optional<Map<String, Object>> first = reportNameByDate.stream().filter(r -> r.get("id").equals(u.getId())).findFirst();
                 //获取角色请假情况 存在同条件下多条请假记录
-                List<LeaveSheet> leaveSheets = leaveSheetList.stream().filter(ls -> ls.getOwnerId().equals(u.getId()) &&
-                        ((localDate.isAfter(ls.getStartDate()) || localDate.isEqual(ls.getStartDate())) && (localDate.isBefore(ls.getEndDate()) || localDate.isEqual(ls.getEndDate())))).collect(Collectors.toList());
-                if(leaveSheets.size()>0){
-                    Integer leaveType=leaveSheets.get(0).getLeaveType();
-                    BigDecimal leaveDays=new BigDecimal(0);
-                    BigDecimal leaveTimes=new BigDecimal(0);
-                    for (LeaveSheet leaveSheet : leaveSheets) {
-                        leaveDays=leaveDays.add(new BigDecimal(leaveSheet.getTimeDays()));
-                        leaveTimes=leaveTimes.add(new BigDecimal(leaveSheet.getTimeHours()));
-                    }
-                    user.put("leaveType",leaveType);
-                    if(leaveSheets.stream().anyMatch(ls->ls.getTimeType()==0)){
-                        user.put("leaveDays",leaveDays);
-                    }else user.put("leaveTimes",leaveTimes);
+                if (company.getPackageOa() == 1) {
+                    List<LeaveSheet> leaveSheets = leaveSheetList.stream().filter(ls -> ls.getOwnerId().equals(u.getId()) &&
+                            ((localDate.isAfter(ls.getStartDate()) || localDate.isEqual(ls.getStartDate())) && (localDate.isBefore(ls.getEndDate()) || localDate.isEqual(ls.getEndDate())))).collect(Collectors.toList());
+                    if(leaveSheets.size()>0){
+                        Integer leaveType=leaveSheets.get(0).getLeaveType();
+                        BigDecimal leaveDays=new BigDecimal(0);
+                        BigDecimal leaveTimes=new BigDecimal(0);
+                        for (LeaveSheet leaveSheet : leaveSheets) {
+                            leaveDays=leaveDays.add(new BigDecimal(leaveSheet.getTimeDays()));
+                            leaveTimes=leaveTimes.add(new BigDecimal(leaveSheet.getTimeHours()));
+                        }
+                        user.put("leaveType",leaveType);
+                        if(leaveSheets.stream().anyMatch(ls->ls.getTimeType()==0)){
+                            user.put("leaveDays",leaveDays);
+                        }else {
+                            user.put("leaveTimes",leaveTimes);
+                        }
+                    }
+                } else if (wxCorpInfo != null && userCorpwxTimeList != null) {
+                    Optional<UserCorpwxTime> find = userCorpwxTimeList.stream().filter(uct -> uct.getCorpwxUserid().equals(u.getCorpwxUserid())).findFirst();
+                    if (find.isPresent()) {
+                        user.put("leaveType",0);//默认为事假
+                        user.put("leaveTimes", find.get().getAskLeaveTime());
+                    }
                 }
                 if (first.isPresent()) {
                     user.put("state", first.get().get("state"));

+ 5 - 3
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -85,6 +85,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     @Resource
     private DepartmentOtherManagerMapper departmentOtherManagerMapper;
     @Resource
+    private DepartmentQualityManagerMapper departmentQualityManagerMapper;
+    @Resource
     private ReportService reportService;
     @Resource
     WxCorpInfoService wxCorpInfoService;
@@ -289,14 +291,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, corpwx_userid").in("department_id", deptIncludeSubDeptIds));
             }
         } else if (checkType == 2) {
-            List<DepartmentOtherManager> otherManagers = departmentOtherManagerMapper.selectList(new QueryWrapper<DepartmentOtherManager>().eq("department_id", deptId));
+            List<DepartmentQualityManager> otherManagers = departmentQualityManagerMapper.selectList(new QueryWrapper<DepartmentQualityManager>().eq("department_id", deptId));
             Department curDept = departmentMapper.selectById(deptId);
             if (curDept.getSuperiorId() != null && curDept.getSuperiorId() != 0) {
                 //取上级部门的其他负责人
-                otherManagers.addAll(departmentOtherManagerMapper.selectList(new QueryWrapper<DepartmentOtherManager>().eq("department_id", curDept.getSuperiorId())));
+                otherManagers.addAll(departmentQualityManagerMapper.selectList(new QueryWrapper<DepartmentQualityManager>().eq("department_id", curDept.getSuperiorId())));
             }
             if (otherManagers.size() > 0) {
-                List<String> userIds = otherManagers.stream().map(DepartmentOtherManager::getOtherManagerId).collect(Collectors.toList());
+                List<String> userIds = otherManagers.stream().map(DepartmentQualityManager::getQualityId).collect(Collectors.toList());
                 userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, corpwx_userid").in("id", userIds));
             }
         }

+ 39 - 0
fhKeeper/formulahousekeeper/timesheet-workshop/src/common/js/compute.js

@@ -0,0 +1,39 @@
+export default {
+  // 加法函数,用来得到精确的加法结果
+  // 返回:arg1 + arg2 的精确结果
+  accAdd: function (arg1, arg2) {
+    var r1, r2, m;
+    try {
+      r1 = arg1.toString().split(".")[1].length;
+    } catch (e) {
+      r1 = 0;
+    }
+    try {
+      r2 = arg2.toString().split(".")[1].length;
+    } catch (e) {
+      r2 = 0;
+    }
+    m = Math.pow(10, Math.max(r1, r2));
+    return (arg1 * m + arg2 * m) / m;
+  },
+
+  // 减法函数,用来得到精确的减法结果
+  // 返回:arg1 - arg2 的精确结果
+  accSub: function (arg1, arg2) {
+    var r1, r2, m, n;
+    try {
+      r1 = arg1.toString().split(".")[1].length;
+    } catch (e) {
+      r1 = 0;
+    }
+    try {
+      r2 = arg2.toString().split(".")[1].length;
+    } catch (e) {
+      r2 = 0;
+    }
+    m = Math.pow(10, Math.max(r1, r2));
+    // 动态控制精度长度
+    n = r1 >= r2 ? r1 : r2;
+    return ((arg1 * m - arg2 * m) / m).toFixed(n);
+  },
+};

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/product/list.vue

@@ -635,6 +635,7 @@ import util from "../../common/js/util";
 // 自定义select组件
 import selectCat from "@/components/select.vue"
 import { version } from 'vue';
+import calculation from '../../common/js/compute.js';
 export default {
     components: {
         selectCat
@@ -940,7 +941,8 @@ export default {
         },
         priceSingleTotal: function () {
             return this.procedureLit.reduce((total, item) => {
-                return +total + +item.unitPrice
+                // return +total + +item.unitPrice
+                return calculation.accAdd(+total, +item.unitPrice)
             }, 0)
         },
     },

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -129,7 +129,7 @@
             <aside :class="collapsed?'menu-collapsed':'menu-expanded'">
                 <el-scrollbar style="height:100%">
                 <!--导航菜单-->
-                <el-menu :default-active="$route.path" class="el-menu-vertical-demo" unique-opened router v-if="!collapsed" default-openeds="zhan">
+                <el-menu :default-active="$route.path" class="el-menu-vertical-demo" unique-opened router v-if="!collapsed" :default-openeds="['zhan']">
                     <template v-for="(item, index) in $router.options.routes" v-if="!item.hidden">
                         <!-- <el-submenu :index="index+''" v-if="!item.leaf"> -->
                         <el-submenu :index="'zhan'" v-if="!item.leaf">

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -1091,7 +1091,7 @@
                         <el-option label="工时系统和外部同步的项目都必填" :value="2"></el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item :label="'项目工时提醒百分比'"  >
+                <el-form-item :label="'项目工时剩余提醒百分比'"  >
                     <el-input v-model="manDaySetting.projectWarningPercent" type="number" style="width:200px;">
                     </el-input>%
                 </el-form-item>
@@ -1101,7 +1101,7 @@
                         <el-option label="可以填报,仅提醒" :value="0"></el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item :label="'分组工时提醒百分比'"  v-if="user.company.packageProject == 1">
+                <el-form-item :label="'分组工时剩余提醒百分比'"  v-if="user.company.packageProject == 1">
                     <el-input v-model="manDaySetting.groupWarningPercent" type="number" style="width:200px;">
                     </el-input>%
                 </el-form-item>

+ 10 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -1209,16 +1209,22 @@ import { error } from 'dingtalk-jsapi';
                 this.title = this.$t('editingtasks');
                 this.dynamicTab = true
                 this.showOrNot = false
-
+                console.log(task, '<=== 点击的数据', this.integrationTaskNingwai.length)
+                const { projectId } = task
                 // 自定义组件
                 this.integrationTask = {
                     id: task.id,
                     task: task,
                     num: 1,
-                    curProjectId: this.curProjectId,
+                    curProjectId: projectId || '',
                     create: false,
-                    integrationTaskNingwai: this.integrationTaskNingwai,
-                    taskVue: true,
+                    integrationTaskNingwai: {
+                        groupId: task.groupId,
+                        isDesc: false,
+                        order: "seq",
+                        projectId: projectId || '',
+                    },
+                    taskVue: projectId ? false : true,
                     meetingId: this.addForm.meetingId
                 }
                 this.taskComponentFlg = true

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -2098,7 +2098,7 @@ export default {
       this.jDarr = arrs;
     },
     mouseleave(data, $event) {
-      if($event.currentTarget && !this.adjustPosition) {
+      if($event.currentTarget && $event.currentTarget.firstElementChild && $event.currentTarget.firstElementChild.nextElementSibling && !this.adjustPosition) {
         $event.currentTarget.firstElementChild.nextElementSibling.setAttribute(
           "class",
           "node none poAub"
@@ -2107,7 +2107,7 @@ export default {
       
     },
     mouseover(data, $event) {
-      if($event.currentTarget && !this.adjustPosition) {  
+      if($event.currentTarget.lastChild.setAttribute && !this.adjustPosition) {  
         $event.currentTarget.lastChild.setAttribute("class", "node block poAub");
       }
     },