Browse Source

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

cs 2 years ago
parent
commit
5b8932bec7

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -564,6 +564,10 @@ public class TimingTask {
         List<TimeType> typeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("sync_corpwx_time", 1));
         List<TimeType> typeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("sync_corpwx_time", 1));
         for (TimeType type : typeList) {
         for (TimeType type : typeList) {
             Integer companyId = type.getCompanyId();
             Integer companyId = type.getCompanyId();
+            //检查企业是否已经过期
+            Company company = companyMapper.selectById(companyId);
+            //跳过已过期的企业
+            if (company.getExpirationDate().isBefore(LocalDateTime.now())) continue;
             //改成同步前2天的,以防止有昨天补卡前天的情况
             //改成同步前2天的,以防止有昨天补卡前天的情况
             wxCorpInfoService.getUserCheckInDayData(companyId, null, yesBefore, yestoday, false);
             wxCorpInfoService.getUserCheckInDayData(companyId, null, yesBefore, yestoday, false);
         }
         }

+ 58 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/ExcelUtil.java

@@ -7,6 +7,9 @@ import com.management.platform.service.CorpwxJobResultService;
 import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.service.WxCorpInfoService;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.RegionUtil;
+import org.apache.poi.xssf.streaming.SXSSFRow;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 import org.apache.poi.xssf.usermodel.*;
 import org.apache.poi.xssf.usermodel.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -61,7 +64,7 @@ public class ExcelUtil {
             font.setFontName("宋体");
             font.setFontName("宋体");
 
 
             //设置单元格样式
             //设置单元格样式
-            CellStyle headStyle = workBook.createCellStyle();
+            XSSFCellStyle  headStyle = (XSSFCellStyle) workBook.createCellStyle();
             headStyle.setFont(headFont);
             headStyle.setFont(headFont);
             headStyle.setAlignment(HorizontalAlignment.CENTER);
             headStyle.setAlignment(HorizontalAlignment.CENTER);
             headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
             headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
@@ -82,6 +85,15 @@ public class ExcelUtil {
             //这里的9是索引
             //这里的9是索引
 //            palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
 //            palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
 
 
+            //设置自定义颜色
+            XSSFColor xssfColor = new XSSFColor();
+            byte[] colorRgb = { (short)9, (byte) r, (byte) g, (byte) b };
+            xssfColor.setRGB(colorRgb);
+
+            headStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index);
+            headStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);// 填充模式(和背景颜色成对使用)
+            /*headStyle.setFillForegroundColor(IndexedColors.AQUA.getIndex());*/ //设置自带的颜色
+
             CellStyle titleStyle = workBook.createCellStyle();
             CellStyle titleStyle = workBook.createCellStyle();
             titleStyle.setFont(titleFont);
             titleStyle.setFont(titleFont);
             titleStyle.setAlignment(HorizontalAlignment.CENTER);
             titleStyle.setAlignment(HorizontalAlignment.CENTER);
@@ -130,7 +142,7 @@ public class ExcelUtil {
                     for(int i = 0; i < rowList.size(); i++) {
                     for(int i = 0; i < rowList.size(); i++) {
                         Cell cell = row.createCell(i);
                         Cell cell = row.createCell(i);
                         if(start == 0) {
                         if(start == 0) {
-                            cell.setCellStyle(titleStyle);
+                            cell.setCellStyle(headStyle);
                         }else {
                         }else {
                             cell.setCellStyle(cellStyle);
                             cell.setCellStyle(cellStyle);
                         }
                         }
@@ -198,7 +210,7 @@ public class ExcelUtil {
             font.setFontName("宋体");
             font.setFontName("宋体");
 
 
             //设置单元格样式
             //设置单元格样式
-            CellStyle headStyle = workBook.createCellStyle();
+            XSSFCellStyle  headStyle = (XSSFCellStyle) workBook.createCellStyle();
             headStyle.setFont(headFont);
             headStyle.setFont(headFont);
             headStyle.setAlignment(HorizontalAlignment.CENTER);
             headStyle.setAlignment(HorizontalAlignment.CENTER);
             headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
             headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
@@ -208,6 +220,25 @@ public class ExcelUtil {
             headStyle.setBorderTop(BorderStyle.THIN);//上边框
             headStyle.setBorderTop(BorderStyle.THIN);//上边框
             headStyle.setBorderRight(BorderStyle.THIN);//右边框
             headStyle.setBorderRight(BorderStyle.THIN);//右边框
 
 
+            String color = "c0c0c0";    //此处得到的color为16进制的字符串
+            //转为RGB码
+            int r = Integer.parseInt((color.substring(0,2)),16);   //转为16进制
+            int g = Integer.parseInt((color.substring(2,4)),16);
+            int b = Integer.parseInt((color.substring(4,6)),16);
+
+            //自定义cell颜色
+//            HSSFPalette palette = workBook.getCustomPalette();
+            //这里的9是索引
+//            palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
+
+            //设置自定义颜色
+            XSSFColor xssfColor = new XSSFColor();
+            byte[] colorRgb = { (byte)118, (byte)147, (byte)60 };
+            xssfColor.setRGB(colorRgb);
+            headStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index);
+            headStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);// 填充模式(和背景颜色成对使用)
+            //cs.setFillForegroundColor(IndexedColors.AQUA.getIndex()); //设置自带的颜色
+
 
 
             CellStyle titleStyle = workBook.createCellStyle();
             CellStyle titleStyle = workBook.createCellStyle();
             titleStyle.setFont(titleFont);
             titleStyle.setFont(titleFont);
@@ -257,7 +288,7 @@ public class ExcelUtil {
                     for(int i = 0; i < rowList.size(); i++) {
                     for(int i = 0; i < rowList.size(); i++) {
                         Cell cell = row.createCell(i);
                         Cell cell = row.createCell(i);
                         if(start == 0) {
                         if(start == 0) {
-                            cell.setCellStyle(titleStyle);
+                            cell.setCellStyle(headStyle);
                         }else {
                         }else {
                             cell.setCellStyle(cellStyle);
                             cell.setCellStyle(cellStyle);
                         }
                         }
@@ -319,7 +350,7 @@ public class ExcelUtil {
             font.setFontName("宋体");
             font.setFontName("宋体");
 
 
             //设置单元格样式
             //设置单元格样式
-            CellStyle headStyle = workBook.createCellStyle();
+            XSSFCellStyle  headStyle = (XSSFCellStyle) workBook.createCellStyle();
             headStyle.setFont(headFont);
             headStyle.setFont(headFont);
             headStyle.setAlignment(HorizontalAlignment.CENTER);
             headStyle.setAlignment(HorizontalAlignment.CENTER);
             headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
             headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
@@ -340,6 +371,15 @@ public class ExcelUtil {
             //这里的9是索引
             //这里的9是索引
 //            palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
 //            palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
 
 
+            //设置自定义颜色
+            XSSFColor xssfColor = new XSSFColor();
+            byte[] colorRgb = { (byte)118, (byte)147, (byte)60 };
+            xssfColor.setRGB(colorRgb);
+            headStyle.setFillForegroundColor(xssfColor);
+            headStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index);
+            headStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);// 填充模式(和背景颜色成对使用)
+            //cs.setFillForegroundColor(IndexedColors.AQUA.getIndex()); //设置自带的颜色
+
             CellStyle titleStyle = workBook.createCellStyle();
             CellStyle titleStyle = workBook.createCellStyle();
             titleStyle.setFont(titleFont);
             titleStyle.setFont(titleFont);
             titleStyle.setAlignment(HorizontalAlignment.CENTER);
             titleStyle.setAlignment(HorizontalAlignment.CENTER);
@@ -387,7 +427,7 @@ public class ExcelUtil {
                     for(int i = 0; i < rowList.size(); i++) {
                     for(int i = 0; i < rowList.size(); i++) {
                         Cell cell = row.createCell(i);
                         Cell cell = row.createCell(i);
                         if(start == 0) {
                         if(start == 0) {
-                            cell.setCellStyle(titleStyle);
+                            cell.setCellStyle(headStyle);
                         }else {
                         }else {
                             cell.setCellStyle(cellStyle);
                             cell.setCellStyle(cellStyle);
                         }
                         }
@@ -457,7 +497,7 @@ public class ExcelUtil {
                 font.setFontName("宋体");
                 font.setFontName("宋体");
 
 
                 //设置单元格样式
                 //设置单元格样式
-                CellStyle headStyle = workBook.createCellStyle();
+                XSSFCellStyle  headStyle = (XSSFCellStyle) workBook.createCellStyle();
                 headStyle.setFont(headFont);
                 headStyle.setFont(headFont);
                 headStyle.setAlignment(HorizontalAlignment.CENTER);
                 headStyle.setAlignment(HorizontalAlignment.CENTER);
                 headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
                 headStyle.setVerticalAlignment(org.apache.poi.ss.usermodel.VerticalAlignment.CENTER);
@@ -474,9 +514,17 @@ public class ExcelUtil {
                 int b = Integer.parseInt((color.substring(4,6)),16);
                 int b = Integer.parseInt((color.substring(4,6)),16);
 
 
                 //自定义cell颜色
                 //自定义cell颜色
-//                HSSFPalette palette = workBook.getCustomPalette();
+//            HSSFPalette palette = workBook.getCustomPalette();
                 //这里的9是索引
                 //这里的9是索引
-//                palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
+//            palette.setColorAtIndex((short)9, (byte) r, (byte) g, (byte) b);
+
+                //设置自定义颜色
+                XSSFColor xssfColor = new XSSFColor();
+                byte[] colorRgb = { (byte)118, (byte)147, (byte)60 };
+                xssfColor.setRGB(colorRgb);
+                headStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index);
+                headStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);// 填充模式(和背景颜色成对使用)
+                //cs.setFillForegroundColor(IndexedColors.AQUA.getIndex()); //设置自带的颜色
 
 
                 CellStyle titleStyle = workBook.createCellStyle();
                 CellStyle titleStyle = workBook.createCellStyle();
                 titleStyle.setFont(titleFont);
                 titleStyle.setFont(titleFont);
@@ -508,7 +556,7 @@ public class ExcelUtil {
                         for(int i = 0; i < rowList.size(); i++) {
                         for(int i = 0; i < rowList.size(); i++) {
                             Cell cell = row.createCell(i);
                             Cell cell = row.createCell(i);
                             if(start == 0) {
                             if(start == 0) {
-                                cell.setCellStyle(titleStyle);
+                                cell.setCellStyle(headStyle);
                             }else {
                             }else {
                                 cell.setCellStyle(cellStyle);
                                 cell.setCellStyle(cellStyle);
                             }
                             }

+ 4 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -152,12 +152,12 @@
     </select>
     </select>
 
 
     <select id="getProjectMembReportByDate" resultType="java.util.Map">
     <select id="getProjectMembReportByDate" resultType="java.util.Map">
-        SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project, b.category_name as categoryName,a.working_time AS duration,
+        SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project, b.project_code as projectCode, b.category_name as categoryName,a.working_time AS duration,
         a.content, a.create_time AS time, a.create_date as createDate,
         a.content, a.create_time AS time, a.create_date as createDate,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as
         a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as
         isOvertime,a.progress as progress,
         isOvertime,a.progress as progress,
-        a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
+        a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as
         degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId,
         degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId,
         a.custom_data as customData
         a.custom_data as customData
@@ -206,10 +206,10 @@
     </select>
     </select>
 
 
     <select id="getDeptMembReportByDate" resultType="java.util.Map">
     <select id="getDeptMembReportByDate" resultType="java.util.Map">
-        SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project, a.working_time AS duration, a.content, a.create_time AS time,a.create_date as createDate,
+        SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project, b.project_code as projectCode,b.category_name as categoryName, a.working_time AS duration, a.content, a.create_time AS time,a.create_date as createDate,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.end_time as endTime, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
-        a.department_audit_state as departmentAuditState,a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
+        a.department_audit_state as departmentAuditState,a.stage, a.pic_str as picStr, multi_worktime as multiWorktime,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
         ,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
         ,c.plate1 as plate1,c.plate2 as plate2,c.plate3 as plate3,c.plate4 as plate4,c.plate5 as plate5
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
         ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as departmentName, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as projectAuditTime,project_main.name as projectMainName
         ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, department.department_name as departmentName, a.overtime_hours as overtimeHours, a.custom_text as customText, a.project_audit_time as projectAuditTime,project_main.name as projectMainName

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

@@ -122,14 +122,14 @@
                         <el-option v-for="item in hasReportUserList"  :key="item.id" :label="item.name" :value="item.id"></el-option>
                         <el-option v-for="item in hasReportUserList"  :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                     </el-select>
 
 
-                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'350'" :subject="hasReportUserList" :clearable="true" :multiSelect="true" @selectCal="selectCal" :distinction="'1'"></selectCat>
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'350'" :filterable="true" :subject="hasReportUserList" :clearable="true" :multiSelect="true" @selectCal="selectCal" :distinction="'1'"></selectCat>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item prop="userIds" :label="$t('screening.selectPeople')" v-if="radio == $t('other.project') || radio == $t('projectclassification')">
                 <el-form-item prop="userIds" :label="$t('screening.selectPeople')" v-if="radio == $t('other.project') || radio == $t('projectclassification')">
                     <el-select v-if="user.userNameNeedTranslate != '1'" v-model="exportParam.userIds" :placeholder="$t('lable.allStaff')" multiple="true"  clearable style="width:350px;" filterable="true">
                     <el-select v-if="user.userNameNeedTranslate != '1'" v-model="exportParam.userIds" :placeholder="$t('lable.allStaff')" multiple="true"  clearable style="width:350px;" filterable="true">
                         <el-option v-for="item in users"  :key="item.id" :label="item.name" :value="item.id"></el-option>
                         <el-option v-for="item in users"  :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                     </el-select>
 
 
-                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'350'" :subject="users" :clearable="true" :multiSelect="true" @selectCal="selectCal" :distinction="'1'"></selectCat>
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'350'" :filterable="true" :subject="users" :clearable="true" :multiSelect="true" @selectCal="selectCal" :distinction="'1'"></selectCat>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item prop="projectId" :label="user.timeType.fixMonthcost==0?$t('time.dateRange'):$t('Selectmonth')">
                 <el-form-item prop="projectId" :label="user.timeType.fixMonthcost==0?$t('time.dateRange'):$t('Selectmonth')">
                     <el-date-picker v-show="user.timeType.fixMonthcost==0"
                     <el-date-picker v-show="user.timeType.fixMonthcost==0"
@@ -302,12 +302,19 @@
             
             
             showExportDialog() {
             showExportDialog() {
                 // console.log(12345)
                 // console.log(12345)
+                // 清空选择的人
+                if(this.radio == this.$t('ren-yuan')) {
+                    this.exportParam.userIds = new Array()
+                }
+                console.log(this.exportParam)
+
                 this.exportDialog = true;
                 this.exportDialog = true;
                 this.exportParam.dateRange = this.dateRange;
                 this.exportParam.dateRange = this.dateRange;
                 // console.log(this.hasReportUserList)
                 // console.log(this.hasReportUserList)
                 if (this.radio == this.$t('ren-yuan')) {
                 if (this.radio == this.$t('ren-yuan')) {
                     // this.exportParam.userIds = [];
                     // this.exportParam.userIds = [];
                 }
                 }
+                
                 if (this.radio == this.$t('other.project')) {
                 if (this.radio == this.$t('other.project')) {
                     this.exportParam.deptId = []
                     this.exportParam.deptId = []
                 }
                 }

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

@@ -528,7 +528,7 @@
                                 <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
                                 <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
                             </el-option>
                             </el-option>
                         </el-select>
                         </el-select>
-
+                        
                         <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal"></selectCat>
                         <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal"></selectCat>
 
 
                     </el-form-item>
                     </el-form-item>
@@ -1032,7 +1032,7 @@
         </el-dialog>
         </el-dialog>
 
 
         <!-- 按部门选择人员 -->
         <!-- 按部门选择人员 -->
-        <el-dialog :title="$t('selectingParticipants')"  v-if="chooseParticipVisible" :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
+        <el-dialog :title="$t('selectingParticipants')"  :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
             <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
             <div v-if="user.userNameNeedTranslate == '1'">
             <div v-if="user.userNameNeedTranslate == '1'">
                 <el-input placeholder="请输入内容" v-model.trim="wxFilterText" class="input-with-select">
                 <el-input placeholder="请输入内容" v-model.trim="wxFilterText" class="input-with-select">
@@ -1046,7 +1046,7 @@
                     :placeholder="$t('keywordfiltering')"
                     :placeholder="$t('keywordfiltering')"
                     v-model="filterText" v-if="user.userNameNeedTranslate != '1'">
                     v-model="filterText" v-if="user.userNameNeedTranslate != '1'">
                     </el-input>
                     </el-input>
-                    <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
+                    <el-tree :data="deptMembData" show-checkbox :default-expand-all="searchPersonnelFlg" :props="defaultProps" node-key="id"
                         ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
                         ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="addForm.userId"
                         highlight-current  :filter-node-method="filterNode">
                         highlight-current  :filter-node-method="filterNode">
                         <span class="custom-tree-node" slot-scope="{ node, data }">
                         <span class="custom-tree-node" slot-scope="{ node, data }">
@@ -1462,7 +1462,10 @@ a {
                 participationId: '',
                 participationId: '',
 
 
                 importProjectBeforeDialog: false,
                 importProjectBeforeDialog: false,
-                paramData1: false
+                paramData1: false,
+                chosenListBackup: [], // 备份
+                searchPersonnelFlg: false,
+                searchPersonnelFlgnum: 1
             };
             };
         },
         },
         // 过滤器
         // 过滤器
@@ -2655,6 +2658,14 @@ a {
                 this.chooseParticipVisible = true;
                 this.chooseParticipVisible = true;
                 this.filterText = ''
                 this.filterText = ''
                 this.wxFilterText = ''
                 this.wxFilterText = ''
+                if(this.user.userNameNeedTranslate == 1) {
+                    this.getDepartment()
+                }
+                let that = this
+                setTimeout(()=>{    
+                    that.chosenListBackup = that.$refs.chooseMembTree.getCheckedNodes();
+                }, 500)
+                console.log(this.chosenListBackup, '备份的数据')
             },
             },
             onTreeItemChange() {
             onTreeItemChange() {
                 var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
                 var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
@@ -2692,6 +2703,9 @@ a {
             chooseParticip() {
             chooseParticip() {
                 this.chooseParticipVisible = false;
                 this.chooseParticipVisible = false;
                 var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
                 var chosenList = this.$refs.chooseMembTree.getCheckedNodes();
+                if(this.searchPersonnelFlg) {
+                    chosenList = [...chosenList, ...this.chosenListBackup]
+                }
                 this.chosenMembList = chosenList.filter(item=>item.isUser == 1);
                 this.chosenMembList = chosenList.filter(item=>item.isUser == 1);
                 this.addForm.userNames = '';
                 this.addForm.userNames = '';
                 this.addFormUserNames = []
                 this.addFormUserNames = []
@@ -2708,6 +2722,10 @@ a {
                     this.addForm.userNames = this.addForm.userNames.substring(0, this.addForm.userNames.length-1);
                     this.addForm.userNames = this.addForm.userNames.substring(0, this.addForm.userNames.length-1);
                     // this.addFormUserNames = this.addFormUserNames.substring(0, this.addFormUserNames.length-1);
                     // this.addFormUserNames = this.addFormUserNames.substring(0, this.addFormUserNames.length-1);
                 }
                 }
+
+                console.log(this.addForm.userId)
+                console.log(this.addForm.userNames)
+                console.log(this.addFormUserNames)
             },
             },
 
 
             //选中相关领导
             //选中相关领导
@@ -2759,29 +2777,36 @@ a {
             // 企业微信搜索
             // 企业微信搜索
             echartDepartment() {
             echartDepartment() {
                 console.log('我点击了搜索')
                 console.log('我点击了搜索')
-                this.http.post("/department/listAllMemb", {
-                    keyword: this.wxFilterText,
-                    cursor: ''
-                },
-                res => {
-                    if (res.code == "ok") {
-                        var list = res.data.data;
-                        this.setUserToDept(list);
-                        this.deptMembData = list;
-                        console.log(this.deptMembData, '数据也')
-                    } else {
+                if(this.wxFilterText != '') {
+                    this.searchPersonnelFlg = true
+                    this.http.post("/department/listAllMemb", {
+                        keyword: this.wxFilterText,
+                        cursor: ''
+                    },
+                    res => {
+                        if (res.code == "ok") {
+                            var list = res.data.data;
+                            this.setUserToDept(list);
+                            this.deptMembData = list;
+                            console.log(this.deptMembData, '数据也')
+                            this.$forceUpdate()
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
                         this.$message({
                         this.$message({
-                            message: res.msg,
+                            message: error,
                             type: "error"
                             type: "error"
                         });
                         });
-                    }
-                },
-                error => {
-                    this.$message({
-                        message: error,
-                        type: "error"
                     });
                     });
-                });
+                } else {
+                    this.searchPersonnelFlg = false
+                    this.getDepartment()
+                }
             },
             },
             
             
             setUserToDept(list) {
             setUserToDept(list) {
@@ -4190,6 +4215,8 @@ a {
                     this.participationSelect()
                     this.participationSelect()
                 } else if(obj.distinction == '3') {
                 } else if(obj.distinction == '3') {
                     this.addForm.inchargerId = obj.id
                     this.addForm.inchargerId = obj.id
+                    // console.log(this.participator)
+                    this.participator = JSON.parse(JSON.stringify(this.participator))
                 } else if(obj.distinction =='4') {
                 } else if(obj.distinction =='4') {
                     this.projectProfessionList[obj.other].inchargerId = obj.id
                     this.projectProfessionList[obj.other].inchargerId = obj.id
                 } else if(obj.distinction =='5') {
                 } else if(obj.distinction =='5') {

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

@@ -159,8 +159,13 @@
                         </el-select>
                         </el-select>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item style="float:right;">
                     <el-form-item style="float:right;">
-                        <div style="width: 200px;display: inline-block;margin-top: 4px">
-                            <el-input v-model="keyword" class="input-with-select" :placeholder="$t('nameoftheperson')" clearable="true" size="small">
+                        <div style="width: 300px;display: inline-block;margin-top: 4px">
+                            <el-input v-model="keyword" class="input-with-select" placeholder="请输入" clearable="true" size="small">
+                              <el-select v-model="integer" slot="prepend" style="width: 80px">
+                                <el-option label="姓名" value="0"></el-option>
+                                <el-option label="电话" value="1"></el-option>
+                                <el-option label="工号" value="2"></el-option>
+                              </el-select>
                                 <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
                                 <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
                             </el-input>
                             </el-input>
                         </div>
                         </div>
@@ -822,6 +827,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      integer: '0',
       workingHoursDialog: false,
       workingHoursDialog: false,
       workingHoursRadio: '1',
       workingHoursRadio: '1',
       workingHoursDatas: [],
       workingHoursDatas: [],
@@ -2264,6 +2270,7 @@ export default {
           roleId: this.roleId,
           roleId: this.roleId,
           onlyDirect: this.onlyDirect ? "1" : "0",
           onlyDirect: this.onlyDirect ? "1" : "0",
           cursor: this.nextCursor, // 游标
           cursor: this.nextCursor, // 游标
+          matchingType: this.integer
         },
         },
         (res) => {
         (res) => {
           this.listLoading = false;
           this.listLoading = false;
@@ -3092,7 +3099,8 @@ export default {
           status: this.status,
           status: this.status,
           roleId: this.roleId,
           roleId: this.roleId,
           cursor: this.nextCursor,
           cursor: this.nextCursor,
-          onlyDirect: this.onlyDirect ? "1" : "0"
+          onlyDirect: this.onlyDirect ? "1" : "0",
+          matchingType: this.integer
         },
         },
         (res) => {
         (res) => {
           this.listLoading = false;
           this.listLoading = false;

File diff suppressed because it is too large
+ 8373 - 6185
fhKeeper/formulahousekeeper/timesheet_h5/package-lock.json


+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_h5/package.json

@@ -19,6 +19,7 @@
     "echarts": "^4.9.0",
     "echarts": "^4.9.0",
     "font-awesome": "^4.7.0",
     "font-awesome": "^4.7.0",
     "jquery": "^3.6.1",
     "jquery": "^3.6.1",
+    "pdfh5": "^1.4.2",
     "style-loader": "^1.3.0",
     "style-loader": "^1.3.0",
     "vue": "^2.6.12",
     "vue": "^2.6.12",
     "vuex-persistedstate": "^2.7.1",
     "vuex-persistedstate": "^2.7.1",

BIN
fhKeeper/formulahousekeeper/timesheet_h5/src/assets/img/qwcode.png


+ 7 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/router/index.js

@@ -245,6 +245,13 @@ const router = new Router({
             title: "成本"
             title: "成本"
         }
         }
     },
     },
+    {
+        path: "/pdf",
+        meta: {
+            title: "PDF"
+        },
+        component: () => import("@/views/pdf/ppd")
+    },
     {
     {
         path: "*",
         path: "*",
         component: () => import("@/components/NotFound")
         component: () => import("@/components/NotFound")

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -212,7 +212,7 @@
                                         timestamp: res.data.timestamp, // 必填,生成签名的时间戳
                                         timestamp: res.data.timestamp, // 必填,生成签名的时间戳
                                         nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
                                         nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
                                         signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
                                         signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
-                                        jsApiList: ['selectExternalContact','openThirdAppServiceChat'], //必填,传入需要使用的接口名称
+                                        jsApiList: ['selectExternalContact','openThirdAppServiceChat', 'openAppManage'], //必填,传入需要使用的接口名称
                                         success: function (result) {
                                         success: function (result) {
                                             // console.log(result, '请求微信成功')
                                             // console.log(result, '请求微信成功')
                                             // console.log(window, 'window')
                                             // console.log(window, 'window')

+ 124 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <div class="center">
+    <div class="center myCenter">
         <!-- 头部 -->
         <!-- 头部 -->
         <header>
         <header>
             <div class="beijin"></div>
             <div class="beijin"></div>
@@ -13,9 +13,26 @@
         <!-- 主体 -->
         <!-- 主体 -->
         <main class="mt-10">
         <main class="mt-10">
             <div class="bg-fff">
             <div class="bg-fff">
+                <!-- <div v-if="userInfo.companyId == '7'"> -->
+
+                <van-cell title="当前版本" :title-style="'flex: 0.5;'" :value="version"></van-cell>
+
+                <div style="height: 20px;background: #f4f4f4"></div>
+                <!-- </div> -->
                 <van-cell title="账号" v-if="userInfo.userNameNeedTranslate != '1'" :title-style="'flex: 0.5;'" :value="userInfo.phone"></van-cell>
                 <van-cell title="账号" v-if="userInfo.userNameNeedTranslate != '1'" :title-style="'flex: 0.5;'" :value="userInfo.phone"></van-cell>
                 <van-cell title="工号" v-if="userInfo.jobNumber" :title-style="'flex: 0.5;'" :value="userInfo.jobNumber"></van-cell>
                 <van-cell title="工号" v-if="userInfo.jobNumber" :title-style="'flex: 0.5;'" :value="userInfo.jobNumber"></van-cell>
+
+                <div style="height: 20px;background: #f4f4f4"></div>
+                
                 <van-cell title="公司" :title-style="'flex: 0.5;'" :value="userInfo.companyName"></van-cell>
                 <van-cell title="公司" :title-style="'flex: 0.5;'" :value="userInfo.companyName"></van-cell>
+                <van-cell title="有效日期" :title-style="'flex: 0.5;'" :value="expirationDate"></van-cell> 
+
+                <div style="height: 20px;background: #f4f4f4"></div>
+                <!-- <div v-if="userInfo.companyId == '7'"> -->
+                <van-cell title="使用说明" :title-style="'flex: 1;'" is-link @click="instructions()"></van-cell>
+                <van-cell title="在线客服" :title-style="'flex: 1;'" is-link @click="tokefu()"></van-cell>
+                <van-cell title="添加员工" :title-style="'flex: 1;'" is-link @click="addEmployee()" v-if="wxManager"></van-cell>
+                <!-- </div> -->
                 <!-- <van-cell title="修改密码" isLink to="/my/set"></van-cell> -->
                 <!-- <van-cell title="修改密码" isLink to="/my/set"></van-cell> -->
             </div>
             </div>
             <van-cell :title="'绑定'+(isCorpWX?'企业':'')+'微信'" v-if="userInfo.userNameNeedTranslate != '1' && (isCorpWX || isWX)" @click="bindWeiXin" style="margin-top:10px;" :title-style="'flex: 2.5;'" label="绑定微信后可接收工时填报提醒">
             <van-cell :title="'绑定'+(isCorpWX?'企业':'')+'微信'" v-if="userInfo.userNameNeedTranslate != '1' && (isCorpWX || isWX)" @click="bindWeiXin" style="margin-top:10px;" :title-style="'flex: 2.5;'" label="绑定微信后可接收工时填报提醒">
@@ -49,6 +66,11 @@
                 userInfo: JSON.parse(localStorage.userInfo),
                 userInfo: JSON.parse(localStorage.userInfo),
                 isCorpWX:false,
                 isCorpWX:false,
                 isWX:false,
                 isWX:false,
+                expirationDate: '', // 有效日期
+                version: '', // 版本
+                show: false,
+                
+                wxManager: false,
             }
             }
         },
         },
 
 
@@ -76,9 +98,76 @@
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
                 window.location.href = weixinUrl;
                 window.location.href = weixinUrl;
             },
             },
+            // 使用说明
+            instructions() {
+                let url = 'http://celiang.oss-cn-hangzhou.aliyuncs.com/measurement/2022-01/18/75it6phpocqYFV1642488558220118.pdf'
+                let name = '使用说明书'
+                // 将要传过去的值
+                this.previewPDF(url, name)
+            },
+            // 预览pdf
+            previewPDF(url, name) {
+                this.$router.push({
+                    path:  '/pdf',
+                    query: {
+                        url: '',
+                        name: name
+                    }
+                })
+            },
+            // 添加员工
+            addEmployee() {
+                wx.invoke('openAppManage', {}, function(res){
+                    console.log(res, '你在看看')
+                    if(res.err_msg == "openAppManage:ok") {
+                        // 调用成功              
+                    }
+                    if(res.err_msg == "openAppManage:fail:no permission") {
+                        // 调用人身份不符合                 
+                        this.$message({message: '调用人身份不符合',type: "error"});
+                    }
+                    if(res.err_msg == "openAppManage:fail:unknown app") {
+                        // 应用信息获取失败
+                        this.$message({message: '应用信息获取失败',type: "error"});
+                    }
+                    if(res.err_msg == "openAppManage:fail:unsupported app type") {
+                        // 应用类型不符合要求
+                        this.$message({message: '应用类型不符合要求',type: "error"});
+                    }
+                    if(res.err_msg == "openAppManage:fail") {
+                        // 其它错误                  
+                        this.$message({message: '其它错误',type: "error"});
+                    }      
+                })
+            },
+            // 跳转客服
+            tokefu(){
+                wx.invoke('openThirdAppServiceChat', {
+                    }, function(res) {
+                        console.log('invoke',res);
+                        if (res.err_msg == "openThirdAppServiceChat:ok" || res.err_msg == "openThirdAppServiceChat:cancel") {
+                        }else{
+                            this.$toast.fail('请联系管理员添加客服');
+                        }
+                        
+                    }
+                );
+            },
+            // 判断是否有添加员工的权限
+            getWxManager() {
+                this.$axios.post("/user/isManager", {})
+                .then(res => {
+                    if(res.code == "ok") {
+                        let bur = res.data + ''
+                        this.wxManager = bur == 'true'
+                    } else {
+                        this.$toast.clear();
+                        this.$toast.fail(res.msg);
+                    }
+                }).catch(err=> {this.$toast.clear();});
+            }
         },
         },
         create() {
         create() {
-            
         },
         },
         mounted() {
         mounted() {
             var ua = navigator.userAgent.toLowerCase();
             var ua = navigator.userAgent.toLowerCase();
@@ -87,11 +176,35 @@
             } else if (ua.indexOf("micromessenger") > 0) {
             } else if (ua.indexOf("micromessenger") > 0) {
                 this.isWX = true;
                 this.isWX = true;
             }
             }
+            
+            // 拼接有效日期 和 版本
+            if(localStorage.userInfo) {
+                // 日期
+                let userss = JSON.parse(localStorage.userInfo)
+                userss.createTime[1] >= 10 ? userss.createTime[1] : userss.createTime[1] = '0' + userss.createTime[1]
+                userss.createTime[2] >= 10 ? userss.createTime[2] : userss.createTime[1] = '0' + userss.createTime[2]
+                userss.company.expirationDate[2] >= 10 ? userss.company.expirationDate[2] : userss.company.expirationDate[1] = '0' + userss.company.expirationDate[2]
+                userss.company.expirationDate[1] >= 10 ? userss.company.expirationDate[1] : userss.company.expirationDate[1] = '0' + userss.company.expirationDate[1]
+                this.expirationDate = userss.createTime[0] + '-' + userss.createTime[1] + '-' + userss.createTime[2] + ' 至 ' + userss.company.expirationDate[0] + '-' + userss.company.expirationDate[1] + '-' + userss.company.expirationDate[2]
+
+                // 版本
+                userss.company.packageWorktime == 1 ? this.version = '基础版' : ''
+                userss.company.packageProject == 1 ? this.version = '专业版' : ''
+                userss.company.packageEngineering == 1 ? this.version = '建筑工程版' : ''
+                userss.company.packageOa == 1 ? this.version = '旗舰版' : ''
+
+                console.log(this.version)
+            }
+
+            this.getWxManager()
         }
         }
     };
     };
 </script>
 </script>
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
+    .myCenter {
+        padding-bottom: 50px;
+    }
     /* 本页公共样式 */
     /* 本页公共样式 */
     .gray {
     .gray {
         color: #797d82;
         color: #797d82;
@@ -153,7 +266,7 @@
 
 
     .logout {
     .logout {
         width: 80%;
         width: 80%;
-        margin: 50px auto 0;
+        margin: 50px auto;
     }
     }
 
 
     // 主体
     // 主体
@@ -176,4 +289,12 @@
     .footer {
     .footer {
         height: 50px;
         height: 50px;
     }
     }
+
+    // 扫码 
+    .scanCode {
+        padding: 10px;
+    }
+    .scanCode_img img {
+        width: 100%;
+    }
 </style>
 </style>

+ 44 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/pdf/pdf.vue

@@ -0,0 +1,44 @@
+<template>
+  <div class="pdfBox">
+    <div id="previewPdf"></div>
+  </div>
+</template>
+<script>
+import pdfh5 from 'pdfh5';
+import 'pdfh5/css/pdfh5.css'
+export default {
+  name: 'pdfh5',
+  data () {
+    return {
+      pdfh5: null,
+    }
+  },
+  methods: {
+    openPdf(url){     //url:PDF文件地址
+      this.pdfh5 = new pdfh5('#previewPdf', {
+        pdfurl: url
+      });
+      this.pdfh5.on('success', ()=>{
+        console.log('pdf渲染成功');
+      });
+    }
+  }
+}
+</script>
+<style scoped>
+.pdfBox {
+  position: relative;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  height: 94vh;
+  background: #000;
+  overflow: hidden;
+  z-index: 99;
+  box-sizing: border-box;
+  margin-top: 1.22667rem;
+}
+#previewPdf {
+    height: 100%;
+  }
+</style>

+ 45 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/pdf/ppd.vue

@@ -0,0 +1,45 @@
+<template>
+  <div class="home">
+    <van-nav-bar :title="title" @click-left="back" left-text="返回" fixed left-arrow style="z-index: 20"/>
+    <div style="margin-top: 1.22667rem"></div>
+    <div style="box-sizing: border-box;">
+        <preview-pdf ref="previewPdfh5"></preview-pdf>
+    </div>
+  </div>
+</template>
+ 
+<script>
+import PreviewPdf from './pdf.vue';
+export default {
+  name: 'Home',
+  components: {
+    PreviewPdf
+  },
+  data () {
+    return {
+        title: ''
+    }
+  },
+  mounted () {
+    const urls = this.$route.query.url
+    const name = this.$route.query.name
+    let namess = name.split('.')[0]
+    let titless = ''
+    if(namess.length > 6) {
+        titless = namess.substring(0, 6) + '...'
+    } else {
+        titless = namess
+    }
+    this.title = titless
+    console.log(urls)
+    this.$refs.previewPdfh5.openPdf('https://mobworktime.ttkuaiban.com/upload/834b655854f54a34b1d367d9765bcf11.pdf')
+    // this.$refs.previewPdfh5.openPdf(urls)
+  },
+  methods: {
+    // 返回
+    back() { 
+        history.back();
+    },
+  } 
+}
+</script>